Kuribo64
Views: 19,852,258 Home | Forums | Uploader | Wiki | Object databases | IRC
Rules/FAQ | Memberlist | Calendar | Stats | Online users | Last posts | Search
03-28-24 08:41 PM
Guest:

0 users reading How to dump the content of 3DS games, edit & repack them, and play them, even on the newest firmware | 1 bot

Main - 3DS game hacking and emulation - How to dump the content of 3DS games, edit & repack them, and play them, even on the newest firmware Hide post layouts | New reply

Pages: 1 2
Megalegacy
Posted on 12-30-15 04:38 AM (rev. 3 of 12-30-15 05:53 AM) Link | #66717
Hello everyone! I feel like I should contribute here, so I'll make a guide on how to dump your 3DS roms so you can make romhacks.

To do this you will need:

- A 3DS/2DS/New 3DS with homebrew!
- braindump
- Tools for the game you'll be editing (a good editor is Every File Explorer)
- a repacker and an extractor
- HANS (you should already should have this)

I have a .zip file containing braindump, an extractor and repacker, HANS, and Every File Explorer: http://bit.ly/1SlIqlH


1. Extract the braindump folder, and put it on your SD card somehow. Put the whole braindump folder in the "3ds" folder. Also, make a new folder in the root of your SD card named "hans". This will be useful later.

2. Run braindump from the homebrew launcher. When run, you SHOULD be asked to select a title. Choose the title you want to dump.

3. When you select your app, press A. Braindump will now be running and dumping everything from the game. Wait for it to complete.

Keep in mind, this may take 15-30 min so go grab a snack or watch youtube videos, I don't know, whatever you do to kill time :P

4. When it finishes dumping, exit out of braindump and turn off your 3DS.

