Skip to content

Instantly share code, notes, and snippets.

@PixelSergey
Last active March 16, 2024 12:22
Show Gist options
  • Star 70 You must be signed in to star a gist
  • Fork 2 You must be signed in to fork a gist
  • Save PixelSergey/73d0a4bc1437dbaa53a1d1ce849fdda1 to your computer and use it in GitHub Desktop.
Save PixelSergey/73d0a4bc1437dbaa53a1d1ce849fdda1 to your computer and use it in GitHub Desktop.
Dump games with godmode9

Dumping games with Godmode9

Dumping games is the act of taking a game from your system or gamecart and copying it into a readable format onto your SD card. Dumping is perfectly legal if you keep the dumps to yourself, however sharing these dumps is piracy and is illegal.

This guide will tell you how to dump games from various formats and for various purposes. Dumping 3DS cartriges as .cia files is good if you want to install them to your system. Dumping them as .3ds files is good for emulators. Installed titles cannot be dumped as .3ds files. NDS cartiges can only be dumped as .nds files and cannot be installed (however, you can play them with emulators or flashcarts).

Dumping the RomFS of a game is primarily for romhacking purposess. RomFS is the place where a game stores its data. If dumped and modified, these files can be used with Luma's LayeredFS feature to patch games.

Many instructions here are adapted from Plailect's Godmode9 Usage page. Check it out for more information on Godmode9's functions.

This guide requires Luma3DS, b9s and Godmode9. If you do not have any of those, please follow the guide.

This page contains a lot of information. Only follow the section(s) relevant to you!



Dumping a 3DS game cartrige as a .3ds file

  1. Insert your gamecart into your console
  2. Boot your console while holding (START) to launch Godmode9
  3. Navigate to [C:] GAMECART
  4. Press (A) on the <titleid>.trim.3ds file in the drive
  5. Select Copy to /gm9/out
  6. Press (START) to save and reboot
  7. Your dump will be in the /gm9/out folder on the SD card

Dumping a 3DS game cartrige as a .cia file

  1. Insert your gamecart into your console
  2. Boot your console while holding (START) to launch Godmode9
  3. Navigate to [C:] GAMECART
  4. Press (A) on the <titleid>.trim.3ds file in the drive
  5. Select NCSD image options..., then select Build CIA from file
  6. Press (START) to save and reboot
  7. Your dump will be in the /gm9/out folder on the SD card

Dumping an NDS game cartrige as a .nds file

  1. Insert your gamecart into your console
  2. Boot your console while holding (START) to launch Godmode9
  3. Navigate to [C:] GAMECART
  4. Press (A) on the <titleid>.trim.nds file in the drive
  5. Select Copy to /gm9/out
  6. Press (START) to save and reboot
  7. Your dump will be in the /gm9/out folder on the SD card

Dumping an installed title as a .cia file

  1. Boot your console while holding (START) to launch Godmode9
  2. Hold (R)+(A) while pointing to [A:] SYSNAND SD to open the drive options
  3. Selct Search for titles
  4. Press (A) to continue
  5. Press (A) on the .tmd file of the game you want to dump
  6. Select TMD file options... then select Build CIA (standard)
  7. Your dump will be in the /gm9/out folder on your sd card

Dumping a system title as a .cia file

  1. Boot your console while holding (START) to launch Godmode9
  2. Hold (R)+(A) while pointing to [1:] SYSNAND CTRNAND to open the drive options
  3. Selct Search for titles
  4. Press (A) to continue
  5. Press (A) on the .tmd file of the game you want to dump
  6. Select TMD file options... then select Build CIA (standard)
  7. Your dump will be in the /gm9/out folder on your sd card


Extracting RomFS from a 3DS game cartrige

  1. Insert your gamecart into your console
  2. Boot your console while holding (START) to launch Godmode9
  3. Navigate to [C:] GAMECART
  4. Press (A) on the <titleid>.trim.3ds file in the drive
  5. Select NCSD image options..., then select Mount image to drive
  6. Press (A) to enter the drive
  7. For each file you want to dump, press (A) while hovering over it and select Copy to /gm9/out
  8. For each folder you want to dump, press (R)+(A) while hovering over it and select Copy to /gm9/out
  9. Press (START) to save and reboot
  10. Your files will be in the /gm9/out folder on the SD card

