ARM7 swapping batch file

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

  1. FAST6191
    OP

    FAST6191 Techromancer

    pip Reporter
    22,927
    8,601
    Nov 21, 2005
    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

    kazumi213 GBAtemp Regular

    Member
    293
    0
    Oct 16, 2006
    Thanks FAST6191 [​IMG]
     
  3. bullet007

    bullet007 GBAtemp Regular

    Member
    155
    0
    May 22, 2006
    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

    FAST6191 Techromancer

    pip Reporter
    22,927
    8,601
    Nov 21, 2005
    I saw that as soon as I posted it. No worries, I needed to brush up a bit on the command prompt.
     
  5. bullet007

    bullet007 GBAtemp Regular

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

    Rayder Mostly lurking lately....

    Former Staff
    6,613
    130
    Jan 14, 2007
    United States
    USA
    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

    Rayder Mostly lurking lately....

    Former Staff
    6,613
    130
    Jan 14, 2007
    United States
    USA

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

    FAST6191 Techromancer

    pip Reporter
    22,927
    8,601
    Nov 21, 2005
    Started work on a GUI:

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

    [​IMG]
     
  9. kazumi213

    kazumi213 GBAtemp Regular

    Member
    293
    0
    Oct 16, 2006
    Looks great to me FAST6191, so even more thanks [​IMG]
     
  10. superrob

    superrob H4X H4X H4X!

    Member
    2,465
    3
    Apr 4, 2007
    GBATemp factory.
    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

    jmm0070 Member

    Newcomer
    14
    0
    Aug 26, 2007
    Cote d'Ivoire

    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

    m_babble The Bad Boy of Good Behavior

    Member
    577
    35
    Dec 12, 2004
    United States
    When are you going to release FASTARM?
     
  13. FAST6191
    OP

    FAST6191 Techromancer

    pip Reporter
    22,927
    8,601
    Nov 21, 2005
    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.

    Wii_DS. ウォリアー

    Banned
    681
    0
    Sep 5, 2007
    Good GUI, Basic and Simple. Wheres the download link?

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

    FAST6191 Techromancer

    pip Reporter
    22,927
    8,601
    Nov 21, 2005
    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

    hakdizzle GBAtemp Regular

    Member
    119
    0
    May 6, 2006
    United States
    USA
    Great Thanks
     
  17. DwayneDays

    DwayneDays Newbie

    Newcomer
    3
    0
    Sep 16, 2007
    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

    FAST6191 Techromancer

    pip Reporter
    22,927
    8,601
    Nov 21, 2005
    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

    DwayneDays Newbie

    Newcomer
    3
    0
    Sep 16, 2007
    United States
    you suck
     
  20. FAST6191
    OP

    FAST6191 Techromancer

    pip Reporter
    22,927
    8,601
    Nov 21, 2005
    Care to elaborate on that DwayneDays or even say if you tried the new version?