5. Put in your SD card. You should now see a new folder. (this new folder will probably have a lot of 0's and some other numbers on it) Open the folder. You should now see 2 files: romfs.bin and exefs.bin. NOTE: Make sure to rename your romfs.bin and exefs.bin to something else, like "oldromfs.bin" or "oldexefs.bin". This way, if you mess up editing your romfs, you can just re-extract the contents and start over instead of redumping.

6. Put these files somewhere on your computer so you can edit them.

7. In the zip file I gave you, there should be a file called "romfs_extractor.bat". Put that in the same folder as the romfs.bin and exefs.bin.

8. Run romfs_extractor.bat. It should ask for the name of a decrypted romfs (that's basically that romfs.bin that you dumped). Enter the name of the romfs file.

9. It should now be extracting the contents.

10. When it's done, you should see a new folder called "romfs". Here is where all of the files inside of your game is.

11. Edit the heck out of the romfs with a tool someone else made (like Every File Explorer), or hex edit. Whatever works. (if you want to know if there is an editor for a game you dumped, just comment here, and I can tell you if there is or not and I can provide you with a download if needed)

OK, so you've dumped your game and edited it, now you're wondering, "I wonder how I can play my edits..." Now I'll show you how to do that.

12. In the ZIP file I gave you, extract "RomFS Extractor.exe". Put it in the same folder as your romfs.bin, exefs.bin, and romfs folder.

13. Run it. Hit "Open". Browse for the directory on where your romfs folder is.

14. When you select the directory, hit "Go". Wait for it to finish. When it's done, it will prompt for a name for the file and the location to save it. Name the file with the last 8 characters of the game id, then put ".romfs" at the end of the name. The game id of your game can be found here: www.3dsdb.com. EXAMPLE: 00030800.romfs (this is Mario Kart 7's last 8 digits of it's ID.) Save it in the "hans" folder on the 3DS's SD card I talked about in the beginning.

15. Wait for it to finish again (this won't take as long, probably 20 sec to 5 min depending on your computer).

16. Disconnect your SD card from your computer, then put it in your 3DS. Boot up the homebrew launcher, then boot up hans (if you don't have this, just put the "hans" folder from my zip folder in the "3ds" folder). Select the game you just edited. When HANS boots up, leave everything like it is, except instead of "Romfs -> SD" being "no", switch it to "yes". You should see something named "Romfs path" below "Current title" now that you've switched it on. If the word "INVALID" is next to "Romfs path", you've obviously did something wrong. See the FAQ for more info.

17. If it doesn't say "INVALID" next to "Romfs path", press START. The game should now load with your hacks.

Enjoy!

FAQ:

Q: Help! HANS says "INVALID" next to "Romfs path"!
A: This could be caused by some things:
- You didn't name your file properly.
- You didn't put the last 8 numbers of the game's title id.
- You didn't put your file in the "hans" folder, on the root of your SD card
The correct setup would be:
SD:\hans\00030800.romfs (00030800 is the last 8 digits for Mario Kart 7)

Q: Romfs Extractor/Builder crashes when trying to extract/build
A: For the extractor, are you sure your romfs is non-corrupt? You might need to dump again, or maybe find a different extractor. Same goes for builder, you may need to find a different builder.

Q: Braindump crashes when I open it with *this game*.
A: How recent is the game? Some games released after system menu version 9.6 have new encryption making it impossible for it to dump with braindump.

Q: I have an old 3DS and when I run Smash Bros/MH4U with HANS my 3DS crashes when entering some places of the game.
A: This is because of RAM limitations. Sorry dude, but you aren't gonna be romhacking with HANS anytime soon for Smash/MH4U if you have an old 3ds :(

Q: How do I open .*file extension name*?
A: Chances are that there are programs that can open that file. Try opening that file with Every File Explorer, and if that doesn't work, ask in the thread and I'll reply if there is one.

(thanks TheKoopaKingdom for these)

Q: The romfs path is still invalid!
A: Are you sure you put hans in the right place? SD:/3ds/hans is different than /hans.
/3ds/hans contains the executable for hans, and the saved configuration files.
/hans contains your modified .romfs and .code. This is where you want to put your stuff.

Q: Hans immediately goes back the Homebrew Launcher.
A: It's a code issue, likely it not being found, check the path.
If the path is right, then the code is broken.
In this case, you can:
- Redo the code part of this.
- Only use a custom romfs if the new code doesn't contain anything significant.

Q: I don't see a configuration screen in hans, it goes straight into the game!
A: You enabled the "Save configuration" in the menu at one point.
You can:
- Hold L while loading hans to go to the menu.
- Delete "titleid.txt" from /3ds/hans/titles to reset the configuration for that game.

CREDITS:
Gericom for Every File Explorer.
Pablohack&glitch for the romfs_extractor.bat script.
ScriesM for RomFS Builder.
neobrain for braindump.
smealum for hax 2.5, HANS, and all that good stuff :P
and me for making this tutorial.

Feel free to tell me if I forgot anything and ask any questions you may have, and sorry if it sounds a bit complicated or weird. If it does sound weird or complicated tell me and I'll fix where it's weird or complicated.




____________________
[image]
Soon™
Please Understand™

CodingKoopa
Posted on 12-30-15 05:13 AM Link | #66718
Amazing tutorial!
It's probably also worth mentioning that you can have custom code, particularly useful for Pokemon Hacks.

When you extract you exefs.bin, you should get a folder called exefsdir. Inside this folder, there is a file called "code.bin". This is the vanilla code file. In order to open it with pk3DS, you need to rename it to ".code.bin".

After you make your changes, rename it to "titleid.code", akin to how you would name the romfs.

Here's some more FAQs:

The romfs path is still invalid.
/3ds/hans is different than /hans.
/3ds/hans contains the executable for hans, and the saved configuration files.
/hans contains your modified .romfs and .code. This is where you want to put your stuff.

Hans immediately goes back the Homebrew Launcher.
It's a code issue, likely it not being found, check the path.
If the path is right, then the code is broken.
In this case, you can:
- Redo the code part of this.
- Only use a custom romfs if the new code doesn't contain anything significant.

I don't see a configuration screen in hans, it goes straight into the game!
You enabled the "Save configuration" in the menu at one point.
You can:
- Hold L while loading hans to go to the menu.
- Delete "titleid.txt" from /3ds/hans/titles to reset the configuration for that game.

I might do a tutorial on making hans shortcuts since there's little to no documentation about that.

____________________
Website | Twitter


Megalegacy
Posted on 12-30-15 05:43 AM Link | #66719
Posted by TheKoopaKingdom
Amazing tutorial!
It's probably also worth mentioning that you can have custom code, particularly useful for Pokemon Hacks.

When you extract you exefs.bin, you should get a folder called exefsdir. Inside this folder, there is a file called "code.bin". This is the vanilla code file. In order to open it with pk3DS, you need to rename it to ".code.bin".

After you make your changes, rename it to "titleid.code", akin to how you would name the romfs.

Here's some more FAQs:

The romfs path is still invalid.
/3ds/hans is different than /hans.
/3ds/hans contains the executable for hans, and the saved configuration files.
/hans contains your modified .romfs and .code. This is where you want to put your stuff.

Hans immediately goes back the Homebrew Launcher.
It's a code issue, likely it not being found, check the path.
If the path is right, then the code is broken.
In this case, you can:
- Redo the code part of this.
- Only use a custom romfs if the new code doesn't contain anything significant.

I don't see a configuration screen in hans, it goes straight into the game!
You enabled the "Save configuration" in the menu at one point.
You can:
- Hold L while loading hans to go to the menu.
- Delete "titleid.txt" from /3ds/hans/titles to reset the configuration for that game.

I might do a tutorial on making hans shortcuts since there's little to no documentation about that.

I'm going to write a script that makes HANS shortcuts for you, as well as turn png to smdh.

Thank you for that! I'll add all of those things. I knew about code.bin in the exefs but I didn't think it was that important so I left it out. This guide was supposed to be for newbies and the code.bin contains stuff a newbie wouldn't care about, but I did forget about Pokemon. I'll add that asap.

____________________
[image]
Soon™
Please Understand™

Hiccup
Posted on 12-30-15 11:19 AM Link | #66723
You should change the title and intro becuase they are miseading: They suggest you are dumping the whole game, but you are in fact just dumping the decrypted romfs and exefs.

gridatttack
Posted on 12-30-15 04:05 PM Link | #66725
Also, is it true you cant use HANS for super smash bros if you have an old 3ds?
I want to use custom music.

Something about smash using all the RAM that HANS needs to use.

____________________
[image] [image]

CodingKoopa
Posted on 12-30-15 05:22 PM Link | #66726
Yes, that's true.
Posted by Megalegacy
Q: I have an old 3DS and when I run Smash Bros/MH4U with HANS my 3DS crashes when entering some places of the game.
A: This is because of RAM limitations. Sorry dude, but you aren't gonna be romhacking with HANS anytime soon for Smash/MH4U if you have an old 3ds :(


____________________
Website | Twitter


gridatttack
Posted on 12-30-15 05:34 PM Link | #66727
Hmmm, must have missed it in the FAQ then.

Well, too bad.
I suppose for NSMB2 hacking I will be fine.

____________________
[image] [image]

Megalegacy
Posted on 12-30-15 08:11 PM Link | #66733
Posted by Hiccup
You should change the title and intro becuase they are miseading: They suggest you are dumping the whole game, but you are in fact just dumping the decrypted romfs and exefs.


Changed. Thanks.

Posted by gridatttack
Also, is it true you cant use HANS for super smash bros if you have an old 3ds?
I want to use custom music.

Something about smash using all the RAM that HANS needs to use.

Yep, sadly true :( It doesn't affect me tho, I have CFW. :P



____________________
[image]
Soon™
Please Understand™

TheSaturnyoshi
Posted on 01-02-16 10:48 PM (rev. 4 of 01-02-16 10:55 PM) Link | #66787
Hmm, trying this but getting an error when using romfs_extractor.bat, it always "error unpacking romfs" I didn't edit the file at all, I just directly copied it from my SD card to there! What's the issue?
EDIT: Oh, I should probably say that in the error log I got this:
A subdirectory or file tempdata already exists.
A subdirectory or file xorpads already exists.
The syntax of the command is incorrect.
The system cannot find the path specified.
The system cannot find the file specified.
The system cannot find the path specified.

The last 3 lines really confuse me, I know it knows that my romfs.bin exists, because when I type something else it gets an error.

CodingKoopa
Posted on 01-02-16 11:36 PM Link | #66791
The tools zip appears to be missing ctrtool, try this one.

Also, PSA:
Recently, there was an update to Braindump that made it output a .CXI file instead of a romfs.bin and an exefs.bin.
This format is compatible with Citra, and can be extracted with:
ctrtool -p --exefs=exefs.bin --romfs=romfs.bin *.cxi
You should change the last part to the full name of the CXI that you need to extract.

____________________
Website | Twitter


TheSaturnyoshi
Posted on 01-02-16 11:45 PM Link | #66792
Ah yes, working perfectly now, thanks for the help!

CodingKoopa
Posted on 02-08-16 03:24 PM Link | #67597
I made a script for mass extracting .CXIs and .BINs.
https://kuribo64.net/get.php?id=xGJWCr5AXOaWQB49
If you're on Windows, and have a lot of .bins or .cxis that you want to extract all at once, I would highly recommend giving this a shot.

____________________
Website | Twitter


GalladeGuy
Posted on 02-08-16 09:29 PM Link | #67602
Nice tutorial Megalegacy! I never knew you were on here.

____________________
:^)

RandomKid150
Posted on 03-07-16 01:56 AM (rev. 3 of 03-07-16 02:03 AM) Link | #68299
I extracted "Sumikko Gurashi - Koko ga Ochitsukundesu" and I want to edit the text from Japanese to English, but all I have are these.
http://imgur.com/pNuD36t

It's mostly .BIN files, and I don't know how to edit those.

Which folders should contain the Text for the game?

What tools can I use to edit the text files?

RandomKid150
(post deleted) #68300

Arisotura
Posted on 03-07-16 01:58 AM (rev. 2 of 03-07-16 02:01 AM) Link | #68301
avoid doubleposting when you could edit your last post, pls ;)


as for where the text is, well, you'll have to look into those files, I'd first try the lyt and gfx folders

____________________
NSMBHD - Kafuka - Jul
melonDS the most fruity DS emulator there is

zafkflzdasd

CodingKoopa
Posted on 03-07-16 02:04 AM Link | #68303
Posted by RandomKid150
Which folders should contain the Text for the game?

You can try opening the .bin files with HxD, and see if there's any editable text.

As for which ones, do what StapleButter said.

BTW, .bin means Binary.

____________________
Website | Twitter


Arisotura
Posted on 03-07-16 02:06 AM Link | #68304
speaking of which, since it's Japanese, you have to know which encoding is used-- hex editors usually have an ASCII view, but for Japanese text that won't cut it

it's likely to be Shift-JIS, knowing Nintendo, but may also be UTF8 or UTF16


if the texts are directly featured in graphics elements, that doesn't apply as you will have to edit the graphics themselves

____________________
NSMBHD - Kafuka - Jul
melonDS the most fruity DS emulator there is

zafkflzdasd

RandomKid150
Posted on 03-07-16 02:07 AM Link | #68305
Whenever I open up any of the files, I go to text mode, and all I see is jumbled up letters and symbols.

Arisotura
Posted on 03-07-16 02:08 AM Link | #68306
as I said, it's because it's Japanese

'text view' uses ASCII, Japanese characters aren't included in ASCII

____________________
NSMBHD - Kafuka - Jul
melonDS the most fruity DS emulator there is

zafkflzdasd
Pages: 1 2

Main - 3DS game hacking and emulation - How to dump the content of 3DS games, edit & repack them, and play them, even on the newest firmware Hide post layouts | New reply

Page rendered in 0.184 seconds. (2048KB of memory used)
MySQL - queries: 29, rows: 239/239, time: 0.014 seconds.
[powered by Acmlm] Acmlmboard 2.064 (2018-07-20)
© 2005-2008 Acmlm, Xkeeper, blackhole89 et al.