Homebrew Official [Download] Decrypt9 - Open Source Decryption Tools (WIP)

  • Thread starter Thread starter d0k3
  • Start date Start date
  • Views Views 935,178
  • Replies Replies 4,476
  • Likes Likes 71
Aw, come on, I wouldn't exactly call any of you two a noob :). I myself have done Windows GUIs (some basic stuff in Visual Studio/C# and Eclipse/Java) aeons ago, but I somehow forgot most of it, and I'm more interested in pure coding anyways (my only IDE is Notepad++ with NPPExec configured for convenient compiling with GCC, to give you a picture). This in turn leads to many true noobs thinking my stuff is too technical or not userfriendly enough, oh well... :)

For ImageConv, could you provide a compiled executable (as you see, not everyone has VS ;)). Doesn't have to be now, just when you think it is ready!

As for the Linux GUI stuff, I can't really add anything useful to that obviously. Just throwing that in, but doesn't basically any Linux distro nowadays contain a basic installation of Wine? And, if not, maybe the Wine project provides libraries for easy porting (at least of Windows GUIs)?

And ZIP3DSFX... well, I tested it yesterday as self installing boot.3dsx replacement and it turns out that (1) boot.3dsx is one of the cases where the SFX (in stub mode) can't find out it's own name (I have a workaround for that, but it's ugly) and (2) if ran as boot.3dsx I need to take care to properly initialize all the required services (which I haven't done so far). Fix(es) coming up, just in case you wonder.

Most Linux distros don't come with wine and while wine works OK it isn't perfect and honestly I'd like to not spend a half hour installing dependencies (especially mono because it's a pain in the ass, as well as anything visual studio) just to run ImageConv... Especially when most distros come with a full imagemagick install, running a windows convert.exe in wine just seems.... Well dirty and a little dumb tbh... Again I don't NEED it to happen just would be nice, though I could probably just write a simple script (since that's less work and rotating and putting it into BGR is super easy in ImageMagick anyways)
 
Last edited by dark_samus3,
Most Linux distros don't come with wine and while wine works OK it isn't perfect and honestly I'd like to not spend a half hour installing dependencies (especially mono because it's a pain in the ass, as well as anything visual studio) just to run ImageConv... Especially when most distros come with a full imagemagick install, running a windows convert.exe in wine just seems.... Well dirty and a little dumb tbh... Again I don't NEED it to happen just would be nice, though I could probably just write a simple script (since that's less work and rotating and putting it into BGR is super easy in ImageMagick anyways)
Yeah you've got a point there. I messed around in my ubuntu VM for a while yesterday messing with different stuff, mono etc and it was a pain in the butt.
I didn't try it with wine though, Also, convert.exe is only used for 2 functions in the whole program, the 2 convert to .bin options as i don't know of any other way to do it other than with imagemagick. haha
I tried multiple things to get it to run on linux to no avail... targeted mono directly when compiling rather than .NET > tried running with mono, doesn't work. Strange though because MoMA (Mono Migration Analyzer) says it SHOULD run with mono yet it doesn't. I don't get it. haha As for GTK#... yeah, no. That is a pain to work with, i have no idea how anyone gets anything done with it tbh. lol
Also the idea for ImgConv wasn't just converting images but also viewing mass amounts of images (like batch screenshots taken in D9 for eg). And it was just a little project i wanted to do. :)
I would still like to figure out how to make my winforms programs (not just ImgConv, but any i do) cross platform friendly (or at least win / lin friendly) though.
 
