GBATemp ROM hacking documentation project (new 2016 edition out)

Edit December 2019.
Reuploaded to GBAtemp's new download section.
https://gbatemp.net/download/gba-and-ds-rom-hacking-guide.33419/

mirror
http://trastindustries.com/randomfiles/romhacking2016_copy_1.pdf

I am aiming to sit down and get some more done and updated in the near future but for now it will remain the 2016 version.

Edit January 2016.
A new PDF, mainly to head off the possible demise of google code and fix a few links. Not many changes but I have tweaked some of the formatting and general tidied things up a bit more.
http://filetrip.net/nds-downloads/u...-rom-hacking-guide-2016-preview-1-f33419.html
Contents below, numbers may be slightly off as they come from a slightly revised edition but titles are all the same.

Edit August 2014. A new PDF that has been edited a bit and has the new domain for GBAtek/no$gba is available. It is pretty similar to the 2012 version in terms of what it has inside it, it is slightly more edited and has working links to gbatek in it.
http://filetrip.net/nds-downloads/u...-rom-hacking-guide-2014-preview-1-f32908.html

Contents
I
II
1
Introduction
12
ROM hacking concepts
15
Basics
1.1
1.2
1.3
1.4
15
Hexadecimal
. . . . . . . . . . . . . . . . . . . . . . . . . . . . .
Representation 1.1.2 BCD (Binary coded decimal) 1.1.3 Big and little endian . . . . . . . . . . . . . . . . . . . . . 19
1.1.4 Signed values, oating point and xed point . . . . . . . . 19
Hex operations
. . . . . . . . . . . . . . . . . . . . . . . .
15
1.1.1
. . . . . . . . . . . . . . . .
. . . . . . . . . . . . . . . . . . . . . . . . . . . .
17
18
24
1.2.1 Shift . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 24
1.2.2 Rotate . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 25
1.2.3 Flip . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 25
1.2.4 Boolean logic . . . . . . . . . . . . . . . . . . . . . . . . . 26
1.2.5 Hex Mathematics.
. . . . . . . . . . . . . . . . . . . . . .
Patching and patch making
. . . . . . . . . . . . . . . . . . . . .
27
28
File systems and operations . . . . . . . . . . . . . . . . . . . . . 30
1.4.1 Non lesystem devices . . . . . . . . . . . . . . . . . . . . 30
1.4.2 GBA . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 30
1.4.3 DS . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 31
1.4.4 3DS . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 32
1.4.5 GC (gamecube) . . . . . . . . . . . . . . . . . . . . . . . . 32
1.4.6 Wii 32
1.4.7 Xbox . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 33
1.4.8 Xbox 360 33
1.4.9 PS1 and PS2
1.4.10 PS3
. . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
. . . . . . . . . . . . . . . . . . . . . . . . . . .
. . . . . . . . . . . . . . . . . . . . . . . . . 34
. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 35
1.4.11 PSP . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 35
1.4.12 Saturn . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 35
1.4.13 Dreamcast . . . . . . . . . . . . . . . . . . . . . . . . . . . 35
1.4.14 Amiga . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 36
1.4.15 PC and related hardware. . . . . . . . . . . . . . . . . . . 36
1.5 Finding the object of your interest. . . . . . . . . . . . . . . . . . 36
1.6 Abstraction . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 38
1.7 Tools of the trade continued . . . . . . . . . . . . . . . . . . . . . 39
1.7.1 Hex editor . . . . . . . . . . . . . . . . . . . . . . . . . . . 39
1.7.2 Tile editor . . . . . . . . . . . . . . . . . . . . . . . . . . . 52
1.7.3 Spreadsheet and command line . . . . . . . . . . . . . . . 55
1.7.4 Compression 57
1.7.5 Music . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 58
1.7.6 ASM/Assembly . . . . . . . . . . . . . . . . . . . . . . . . 59
1.8
. . . . . . . . . . . . . . . . . . . . . . . . .
Basic le format concepts
. . . . . . . . . . . . . . . . . . . . . .
5
632
Graphics
2.1
Aliasing . . . . . . . . . . . . . . . . . . . . . . . . . . . .
2.0.2 Haloing
2.0.3 Bit depth
2.3
2.4
. . . . . . . . . . . . . . . . . . . . . . . . . . . .
. . . . . . . . . . . . . . . . . . . . . . . . . . .
Palettes and colours
2.1.1
2.2
65
2.0.1
66
66
67
. . . . . . . . . . . . . . . . . . . . . . . . . 67
GBA colours (15 bit) . . . . . . . . . . . . . . . . . . . . . 67
Tiles . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 68
2.2.1 1Bpp . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 68
2.2.2 4 Bpp 68
2.2.3 8Bpp . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 69
2.2.4 GBA3 Xbpp . . . . . . . . . . . . . . . . . . . . . . . . . 70
2.2.5 GBA2 4BPP . . . . . . . . . . . . . . . . . . . . . . . . . 71
2.2.6 Bitmap . . . . . . . . . . . . . . . . . . . . . . . . . . . . 73
2.2.7 Known formats . . . . . . . . . . . . . . . . . . . . . . . . 73
2.2.8 Crystaltile2 export and import. . . . . . . . . . . . . . . . 73
2.2.9 Avoiding gradients, AA, lossy compression, noise and such
. . . . . . . . . . . . . . . . . . . . . . . . . . . . .
things. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 77
Layout, timing, OAM and special eects . . . . . . . . . . . . . . 78
2.3.1 Introduction to the OAM and BG modes. . . . . . . . . . 78
2.3.2 Timing 2.3.3 GBA and DS OAM (sprites) . . . . . . . . . . . . . . . . 79
2.3.4 GBA and DS BG modes . . . . . . . . . . . . . . . . . . . 82
2.3.5 Basic animation . . . . . . . . . . . . . . . . . . . . . . . 86
2.3.6 Window feature . . . . . . . . . . . . . . . . . . . . . . . . 91
2.3.7 Special features (ipping, ane transformation, alpha and
. . . . . . . . . . . . . . . . . . . . . . . . . . . .
79
such) . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 91
2.3.8 Basic DS layout formats and mapping . . . . . . . . . . . 93
2.3.9 Video memory handling and alignment . . . . . . . . . . . 96
3d
. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
97
2.4.1 Basic 3d (bones, coordinates, keyframes) . . . . . . . . . .
98
2.4.2 Viewpoints
2.4.3 Textures and material colours . . . . . . . . . . . . . . . . 100
2.4.4 Models
2.4.5 Lighting/shadows
2.4.6 3d smoke and fog . . . . . . . . . . . . . . . . . . . . . . . 103
2.4.7 Animations . . . . . . . . . . . . . . . . . . . . . . . . . . 104
2.4.8 DS 3D hardware
2.4.9 The shift of the 3D to DS 2d
. . . . . . . . . . . . . . . . . . . . . . . . . . 100
. . . . . . . . . . . . . . . . . . . . . . . . . . . . 101
. . . . . . . . . . . . . . . . . . . . . . 102
. . . . . . . . . . . . . . . . . . . . . . . 105
. . . . . . . . . . . . . . . . 107
2.4.10 NSBMD . . . . . . . . . . . . . . . . . . . . . . . . . . . . 107
2.4.11 Non NSBMD . . . . . . . . . . . . . . . . . . . . . . . . . 117
2.5
3
Notes and further reading . . . . . . . . . . . . . . . . . . . . . . 118
Text
3.1
119
Tables . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 119
3.1.1 Relative searching
3.1.2 Corruption and alteration . . . . . . . . . . . . . . . . . . 127
. . . . . . . . . . . . . . . . . . . . . . 121
3.1.3 Memory viewing and corruption
3.1.4 Frequency analysis . . . . . . . . . . . . . . . . . . . . . . 131
3.1.5 Language analysis
3.1.6 Pointer and encoding/hex analysis
. . . . . . . . . . . . . . 130
. . . . . . . . . . . . . . . . . . . . . . 133
6
. . . . . . . . . . . . . 1343.1.7 Assembly tracing . . . . . . . . . . . . . . . . . . . . . . . 134
3.1.8 Font viewing
3.1.9 Language comparing . . . . . . . . . . . . . . . . . . . . . 135
. . . . . . . . . . . . . . . . . . . . . . . . . 134
3.1.10 Table creation tools
3.2
3.3
3.2.1 Special cases and non pointer concepts . . . . . . . . . . . 139
3.2.2 Example reverse engineering of pointers
Markup, control codes and placeholders
3.3.1
3.4
3.5
Worked example
3.4.1 NFTR . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 150
3.4.2 Common hacks . . . . . . . . . . . . . . . . . . . . . . . . 156
Scripting and layout
. . . . . . . . . . . . . . . . . . . . . . . . . 160
Layout and limits . . . . . . . . . . . . . . . . . . . . . . . 168
Text extraction and insertion
Text extraction . . . . . . . . . . . . . . . . . . . . . . . . 170
3.6.2 Text insertion . . . . . . . . . . . . . . . . . . . . . . . . . 172
Language detection in DS games
3.8 Translation hacking
. . . . . . . . . . . . . . . . . . 174
. . . . . . . . . . . . . . . . . . . . . . . . . 174
3.8.1 The types of Japanese characters and how they work -
3.8.2 Japanese glyphs/characters and observations on the lan-
On language
3.8.4 Right to left languages and translation.
. . . . . . . . . . . . . . . . . . . . . . . . . 180
. . . . . . . . . . 180
Japanese text editors and translation tools . . . . . . . . . . . . . 181
3.9.1 General Japanese capable text editors
3.9.2 ROM hacking tools . . . . . . . . . . . . . . . . . . . . . . 182
3.9.3 CAT tools . . . . . . . . . . . . . . . . . . . . . . . . . . . 182
Sound
. . . . . . . . . . . 181
184
. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 184
4.1.1 SDAT (NDS) . . . . . . . . . . . . . . . . . . . . . . . . . 188
4.1.2 Others . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 195
4.1.3 Tracker formats . . . . . . . . . . . . . . . . . . . . . . . . 197
4.1.4 General rule of thumb for custom audio formats
4.1.5 Common DS SDAT audio hacks (undubbing, injection,
tweaks and relinking)
4.1.6
4.2
4.3
GBA audio
Video
. . . . . 197
. . . . . . . . . . . . . . . . . . . . 197
. . . . . . . . . . . . . . . . . . . . . . . . . . 216
. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 220
4.2.1 General video theory . . . . . . . . . . . . . . . . . . . . . 221
4.2.2 Mods/VX/act imagine by Mobiclip.
4.2.3 RAD/Bink
4.2.4 Criware
. . . . . . . . . . . . 222
. . . . . . . . . . . . . . . . . . . . . . . . . . 222
. . . . . . . . . . . . . . . . . . . . . . . . . . . . 223
Cut scenes . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 223
Game logic
5.1
. 176
. . . . . . . . . . . . . . . . . . . . . . . . . . . . . 178
3.8.3
Multimedia
4.1
5
. . . . . . . . . . . . . . . . . . . . 169
3.6.1
guage
4
. . . . . . . . . . . . . . . . . . . . . . . 144
3.7
3.9
. . . . . . . . . . 140
. . . . . . . . . . . . . . 144
Fonts . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 149
3.5.1
3.6
. . . . . . . . . . . . . . . . . . . . . 135
Pointers . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 138
Levels and Stats
224
. . . . . . . . . . . . . . . . . . . . . . . . . . . 224
5.1.1 Example tools
5.1.2 Level editing techniques . . . . . . . . . . . . . . . . . . . 227
. . . . . . . . . . . . . . . . . . . . . . . . 226
5.1.3 Stats . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 237
75.1.4
5.2
5.3
5.4
RPG randomiser . . . . . . . . . . . . . . . . . . . . . . . 238
Compression . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 238
5.2.1 Lossy . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 239
5.2.2 Lossless
5.2.3 Basic theory of the actual implementations
5.2.4 Compression at hexadecimal level . . . . . . . . . . . . . . 246
. . . . . . . . . . . . . . . . . . . . . . . . . . . . 239
Cheating . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 248
5.3.1 General cheat making
5.3.2 GBA cheat making . . . . . . . . . . . . . . . . . . . . . . 251
5.3.3 DS cheat making . . . . . . . . . . . . . . . . . . . . . . . 253
5.3.4 Basic making of a cheat
5.3.5 Cheat prevention methods and frustrations
5.3.6 Instruction editing cheating . . . . . . . . . . . . . . . . . 264
. . . . . . . . . . . . . . . . . . . . 249
. . . . . . . . . . . . . . . . . . . 256
Functions and procedural programming. Also return ori-
ented programming/ROP
5.6
. . . . . . . . 260
Programming concepts . . . . . . . . . . . . . . . . . . . . . . . . 267
5.4.1
5.5
. . . . . . . . 240
. . . . . . . . . . . . . . . . . . 267
5.4.2 IF ELSE . . . . . . . . . . . . . . . . . . . . . . . . . . . . 268
5.4.3 Recursion . . . . . . . . . . . . . . . . . . . . . . . . . . . 268
5.4.4 Iteration . . . . . . . . . . . . . . . . . . . . . . . . . . . . 269
5.4.5 Loops
5.4.6 Turing complete
5.4.7 Fundamentals of Assembly
Assembly
. . . . . . . . . . . . . . . . . . . . . . . . . . . . . 269
. . . . . . . . . . . . . . . . . . . . . . . 269
. . . . . . . . . . . . . . . . . 270
. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 273
5.5.1 ARM
5.5.2 GBA Assembly specics . . . . . . . . . . . . . . . . . . . 275
. . . . . . . . . . . . . . . . . . . . . . . . . . . . . 274
5.5.3 DS Assembly specics
5.5.4 The GBA and DS compared
5.5.5 On controls . . . . . . . . . . . . . . . . . . . . . . . . . . 285
5.5.6 Hooking . . . . . . . . . . . . . . . . . . . . . . . . . . . . 286
5.5.7 GBA cart as extra memory for DS hacks . . . . . . . . . . 287
. . . . . . . . . . . . . . . . . . . . 279
. . . . . . . . . . . . . . . . 284
Non specic assembly discussion. . . . . . . . . . . . . . . . . . . 287
5.6.1 Language mod example
5.6.2 Non code in ASM
. . . . . . . . . . . . . . . . . . . 287
5.6.3 Destructive vs non destructive assembly editing . . . . . . 291
5.6.4 Polymorphic and dynamic code . . . . . . . . . . . . . . . 292
5.6.5 Slowdown and speedup
5.6.6 Cryptography (encryption, checksums and signatures)
5.6.7 Multiplayer and the failure of Nintendo's online DS security.301
5.6.8 Save editing . . . . . . . . . . . . . . . . . . . . . . . . . . 301
5.6.9 Interpreted languages
. . . . . . . . . . . . . . . . . . . . . . 290
. . . . . . . . . . . . . . . . . . . 294
. . 295
. . . . . . . . . . . . . . . . . . . . 303
5.6.10 Game AI, game logic and game theory . . . . . . . . . . . 303
5.7
5.8
III
6
Flash cart and emulator theory . . . . . . . . . . . . . . . . . . . 307
5.7.1 GBA . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 309
5.7.2 DS . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 311
ROM hacking protection . . . . . . . . . . . . . . . . . . . . . . 313
Examples, oddities and techniques.
Crystaltile2 general usage guide
8
315
3157
GBA tracing
7.0.1
8
DS tracing
8.1
9
320
Worked examples . . . . . . . . . . . . . . . . . . . . . . . 321
321
Cart read command
. . . . . . . . . . . . . . . . . . . . . . . . . 322
8.1.1 Basic lookup and methods for it
8.1.2 Header reverse engineering/generated values . . . . . . . . 322
. . . . . . . . . . . . . . 322
Reverse engineering various ROM images
9.1
322
Large archive on top of lesystem . . . . . . . . . . . . . . . . . . 323
9.1.1 Tony Hawk
9.1.2 Star Wars - The Force Unleashed . . . . . . . . . . . . . . 323
. . . . . . . . . . . . . . . . . . . . . . . . . . 323
9.1.3 El Tigre Make my mule
. . . . . . . . . . . . . . . . . . . 323
9.2 Compression
9.3 First Person Game . . . . . . . . . . . . . . . . . . . . . . . . . . 324
9.4 Platformer . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 324
9.5 Fighting games . . . . . . . . . . . . . . . . . . . . . . . . . . . . 324
9.6 Role playing games . . . . . . . . . . . . . . . . . . . . . . . . . . 324
9.7 Racing games . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 325
9.8
9.9
. . . . . . . . . . . . . . . . . . . . . . . . . . . . . 323
Puzzle . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 325
9.8.1 Mahjong game
9.8.2 Tetris . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 326
. . . . . . . . . . . . . . . . . . . . . . . . 326
Other genres . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 326
10 Developer leftovers 326
11 Workarounds 327
12 Moving to a new system 327
13 Developer tricks aka thinking like a game developer 328
13.0.1 Level and mechanism design . . . . . . . . . . . . . . . . . 328
13.0.2 Sprite and palette reuses . . . . . . . . . . . . . . . . . . . 329
13.0.3 Pre rendering . . . . . . . . . . . . . . . . . . . . . . . . . 330
13.0.4 Speed blur and fog . . . . . . . . . . . . . . . . . . . . . . 330
13.0.5 Loading covers
. . . . . . . . . . . . . . . . . . . . . . . . 330
13.0.6 Optimisation of loading
. . . . . . . . . . . . . . . . . . . 330
13.0.7 3d imagery in general . . . . . . . . . . . . . . . . . . . . 331
13.0.8 Procedural generation . . . . . . . . . . . . . . . . . . . . 332
13.0.9 Noise on images and sound.
. . . . . . . . . . . . . . . . 332
13.0.10 Using the limits of the system/working to them . . . . . . 332
13.0.11 Network coding . . . . . . . . . . . . . . . . . . . . . . . . 333
14 Game design and media
333
15 Python, batch les and programming for ROM hacking
15.1 radare2 reverse engineering tools
15.2 Programming languages
15.3 Python
334
. . . . . . . . . . . . . . . . . . 334
. . . . . . . . . . . . . . . . . . . . . . . 334
. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 335
916 PC program hacking
335
16.1 Debugging . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 336
16.2 Decompilation
. . . . . . . . . . . . . . . . . . . . . . . . . . . . 337
17 Version control and project management.
17.1 Project and team management
17.2 Version control
338
. . . . . . . . . . . . . . . . . . . 338
. . . . . . . . . . . . . . . . . . . . . . . . . . . . 339
18 Interesting links and further reading.
340
18.1 Links . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 340
18.2 Further reading . . . . . . . . . . . . . . . . . . . . . . . . . . . . 341
IV File formats (specications, methods and known
formats).
342
19 General things about the DS 342
20 Generic DS nitro SDK format 342
21 General le reverse engineering 342
21.1 Headers
. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 343
21.2 File sizes . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 343
21.3 Multiple versions of the game . . . . . . . . . . . . . . . . . . . . 343
21.4 File names and extensions . . . . . . . . . . . . . . . . . . . . . . 343
21.5 Tile viewers . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 343
21.6 Pointers and such . . . . . . . . . . . . . . . . . . . . . . . . . . . 344
22 Sound
344
22.1 SDAT . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 344
22.2 SSEQ . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 344
22.3 STRM . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 344
22.4 SWAR . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 345
22.5 SWAR . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 345
22.6 BANK . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 346
22.7 Other formats . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 346
23 Graphics
347
23.1 NCER . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 347
23.2 NANR . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 347
23.3 NCGR . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 348
23.4 NSCR
. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 348
23.5 NMCR . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 348
23.6 NFTR . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 348
23.7 NSBMD . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 349
23.8 NSBTX . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 349
23.9 NSBCA . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 350
24 Packing format
350
24.1 NARC, ARC and CARC . . . . . . . . . . . . . . . . . . . . . . . 350
1025 Text
350
25.1 BMG . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 350
V
Glossary, index and such
26 Glossary
352
352
Feel free to discuss it or make suggestions/corrections in this thread.

