don't click here

Sonic Advance Hacking

Discussion in 'Engineering & Reverse Engineering' started by Demonic722, Oct 13, 2014.

  1. Over the course of a year or so, I've been hacking this game on and off. Before creating this thread, I've searched for a similar topic. Unfortunately, one doesn't exist until now. My reason for hacking this game was to not only relive memories from my childhood, but to also explore the greater possibilities that this game has to offer. Also, I would like to know if there are any other members interested in hacking this game with me. There are a lot of things that were left unhacked and this could potentially be a great experience for some.

    When I first ventured into hacking this game, a memory from my childhood sparked. I remembered the in-game button cheat: up, right, down, right, L, right, R, right, a. By using these button combinations, one was able to have Tails play alongside Sonic. Here's where things get interesting. I thought to myself, "Why restrict Tails to only playing with Sonic?" This led to the creation of this Action Replay V3 code:

    Code (Text):
    1.  
    2. All Characters Can Play With Tails
    3. 84E37E9F 7366A900
    4. 65DA389A 09D8882C
    5. 5AEB3F0C 2D087A7D
    6. 65DA389A 09D8882C
    7.  
    A creative idea and modifying the game's assembly made this code possible. I found (possibly rediscovered) the address that determines whether or not the in-game button combination has been activated. I used that as a base for this code and found the routine. Here is my documentation:

    Code (Text):
    1.  
    2. 0803CEAE 4819   ldr r0,=0x03005050  ;@Always play with Tails ? 0 : 1 (no : yes)
    3. 0803CEB0 7800   ldrb r0,[r0]        ;@Load a byte
    4. 0803CEB2 0600   lsl r0,r0,#0x18     ;@r0 << 0x18
    5. 0803CEB4 1600   asr r0,r0,#0x18     ;@r0 >> 0x18 (cancels the lsl)
    6. 0803CEB6 2800   cmp r0,#0x0     ;@If you aren't playing with tails (didn't enable the code UP/RIGHT/DOWN/RIGHT/L/RIGHT/R/RIGHT/A)
    7. 0803CEB8 D00C   beq #0x0803CED4         ;@Goto 0x0803CED4 (change to nop)
    8. 0803CEBA 2000   mov r0,#0x0     ;@r0 = 0x0
    9. 0803CEBC 5628   ldsb r0,[r5,r0]     ;@Load a character (0x03005084)
    10. 0803CEBE 2800   cmp r0,#0x0     ;@If you're not Sonic
    11. 0803CEC0 D108   bne #0x0803CED4         ;@You can't play with Tails (change to nop)
    12.  
    Video:
    [media]https://www.youtube.com/watch?v=1FmaJfT2Rfg[/media]

    Image:
    [​IMG]

    Similarly, I've been trying to make the characters play alongside characters that aren't Tails. The codes are currently buggy, but I've released a video showing what I've accomplished.
    [media]https://www.youtube.com/watch?v=K4Y_LfLB8po[/media]

    Below the Tails check is a byte that actually loads Tails.
    Code (Text):
    1.  
    2. 0803CECC 2001   mov r0,#0x1     ;@Change this to load a different character besides Tails
    3.  
    I hope I get some feedback on this. More importantly, I hope this thread interests people in hacking this game.
     
  2. MainMemory

    MainMemory

    Kate the Wolf Tech Member
    4,741
    338
    63
    SonLVL
    I did something like this years ago by altering the current character variable:
    http://www.youtube.com/watch?v=BeZv0ye4iwg
    Obviously less complete than your codes.

    Also, I've written a basic sprite editor for all three games, but it doesn't display all the sprites properly, because the information I have is incomplete and probably completely wrong.
     
  3. I wonder why I haven't stumbled across this video. Anyway, congrats! I created this code because of my statement in the first post. I also didn't think it has been done.
     
  4. SpaceyBat

    SpaceyBat

    Member
    2,035
    298
    63
    United States
    Freedom Planet 2
    I remember doing a small modification some time ago where I added the small tweaks to Tails and Amy's idle animations from Advance 3 (specifically how their ears flop around instead of remaining static). It was just a simple sprite edit but I can pass it over to you if you're interested.

    Also, wasn't there a level/tile editor of some sort?
     
  5. MainMemory

    MainMemory

    Kate the Wolf Tech Member
    4,741
    338
    63
    SonLVL
    Sonic Advance Editor

    I am kind of interested in a type of "SonLVL Advance", but not being able to edit object placement is really restrictive.
     
  6. I made this code last week that allows the player to bypass the Special Stage limit. Maybe this code will inspire me to get better at the Special Stages since I was never really good at them.

    Code (Text):
    1.  
    2. Bypass Special Stage Limit
    3. 39DBF14E 3E49F34D
    4. 65DA389A 09D8882C
    5.  
    Here's a video: [media]https://www.youtube.com/watch?v=PLk3nmFXluA[/media]

    Code (Text):
    1.  
    2. The Assembly:
    3. 080932F8 4C23   ldr r4,=0x03005A20  ;@r4 = 0x03005A20
    4. 080932FA 1C20   mov r0,r4       ;@r0 = r4
    5. 080932FC 306E   add r0,#0x6E        ;@r0 += 0x6E (0x03005A8E)
    6. 080932FE 7800   ldrb r0,[r0]        ;@Read the byte at 0x03005A8E
    7. 08093300 0600   lsl r0,r0,#0x18     ;@r0 << 0x18
    8. 08093302 1600   asr r0,r0,#0x18     ;@r0 >> 0x18 (cancels the lsl)
    9. 08093304 2800   cmp r0,#0x0     ;@If you've challenged the Special Stage
    10. 08093306 D15B   bne #0x080933C0         ;@Goto 0x080933C0 (change to nop)
    11.  
    Edit: I updated the link to the video. The original one had very poor quality.
     
  7. E102

    E102

    "γ" Member
    88
    0
    0
    I've always wanted to know what tracks existed beyond the regular sound test numbers, as seen in this video. However, despite having the same program (Cheat Engine) I could never figure out just what I had to do to make it work. If you could identify and extract all the remaining tracks that aren't duplicates, sound effects, blank, etc. it would be a massive help.

    https://www.youtube.com/watch?v=-yOPcCW2tFM
     
  8. I've actually seen that video. There appears to be great documentation on the available sounds in the game in the Wiki. I noticed that the used and unused tracks on that page and video were read by modifying the RAM location 0x0300271C. What about tracks 75 (0x4A), 109 (0x6C), 115 (0x72), 121 (0x78) or 127 (0x7E)? Are these used or unused? Perhaps we should look into getting a real sound modifier that works everywhere in the game. We should also look into setting up a Wiki page dedicated to notable RAM and ROM locations in these Sonic games. It would certainly be a convenience for those who need to reference them.
     
  9. ICEknight

    ICEknight

    Researcher Researcher
    You guys already have all the music and sound effects extracted directly from the ROM in MIDI format, over here.

    I don't think there's any unused music besides the Advance invincibility, but I may be remembering incorrectly.
     
  10. Retroman

    Retroman

    Member
    733
    2
    18
    load a sega genesis sonic rom hack or rom save or .bin file into the game using virtualboy and you hear a mysterious tune.
     
  11. RetroKoH

    RetroKoH

    Member
    1,662
    22
    18
    Project Sonic 8x16
    Because I didn't see any info in the SCHG... I've gone ahead and found a little more about the level data. Here are my notes on the uncompressed foreground art (Which I've got successfully loaded into Triad as a separate loading option):


    AND the 96x96 Chunks... of which I've got the full format on how it draws each tile:


    I'm curious though as to how the game determines how tiles (or chunks) are drawn in front of or behind the character (aka priority)
     
  12. E-122-Psi

    E-122-Psi

    Member
    2,470
    612
    93
    Out of curiosity, have the character stats been found in the game yet? I'm interested to know if there are any differences between the four characters speed and control, or like the Genesis games, they're all exactly the same.
     
  13. RetroKoH

    RetroKoH

    Member
    1,662
    22
    18
    Project Sonic 8x16
    Not that I know of... I havent seen anything in the SCHG... though I'm inclined to look. Anyone have a good suggestion of the best emulator to use for RAM tracing? Something that works similar to how Gens does for the MEga drive would be grand.
     
  14. kazblox

    kazblox

    Member
    178
    27
    28
    Diassemblies and decompilations.
    Not exactly. Knuckles in S3K/SK has a slightly short jump height than Sonic or Tails to prevent him from jumping up to Sonic/Tails's AIZ1 Boss Arena without going from the rock.
     
  15. InvisibleUp

    InvisibleUp

    friendly internet ghost Member
    139
    13
    18
    Best emulator would probably be VBA-rerecording. It's designed for TASing so I'd imagine it would do whatever you need it to. Supposedly No$GBA is good too, but I've never tried it.
     
  16. RetroKoH

    RetroKoH

    Member
    1,662
    22
    18
    Project Sonic 8x16
    I'll look into that. In the meantime, I've got a ROM Map of sorts in the works... consisting of data both in the SCHG, along with new data I've got figured out. I think I'll get as much of that done as I possibly can before worrying too much about RAM
     
  17. E-122-Psi

    E-122-Psi

    Member
    2,470
    612
    93
    That one is true, but I meant mainly the speed and acceleration stats. Contrary to belief, Sonic isn't the fastest character, all three have exactly the same handling.
     
  18. RetroKoH

    RetroKoH

    Member
    1,662
    22
    18
    Project Sonic 8x16
    THANK YOU... I'm so sick of people trying to tell me that Knuckles is supposedly slower than Sonic and Tails... ugh. In S3K Competition, YES. He is... otherwise, no.
     
  19. E-122-Psi

    E-122-Psi

    Member
    2,470
    612
    93
    In S3K Competition he uses the EXACT SAME STATS as Sonic. No really, that's why he uses the insta shield sound and doesn't have glide or climb, his 2P code branches into Sonic's.
     
  20. RetroKoH

    RetroKoH

    Member
    1,662
    22
    18
    Project Sonic 8x16
    His code is identical, yes... But there are 3 separate tables for speed vales that all 3 characters use IIRC.