Jump to content

Tutorial Forum
Welcome to our Tutorials and Guides section!

Here you will find all guides written by our members. The guides can also be found in the Tutorial and Guides index and will temporarily be listed on our front page.

If you have used a guide, please don't forget to rate it (open the topic and use the stars on the top right)!

  • Please log in to reply
* * * * * 6 votes

The Ultimate Nintendo DS ROM Hacking Guide!

(Go to first unread post)
GuardianSoul Post #1 Posted 03 May 2011 - 02:52 PM

    Advanced Member

  • PipPip

  • Group: Newcomers
  • Posts: 91
  • Member No.: 133,461
  • Joined: 18-August 08
  • Location: Netherlands

  •  



The Ultimate Nintendo DS ROM Hacking Pack
This pack includes all the programs I discussed here in this guide. Download it before you continue!



Hello everyone, this is my entry to the GBATemp 2011 Tutorial Competition. In this guide, I will explain you about almost everything you need to know about Nintendo DS ROM hacking. So far, Nintendo DS ROM hacking is quite popular, but there are still people who don't know anything about ROM hacking. I hope that, with this guide, people will understand ROM hacking, and thus in this way the hacking area will grow.

In this guide you will find a few words that are colored in red. Once you go over them with your mouse, you can find an explanation that word. If you've found anything incorrect in this guide, please let my know by sending me a PM, or by commenting here.
If you still have any questions, after reading this guide, feel free to ask me or the 'Tempers around.




Before I really will start with this guide, I would like to point out a mistake that is commonly used by many people: hacking and cracking.
Hacking is a completely legal way to modify a game, while cracking is illegal, and is only used to harm things.
A few examples of hacks we are sharing here at this community are; translations, hardcore hacks, graphical hacks etc.
We 'hackers' are modifying a game, and are using our knowledge and creativity for well-intentioned acts, and for fun.

It is completely legal to upload a hack, as long as you don't distribute the whole game on the internet, only the files you modified.
There is one simple solution to do this; making patches. These files do only contain the modified parts of a game, so they don't contain anything of the game itself; only the bytes you changed, and thus the parts you created your own.

There are several patching programs like xDelta or Lunar IPS. The most common program that is used for Nintendo DS hacks is xDelta.
To create a patch, you will need both the original, unmodified, untrimmed game, and the game you have modified. If someone has downloaded your hack, he/she has to use the same program you used. The user needs to open your patch alongside an original backup game, and the patcher will insert the modified parts into the backup.

So in this way, you can upload a file with a small file size, so you will save bandwidth... And it is completely legal!
It is absolutely not allowed to post Nintendo DS ROMs anywhere, it is not allowed to post them or ask for them here!

This information is very important, be aware of what you are going to do!




In this section we are going to replace the graphics of a Nintendo DS game. A few examples of graphics are Logos, buttons, overworld sprites, character sprites, et cetera. I will only explain you how to hack the most common graphic data files. You can find these in almost every game, there are only a few games that are using another file type.

ROM Hacking Example 1: Replacing a compressed graphic file 
ROM Hacking Example 2: Changing Palette Files 




In this section I am going to explain you how to replace the music and sounds of a Nintendo DS game. The tools required for this aren't perfect, so there is going to be some hex editing. If you are in search of a good, free hex editor, I'd recommend you HxD. Another good hex editing program is Hex Workshop, but this one is shareware.

ROM Hacking Example 3: Inserting Your Own Custom Music 



Due to a shortage of time, I couldn't finish this section. I can only give you the needed tools for editing levels for now.




Due to a shortage of time, I couldn't finish this section. If you really want to edit text, you can download The Ultimate Nintendo DS ROM Hacking Pack. You can find the link above. Alternatively, you can use this link to figure out how to text hack yourself.




General ROM Hacking Tools

BatchLZ77 by DarthNemesis
This program is used for compressing and decompressing files which can be read by the Nintendo DS. To let this tool do its work, you'll just have to select the "File" option at the top bar, and select whether you want to compress or decompress a file, and select the file you want the program to (de)compress. This procedure will (usually) take a very short time, if it doesn't the program will 'freeze', but that does only mean it's busy, so just be patient. If the program failed, a text file will be opened telling you which files weren't (de)compressed successfully. If it succeeded, you will be able to use the program again.

