Homebrew [Port/Release] 3DSFAT16Tool - C Rewrite by d0k3

d0k3

3DS Homebrew Legend
OP
Member
Joined
Dec 3, 2004
Messages
2,786
Trophies
1
XP
3,896
Country
Germany
To compile using gcc from MinGW I had to set the standard to gnu99 and include stdbool.h, works great on Windows so far.
Oh well, the bool data type. I forgot that C doesn't have that. I fixed it (replaced bool with int, true with 1, false with 0) in the source code and uploaded a new archive. For users, nothing changes, so no need to redownload.
 

d0k3

3DS Homebrew Legend
OP
Member
Joined
Dec 3, 2004
Messages
2,786
Trophies
1
XP
3,896
Country
Germany
I just made the changes you suggested.
In fact, I had forgotten to put the change to the choice between inject/dump.

Here the New Download (v1.1).
if you find any bugs, please tell me, ok?

Anyway, thanks for the compliments @d0k3 . ;)
I've already seen it, you wouldn't have have had to send it via pm, too :). Good update! I've got some more remarks...
  1. I would change the text on all three buttons to "browse". "save" does make it sound like a new file is written, and in the case of injection, the FAT 16 partition is encrypted and inserted into an exististing file (your NAND backup).
  2. I'd also change the text on the big button at the bottom, so that it is more clear what it does. F.e. if 'dump' and 'N3DS' is selected, the button text could be 'Dump FAT16 from N3DS NAND'. For injection, 'Inject FAT16 to N3DS NAND'.
Keep in mind, these are my personal preferences.
 

x7l7j8cc

Well-Known Member
Newcomer
Joined
Jan 26, 2014
Messages
68
Trophies
1
Location
Italy
XP
1,795
Country
Italy
@d0k3

Here the updated 1.1.4 version.

Changelog:
v1.1.4:
- FiXeD some Bugs, and Improved some Function.

v1.1.3:
- Auto-Detect for Console Type (O3DS/N3DS) from NAND/Xorpads files.
- Auto-Detect if the Xorpad is for the TWLN Partition. Example: O3DS NAND + TWLN Xorpad.
- Drag'n'Drop Support for NAND and Xorpad file.
- Added a RESET Button, to Clear All.
- Added the LOG of the Process at the END (Only on the Completed One, NOT for Aborted).

v1.1.2:
- For Dumping purpose, i leaved "save" on fat16 image. because, in fact, you are saving the fat16 image (decrypting) from the NAND.
- For Inject purpose, i've changed to "browse".

v1.1.1:
- Added a function to check if the file '3DSFAT16tool.exe' is on the same folder of the tool.

v1.1:
- Corrected some codes.

v1.0:
- Initial Release.

And as you can see, the button says correctly what are you doing... ;)
Also, if you find Any Bugs, please report it to me. :yay:

This is a screen of the GUI:
1438815198.png
 
Last edited by x7l7j8cc,
  • Like
Reactions: MelonGx and d0k3

d0k3

3DS Homebrew Legend
OP
Member
Joined
Dec 3, 2004
Messages
2,786
Trophies
1
XP
3,896
Country
Germany

Suiginou

(null)
Member
Joined
Jun 26, 2012
Messages
565
Trophies
0
Location
pc + 8
XP
738
Country
Gambia, The
Oh well, the bool data type. I forgot that C doesn't have that.
It does, but it was introduced with C99 and requires inclusion of stdbool.h.

gcc defaults to gnu89, which is C89 with some extensions (such as inline assembly and the asm keyword and // comments), though I think very recent versions changed that to gnu11. clang, which is the default compiler on Mac OS X and FreeBSD, defaults to gnu99.
 

d0k3

3DS Homebrew Legend
OP
Member
Joined
Dec 3, 2004
Messages
2,786
Trophies
1
XP
3,896
Country
Germany
... and an update - check the opening post. My 3DSFAT16tool port will now automagically recognize xorpad type by xorpad size. No need for the -o|-n command line parameter anymore. It will now also process TWLN xorpads.

Testing is appreciated. Let me know if any bugs have sneaked in. Also, note that Decrypt9 (link to my fork) can dump & inject these partitions directly. It can also be used to generate the CTRNAND and TWLN xorpads.

@x7l7j8cc : Maybe you want to update the GUI for the new changes.
@Apache Thunder : Maybe you want to update your script for the new changes, too.
 
Last edited by d0k3,

d0k3

3DS Homebrew Legend
OP
Member
Joined
Dec 3, 2004
Messages
2,786
Trophies
1
XP
3,896
Country
Germany
hi d0k3, listen the twln checks the xorpads right?
so, to what that apply? o3ds nand, n3ds nand or twl nand?
No need to ask via PM ;). With my Decrypt9 fork, you can generate CTRNAND (CTRNAND is what the previous version of 3DSFAT16tool had, too) and TWLN xorpads. CTRNAND xorpads are used to extract the CTRNAND partition. TWLN xorpads are used to extract the TWLN partition. In my 3DSFAT16tool, using them is actually a no brainer. 3DSFAT16tool will automatically recognize the xorpad and dump /inject the correct partition. Did it work for you?
 

d0k3

3DS Homebrew Legend
OP
Member
Joined
Dec 3, 2004
Messages
2,786
Trophies
1
XP
3,896
Country
Germany
I just noticed... I haven't updated my Decrypt9 binary release yet, so the TWLN xorpad generator is not included in the binary release. Coming up.

Until then: No, the TWLN xorpad is called: twlnand.fat16.xorpad. twln.bin is the actual decrypted partition.
 
Last edited by d0k3,

x7l7j8cc

Well-Known Member
Newcomer
Joined
Jan 26, 2014
Messages
68
Trophies
1
Location
Italy
XP
1,795
Country
Italy
@d0k3
I think that it was a good idea that i asked, because as you said, you noticed that you still doesnt updated the Decrypt9 to Generate the TWLN Xorpads... ;)
 
Last edited by x7l7j8cc,

x7l7j8cc

Well-Known Member
Newcomer
Joined
Jan 26, 2014
Messages
68
Trophies
1
Location
Italy
XP
1,795
Country
Italy
@d0k3

Updated the Application.
Same Link, but New Changes...

• Changelog:
- Auto-Detect for Console Type (O3DS/N3DS) from NAND/Xorpads files.
- Auto-Detect if the Xorpad is for the TWLN Partition. Example: O3DS NAND + TWLN Xorpad.
- Drag'n'Drop Support for NAND and Xorpad file.
- Added a RESET Button, to Clear All.
- Added the LOG of the Process at the END (Only on the Completed One, NOT for Aborted).

Hope you Like it ;)
 
  • Like
Reactions: d0k3

Ikki Barri

Well-Known Member
Member
Joined
Apr 1, 2015
Messages
108
Trophies
0
XP
163
Country
United States
Great work! I have a problem though in that my xorpad file is a "bad size". Created in rxTools. Could someone tell me where I've gone wrong? Does my 3DS need to be on a particular firmware, for example?

Edit: nvm, I used Decrypt9 running with Ninjhax to create a proper Fat16.xorpad and worked fine. I didn't know that it was that easy to run Decrypt9!

Thanks everyone for your work!
 
Last edited by Ikki Barri,

Site & Scene News

Popular threads in this forum

General chit-chat
Help Users
    Psionic Roshambo @ Psionic Roshambo: Just 6 but dual band 6 lol