Intro:
This is a holder page for GBAtemp/FAST6191's ROM hacking documentation. It is mainly focused on the GBA and DS though other consoles are looked at and most of what is said applies to all consoles or can be easily adapted.
It has taken many forms over the years with the most advanced one at present being the one linked above this intro. The following thread still has good info but it is considered completely eclipsed by the PDF versions linked above.

For those who are concerned about license issues share links, excerpts, copy and paste things to other sites/forums/newsgroups as this is mainly about getting some information out there, link back if you want but it is not required to do so. Basically feel free to include this document in whole or in part, original or altered in any format (odt, doc, html, PDF, chm....). If you want to contact me so I can try to remember to tell you if something gets updated then by all means go ahead.

The rest of the post covers more detailed stuff but the average DS ROM hacking toolkit consists of five things

A hex editor - able to view and edit any file although it is often pointless to try massive edits using one.
http://gbatemp.net/topic/326873-rom-hacking-hex-editors-mid-2012-discussion/ has some discussion and links
http://sourceforge.net/projects/hexplorer/ is the best general purpose editor with featured desirable to use in ROM hacking you can get for free (you will need to configure it quite a bit as the stock/initial setup leaves a bit to be desired) although do read the link as it contains more information. Most hackers will have several aimed at various tasks though.

A tile editor- http://filetrip.net/f23649-CrystalTile2-2010-09-06.html has one of the best, if not the best, general purpose tile editors for the GBA and DS. Crystaltile2 is also a self contained ROM hacking toolkit with loads of nice features (usage later in the guide).

A spreadsheet with hex capabilities. Always nice to have some data in a form that can be easily read, fiddled with and manipulated.
http://www.libreoffice.org/download/ if you need one.

Something to pull apart DS roms Crystaltile2, ndstool, ndsts, nitroexplorer, tinke and more. Covered later in this post

Something to handle compression It is commonly used, needs to be decompressed to do any real work with and easily worked around on the DS at least. http://gbatemp.net/topic/313278-nintendo-dsgba-compressors/ and http://code.google.com/p/dsdecmp/ are the leading two DS rom compression tools (GBA support is there as well but Crystaltile2 probably does better there).

There are other little tools like http://gbatemp.net/t105060-nftr-editor (editor for a common font format) and http://www.romhacking.net/utilities/504/ (a tool to convert text into various common formats of hex string) and http://www.propl.nl/random/NSBTXExtractor.zip (a tool to extract textures from the standard 3d model format, straight up viewers are also available in the likes of nsbmdtool and tinke but not as useful as that and tend not to work that well for viewing purposes).

Contents linkfest (not yet complete)

This post
Introduction
How to pull apart your roms
links, links and more links


First steps in hacking

graphics hacking
Multimedia hacking (also SDAT some words on general sound hacking too)
text hacking
core and file format hacking

Other topics

Guide to crystaltile2
Cheats, Assembly, AP and you
Rom ripping and enhancements (backup of very old thread)
Compression
Coding for rom hacking
Advanced techniques not necessarily covered elsewhere
Known file formats and niceties.


Introduction