CrystalTile by angel-team
Probably the most useful ROM Hacking tool for the Nintendo DS. It offers a wide range of features like viewing and editing graphics in an easy way, (de)compressing files (however, this feature doesn't work always), extracting single files, a Multimedia Editor, listening to music inside the ROM file (although, I haven't figured out how to make it work correctly, to be honest), a hex editor and more. Sometimes, the program could be a little unstable. Make sure you'll save your work regularly!

Mario Kart DS Course Modifier by Gericom | Discussion thread
Don't let its name misguide you; since this tool does way more than modify courses. Make sure to check it out, though it is still a work in progress. This editor has support for a number of file formats:

- 3D MODELS (NSBMD); ...or rather a sort of archive containing the 3D model (the three-dimensional shape of an object), textures...
- TEXTURES (NSBTX); These files contain information that puts the texture of a 3D model on the right place, should be inside an NSBMD file.
- MODEL ANIMATIONS (NSBTP); Sometimes, a texture contains multiple 'parts'. This file decides when the texture parts should switch between each other. A few examples are blinking eyes, moving lips... Should be inside an NSBMD file.
- BMD FILES; 3D models, also seen in Gamecube games.
- DIALOG TEXT (BMG); There are many games that are using BMG files, even Wii games are using BMG's...though not every BMG file is the same, they could slightly differ from each other.
- NINTENDO PALETTES (NCLR); Palettes especially made for DS games.
- NINTENDO GRAPHICS (NCGR); Graphics like logo's, menu buttons, especially made for DS games.
- NINTENDO SCREEN RESOURCES (NSCR); Sometimes a graphic file is messed up when you open it, to see the full picture you can use these.
- KCL FILES; Collision files, if they weren't there, you would fall through the floor. Example: In The Legend of Zelda: Ocarina of Time you can walk through several walls (the walls that disappear using the Eye of Truth), that's because they have no collision.
- NKM FILES; Decides the position of an object, or where an object should be located. Some Mario Kart examples: Starting position, current position on the map, respawn position et cetera.

The editor has also support for NARC's (Nintendo Archives), CARC's (Compressed Nintendo Archives, NARC's with LZSS compression, could be decompressed using an in-build feature), and .nds files (so you won't have to extract your game first).

Project Pokémon's ROM Editor
This tool is specially designed for Pokémon games. In order to use this tool, you will first have to select your ROM using the "Choose ROM" button. After that, you must select the "Set ROM" button, so the program will extract the ROM using NDSTool. Now you can make use of several features: editing Pokémon (evolutions, attacks, data, TMs etc.), maps (wild Pokémon, events, Trainers…), moves (changing their description, type…), TMs and HMs (changing the attacks of any TM/HM), items, abilities, scripts (text) and trainers (Pokémon levels, and such). If you're done with using one feature, and you want to switch to another feature, make sure to click the "Save" button before you continue (if any)! If you're done with modifying your game, you can rebuild your ROM using the "Write ROM" button… It even has a patch maker build-in, so make use of that one, and share your hack with us!

Viewers

Console Tool by lowlines
Another very useful tool which allows you to view and convert the Nintendo DS' pallet files, viewing 3D models and viewing, ripping textures, extracting single files of a Nintendo DS ROM, editing files with the built-in hex editor, viewing the files within .narc as well as .carc files (without having to decompress them), extracting and viewing 2D graphics and 2D animations! You can open files directly (files that are already extracted from the ROM), and you can open a Nintendo DS ROM file, so a list containing the files within the ROM will appear. In order to make a graphic appear in a correct way, you need to open the Nintendo DS ROM file, containing the uncompressed graphic (NCGR) and palette file (NCLR) (and, if they're there, the animation (NANR), screen (NSCR) and (NCER) cell) files. You have to click every one of them ONCE, so an icon will appear behind them, after that you'll have to double click the NCGR file.

NSBMD by kiwi.ds
This tool allows you to view and dump 3D models and textures of a Nintendo DS ROM. This tool uses the Command Line. I would recommend you to use ConsoleTool, because it is more user friendly. You can't open the program directly, you have to open it using the CMD.