Extracting RomFS from an NDS game cartrige

  1. Insert your gamecart into your console
  2. Boot your console while holding (START) to launch Godmode9
  3. Navigate to [C:] GAMECART
  4. Press (A) on the <titleid>.trim.nds file in the drive
  5. Select NDS image options..., then select Mount image to drive
  6. Press (A) to enter the drive
  7. For each file you want to dump, press (A) while hovering over it and select Copy to /gm9/out
  8. For each folder you want to dump, press (R)+(A) while hovering over it and select Copy to /gm9/out
  9. Press (START) to save and reboot
  10. Your files will be in the /gm9/out folder on the SD card

Extracting RomFS from an installed title

  1. Boot your console while holding (START) to launch Godmode9
  2. Hold (R)+(A) while pointing to [A:] SYSNAND SD to open the drive options
  3. Selct Search for titles
  4. Press (A) to continue
  5. Press (A) on the .tmd file of the game which you want to extract the RomFS from
  6. Select TMD file options... then select Mount CXI/NDS to drive
  7. Press (A) to enter the drive
  8. For each file you want to dump, press (A) while hovering over it and select Copy to /gm9/out
  9. For each folder you want to dump, press (R)+(A) while hovering over it and select Copy to /gm9/out
  10. Press (START) to save and reboot
  11. Your files will be in the /gm9/out folder on the SD card

Extracting RomFS from a system title

  1. Boot your console while holding (START) to launch Godmode9
  2. Hold (R)+(A) while pointing to [1:] SYSNAND CTRNAND to open the drive options
  3. Selct Search for titles
  4. Press (A) to continue
  5. Press (A) on the .tmd file of the game which you want to extract the RomFS from
  6. Select TMD file options... then select Mount CXI/NDS to drive
  7. Press (A) to enter the drive
  8. For each file you want to dump, press (A) while hovering over it and select Copy to /gm9/out
  9. For each folder you want to dump, press (R)+(A) while hovering over it and select Copy to /gm9/out
  10. Press (START) to save and reboot
  11. Your files will be in the /gm9/out folder on the SD card

Extracting RomFS from a .cia/.3ds/.nds file

  1. Obtain your game file using one of the methods above
  2. Boot your console while holding (START) to launch Godmode9
  3. Navigate to your game file inside the [0:] SDCARD drive
  4. Press (A) on the game file
  5. Select <type> image options..., then select Mount image to drive
  6. Press (A) to enter the drive
  7. Press (A) on any files or (R)+(A) on any folders you want to dump, then select Copy to /gm9/out
  8. Your files will be in the /gm9/out folder on the SD card


Converting .3ds files to .cia files

  1. Boot your console while holding (START) to launch Godmode9
  2. Navigate to your .3ds file inside of the [0:] SDCARD drive
  3. Press (A) on the .3ds file
  4. Select NCSD image options... them select Build CIA from file
  5. Your converted .cia file will be in the /gm9/out folder on the SD card
@ehx-v1
Copy link

ehx-v1 commented Jul 23, 2019

This was very helpful, especially since it also works for DLC titles. Now I can take a look at the Coin Rush levels for NSMB2. My plan is to see if there's anything to be changed in order to turn them into regular levels, and then pick regular levels for them to replace. (I'm not publishing the result for obvious reasons. I will, however, probably make a patching script where you put the DLC CIA in the same folder and it generates the LayeredFS folders, which then will be published.)

@mekb-turtle
Copy link

Does anyone know what's the difference between Build CIA (standard) and Build CIA (legit) (in Dumping a system title as a .cia file)?

@PixelSergey
Copy link
Author

Does anyone know what's the difference between Build CIA (standard) and Build CIA (legit) (in Dumping a system title as a .cia file)?

A legit cia refers to a cia that has a "universal" signature. That means it can be played even on a stock system. Unfortunately, building a legit .cia only works for titles that have been universally signed by Nintendo, i.e. games that came pre-installed on the system when you bought it.
A standard cia is just a normal installable game or application.
It is usually recommended to simply build a standard cia, as legit cias only work for a small number of apps and there isn't a point in installing them, as you need CFW to do that in the first place.

