Reverse engineering Golden Sun DS cheat code questions

Discussion in 'NDS - Emulation and Homebrew' started by Wym92, Mar 23, 2014.

  1. Wym92
    OP

    Wym92 Member

    Newcomer
    21
    3
    Feb 8, 2012
    Switzerland
    Beijing
    Please help me and explain how the cheat code below works, thank you!


    521217CC D8BD87F0
    02121838 E3500000
    021217CC E1A00000
    D0000000 00000000


    If you need a "why", the reason is next: As we all know (maybe), there exists an RN method to get weapons and items from enemies in the Golden Sun 1 and TLA, this made the gaming easy and interesting. However, the DS version doesn't have that anymore. Now, I know one cheat code can make that happen, but I can't understand how it works, obviously it's not simply lock three numbers to three locations. Please help me with it, thanks!
     
  2. FAST6191

    FAST6191 Techromancer

    pip Reporter
    23,865
    9,778
    Nov 21, 2005
    United Kingdom
    What region is this for by the way?
    I do not have any of them in front of me but looking at http://gbatemp.net/threads/reverse-engineering-golden-sun-dark-dawn-exp-multiplyer-code.272880/ you might well be in the binary for this. However it is quite late in the memory ( http://nocash.emubase.de/gbatek.htm#dsmemorymaps ) and with the code being what it is (a check and then run) it may instead be an overlay. If you are not familiar with the idea of overlays they are small snippets of code that the DS can put in memory to expand what it can do, most games use them for extra code but some use them for all sorts of things and some even use them for everything.

    ANyway
    521217CC D8BD87F0
    5XXXXXXX YYYYYYYY is an equal to type cheat.

    It checks if 021217CC in memory is equal to D8BD87F0

    0 codes are 32 bit writes, however in this case they will be held back by the 5 code above if it is not equal. One overwrites the location of the check where another overwrites a location not long after it.

    D0 codes terminate the equal to condition check. I am not sure if it is strictly necessary here (technically the equal check should have ended with the codes) but it is good form to do so (lesser cheat engines might ignore it).

    I will need to know/figure out the ROM region before I start disassembling the stuff above. I could disassemble the code payloads there but it is frequently the stuff around it that helps out.
     
    cearp likes this.
  3. Wym92
    OP

    Wym92 Member

    Newcomer
    21
    3
    Feb 8, 2012
    Switzerland
    Beijing

    WOW that's a lot for me to understand, I don't have any experience or knowledge on this.
    The code is for the japan version of Golden Sun DS.
     
  4. Langin

    Langin HI! ^O^

    Member
    4,694
    803
    Jul 29, 2008
    Netherlands
    The Hague
    You should remove the romlink. :) It's against the boardrules. Is Golden sun too hard? o_o
     
  5. Wym92
    OP

    Wym92 Member

    Newcomer
    21
    3
    Feb 8, 2012
    Switzerland
    Beijing
    Oh I didn't know that, sorry~
     
    Langin likes this.