Graphical ROM Hacking Tools

PokeTex
With this tool, you can open up and view graphics (overworld sprites) from Pokémon games, pretty much outdated IMHO. In order to view the graphics, you'll need a .txt file containing some codes (actually locations), so the program can detect the graphics. With this tool, it is possible to edit graphics, but it's a real pain. Instead of pixels, you'll need to change numbers, each referring to a single color. It's not a bad tool either, if you consider this is one of the early Nintendo DS ROM Hacking tools.

TiledGGD
by barubary
This tool supports .NCGR and .NCLR files, meaning you can view graphics with it, with its right colors. Unfortunately, .NSCR files aren't supported, so some graphics will end up as puzzles. I would only recommend you this tool, if you're looking for some information for the palettes or graphics you're using. You can also use this tool to make a .bmp file out of the .NCGR and .NCLR files.

Tile Molester by SnowBro
I used this tool in the days I didn't knew CrystalTile had a graphic editor. With this tool, you can open graphics files from the Nintendo DS, and many other handhelds/consoles. You might encounter the following problems though; you'll have to make the picture show up correctly yourself, by changing some values and settings. You can't open the .NCLR palette files directly, you'll have to edit them with a hex editor, or you'll have to convert them to a supported file (using ConsoleTool, for example). I think it's best to use an alternative, because you'll probably will have many questions when using this program. I don't think it is necessary to write about this tool, just use Google in order to find the answers of your questions about this program.

Translation Tools

FINAL FANTASY III Dialog editor
by KengHot
With this translation tool, you can translate FINAL FANTASY III for the Nintendo DS.
First you will have to extract the FINAL FANTASY III ROM file, and locate all the .msd files.
These are the files containing the script. Take a look at the file names you'll see that each file has a letter in front of its file name.
"d" stands for dungeon, "t" stands for town "world_talk" are the dialogs of the events occurring on the world map, "eureka" are special dialogs (like battles, menu's etc.). I don't know what "f" stands for, maybe this text is unused, because it mainly contains Japanese text stings. There is only one "s", containing the dialog when you wake up.

Back to the dialog editor, first open the text .msd you'd like to modify.
Now the editor shows you the original text on the left side, and the modified text on the right side.
Once you selected a text string, you can edit it below.
Again: the original text on the left side, and a text field where you can input your translated text.
Change the "Max Chars" or "Max Lines" values if it tells you that the text won't fit.

When you're done with editing a string, click "Update" before you'll continue, after that you can select another text string.
If you're done with editing one file, click the "Save File" button.
The modified files will be saved in a folder named "output", it should be in the same folder as the executable.
Just overwrite the .msd files containing in your extracted ROM folder with the one in the "output" folder.
After that, rebuild your ROM, and test it! Unfortunately I noticed one little problem with this program…
When your sentence starts with a blank space, the program will remove it.
For example, if character one tells something to character two, first the name will be displayed with a blank space in front of it.
That space will be lost, once you edited it with the dialog editor. There may be a way to fix this, but I haven't figured it out yet, or at least tried to. Maybe you should take a look at the "xml" folder, in the same folder as the executable.
You can also open FINAL FANTASY IV text files with it, but you can't edit the dialog, because these files are a little different than the ones for FINAL FANTASY III. I know the creator (Kenghot) also made a tool for FFIV, but he hasn't released it, so you got to ask him if you want that tool.

FINAL FANTASY III Font Editor by KengHot
Editing fonts for FINAL FANTASY III has been made easy with this tool.

FINAL FANTASY Tactics A2 Script Editor by Deufeufeu
This tool can be used for translating FINAL FANTASY Tactics A2: Grimoire of the Rift.

Kingdom Hearts ReCoded by Tricky Upgrade
This tool can be used for either Kingdom Hearts Re: Coded as Kingdom Hearts 358/2 Days. It can open up decompressed .s text files. See the decompressed in there? You first have to locate the .s file, and then you'll have to decompress it with BatchLZ77, for example. You can't open every .s file, because some files do not contain any text. Open the decompressed .s file with the dialog editor using "File/Open". Now the original non-changeable text will be displayed on the left side, and the editable text on the right side. {Line Break} refers to a new text line in-game. If you're done with editing the text file, you can save it using "File/Save". Now you'll have to recompress the file again (with BatchLZ77), and replace the original .s file with the newly created file. Rebuild your ROM, and test the game!

Phoenix Wright Script Editor by Deufeufeu
Using this program, you can translate Phoenix Wright: Justice for All (the USA version, ROM number 0820). If you're running the executable for the first time, you will be asked to select the PW:JfA ROM file. Don't move the file to anywhere! Otherwise, the program will refer to the wrong location, and you won't be able to make use of it anymore. If you accidently did this, modify the config.py file using Notepad, which should be in the same folder as the executable.

TheNewPokéText by loadingNOW
With this tool, you can translate most Pokémon games. Including: Pokémon Diamond, Pearl, Platinum, HeartGold and SoulSilver.

Music ROM Hacking Tools

Midi2SSEQ by kiwi.ds
If you want to convert your midi file to an SSEQ file, you need to use this tool. Simply drag a midi file to the .exe file. However, this tool isn't perfect, the created SSEQ file needs to be edited with a hex editor, and sometimes, the tool even crashes when converting it. If you're looking for more information, take a look at the Music Hacking section above.

NDS Sound Extractor by Nintendon
A program which is using the Command Line which can extract sound sequences and is able to convert them to .midi's (for .sseq's) and .wav's (for .swar's). Enter "LocationOfExecutable\ndssndext.exe –-help" in the command line, to view the command options for this tool.

