The Ultimate Nintendo DS ROM Hacking Guide!

logo.png

This pack contains all the programs I'll discuss here in this guide.​
It contains various useful ROM hacking tools like extractors and​
translation tools. I recommend you to download it before you​
continue! Note: To download it, click the image above.



introduction.png

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.

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'll really start with this guide, I would like to point out a mistake that is commonly used by many people: the difference between hacking and cracking.
In simple words; 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!



Hacking%20Graphics.png

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.



This video basically summarizes what's been done at ROM Hacking Example 1. However, if you'd like a detailed explanation of everything read it below.​

Example 1: Replacing a compressed graphic file
[GEX1]
In this example, I will replace the "Nintendo" logo that appears at the startup of Mario Kart DS. You can all download the needed tools for ROM Hacking later, as one .rar file. The tools I will use in this example are CrystalTile and BatchLZ77. Find them on Filetrip for now.

exp1s1.png

First of all we are going to open Mario Kart DS in CrystalTile.
Click the folder button at the top bar.

exp1s2.png
Select your Mario Kart DS ROM file, and click "Open".​

exp1s3.png
Now, a list should appear containing all the files within the ROM.​
If this didn't happen, click Tools -> NDS File System or press Ctrl + N at the same time.​

exp1s4.png
Scroll down, until you see the data/Scene/Logo.carc file... Do you notice the LZ icon in front of that file?​
It means the file is compressed. It is very useful to know that, because it needs to be decompressed first, before you can edit it.​
Sometimes, you will encounter a file without a file extension, if it has a "LZ" logo in front of it, it means it is compressed.​
Every .carc file (Compressed Nintendo Archive) has a LZ77 compression, you'll need to decompress such files using a special tool.​
You can do that with CrystalTile, but I won't be using that, because sometimes CrystalTile fails to (de)compress files. I'll just use BatchLZ77 here.​
But now, we are going to take out the file of the ROM file. We are going to export it... right click the file, and click "Export".​
Choose where you want to save the file, and click "Save".​

exp1s5.png

Now we are going to BatchLZ77... Just what I said earlier, the file is compressed, we need to decompress it.

Click "File -> Decompress Files...", go to the folder where you just saved you .carc file, and select it.
When it's done, a window will appear saying you're file has been decompressed succesfully, that should be really quick.

exp1s6.png
So now, you have two files... "Logo.carc" and "Logo.carc.decompressed".​
You could say that "Logo.carc" has been decompressed to a narc file now.​

exp1s1.png
Now we're going back to CrystalTile.​
Hit the folder button, and open up your decompressed .carc file (so "Logo.carc.decompressed").​

exp1s7.png
A new list should appear. If not, press the F2 button, or go to "Tools -> Sub-file Sort...".​

exp1s8.png
You'll see nine files in total, but actually, these are just three graphics.​
You have three extensions here, .NSCR, .NCGR, and .NCLR.​
All these .NSCR files are 'Map files', they will put the image on the right place in game.​
Sometimes, you have a puzzle instead of a complete picture (if you open it with CrystalTile).​
But once you open the graphic alongside the .NSCR file, you will see that the pieces will form a complete picture.​
However, you cannot edit a graphic alongside an .NSCR file.​
If you do, it will be messed up in-game, or the game will crash. Be careful about that.​
The .NCGR files are 'Graphic files', they contain the 'picture' of a graphic.​
Once you open it alone in CrystalTile, you will notice that the colors are messed up...​
That's why we also have .NCLR files, these are the pallete files. It will assign a picture its right colors.​
When you opened a graphic file, alongside a pallete file, you can just edit it normaly.​
It won't crash if you would modify it in this way.​

