don't click here

Sonic Advance 2 decompilation

Discussion in 'Engineering & Reverse Engineering' started by freshollie, May 7, 2022.

  1. freshollie



    I've been working on a decompilation of Sonic Advance 2 for a few months now:

    The original game was written in C, and we have all the tooling in place to build GBA games from their original C source, so the goal of this project is to produce an entirely matching copy of Sonic Advance 2.

    Current status

    - The game has already been fully disassembled to Arm assembly
    - MIDI copies of all the songs have been extracted and are compiled to match the originals and packed into the ROM
    - Currently in the process of producing matching C code for the original assembly (5% done)
    - The repo already produces a matching copy of Sonic Advance 2 (USA)

    What help is needed?

    C source decompilation: Anyone with knowledge of reverse engineering, and specifically producing matching C source from assembly functions. I've learnt a lot over the past few months, but my pace of function matching is slow. It would be good to have more people onboard who have either are already familiar with this stuff or have a good background in programming and are willing to learn.

    Data analysis: At the moment lots of the data is referenced from the original rom (Mostly the graphics assets). People who have specific knowledge on how to extract these to matching PNGs and PAL files would be great!

    Why Advance 2?

    It's the game I played as a child, and already owned a copy of, but it's also the game which had already been disassembled by another GitHub member (credits in repo) which meant I was able to start off without having to completely start from scratch.

    The advance series likely share a large amount of the same sourcecode, so starting with any of the games will help produce a match for the others in the series.

    So you are interested?

    Great! I'm new to this community, so it would be good to know where communication takes place (discord, IRC etc) for collaboration.
    Last edited: May 7, 2022
  2. Pretty cool; the Advance games really don't have much in the researching and ROM hacking scene (the only hack of the series I could find was one of Advance 3 that changes the text... and that was all).
  3. Hivebrain


    53.4N, 1.5W
    This could open the possibility of ports of Sonic Advance 2, maybe even to the Mega Drive.
  4. MrMechanic


    Someone page the Vita homebrew community...

    Sonic Advance on the Vita as an actual port would be very nice.
  5. Spanner


    The Tool Member
  6. Starduster


    Can bench press at least two Sonic the Hedgehogs Member
    Fighting my procrastination addiction
    This is immensely exciting! Sonic Advance 2 was also one of my formative Sonic games and I think cracking this open will lead to fantastic places. Obviously, the most immediate of those would be a PC port of the game in widescreen, perhaps even cleaning up some of the more unfortunate level design snafus, but imagine character mods! Imagine an accessible level creation tool that could bring about a dedicated Advance 2 hacking scene! Advance 2 in particular is a game that has never really been done again, particularly with regards to the simple yet wonderfully freeform trick system that affords players so many movement options. I hope this'll lead to fan projects that wring every last drop of potential out of Advance 2's gameplay.
  7. biggestsonicfan


    Model2wannaB Tech Member
    ALWAYS Sonic the Fighters
    As someone working on their own disassembly (and to a much lesser extent a decomp) this is impressive stuff! Well done!
  8. freshollie


    Thanks for the feedback all. Good to hear others are really interested. It's gonna be a really long process but let's see where it goes!
  9. Jeffery Mewtamer

    Jeffery Mewtamer

    Blind Bookworm Member
    Considering Sonic Advance 2 is the one game I ever seriously Speed ran, it's great to hear it finally getting some attention from hackers... and now I wish I could fire up VBA to play this game again... Or still had my original cart and DS and could play them.
    • Like Like x 1
    • Agree Agree x 1
    • List
  10. Aerosol


    Not here. Moderator
    Not where I want to be.
    Sonic (?): Coming summer of 2055...?
    This is very relevant to my interests.
  11. Dark Sonic

    Dark Sonic

    Working on my art!
    Same. So with this could it be possible to maybe port this to PC with more screen space visible so maybe said game would be more playable?

    That's the dream right there (oh that and a mod that overhauls the bullshit emerald system that game had. Literally the ONLY Advance game that made you get the the emeralds as every character and they were basically impossible to get to unless you memorized the level)
  12. freshollie


    Once the whole game is decompiled it may be possible to port but I wouldn't know how. Remember that these games were designed specifically for the GBA hardware, so lots of code is hard coded for the GBA screen sizes and uses specific registries which would render to screen etc
    • Like Like x 2
    • Informative Informative x 2
    • List
  13. freshollie


    Hi all,

    Just to update, we hit 20% decompiled tonight. Still mostly doing it solo, though I've had some help on naming songs, and decompiling animation scripts.

    Nearly all UI code is decompiled, and along the way I've discovered an un-released multiplayer teamplay mode which was previously unknown:

    Soon I'll be moving onto main gameplay code.
    • Like Like x 5
    • Informative Informative x 1
    • List
  14. The Game Collector

    The Game Collector

    Washington State, USA
    Being Ted Narcotic's bass player; working on Kelly Kristjanson's tape archive; collecting video games
    One really cool thing that Sonic Advance 2 has are the bosses that you have to fight while running. I saw some Tails Skypatrol fanart on Facebook of Tails chasing Witchcart, except they also added Sonic running on the ground while also chasing her. This got me thinking about how it would be cool if someone were to bring back Witchcart as a boss for Sonic to fight in a fangame or hack where the battle took place in a Sonic Advance 2 boss fight setting. It's not something I have ever seen anyone do, and in terms of bringing the most obscure characters into games this would be one of the least expected. With this decompilation, such a thing could be easier to achieve by using Sonic Advance 2 as a base.
  15. Deep Dive Devin

    Deep Dive Devin

    Goblin Sex Researcher Member
    Extremely excited to see where this goes.
  16. Willie


    Each day the world turns Laugh 'til it all burns Member
    What's your best time for Sonic Advance 2? Last year, I put a ton of effort into the Tails category for's leaderboard. [LINK]

    That's really exciting. So is the previously unknown team mode similar to what we got with Sonic Advance 3's team mechanic or does it function very differently?
  17. Jeffery Mewtamer

    Jeffery Mewtamer

    Blind Bookworm Member
    @willy: I feel like this should be in a PM, but I can't find a button or link on your post that appears to initiate a PM, but my Sonic Advance 2 times can be found at:

    Lost my original Advance 2 cart many years ago(I think it might have been before I ever got a DS, though I was late to the DS party, buying a refurbished DS Classic because it had been discontinued in favor of the DS Lite by the time I upgraded(I have big hands, I only put up with the GBA SP hand cramping tininess because the original GBA didn't have a built-in screen light)) and never really felt up to starting over with a new cart or trying to speed run on an emulator, but I'm still ranked #20 overall for Advance 2 on The Sonic Center despite how long I've been retired(granted, I don't think Speed existed back when I was active, so some of it might be The Sonic Center losing activity to a more general speed running leader board...

    More to the topic, while I never really had anyone to play against for multiplayer on the GBA(and the need for multiple systems, one or more link cables, and sometimes multiple copies of the game to access all multiplayer modes didn't help), it's kind of cool there was a unused multiplayer mode... WOnder what Cream's assist would have been had the mode been finished... Part of me says it would have been cool if either player could do a Cheese attack even if that would be even more game breaking then in single player(pretty sure Cream was the first character I managed a no game over run from Leaf Forest to the end of XX and the first I managed to max out the score counter on simply because Cheese shredded all of the bosses and made getting an 80k time bonus against the bosses trivial).
  18. Lostgame


    producer/turnablist. homebrew dev. cosplayer. Oldbie
    Toronto, ON
    The O.I.C.
    Jeeeez, if speedruns were a thing in like, 2002-3 when I got my first GBA SP along with this (my first game for the system) - I would've probably fucking *killed* it. I had all the locations of the ring emblem icons memorized in every act as well; so I could get it with all the emeralds, each time; first try.

    I don't know if I ever got nearly as good at a game as I got at Sadv2, weirdly. I thought I was pretty good with NiGHTs, but recent replays remind me that in the later 3 levels getting those A rankings is a *bitch*; I lost my memorization skills.

    Even if I tried, I don't think I could ever be as good at Sadv2 as I was when I was 12/13 and had like all the time to practice, lol...too much going on these days.
  19. I really wonder what other unused discoveries will be found, as the Advance games really aren't well documented.
  20. freshollie


    Nothing much else yet, but the demo screen has multiple control recordings stored in the rom, with only the first being used: The others seem to correspond to random inputs: