Reverse engineering Golden Sun Dark Dawn EXP Multiplyer Code

Discussion in 'NDS - ROM Hacking and Translations' started by NJim, Jan 4, 2011.

  1. NJim
    OP

    Newcomer NJim Member

    Joined:
    May 1, 2009
    Messages:
    18
    Country:
    Australia
    2x
    5212194C E0820000
    1212194C 00000080
    D0000000 00000000

    4x
    5212194C E0820000
    1212194C 00000100
    D0000000 00000000

    8x
    5212194C E0820000
    1212194C 00000180
    D0000000 00000000

    16x
    5212194C E0820000
    1212194C 00000200
    D0000000 00000000

    These are the codes for increasing the amount of EXP you get, but I feel that the game is way too easy even without cheats on, so I was wondering how I would go about making a code to cut EXP gain by half from these, and I have no idea about code making.

    I noticed the only thing that changes is the last 3 digits of the 4th group, increasing by 20, then 80.
    By the pattern of the way it increases, going backwards by that same pattern would result in 000 being 1x EXP. Obviously I can't go into the negatives so I can't for the life of me figure out how.
     
  2. yab

    Newcomer yab Member

    Joined:
    Jan 4, 2011
    Messages:
    26
    Country:
    United States
    This isn't as straightforward as it looks because the code is changing instructions, it's looking for a code E0820000 which is
    add r0, r2, r0 (r0 = r2 + r0)

    and editing only the low bits, for example the x4 code is changed into E0820100
    which is
    add r0, r2, r0, lsl 2 (this shifts r0 left twice for x4 before adding)

    what you want is the opposite, to do a right shift.
    add r0, r2, r0, lsr 1
    which is E08200A0 (you can use an assembler, maybe more information is in the rom hacking thread)

    Since your code is only changing the last part of the instruction, the updated code should be

    0.5x
    5212194C E0820000
    1212194C 000000A0
    D0000000 00000000
     
    joshuatm likes this.
  3. NJim
    OP

    Newcomer NJim Member

    Joined:
    May 1, 2009
    Messages:
    18
    Country:
    Australia
    Awesome! Thanks a lot.
     
  4. iDarkTrace

    Newcomer iDarkTrace Advanced Member

    Joined:
    Jun 25, 2010
    Messages:
    88
    Location:
    Canada
    Country:
    Canada
    Awesome! A 0.5x exp hack! But here is the problem with this hack, since the game is unbalanced difficulty-wise, when you fight Chaos Chimera, you are going to ragequit and turn your DS into a brick.
     
  5. lexa000

    Newcomer lexa000 Newbie

    Joined:
    Mar 17, 2010
    Messages:
    2
    Location:
    Really Western Sydney
    Country:
    Australia
    Thats why you change it to x16 for the end of the game, so by the time you hit the last boss, you are at an adequate level to kill him.
     
  6. Arshes91

    Member Arshes91 GBAtemp Regular

    Joined:
    Sep 22, 2010
    Messages:
    264
    Country:
    Italy
    [​IMG] wooow cool if you have time can possibility create an similar code exp 0.5 but for pokemon Black and White please
     
  7. cearp

    Member cearp the ticket master

    Joined:
    May 26, 2008
    Messages:
    7,181
    Country:
    Tuvalu
  8. FAST6191

    Reporter FAST6191 Techromancer

    pip
    Joined:
    Nov 21, 2005
    Messages:
    21,699
    Country:
    United Kingdom
    Looking at the posts above not really -- multiplying/dividing by 2 is the binary equivalent of multiplying/dividing by 10 in decimal in that you just shift the "decimal" point around and you have your operation (it is why the progression up there is 2,4,8,16.....).

    Now it would not be that hard to do it in operations (0.75 == 0.5 + 0.25 after all*) but that would probably mean stashing some new code in there, adding a jump, doing the operation and jumping back. Nothing major or even out of the realm of applying it in cheats but considerably more troublesome than tweaking the existing codes.

    *you should shift once, store the resulting value, shift again and redo the calculation for the new multiplier and then add results of the two operations together.

    If your cart has cheat enable/disable I would instead suggest just disabling the exp cheats every so often and having the same thing happen (mean of 1 and 0.5 is 0.75 after all).
     
    joshuatm and Rydian like this.
  9. cearp

    Member cearp the ticket master

    Joined:
    May 26, 2008
    Messages:
    7,181
    Country:
    Tuvalu
    sure, i thought about using the cheat every other time i play the game, just, of course it would be nice to not worry about it ;)
    since you gave an outline of what needs to be done (thank you), it doesn't sound so hard... i will attempt to do it myself!
    thanks a lot :)
     

Share This Page