SSEQ2Midi by kiwi.ds
This tool is basically the same as Midi2SSEQ, but it converts a SSEQ to a midi. To use this program, simply drag and drop the SSEQ file to the executable, like Midi2SSEQ. Fortunately, this program has less problems than Midi2SSEQ and does almost always guarantee a conversion without any issues.

SWAV2SWAR by Borra
A tool that is able to convert .swav files of a .swar file and vica versa. You can compare this with extracting .wav files a .RAR file (SWAR to SWAV, RAR to WAV -> SWAV to SWAR, WAV to RAR).

VGMToolbox
This tool can locate and extract SDAT files. These features can be found under "VGMToolbox/Misc. Tools/Extraction Tools/Nintendo DS". Drag and drop the .sdat or .nds file to the window, once you have selected one of the Nintendo DS features, and let it extract the sound files.

VGMTrans
If you are going to hack some music, this program is really useful. To use it, you'll first have to extract your ROM file, and find the .sdat file (the file containing the music of the game, often called sound_data.sdat, these are often located in folders named music, sound etc.). The folder/open button doesn't work for some reason, so you have to drag and drop the file to the VGMTrans window. Be patient, and a list containing the music will appear. You can listen to them, and extract them as a midi. However, once you converted an SSEQ to a midi, it will lose its instruments. Because the instruments are contained in a different file (the SBNK file). You can convert this one to a DLS file. Open them both with FL Studio, so you can hear the music correctly. Unfortunately, this program is very unstable, and often crashes. For more detailed information, look at the Music Hacking section above. The program also features a build-in hex viewer, this one is very useful because it can spot the tempo, volume etc. of a music file.

Level Editing Programs

New Super Mario Bros. Editor by Treeki
Ever wanted to create your own Super Mario level? You can edit New Super Mario Bros. levels for the Nintendo DS using this tool!

Super Mario 64 DS Editor by Mega-Mario | Discussion thread
To edit Super Mario 64 DS levels, you can use this tool. Even though SMB64DS' levels are fully 3D!

Nintendo DS ROM Extractors

DSBuff by WB3000
A Nintendo DS ROM extractor with several other features like trimming, patching...

DSLazy by ratx
A wonderful ROM extractor with several other features. This is one of the most popular extraction tools. It has simple GUI, so it is easy to use.

