don't click here

Can you make rexons not respawn with a game genie code?

Discussion in 'Engineering & Reverse Engineering' started by sumerhays, Apr 12, 2018.

  1. I was wondering if theoretically it would be possible to use a game genie code to make it so the rexon's head in sonic 2 doesn't respawn.
    I am doing all enemy speedruns with super sonic unlocked and have found a way to kill all the badniks other than the rexons respawning,
    of course I know using a game genie is banned from speedrunning, however, I am just doing it for fun though and already use a
    game genie just to disable the super sonic music because you would have to hear it for like a half hour, so I would be using the GG either way.
    I found a bunch of references to GG codes that involve respawning and this entry made me feel like it should be possible:
    "$23 respawn_index Respawn index reference number, used by badniks, rings and monitors. Each destroyable object is assigned an index number (01, 02, 03 etc.) which refers to a list at $FC00 in the RAM."
    I used a PAR converter with the code for his head (0373D0) as the address and FC00 as the value, getting the GG code AB3T-H38T.
    It freezes the game whenever I see one. I am sure I am going about it the wrong way, but at least it is effecting it. What am I doing wrong?
     
  2. MarkeyJester

    MarkeyJester

    Original, No substitute Resident Jester
    2,201
    431
    63
    Japan
    0373D0 on a REV01 ROM is the start of the "head" object's code, these are CPU instructions. At that address is $7000 which is instruction "moveq #$00,d0", you have just replaced it with $FC00. The $FXXX series of instructions are reserved for future CPUs, with the 68k having an error exception routine trigger which can be used to "emulate" the future instruction (sorta like a forwards compatibility), Sonic 2's has no emulation code for the $FXXX series of instructions, and the error routine pointer points to an endless loop. Even if there were support, I doubt you would get the results you are after.

    The reason the Rexon object does not remember it is deleted, is because the remember status is applied to the body itself, and not the head. The head is loaded by the body object, and not by the object layout engine, therefore the head itself does not get assigned a reserved RAM space for remembering deletion, only the body does. When you destroy the head, the body itself does not get destroyed, instead it deletes itself normally when it goes off screen just as it would if you hadn't destroyed it, and therefore, it clears the remember flag to signify it wasn't destroyed and can load again. Given that it's a solid object that the character can stand on, I can strongly assume the body remaining was an intended gimmick, and given that the object is set to remember sprite status, I can strongly assume that the enemy not remembering it's been destroyed, is a bug.

    The following game genie codes below will ensure that the enemy will not respawn after it is destroyed by Sonic or Tails.

    For REV00:

    Code (Text):
    1. ATBT-AA32
    2. 9F4T-G6TT
    3. B34T-GAAW
    4. AB4T-H7JY
    5. 9G9A-6GTA
    6. AR9A-6AAC
    7. DC9A-7L2E
    8. RG9A-7CJG
    9. AC9A-6AAJ
    10. CC9A-6AAL
    11. PC9A-7EJN
    12. FW9A-6AAR
    13. 7G9A-7CTT
    14. ER9A-6AAW
    15. R09A-66TY
    For REV01:

    Code (Text):
    1. ATBT-AA4E
    2. 9F4T-G6VA
    3. B34T-GABC
    4. AB4T-H7KE
    5. 9G9A-6GTA
    6. AR9A-6AAC
    7. FC9A-7L2E
    8. RG9A-7CJG
    9. AC9A-6AAJ
    10. CC9A-6AAL
    11. PC9A-7EJN
    12. FW9A-6AAR
    13. 7G9A-7CTT
    14. ER9A-6AAW
    15. R09A-66TY
    If you would like it such that the body itself still reloads, and only the head dosn't after respawning, then punch in the below game genie codes instead.

    For REV00:

    Code (Text):
    1. ATBT-AA32
    2. 9F3T-G6V2
    3. B33T-GAB4
    4. AB3T-H7K6
    5. SW9A-7CAA
    6. TC9A-6AAC
    7. FL9A-6AAE
    8. HW9A-7AJG
    9. AC9A-732J
    10. FC9A-7AAL
    11. ER9A-6AAN
    12. JC9A-7EJR
    13. CG9A-6TAT
    14. AC9A-6AAW
    15. A49A-6R2Y
    16. SW9A-7CA0
    17. A49A-6AA2
    18. EW9A-6AA4
    19. R09A-66T6
    20. 9F4T-G6TT
    21. B34T-GAAW
    22. D34T-H7JY
    23. 9G9A-6GT8
    24. AR9A-6ABA
    25. DC9A-7L3C
    26. RG9A-7CKE
    27. AC9A-6ABG
    28. CC9A-6ABJ
    29. PC9A-7EKL
    30. FW9A-6ABN
    31. HW9A-7AKR
    32. AC9A-733T
    33. FG9A-7ABW
    34. ER9A-6ABY
    35. JC9A-7EK0
    36. CG9A-6AB2
    37. AG9A-6AB4
    38. R09A-66V6
    For REV01:

    Code (Text):
    1. ATBT-AA4E
    2. 9F3T-G6WJ
    3. B33T-GACL
    4. AB3T-H7LN
    5. SW9A-7CAA
    6. TC9A-6AAC
    7. FL9A-6AAE
    8. HW9A-7AJG
    9. AC9A-732J
    10. FC9A-7AAL
    11. ER9A-6AAN
    12. JC9A-7EJR
    13. CG9A-6TAT
    14. AC9A-6AAW
    15. A49A-6R2Y
    16. SW9A-7CA0
    17. A49A-6AA2
    18. EW9A-6AA4
    19. R09A-66T6
    20. 9F4T-G6VA
    21. B34T-GABC
    22. D34T-H7KE
    23. 9G9A-6GT8
    24. AR9A-6ABA
    25. FC9A-7L3C
    26. RG9A-7CKE
    27. AC9A-6ABG
    28. CC9A-6ABJ
    29. PC9A-7EKL
    30. FW9A-6ABN
    31. HW9A-7AKR
    32. AC9A-733T
    33. FG9A-7ABW
    34. ER9A-6ABY
    35. JC9A-7EK0
    36. CG9A-6AB2
    37. AG9A-6AB4
    38. R09A-66V6
     
  3. biggestsonicfan

    biggestsonicfan

    Model2wannaB Tech Member
    1,612
    417
    63
    ALWAYS Sonic the Fighters
    This is quite possibly one of the greatest first posts I've ever seen on Retro. I couldn't really understand OP, as S2 is not my forte, but Markey made it clear enough for me to understand the significance of this finding. Bravo.

    EDIT: Why can't the speedrunning research teams and oldchool research teams join forces more often? It's a perfect match imho.
     
  4. RetroKoH

    RetroKoH

    Member
    1,662
    22
    18
    Project Sonic 8x16
    MJ makes it all a lot easier. Hell, because of him I can actually understand S1 Music hacking... which is THE LAST thing I could ever do w/ hacking.