@mekb-turtle
Copy link

Does anyone know what's the difference between Build CIA (standard) and Build CIA (legit) (in Dumping a system title as a .cia file)?

A legit cia refers to a cia that has a "universal" signature. That means it can be played even on a stock system. Unfortunately, building a legit .cia only works for titles that have been universally signed by Nintendo, i.e. games that came pre-installed on the system when you bought it.
A standard cia is just a normal installable game or application.
It is usually recommended to simply build a standard cia, as legit cias only work for a small number of apps and there isn't a point in installing them, as you need CFW to do that in the first place.

Thanks

@gingermania77
Copy link

Would it be possible to build a .nds game as a cia?

@mekb-turtle
Copy link

Would it be possible to build a .nds game as a cia?

I found a thread that might help: NDS Forwarder CIAs for your HOME Menu

@PixelSergey
Copy link
Author

PixelSergey commented Dec 15, 2019

Would it be possible to build a .nds game as a cia?

Unfortunately, NDS games are designed to only launch from the cartridge slot. It is therefore impossible to make them into an installable CIA file.
However, workarounds exist. The best, most stable one is to buy a flashcart for $8-20. Flashcarts can pretend to be a cartridge and natively run your dumped games. If you do not want to use money, the next best option is an app called TWiLightMenu. Although slower and not as stable, this app will let you run NDS games for free on your 3DS. The above link (NDS Forwarder CIAs for your HOME Menu) is quite old, and I recommend you use TWiLightMenu instead.

@ehx-v1
Copy link

ehx-v1 commented Mar 1, 2020

Since DSiWare never launches from cartridge, does that mean there's another .nds subformat for that? Might be worth looking into as an intermediate step towards CIAs.

@PixelSergey
Copy link
Author

Since DSiWare never launches from cartridge, does that mean there's another .nds subformat for that? Might be worth looking into as an intermediate step towards CIAs.

DSiWare is distributed by Nintendo as CIAs on the 3DS and as .app files on the DSi. The 3DS .cia file contains the .app. A .app file is exactly the same format as a .nds file, except renamed.
The reason that DSiWare .apps are installable and regular .nds games are not is that .nds games are hardcoded to read from the cartridge slot, whereas DSiWare apps are designed to be run from the console.

It is possible to convert a DSiWare .app to a 3DS-installable .cia using simple tools. It is not possible to do that with a regular .nds game; however, it is possible to run them using the methods I listed above. In particular, TWiLightMenu will re-route all (or many) of the calls done by the game from the cartridge slot to the SD card.

@ehx-v1
Copy link

ehx-v1 commented Jul 9, 2020

Since DSiWare never launches from cartridge, does that mean there's another .nds subformat for that? Might be worth looking into as an intermediate step towards CIAs.

DSiWare is distributed by Nintendo as CIAs on the 3DS and as .app files on the DSi. The 3DS .cia file contains the .app. A .app file is exactly the same format as a .nds file, except renamed.
The reason that DSiWare .apps are installable and regular .nds games are not is that .nds games are hardcoded to read from the cartridge slot, whereas DSiWare apps are designed to be run from the console.

It is possible to convert a DSiWare .app to a 3DS-installable .cia using simple tools. It is not possible to do that with a regular .nds game; however, it is possible to run them using the methods I listed above. In particular, TWiLightMenu will re-route all (or many) of the calls done by the game from the cartridge slot to the SD card.

Makes sense, thanks. So that basically means converting .nds into .app requires generating a patch that hardcodes what TWiLightMenu does in memory...

@PixelSergey
Copy link
Author

Makes sense, thanks. So that basically means converting .nds into .app requires generating a patch that hardcodes what TWiLightMenu does in memory...

Exactly! And at that point, it is easier to use TWiLightMenu for all games, rather than to develop a patch for each separate game.

@pauleeeeee
Copy link

Great guide - thank you - any way to dump installed games from an SD card to .cia format on a computer using a command line tool or something like that? I have a 64GB SD card pre-installed with a bajillion games but it is so full that dumping the .cia files with Godmode9 sounds like a chore...

