Translating Morfeo's AR Mystery Gift Code.

Discussion in 'GBA - Game Development, ROM Hacks and Translations' started by fuzzymage, Jun 22, 2010.

  1. fuzzymage

    fuzzymage Newbie

    Aug 14, 2007
    United States
    I'm attempting a translation of Morfeo's AR Mystery Gift code for Pokemon Emerald on the GBA and I've hit a brick wall.

    I've been doing some research and from my understanding a code requires a memory address, an identifier of what the code is doing and then some value to actually do something to the memory address except that there doesn't appear to be any of that within these codes. I am unable to locate common ground between any of these 64bit lines of code and I can't even find locate a simple string contained within these hex values.

    I'm out of ideas and looking for a push in the right direction since the only thing I can think of right now is brute forcing each value into it until it works. (Which isn't exactly feasible.)

    For consistency sake, I'm working on the Mystic Ticket MRF for Pokemon Emerald located within the package created by Morfeo and located here.

    Thank you for your assistance.

    Edit: I'm under the belief that AR codes are encrypted (can't really find anything on this) and I'm playing around with AR Crypt converting it from AR v3/4 to Raw. Not sure if this is the right path, but they all seem to have the same location in memory now at least.
  2. fuzzymage

    fuzzymage Newbie

    Aug 14, 2007
    United States
    After using AR Crypt, I have located hex pairs which equal up to the strings I am looking forward to switching.

    To start out easy I look for MORFEO within the code.
    MORFEO in hexidecimal would be C7C9CCC0BFC9 using the game's ascii chart.

    I don't understand why, but altering ascii within gameshark code requires it to be written backwards.
    What I'm looking for then would be C9BFC0CCC9C7.

    I don't want to do anything fancy to start out with so I locate the line
    04228E38 CCC9C7B1
    04228E3C B2C9BFC0
    and tried blanking it out
    04228E38 000000B1
    04228E3C B2000000

    Unfortunately, this code does not actually create the gift and fails to work.
    Thinking that there was a checksum preventing me from actually modifying the ascii values
    here, I decided to just flip some values around and see if I can alter it that way.
    04228E38 C7CCC9B1
    04228E3C B2C9BFC0

    And it still doesn't work correctly. Not exactly sure why it's not.
  3. Ammako

    Ammako GBAtemp Guru

    Dec 22, 2009
    I tried using these codes on VBA with my FireRed rom and save file, and they did not work.
    Is there anything I must to for them to work?