exp1s9.png
Click the button marked above, the tiled mountain, and change the 'scale' value under the​
'Tile property' tab from 400 to 100 (400% picture size to 100% picture size).​
Now, you have to select the logo_R_Nintendo_m.NCGR graphic file (don't double click it), and then press the space bar​
(or right click the file and select "Retrieve Tile adress"), (if you double click the file, the image is messed up).​
You have to do the same with the palette file (logo_R_Nintendo_m.NCLR), click it once, and press the space bar.​
Now you will see the 'Nintendo' logo correctly.​

exp1s11.png
Right click the logo that just appeared, and click copy. Now you can paste it in programs like Paint or Photoshop.​
You can make your own, custom logo now.​
Make sure that you only edit the 'black' part and not the 'blue' part, and only use white characters.​
Copy your modified logo in Paint, Photoshop or any other tool, and go to the next step.​

exp1s12.png
Right click the logo in CrystalTile, and click 'Paste' (the same way as you copied the file).​
Now you can move it around, which we're not gonna do here, just double click the logo, so it will be pasted.​

exp1s14.png

Go to "File -> Save" or use the Ctrl + S shortcut to save the file. Or go to "File -> Save As" if you also want to keep the original.
You can close the logo window in CrystalTile after you saved it.

exp1s13.png
Now we're gonna recompress the file using BatchLZ77. Choose "File -> Compress Files...".​
exp1s16.png
Select the modified file you just saved.​
The program will create a new file, and its extension will be '.compressed'.​
This is your modified file in .carc-form, as you probably already figured out.​
exp1s15.2.png
In CrystalTile, we're going back to our Mario Kart DS ROM window.​
Right click the data/Scene/Logo.carc file again, and press "Import".​

exp1s17.png

Select your "Logo.carc.decompressed" file, and CrystalTile will replace the original file with your modified file.
The extension doesn't matter, as long as it remains a graphic file.

exp1s18.png
Finally, we're going to save the modified Nintendo DS ROM.​

exp1sRes.png
If you followed all the steps correctly, the Nintendo logo has been replaced with your​
own, like the one above! The font I used here is called 'Pretendo'.​

Example 2: Changing Palette Files
[GEX2]
In this example, we're not only going to change the graphic file, but also the palette file. The tools I will use for this example are CrystalTile, BatchLZ77, Paint.NET and ConsoleTool. It is important that you don't use Microsoft Paint for this, just use Paint.NET (free), Photoshop (shareware, but very useful), or another program. Before you're going to read this example, make sure you read the first one to make things more clearly.

This time we're going to change the Title Screen of Mario Kart DS (the Top Screen only).

Open your Mario Kart DS ROM file with CrystalTile.

Scroll down, and export the data/Scene/Title_us.carc.

Decompress the exported file with BatchLZ77.

Open the decompressed file with CrystalTile.

Right click/Retrieve Tile file for the Title_m_b.NCGR and Right click/Load Palette for the Title_m_b.NCLR file.

Right click the Title_m_b.NCLR palette file, click 'Export', and save it to some folder.

Copy the graphic that just showed up correctly, and paste it in you graphic editor.

After you edited the graphic, you have to make sure your image is in 8 bit pixel mode:

Using Adobe Photoshop
Go to 'Image/Mode/Indexed color...', and use the following settings:
Palette: Local (Perceptual)
Colors: 256
Forced: None
Transparency: Unchecked
Dither: Diffusion
Amount: 75%
Preserve Exact Colors: Unchecked
Click 'OK'.

Using Paint.NET
Click 'Save as', and select BMP and 8 Bit, save it, and open the .BMP file.

Now we have to save the palette to a file:

Using Photoshop
Go to 'Image/Color Table...', and select the 'Save...' button (use the .act extension).

Using Paint.NET
This isn't possible with Paint.NET, you will have to find a tool which creates a .act palette file.
You can use the palette editor here, for example. Open the .bmp file using 'Load Palette', and export the .act file using 'Save Palette'.
Now you'll have to open the created .act file in ConsoleTool, after you opened it, also open the .NCLR file you extracted with CrystalTile.

Compare the two files; make sure that your .act files has the same amount of colors. Delete the last color if it has more colors that the .NCLR file. Make sure the first color is the same as the one in the .NCLR file, this color will set the transparency.

Save the .act file as a .NCLR in ConsoleTool using 'File/Export'.

Replace the old .NCLR file in your ROM(Title_m_b.NCLR) with CrystalTile with the newly created .NCLR file by ConsoleTool.

Load the palette using CrystalTile, right click the Title_m_b.NCLR file and select Palette Load.

Now the colors will be messed up, this is okay, because now you have to copy the edited graphic file from you graphic editor, and paste it.

Click 'Save', and close the two windows of the .carc file (not the two of your .nds file).

Compress the 'Title_us.narc.decompressed' file with BatchLZ77, so the file 'Title_us.narc.decompressed.compressed' will be created.

Replace the old Title_us.carc in your ROM with the 'Title_us.narc.decompressed.compressed' file using CrystalTile (remember: Right Click/Import').

Save your ROM file, and test it!

proof.png




hacking%20sounds%20and%20music.png


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.

Example 1: Inserting Your Own Custom Music
[MEX1]
In this example I will use FL Studio (you can use the demo version), a hex editor (I'll use HxD here), midi2sseq, VGMTrans, CrystalTile and a midi file. Here, I will explain you how to replace the Olympus Coliseum battle music from Kingdom Hearts Re: Coded with your own battle theme.

First, we are going to extract the sound_data.sdat file out of Kingdom Hearts Re: Coded using CrystalTile. So open CrystalTile, and scroll down 'till you see "sd/sound_data.sdat".

Right click the file and select "Export", and save the file to any location.

Open VGMTrans, and drag and drop the sound_data.sdat file you just extracted to the program window.
VGMTrans will read the file, just be patient until the list containing the music shows up.

We need to extract the Olympus Coliseum battle theme, which is the file named "Herc_B". Select the file so three
files will appear at the left side.

You see those three files? The first file is the SSEQ file, the sound sequence.
These files are like .midi files, but especially made for the Nintendo DS. The second file is the SBNK file, the Sound Bank.
You can compare these with soundfonts, they assign the instruments of an SSEQ file a realistic, not midi-ish sound. Like you hear them in-game.
The third file is the SWAR file, the Sound Wave Archive. It contains a collection of SWAV files (Sound samples/Sound Waves), which are like .wav files.

We only have to extract the SBNK, as a .DLS, so right click the second file, and select "Convert to DLS".

Now you'll have to open your .midi file using FL Studio.

There should be a small window in FL Studio, named Fruity LSD. Click the grey folder button on the left top, and select the .DLS file you just extracted.

Now you'll have to replace each MIDI channel. Right click every MIDI channel, hover replace, and click 'MIDI out'. Now you will be able to change the instruments, so that they will be heard correctly in-game. You can only have 14 channels for every song you want to put into a Nintendo DS game. The file size can also not exceed the original, if this happens, you'll have to reduce the MIDI channels, delete some notes, or reduce the song length.

Export the file as a MIDI using "File/Export/MIDI File" when you're done with editing. Do not close FL Studio yet!

Open your hex editor, and open the MIDI file you just saved.

We are going to change the tempo by changing one byte. This step is really necessary. Press ctrl + F, enter "60", and set the "Data type" option to "Hex". It should find a byte very early in the file.

Change that byte to C0, so change "60" to "C0", press ctrl + S to save your file.

Now you'll have to open the MIDI file again, the one you did just change, using FL Studio.

You'll notice the tempo is twice as fast, this is just what we want. So export it as a MIDI, again.

Open the file, you just saved using the hex editor.

Press ctrl + F again, and search for that "60" byte again… Make sure the "Data Type" option is set to "Hex".

Overwrite the byte with "30", so "60" becomes "30".

Save the file. The song should sound normal now, its tempo should be recovered.

Open the folder where your latest created .midi file is located, and make sure midi2sseq is in the same folder.

Drag and drop the .midi file to the midi2sseq executable.

It will create a new .sseq, it should have the same file name as the .midi.

Unfortunately, midi2sseq isn't perfect. So we have to edit the newly generated .sseq with a hex editor.

Press ctrl + F, enter "FF C0". Again, make sure you're searching for hex data types.

Change the C0 value to C7, and ADD (not replace) a 00 byte.

My midi file has 12 channels, that means there are twelve "FF C0"s in my SSEQ.
If you got 6 channels for examples you'll have 6 "FF C0"s. You'll have to edit them, so just repeat the previous two steps, until you have edited them all.

Save your file, and open CrystalTile.

Open the sound_data.sdat you created at the beginning of this example.

Locate the "Sequences13-Herc_B.SSEQ" file in the window that just appeared.

Right click it and import the .SSEQ you made using midi2sseq. Again, you cannot exceed the file size, otherwise an error will appear.

Click the save button at the top bar.

Extract you Nintendo DS ROM using a ROM Extractor.

Go to the "sd" folder, and replace the sound_data.sdat file with the new one.

Rebuild your ROM, and test it.

Optionally, you can make your music loop. To do this, look at this tutorial. Unfortunately, I haven't really figured out to make it work, so
you'll need to do this on your own. VGMTrans can sort out all the bytes for you, I recommend it if you want to use that tutorial.



hacking%20levels.png


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.



hacking%20text.png


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 do text hacking yourself.



hacking%20tools.png


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; 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 Dirbaio and Pirahnaplant | Official Forums
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.


Changelog:
05/03/12: Initial Release.​
11/11/12: The layout has been fixed and is now compatible with the new forum software!​
11/17/12: Got rid of the spoiler tags, the layout is still being worked on.​
 

Reckutx

Member
Newcomer
Joined
Aug 17, 2012
Messages
7
Trophies
0
XP
4
Country
United States
Can anyone make a tutorial for this that is more focused on Pokemon games? I'm not really good at trying to apply this tutorial to editing Pokemon Diamond. If you can it would be a HUGE help. Thanks!
 

GuardianSoul

Translator
OP
Member
Joined
Aug 18, 2008
Messages
117
Trophies
1
Age
27
Location
Netherlands
Website
www.guardiansoul.nl
XP
412
Country
Netherlands

Coolperez8

Well-Known Member
Member
Joined
Mar 17, 2013
Messages
134
Trophies
1
XP
468
Country
United States
logo.png

This pack contains all the programs I'll discuss here in this guide.​
It contains various useful ROM hacking tools like extractors and​
translation tools. I recommend you to download it before you​
continue! Note: To download it, click the image above.



introduction.png

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.

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'll really start with this guide, I would like to point out a mistake that is commonly used by many people: the difference between hacking and cracking.
In simple words; 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!



Hacking%20Graphics.png

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.



This video basically summarizes what's been done at ROM Hacking Example 1. However, if you'd like a detailed explanation of everything read it below.​

Example 1: Replacing a compressed graphic file
[GEX1]
In this example, I will replace the "Nintendo" logo that appears at the startup of Mario Kart DS. You can all download the needed tools for ROM Hacking later, as one .rar file. The tools I will use in this example are CrystalTile and BatchLZ77. Find them on Filetrip for now.

exp1s1.png

First of all we are going to open Mario Kart DS in CrystalTile.
Click the folder button at the top bar.

exp1s2.png
Select your Mario Kart DS ROM file, and click "Open".​

exp1s3.png
Now, a list should appear containing all the files within the ROM.​
If this didn't happen, click Tools -> NDS File System or press Ctrl + N at the same time.​

exp1s4.png
Scroll down, until you see the data/Scene/Logo.carc file... Do you notice the LZ icon in front of that file?​
It means the file is compressed. It is very useful to know that, because it needs to be decompressed first, before you can edit it.​
Sometimes, you will encounter a file without a file extension, if it has a "LZ" logo in front of it, it means it is compressed.​
Every .carc file (Compressed Nintendo Archive) has a LZ77 compression, you'll need to decompress such files using a special tool.​
You can do that with CrystalTile, but I won't be using that, because sometimes CrystalTile fails to (de)compress files. I'll just use BatchLZ77 here.​
But now, we are going to take out the file of the ROM file. We are going to export it... right click the file, and click "Export".​
Choose where you want to save the file, and click "Save".​

exp1s5.png

Now we are going to BatchLZ77... Just what I said earlier, the file is compressed, we need to decompress it.

Click "File -> Decompress Files...", go to the folder where you just saved you .carc file, and select it.
When it's done, a window will appear saying you're file has been decompressed succesfully, that should be really quick.

exp1s6.png
So now, you have two files... "Logo.carc" and "Logo.carc.decompressed".​
You could say that "Logo.carc" has been decompressed to a narc file now.​

exp1s1.png
Now we're going back to CrystalTile.​
Hit the folder button, and open up your decompressed .carc file (so "Logo.carc.decompressed").​

exp1s7.png
A new list should appear. If not, press the F2 button, or go to "Tools -> Sub-file Sort...".​

exp1s8.png
You'll see nine files in total, but actually, these are just three graphics.​
You have three extensions here, .NSCR, .NCGR, and .NCLR.​
All these .NSCR files are 'Map files', they will put the image on the right place in game.​
Sometimes, you have a puzzle instead of a complete picture (if you open it with CrystalTile).​
But once you open the graphic alongside the .NSCR file, you will see that the pieces will form a complete picture.​
However, you cannot edit a graphic alongside an .NSCR file.​
If you do, it will be messed up in-game, or the game will crash. Be careful about that.​
The .NCGR files are 'Graphic files', they contain the 'picture' of a graphic.​
Once you open it alone in CrystalTile, you will notice that the colors are messed up...​
That's why we also have .NCLR files, these are the pallete files. It will assign a picture its right colors.​
When you opened a graphic file, alongside a pallete file, you can just edit it normaly.​
It won't crash if you would modify it in this way.​

exp1s9.png
Click the button marked above, the tiled mountain, and change the 'scale' value under the​
'Tile property' tab from 400 to 100 (400% picture size to 100% picture size).​
Now, you have to select the logo_R_Nintendo_m.NCGR graphic file (don't double click it), and then press the space bar​
(or right click the file and select "Retrieve Tile adress"), (if you double click the file, the image is messed up).​
You have to do the same with the palette file (logo_R_Nintendo_m.NCLR), click it once, and press the space bar.​
Now you will see the 'Nintendo' logo correctly.​

exp1s11.png
Right click the logo that just appeared, and click copy. Now you can paste it in programs like Paint or Photoshop.​
You can make your own, custom logo now.​
Make sure that you only edit the 'black' part and not the 'blue' part, and only use white characters.​
Copy your modified logo in Paint, Photoshop or any other tool, and go to the next step.​

exp1s12.png
Right click the logo in CrystalTile, and click 'Paste' (the same way as you copied the file).​
Now you can move it around, which we're not gonna do here, just double click the logo, so it will be pasted.​

exp1s14.png

Go to "File -> Save" or use the Ctrl + S shortcut to save the file. Or go to "File -> Save As" if you also want to keep the original.
You can close the logo window in CrystalTile after you saved it.

exp1s13.png
Now we're gonna recompress the file using BatchLZ77. Choose "File -> Compress Files...".​
exp1s16.png
Select the modified file you just saved.​
The program will create a new file, and its extension will be '.compressed'.​
This is your modified file in .carc-form, as you probably already figured out.​
exp1s15.2.png
In CrystalTile, we're going back to our Mario Kart DS ROM window.​
Right click the data/Scene/Logo.carc file again, and press "Import".​

exp1s17.png

Select your "Logo.carc.decompressed" file, and CrystalTile will replace the original file with your modified file.
The extension doesn't matter, as long as it remains a graphic file.

exp1s18.png
Finally, we're going to save the modified Nintendo DS ROM.​

exp1sRes.png
If you followed all the steps correctly, the Nintendo logo has been replaced with your​
own, like the one above! The font I used here is called 'Pretendo'.​

Example 2: Changing Palette Files
[GEX2]
In this example, we're not only going to change the graphic file, but also the palette file. The tools I will use for this example are CrystalTile, BatchLZ77, Paint.NET and ConsoleTool. It is important that you don't use Microsoft Paint for this, just use Paint.NET (free), Photoshop (shareware, but very useful), or another program. Before you're going to read this example, make sure you read the first one to make things more clearly.

This time we're going to change the Title Screen of Mario Kart DS (the Top Screen only).

Open your Mario Kart DS ROM file with CrystalTile.

Scroll down, and export the data/Scene/Title_us.carc.

Decompress the exported file with BatchLZ77.

Open the decompressed file with CrystalTile.

Right click/Retrieve Tile file for the Title_m_b.NCGR and Right click/Load Palette for the Title_m_b.NCLR file.

Right click the Title_m_b.NCLR palette file, click 'Export', and save it to some folder.

Copy the graphic that just showed up correctly, and paste it in you graphic editor.

After you edited the graphic, you have to make sure your image is in 8 bit pixel mode:

Using Adobe Photoshop
Go to 'Image/Mode/Indexed color...', and use the following settings:
Palette: Local (Perceptual)
Colors: 256
Forced: None
Transparency: Unchecked
Dither: Diffusion
Amount: 75%
Preserve Exact Colors: Unchecked
Click 'OK'.

Using Paint.NET
Click 'Save as', and select BMP and 8 Bit, save it, and open the .BMP file.

Now we have to save the palette to a file:

Using Photoshop
Go to 'Image/Color Table...', and select the 'Save...' button (use the .act extension).

Using Paint.NET
This isn't possible with Paint.NET, you will have to find a tool which creates a .act palette file.
You can use the palette editor here, for example. Open the .bmp file using 'Load Palette', and export the .act file using 'Save Palette'.
Now you'll have to open the created .act file in ConsoleTool, after you opened it, also open the .NCLR file you extracted with CrystalTile.

Compare the two files; make sure that your .act files has the same amount of colors. Delete the last color if it has more colors that the .NCLR file. Make sure the first color is the same as the one in the .NCLR file, this color will set the transparency.

Save the .act file as a .NCLR in ConsoleTool using 'File/Export'.

Replace the old .NCLR file in your ROM(Title_m_b.NCLR) with CrystalTile with the newly created .NCLR file by ConsoleTool.

Load the palette using CrystalTile, right click the Title_m_b.NCLR file and select Palette Load.

Now the colors will be messed up, this is okay, because now you have to copy the edited graphic file from you graphic editor, and paste it.

Click 'Save', and close the two windows of the .carc file (not the two of your .nds file).

Compress the 'Title_us.narc.decompressed' file with BatchLZ77, so the file 'Title_us.narc.decompressed.compressed' will be created.

Replace the old Title_us.carc in your ROM with the 'Title_us.narc.decompressed.compressed' file using CrystalTile (remember: Right Click/Import').

Save your ROM file, and test it!

proof.png




hacking%20sounds%20and%20music.png


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.

Example 1: Inserting Your Own Custom Music
[MEX1]
In this example I will use FL Studio (you can use the demo version), a hex editor (I'll use HxD here), midi2sseq, VGMTrans, CrystalTile and a midi file. Here, I will explain you how to replace the Olympus Coliseum battle music from Kingdom Hearts Re: Coded with your own battle theme.

First, we are going to extract the sound_data.sdat file out of Kingdom Hearts Re: Coded using CrystalTile. So open CrystalTile, and scroll down 'till you see "sd/sound_data.sdat".

Right click the file and select "Export", and save the file to any location.

Open VGMTrans, and drag and drop the sound_data.sdat file you just extracted to the program window.
VGMTrans will read the file, just be patient until the list containing the music shows up.

We need to extract the Olympus Coliseum battle theme, which is the file named "Herc_B". Select the file so three
files will appear at the left side.

You see those three files? The first file is the SSEQ file, the sound sequence.
These files are like .midi files, but especially made for the Nintendo DS. The second file is the SBNK file, the Sound Bank.
You can compare these with soundfonts, they assign the instruments of an SSEQ file a realistic, not midi-ish sound. Like you hear them in-game.
The third file is the SWAR file, the Sound Wave Archive. It contains a collection of SWAV files (Sound samples/Sound Waves), which are like .wav files.

We only have to extract the SBNK, as a .DLS, so right click the second file, and select "Convert to DLS".

Now you'll have to open your .midi file using FL Studio.

There should be a small window in FL Studio, named Fruity LSD. Click the grey folder button on the left top, and select the .DLS file you just extracted.

Now you'll have to replace each MIDI channel. Right click every MIDI channel, hover replace, and click 'MIDI out'. Now you will be able to change the instruments, so that they will be heard correctly in-game. You can only have 14 channels for every song you want to put into a Nintendo DS game. The file size can also not exceed the original, if this happens, you'll have to reduce the MIDI channels, delete some notes, or reduce the song length.

Export the file as a MIDI using "File/Export/MIDI File" when you're done with editing. Do not close FL Studio yet!

Open your hex editor, and open the MIDI file you just saved.

We are going to change the tempo by changing one byte. This step is really necessary. Press ctrl + F, enter "60", and set the "Data type" option to "Hex". It should find a byte very early in the file.

Change that byte to C0, so change "60" to "C0", press ctrl + S to save your file.

Now you'll have to open the MIDI file again, the one you did just change, using FL Studio.

You'll notice the tempo is twice as fast, this is just what we want. So export it as a MIDI, again.

Open the file, you just saved using the hex editor.

Press ctrl + F again, and search for that "60" byte again… Make sure the "Data Type" option is set to "Hex".

Overwrite the byte with "30", so "60" becomes "30".

Save the file. The song should sound normal now, its tempo should be recovered.

Open the folder where your latest created .midi file is located, and make sure midi2sseq is in the same folder.

Drag and drop the .midi file to the midi2sseq executable.

It will create a new .sseq, it should have the same file name as the .midi.

Unfortunately, midi2sseq isn't perfect. So we have to edit the newly generated .sseq with a hex editor.

Press ctrl + F, enter "FF C0". Again, make sure you're searching for hex data types.

Change the C0 value to C7, and ADD (not replace) a 00 byte.

My midi file has 12 channels, that means there are twelve "FF C0"s in my SSEQ.
If you got 6 channels for examples you'll have 6 "FF C0"s. You'll have to edit them, so just repeat the previous two steps, until you have edited them all.

Save your file, and open CrystalTile.

Open the sound_data.sdat you created at the beginning of this example.

Locate the "Sequences13-Herc_B.SSEQ" file in the window that just appeared.

Right click it and import the .SSEQ you made using midi2sseq. Again, you cannot exceed the file size, otherwise an error will appear.

Click the save button at the top bar.

Extract you Nintendo DS ROM using a ROM Extractor.

Go to the "sd" folder, and replace the sound_data.sdat file with the new one.

Rebuild your ROM, and test it.

Optionally, you can make your music loop. To do this, look at this tutorial. Unfortunately, I haven't really figured out to make it work, so
you'll need to do this on your own. VGMTrans can sort out all the bytes for you, I recommend it if you want to use that tutorial.



hacking%20levels.png


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.



hacking%20text.png


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 do text hacking yourself.



hacking%20tools.png


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; 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 Dirbaio and Pirahnaplant | Official Forums
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.


Changelog:
05/03/12: Initial Release.​
11/11/12: The layout has been fixed and is now compatible with the new forum software!​
11/17/12: Got rid of the spoiler tags, the layout is still being worked on.​

I'm missing a dll from my system & can't hack the graphics... help!
 

Roman120594

New Member
Newbie
Joined
Jul 10, 2013
Messages
1
Trophies
0
Age
29
XP
41
Country
Iceland
Hey guys, I need your help. I am trying to edit pokemon icons ( you know, when you open your inventory of you 6 pokemon party ) in pokemon Platinum and it seems like the Map file is missing (NSCR), therefore the picture is messed up. any suggestions?
 

Swauny Jones

Member
Newcomer
Joined
Mar 25, 2014
Messages
12
Trophies
0
Location
T.O.
XP
114
Country
Canada
This is AAAWWWWWEEEESSSSOOOOMMMMEEEE!!!!!!!!!!! I can't wait to make my kids experience on their DSi's more personalized, Thanks a Million for this.
 

Metoroid0

Samus Aran
Member
Joined
Nov 2, 2012
Messages
2,231
Trophies
1
Location
Unknown region of space
Website
www.metroidwiki.org
XP
2,118
Country
Japan
"Click the button marked above, the tiled mountain, and change the 'scale' value under the​
'Tile property' tab from 400 to 100 (400% picture size to 100% picture size)."​
Why picture needs to be scaled down from 400 to 100?​
-----------------​
I'm missing a dll from my system & can't hack the graphics... help!
Look up the file on Google and put it in the same folder as the executable. Do the same with the other missing dll's (if any).

Why are they missing in the first place?

By the way, i did downloaded DLL but no luck for me. I made CrystalTile2 work by downloading it from different website.

exp1s17.png


the picture is showing "Logo.carc.decompresse.compressed"

but you said:
"Select your "Logo.carc.decompressed" file, and CrystalTile will replace the original file with your modified file.
The extension doesn't matter, as long as it remains a graphic file."


----
Another question: Why to use ONLY white characters when hacking nintendo logo? is there some specific reason or it is just more visible?
 

MikeyTaylorGaming

YouTube Glitcher
Member
Joined
Aug 11, 2007
Messages
1,754
Trophies
1
Location
North West England
Website
youtube.com
XP
1,555
Country
United Kingdom
This guide looks fantastic! I really want to give it a go myself, however I can't find the download link on filetrip :S
In order to download the file i had to select download the press 'Manual Download' rather than 'Automatic Download' hahaha DUH

Now that I've got it all sorted I'm gonna have a play around with all the programs and see what else I can mess around with and change, hopefully I'll be able to stick a few videos on my YouTube channel to do with this too! Obviously giving credit to GuardianSoul for the guide! :D




Metoroid0, I was thinking that when reading through as well, I think it's just a mis-type, meaning you should import the one that you've edited, which would be 'Logo.carc.decompressed.compressed'.

That sounds more logical because i'd assume you can't import the decompressed one, plus, that would be the exact same as the one you extracted in the first place :P

The reason you scale it down to 100% is probably to make the whole image visible? Changing the scale of the picture will not change the overall size, just what you can see of the image at one time so it won't make a difference if you edit at 400% or 100% I guess
 
  • Like
Reactions: Metoroid0

MikeyTaylorGaming

YouTube Glitcher
Member
Joined
Aug 11, 2007
Messages
1,754
Trophies
1
Location
North West England
Website
youtube.com
XP
1,555
Country
United Kingdom
Can someone please help me with the Palette hacking?!

I've edited the image, saved it as a bitmap and used Paint.net to save the palette as a .ACT

But i can't for the life of me work out how to open the application: ConsoleTool... I've found the folder with console tool, but there doesn't seem to be any application :S
 

Chazpelo

Well-Known Member
Newcomer
Joined
Oct 4, 2015
Messages
61
Trophies
0
XP
156
Country
United States
logo.png



This pack contains all the programs I'll discuss here in this guide.
It contains various useful ROM hacking tools like extractors and
translation tools. I recommend you to download it before you
continue! Note: To download it, click the image above.



introduction.png

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.

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'll really start with this guide, I would like to point out a mistake that is commonly used by many people: the difference between hacking and cracking.
In simple words; 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!



Hacking%20Graphics.png

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.



This video basically summarizes what's been done at ROM Hacking Example 1. However, if you'd like a detailed explanation of everything read it below.​


Example 1: Replacing a compressed graphic file
[GEX1]
In this example, I will replace the "Nintendo" logo that appears at the startup of Mario Kart DS. You can all download the needed tools for ROM Hacking later, as one .rar file. The tools I will use in this example are CrystalTile and BatchLZ77. Find them on Filetrip for now.

exp1s1.png

First of all we are going to open Mario Kart DS in CrystalTile.
Click the folder button at the top bar.

exp1s2.png

Select your Mario Kart DS ROM file, and click "Open".​

exp1s3.png

Now, a list should appear containing all the files within the ROM.
If this didn't happen, click Tools -> NDS File System or press Ctrl + N at the same time.​

exp1s4.png

Scroll down, until you see the data/Scene/Logo.carc file... Do you notice the LZ icon in front of that file?
It means the file is compressed. It is very useful to know that, because it needs to be decompressed first, before you can edit it.

Sometimes, you will encounter a file without a file extension, if it has a "LZ" logo in front of it, it means it is compressed.
Every .carc file (Compressed Nintendo Archive) has a LZ77 compression, you'll need to decompress such files using a special tool.
You can do that with CrystalTile, but I won't be using that, because sometimes CrystalTile fails to (de)compress files. I'll just use BatchLZ77 here.

But now, we are going to take out the file of the ROM file. We are going to export it... right click the file, and click "Export".

Choose where you want to save the file, and click "Save".​

exp1s5.png

Now we are going to BatchLZ77... Just what I said earlier, the file is compressed, we need to decompress it.

Click "File -> Decompress Files...", go to the folder where you just saved you .carc file, and select it.
When it's done, a window will appear saying you're file has been decompressed succesfully, that should be really quick.

exp1s6.png

So now, you have two files... "Logo.carc" and "Logo.carc.decompressed".
You could say that "Logo.carc" has been decompressed to a narc file now.​

exp1s1.png

Now we're going back to CrystalTile.
Hit the folder button, and open up your decompressed .carc file (so "Logo.carc.decompressed").​

exp1s7.png

A new list should appear. If not, press the F2 button, or go to "Tools -> Sub-file Sort...".​

exp1s8.png

You'll see nine files in total, but actually, these are just three graphics.
You have three extensions here, .NSCR, .NCGR, and .NCLR.

All these .NSCR files are 'Map files', they will put the image on the right place in game.
Sometimes, you have a puzzle instead of a complete picture (if you open it with CrystalTile).
But once you open the graphic alongside the .NSCR file, you will see that the pieces will form a complete picture.
However, you cannot edit a graphic alongside an .NSCR file.
If you do, it will be messed up in-game, or the game will crash. Be careful about that.

The .NCGR files are 'Graphic files', they contain the 'picture' of a graphic.
Once you open it alone in CrystalTile, you will notice that the colors are messed up...

That's why we also have .NCLR files, these are the pallete files. It will assign a picture its right colors.
When you opened a graphic file, alongside a pallete file, you can just edit it normaly.
It won't crash if you would modify it in this way.​

exp1s9.png

Click the button marked above, the tiled mountain, and change the 'scale' value under the
'Tile property' tab from 400 to 100 (400% picture size to 100% picture size).

Now, you have to select the logo_R_Nintendo_m.NCGR graphic file (don't double click it), and then press the space bar
(or right click the file and select "Retrieve Tile adress"), (if you double click the file, the image is messed up).
You have to do the same with the palette file (logo_R_Nintendo_m.NCLR), click it once, and press the space bar.
Now you will see the 'Nintendo' logo correctly.​

exp1s11.png

Right click the logo that just appeared, and click copy. Now you can paste it in programs like Paint or Photoshop.
You can make your own, custom logo now.

Make sure that you only edit the 'black' part and not the 'blue' part, and only use white characters.
Copy your modified logo in Paint, Photoshop or any other tool, and go to the next step.​

exp1s12.png

Right click the logo in CrystalTile, and click 'Paste' (the same way as you copied the file).

Now you can move it around, which we're not gonna do here, just double click the logo, so it will be pasted.​

exp1s14.png

Go to "File -> Save" or use the Ctrl + S shortcut to save the file. Or go to "File -> Save As" if you also want to keep the original.
You can close the logo window in CrystalTile after you saved it.

exp1s13.png

Now we're gonna recompress the file using BatchLZ77. Choose "File -> Compress Files...".​
exp1s16.png

Select the modified file you just saved.
The program will create a new file, and its extension will be '.compressed'.
This is your modified file in .carc-form, as you probably already figured out.
exp1s15.2.png

In CrystalTile, we're going back to our Mario Kart DS ROM window.
Right click the data/Scene/Logo.carc file again, and press "Import".​

exp1s17.png

Select your "Logo.carc.decompressed" file, and CrystalTile will replace the original file with your modified file.
The extension doesn't matter, as long as it remains a graphic file.

exp1s18.png

Finally, we're going to save the modified Nintendo DS ROM.​

exp1sRes.png

If you followed all the steps correctly, the Nintendo logo has been replaced with your
own, like the one above! The font I used here is called 'Pretendo'.​

Example 2: Changing Palette Files
[GEX2]
In this example, we're not only going to change the graphic file, but also the palette file. The tools I will use for this example are CrystalTile, BatchLZ77, Paint.NET and ConsoleTool. It is important that you don't use Microsoft Paint for this, just use Paint.NET (free), Photoshop (shareware, but very useful), or another program. Before you're going to read this example, make sure you read the first one to make things more clearly.

This time we're going to change the Title Screen of Mario Kart DS (the Top Screen only).

Open your Mario Kart DS ROM file with CrystalTile.

Scroll down, and export the data/Scene/Title_us.carc.

Decompress the exported file with BatchLZ77.

Open the decompressed file with CrystalTile.

Right click/Retrieve Tile file for the Title_m_b.NCGR and Right click/Load Palette for the Title_m_b.NCLR file.

Right click the Title_m_b.NCLR palette file, click 'Export', and save it to some folder.

Copy the graphic that just showed up correctly, and paste it in you graphic editor.

After you edited the graphic, you have to make sure your image is in 8 bit pixel mode:

Using Adobe Photoshop
Go to 'Image/Mode/Indexed color...', and use the following settings:
Palette: Local (Perceptual)
Colors: 256
Forced: None
Transparency: Unchecked
Dither: Diffusion
Amount: 75%
Preserve Exact Colors: Unchecked
Click 'OK'.

Using Paint.NET
Click 'Save as', and select BMP and 8 Bit, save it, and open the .BMP file.

Now we have to save the palette to a file:

Using Photoshop
Go to 'Image/Color Table...', and select the 'Save...' button (use the .act extension).

Using Paint.NET
This isn't possible with Paint.NET, you will have to find a tool which creates a .act palette file.
You can use the palette editor here, for example. Open the .bmp file using 'Load Palette', and export the .act file using 'Save Palette'.
Now you'll have to open the created .act file in ConsoleTool, after you opened it, also open the .NCLR file you extracted with CrystalTile.

Compare the two files; make sure that your .act files has the same amount of colors. Delete the last color if it has more colors that the .NCLR file. Make sure the first color is the same as the one in the .NCLR file, this color will set the transparency.

Save the .act file as a .NCLR in ConsoleTool using 'File/Export'.

Replace the old .NCLR file in your ROM(Title_m_b.NCLR) with CrystalTile with the newly created .NCLR file by ConsoleTool.

Load the palette using CrystalTile, right click the Title_m_b.NCLR file and select Palette Load.

Now the colors will be messed up, this is okay, because now you have to copy the edited graphic file from you graphic editor, and paste it.

Click 'Save', and close the two windows of the .carc file (not the two of your .nds file).

Compress the 'Title_us.narc.decompressed' file with BatchLZ77, so the file 'Title_us.narc.decompressed.compressed' will be created.

Replace the old Title_us.carc in your ROM with the 'Title_us.narc.decompressed.compressed' file using CrystalTile (remember: Right Click/Import').

Save your ROM file, and test it!

proof.png




hacking%20sounds%20and%20music.png


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.

Example 1: Inserting Your Own Custom Music
[MEX1]
In this example I will use FL Studio (you can use the demo version), a hex editor (I'll use HxD here), midi2sseq, VGMTrans, CrystalTile and a midi file. Here, I will explain you how to replace the Olympus Coliseum battle music from Kingdom Hearts Re: Coded with your own battle theme.

First, we are going to extract the sound_data.sdat file out of Kingdom Hearts Re: Coded using CrystalTile. So open CrystalTile, and scroll down 'till you see "sd/sound_data.sdat".

Right click the file and select "Export", and save the file to any location.

Open VGMTrans, and drag and drop the sound_data.sdat file you just extracted to the program window.
VGMTrans will read the file, just be patient until the list containing the music shows up.

We need to extract the Olympus Coliseum battle theme, which is the file named "Herc_B". Select the file so three
files will appear at the left side.

You see those three files? The first file is the SSEQ file, the sound sequence.
These files are like .midi files, but especially made for the Nintendo DS. The second file is the SBNK file, the Sound Bank.
You can compare these with soundfonts, they assign the instruments of an SSEQ file a realistic, not midi-ish sound. Like you hear them in-game.
The third file is the SWAR file, the Sound Wave Archive. It contains a collection of SWAV files (Sound samples/Sound Waves), which are like .wav files.

We only have to extract the SBNK, as a .DLS, so right click the second file, and select "Convert to DLS".

Now you'll have to open your .midi file using FL Studio.

There should be a small window in FL Studio, named Fruity LSD. Click the grey folder button on the left top, and select the .DLS file you just extracted.

Now you'll have to replace each MIDI channel. Right click every MIDI channel, hover replace, and click 'MIDI out'. Now you will be able to change the instruments, so that they will be heard correctly in-game. You can only have 14 channels for every song you want to put into a Nintendo DS game. The file size can also not exceed the original, if this happens, you'll have to reduce the MIDI channels, delete some notes, or reduce the song length.

Export the file as a MIDI using "File/Export/MIDI File" when you're done with editing. Do not close FL Studio yet!

Open your hex editor, and open the MIDI file you just saved.

We are going to change the tempo by changing one byte. This step is really necessary. Press ctrl + F, enter "60", and set the "Data type" option to "Hex". It should find a byte very early in the file.

Change that byte to C0, so change "60" to "C0", press ctrl + S to save your file.

Now you'll have to open the MIDI file again, the one you did just change, using FL Studio.

You'll notice the tempo is twice as fast, this is just what we want. So export it as a MIDI, again.

Open the file, you just saved using the hex editor.

Press ctrl + F again, and search for that "60" byte again… Make sure the "Data Type" option is set to "Hex".

Overwrite the byte with "30", so "60" becomes "30".

Save the file. The song should sound normal now, its tempo should be recovered.

Open the folder where your latest created .midi file is located, and make sure midi2sseq is in the same folder.

Drag and drop the .midi file to the midi2sseq executable.

It will create a new .sseq, it should have the same file name as the .midi.

Unfortunately, midi2sseq isn't perfect. So we have to edit the newly generated .sseq with a hex editor.

Press ctrl + F, enter "FF C0". Again, make sure you're searching for hex data types.

Change the C0 value to C7, and ADD (not replace) a 00 byte.

My midi file has 12 channels, that means there are twelve "FF C0"s in my SSEQ.
If you got 6 channels for examples you'll have 6 "FF C0"s. You'll have to edit them, so just repeat the previous two steps, until you have edited them all.

Save your file, and open CrystalTile.

Open the sound_data.sdat you created at the beginning of this example.

Locate the "Sequences13-Herc_B.SSEQ" file in the window that just appeared.

Right click it and import the .SSEQ you made using midi2sseq. Again, you cannot exceed the file size, otherwise an error will appear.

Click the save button at the top bar.

Extract you Nintendo DS ROM using a ROM Extractor.

Go to the "sd" folder, and replace the sound_data.sdat file with the new one.

Rebuild your ROM, and test it.

Optionally, you can make your music loop. To do this, look at this tutorial. Unfortunately, I haven't really figured out to make it work, so
you'll need to do this on your own. VGMTrans can sort out all the bytes for you, I recommend it if you want to use that tutorial.



hacking%20levels.png


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.



hacking%20text.png


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 do text hacking yourself.



hacking%20tools.png


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; 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 Dirbaio and Pirahnaplant | Official Forums
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.


Changelog:
05/03/12: Initial Release.
11/11/12: The layout has been fixed and is now compatible with the new forum software!
11/17/12: Got rid of the spoiler tags, the layout is still being worked on.​


Use EFE instand for MKDSCM.
 

hama364

Well-Known Member
Newcomer
Joined
Sep 18, 2014
Messages
45
Trophies
0
Age
54
XP
335
Country
Singapore
Haven't read the whole thread yet... But It starts with the download links for the progs used... Which are defunct now... Is the SW still available somewhere...?
Thanks.
 

Site & Scene News

Popular threads in this forum

General chit-chat
Help Users
  • No one is chatting at the moment.
    K3Nv2 @ K3Nv2: Sorry for accidentally bending over