wiki.mbirth.de

All you never wanted to know

View on GitHub
:new: 2009-03-16

ndstool

The ndstool can show header information of ROM files as well as extract the game logo or even the whole ROM contents. It also can recombine the extracted ROM contents to a working ROM again.

Example output

This is from the Linux binary (see above):

Nintendo DS rom tool 1.36 - Jul 31 2007 23:26:46
by Rafael Vuijk, Dave Murphy, Alexei Karpenko
Header information:
0x00    Game title                  BANDBROS DX
0x0C    Game code                   AXBJ (NTR-AXBJ-JPN)
0x10    Maker code                  01 (Nintendo)
0x12    Unit code                   0x00
0x13    Device type                 0x00
0x14    Device capacity             0x09 (512 Mbit)
0x15    reserved 1                  000000000000000000
0x1E    ROM version                 0x00
0x1F    reserved 2                  0x00
0x20    ARM9 ROM offset             0x4000
0x24    ARM9 entry address          0x2000800
0x28    ARM9 RAM address            0x2000000
0x2C    ARM9 code size              0xADBB4
0x30    ARM7 ROM offset             0x172000
0x34    ARM7 entry address          0x2380000
0x38    ARM7 RAM address            0x2380000
0x3C    ARM7 code size              0x26F28
0x40    File name table offset      0x198F28
0x44    File name table size        0xBFF1
0x48    FAT offset                  0x1A4F1C
0x4C    FAT size                    0x4BA8
0x50    ARM9 overlay offset         0xB1BC0
0x54    ARM9 overlay size           0x2E0
0x58    ARM7 overlay offset         0x0
0x5C    ARM7 overlay size           0x0
0x60    ROM control info 1          0x00416657
0x64    ROM control info 2          0x081808F8
0x68    Icon/title offset           0x1A9C00
0x6C    Secure area CRC             0xD9F8 (OK, decrypted)
0x6E    ROM control info 3          0x0D7E
0x70    ARM9 ?                      0x2000AAC
0x74    ARM7 ?                      0x2380188
0x78    Magic 1                     0x00000000
0x7C    Magic 2                     0x00000000
0x80    Application end offset      0x036DF558
0x84    ROM header size             0x00004000
0x88    ?                           0x00004BA0
0x15C   Logo CRC                    0xCF56 (OK)
0x15E   Header CRC                  0xF657 (OK)

Banner CRC:                         0x2934 (OK)
English banner text, line 1:        _______
English banner text, line 2:        ________DX
English banner text, line 3:        Nintendo

ARM9 footer found.

Security data CRC (0x1000-0x2FFF)  0x6FFF
Segment3 CRC (0x3000-0x3FFF)       0x0000 (INVALID)

This is from the Python version:

Header Information:
0x00    Game title                      BANDBROS DX
0x0C    Game code                       AXBJ (NTR-AXBJ-JPN)
0x10    Maker code                      01 (Nintendo)
0x12    Unit code                       0x00
0x13    Device type                     0x00
0x14    Device capacity                 0x09 (512 Mbit)
0x15    Reserved 1                      000000000000000000
0x1E    ROM Version                     0x00
0x1F    Reserved 2                      0x00
0x20    ARM9 ROM offset                 0x4000
0x24    ARM9 entry address              0x2000800
0x28    ARM9 RAM address                0x2000000
0x2C    ARM9 code size                  0xADBB4
0x30    ARM7 ROM offset                 0x172000
0x34    ARM9 entry address              0x2000800
0x38    ARM7 RAM address                0x2380000
0x3C    ARM7 code size                  0x26F28
0x40    File name table offset          0x198F28
0x44    File name table size            0xBFF1
0x48    FAT offset                      0x1A4F1C
0x4C    FAT size                        0x4BA8
0x50    ARM9 overlay offset             0xB1BC0
0x54    ARM9 overlay size               0x2E0
0x58    ARM7 overlay offset             0x00
0x5C    ARM7 overlay size               0x00
0x60    ROM control info 1              0x00416657
0x64    ROM control info 2              0x081808F8
0x6E    ROM control info 3              0x0D7E
0x68    Icon/Title offset               0x1A9C00
0x6C    Secure area CRC                 0xD9F8 (OK, decrypted)
0x70    ARM9?                           0x02000AAC
0x74    ARM7?                           0x02380188
0x78    Magic 1                         0x00000000
0x7C    Magic 2                         0x00000000
0x80    Application end offset          0x036DF558
0x84    ROM header size                 0x00004000
0x15C   Logo CRC                        0xCF56 (OK)
0x15E   Header CRC                      0xF657 (OK)

Banner CRC:                             0x2934 (OK)
Japanese banner text, line 1:           だいがっそう!
Japanese banner text, line 2:           バンドブラザーズDX
Japanese banner text, line 3:           Nintendo

ARM9 footer found.

Security data CRC (0x1000-0x2FFF)       0x6FFF
Segment3 CRC (0x3000-0x3FFF)            (NYI)
Loading Google+ comments…