@ehx-v1
Copy link

ehx-v1 commented Jul 16, 2020

Makes sense, thanks. So that basically means converting .nds into .app requires generating a patch that hardcodes what TWiLightMenu does in memory...

Exactly! And at that point, it is easier to use TWiLightMenu for all games, rather than to develop a patch for each separate game.

What I was thinking is, since TWiLightMenu is capable of doing that in memory, it might be possible to create that patch using a generic script that performs the same changes but hardcoded. I'm not very familiar with the .xdelta format's structure or how exactly TWiLightMenu works internally though, so I have no idea how easy or hard something like that would be to auto-generate.

@imnotanog
Copy link

hello, Ive recently tried a method of building a cia from 3ds but, when i loaded the game, all my saves were gone. This game is Legend Of Zelda Majoras Mask.

@Hypnotron
Copy link

hello, Ive recently tried a method of building a cia from 3ds but, when     
i loaded the game, all my saves were gone. This game is Legend Of 
Zelda Majoras Mask.

Try using Checkpoint to dump your saves.

@ehx-v1
Copy link

ehx-v1 commented Aug 16, 2020

hello, Ive recently tried a method of building a cia from 3ds but, when i loaded the game, all my saves were gone. This game is Legend Of Zelda Majoras Mask.

Save files need to be dumped separately. This is also true for extdata. As @Hypnotron mentioned, Checkpoint is a tool that helps with both.

@ktgvv
Copy link

ktgvv commented Jul 8, 2021

Does anyone know what's the difference between Build CIA (standard) and Build CIA (legit) (in Dumping a system title as a .cia file)?

A legit cia refers to a cia that has a "universal" signature. That means it can be played even on a stock system. Unfortunately, building a legit .cia only works for titles that have been universally signed by Nintendo, i.e. games that came pre-installed on the system when you bought it.
A standard cia is just a normal installable game or application.
It is usually recommended to simply build a standard cia, as legit cias only work for a small number of apps and there isn't a point in installing them, as you need CFW to do that in the first place.

Source? 🙂

@PixelSergey
Copy link
Author

Does anyone know what's the difference between Build CIA (standard) and Build CIA (legit) (in Dumping a system title as a .cia file)?

A legit cia refers to a cia that has a "universal" signature. That means it can be played even on a stock system. Unfortunately, building a legit .cia only works for titles that have been universally signed by Nintendo, i.e. games that came pre-installed on the system when you bought it.
A standard cia is just a normal installable game or application.
It is usually recommended to simply build a standard cia, as legit cias only work for a small number of apps and there isn't a point in installing them, as you need CFW to do that in the first place.

Source? 🙂

Sorry, don't have a source, just plenty of experience in the field. I'm quite certain this is correct, but do correct me if im wrong 😛

@XTheThespian
Copy link

Question. I have the latest Luma CFW on 11.15
I am trying to randomize Pokémon y from my physical cart using PK3ds. Which of these do I need to follow to use PK3ds? Is it “extracting romfs from a 3ds game cart”?

@PixelSergey
Copy link
Author

Question. I have the latest Luma CFW on 11.15 I am trying to randomize Pokémon y from my physical cart using PK3ds. Which of these do I need to follow to use PK3ds? Is it “extracting romfs from a 3ds game cart”?

Yes, exactly. You will need both RomFS and ExeFS for pk3DS, it seems :)

@lucasbrown
Copy link

Hi. I'd like to upscale Pokémon Omega Ruby and Alpha Sapphire's textures. I'd prefer to dump all of their textures at once, rather than playing the game through the Citra emulator and dumping textures manually.

Is extracting the RomFS using a physical Nintendo 3DS the only way to dump all of the textures at once? Would I be able to modify the dumped texture files after or would a post process be required?

@PixelSergey
Copy link
Author

@lucasbrown

Hi. I'd like to upscale Pokémon Omega Ruby and Alpha Sapphire's textures. I'd prefer to dump all of their textures at once, rather than playing the game through the Citra emulator and dumping textures manually.

Is extracting the RomFS using a physical Nintendo 3DS the only way to dump all of the textures at once? Would I be able to modify the dumped texture files after or would a post process be required?

