ARM7 swapping batch file

Discussion in 'NDS - ROM Hacking and Translations' started by FAST6191, Aug 29, 2007.

Aug 29, 2007

ARM7 swapping batch file by FAST6191 at 11:52 PM (14,033 Views / 0 Likes) 31 replies

  1. FAST6191
    OP

    Reporter FAST6191 Techromancer

    pip
    Joined:
    Nov 21, 2005
    Messages:
    21,713
    Country:
    United Kingdom
    As some of you may be aware the arm7 binary of the DS rom contains the "copy protection" code, is also the same for a large selection of roms meaning that you can swap out a unpatchable arm7.bin for and older patchable version should your cart of choice not have an update to cope with the new protection.
    Rather than mess around with DSBuff/DSLazy I figured I would beat my ndstool batch files into something that would do it for you.
    I am in a bit of rush so it will be the definition of quick and dirty (the clean up sections were quite literally tacked on in about 10 seconds), it does however work (and it does not need .net either).

    To use, first here is the batch file code:

    Edit: updated the batch file.

    Code:
    ndstool -x donate.nds -7 arm7new.bin
    ndstool -x swap.nds -9 arm9.bin -7 arm7.bin -y9 y9.bin -y7 y7.bin -d data -y overlay -t banner.bin -h header.bin
    copy arm7new.bin arm7.bin /y
    ndstool -c finished.nds -9 arm9.bin -7 arm7.bin -y9 y9.bin -y7 y7.bin -d data -y overlay -t banner.bin -h header.bin
    
    rmdir data\ /S/Q
    rmdir overlay\ /S/Q
    del *.bin
    Have the rom you want to donate from called donate.nds and the rom to be swapped called swap.nds (I will sort this later so you can have whatever you want and I might even make a GUI) in the same directory and ndstool and the batch file.
    Run it and up will spring a file called finished.nds, use this file as usual.

    Some of you may not have used a batch file before, if so:
    Copy that into notepad and save with the extension .bat
    Take this new .bat file and place it in an empty directory along with the rom that is donating the ARM7.bin (named donate.nds), the one that is getting it (swap.nds) and ndstool.

    If you do not have a copy of ndstool here is the one I use:
    http://www.4shared.com/file/2170119/a40ec269/ndstool.html
    Here is darkfader's mirror:
    http://darkfader.net/ds/
    Here is devkitpro (the package the tool originally comes from):
    http://www.devkitpro.org/downloads/
     


  2. kazumi213

    Member kazumi213 GBAtemp Regular

    Joined:
    Oct 16, 2006
    Messages:
    293
    Country:
    Spain
    Thanks FAST6191 [​IMG]
     
  3. bullet007

    Member bullet007 GBAtemp Regular

    Joined:
    May 22, 2006
    Messages:
    155
    Country:
    Old, someone already made a program like this. The entire arm7 fix for the games is documented here:

    http://gbatemp.net/index.php?showtopic=55163&hl=

    Just use the program in the link on that topic (http://m3.omgrofl.com/files/patches/arm7_fix.zip) that does it all very quickly and easily. [​IMG]
     
  4. FAST6191
    OP

    Reporter FAST6191 Techromancer

    pip
    Joined:
    Nov 21, 2005
    Messages:
    21,713
    Country:
    United Kingdom
    I saw that as soon as I posted it. No worries, I needed to brush up a bit on the command prompt.
     
  5. bullet007

    Member bullet007 GBAtemp Regular

    Joined:
    May 22, 2006
    Messages:
    155
    Country:
    Once you make it a GUI, it will be a whole lot easier though! [​IMG]
     
  6. Rayder

    Former Staff Rayder Mostly lurking lately....

    Joined:
    Jan 14, 2007
    Messages:
    6,613
    Location:
    USA
    Country:
    United States
    Yeah, I found a file that does this just a little while ago.....I uploaded it to the GBAtemp Downloads under the Tools & Utilities sections....awaiting validation.

    I verified that it works with Worms2 and Simple DS series 21 on the R4DS using the SimCity (J) ROM as the "doner". Any noob should be able to use this to fix ROMs that require the ARM7 fix.

    It contains a readme (credits to the creators and instructions for use), a bat file, 2 folders (doner & patient) and NDStools.exe. It's 48k zipped.


    Until it validates, you can get it here:

    arm7_fix.zip (48k)
     
  7. Rayder

    Former Staff Rayder Mostly lurking lately....

    Joined:
    Jan 14, 2007
    Messages:
    6,613
    Location:
    USA
    Country:
    United States

    Heh, I found the same file. [​IMG]
     
  8. FAST6191
    OP

    Reporter FAST6191 Techromancer

    pip
    Joined:
    Nov 21, 2005
    Messages:
    21,713
    Country:
    United Kingdom
    Started work on a GUI:

    forgive the complete lack of order in it, I will tidy it up in the morning:

    [​IMG]
     
  9. kazumi213

    Member kazumi213 GBAtemp Regular

    Joined:
    Oct 16, 2006
    Messages:
    293
    Country:
    Spain
    Looks great to me FAST6191, so even more thanks [​IMG]
     
  10. superrob

    Member superrob H4X H4X H4X!

    Joined:
    Apr 4, 2007
    Messages:
    2,465
    Location:
    GBATemp factory.
    Country:
    Denmark
    Nice work FAST6191 [​IMG]

    Good for use if Nintendo plans to use the same sav thingy that keeped the worms from working without the patch [​IMG]
     
  11. jmm0070

    Newcomer jmm0070 Member

    Joined:
    Aug 26, 2007
    Messages:
    14
    Country:
    Chile

    how do i make it work on ds-x? i can make the nds file but when i try to run it in the ds it just shows me a white screen, what rarely happens...
     
  12. m_babble

    Member m_babble The Bad Boy of Good Behavior

    Joined:
    Dec 12, 2004
    Messages:
    564
    Country:
    United States
    When are you going to release FASTARM?
     
  13. FAST6191
    OP

    Reporter FAST6191 Techromancer

    pip
    Joined:
    Nov 21, 2005
    Messages:
    21,713
    Country:
    United Kingdom
    In what must seem almost a traditional response "When it gets done", I have about 15 different projects right now as well as my tendency to watch videos on my computer when I am on it does not help either.

    I am also toying with the idea of copying the code across (it is quite simple in theory) rather than "rebuilding" but I will have to brush up on my C as autoit and ASM probably will not cut it (I would like to have a level of portability).

    Guess I could tweak one of the save conversion apps though.
     
  14. Wii_DS.

    Banned Wii_DS. ウォリアー

    Joined:
    Sep 5, 2007
    Messages:
    681
    Country:
    United Kingdom
    Good GUI, Basic and Simple. Wheres the download link?

    EDIT: Never mind, seen the post above mine.
     
  15. FAST6191
    OP

    Reporter FAST6191 Techromancer

    pip
    Joined:
    Nov 21, 2005
    Messages:
    21,713
    Country:
    United Kingdom
    There is no download link as I the GUI is little more than a glorified picture at present.
    There a few other scripts, explanations and GUI based methods linked in this thread and further links in those threads though.

    Edit to acknowledge the edit above.
     
  16. hakdizzle

    Member hakdizzle GBAtemp Regular

    Joined:
    May 6, 2006
    Messages:
    119
    Location:
    USA
    Country:
    United States
    Great Thanks
     
  17. DwayneDays

    Newcomer DwayneDays Newbie

    Joined:
    Sep 16, 2007
    Messages:
    3
    Country:
    United States
    Sorry to sound like a huge noob here but im having a problem

    The game thats giving me the problem is tiger woods 08. So I got the tw nds file and the hosigami (j) nds file created the batch file then put them all in the same folders as the ndstool and loaded up the batch. The finished file I keep getting is okb big. A I doing somthing monumentally wrong?

    EDIT. And yes iv'e renamed the two files to swap and donate.nds
     
  18. FAST6191
    OP

    Reporter FAST6191 Techromancer

    pip
    Joined:
    Nov 21, 2005
    Messages:
    21,713
    Country:
    United Kingdom
    I improved the batch file (forgot somehow that a full disassembly was not needed for the donor). Same everything else as before. @DwayneDays try the new version below.

    Code:
    ndstool -x donate.nds -7 arm7new.bin
    ndstool -x swap.nds -9 arm9.bin -7 arm7.bin -y9 y9.bin -y7 y7.bin -d data -y overlay -t banner.bin -h header.bin
    copy arm7new.bin arm7.bin /y
    ndstool -c finished.nds -9 arm9.bin -7 arm7.bin -y9 y9.bin -y7 y7.bin -d data -y overlay -t banner.bin -h header.bin
    
    rmdir data\ /S/Q
    rmdir overlay\ /S/Q
    del *.bin
    Edit: updated first post and put in some work on the GUI. Hopefully the later will be ready some point in the next day or so.
     
  19. DwayneDays

    Newcomer DwayneDays Newbie

    Joined:
    Sep 16, 2007
    Messages:
    3
    Country:
    United States
  20. FAST6191
    OP

    Reporter FAST6191 Techromancer

    pip
    Joined:
    Nov 21, 2005
    Messages:
    21,713
    Country:
    United Kingdom
    Care to elaborate on that DwayneDays or even say if you tried the new version?
     

Share This Page