Advertising (This ad goes away for registered users. You can Login or Register)

Tutorial: How to hack and pack a 3DS ROM for use with HANS

Post here your guides, tips, how-to, etc...
Post Reply
User avatar
Typhoon_Neon
Posts: 60
Joined: Mon Apr 29, 2013 8:40 pm
Location: Somewhere in Portugal
Contact:

Tutorial: How to hack and pack a 3DS ROM for use with HANS

Post by Typhoon_Neon » Tue Oct 27, 2015 11:11 pm

This tutorial is intended to help those of all, that like me, want to enjoy romhacks on their 3DS'. Enjoy! :D

What you will need:

A PC,
A homebrewable 3DS,
Braindump,
Ctrtool
RomFsBuilder,
The hack you want to use (in this case I link you directly to the Neo X/Y hack),
A Hex editor (I recommend HxD),
Lots of time (I mean that literally by the way).


1. First off, we are going to want to know the gameid of the game we're modding for later reference. I prefer to do this early to not have to go back and do it later, but I guess you could do it only when you need it. Open HANS and choose your game cart, when it loads you will be presented with a screen like the picture above. To figure out your gameid just choose yes in Romfs -> SD and the information will show up a few lines below. In the case of the game Pokémon Y (EU) the id is 00055E00 and HANS even has the courtesy of telling us where in the SD card we will have to place the final patch.

2. Next, we are going to want to dump the game itself to the SD card. This is by far the most tedious part of the whole process because dumping, as it stands right now, isn't very fast. Download and extract the "braindump" folder inside the zip into your 3ds folder. Then, run braindump and choose your cart and walk confirm that it opened. After that, plug your 3ds into the charger and go about your day as usual. For me the process took about 6h30m but I've heard people on GBATemp claiming as much as 12h. I have a Class 10 SD Card so I guess that might have helped, but who knows. In the case of Pokémon Y, the game is about 1.8GB.
(if you don't want to wait you can try and get the dump from other places, or extract it from a ROM file. I do not know the process behind that, so in that case you will have to figure that part on your own)

3. Hey! Welcome back! How was your day while the cart dumped? I hope you had fun, because now we get to do some pretty standard stuff. But that just means it is easy and we'll be done in no time! On the root of your SD Card there should now have be a folder with a huge name and two files inside: romfs.bin and exefs.bin. For the purposes of this tutorial we only need romfs.bin, but other games may require you also use exefs.bin (though I don't foresee that happening unless you are on a 3DSCFW). Copy the romfs file to a folder on your computer and extract ctrtool there too. Now you are going to open the windows command line and navigate to the folder where you put the romfs.bin/ctrtool file and type this "ctrtool --intype=romfs --romfsdir=romfsdir romfs.bin", if that is too much trouble for you, I put together this neat .bat file that you only have to paste where the romfs.bin and ctrtool are and run to extract what you need! Wait a few minutes for this to extract and when it is done you should have a romfs folder. We're almost done!

4. Now, extract the contents of the Neo XY hack and inside you should have a folder called installation hub with both a full and lite folders. In my case I went for the full hack, but read up on the differences and choose whatever seems to best tickle your fancy since the process for both is the same. Inside the folder of the hack version you chose, there should be a romfs folder. Cut that folder and paste it on top of your dumped romfs folder. Choose to overwrite all files and we can move on to the next step.

5. From here on out it's all a breeze. Open up RomFSBuilder (in the case of Neo XY, there is a version inside the PackHack zip) and point it to your modified romfs folder. The application will take a bit to pack everything and then ask you where you want to save your file. Name it 00055E00.romfs and put it somewhere you can easily access because next we are going to do some hex editing!

6. Open up HxD (or a hex editor of your choice) and load your romfs file. We are now going to trim the first 0x1000 bytes off this file and this can be the tricky part (I got it wrong the first time), look carefully at this picture: noticed the line I selected? The address is 00000FF0 (or 0x0FF0) and we are going to want to delete this line and everything above it. Do not delete the 00001000 line! Although Smea told us to deleted the first 0x1000 lines, he should have said 0x0FF0. No biggie though.

7. Finally we are at the last step! By now you should have a trimmed 00055E00.romfs file and all that's left is to copy it to the 3DS and run it using HANS! So copy the modified romfs files to a folder called hans on the root of your SD Card and finally load up HANS, choose your cart and tick yes on the Romfs -> SD option and done! If all went correctly you should now be enjoying a freshly hacked ROM! Good job!

Hopefully this should help many people with their romhacking endeavours. I tried to be as noob-friendly as possible and explained this as simply as I could think it as. However, if you still have problems I may try and help you given you actually give me enough information about your issue.
Advertising
If you like my articles on the front page you can always check out the archive check out the archive and I have a Twitter too!

Post Reply

Return to “Tutorials”