Back when this project/document was started the GBA was only just starting to be hacked properly, the DS was limited to a very small group of people for anything beyond rudimentary file system hacks, the GC was split across several sites and the Wii was still known as the revolution (and naturally did not figure into these documents).
Today as this paragraph is written [2012 edit]probably could stand to be rewritten again but it is being left[/2012 edit] the GBA release scene is long dead and has several very high profile projects released and in progress, the DS still has many releases (although a successor is nearly upon us and also has some very high profile projects with tens of people in the teams, the GC release scene is long dead but the hacking scene has solidified (and is helped by the success of the wii) and the wii (which can run GC code) still has releases and not only has the file system decrypted but methods by which to run custom code other than homebrew built from the ground up.
On all those consoles simple graphical tools (or even game specific tools/info) do not really exist at this time for all but a handful of games on all the consoles; these games usually include pokemon, fire emblem, advance wars, mario platform games, mario kart, smash brothers and many other first party Nintendo or otherwise popular games games. Given the nature of ROM hacking this is not likely to change or ever cover more than the basics although a lot can be done with a few tools and a little bit of knowledge, this is especially true of sound hacking which was long considered one of the hardest areas of ROM hacking.
The rather technical nature of ROM hacking coupled with the tendency towards high level coding being taught elsewhere as well as the somewhat legally and ethically dubious nature of it makes people wanting to take up this fascinating subject can face a steep learning curve.
This guide aims to help people come in “cold” (you know little of computers but have a desire to learn) as well as “retrain” (you can already code but this hacking thing is something relatively new) and although it is not explicitly aimed at such people it should hopefully be of some use for those already versed in ROM hacking to use as a reference manual. This relatively broad range of targets means some areas will repeat things, other times things which have not be detailed extensively yet will be referred to. To some extent this is unavoidable but the guide should allow you to skip backwards and forwards.
The original reasons for writing this was that if you visit any sites with a focus on ROM hacking you will generally get told to learn to hack nes/SNES/Megadrive (Genesis to those in the US)/Master System ROMs and then move on to “harder” systems like the GBA/DS/GC and Wii. Should you ask specifically how to hack GBA/DS/GC/Wii you will be told to look at the general/NES/SNES documents to learn as it applies to “harder”/newer systems.
Doing such things would not be following a bad line of logic but a guide geared exactly towards what you want can help and the later consoles also avoid some of the annoyances with earlier consoles; memory/space limits are less harsh if they exist at all, the hardware has relatively few quirks and there is quite a bit of conformity between titles.
License stuff:


Thankyous. Rather than place them at the tail end of the document the people directly responsible are featured here.
Thanks from FAST6191 to:
People at gbatemp.net and sosuke.com, original hosts of this and extremely active discussion boards on GBA, DS, GC and Wii hacking.
Romhacking.net the people there have helped more than they probably know with this.
Deufeufeu, rom hacker, spec writer and sounding board for a lot this.
Martin Korth, author of no$gba and the awesome technical document on the GBA and DS (there would not be this document without it).
All team members of the original and forked Jump Ultimate Stars translation project.
Cracker, author of DSATM and countless other cheat tools, guides and codes for all manner of systems as well as discussion on this.
Slade, cheats guides, cheats and discussion.
Anyone I have ever had a discussion with on ROM hacking.
All regulars of #gbatemp.net on irc2.gbatemp.net::5190 and all regulars of #ezflash on irchighway.
Any and all authors of tools/guides/posts that have been linked.


So first what is ROM hacking.
It is the name given to the action of changing a rom (or despite the misnomer iso) in some way that is useful to someone else. This can include translation, improvement (better font, better handling of text, more balanced stats), restoration (sound, themes and working around censorship mainly) and a myriad of other things.

What can be done? Absolutely anything. The trouble comes in the difficulty in pulling it off, there are no hard and fast rules as to what is more difficult but generally changing text and graphics is easier than changing a racing game into an RPG.

What do I need to know/have done to become one? This one is a bit harder, I personally have never been officially taught anything about computers at any level much beyond "if you happen to be typing all in capitals press the caps lock key".
Generally I find people who have a great interest in figuring out how things work and being in possession of a bit of patience make for good ROM hackers.
Some advocate experience and while it is useful I believe the following analogy concerning normal human language serves a good example:
How many people might you have met who have been speaking/writing a language for 50 years yet what they speak/write is awful with regard to what the language actually is? Experience is not all powerful.
Likewise how many of you have met foreigners speaking your language who probably possess a greater knowledge of the the implementations of irregular verbs and are far more able to communicate (even if it is their own language) what a pronoun is than you might be able to, yet due to them only knowing 70 odd words they might as well not have bothered? Technical knowledge is not all powerful.
On the subject of language English is probably the most commonly used language for this sort of thing (technical discussion) so it is probably best to become acquainted with it.

Some thoughts though, I personally study how computers work from the ground up and how the specific platform I am hacking a game for works and go from there. Others find it better to know what you want and then go a step higher in the abstraction which works quite well too.
Modern consoles (the GBA, DS, GC and Wii all count here) however do not tend to use assembly coding (just quickly assembly is the type of coding that revolves around changing the hardware manually, it is only different to altering the raw data the game uses by abstracting it to a more human readable form) as much owing to it be far more complex than it may need to be for not a lot of/any real gain. To this end the console makers should provide extensive software development kits to developers and this means games often share features (and more importantly formats) and this can be abused by ROM hackers.
However the mere fact ROM hacking exists should say that someone can do something better (or in a manner perceived to be better) than someone else. This means that purely relying on SDK based hacking can fall flat on occasions developers decide to change or write additions (or even badly implement) the SDK, the format was not correctly reverse engineered (if you pulled apart a format and later another game uses a feature the original sample file did not use is a good example of a pitfall of this method) or attempt to obscure their code (normally against cheaters but this does have a knockon effect for ROM hacking).

The main thing about rom hacking though is data representation, storage thereof, limits of the representation/storage and how a game does this. The nice thing about the DS and newer consoles is that they usually use a file system that is known which provides a great jumping off point- file names, extensions, sizes and more often lead you right to the format's doorstep.

How to pull apart your Roms

The following paragraphs detail how to pull roms apart into the files that make them up, generally it is not very useful if you can not flank it with other hacking skills but in many cases simply being able to look at the things that make it up is enough to inspire people to sit through the dry stuff you need to know to be a hacker.
The following will not cover much of the common formats used by the consoles, how to deal with roms that pack things inside archives (a common occurrence) or indeed even mention much about simply swapping/renaming files (a brutally simple but often a very effective hacking method) as that comes later.

GBA
This is only mentioned in passing. Some tools have been made (looking mainly at golden sun and pokemon) for various file types and locations but generally the rom is packed all in one file.
There is however a fairly advanced method called tracing that can find what you need relatively quickly and easily once you know how
http://www.romhacking.net/docs/361/


Nintendo DS extraction tools
The DS uses the nitro rom file system, several tools exist for extracting things from it.
Most hackers then scan the files contained using several methods including by not limited to checking names, checking extensions, checking locations, checking sizes, using techniques like relative searching and many more within so as to hit upon their chosen piece of data to hack.

Owing to the very same niceties that come with a file system tracing does still exist on the DS but it is a comparatively advanced technique and few do it for the DS. You have to follow the DS read protocols and figure out what it directed at what (it is abstracted at several levels too which is nice for rom hackers when it comes to putting things back together) http://nocash.emubase.de/gbatek.htm#dscartridgeprotocol has more on the read protocol.

There are several other tools available but the ones above should be able to sort the file system for most people. Some more considerations are required when it comes to releasing "production grade" patches but that will be covered later.

Many of the early DS hackers figured out some of the basics by pulling apart roms and attempting to shrink them, it was from here that they figured out common formats and ultimately branched out into more general DS hacking. Today with multi gigabyte DS cards and roms rarely being more than 256 megabytes nobody really rips roms but if you wanted to look back over some of the basics they are still available Rom ripping and enhancements (backup of very old thread)

Ndstool- this is the standard go to tool of most DS hackers. It does however have limitations like not being able to rebuild certain games without them crashing.
http://filetrip.net/nds-downloads/utilities/download-nintendo-ds-rom-tool-ndstool-1501-f29352.html

It is a command line only program but there are frontends (both require .net) in two programs called DSLazy and DSBuff. Many hackers have their own batch files/scripts to unpack games.

NDSTS
A nice little graphical program that details lots of information about the DS ROM you feed it. The main limitation is that it only allows files of the same size to be replaced in the rom. It keeps things clean so it means it can be used for example hacks and small hacks that you do not want to change the entire rom for and as such roms edited with this will not crash like they can do for ndstool.
It is available http://www.no-intro.org/tools.htm

Crystaltile2
An all in one hacking tool for the DS that will feature extensively in this guide and romhacking in general (a guide to the program is available Guide to crystaltile2 ). Naturally it features DS file system support.
It is developed sporadically by various Chinese developers but the current version should always appear on filetrip below
http://filetrip.net/f23649-CrystalTile2-2010-09-06.html

Tinke
Another all in one program like crystaltile2 above but with more focus on formats, sound and 3d. Also frequently works where NDStool falls short.
gbatemp thread

Nitro explorer
Aimed at replacing ndstool and being able to work with games NDStool can not.It does what it sets out to do.
filetrip download

Gamecube
Disc based media tend to be file system based and the Gamecube is no exception.
Gamecube games comes as a .gcm files (often renamed to .iso). It is not signed for the GC or the Wii, files are region locked but a there are tools and most chips (GC or wii) should bypass this.
Support for multiple games per disc is done at iso level with several tools able to do it. Size limit is 1.4 gigabytes (miniDVD) for gamecube and DVD size (4.35 gigabytes) for Wii games if making a multiple game disc.
Gctool:
http://filetrip.net/f818-GC-Tool-1-20-beta.html
GCMtool is good for unix like operating systems (X86 and ppc versions exist):
http://filetrip.net/f606-GCMUtility-0-5.html
http://www.sadistech.com/gcmtool/tutorial.php
http://filetrip.net/wii-downloads/tools-utilities/latest-gamecube-iso-tool-f28774.html

There are many other tools for nearly every common OS if these do not suit your needs.

Wii
Comes as a .iso file. Actual data is signed (junk/padding is not hence the exception for “scrubbing” the iso), the decryption key is known and various bugs (see trucha bug in encryption above) allow for data to pass signing checks.
Size limit is DVD9 at 8.7 gigabytes (DVD5 at 4.35 gigabytes is the usual standard). Unknown how far this can be pushed for the USB loaders.
Most hacks allow for region free, USB loading and more.

The main tool for all this is a program called wii scrubber

http://filetrip.net/f4399-Wiiscrubber-Kit-...oader-1-40.html

Also useful Wiimms ISO Tools
http://wit.wiimm.de/

For the wad files (virtual console, wiiware and the like)
Libwiisharp example programs
http://libwiisharp.googlecode.com/files/libWiiSharp 0.21.rar
Older tools like wwPacker can also work but might have issues. It might need to be combined with a u8 compression tool like u8mii (u8tool is now considered somewhat deprecated).


A largely outdated collection of links
I would not be surprised is most of these are dead or otherwise out of date in some manner.

A nice list of various things is also available in http://gbatemp.net/t73394-gbatemp-rom-hack...t&p=1221059 for now at least.
A pokemon hacksite:
new: pokemon editing tools for DS roms by D-Trogh http://gbatemp.net/index.php?showtopic=94499&hl=

http://wah.studiopokemon.com/herramientas/herramientas.php One of the main questions asked is how do I hack pokemon (and to be fair it has a nice engine to start with). This site has tools, info and discussion.
As does this site: http://www.pkmncommunity.com/
and this site:
http://pokeguide.filb.de/programs.php
and this site:
http://www.pipian.com/ierukana/index.html
That will be all on pokemon for now.

Gavins guide to x86 assembly: while the x86 is nowhere to be seen in this it provides a great intro to assembly in general.
contents page
GBATek specifications:
http://nocash.emubase.de/gbatek.htm The document for all things GBA and DS hardware based.
Lowline's format specifications
http://llref.emutalk.net/docs/
older version with more on SDAT
http://www.romhacking.net/documents/469/
Compression:
http://www.ics.uci.edu/~dan/pubs/DataCompression.html Compression is an important part of rom hacking and one frequently assumed to be too hard to deal with for all but the best hackers. This is wrong and that site is a bit academic but combined with some of the other links can get it done.
Wave file format:
http://www.sonicspot.com/guide/wavefiles.html Not quite related to the DS (it does do IMA-adpcm) but a nice intro to specifications for files which if you plan on doing work with the wii, GC and DS you will use very often.

Some gamecube and by extension wii links:
http://wiki.xentax.com/index.php?title=Just_Cause_ARC (the main site also deals with lots of file formats)
http://hitmen.c02.at/files/yagcd/yagcd/index.html
http://www.emutalk.net/showthread.php?t=26919
http://forum.xentax.com/viewtopic.php?t=2105
http://www.hitmen-console.org/
kiwi.DS site:
http://kiwi.ds.googlepages.com/sdat.html SDAT (DS sound) specifications.
http://kiwi.ds.googlepages.com/nsbmd.html (DS 3d (mainly nintendo game) format) See GBATek for more low level stuff for other games.
Romhacking.net Tracing with VBA-SDl-h:
http://www.romhacking.net/docs/361/ Sometimes you need to find where something is stored in a GBA rom, this document explains how to do it with an emulator. Likewise the main site and forum deals with some very interesting topics. VBA-sdl-h thread there: http://www.romhacking.net/forum/index.php/topic,4521.0.html
Patersoft:
http://www.patatersoft.info/ a nice guide to DS programming and a bit more gentle introduction the DS hardware than GBATek.
A site with some GBA rom formats:
http://www.datacrystal.org/wiki/Category:G...y_Advance_games
enhacklopedia:
http://cheats.gbatemp.net/hack/index.html favours cheating over hacking but most definitely worth a read.
My thread on DS rom rips and enhancements:
http://ezflash.sosuke.com/viewtopic.php?t=457 Basic file system stuff really but it is what got me into DS hacking.

GBA sound:
There is a somewhat common GBA sound format usually known as Sappy although tools and techniques are slightly less developed than the DS and it is not quite as common.
Atrius did a lot of work for it with Golden Sun ( http://gbatemp.net/t109517-golden-sun-tla-...ta-ripping-tool ) and http://gbatemp.net/t230202-gba-sappy-sound...ion-by-bregalad has some more.
There is a tool called sappy (you will want the newest version, one of the 2006 versions and the original)
http://filetrip.net/gba-downloads/tools-utilities/download-sappy-2006-mod-171-f30549.html
An older tool called sap tapper works for some games http://caitsith2.com/gsf/ripping.html
Also http://code.google.com/p/loveemu/downloads/list has some stuff.
Otherwise it is hardware from the ground up unfortunately, http://belogic.com/gba/ is a pretty good companion to GBAtek for sound purposes.

Liranuna's page: http://liranuna.drunkencoders.com/nds-2d-tuts/lesson-1 more DS development.
Crystaltile2: a nice hacking tool. Cory1492 made a translation and it is available on this thread:
http://gbatemp.net/index.php?showtopic=131468
Old links
http://gbatemp.net/index.php?showtopic=60675 Main site (Chinese) http://www.angeleden.net/crystaltile.htm

Compression basics on the GBA (shared with the DS and the concepts used are common across all lossless compression)
http://members.iinet.net.au/~freeaxs/gbaco...ion%20Functions
GBAcrusher is a good bios compatible compression app and is available from the link above.
Recently several great tools for the DS compression have been released http://gbatemp.net/topic/313278-nintendo-dsgba-compressors/ and http://code.google.com/p/dsdecmp/ are the main two.
http://gbatemp.net/t274472-codec-lzss-ds-released has some discussion on the subject.

kenghot's site: In Thai for the most part but kenghot is a fantastic rom hacker and it also has some game specific stuff:
http://www.kenghot.com/
acclms board, a ton of useless info and fairly reknowned for infighting and other nonsense but there are occasionally some really great/informative posts:
http://acmlm.no-ip.org/board/forum.php?id=19
Treeki's site, has a NSMB editor and a rom packer that supposedly works better than ndstool (I have yet to test it though and my carts tend to work fine with ndstool)
http://treeki.googlepages.com/

GBA trainers: http://gba.dellicious.de/trainer.php?s=n&o=asc&d=
GBA cheats:
http://ezflash.sosuke.com/viewtopic.php?f=3&t=686
GBA trainer beginnings:
http://gbatemp.net/index.php?showtopic=39979&hl=
GABSharky guide:
http://home.versatel.nl/derks202/smj/files...ing%20Guide.zip
original thread (Dutch language) http://gathering.tweakers.net/forum/list_messages/942567/26

Do a forum search for crackers trainer guides too. They are available along with a whole host of tools that are sometimes hard to find from http://min.midco.net/cracker/
 
Last edited by FAST6191,

Sp33der

Well-Known Member
Member
Joined
May 31, 2008
Messages
435
Trophies
0
XP
78
Country
Netherlands
Ameer10 said:
Hi, you think you can send the links for the main programs needed to hack any NDS game and. Sorry I'm not much of a reader and I can't be bothered to dig through your giant tutorial for the links.

You think you can put some examples up for every time you introduce a new style of encoding?
blink.gif


Wow I've read quite a lot of it and I'm beginning to learn quite alot I just want to also learn what programs/ apps. I need for hacking. >.>

You also might want to look into the file formats of the ds: http://tahaxan.arcnor.com/index.php?option...7&Itemid=36 (also stated in the tutorial)
And i noticed there are some good, short explanation about hacking stuff in some threads which can help

FAST6191 do you still have that downloadable pdf of the tutorial?
 

FAST6191

Techromancer
OP
Editorial Team
Joined
Nov 21, 2005
Messages
36,798
Trophies
3
XP
28,348
Country
United Kingdom
Assembly on the DS. AP and you section is at the bottom of this post, it deals with a lot of assembly level techniques though.


A fair bit of work has gone into assembly guides from other people. Among the best are
http://crackerscrap.com/ Guides to lots of little things. Have a look at some of cracker's trainer guides as well (the older ones preferably).
http://www.oopsilon.com/The-Smallest-NDS-File
Also poke around a couple of the pokemon communities. http://www.pokecommunity.com/showthread.php?t=233661 being a nice example of threads.

The following at present is just a handful of semi relevant information on cheating and aspects of GBA/DS assembly.


I made another post which I thought I would copy and paste here as it may be of some use. Rest assured a proper cheating guide will appear but this should help a couple of people until it does. Most of the links here probably have already appeared in the thread already but hey:

Basic cheating theory goes that RAM and to a lesser extent register values can be modified or you can change the games code (or what the device reads as the games code). The former is far more popular owing to it being far easier.
Read more in my guide above and this site is good for cheats and theory in general (as well as some more on GBA and DS implementations):
http://doc.kodewerx.org/index.html


Guides to making GBA cheats:
http://etk.scener.org/?op=tutorial
and
http://ezflash.sosuke.com/viewtopic.php?f=3&t=686

As an aside it seems several of the good versions of VBA got bundled into one as well:
http://gbatemp.net/index.php?showtopic=73424

One of those tutorials is for converting to codebreaker format but to convert cheats cracker's GBACCC:
http://min.midco.net/cracker/
This site also has loads of cheating tools including the somewhat hard to find AR Crypt.rar and CBAcrypt.rar which are used for decoding action replay (AR) and codebreaker (CB/CBA) cheats to a more useable format (if they are not already in such a format).
CCCGP.rar is for patching in Game Genie codes to roms although it is mainly for older systems as nobody really made any game genie cheats for the GBA.

Anyhow do you want to cheat in an emulator or on a flashcard or using a real action replay on games?

If it is the former those guides above both use VBA which is great for GBA roms.

If you want a flashcard and your cart does do cheats well (most have fair support) then try and use that. I am afraid you will have to look up your own documentation (most are fairly simple though)

On a cart without (decent) cheat support I suggest GABsharky:
http://gathering.tweakers.net/forum/list_messages/942567/26 Click on Stevens Cheating guide and you will have a nice guide to from start to finish.

You also have trainers for the GBA which are like patches to use cheats with most able to be activated at the start of the game or with in game commands:
http://gba.dellicious.de/trainer.php?s=n&o=asc&d=
http://bubbz.pocketheaven.com/?system=gba&section=patch

As for the DS a lot of carts (mainly DS slot) support cheat codes and there is a application for cheat codes for real cards on the DS:
http://chishm.drunkencoders.com/NitroHax/index.html
There are also real action replays and the like.
And you can hack your own games if you are good (I would say you probably have to understand those guides I already gave you)
Cracker again has a guide to training DS games:
http://ezflash.sosuke.com/viewtopic.php?f=8&t=3900

Here is a nice writeup of commercial product DS cheats for the technically minded:
http://nocash.emubase.de/gbatek.htm#dscart...tactionreplayds
and the same for GBA:
http://nocash.emubase.de/gbatek.htm#gbacheatdevices


DS cheats can be made using emulators now there are good ones, cards (high powered cards like the iSMM and DSTwo can make cheats onboard) and actual hardware with things like the action replay

See also several of the posts on
http://cheats.gbatemp.net/forum/index.php?board=23.0


________________________________________

Short intro to ASM on the GBA/DS. I have some other stuff in the new version of my rom hacking docs that I posted a few posts back (the odt format one).

It is assumed you know what assembly is, if you do not it is the name given to machine code (1s and 0s) that has been turned into a more human readable form. When talking about assembly from rom hacking we are almost invariably talking about disassembled code which lacks any comments from the developers and may also include stuff that is not assembly but has been disassembled none the less (text is often included in binaries).

Being machine code there are few niceties that more common languages have but that allows for far greater levels of control and far faster speeds if you know what you are doing.
In short you need to know the hardware, fortunately there is GBAtek for this:
http://nocash.emubase.de/gbatek.htm

It also helps to understand the basics behind the DS "format", "the smallest nds file" work from suits that task quite well:
http://imrannazar.com/The-Smallest-NDS-File

After you get past that though most assembly work is fairly similar across all platforms and assemblers. So ideally while there would be an intro to DS assembly there is none, the best we have is
http://quirkygba.blogspot.com/2008/12/thin...know-about.html

In this case we look to X86.
http://burks.brighton.ac.uk/burks/language...ut/asm1.htm#toc
The above also includes nicely worked examples of several simple and not so simple methods.
And another (probably better than above)
http://webster.cs.ucr.edu/AoA/index.html
http://www.drpaulcarter.com/pcasm/

Now for tools. The NO$GBA emulator is rightly considered a top flight tool and there are few things that come close, the assembly sections are paid software and the author is AWOL right now so you could not even get a copy if you wanted.

Still desmume has a decent debugging kit
http://www.desmume.com/
Crystaltile2 is probably the best assembly tool in place of NO$GBA
http://bg.tgb.net.cn/ there are some posts around here but it also supports NEF files so you can essentially make your own comments and convert a few structures to a more readable format.
A long standing disassembler for the DS:
http://hp.vector.co.jp/authors/VA018359/nds/ndshack.html

ARM assemblers:
http://common-lisp.net/project/armish/
http://labmaster.bios.net.nz/pyga/
http://www.romhacking.net/utils/343/ (ARM7 only)

See also LIARDS by the same author if you plan on doing DS homebrew using assembly although it has some use for the "inline style" assembly hacks:
http://common-lisp.net/project/liards/

IDA is a popular tool in disassembly circles, here is a plugin for the DS
http://www.openrce.org/downloads/details/56/NDSLDR

The GBA is a bit nicer. GBA roms are self contained unlike the DS which uses a file system. This allows tracing ( http://www.romhacking.net/docs/361/ and http://labmaster.bios.net.nz/vba-sdl-h/ ) and there is also a bit more in the way of tutorials:
http://www.coranac.com/tonc/text/asm.htm
http://patater.com/gbaguy/gbaasm.htm
http://gbadev.org/docs.php
http://nocash.emubase.de/gbatek.htm

NEF is a file format apparently used by Nintendo but supported in the developers version of no$gba (a far more interesting prospect for hackers) and later in the line of things crystaltile2, in practice is acts like an external comments system ("the commands at a given address do X" sort of thing) mixed with a debug info (breakpoints and whatnot).

The reason this sort of thing is interesting is because when you first disassemble a rom (the DS is quite nice as you have the filesystem- older consoles are not so lucky) you get several thousand lines of barely comprehensible instructions ( http://gbatemp.net/index.php?showtopic=39979&hl= is worth a scan through as it has a bit of info/provides a good example) and indeed owing to developers leaving/reading the game text/pictures/levels and the like from/in the binary and the fact the ARM processors in the DS having two differing instruction sets (ARM and THUMB: http://nocash.emubase.de/gbatek.htm#cpuoverview ) it may indeed be entirely useless (your basic disassembler is a very very crude tool- it is on a par with the ASCII readout of your hex editor in that any good it shows is luck, use of standards or you manually guiding/prodding it to show as such). Anything that cuts this down and makes it more manageable is welcomed, using the NEF files you can essentially comment "out" the things like setting the stack pointer, changing CPU modes and ultimately leave you looking at the juicy stuff like what instructions deal with your chosen interest for hacking or more broadly what deals with what. Similarly it can kind of cut down on the memory/register management side of things that most of ASM is concerned with and most high level languages seek to do away with)- I am loathe to use the word decompiler but they are in the same circles.

Hopefully I am allowed to paste it here but here is the relevant section from the no$gba debug help (note the passage on SRL- you normally see that format in roms as the file sent over wireless for download play):
If debug info (.SYM or .ELF files) has been loaded, labels will be displayed in disassembled code. And input boxes will recognize labels (eg. for Ctrl+G). TAB in code window toggles symbolic display on and off. Moving the code windows cursor onto a line with a symbol displays the value that hides behind the symbol in the upper left corner of the screen (DOS) or in the status bar (Windows).
Also, if source-level debug info is present, no$gba allows the user to view his/her source code in 'stacked' view mode, ie. disassembled opcodes shown below of each source line, this would be important for HLL programs.

.ELF Files (GBA)
Elf files are binaries, generated by many ARM assemblers and compilers (eg. Nintendo Tools, GNU tools). The files are containing the program (binary executable), and optionally also a symbol table & further debug information (usually in Dwarf2 format, and if present, typically containing source-level debug info).
Current no$gba version supports loading the binary (game), and the symbol table (similar content as .SYM files, but without additional code+data info), and the source-level debug information.

There seem to be different interpretations of how to store a binary inside of ELF files - as far as I know no$gba is compatible with all of these 'standards'.

.NEF/.SRL Files (NDS)
Nintendo's DS devkit outputs ROM-image and debug-info to separate files:

cart.SRL rom-image (without any debug info, same as normal .NDS files)
cart.NEF the NDS9 debug-info in ELF format (but without program code/data)
cart.NLF contains a path to another .NEF file with NDS7 debug-info

No$gba v2.2e supports NDS9 debug info, the NDS7 file isn't supported yet.

.SYM Files
When not using ELF files, symbolic Information may be stored in file .SYM in the same directory than .GBA. The A22i assembler produces ready-for-use SYM files. When using another assembler, you may convert any debug information into .SYM format.

.SYM Symbolic Information File Format:

;no$gba symbolic information table example
08000000 .arm
080000C0 start
08000124 mainloop
080001EC .thumb
080001EC init_video
08000210 .arm
08000210 irq_handler
08000228 jumplist
08000228 .dbl:0010
08000414 text_array
08000414 .asc:0017
0800042B .asc:000F
0800043A .asc:0012
06000000 vram_base
;...

All symbols have to be declared as EIGHT-character string nnnnnnnn (hexadecimal memory address, not case sensitive), followed by at least one space or TAB and then followed by the symbol name (the name may contain any characters except spaces and control codes, names are case-sensitive).

.SYM Additional Code and Data Information
Aside from labels, the file may also contain information about 16bit or 32bt program code areas, and about data zones. This info is stored in the same format as normal labels, but by using the following reserved "labels":

.arm ;following code is in 32bit/ARM format
.thumb ;following code is in 16bit/THUMB format
.byt:NNNN ;next NNNN bytes are 8bit data (dcb lines)
.wrd:NNNN ;next NNNN bytes are 16bit data (dcw lines)
.dbl:NNNN ;next NNNN bytes are 32bit data (dcd lines)
.asc:NNNN ;next NNNN bytes are ascii data (quoted dcb lines)
.pool ;dummy label (indicates that following is literal pool)

The entries may be mixed with normal label definitions, NNNN is a hexadecimal value, it is always counted in BYTES (even when defining 16/32 bit data fields).

There is no need to sort the entries in any way. Empty lines are allowed. Lines starting with ";" are ignored as comments. Lines are terminated by LF or CRLF or EOF or filesize. The file is terminated by EOF or filesize.


I would argue it is not that relevant to the hacker new to ASM, you would probably be better served reading up on the likes of http://crackerscrap.com/index.php?p=docs http://gbatemp.net/index.php?showtopic=444...t=0&start=0 and http://www.romhacking.net/?category=&P...itle=&desc= (pretty much all of the documents there but the ones on VFW, compression and VBA-SDL are the big three)

desume (now a proper dev version exists) is also good enough for some ASM work (it plays well with later roms too unlike no$gba).





AP and you

For whatever reason developers of the newer DS games include methods to try and detect if their code is running on a flash cart or the real cart. Cart makers and other people will usually try to bypass this but if they are not quick enough for you then you could always try your hand at it yourself.
Before going on this is an advanced technique and you will find yourself getting into assembly level coding, while it is not necessarily advised you can skate by with a level of knowledge on/appreciation for how DS roms work (covered in this thread), how to make cheats ( http://cheats.gbatemp.net/forum/general-hacking-discussion/ ) and how to hack roms ( http://gbatemp.net/t73394-gbatemp-rom-hack...ion-project-wip ).

What a game does when it detects a flash cart varies- saves can get wiped, a "thanks for trying the demo" screen can be loaded, the game can lock up (either right at the start or further into the game), the game can move in circles (unbeatable level/boss or something) or something more subtle (phantasy star changed drop rates of certain items) so while you can see a working game do not assume all is well. This the author leaves to you to determine although usually a mix of user observations, your own observations and machine level checks (it locks at level 2 but you check for similar instructions/sections and see that it would also lock at level 7) are what is called for. You should always assume developers/AP makers are creative people in this regard when hacking a rom.
This guide will not cover the more advanced things like making downloadable content work and fixing it for a given cart (saves and the like) but that should not bother too many people.


There have been many different ways to try and detect if a game is running on a flash cart or not [this is where I am going to fall down a bit as I have not paid as much attention as I might like] but in general to do things like have saving, cheats and soft reset the developers will alter the game code (this is also part of the reason why clean mode/stealth mode can often run a game that has yet to be patched) and these alterations can be detected.
The simplest way to check if a change has been made is to do a checksum of the binary (or section thereof) in memory,.
A simple checksum might be to add the values of the binary up and a change should change this result- change detected. Some of the more modern games can have well over 100 of these checks (occasionally even to the point where it induces a bit of a slowdown in the game even). While checksums are a method there are other options (a nice example relayed a few weeks back concerns Houkago Shounen (a Japanese game from early 2008) that timed how long it took for a save to occur vs the same thing on an original.) while others make use of a peculiarity with DS flash carts reading below 8000 hex in the memory (indeed if you disassemble a game and see a read to below 8000h this is probably what is happening also the debug output of an emulator will often have this) compared to what happens on an original cart.

The DS can receive code (and thus perform checks) via 4 methods
ARM9 binary (this is the arm9.bin you will see if you pull a rom apart)
ARM7 binary (this is the arm7.bin you will see if you pull a rom apart)
ARM9 overlay (usually stashed in the overlay directory)
ARM7 overlay (does not usually exist beyond 0k files).

In commercial DS roms the ARM7 is usually very similar from game to game (to the point where you can swap them without issue for many games which is a quite a feat for a system like the DS) and ARM7 overlays are quite rare. As the ARM7 controls saving for many games this gave birth to the ARM7 swap fix but as the last few paragraphs should have shown just trying an ARM7 fix is probably not going to solve your problem.

The ARM9 is what does the bulk of the work in commercial DS roms as far as calculating damage from an enemy, fiddling with text, shuffling things in memory and the like. While the translation process will usually involve editing the game data the binary is almost always changed as well (indeed it is not unknown for the text to be in the binary along the with the game code but from a more pragmatic stance the Japanese game might use a fixed width font while the US release will want a variable width one) and this is why swapping it with the already patched Japanese release or trying to use is also a bad/pointless idea. Most hacker translations will avoid changing the binary to the point of changing locations as it means everything after it is now wrong (why having a file system vs something like the GBA or SNES with everything piled into one big file is awesome for hackers) but as the commercial translations will have source code all bets are off here as far as assuming things will stay the same between regions (of course there are several examples of things remaining near enough the same but never assume it will).

Overlays are blank patches of memory that a game can add a section of code to (overlay if you will) for temporary use for whatever reason and then overwrite it with another one later but still keeping the core of the game loaded- a crude somewhat outdated method of expanding the capabilities on limited memory but about the only one that is available to programmers of commercial DS games (they do not have a nice ?SD card to play with and pull data from/write data to). Checks can be in here as well (quite troublesome too as they may not be loaded for several hours after starting a new game).

In addition to the two processors the DS versions of the ARM7 and 9 have an additional instruction set/mode called THUMB ( http://nocash.emubase.de/gbatek.htm#thumbinstructionset ) which broadly speaking is a 16 bit instruction set that can run on a 32 bit system (it gets a bit more complex that than but it makes for smaller code and helps if you are limited in bus size if used correctly). Developers will occasionally hide checksums in THUMB code- your disassembler is a dumb tool and will blindly disassemble everything you feed it in the manner you tell it (with the exception of some of the more automated functions of emulators) so in your haste you might skip over one buried in THUMB code.

It should also be noted that the binaries as found in a DS rom might be compressed (or worse sections of them might be compressed). You can usually snatch these from the ram viewer of an emulator

So you have read all this, understood it, ploughed into your rom and found an instruction you now know causes your headaches. Chances are if you have this is redundant but ultimately one thing happens at the end of a check and that is a branch depending on the outcome of the check, if you are feeling nice (or better a game runs slow courtesy of checks- always nice to know you not only made a rom work but work better) you can catch it before it ever checks but assuming you did not then the main course of action is to change the branch from well branching to a straight jump to the "good" outcome.

Cheat bypasses- not so viable for the many hundreds of checks option but still possible for some games. Here rather than targeting the rom image you target the binary in memory with a cheat (the payload of the cheat being the opcode(s) to bypass the AP). Most of the same ideas regarding locations apply so simply trying Japanese cheats on a US release is not likely to work either (although it may well just be a shift so if you redirect some of the locations then you can fix the game sometimes).

Tools of the trade vary from hacker to hacker but in general you will want
A method of pulling DS roms apart- ndstool (frontend in DSbuff and DSlazy) will do but something like NDSTS (which also includes some choice info on the binaries/header as well) is well worth having around http://www.no-intro.org/tools.htm . Your standard rom hacking tools for this sort of thing are all that is really needed.

A disassembler- even if it is only in the emulator the last thing you need to be messing with is raw machine code.
Several exist including
ndsdis2- the oldest one still in common circulation. Not favoured by some in the hacking community but works well enough most of the time.
http://hp.vector.co.jp/authors/VA018359/ndsdis/
crystaltile2- while the actual tool is a great general purpose hacking tool it does feature a simple editor
http://gbatemp.net/t73394-gbatemp-rom-hack...t&p=2641950
IDA pro- a commercial disassembler used by many top flight hackers of all systems. http://www.openrce.org/downloads/browse/IDA_Plugins has plugins.

Both desmume and no$gba (developers version) feature a level of "live" disassembly which can be very useful. They are also the two chosen emulators for most ASM level hacking work.

An assembler can be useful but more often than not you can boil it down to a single instruction which you can inject/modify by hand in a rom ( http://nocash.emubase.de/gbatek.htm#thumbinstructionset has the encodings for the ARM and THUMB instructions- it can be as simple as changing one bit in the entire rom but the trick is knowing how to get to that point). Still http://crackerscrap.com/ has some documentation you might want to read and in the tools section there is ARM ASM kit (originally made for cheats but works very well for things like this). Devkitarm has an assembler though.

Hex editor- there are hundreds of these and most hackers will have several on standby.
XVI32: http://www.chmaas.handshake.de/delphi/free...xvi32/xvi32.htm
http://mh-nexus.de/en/hxd/
naturally crystaltile2 has one.
http://www.romhacking.net/ has many in the tools section.

On the commercial side of things
hex workshop: http://www.hexworkshop.com/
winhex: http://www.x-ways.net/winhex/index-m.html


If you fancy a few examples of patching try reverse engineering patches (say some of the rudolph's patches).
 

FAST6191

Techromancer
OP
Editorial Team
Joined
Nov 21, 2005
Messages
36,798
Trophies
3
XP
28,348
Country
United Kingdom
My rom ripping thread from sosuke's backed up here. It is a bit old but I feel it still has some useful info and can help people see things that long time rom hackers take for granted.

Introduction

Seen as running commercial DS ROMs is what we all now seem to be doing it might be time for a basic guide on how to rip ROMs so as to shrink them. You can also use the techniques to enhance your ROMs fairly easily (later on I will detail some simple translations and you can also replace sound files with different regions ones to get rid bad dubs and such).

Now on to the main section, due to the fact the DS is using a file system type method of holding/using data certain things like other languages, sound and intro movies can be removed and/or replaced from a DS ROM with relative ease thus shrinking them.
As many of the files are given obvious names the filesystem means it is also fairly easy to get at ingame text (some even use plain ASCII) and level data on some ROMs, New Super Mario Brothers is a good example of this.
Shrinking ROMs for the GBA and most other systems however is an incredibly hard task so you very rarely ever see it happen (you can remove certain things from NES ROMs but as they are tiny anyway it is generally pointless).

While this is likely of interest to all flash cart owners this feature of the DS ROM setup is especially useful for those of us with one of the EZ1/2 series carts or another flash memory cart whom may be stuck with 512,256 or even 128mbit sized carts and with DS ROMs currently being up to 1024mbit in size that leaves little space for other games or even in the position of being unable to run them at all.
EZ3 users this thread may also be of use to you as a lot of the 1gbit games will not fit on your cart after the saver space on the NAND is taken and you may not get away with simply trimming the 00/FF's off the ROM image, games such as resident evil and Feel the magic/The rub rabbits can be trimmed to fit.
EZ4 users you will have to rename your tweaked ROM from ".nds" to something else to get it to work.

All this being said some DS ROMs however come in a few large files e.g. Phoenix Wright games and Age of Empires which makes things hard if not impossible to shrink easily, some ROMs also come with big files contained within that are over 32mbytes in size which means they have to be trimmed/replaced to get them working on smaller carts: the problem comes however when things like the map data is in one large file e.g. Mario and Luigi partners in time. This is however fairly rare and there may well be ways around it but it will be more complex.

As far as I am concerned there are two types of rip: lossless and lossy although my definition will differ from video/(zip/rar) compression definitions:
lossless ones being like the Castlevania rip I will get onto and ones where other languages are deleted (simply put no (in)gameplay errors).
lossy ones being like the Jump Superstars Saga (a few graphical glitches in menus albeit minor ones) and ones where in game sound files are replaced.

Basics and list of tools

As mentioned above you can delete and replace things like intro movies, cutscenes, soundfiles, wireless components as well as other languages and still end up with a ROM that works.
Note however when ripping sound files (and some other files) from a rom you can often not delete or replace them with blank files and have the rom still work, usually you can use sound files from other games though or at least chop off the last part of the original soundfile with a hex editor.
Provided you rename it (typically to sound_data.sdat, check the rom being ripped first though) Goldeneye rogue agent (all versions) has a 57kb one called Sound_spawn.sdat (which you could do worse than to keep as a seperate file along with the other basics).

When replacing sound files keep it sensible though as this means the rom you produce will have the sounds of Goldeneye's weapons (or occasionally none at all) and if you replace a music based games sound files with Goldeneye's then it will be kind of pointless, not mention hearing Goldeneye's weapons when jumping/moving/changing menu sections gets damn annoying if you have the sound up.

A few basic rules of thumb/things to note:

1. ROMs frequently come with nice names for their files so you can make sensible/educated decisions as to what to delete e.g. if you have a rom with files called systemmaincomp1.bin and rare_secret_ending_99.dmd it is best to delete/replace the .dmd one.

2.Files within a rom usually have similar extensions between ROMs for instance sound files are typically the .sdat ones (Tony Hawk's American skateland uses a .strm one however) so if you do this a lot the process may not become easier but you will certainly know where to look.

3.Following on from above there are typical/obvious names for certain directories like wb or mb for wireless multiboot, chars or characters for the ingame characters (knowledge of the game here can help with finding hidden characters to delete too), levels or tracks for levels and tracks funnily enough (once again knowledge of the game can help delete hidden tracks/levels or enable you to make two ROMs with one half of the game on one the other half on the other).

4.You do have to play this ripped rom so keep it sensible and do not replace sounds for music based games.

5.Not all files need to be complete: you can frequently chop the end off the soundfile if you find you are a few bytes away from fitting the rom on your cart or getting the rip down to size.

6. Look at other peoples rips: the techniques they use may give you clues to your own (this is especially useful when ripping a EU release where there is a J or U release with a rip already out there) or you may be able to improve on theirs, to this end SHARE your rip techniques too.

One final thing, the DS soundfiles have been reverse engineered and should be relatively easy to edit:
http://sosuke.com/ezflash/viewtopic.php?t=1221 I will put up a whole bunch of infomation as and when I have it.

Intro to the techniques over: what you will need for this:

NDStool: (The main tool you will likely be using for all this)

I use an older version which works fine for me, newer versions do things differently and so will give different CRC32 values.
To this end I put up the old version on my site:
http://www.4shared.com/dir/514850/ef8a1bee/sharing.html

Newer version:
http://darkfader.net/ds/ (About halfway down the page under the header DS development tools)
source:
http://cvs.sourceforge.net/viewcvs.py/devk...ls/nds/ndstool/

What this program actually does is allow you to seperate all the individual components of the rom and allow you to modify/delete them and then can be used to recompile all the components back again into a rom that hopefully works.

NDSTool is a command prompt based program but a GUI called DSLazy is available, I find batch files easier however so this is just here for completion (note DSLazy also requires .net framework to run)
http://l33t.spod.org/ratx/DS/dslazy/

NDStool has a usage guide/command switches list if you just run it in a DOS prompt but as you will only probably be using it to deconstruct and recompile NDS roms (it does have quite a few other interesting features) you can use the following batch file suggestions.

As was eluded to above NDStool is command prompt based, there is a GUI available (linked above) but NDSTS (see below) and the following batch files work best for me, on my PC I have made up two batch files which can be used to disassemble a rom and then reassemble it after tweaking it, I have these stored in a subdirectory of my NDS rom ripping folder so I can simply copy them out with NDSTool disassemble the rom, tweak and delete things and then put the rom together.

My advice is to put these into a seperate batch file for each step, if you did not know how to make batch files a batch file is essentially a list of DOS prompt commands, to make a batch file open up notepad (or some other editor that can save a file as a .txt one) paste the following section in and save the file with a .bat extension, simple huh.

For a nice list of DOS commands and a basic explanation either to refresh or learn for the first time here is a good place to look.

(note: as MS in their infinite wisdom changed DOS commands with different versions of Windows the following batch files may not work for systems not running windows XP).

Disassembly

I have included a rename command so you can simply put the batch file, the uncompressed rom and ndstool in an empty folder and run the batch file to disassemble the rom, if you have the rebuilding batch file as well you can copy that across as it will not affect the process.

CODErename *.nds x.nds
ndstool -x x.nds -9 arm9.bin -7 arm7.bin -y9 y9.bin -y7 y7.bin -d data -y overlay -t banner.bin -h header.bin

Now you just have to run this batch file (it is essentially a program so just double click it) and a DOS prompt will flash up wait 30 odd seconds (depending on rom size) and the DOS prompt will close and on your drive in the same directory as the batch file and ndstool some folders will appear (data, overlay...) and a bunch of files will appear, now you can edit the rom as you please although I suggest you stick to the data directory as the others contain fairly vital data which is rarely that big anyway.

Rebuilding/compiling:

CODEndstool -c xmod.nds -9 arm9.bin -7 arm7.bin -y9 y9.bin -y7 y7.bin -d data -y overlay -t banner.bin -h header.bin

When you run this from the same directory as NDSTool and a previously disassembled (and now probably modified) rom it will make up a file called xmod.nds.
You can leave the original x.nds file alone and if you are using it the disassembly batch file as well for this batch file will not cause ndstool to use anything else other than the files required to be included in the rom it makes up.

You can also include a few more commands like "del *.bin" and "rd data /s /q" and "rd overlay /s /q" after the ndstool section to tidy up after rebuilding but you will likely be deleting files and hoping the file gets small enough so you do not really want to get rid the files that quickly, many find it nice however if they can be rid of "useless files" if you make a batch file to go with your rip guide.

Now you can have three files (ndstool and the two batch files) which you can use to build and disassemble roms, I also keep a copy of goldeneyes small sound file to hand in the same directory as these three files are stored in for convenience.

NDSTS (NDS top/tool system: a tool by coolhj of GBATA (GBA tool advance fame):
grab both here:
http://www.gbadat.altervista.org/gbata.htm
project homepage:
http://ndsts.handholder.net

This program is windows based and has a user interface this time, it can be used to extract individual components from DS ROMs without having to disassemble them saving time if you are doing things like the Megaman re-Japanese voices tweak or you simply want small sound files from a rom such as Yoshi touch and Go or Goldeneye.

NDSTS can also replace/import files although they have to be the same size as before which does not really do much for us when ripping ROMs, hopefully a later version will make life easier and enable different size file replacement.

*While not essential for most of this a hex editor is very useful, the one I prefer is Hex Workshop which is not free, available here:
http://www.bpsoft.com/
A very good freeware hex editor:
http://www.chmaas.handshake.de/delphi/free...xvi32/xvi32.htm

Quite often you will be using a hex editor to trim down files, to this end Cracker made a program to cut files down in size.
Grab it here: http://min.midco.net/cracker/filecutter.zip
Usage filecutter file.in length file.out

List of rips
*My end CRC32 values may be different to yours due to the fact that I use(d) an older version of ndstool when making these (which you can grab from my site), in the future I may just include initial CRC's.

As large batch code makes for a post that is not so easy to read I have made use of the hiding/spoiler features: you will require Javascript enabled for it to work (I use Firefox and in the options, content, advanced settings for Javascript I only have raise/lower windows enabled and it works fine for me).

I am also considering making up a zip containing all the batch files and methods detailed here, updating would happen although it would be a pain to do. I could include windows 98 compatible versions (as it stands most of the rd commands can be replaced to use the deltree application). Peoples thoughts?

The collection of rips available is getting to be quite nice but if you have/make any more they would be greatly appreciated and if used credited to you: obviously include your method, name of rom and region, initial rom CRC is helpful if ever a bad dump is found to have happened.
The resulting ROM’s CRC is good to have, data about gameplay changes, if any, and I am sure many would appreciate an IPS or some other type of patch if it is small (my IPS patch for the Jump Superstars Saga was over 12 megabytes in size which is a bit large for distribution especially when the batch file is in the kilobytes range).


Just to save any trouble later make sure you have a backup of the rom before you start messing around with it.


EZ3 compatibility file
Slade found that unpacking and repacking a DS rom with NDStool could make some roms work that did not before with the EZFlash carts, here is a batch file suggestion to make it quick and easy:

To use make up a batch file with the code section and place the resulting batch file, the rom and NDSTool into an empty directory and run the batch file.
Two roms will be generated xmod.nds (the rom you burn) and xoriginal.nds (your original rom), it will also clean up after itself so you will only be left with ndstool the two rom files and the batch file.

This batch file might not work on non-XP systems.

CODErename *.nds x.nds
ndstool -x x.nds -9 arm9.bin -7 arm7.bin -y9 y9.bin -y7 y7.bin -d data -y overlay -t banner.bin -h header.bin
ndstool -c xmod.nds -9 arm9.bin -7 arm7.bin -y9 y9.bin -y7 y7.bin -d data -y overlay -t banner.bin -h header.bin
rename x.nds xoriginal.nds
rd data /s /q
rd overlay /s /q
del *.bin

Castlevania: Dawn of Sorrow 512MBit to 256Mbit (all versions)(also 128mbit rips)
Thanks to bryehn over at GBATemp for making me stop being lazy and trying this out.

Japanese Version:
Called Akumajou Dracula - Aoitsuki no Juujika in Japan but it is the same game none the less, I do not know how many people will read this wanting a Japanese rip but what they hey it is simple enough:
Initial CRC32: 0DF769EE
256 rip End CRC32: A7EBE2CC
128 rip End CRC32: 245A3646

Disassemble with NDSTool
Replace the movie named cvop.dmd in the "data\mv" directory with a 0k file of the same name (I right clicked and made a new paintfile (.bmp) and changed the name and extension to that of the movie file).
Then delete the movie file if you have not already
Recompile the rom. You do not have to worry about skipping the movie and the game will go straight to the start screen.

I completed castlevania a while back but here is some untested batch code that should do the trick.

[title=Click to reveal batch code]CODErename *.nds x.nds
ndstool -x x.nds -9 arm9.bin -7 arm7.bin -y9 y9.bin -y7 y7.bin -d data -y overlay -t banner.bin -h header.bin
copy y7.bin data\mv\cvop.dmd
ndstool -c castlevaniarip.nds -9 arm9.bin -7 arm7.bin -y9 y9.bin -y7 y7.bin -d data -y overlay -t banner.bin -h header.bin
rename x.nds castlevaniaoriginal.nds
rd data /s /q
rd overlay /s /q
del *.bin


128MBit Rip, 14.3MBytes
You will need a small soundfile to replace the soundfile in this game, obviously you will lose the sounds so I only suggest using this for a 128mbit cart or if you always play without sound.

I used the Sound_Spawn.sdat I grabbed with NDSTS from Goldeneye (all versions have the same file) and renamed to Sound_data.sdat
Disassemble with NDSTool
Replace the movie named cvop.dmd in the data\mv directory with a 0k file of the same name (I right clicked and made a new paintfile (.bmp) and changed the name and extension to that of the movie file).
Then delete the movie file if you have not already
Replace soundfile with small one
Recompile the rom. You do not have to worry about skipping the movie as the game will go straight to the start screen.

European Version
Initial CRC32: 8E908CE7
256Mbit Rip End CRC32: 5C719E89
128Mbit Rip End CRC32: F3FB54CF

Both methods same as Japanese one above although the 128Mbit rip will give a file 15.8Mbytes in size presumably because of the extra languages.


USA Version
Initial CRC32: 135737F6
256Mbit Rip End CRC32: E9992536
128Mbit Rip End CRC32: 029F2EA3

Both methods same as Japanese one above and will give same sized files as the Japanese rip

A little nicety, Venom released a trainer for the US version of Castlevania which even works with these rips (only the intro movie dropped version has been tested by me so far)
see this thread for more information: http://www.sosuke.com/ezflash/viewtopic.php?t=924

256mbit NDSPatcher rip Euro version

I only done this for the Euro version but the technique should work regardless.

I left this as a nod to the NDSPatcher, personally I think the method above is better (smaller file, simpler use of the rip).

This is actually a very simple rip (I got it from the NDSpatcher download (most of you will still know but NDSpatcher was the first really viable method of getting DS roms to work on a normal GBA cart)) and is actually lossless with regards to gameplay: all you have to worry about is skipping the intro movie or it will crash (the above methods do not have this issue.

Unfortunately GBATA's fix overdump feature does not allow for a trim to 256mbit so life gets a bit harder.
You will need to get a hex editor and open the rom in it.
What you are going to have to is cut the rom in half as all the last half of the rom contains is the intro movie which while nice the 32megabytes of space is either the difference between you being able to play the game or having another game, or two, on your cart.
The rom is 512mbit in size so you are going to see the number 4000000 (67108864 decimal) as the last number in the file.
To this end go to the point 2000000 (33554432 decimal) in the file and select the rest of the file and delete it.
With hex workshop the is no select all after this point command so you after you use the goto command (ctrl+G) and type 2000000 or 33554432 decimal as you point of choice you will then have to use select block and type 3FFFFFF (one less than 4000000) or 67108863 decimal and delete the whole lot.
I have tested this on an EZ2 256 and it works fine (you will have to not use the DS loader)
When using flashme you may have to force flashme booting by holding down the a,b,x and y buttons to get it to boot from your EZ cart.

Unfortunately my IPS patcher was playing up and did not want to create a working patch for this so I have none to give you. (Thinking about it, it might be possible to patch the last 256mbit to 00's or FF's and then use GBATA to shrink them.).

Jump Superstars Saga.
Initial rom CRC: 49EFB6B3
End rom CRC: 7B50B1F6
Some minor menu issues (nothing major at all and in-game play works fine)
This is a great game that due to licensing issues will likely never see a release outside of Japan. It could also serve to answer the eternal questions like: in a fight between Dragon Ball Z's Goku and Naruto who would win?
My poor attempt at humour involving shows I do not like aside this is a potentially slightly more complex rip than before as it involves deleting a few files and using a DOS prompt.
To this end Rygar of the SCDev.org forums made a rip technique and assassda over at GBATemp made some batch code, following is a slightly modified version of it.

Make up a batch file with the code section (copy and paste the "code" section into a text file editor and save with the extension ".bat")
Run with ndstool called ndstool.exe and you Jump superstars saga rom unzipped in the same directory (name should not matter as long as it has a .nds extension)

After a minute or so you will end up with a file called jssrip.nds which is just under 32mbytes, burn this to your cart.

I tested this on an EZ2 256 with no loader and it worked fine. If I used flashme to boot I had to force flashme by holding down the a, b, x and y buttons.

Oh and there is an English and an Italian translation in the works http://www.translationrl.it/ once it gets to a reasonable level I will test it out with the rip and if necessary alter the batch file.

[title=Click to reveal batch code]CODErename *.nds x.nds
ndstool -x x.nds -9 arm9.bin -7 arm7.bin -y9 y9.bin -y7 y7.bin -d data -y overlay -t banner.bin -h header.bin
del .\data\Data\opening\opening.vx
del .\data\Data\demo\demo_bb00.dig
del .\data\Data\demo\demo_bb01.dig
del .\data\Data\demo\demo_bb02.dig
del .\data\Data\demo\demo_bb03.dig
del .\data\Data\demo\demo_bb04.dig
del .\data\Data\demo\demo_bb05.dig
del .\data\Data\demo\demo_bc00.dig
del .\data\Data\demo\demo_bc02.dig
del .\data\Data\demo\demo_bc03.dig
del .\data\Data\demo\demo_bc05.dig
del .\data\Data\demo\demo_bl03.dig
del .\data\Data\demo\demo_bl04.dig
del .\data\Data\demo\demo_bl05.dig
del .\data\Data\demo\demo_bl06.dig
del .\data\Data\demo\demo_bl_vs.dig
del .\data\Data\demo\demo_bs02.dig
del .\data\Data\demo\demo_bs03.dig
del .\data\Data\demo\demo_bs10.dig
del .\data\Data\demo\demo_bu00.dig
del .\data\Data\demo\demo_bu01.dig
del .\data\Data\demo\demo_bu02.dig
del .\data\Data\demo\demo_bu03.dig
del .\data\Data\demo\demo_bu04.dig
del .\data\Data\demo\demo_bu05.dig
del .\data\Data\demo\demo_bu_vs.dig
del .\data\Data\demo\demo_db03.dig
del .\data\Data\demo\demo_db04.dig
del .\data\Data\demo\demo_db05.dig
del .\data\Data\demo\demo_db11.dig
del .\data\Data\demo\demo_db14.dig
del .\data\Data\demo\demo_db15.dig
del .\data\Data\demo\demo_dg00.dig
del .\data\Data\demo\demo_dg01.dig
del .\data\Data\demo\demo_dg02.dig
del .\data\Data\demo\demo_dg03.dig
del .\data\Data\demo\demo_dg04.dig
del .\data\Data\demo\demo_dg05.dig
del .\data\Data\demo\demo_dg06.dig
del .\data\Data\demo\demo_dg_vs.dig
del .\data\Data\demo\demo_dn00.dig
del .\data\Data\demo\demo_dn01.dig
del .\data\Data\demo\demo_dn02.dig
del .\data\Data\demo\demo_dn03.dig
del .\data\Data\demo\demo_dn04.dig
del .\data\Data\demo\demo_dn05.dig
del .\data\Data\demo\demo_dn06.dig
del .\data\Data\demo\demo_dn_vs.dig
del .\data\Data\demo\demo_ds00.dig
del .\data\Data\demo\demo_ds01.dig
del .\data\Data\demo\demo_ds02.dig
del .\data\Data\demo\demo_ds03.dig
del .\data\Data\demo\demo_ds04.dig
del .\data\Data\demo\demo_ds05.dig
del .\data\Data\demo\demo_es00.dig
del .\data\Data\demo\demo_es01.dig
del .\data\Data\demo\demo_es02.dig
del .\data\Data\demo\demo_es03.dig
del .\data\Data\demo\demo_es04.dig
del .\data\Data\demo\demo_es05.dig
del .\data\Data\demo\demo_es_vs.dig
del .\data\Data\demo\demo_focus.dig
del .\data\Data\demo\demo_gt00.dig
del .\data\Data\demo\demo_gt01.dig
del .\data\Data\demo\demo_gt03.dig
del .\data\Data\demo\demo_gt05.dig
del .\data\Data\demo\demo_gt_vs.dig
del .\data\Data\demo\demo_hg00.dig
del .\data\Data\demo\demo_hg01.dig
del .\data\Data\demo\demo_hg02.dig
del .\data\Data\demo\demo_hg03.dig
del .\data\Data\demo\demo_hg04.dig
del .\data\Data\demo\demo_hg05.dig
del .\data\Data\demo\demo_hg_vs.dig
del .\data\Data\demo\demo_hh00.dig
del .\data\Data\demo\demo_hh01.dig
del .\data\Data\demo\demo_hh02.dig
del .\data\Data\demo\demo_hh03.dig
del .\data\Data\demo\demo_hh04.dig
del .\data\Data\demo\demo_hh05.dig
del .\data\Data\demo\demo_hh_vs.dig
del .\data\Data\demo\demo_ig00.dig
del .\data\Data\demo\demo_ig01.dig
del .\data\Data\demo\demo_ig04.dig
del .\data\Data\demo\demo_ig05.dig
del .\data\Data\demo\demo_ig_vs.dig
del .\data\Data\demo\demo_jj00.dig
del .\data\Data\demo\demo_jj01.dig
del .\data\Data\demo\demo_jj02.dig
del .\data\Data\demo\demo_jj03.dig
del .\data\Data\demo\demo_jj04.dig
del .\data\Data\demo\demo_jj05.dig
del .\data\Data\demo\demo_jj_vs.dig
del .\data\Data\demo\demo_kk00.dig
del .\data\Data\demo\demo_kk04.dig
del .\data\Data\demo\demo_kk05.dig
del .\data\Data\demo\demo_kk_vs.dig
del .\data\Data\demo\demo_mf00.dig
del .\data\Data\demo\demo_mf01.dig
del .\data\Data\demo\demo_mf02.dig
del .\data\Data\demo\demo_mf03.dig
del .\data\Data\demo\demo_mf04.dig
del .\data\Data\demo\demo_mf05.dig
del .\data\Data\demo\demo_na00.dig
del .\data\Data\demo\demo_na01.dig
del .\data\Data\demo\demo_na03.dig
del .\data\Data\demo\demo_op00.dig
del .\data\Data\demo\demo_op01.dig
del .\data\Data\demo\demo_op02.dig
del .\data\Data\demo\demo_op03.dig
del .\data\Data\demo\demo_op04.dig
del .\data\Data\demo\demo_pj01.dig
del .\data\Data\demo\demo_pj02.dig
del .\data\Data\demo\demo_pj03.dig
del .\data\Data\demo\demo_rk01.dig
del .\data\Data\demo\demo_rk02.dig
del .\data\Data\demo\demo_rk03.dig
del .\data\Data\demo\demo_rk04.dig
del .\data\Data\demo\demo_rk05.dig
del .\data\Data\demo\demo_sd04.dig
del .\data\Data\demo\demo_sd05.dig
del .\data\Data\demo\demo_sk00.dig
del .\data\Data\demo\demo_sk01.dig
del .\data\Data\demo\demo_sk02.dig
del .\data\Data\demo\demo_sk03.dig
del .\data\Data\demo\demo_sk05.dig
del .\data\Data\demo\demo_sr00.dig
del .\data\Data\demo\demo_sr04.dig
del .\data\Data\demo\demo_to05.dig
del .\data\Data\demo\demo_tr01.dig
del .\data\Data\demo\demo_tr03.dig
del .\data\Data\demo\demo_tr05.dig
del .\data\Data\demo\demo_tr_vs.dig
del .\data\Data\demo\demo_yh00.dig
del .\data\Data\demo\demo_yh03.dig
del .\data\Data\demo\demo_yh04.dig
del .\data\Data\demo\demo_yh05.dig
del .\data\Data\demo\demo_yo05.dig
del .\data\Data\demo\ed_a00.dig
del .\data\Data\demo\ed_a10.dig
del .\data\Data\demo\ed_b00.dig
del .\data\Data\demo\ed_b10.dig
del .\data\Data\demo\island_u02.dig
del .\data\Data\ending\ed_copyright.dig
del .\data\Data\ending\ed_copyright01.dig
del .\data\Data\ending\ed_copyright02.dig
del .\data\Data\ending\ed_d10.dig
ndstool -c jssrip.nds -9 arm9.bin -7 arm7.bin -y9 y9.bin -y7 y7.bin -d data -y overlay -t banner.bin -h header.bin

I made an IPS file which was over 12 megabytes in size which I am not going to distribute as it is too big especially with the batch file not even hitting 100kbytes. I might look at an XDelta patch

Megaman Battle Network 5 rips and enhancements

The European version is 512mbit in size but deleting the languages will get it below 256.

European (English) 256 rip batch file from Slade:

This removes all other languages other than English, should you want a rip that leaves another language then simply replace the language you want in the batch file with eng e.g. if you wanted a French language rip then you would replace the "rd data\data\rom_fra /s /q" line with "rd data\data\rom_usa /s /q".

[title=Click to see batch code.]CODEcls
Echo MegaMan Battle Network 5: Double Team DS 256Mbit rip by Slade.
Echo Renaming MegaMan Battle Network 5: Double Team DS to x.nds
Echo off
ren *.nds x.nds
Echo Extracting rom files. Please wait...
Echo off
ndstool -x x.nds -9 arm9.bin -7 arm7.bin -y9 y9.bin -y7 y7.bin -d data -y
overlay -t banner.bin -h header.bin
Echo Fixing files...
Echo off
rd data\data\rom_fra /s /q
rd data\data\rom_ger /s /q
rd data\data\rom_ita /s /q
rd data\data\rom_spa /s /q
Echo Rebuilding rom.ÂÂThis may take a few minutes.
Echo off
ndstool -c xmod.nds -9 arm9.bin -7 arm7.bin -y9 y9.bin -y7 y7.bin -d data -y
overlay -t banner.bin -h header.bin
Echo Renaming xmod.nds to MegaMan(MOD).nds
Echo off
ren xmod.nds MegaMan(MOD).nds
rd data /s /q
rd overlay /s /q
del *.bin
Echo All done...ÂÂYou can now burn this file to your Flash Cart.

Enhancements
An enhancement (at least a far as I am concerned) voice change to Japanese (requires the Japanese version of the rom called Rockman EXE 5 DS - Twin Leaders).

US version (EU ripped and not ripped versions should work but I have not tried it).
Initial CRC32: 16F03F13
End CRC32: F38B19EB

Having played the game one of the most annoying features/problems was the appalling voiceovers that occur at repeated intervals (jacking in, battle start etc) and inspired by a post on gbatemp I thought I would have a go and see if I could get it so I can listen to the Japanese voiceovers as opposed to the dub.

What I did was disassemble the US rom using NDStool and there is a file called sound_data.sdat in data\data\rom\ds directory replace this with the Japanese ROMs version (in the same directory as the US version: either use NDSTS to extract it or NDStool to disassemble the rom) then rebuild the US/EU rom with the replaced sound_data.sdat file.

You can use the batch code suggestions above if you wish to save time with NDStool.

After all this you will then have rom with Japanese voiceovers and English text which for me is perfect (both the rom and the lack of poor voiceovers).

An untested method but you could rip the Japanese soundfile pad it out (it is smaller) in a hex editor to match the size of the US one and import it via NDSTS.

Sonic Rush (U) 512 to 256mbit (two sepearate files for the two characters).

I made it up and tested it, works fine on a EZ2 256 and EZClients patching mechanisms, to use the Blaze rom complete act1 (beat the boss) with the Sonic rom grab the savefile and burn the Blaze rom with the Sonic act1 save file (EZClient named the roms the same so it should be simple enough). The sound is missing from some bonus levels and menus but it is a good rip otherwise, Link to original post:
http://boards.pocketheaven.com/viewtopic.php?t=3027

Animal Crossing 256mbit to 256mbit. (should work for all versions: E,U of J)
No not a typo, the patching method used by EZClient adds some code to the start of this rom making it bigger and causing it not to be able to be burnt to a 256mbit cart (everyone else should be fine though).

I made it work by deleting some code using a hex editor from the end of the soundfile and rebuilding the rom, my end result was a bit drastic giving a soundfile of 7.5 or so megabytes from 10.2, game works fine as far as I have tested it though.

(if you follow this method delete less soundfile, others have and it worked fine), I used a hex editor but if you do not want to GBATA (linked with NDStool above) has a fix overdump feature which could be used to trim the soundfile (rename the sound file with a .gba extension and fix overdump to 64mbit (8megabytes), untested by me and a hex editor would be better but it should work, also this would be the perfect time to use crackers cutting tool (see tools section up top).

Seiken Densetsu DS (Children of Mana) 512mbit to 256mbit
Initial CRC: D6FBDCC0
End CRC: (sorry not yet).

Raeca posted this rip and I reverse engineered it (A fun few hours involving going over about 4000 crc32 values by hand)

Make the following into a batch file (open notepad or some editor capable of writing a .txt file paste the following in and save it with the extension .bat) and run it.
A rom called COMRIP.nds will appear (batch file may not work on non-XP systems):

[title=click to see batch code]CODErename *.nds t.nds
ndstool -x t.nds -9 arm9.bin -7 arm7.bin -y9 y9.bin -y7 y7.bin -d data -y overlay -t banner.bin -h header.bin
del data\opening.adx
del data\op_d.p256
del data\ev08_05.p256
del data\op.p256
copy data\pl02_02_d.p256 data\ev01_06.p256
copy data\pl02_02_d.p256 data\ev01_06_d.p256
copy data\pl02_02_d.p256 data\ev05_05.p256
copy data\pl02_02_d.p256 data\ev09_05.p256
copy data\pl02_02_d.p256 data\ev09_06.p256
copy data\pl02_02_d.p256 data\pl02_02.p256
copy data\mv01_01.adx data\mv08_01.adx
ndstool -c COMRIP.nds -9 arm9.bin -7 arm7.bin -y9 y9.bin -y7 y7.bin -d data -y overlay -t banner.bin -h header.bin
rename t.nds childrenofmanafull.nds

On my EZ2 I had to cut some of the soundfile to accommodate for EZClients patching mechanisms much like animal crossing, opening movies and in game cutscenes are not around anymore.

Snowboard kids US 512mbit to 256mbit.
Intital CRC32: 7AC43D00
End CRC32: 2EB9BD31
This one is easy (after getting rid of the 00's/FF's at the end of the rom is less than 2mbytes too big) simply disassemble the rom delete the wireless multiboot files (I left the directory intact), this will obviously make wireless multiboot no longer a possibility, then reassemble the rom. Works fine on EZ2 with new years patchDLL.dll file.

If you have a burning desire for wireless multiboot you should be able to make the game work by deleting the hidden characters, other regions should be simple enough except perhaps Europe which due to the extra languages.

If I get bored I will whip up a batch file but quite frankly it is only deleting a few files so it realistically does not need one.

Nintendogs Euro (All versions): 512mbit to 256mbit by deleting unneeded languages:
Initial CRC32's
Nintendogs Labrador and friends: 7F9656C3
Nintendogs Dachshund and friends: 8E7FAA00
Nintendogs Chihuahua and friends: 78678FEF
I have not tried the Dalmatian version yet.

There 20 possible resultant versions (4 games: 5 languages each) so unless I get really bored (upon which I will likely do some more rips) do not expect any resultant CRC32 values soon, there will be even more if you consider leaving multiple languages remaining.

This may not work with the kiosk demo version that was released as it is currently untested but in all truth why would you bother.

You can get this game under 256mbit and not lose any game play aspects easily. I only tested out a French, English and Spanish version although German has been tested by others and there is no reason to suspect it will not work in Italian.
What you need to do is delete all the files pertaining to the other languages on the rom and reassemble the rom having done this. If you are having particular trouble making up a batch file for your desired language post and I or someone else will help (if you are stuck with windows 9x the rd sections could be replaced to use the deltree application)

The batch file following will need to be changed to omit the files for your particular language according to the following few lines i.e. if you want a Spanish language rip make sure there are no Spa sections (compare the French and English rips below if you are having particular trouble):
Spa - Spanish
Ger- German
Fra - French (note the a at the end of the abbreviation)
Ita - Italian
Eng - English

Anyhow on with the batch code that should even clean up after itself, I am almost certain this will not work on non-XP systems (you could use deltree in place of the rd commands and it should work).
Place the Nintendogs rom of choice in a blank directory along with the batch file and ndstool, run the batch file and in about a minute maybe two you will have 2 ROMs appear one called NintendogsEU256rip.nds (guess which one you burn)

It is necessary to set your DS to the language of the rip or you will be white screened.

English 256 rip:

[title=Click to see batch code.]CODErename *.nds t.nds
ndstool -x t.nds -9 arm9.bin -7 arm7.bin -y9 y9.bin -y7 y7.bin -d data -y overlay -t banner.bin -h header.bin
del spa*.* /s
del ger*.* /s
del ita*.* /s
del fra*.* /s
rd data\TrainingBook\Spa_Main /s /q
rd data\TrainingBook\Spa_Sub /s /q
rd data\TrainingBook\Fra_Main /s /q
rd data\TrainingBook\Fra_Sub /s /q
rd data\TrainingBook\Ita_Main /s /q
rd data\TrainingBook\Ita_Sub /s /q
rd data\TrainingBook\Ger_Main /s /q
rd data\TrainingBook\Ger_Sub /s /q
ndstool -c NintendogsEU256rip.nds -9 arm9.bin -7 arm7.bin -y9 y9.bin -y7 y7.bin -d data -y overlay -t banner.bin -h header.bin
rename t.nds NintendogsEUfull.nds
rd data /s /q
rd overlay /s /q
del *.bin

becomes French 256 rip (note a rom called NintendogsFRA256rip.nds will appear in place of the NintendogsEU256rip.nds from the rip above).

[title=Click to see batch code.]CODErename *.nds t.nds
ndstool -x t.nds -9 arm9.bin -7 arm7.bin -y9 y9.bin -y7 y7.bin -d data -y overlay -t banner.bin -h header.bin
del spa*.* /s
del ger*.* /s
del ita*.* /s
del eng*.* /s
rd data\TrainingBook\Spa_Main /s /q
rd data\TrainingBook\Spa_Sub /s /q
rd data\TrainingBook\Eng_Main /s /q
rd data\TrainingBook\Eng_Sub /s /q
rd data\TrainingBook\Ita_Main /s /q
rd data\TrainingBook\Ita_Sub /s /q
rd data\TrainingBook\Ger_Main /s /q
rd data\TrainingBook\Ger_Sub /s /q
ndstool -c NintendogsFRA256rip.nds -9 arm9.bin -7 arm7.bin -y9 y9.bin -y7 y7.bin -d data -y overlay -t banner.bin -h header.bin
rename t.nds NintendogsEUfull.nds
rd data /s /q
rd overlay /s /q
del *.bin

Meteos 256 Mbit rip (all versions)

Initial CRC32's:
European: 2ED041E2
USA: E88BF82E
Japanese: 138556D1
Ripped versions CRC32's later

A great puzzler that is 512MBit in size.

Simple enough to do
Disassemble the rom (the batch file suggestions above are there for a reason)
You will then need to replace the sound_data.sdat with a small one (I used Goldeneye's Sound_Spawn,sdat renamed to sound_data.sdat)
Delete the meteos_c.p256 file
Rebuild

You will obviously lose the sound and a movie but the game is perfectly playable otherwise.

Naruto - Saikyou Ninja Daikesshuu 3 256mbit rip

Thanks to Darkforce over on GBATemp for this

Initial CRC32: 4D99B109
End CRC32: 2EB9BD31
Disassemble the rom (the batch file suggestions above are there for a reason)
You will then need to replace the sound_data.sdat with a small one (I used Goldeneye's Sound_Spawn,sdat renamed to sound_data.sdat)
Delete the following files from the "data\data\tra\" directory
ending1.tra
ending2.tra
load.tra
n64sho.tra

Rebuild the file.

You will lose sounds and the endings screens but should be good otherwise. If you wish you could also play around with having seperate ROMs for all the different levels kind of like the Sonic Rush rip above.

Polarium size decreasing file.

Polarium makes for a great "few megs left need something to put on my cart" type rom and this cuts down the size nicely, Thanks to Chuckstudios for the guide and batchfile.

What you will need to do is delete all the language files you are not going to use, either do it by hand or use the following batch file, I may modify the batch file to make it smaller by including some "del FR_*.* /s" type commands sometime in the near future. Once again should you want a different language rip replace all the FR_ mentions with most likely an EN_ (I did not have the rom to hand when writing this) should you want a French version, FR,GE,IT,SP correspond to German,French, Italian and Spanish.

Polarium.nds's size from 8.00 MB down to 5.64 MB.

[title=Click to see batch code.]CODE@echo off
echo Polarium to Polarium(U) rip V1 by chuckstudios
echo Preparing ROM...
ren *.nds x.nds
echo Disassembling ROM...
ndstool -x x.nds -9 arm9.bin -7 arm7.bin -y9 y9.bin -y7 y7.bin -d data -y overlay -t banner.bin -h header.bin
echo Deleting alternate language files...
del data\pic\clear\FR_congU_bg01_LZ.bin
del data\pic\clear\GE_congU_bg01_LZ.bin
del data\pic\clear\IT_congU_bg01_LZ.bin
del data\pic\clear\SP_congU_bg01_LZ.bin
del data\pic\edit\FR_edt_ng_LZ.bin
del data\pic\edit\FR_edt_ok_LZ.bin
del data\pic\edit\FR_edt_pass_LZ.bin
del data\pic\edit\FR_edt_pwng_LZ.bin
del data\pic\edit\FR_edt_pwok_LZ.bin
del data\pic\edit\FR_edt_txt00_LZ.bin
del data\pic\edit\FR_edt_txt01_LZ.bin
del data\pic\edit\FR_edt_txt02_LZ.bin
del data\pic\edit\FR_edt_txt03_LZ.bin
del data\pic\edit\FR_edt_txt04_LZ.bin
del data\pic\edit\FR_edt_txt05_LZ.bin
del data\pic\edit\FR_edtD_bg0_LZ.bin
del data\pic\edit\FR_edtD_bg1_LZ.bin
del data\pic\edit\FR_edtU_bg_LZ.bin
del data\pic\edit\FR_menu_tit_LZ.bin
del data\pic\edit\GE_edt_ng_LZ.bin
del data\pic\edit\GE_edt_ok_LZ.bin
del data\pic\edit\GE_edt_pass_LZ.bin
del data\pic\edit\GE_edt_pwng_LZ.bin
del data\pic\edit\GE_edt_pwok_LZ.bin
del data\pic\edit\GE_edt_txt00_LZ.bin
del data\pic\edit\GE_edt_txt01_LZ.bin
del data\pic\edit\GE_edt_txt02_LZ.bin
del data\pic\edit\GE_edt_txt03_LZ.bin
del data\pic\edit\GE_edt_txt04_LZ.bin
del data\pic\edit\GE_edt_txt05_LZ.bin
del data\pic\edit\GE_edtD_bg0_LZ.bin
del data\pic\edit\GE_edtD_bg1_LZ.bin
del data\pic\edit\GE_edtU_bg_LZ.bin
del data\pic\edit\GE_menu_tit_LZ.bin
del data\pic\edit\IT_edt_ng_LZ.bin
del data\pic\edit\IT_edt_ok_LZ.bin
del data\pic\edit\IT_edt_pass_LZ.bin
del data\pic\edit\IT_edt_pwng_LZ.bin
del data\pic\edit\IT_edt_pwok_LZ.bin
del data\pic\edit\IT_edt_txt00_LZ.bin
del data\pic\edit\IT_edt_txt01_LZ.bin
del data\pic\edit\IT_edt_txt02_LZ.bin
del data\pic\edit\IT_edt_txt03_LZ.bin
del data\pic\edit\IT_edt_txt04_LZ.bin
del data\pic\edit\IT_edt_txt05_LZ.bin
del data\pic\edit\IT_edtD_bg0_LZ.bin
del data\pic\edit\IT_edtD_bg1_LZ.bin
del data\pic\edit\IT_edtU_bg_LZ.bin
del data\pic\edit\IT_menu_tit_LZ.bin
del data\pic\edit\SP_edt_ng_LZ.bin
del data\pic\edit\SP_edt_ok_LZ.bin
del data\pic\edit\SP_edt_pass_LZ.bin
del data\pic\edit\SP_edt_pwng_LZ.bin
del data\pic\edit\SP_edt_pwok_LZ.bin
del data\pic\edit\SP_edt_txt00_LZ.bin
del data\pic\edit\SP_edt_txt01_LZ.bin
del data\pic\edit\SP_edt_txt02_LZ.bin
del data\pic\edit\SP_edt_txt03_LZ.bin
del data\pic\edit\SP_edt_txt04_LZ.bin
del data\pic\edit\SP_edt_txt05_LZ.bin
del data\pic\edit\SP_edtD_bg0_LZ.bin
del data\pic\edit\SP_edtD_bg1_LZ.bin
del data\pic\edit\SP_edtU_bg_LZ.bin
del data\pic\edit\SP_menu_tit_LZ.bin
del data\pic\game_bg\FR_chaU_bg1_LZ.bin
del data\pic\game_bg\FR_chkD_bg1_LZ.bin
del data\pic\game_bg\FR_chkU_bg1_LZ.bin
del data\pic\game_bg\GE_chaU_bg1_LZ.bin
del data\pic\game_bg\GE_chkD_bg1_LZ.bin
del data\pic\game_bg\GE_chkU_bg1_LZ.bin
del data\pic\game_bg\IT_chaU_bg1_LZ.bin
del data\pic\game_bg\IT_chkD_bg1_LZ.bin
del data\pic\game_bg\IT_chkU_bg1_LZ.bin
del data\pic\game_bg\SP_chaU_bg1_LZ.bin
del data\pic\game_bg\SP_chkD_bg1_LZ.bin
del data\pic\game_bg\SP_chkU_bg1_LZ.bin
del data\pic\howto_bg\FR_tutD_bg1_LZ.bin
del data\pic\howto_bg\FR_tutU_bg1_LZ.bin
del data\pic\howto_bg\GE_tutD_bg1_LZ.bin
del data\pic\howto_bg\GE_tutU_bg1_LZ.bin
del data\pic\howto_bg\IT_tutD_bg1_LZ.bin
del data\pic\howto_bg\IT_tutU_bg1_LZ.bin
del data\pic\howto_bg\SP_tutD_bg1_LZ.bin
del data\pic\howto_bg\SP_tutU_bg1_LZ.bin
del data\pic\rank\FR_daniD_bg1_LZ.bin
del data\pic\rank\FR_daniD_bg3_LZ.bin
del data\pic\rank\FR_daniU_bg1_LZ.bin
del data\pic\rank\GE_daniD_bg1_LZ.bin
del data\pic\rank\GE_daniD_bg3_LZ.bin
del data\pic\rank\GE_daniU_bg1_LZ.bin
del data\pic\rank\IT_daniD_bg1_LZ.bin
del data\pic\rank\IT_daniD_bg3_LZ.bin
del data\pic\rank\IT_daniU_bg1_LZ.bin
del data\pic\rank\SP_daniD_bg1_LZ.bin
del data\pic\rank\SP_daniD_bg3_LZ.bin
del data\pic\rank\SP_daniU_bg1_LZ.bin
del data\pic\game_obj\FR_chaU_bns_LZ.bin
del data\pic\game_obj\FR_chaU_ita_LZ.bin
del data\pic\game_obj\FR_chk_clr_LZ.bin
del data\pic\game_obj\FR_chk_ovr_LZ.bin
del data\pic\game_obj\FR_gameover_LZ.bin
del data\pic\game_obj\FR_menu_tit_LZ.bin
del data\pic\game_obj\GE_chaU_bns_LZ.bin
del data\pic\game_obj\GE_chaU_ita_LZ.bin
del data\pic\game_obj\GE_chk_clr_LZ.bin
del data\pic\game_obj\GE_chk_ovr_LZ.bin
del data\pic\game_obj\GE_gameover_LZ.bin
del data\pic\game_obj\GE_menu_tit_LZ.bin
del data\pic\game_obj\IT_chaU_bns_LZ.bin
del data\pic\game_obj\IT_chaU_ita_LZ.bin
del data\pic\game_obj\IT_chk_clr_LZ.bin
del data\pic\game_obj\IT_chk_ovr_LZ.bin
del data\pic\game_obj\IT_gameover_LZ.bin
del data\pic\game_obj\IT_menu_tit_LZ.bin
del data\pic\game_obj\SP_chaU_bns_LZ.bin
del data\pic\game_obj\SP_chaU_ita_LZ.bin
del data\pic\game_obj\SP_chk_clr_LZ.bin
del data\pic\game_obj\SP_chk_ovr_LZ.bin
del data\pic\game_obj\SP_gameover_LZ.bin
del data\pic\game_obj\SP_menu_tit_LZ.bin
del data\pic\howto_obj\FR_again_LZ.bin
del data\pic\howto_obj\FR_good_LZ.bin
del data\pic\howto_obj\FR_textU01_LZ.bin
del data\pic\howto_obj\FR_textU02_LZ.bin
del data\pic\howto_obj\FR_textU03_LZ.bin
del data\pic\howto_obj\FR_textU04_LZ.bin
del data\pic\howto_obj\FR_textU05_LZ.bin
del data\pic\howto_obj\FR_textU06_LZ.bin
del data\pic\howto_obj\FR_textU07_LZ.bin
del data\pic\howto_obj\FR_textU08_LZ.bin
del data\pic\howto_obj\FR_textU09_LZ.bin
del data\pic\howto_obj\FR_textU10_LZ.bin
del data\pic\howto_obj\FR_textU11_LZ.bin
del data\pic\howto_obj\FR_textU12_LZ.bin
del data\pic\howto_obj\FR_textU13_LZ.bin
del data\pic\howto_obj\FR_textU14_LZ.bin
del data\pic\howto_obj\FR_textU15_LZ.bin
del data\pic\howto_obj\FR_textU16_LZ.bin
del data\pic\howto_obj\FR_tut_menu_LZ.bin
del data\pic\howto_obj\GE_again_LZ.bin
del data\pic\howto_obj\GE_good_LZ.bin
del data\pic\howto_obj\GE_textU01_LZ.bin
del data\pic\howto_obj\GE_textU02_LZ.bin
del data\pic\howto_obj\GE_textU03_LZ.bin
del data\pic\howto_obj\GE_textU04_LZ.bin
del data\pic\howto_obj\GE_textU05_LZ.bin
del data\pic\howto_obj\GE_textU06_LZ.bin
del data\pic\howto_obj\GE_textU07_LZ.bin
del data\pic\howto_obj\GE_textU08_LZ.bin
del data\pic\howto_obj\GE_textU09_LZ.bin
del data\pic\howto_obj\GE_textU10_LZ.bin
del data\pic\howto_obj\GE_textU11_LZ.bin
del data\pic\howto_obj\GE_textU12_LZ.bin
del data\pic\howto_obj\GE_textU13_LZ.bin
del data\pic\howto_obj\GE_textU14_LZ.bin
del data\pic\howto_obj\GE_textU15_LZ.bin
del data\pic\howto_obj\GE_textU16_LZ.bin
del data\pic\howto_obj\GE_tut_menu_LZ.bin
del data\pic\howto_obj\IT_again_LZ.bin
del data\pic\howto_obj\IT_good_LZ.bin
del data\pic\howto_obj\IT_textU01_LZ.bin
del data\pic\howto_obj\IT_textU02_LZ.bin
del data\pic\howto_obj\IT_textU03_LZ.bin
del data\pic\howto_obj\IT_textU04_LZ.bin
del data\pic\howto_obj\IT_textU05_LZ.bin
del data\pic\howto_obj\IT_textU06_LZ.bin
del data\pic\howto_obj\IT_textU07_LZ.bin
del data\pic\howto_obj\IT_textU08_LZ.bin
del data\pic\howto_obj\IT_textU09_LZ.bin
del data\pic\howto_obj\IT_textU10_LZ.bin
del data\pic\howto_obj\IT_textU11_LZ.bin
del data\pic\howto_obj\IT_textU12_LZ.bin
del data\pic\howto_obj\IT_textU13_LZ.bin
del data\pic\howto_obj\IT_textU14_LZ.bin
del data\pic\howto_obj\IT_textU15_LZ.bin
del data\pic\howto_obj\IT_textU16_LZ.bin
del data\pic\howto_obj\IT_tut_menu_LZ.bin
del data\pic\howto_obj\SP_again_LZ.bin
del data\pic\howto_obj\SP_good_LZ.bin
del data\pic\howto_obj\SP_textU01_LZ.bin
del data\pic\howto_obj\SP_textU02_LZ.bin
del data\pic\howto_obj\SP_textU03_LZ.bin
del data\pic\howto_obj\SP_textU04_LZ.bin
del data\pic\howto_obj\SP_textU05_LZ.bin
del data\pic\howto_obj\SP_textU06_LZ.bin
del data\pic\howto_obj\SP_textU07_LZ.bin
del data\pic\howto_obj\SP_textU08_LZ.bin
del data\pic\howto_obj\SP_textU09_LZ.bin
del data\pic\howto_obj\SP_textU10_LZ.bin
del data\pic\howto_obj\SP_textU11_LZ.bin
del data\pic\howto_obj\SP_textU12_LZ.bin
del data\pic\howto_obj\SP_textU13_LZ.bin
del data\pic\howto_obj\SP_textU14_LZ.bin
del data\pic\howto_obj\SP_textU15_LZ.bin
del data\pic\howto_obj\SP_textU16_LZ.bin
del data\pic\howto_obj\SP_tut_menu_LZ.bin
del data\pic\send\SP_comD_bg0_LZ.bin
del data\pic\send\SP_comD_bg1_LZ.bin
del data\pic\send\SP_comU_bg1_LZ.bin
del data\pic\send\FR_comD_bg0_LZ.bin
del data\pic\send\FR_comD_bg1_LZ.bin
del data\pic\send\FR_comU_bg1_LZ.bin
del data\pic\send\IT_comD_bg0_LZ.bin
del data\pic\send\IT_comD_bg1_LZ.bin
del data\pic\send\IT_comU_bg1_LZ.bin
del data\pic\send\GE_comD_bg0_LZ.bin
del data\pic\send\GE_comD_bg1_LZ.bin
del data\pic\send\GE_comU_bg1_LZ.bin
del data\pic\setup\FR_setN_bg0_LZ.bin
del data\pic\setup\FR_setN_bg1_LZ.bin
del data\pic\setup\FR_setU_bg1_LZ.bin
del data\pic\setup\GE_setN_bg0_LZ.bin
del data\pic\setup\GE_setN_bg1_LZ.bin
del data\pic\setup\GE_setU_bg1_LZ.bin
del data\pic\setup\IT_setN_bg0_LZ.bin
del data\pic\setup\IT_setN_bg1_LZ.bin
del data\pic\setup\IT_setU_bg1_LZ.bin
del data\pic\setup\SP_setN_bg0_LZ.bin
del data\pic\setup\SP_setN_bg1_LZ.bin
del data\pic\setup\SP_setU_bg1_LZ.bin
del data\pic\title\FR_selN_bg0_LZ.bin
del data\pic\title\FR_selN_hint_LZ.bin
del data\pic\title\FR_selN_menu_LZ.bin
del data\pic\title\FR_selN_menu_off_LZ.bin
del data\pic\title\FR_selN_open_LZ.bin
del data\pic\title\FR_selN_top_LZ.bin
del data\pic\title\FR_selN_top_off_LZ.bin
del data\pic\title\FR_title_try_LZ.bin
del data\pic\title\FR_try_txt_LZ.bin
del data\pic\title\GE_selN_bg0_LZ.bin
del data\pic\title\GE_selN_hint_LZ.bin
del data\pic\title\GE_selN_menu_LZ.bin
del data\pic\title\GE_selN_menu_off_LZ.bin
del data\pic\title\GE_selN_open_LZ.bin
del data\pic\title\GE_selN_top_LZ.bin
del data\pic\title\GE_selN_top_off_LZ.bin
del data\pic\title\GE_title_try_LZ.bin
del data\pic\title\GE_try_txt_LZ.bin
del data\pic\title\IT_selN_bg0_LZ.bin
del data\pic\title\IT_selN_hint_LZ.bin
del data\pic\title\IT_selN_menu_LZ.bin
del data\pic\title\IT_selN_menu_off_LZ.bin
del data\pic\title\IT_selN_open_LZ.bin
del data\pic\title\IT_selN_top_LZ.bin
del data\pic\title\IT_selN_top_off_LZ.bin
del data\pic\title\IT_title_try_LZ.bin
del data\pic\title\IT_try_txt_LZ.bin
del data\pic\title\SP_selN_bg0_LZ.bin
del data\pic\title\SP_selN_hint_LZ.bin
del data\pic\title\SP_selN_menu_LZ.bin
del data\pic\title\SP_selN_menu_off_LZ.bin
del data\pic\title\SP_selN_open_LZ.bin
del data\pic\title\SP_selN_top_LZ.bin
del data\pic\title\SP_selN_top_off_LZ.bin
del data\pic\title\SP_title_try_LZ.bin
del data\pic\title\SP_try_txt_LZ.bin
del data\pic\vs\FR_vsU_bg1_LZ.bin
del data\pic\vs\FR_vs_lose_LZ.bin
del data\pic\vs\FR_vs_obi_LZ.bin
del data\pic\vs\FR_vs_rud_LZ.bin
del data\pic\vs\FR_vs_sat_LZ.bin
del data\pic\vs\FR_vs_win_LZ.bin
del data\pic\vs\GE_vsU_bg1_LZ.bin
del data\pic\vs\GE_vs_lose_LZ.bin
del data\pic\vs\GE_vs_obi_LZ.bin
del data\pic\vs\GE_vs_rud_LZ.bin
del data\pic\vs\GE_vs_sat_LZ.bin
del data\pic\vs\GE_vs_win_LZ.bin
del data\pic\vs\SP_vsU_bg1_LZ.bin
del data\pic\vs\SP_vs_lose_LZ.bin
del data\pic\vs\SP_vs_obi_LZ.bin
del data\pic\vs\SP_vs_rud_LZ.bin
del data\pic\vs\SP_vs_sat_LZ.bin
del data\pic\vs\SP_vs_win_LZ.bin
del data\pic\vs\IT_vsU_bg1_LZ.bin
del data\pic\vs\IT_vs_lose_LZ.bin
del data\pic\vs\IT_vs_obi_LZ.bin
del data\pic\vs\IT_vs_rud_LZ.bin
del data\pic\vs\IT_vs_sat_LZ.bin
del data\pic\vs\IT_vs_win_LZ.bin
echo Recompiling ROM...
ndstool -c Polarium(Mod-U).nds -9 arm9.bin -7 arm7.bin -y9 y9.bin -y7 y7.bin -d data -y overlay -t banner.bin -h header.bin
ren x.nds Polarium(Old).nds
echo Finished. Polarium(Mod-U).nds is the file you should now use. Polarium(Old).nds is the original file.

Osu! Tatakae! Ouendan 256 rip
This one is a simple soundfile replacement. I am going to have a look at replacing the larger sections of the soundfile to get the rip more playable (it is a humour laden game and the lack of sound does not like it much).

New Super Mario Brothers Hacks, translations and a 128mbit version
This link is not a rip but a patch to get it working on falshcarts: http://ezflash.sosuke.com/viewtopic.php?t=1266 Credit is due to WRG for this I merely made a patch. This patch will unfortunately render you unable to use the following rips with the exception of the translation (do it before patching).

After a build/rebuild with ndstool the rom is just over 19megs and a rip (either sound or levels split) is entirely possible, but given all the other things that have I have been doing with this rom means I have got around to this yet.
In the data\script directory there exists three .bmg files that contain the menu data. It is all in plain ASCII seperated by 00's (Extended ASCII does not work and only gives ?'s).
My initial translations have been made using NDSTS.
French menu translation (it is currently very crude French: up there with zero wing for bad localisation)
You will need XDelta although I have provided a more complex method using IPS patches:
http://evanjones.ca/software/xdelta-win32.html

Using xdelta, a patch and the following batch file you can also get a translation
The patch: In the NSMB hacks directory
The batch code:
CODErename *.nds NSMB.nds
xdelta patch TRANS.patch NSMB.nds NSMBfre.nds

Have the patch, the batch file,xdelta and NSMB (psyfer release) in a blank directory. Run the batch file and in a few seconds you will have a file called NSMBfre.nds pop up. This is what you burn to your cart (after patching with your carts patcher if necessary).

I tested it on an EZ4 and it works fine.

See this thread for more information: http://www.sosuke.com/ezflash/viewtopic.php?p=6851

All the files are named fairly nicely (maps, enemies etc) and are referred to in each other so you could theoretically create a hard mode hack (different enemy placement, more enemies, different enemies etc). I am going to focusing my efforts on this for the time being.


*Rip guides I would like to see/am working on:

Seen as I have an EZ4 now many more rips and tweaks will come to light over the next few weeks.

Metroid Prime Hunters 512 to 256
Had a look at the file but it looks like a split for multi and single player or levels split (single player by all accounts was not good anyway) as the language sound and video combined when removed do not make it small enough.

Tony Hawk's American SK8land 512mbit to 256mbit.

A release group (I forget which) actually made a 256mbit rip, it was left only with one song but they never released the method.
Slade suggests deleting the contents of the ROM between 1AF1800 and 3CEF3D4 thus eliminating most of the soundtrack but getting the ROM small enough, I will test it soon.

Owing to the reverse engineering of the DS soundfiles: http://sosuke.com/ezflash/viewtopic.php?t=1221 I may even have some methods to make custom soundtracks, curently I have no compatible codec (it is an unknown ADPCM variant) so replacing the soundfiles gives a just about recognisable sound that surpasses any death metal you will have ever heard.

Biohazard/Resident Evil 1gig to 512mbit (2 seperate characters)
Raeca had this rip but did not release the method, no worries it should be fairly simple, a 256mbit may also be possible if video and sound were dropped but this would spoil the fun.
Slade made a rip contained later in this thread although only the main/intro video was deleted, only the Euro version (Japanese untested) works with EZFlash carts right now.
Rip link:
http://sosuke.com/ezflash/viewtopic.php?t=457&start=14

I have also been looking at this and a 256rip may be possible.

Mario Kart 256 to 128mbit
Made as a nod to the few with a 128mbit cart, how you all are playing with DS commercial roms I do not know but anyway stick with it.

You can rip tracks and other things out and compile separate ROMs, however I want to try and do it with all the new tracks and all the classic tracks on two seperate ROMs, I may also consider an online tracks version.
Everyone else stick with the full rom.

Marvel Nemesis 512 to 256mbit.
I have a working copy but I feel I deleted and replaced too much for it to be worthwhile (I deleted characters which may also cause the game to crash as play goes on and Goldeneye’s sounds which I used to replace the original ones are no good).

Super Monkey Ball 512 to 256mbit:
Had a look at the rom and there are nicely named files for things like the golf minigames.

Japanese Games 512 to 256mbit
As usual the rest of the world are left out (at least for a while) on some of the good Japanese language games, but some of these are 512mbit in size.... can you see where this is heading (Tenchu is first up on my list right now I.E it is almost done).

Warioware touched enhancements
Some great games were included in the Japanese version such as a spot the difference game in 9volts section, some games were also altered when coming out of Japan. Ashley's song is also great in Japanese.
A bit of renaming and copying should be able to achieve something good.
 

eltrut

Well-Known Member
Member
Joined
Jan 30, 2008
Messages
130
Trophies
0
XP
82
Country
Just downloaded the new Romhacking101 odf wanting to get into translations, so far it seems to cover nearly everything i need to know bar Japanese!

Thanks FAST for being awesome
 

Sp33der

Well-Known Member
Member
Joined
May 31, 2008
Messages
435
Trophies
0
XP
78
Country
Netherlands
FAST, i was messgin around with the graphics of Kidou Senshi Gundam 00 DS,
And i'm wondering how do you get the image so nicely "clean"(can't describe it very well) like this: http://gbatemp.net/pix/32303/gundam2.JPG

i jsut get some garbled pixels :S, how do you find it the correct graphics/buttons/pictures?
 

FAST6191

Techromancer
OP
Editorial Team
Joined
Nov 21, 2005
Messages
36,798
Trophies
3
XP
28,348
Country
United Kingdom
I forget the file extension (the name should be the same/similar to the file that holds the images) but crystaltile2 supports the format that holds the layout of the images.

Open the file viewer and right click, the option to load it should be there along with the palette and the image itself.
 

psycoblaster

Divine
Member
Joined
Jan 26, 2008
Messages
2,131
Trophies
0
Age
33
Location
Seoul.. (in Korea)
Website
Visit site
XP
211
Country
Sp33der said:
FAST, i was messgin around with the graphics of Kidou Senshi Gundam 00 DS,
And i'm wondering how do you get the image so nicely "clean"(can't describe it very well) like this: http://gbatemp.net/pix/32303/gundam2.JPG

i jsut get some garbled pixels :S, how do you find it the correct graphics/buttons/pictures?
load the map and the palette
 

Sp33der

Well-Known Member
Member
Joined
May 31, 2008
Messages
435
Trophies
0
XP
78
Country
Netherlands
w00t is worked thanks guys
biggrin.gif
, this does works for everything or just with this rom? Which uses narc files.
 

Algester

Active Member
Newcomer
Joined
Sep 17, 2008
Messages
43
Trophies
0
Website
Visit site
XP
224
Country
just asking on is there a way to convert .VXDS extension to .MODS extension (both are video extensions) or vice versa im still willing to go on making a self made undub for rune factory 2
 

nIxx

Well-Known Member
Member
Joined
Sep 30, 2007
Messages
1,544
Trophies
0
Location
Germany
Website
Visit site
XP
337
Country
Gambia, The
Hi
So basically i want to find the compression/encoding method for the text and i´m using iDeaS for debugging.
Now i´m trying to learn ASM to find how the text is encoded in NDS games.
But since i never really done something with ASM (only a bit MC programming) do you guys could lead me to a good documentation (if there is anyone).
wink.gif
 

Noitora

::
Member
Joined
Aug 9, 2007
Messages
3,760
Trophies
1
Age
32
Location
Athens
Website
www.noitora.eu.pn
XP
289
Country
Greece
nIxx said:
Hi
So basically i want to find the compression/encoding method for the text and i´m using iDeaS for debugging.
Now i´m trying to learn ASM to find how the text is encoded in NDS games.
But since i never really done something with ASM (only a bit MC programming) do you guys could lead me to a good documentation (if there is anyone).
wink.gif
gbatek has everything you need.
 

SCVgeo

Well-Known Member
Member
Joined
Nov 5, 2008
Messages
115
Trophies
0
Age
37
Location
USA
Website
projectpokemon.org
XP
175
Country
United States
nIxx said:
Thanks.
But how do i find where the ASM part for the text encoding starts ?
For example for Chrono Trigger DS:
http://gbatemp.net/index.php?act=findpost&pid=1809981
Like Crosser said in your thread, you need a debugger. no$gba debugger is great but seems to be unavailable for now. So unless you bought a copy that you did not know how to use so have not touched, you probably won't get one. (I had mine for over a year before I learned how to use it).

You might try Desmume, it has a decent disassembler but I could not get Chrono Trigger to run there (sav issues)
 

FAST6191

Techromancer
OP
Editorial Team
Joined
Nov 21, 2005
Messages
36,798
Trophies
3
XP
28,348
Country
United Kingdom
Short intro to ASM on the GBA/DS. I have some other stuff in the new version of my rom hacking docs that I posted a few posts back (the odt format one).

It is assumed you know what assembly is, if you do not it is the name given to machine code (1s and 0s) that has been turned into a more human readable form. When talking about assembly from rom hacking we are almost invariably talking about disassembled code which lacks any comments from the developers and may also include stuff that is not assembly but has been disassembled none the less (text is often included in binaries).

Being machine code there are few niceties that more common languages have but that allows for far greater levels of control and far faster speeds if you know what you are doing.
In short you need to know the hardware, fortunately there is GBAtek for this:
http://nocash.emubase.de/gbatek.htm

It also helps to understand the basics behind the DS "format", "the smallest nds file" work from suits that task quite well:
http://imrannazar.com/The-Smallest-NDS-File

After you get past that though most assembly work is fairly similar across all platforms and assemblers. So ideally while there would be an intro to DS assembly there is none, the best we have is
http://quirkygba.blogspot.com/2008/12/thin...know-about.html

In this case we look to X86.
http://burks.brighton.ac.uk/burks/language...ut/asm1.htm#toc
The above also includes nicely worked examples of several simple and not so simple methods.
And another (probably better than above)
http://webster.cs.ucr.edu/AoA/index.html
http://www.drpaulcarter.com/pcasm/

Now for tools. The NO$GBA emulator is rightly considered a top flight tool and there are few things that come close, the assembly sections are paid software and the author is AWOL right now so you could not even get a copy if you wanted.

Still desmume has a decent debugging kit
http://www.desmume.com/
Crystaltile2 is probably the best assembly tool in place of NO$GBA
http://bg.tgb.net.cn/ there are some posts around here but it also supports NEF files so you can essentially make your own comments and convert a few structures to a more readable format.
A long standing disassembler for the DS:
http://hp.vector.co.jp/authors/VA018359/nds/ndshack.html

ARM assemblers:
http://common-lisp.net/project/armish/
http://labmaster.bios.net.nz/pyga/
http://www.romhacking.net/utils/343/ (ARM7 only)

See also LIARDS by the same author if you plan on doing DS homebrew using assembly although it has some use for the "inline style" assembly hacks:
http://common-lisp.net/project/liards/

IDA is a popular tool in disassembly circles, here is a plugin for the DS
http://www.openrce.org/downloads/details/56/NDSLDR

The GBA is a bit nicer. GBA roms are self contained unlike the DS which uses a file system. This allows tracing ( http://www.romhacking.net/docs/361/ and http://labmaster.bios.net.nz/vba-sdl-h/ ) and there is also a bit more in the way of tutorials:
http://www.coranac.com/tonc/text/asm.htm
http://patater.com/gbaguy/gbaasm.htm
http://gbadev.org/docs.php
http://nocash.emubase.de/gbatek.htm
 

fgghjjkll

GBATemp MegaMan
Member
Joined
Jul 7, 2008
Messages
2,043
Trophies
0
Age
28
XP
1,038
umm.....translhextion is now fucking up when i load sjis.tbl or euc.tbl and i dont like windhex's interface. someone reccomend me one?
 

Site & Scene News

Popular threads in this forum

General chit-chat
Help Users
    DinohScene @ DinohScene: ahh nothing beats a coffee disaronno at work