Pages: 1
Posted on 09-03-18, 09:38 pm (rev. 1 by RicBent on 03-09-19, 01:12 pm)
Mariomaster

Karma: 8528
Posts: 1348/1681
Since: 06-09-12
To mod NSMB2 you need it's source files. These are obtainable legally.

These source files are contained in a package file with the extension ".cia" and can be easily dumped.

All you need is a 3ds with Luma CFW and a physical or digital version of NSMB2.
If you do not have Luma CFW installed on your 3ds follow this great tutorial: https://3ds.hacks.guide/


Dumping the CIA file


Shut down your 3ds, hold Start and power up your 3ds. You should now be in the godmode9 menu.

Dumping physical cartridges


- Navigate to GAMECART and press A
- Navigate to [Title ID].3ds and press A
- On the bottom screen navigate to "NCSD image options..." and press A
- Navigate to "Build CIA from file" and press A
- Wait until this process is finished (takes about 25 minutes)

Dumping digital versions of the game


- Navigate to SYSNAND SD
- Press R+A
- On the bottom screen navigate to "Search for titles" and press A
- Navigate to your NSMB2 version and press A
- On the bottom screen navigate to "TMD file options..." and press A
- Navigate to "Build CIA (legit)" and press A
- Wait until this process is finished (takes about 5-25 minutes depending on your SD card)

- The generated CIA file should now be placed in the /gm9/out/ folder on your SD card
- Copy it to your PC


Extracting the CIA


Batch file


- If you are not comfortable with cmd download and extract this: https://nsmbhd.net/file/2BBPuo0KmZJzInzY/extract_cia.zip
- Drag and drop your CIA file onto extract_cia.bat

CMD/Terminal


- If you prefer to do do it manual download ctrtool and place it in the same folder as the CIA
- Open a cmd/terminal window and navigate to that folder
- Run this command "ctrtool --contents=contents <nameOfCia>.cia"
- Run this command "ctrtool --romfsdir=romfs --exefsdir=exefs --exheader=exheader.bin contents.0000.00000000"
- Rename contents.0000.00000000 to "nsmb2.cxi"

All necessary files should be properly extracted now.
The romfs folder can now be opened with CoinKiller to edit level and tilesets and the exheader.bin and exefs/code.bin files can be used to create code hacks for the game! Also the file nsmb2.cxi can be run via the 3ds emulator Citra.



NSMB2 Title IDs


Version
Title ID
EUR Standard
000400000007AF00
USA Standard
000400000007AE00
JPN Standard
000400000007AD00
KOR
00040000000B8900
USA Gold Edition
0004000000137E00
EUR Special Edition
0004000000137F00
JPN Special Edition
0000400000137D00

_________________________
GitHub - Kuribo64 - YouTube
Posted on 03-10-19, 11:22 pm
Panser


Karma: 324
Posts: 287/329
Since: 01-28-17
When I run the
ctrtool --romfsdir=romfs --exefsdir=exefs --exheader=exheader.bin contents.0000.00000000
command, it just says "Unknown file."

How do I fix this?
--___________
-/-----------------\
/-------------------\
|------|------|------|
|--------------------|
|---\________/---|
\-------------------/
-\___________/
Posted on 03-11-19, 08:51 am
Mariomaster

Karma: 8528
Posts: 1449/1681
Since: 06-09-12
If the previous command didn't fail contents.0000.00000000 is corrupted. I never had ctrtool fail on me before so probably your source cia file has a problem. Did you dump it from your 3ds or get it from somewhere else?
_________________________
GitHub - Kuribo64 - YouTube
Posted on 03-11-19, 10:29 am
Panser


Karma: 324
Posts: 288/329
Since: 01-28-17
I dumped it from my 3DS, from a digital copy, using the method given above. I thought I did everything right.
--___________
-/-----------------\
/-------------------\
|------|------|------|
|--------------------|
|---\________/---|
\-------------------/
-\___________/
Posted on 03-11-19, 02:20 pm
Mariomaster

Karma: 8528
Posts: 1450/1681
Since: 06-09-12
Hm. That is strange. Did you also try the batch file?
_________________________
GitHub - Kuribo64 - YouTube
Posted on 03-11-19, 03:01 pm (rev. 2 by  Ezradekezra on 03-12-19, 01:12 am)
Panser


Karma: 324
Posts: 289/329
Since: 01-28-17
Yes. It doesn't work when I just drag and drop, and when I run it from the command prompt, the file generated doesn't seem to work with CoinKiller. I'll try dumping the ROM again.

EDIT: I tried again after re-dumping the ROM, and I have the exact same problems. I also noticed that the batch file gives the "Unknown File" error when I try to use it. Does this have something to do with the fact that I have some of the DLC?

EDIT 2: Gimzie's guide on GBATemp (Found here) ended up working.
--___________
-/-----------------\
/-------------------\
|------|------|------|
|--------------------|
|---\________/---|
\-------------------/
-\___________/
Posted on 03-12-19, 01:12 pm
Rated All-Time Best Gimzie

Karma: 142
Posts: 24/25
Since: 07-07-17
CoinKiller needs to open a romfs folder, not a file, so that was probably one issue you were having. Glad to hear that it worked though.
Posted on 03-12-19, 05:30 pm
Mariomaster

Karma: 8528
Posts: 1452/1681
Since: 06-09-12
Well he used the tools of Godmode9 to extract the romfs. You probably want to have all of the rom available on your PC especially if you want to use Citra or want to do code modding.

ctrtool has never failed for any of my CIAs. It might be possible that your installed title is unusual maybe caused by installing a CIA from the internet?
_________________________
GitHub - Kuribo64 - YouTube
Posted on 07-17-20, 03:18 pm
Ninji
Drink Coffee, it's great :P

Karma: -63
Posts: 194/238
Since: 09-24-19
Sorry for bumping but, that's not working, when I run this command "ctrtool --contents=contents <nameOfCia>.cia", it says that the file does not found.
_________________________
I make SM64 Based videos (Machinimas), subscribe!
My YouTube Channel
Posted on 09-01-20, 03:25 pm
Mariomaster

Karma: 8528
Posts: 1576/1681
Since: 06-09-12
You have to make sure ctrtool actually exists and that you actually change "<nameOfCia>.cia" to the cia path of your NSMB2 copy.
_________________________
GitHub - Kuribo64 - YouTube
Pages: 1