• C 88.8%
  • Assembly 10.5%
  • Makefile 0.4%
  • C++ 0.3%
Find a file
2026-07-21 11:23:11 +02:00
.devcontainer Create PSP and PS2 ports, switch to gpsp renderer, optimise audio (#235) 2026-03-04 02:10:03 +00:00
.github add sa1 progress to repo (#266) 2026-05-08 03:10:37 +01:00
.vscode sa2: propeller_spring -> flying_spring, document flying spring and em level task 2026-05-27 00:59:34 +01:00
asm Match SA1's CreateStageUI & CreateSpecialStageUI (#270) 2026-05-24 14:19:37 +02:00
chao_garden split backgrounds from camera.c and merge sa1 and sa2 camera.c 2026-04-26 18:23:08 +01:00
constants Implement m4a for PC (#166) 2024-10-28 11:07:36 +00:00
data Move music_player_table.inc into shared folder (#273) 2026-07-21 11:23:11 +02:00
docs sa2: migrate data into sa2 sub directory 2026-04-03 09:47:08 +01:00
graphics Extend INCPAL use in SA1. (#265) 2026-05-07 21:13:25 +01:00
include sa2: propeller_spring -> flying_spring, document flying spring and em level task 2026-05-27 00:59:34 +01:00
libagbsyscall libagbsyscall: fix portable builds 2026-04-07 23:48:08 +01:00
multi_boot misc cleanup, split background.h and sprite.h, move stuff into core.h 2026-05-21 00:24:50 +01:00
scripts misc cleanup, split background.h and sprite.h, move stuff into core.h 2026-05-21 00:24:50 +01:00
sound Move music_player_table.inc into shared folder (#273) 2026-07-21 11:23:11 +02:00
src sa2: propeller_spring -> flying_spring, document flying spring and em level task 2026-05-27 00:59:34 +01:00
tools fix level editor build 2026-05-17 19:53:18 +01:00
.clang-format Change Clang Format's Line Width (ColumnLimit) to 140 (#150) 2024-07-12 21:44:43 +02:00
.git-blame-ignore-revs ignore formatting commit 2022-11-14 10:56:38 +00:00
.gitattributes add scripts to vendored attributes 2022-12-19 14:21:26 +00:00
.gitignore sa2: migrate data into sa2 sub directory 2026-04-03 09:47:08 +01:00
config.mk sa1: use sa2 makefile, fix port 2026-05-04 02:09:00 +01:00
graphics.mk sa2: migrate data into sa2 sub directory 2026-04-03 09:47:08 +01:00
INSTALL.md Create PSP and PS2 ports, switch to gpsp renderer, optimise audio (#235) 2026-03-04 02:10:03 +00:00
Makefile document mp_finish 2026-05-14 19:11:49 +01:00
README.md add sa1 progress to repo (#266) 2026-05-08 03:10:37 +01:00
sa1.sha1 Move SA1 to root 2026-05-02 23:39:11 +01:00
sa1_ldscript.txt sa1: use sa2 makefile, fix port 2026-05-04 02:09:00 +01:00
sa1_songs.mk Move SA1 to root 2026-05-02 23:39:11 +01:00
sa2.sha1 get closer to europe match 2023-05-13 12:58:29 +01:00
sa2_beta.sha1 beta: match beta rom 2025-09-21 15:59:17 +01:00
sa2_europe.sha1 finish dissasembling collect rings 2023-05-13 21:45:12 +01:00
sa2_japan.sha1 Initial code required to build Japanese ROM (#135) 2024-04-19 17:00:12 +01:00
sa2_japan_vc.sha1 vc: start vc match 2025-09-17 00:58:46 +01:00
sa2_ldscript.txt sa2: propeller_spring -> flying_spring, document flying spring and em level task 2026-05-27 00:59:34 +01:00
sa2_songs.mk sa1: use sa2 makefile, fix port 2026-05-04 02:09:00 +01:00

Sonic Advance Trilogy

Sonic Advance 2 title screen

SA1 Decompilation Progress Decompilation Matching Progress
SA2 Decompilation Progress Decompilation Matching Progress

CI status Contributors Discord

⚠️ This project is not completed and still under active development

This is a work in progress matching decompilation of Sonic Advance 1, 2, & eventually 3

It builds the following ROMs:

  • sa1.gba sha1: eb00f101af23d728075ac2117e27ecd8a4b4c3e9 (Europe) (En,Ja,Fr,De,Es)
  • sa2.gba sha1: 7bcd6a07af7c894746fa28073fe0c0e34408022d (USA) (En,Ja,Fr,De,Es,It)
  • sa2_europe.gba sha1: b0f64bdca097f2de8f05ac4c8caea2b80c5faeb1 (Europe) (En,Ja,Fr,De,Es,It)
  • sa2_japan.gba sha1: dffd0188fc78154b42b401398a224ae0713edf23 (Japan) (En,Ja,Fr,De,Es,It)
  • sa2_japan_vc.gba sha1: 2aa6ee2cf2b0ebfafbea6d6d24165b252a7e329e (Japan) (En,Ja,Fr,De,Es,It) (Virtual Console)
  • sa2_beta.gba sha1: 3368642fc4157824af63367e2a685b7d6ee9b09d (USA) (Beta) (2002-10-25)

It can also build:

  • sa2.sdl make sdl (Linux/MacOS SDL 64bit port)
  • sa2.sdl_win32.exe make sdl_win32 (Windows SDL 64bit port)
  • 🚧 sa2.win32.exe make win32 (Win32 OpenGL port, not functional)
  • sa2.ps2.iso make ps2 (PlayStation 2 port, requires PS2DEV)
  • EBOOT.PBP make sdl_psp (PlayStation Portable SDL port, requires PSPDEV)

Current state (SA2)

Sub games

Within the Sonic Advance Trilogy roms there are some "Sub games" which we have begun to decompile as part of this project. These sub games are automatically compiled and bundled during the main build process, as they are necessary to create a matching binary.

Game Multiboot rom Decompilation
SA2 mb_chao_garden.gba Decompilation Progress
SA2 collect_rings.gba Decompilation Progress

Setting up the repo

Please see follow these instructions

Contributing

Join us on discord to get started in helping out. Otherwise, we are always looking for people to document the code base, and there are many non matching functions which need human input to resolve.

Strict No LLM / No AI Policy

  • No LLMs for issues.
  • No LLMs for pull requests.

This project was created as a learning excerise, I (freshollie) like learning new things. Of course it also has real world outcomes (having the ability to play, mod, port this game), but we as maintainers are not interested in submissions from LLM origin.

We want humans to use this project to practice their skills. Reverse engineering, documenting, understanding, being part of the process. If you submit a pull request we want you to have accountability as well as knowledge of what you've done. We want you to develop on those skills and continue to contribute. If "the computer" did all the work for you, we are not interested.

Our policy is based off Zig's

Layout

├── asm
│   ├── macros # Common macros used in asm files
│   └── non_matching # Non matching assembly pulled in the C compilation process
├── chao_garden # The tiny chao garden project (based on the SA2 version)
├── data # Raw data pulled into the rom via ASM files
├── graphics # Graphics related assets
├── include # Headers
├── libagbsyscall # The agbsyscall library included as part of the nintendo SDK
├── multi_boot # Any multiboot roms (used for singlepak multiplayer)
├── scripts # Scripts used in the decompilation process
├── sound # Sound related assets
├── src
│   ├── data # C files which pull in assets as part of the compilation process
│   ├── game
│   │   ├── sa1
│   │   ├── sa2
│   │   └── shared # C files used across all 3 games
│   ├── lib # libraries which were originally statically linked
│   │   ├── agb_flash
│   │   └── m4a
│   ├── platform # port related code
│   └── . # src root contains Dimps "engine" C files
└── tools # tools used for compilation or extraction

Notable info

Credits

  • JaceCear for his dedication to understanding the internals of the graphics engine, writing tools to extract this data, as well as massive effort in contributing towards the decompilation process (including decompiling the whole of sa1!), and setting up the PC ports
  • Shout out to @froggestspirit for the drive to set this project up
  • Special thanks to @normmatt for the initial repo setup and sounds disassembly
  • Pokemon Reverse Engineering Tools community for their help with the project, and tooling for GBA decompilations
  • Kermalis for their tool which was used to dump the game midis
  • 琪姬 for their exellent work documenting all the quirks of matching midis