NDS Editor by kiwi.ds
A tool that is able to extract and rebuild Nintendo Archives, LZ, Nintendo DS ROM, and Sound Data files. To extract files from a Nintendo DS ROM, simply open it, so it will be listed in the program. Double click it, and you'll see the list containing the files inside the ROM. Check the files you want to extract, and press the yellow-ish button at the left top. The NDSTool This is the first Nintendo DS ROM extraction tool ever made, but it works perfectly well for almost every game. How does this tool work? Simple. Let's say the NDSTool executable and the ROM file is located at C:/NDS/… For extracting a Nintendo DS ROM file, open the Command Line, type: "cd C:/NDS/" (without quotes), and press enter. After this, type: "C:/NDS/ndstool.exe -x NameOfNdsRomFile.nds -9 arm9.bin -7 arm7.bin -y9 y9.bin -y7 y7.bin -d data -y overlay -t banner.bin -h header.bin" (again without quotes) and press enter. Wait a moment, so all the files will be extracted. Modify the extracted files, and rebuild your Nintendo DS ROM using the following method: Go back to the Command Line, make sure you are still located at C:/NDS/. Type the following (without quotes): "ndstool -c NameOfNewNdsRomFile.nds -9 arm9.bin -7 arm7.bin -y9 y9.bin -y7 y7.bin -d data -y overlay -t banner.bin -h header.bin" and press enter. You can also use TheNewPokeText alongside NDSTool, for easier use.

Tahaxan by Arcnor
A useful tool which can view the files within Nintendo DS ROM files. It has a nice graphic viewer, text viewer and file extractor build-in (right mouse button/extract). The graphic viewer is able to convert the Nintendo DS' graphics files to a bitmap file, and you can set your own image size, which could be useful for some graphics. Nothing much to tell you more, it is very user-friendly, so you should be able to make use of this program yourself.




This entry has won the first prize of the GBATemp Tutorial 2011 Competition! However, I will still update this tutorial since this is a work in progress.<br />If there are any questions or tutorial requests, feel free to ask me.




Edited by GuardianSoul, 12 July 2011 - 11:04 AM.



SamAsh07 Post #2 Posted 03 May 2011 - 03:09 PM

    GBAtemp's Official Baby Adorer™


  • Group: Members
  • Posts: 2,647
  • Member No.: 155,448
  • Joined: 27-January 09
  • Location: Bahrain

  •  

Sounds good, just make sure the English translation is proper.

EDIT: Or you know what, just post the English translation when it's done, if there is a problem I'll be glad to pick it out.

Edited by SamAsh07, 03 May 2011 - 04:10 PM.


koyuki_kun Post #3 Posted 03 May 2011 - 03:47 PM

    Member

  • Pip

  • Group: Newcomers
  • Posts: 45
  • Member No.: 259,983
  • Joined: 12-August 10
  • Location: Ciudad de la Habana, Cuba

  •  

a guide in english is much better,thank for your help


Miss Panda Post #4 Posted 03 May 2011 - 04:49 PM

    GBAtemp Advance Fan

  • PipPipPipPipPip

  • Group: Members
  • Posts: 558
  • Member No.: 95,834
  • Joined: 15-August 07

  •  

As someone from the country that invented the language. I find it highly amusing that people are telling a Dutchman that they will check his English for him. Any English person will tell you that if it's proper English you are wanting and you can't find one of us then look to the Dutch or the Swedes. wink.gif Some of them put us to shame!

Edited by mabilouz, 03 May 2011 - 04:52 PM.


Berthenk Post #5 Posted 03 May 2011 - 04:56 PM

    Epitome of Awesomeness


  • Group: Members
  • Posts: 1,312
  • Member No.: 125,443
  • Joined: 16-May 08

  •  

QUOTE(mabilouz @ May 3 2011, 05:49 PM) <{POST_SNAPBACK}>
As someone from the country that invented the language. I find it highly amusing that people are telling a Dutchman that they will check his English for him. Any English person will tell you that if it's proper English you are wanting and you can't find one of us then look to the Dutch or the Swedes. wink.gif Some of them put us to shame!

I don't know why that is though. A reason could be that English is a forced course amongst most high schools, and almost everyone's got spell check which is a blessing to some. Swedes good at English? Look at Notch. He barely makes mistakes, except for the achievements, because "Achievement get!" is an obvious joke.
Also, non-English people putting you guys to shame? A lot of people can't be bothered to capitalize the first letter of their sentence and end one with a dot. A lot of mistakes, like there/their, then/than and the likes are common too.

Edit: perhaps I should re-re-re-read my post before posting it. tongue.gif

Edited by Berthenk, 03 May 2011 - 04:58 PM.


