How do I unpack a ROM?

Discussion in 'NDS - ROM Hacking and Translations' started by linkmaster03, Feb 3, 2007.

Feb 3, 2007

How do I unpack a ROM? by linkmaster03 at 5:44 PM (1,036 Views / 0 Likes) 4 replies

  1. linkmaster03
    OP

    Newcomer linkmaster03 Advanced Member

    Joined:
    Dec 27, 2006
    Messages:
    86
    Country:
    United States
    How do I unpack (or whatever) a ROM? I want to edit it. Please someone help!!
     
  2. MaHe

    Member MaHe one lazy schmo

    Joined:
    Aug 4, 2006
    Messages:
    1,101
    Location:
    Maribor
    Country:
    Slovenia
  3. FAST6191

    Reporter FAST6191 Techromancer

    pip
    Joined:
    Nov 21, 2005
    Messages:
    21,697
    Country:
    United Kingdom
    Dslazy is nice and all but I hate .net (and I sense I am not alone), I personally use batch files to run ndstool (which is ina sense what dslazy does.

    Although it will not be a complete unpack you can also use something like NDSTS or NDSHV
    NDSTS:
    http://www.gbadat.altervista.org/tools.htm
    NDSHV:
    http://www.nintenren.com/ndshv/

    Normally I would link to this thread: http://www.sosuke.com/ezflash/viewtopic.php?t=457 but assuming you have a copy of ndstool (I like to use a slightly older version:
    http://www.4shared.com/file/2170119/a40ec269/ndstool.html _

    Batch files:
    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.

    Code:
    rename *.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:

    Code:
    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
    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.
     
  4. linkmaster03
    OP

    Newcomer linkmaster03 Advanced Member

    Joined:
    Dec 27, 2006
    Messages:
    86
    Country:
    United States
    THANKS A TON! Thanks man, you guys rock.
     
  5. Mewgia

    Member Mewgia drifter

    Joined:
    Dec 16, 2006
    Messages:
    2,161
    Location:
    Boston, MA
    Country:
    United States
    Ooh, miniguide, yay. Maybe I can put this to use as well...
     

Share This Page