Yeah you've got a point there. I messed around in my ubuntu VM for a while yesterday messing with different stuff, mono etc and it was a pain in the butt.
I didn't try it with wine though, Also, convert.exe is only used for 2 functions in the whole program, the 2 convert to .bin options as i don't know of any other way to do it other than with imagemagick. haha
I tried multiple things to get it to run on linux to no avail... targeted mono directly when compiling rather than .NET > tried running with mono, doesn't work. Strange though because MoMA (Mono Migration Analyzer) says it SHOULD run with mono yet it doesn't. I don't get it. haha As for GTK#... yeah, no. That is a pain to work with, i have no idea how anyone gets anything done with it tbh. lol
Also the idea for ImgConv wasn't just converting images but also viewing mass amounts of images (like batch screenshots taken in D9 for eg). And it was just a little project i wanted to do. :)
I would still like to figure out how to make my winforms programs (not just ImgConv, but any i do) cross platform friendly (or at least win / lin friendly) though.

Oh it gets even BETTER when you combine the windows version of mono with wine :mellow: seriously I spent an hour just trying to install mono before I said screw it... I got into a sort of circular dependency situation, I needed to install something so the mono installer could run and the installer for that required mono.... Yeah that was a frustrating time... Though I actually do have several games that all run really good on my system working within wine (Portal 2, Dead Space, Undertale, fallout 3 (which I don't really play tbh), Amnesia, and a few other programs I use every once in awhile (irfanview, which looks really crappy but has an AWESOME RGB raw viewer that helped me with a previous project) but thank God none of those require mono... Anyways enough ranting on that haha

Idk what to tell you for a nice GUI thats easily cross platform if you aren't interested in QT (which sucks anyways IMO)

--------------------- MERGED ---------------------------

Also @Shadowtrance what imagemagick commands do you use to convert the images to the .bin format? If you're using the ones I think you are then I'm here to tell you there's a better way... If not then well kudos to you :)
 
Oh it gets even BETTER when you combine the windows version of mono with wine :mellow: seriously I spent an hour just trying to install mono before I said screw it... I got into a sort of circular dependency situation, I needed to install something so the mono installer could run and the installer for that required mono.... Yeah that was a frustrating time... Though I actually do have several games that all run really good on my system working within wine (Portal 2, Dead Space, Undertale, fallout 3 (which I don't really play tbh), Amnesia, and a few other programs I use every once in awhile (irfanview, which looks really crappy but has an AWESOME RGB raw viewer that helped me with a previous project) but thank God none of those require mono... Anyways enough ranting on that haha

Idk what to tell you for a nice GUI thats easily cross platform if you aren't interested in QT (which sucks anyways IMO)
I had no issue installing mono at all... all i had to run (if I'm remembering right) is sudo apt-get install mono-complete and it did it all for me. haha
And yeah I'm having a hard time finding and easily cross platform GUI toolkit that isn't a pain to work with (looking at you GTK#), Winforms, while apparently cross platform with mono still has calls to the win32 api in windows so makes it a bit of a pain to work on non windows platforms (so I'm reading at least), GTK# is just a pain in my ass, there's QTsharp, no idea what that's like to be honest, haven't looked at it yet.

Commands used are... https://github.com/Shadowtrance/ImgConv/blob/master/ImgConv/MainForm.cs#L447 for a single image to bin.
And for batch it's pretty much the same but i write a temp bat file to do (cause I'm a noob lol) https://github.com/Shadowtrance/ImgConv/blob/master/ImgConv/MainForm.cs#L546
 
I had no issue installing mono at all... all i had to run (if I'm remembering right) is sudo apt-get install mono-complete and it did it all for me. haha
And yeah I'm having a hard time finding and easily cross platform GUI toolkit that isn't a pain to work with (looking at you GTK#), Winforms, while apparently cross platform with mono still has calls to the win32 api in windows so makes it a bit of a pain to work on non windows platforms (so I'm reading at least), GTK# is just a pain in my ass, there's QTsharp, no idea what that's like to be honest, haven't looked at it yet.

Commands used are... https://github.com/Shadowtrance/ImgConv/blob/master/ImgConv/MainForm.cs#L447 for a single image to bin.
And for batch it's pretty much the same but i write a temp bat file to do (cause I'm a noob lol) https://github.com/Shadowtrance/ImgConv/blob/master/ImgConv/MainForm.cs#L546

I meant the windows version of mono (required for wine programs that use it) in wine... Yeah I probably could have figured the mono package name out and installed it just fine if I needed the Linux version haha... Anyways, I guess I'm not seeing how you convert to BGR :huh: I see some things relating to it but not seeing how you actually are doing it... BGR isn't just rotating things 90 (actually that's a quirk of the 3ds) but swapping the red and greed around in the image...
 
I meant the windows version of mono (required for wine programs that use it) in wine... Yeah I probably could have figured the mono package name out and installed it just fine if I needed the Linux version haha... Anyways, I guess I'm not seeing how you convert to BGR :huh: I see some things relating to it but not seeing how you actually are doing it... BGR isn't just rotating things 90 (actually that's a quirk of the 3ds) but swapping the red and greed around in the image...
The trick to converting to bgr (bin, the image won't convert properly direct to .bin (too small)) is not directly converting the input image to a .bin output, but instead converting the input image to .bgr then renaming to .bin.
For example... convert input.png -rotate 90 output.bgr
rename output.bgr output.bin (which is the file.copy / file.delete commands).
 
The trick to converting to bgr (bin, the image won't convert properly direct to .bin (too small)) is not directly converting the input image to a .bin output, but instead converting the input image to .bgr then renaming to .bin.
For example... convert input.png -rotate 90 output.bgr
rename output.bgr output.bin (which is the file.copy / file.delete commands).

So does imagemagick just do it based on the file extension ? Because all that's doing is rotating the image if not... And if it is then I've been doing it wrong this whole time XD
 
So does imagemagick just do it based on the file extension ? Because all that's doing is rotating the image if not... And if it is then I've been doing it wrong this whole time XD
It seems it does yeah.
At least that's how the graphics example in ctrulib does it now, unlike the old way it did it by splitting channels etc.
For some strange reason that simple command works, it's how I've done it for ages with D9UI graphics. :)
 
It seems it does yeah.
At least that's how the graphics example in ctrulib does it now, unlike the old way it did it by splitting channels etc.
For some strange reason that simple command works, it's how I've done it for ages with D9UI graphics. :)

Huh, interesting so the "old way" was the standard convert filename.ext -channel RGB -separate -reverse -combine -rotate 90 filename.bin?
 
Huh, interesting so the "old way" was the standard convert filename.ext -channel RGB -separate -reverse -combine -rotate 90 filename.bin?
Yeah that's the one. :) Or something along those lines, forget the exact command.

--------------------- MERGED ---------------------------

Found it! :) convert fileIn.png -channel B -separate fileIn.png -channel G -separate fileIn.png -channel R -separate -channel RGB -combine -rotate 90 fileOut.rgb

--------------------- MERGED ---------------------------

https://github.com/smealum/ctrulib/...49d77889/examples/graphics/bitmap/24bit-color

--------------------- MERGED ---------------------------

Funnily enough the readme for that example hasn't changed, but in the makefile it only does what i do...
https://github.com/smealum/ctrulib/blob/master/examples/graphics/bitmap/24bit-color/Makefile#L184
 
Yeah that's the one. :) Or something along those lines, forget the exact command.
Well... That could have helped me awhile ago when one of my old scripts was actually relevant haha (it was to change bootlogos on my phone... they USED to be stored in RAW BGR format with special headers for the boatloader but they went to some new format that either is compressed (the new file size is insanely small compared to the old file size) or just different entirely... Anyways it was rendered useless by the latest firmware (which to boot properly required a bootloader update :angry: )

EDIT: saw your above edits, that's actually not even the right way to do it (does get the job done ofc) but in my script I used the exact command I listed above (minus the 90 degree rotation) and it always worked fine
 
Last edited by dark_samus3,
I love how all of the 3ds environments are done, basically, in a *nix environment... Seriously you guys use GNU make which was made for Unix originally along with bash and coreutils all of which are traditionally Unix tools and use minGW or something else to compile and run them on windows... It just cracks me up is all
 
  • Like
Reactions: Deleted-236924
I love how all of the 3ds environments are done, basically, in a *nix environment... Seriously you guys use GNU make which was made for Unix originally along with bash and coreutils all of which are traditionally Unix tools and use minGW or something else to compile and run them on windows... It just cracks me up is all
Yes, well if linux was more user friendly (I'll admit it has come a long way in that department) and everything i used worked on it without a shitload of messing around I'd use it as my main OS, but for now (for me at least) it stays in a VM and on my raspberry pi's :P
 
Yes, well if linux was more user friendly (I'll admit it has come a long way in that department) and everything i used worked on it without a shitload of messing around I'd use it as my main OS, but for now (for me at least) it stays in a VM and on my raspberry pi's :P

Have you tried out GNOME? I absolutely LOVE GNOME for my DE... (And I don't mean unity, that crappy excuse of a DE normal Ubuntu comes with) and once you get used to Linux you'll find that windows is actually less user friendly for lots of simple operations, but is simply offset by the sheer amount of third party applications you can get for it... Seriously, the way that have storage devices abstracted is absolutely idiotic and makes copying from them tricky whereas on Linux they are represented as a file and are easy to copy to and from with whatever raw data you want... Whereas you need something like win32diskimager to do the same thing... As well as their application management (which has gotten better on the latest versions of Windows) before 8 there wasn't a place where you could get 100% known safe applications directly from a central hub within the OS (much like the software center or at the very least from apt-get sources) whereas the main gimmick most Linux distros usually have is a "more efficient" or more "user friendly" package manager to make it easier to have a central hub... Anyways we (read: I) should probably stop ranting again haha
 
Have you tried out GNOME? I absolutely LOVE GNOME for my DE... (And I don't mean unity, that crappy excuse of a DE normal Ubuntu comes with) and once you get used to Linux you'll find that windows is actually less user friendly for lots of simple operations, but is simply offset by the sheer amount of third party applications you can get for it... Seriously, the way that have storage devices abstracted is absolutely idiotic and makes copying from them tricky whereas on Linux they are represented as a file and are easy to copy to and from with whatever raw data you want... Whereas you need something like win32diskimager to do the same thing... As well as their application management (which has gotten better on the latest versions of Windows) before 8 there wasn't a place where you could get 100% known safe applications directly from a central hub within the OS (much like the software center or at the very least from apt-get sources) whereas the main gimmick most Linux distros usually have is a "more efficient" or more "user friendly" package manager to make it easier to have a central hub... Anyways we (read: I) should probably stop ranting again haha
Yes stop ranting and get learning! :P
On that subject, is the GUI for the ZIP3DSFX that was talked about a GUI for ON the 3ds or on PC?
 
Yes stop ranting and get learning! :P
On that subject, is the GUI for the ZIP3DSFX that was talked about a GUI for ON the 3ds or on PC?
On the 3ds I believe... I think at least

--------------------- MERGED ---------------------------

I think maybe there needs to be a way to extract to a specific directory if the user wants to, that way it won't just extract to the root
 
Yes stop ranting and get learning! :P
On that subject, is the GUI for the ZIP3DSFX that was talked about a GUI for ON the 3ds or on PC?
On the 3ds I believe... I think at least

--------------------- MERGED ---------------------------

I think maybe there needs to be a way to extract to a specific directory if the user wants to, that way it won't just extract to the root
Actually, I thought about a PC GUI to help the user in creating the self extracting archive. Depending on how you compiled it, you can create a working self extracting archive just by 'copy /b ZIP3DSFX.3dsx + archive.zip mySFX.3dsx' and a GUI really would have to take care of only that. There are also various configuration options for how the SFX stub works (as described on GitHub), but as of now there are only 5 combinations that make sense, and for those 5 you'd just need to include precompiled stubs.

Also, it wouldn't be a good idea to add any graphical elements or any more user interaction to ZIP3DSFX itself. Because this is a self extracting archive, two things are at premium: (1) space requirement must be as low as possible for it to make sense at all and (2) it must be as reliable as it gets. Adding in a folder / file selection dialogues doesn't make much sense in that context, too.
 
On another note, we're getting a bit off topic with all the Linux dev stuff now... I know, I started it myself :). Maybe start a new thread for this?

I've put some work into the EmuNAND format features, but you need to compile yourself (binary releasy coming up once it is polished). As always, everything is on Github.
snap000.png

As you see, there are new 'auto' options for the SD format feature.

Now, with this you can do that:
  • Put a file called 'starter.3dsx' into either the root or the 'Decrypt9' dir. The size limit for that file is 2MB.
  • Run one of the auto features, you will be prompted to switch SD cards. On that, insert the SD card to be formatted into the SD slot. This can be the same as the one Decrypt9 ran from and that contained starter.3dsx, but it can also be different.
  • Let it format, after the formatting finished, 'starter.3dsx' will be put into the root of the SD card as 'boot.3dsx'.
  • If you formatted to EmuNAND and actually want EmuNAND on there, you still need to clone SysNAND to EmuNAND. Do it from the same menu.
  • Now, you could, for example, use Ninjhax to run the boot.3dsx to boot from there.
  • If you haven't noticed, this enables you to setup a fresh SD card without it ever touching a PC.
A good choice for the starter.3dsx is attached to this thread. This one contains the most recent version of smealums starter pack sans CHMM2 (cause that was too big). However, you are not confined to anything and the choices on what to include are endless (think CFWs, etc). It doesn't even have to be ZIP3DSFX based. And, for a nice surprise, rename the starter.3dsx I provided below to anything.zip and open it in your ZIP archiver of choice. Yes, you can edit it's contents and it will still work.

Needs testing, as always, and I'm still not too happy with how things are working right now. Switching SD cards on a N3DS f.e. needs some fumbling around, and accidential button presses are possible. Will need to think this over, and ideas are welcome. Currently also thinking about removing that from Decrypt9 and making a separate homebrew from it. Also thinking about doing a special, slimmed down, noob friendly version of Decrypt9.
 

Attachments

Last edited by d0k3,
  • Like
Reactions: peteruk
On another note, we're getting a bit off topic with all the Linux dev stuff now... I know, I started it myself :). Maybe start a new thread for this?
Nah we'll just keep talking random crap here instead. haha It's usually only me, you and samus anyway most of the time.

I think the separate homebrew idea for the sd stuff is a good idea to be honest. :) D9 is getting alot of stuff crammed into it now. haha
 
Nah we'll just keep talking random crap here instead. haha It's usually only me, you and samus anyway most of the time.

I think the separate homebrew idea for the sd stuff is a good idea to be honest. :) D9 is getting alot of stuff crammed into it now. haha
I also think that the formatting stuff goes beyound the scope of Decrypt9 - alright, then it is decided! 'D9 EmuNAND Tool' coming up (name to be discussed). This will also have the aim of being noob friendly and as safe as it gets (I really want to stop people from using GWs messy software). It will only contain these options:
  • Guided EmuNAND setup (with detailed Debug output, will basically do everything in one step and ask the user where needed)
  • Format for EmuNAND
  • Format (standard)
  • Clone SysNAND to EmuNAND
  • Clone NAND backup to EmuNAND
  • Backup SysNAND
  • Backup EmuNAND
  • Transfer files between SDs (unsure, and will be limited cause of memory limitations and a full file mager is not possible).
As you see, basically everything EmuNAND tools does plus the easy format option plus SysNAND backup. Maybe you want to do a theme for this (later, I know you got your hands full)? It will be completely based on Decrypt9, and the theming system will be as well. Also, this will be a one shot, meaning it won't get thousands of features added later.
 
  • Like
Reactions: klear and peteruk

Site & Scene News

Popular threads in this forum