Prof. 9 Post #6 Posted 03 May 2011 - 04:59 PM

    GBAtemp Regular

  • PipPipPip

  • Group: Members
  • Posts: 212
  • Member No.: 128,772
  • Joined: 17-June 08
  • Location: The Netherlands

  •  

Where are you going to post the Dutch version once it's done?


GuardianSoul Post #7 Posted 04 May 2011 - 03:20 PM

    Advanced Member

  • PipPip

  • Group: Newcomers
  • Posts: 91
  • Member No.: 133,461
  • Joined: 18-August 08
  • Location: Netherlands

  •  

QUOTE(Prof. 9 @ May 3 2011, 05:59 PM) <{POST_SNAPBACK}>
Where are you going to post the Dutch version once it's done?


I'll think I will post it here as a Word Document. If that is alright, of course.



KingdomBlade Post #8 Posted 04 May 2011 - 04:15 PM

    Blade v3+ (I R SHMEXY)


  • Group: Members
  • Posts: 2,862
  • Member No.: 175,179
  • Joined: 24-April 09
  • Location: In Vulpes' Fur

  •  

This is excellent. Thank you very much for this. biggrin.gif


GuardianSoul Post #9 Posted 04 May 2011 - 04:55 PM

    Advanced Member

  • PipPip

  • Group: Newcomers
  • Posts: 91
  • Member No.: 133,461
  • Joined: 18-August 08
  • Location: Netherlands

  •  

QUOTE(KingdomBlade @ May 4 2011, 05:15 PM) <{POST_SNAPBACK}>
This is excellent. Thank you very much for this. biggrin.gif


Thanks, and no prob, it's a pleasure. biggrin.gif


Miss Panda Post #10 Posted 04 May 2011 - 05:33 PM

    GBAtemp Advance Fan

  • PipPipPipPipPip

  • Group: Members
  • Posts: 558
  • Member No.: 95,834
  • Joined: 15-August 07

  •  

This is looking great!


Guest_Zorua_* Post #11 Posted 04 May 2011 - 05:36 PM

  • Group: Guests

Excellent guide. I look forward to using it when it's complete. smile.gif


naved.islam14 Post #12 Posted 04 May 2011 - 05:47 PM

    Google Chrome Fanantic

  • PipPipPipPipPip

  • Group: Members
  • Posts: 756
  • Member No.: 198,649
  • Joined: 12-September 09
  • Location: Everywhere And Anywhere

  •  

Cool, this guide will finally help me to create a Pokemon hack.


GuardianSoul Post #13 Posted 04 May 2011 - 05:54 PM

    Advanced Member

  • PipPip

  • Group: Newcomers
  • Posts: 91
  • Member No.: 133,461
  • Joined: 18-August 08
  • Location: Netherlands

  •  

QUOTE(naved.islam14 @ May 4 2011, 06:47 PM) <{POST_SNAPBACK}>
Cool, this guide will finally help me to create a Pokemon hack.


Oh, if you're gonna make a Pokémon hack, these links may be useful:

Pokémon Black and White Hacking Documentation
Pokémon HeartGold/SoulSilver Hacking



sambskn Post #14 Posted 21 May 2011 - 10:57 AM

    Member

  • Pip

  • Group: Newcomers
  • Posts: 17
  • Member No.: 258,747
  • Joined: 25-July 10

  •  

Prepare for the greatest Pokemon hack...

Brokemon. Putting "Bro" in every name.
Totodile=Brotodile
Prof. Elm=Brofessor Elm
Poke Ball=Broke Ball
etc.

I have way too much spare time.


Nirraic Post #15 Posted 21 May 2011 - 11:11 AM

    Member

  • Pip

  • Group: Newcomers
  • Posts: 30
  • Member No.: 278,398
  • Joined: 30-April 11

  •  

QUOTE(GuardianSoul @ May 3 2011, 11:52 PM) <{POST_SNAPBACK}>
Compressed files
Some files are compressed, you'll have to extract them first before you can modify them.
in most cases, you'll see that a file is compressed by its extension (.lz, .carc).

not sure if typo or not but it's not .carc files, it's usually .narc files







Users browsing this topic

1 user(s) are reading this topic

0 members, 1 guests, 0 anonymous users