1. AparoidX

    OP AparoidX Member

    Apr 22, 2008
    United States
    Hi all.

    I am working through cracker's Advanced DS Trainer Tutorial and need some clarification. I am using Super Monkey Ball from the basic trainer tutorial, but applying the hooking methods in the advanced tutorial. My jump code occurs at 0x020AD1F0, when the total # of lives is subtracted by one:
    hook only no trainer fn 1.png

    The jump code works fine. However, I am having a hard time understanding how to insert the actual trainer function. The tutorial mentions placing the code at the beginning of the ARM9 binary, which looks to be at 0x4000 in the ROM. If I only apply the jump code without the trainer function, the ROM runs okay, and will jump to 0x02000000 as expected:
    hook only no trainer fn 2.png

    Once it is here, it gets stuck at a loop later on in code, but I can also edit the assembly once the ROM is loaded and it will execute just fine:
    hook only no trainer fn 3.png

    The problem occurs when I try to "hard-code" this trainer function into the ROM. I expect that I can just insert my code via a hex editor without issue (slightly different code, but I get the same end result either way):
    hook and trainer arm9 code.png

    When I try to load the ROM in no$gba, it fails, I get an error, and the assembly looks messed up:
    hook and trainer fn error.png

    I'm having a hard time understanding the difference between copy/pasting this assembly into the start of the ARM9 binary, and just editing the assembly in memory once the game is loaded. I want to be able to make a trainer that can run on a flashcart. I have tried pasting in the trainer function at 0x4000 in the ROM with a hex editor, and have also unpacked the ROM contents, edited ARM9.bin directly, and repacked; neither worked.

    The Advanced DS Trainer Tutorial doesn't seem to go into detail on copying the code into the ROM, and I'm clearly missing something. If anyone can point me in the right direction, I would be very appreciative!

    Thank you!
    Last edited by AparoidX, May 15, 2018
Draft saved Draft deleted

Hide similar threads Similar threads with keywords - crackers, Advanced, Tutorial