You don't have to extract them on the 3DS. If you have the .3ds or .cia file on your PC, try using NINFS :)
You will, however, need the arm9 bootrom and seeddb from your 3DS - check the NINFS' README.md file for instructions on that.
If you don't want to use NINFS, then you can simply follow one of the sections above, selecting all of the RomFS files you need and dumping them at once.

I don't know what format Pokémon textures and models are stored in. The specifics will be different for every game. Try extracting them first and, if they are encoded in some way, look online for tools developed for your specific games.

@lucasbrown
Copy link

@PixelSergey

You don't have to extract them on the 3DS. If you have the .3ds or .cia file on your PC, try using NINFS :)
You will, however, need the arm9 bootrom and seeddb from your 3DS - check the NINFS' README.md file for instructions on that.
If you don't want to use NINFS, then you can simply follow one of the sections above, selecting all of the RomFS files you need and dumping them at once.

Excellent, thank you!

I don't know what format Pokémon textures and models are stored in. The specifics will be different for every game. Try extracting them first and, if they are encoded in some way, look online for tools developed for your specific games.

Understood. Thanks again.

@PixelSergey
Copy link
Author

PixelSergey commented Jan 29, 2022

@SleepyFishYT

how to convert cxi to zip ?

A .cxi file essentially contains the executable portion of a .3ds file. You can't convert it directly to a .zip.
The instructions under Extracting RomFS from a .cia/.3ds/.nds file should apply to a .cxi file as well. That should let you extract all the files.

@MakashiDev
Copy link

MakashiDev commented Mar 24, 2022

IMG_1553

Can't see search titles option, I can only see title manager

@PixelSergey
Copy link
Author

Can't see search titles option, I can only see title manager

I am not sure what causes this, but your godmode9 might be too old/outdated. Try updating it and following the instructions again carefully.

@PW5190
Copy link

PW5190 commented Feb 21, 2023

Hmm, I can understand that I can use GodMode9 on my 3DS to dump DSiWare titles as either a .app or a .nds format, but how do I backup DSiWare save files? These are important, too. I want to keep on playing them with the save in Twilight Menu rather than just starting over.

@PixelSergey
Copy link
Author

Hmm, I can understand that I can use GodMode9 on my 3DS to dump DSiWare titles as either a .app or a .nds format, but how do I backup DSiWare save files? These are important, too. I want to keep on playing them with the save in Twilight Menu rather than just starting over.

A save manager like Checkpoint should be able to do this

@Kugelwilhelm
Copy link

Kugelwilhelm commented Apr 27, 2023

What do I do after I dumped files from an cxi file.
I simply want to install the game, so I guess I have to create a cia file now.
Can anyone tell me how?

Edit: Nevermind. I found, that you can simply build a cia from the cxi.

@Pikrioling
Copy link

@MakashiDev I have the same problem as this guy, and I just updated Godmode9.

@ehx-v1
Copy link

ehx-v1 commented May 10, 2023

@MakashiDev @Pikrioling Taking a wild guess here, maybe it's been renamed to "Search for files" in recent versions?

@Pikrioling
Copy link

@ehx-v1 actually, you press Open Title Manager, then select the title you want to do stuff with by pressing A, select Open Title Folder, selcet the .tmd file and then press TMD File Options.... There press Mount CXI/NDS to drive, enter path go to the file/folder you want to copy, press A (or R + A if you're copying a folder) and select Copy to 0:/gm9/out. The Romfs should be there after it's done.

@ehx-v1
Copy link

ehx-v1 commented May 15, 2023

@Pikrioling Ah, so that means "Open Title Manager" is the new "Search titles".

@AlcalineAlice
Copy link

I am not sure what causes this, but your godmode9 might be too old/outdated. Try updating it and following the instructions again carefully.

I am encountering the same issue as the person above, and I double checked and my Godmode is up to date. Perhaps there's been a mistake by whoever writes the guide.

@ehx-v1
Copy link

ehx-v1 commented Jul 10, 2023

@AlcalineAlice It seems that Godmode9 did some restructuring and the guide is slightly out of date now. Check the discussion right above your comment.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment