# Sonic Advance 1 & 2: a matching GBA decompilation with widescreen ports

> Reconstructs Sonic Advance and Sonic Advance 2 for the Game Boy Advance as C that rebuilds six hash-listed ROMs with SAT-R’s agbcc fork, and compiles the same code into widescreen SDL ports for Linux, macOS and Windows plus PSP and PS2 builds. README reports Sonic Advance 2 built entirely from C with about 60 functions still non-matching. Extracted graphics, music and data are committed, so the builds read no original ROM.

- Type: Case study
- Targets: Game
- Category: Independent reconstruction cases
- Relationship: Independent reconstruction project
- Sources reviewed: 2026-10-19
- Added to the catalog: 2026-10-28
- Original resource: <https://github.com/SAT-R/sa2>
- Primary source: <https://github.com/SAT-R/sa2/blob/393357f7c9d46b5c10b6c41a57b80fe3b58f3c8d/README.md>
- Catalog page: <https://awesomerea.org/resources/sonic-advance-1-2-decomp-port-case/>
- Record JSON: <https://awesomerea.org/resources/sonic-advance-1-2-decomp-port-case/record.json>
- Chinese version: [简体中文](https://awesomerea.org/zh/resources/sonic-advance-1-2-decomp-port-case/index.md)

## Requirements & limits

- README marks the project unfinished and under active development. It lists six ROM targets with SHA-1 values: Sonic Advance (Europe) and Sonic Advance 2 (USA, Europe, Japan, Japanese Virtual Console and a 2002-10-25 USA beta). README reports that SA2 builds 100% from C with about 60 non-matching functions pulled in from asm/non_matching, which at the reviewed commit holds 64 SA2, 99 SA1, 17 shared and 8 engine files, and that over 600 SA2 functions are unnamed. The Tiny Chao Garden and Collect Rings multiboot sub-games are built for matching and only partly decompiled.
- The documented builds read no original ROM. The tree commits over 12,000 PNG sprite frames and tiles, 474 MIDI songs, tilemaps and other raw data, including a 191 KB data file included piecewise into the Tiny Chao Garden multiboot ROM. Port CI jobs still download a base ROM from private storage, which the Makefile does not reference.
- INSTALL.md targets Linux (with WSL for Windows users) and macOS: ARM GCC and binutils, libpng, SDL2 and MinGW-w64, plus mkisofs or cdrtools for PS2. Matching GBA builds need SAT-R’s agbcc fork built and installed into the tree. Ports build with make sdl (Linux/macOS), sdl_win32 (Windows), sdl_psp (PSPDEV) and ps2 (PS2DEV) at a 426×240 widescreen resolution; README marks the Win32 OpenGL target not functional, and no GitHub release is published.
- On the GBA platform, make runs a SHA-1 check of the built ROM against its listed hash. CI checks formatting, then builds and hash-checks SA2 USA, SA1 Europe and the four other SA2 variants; it also builds SDL, Win32, PSP and PS2 port targets for both games on Ubuntu and macOS, and replays a committed any% speedrun input recording through a headless SDL build. Matching applies to the GBA ROMs, not to the widescreen ports.
- The repository has no license file and GitHub detects none. The extracted graphics, music and data, and the Nintendo SDK libraries rebuilt in libagbsyscall, m4a and agb_flash, keep their rights holders’ terms. README sets a strict no-LLM/no-AI policy for issues and pull requests.

## Primary sources

1. <https://github.com/SAT-R/sa2/blob/393357f7c9d46b5c10b6c41a57b80fe3b58f3c8d/README.md>
2. <https://github.com/SAT-R/sa2/blob/393357f7c9d46b5c10b6c41a57b80fe3b58f3c8d/INSTALL.md>
3. <https://github.com/SAT-R/sa2/blob/393357f7c9d46b5c10b6c41a57b80fe3b58f3c8d/Makefile>
4. <https://github.com/SAT-R/sa2/blob/393357f7c9d46b5c10b6c41a57b80fe3b58f3c8d/config.mk>
5. <https://github.com/SAT-R/sa2/blob/393357f7c9d46b5c10b6c41a57b80fe3b58f3c8d/sa2.sha1>
6. <https://github.com/SAT-R/sa2/blob/393357f7c9d46b5c10b6c41a57b80fe3b58f3c8d/sa1.sha1>
7. <https://github.com/SAT-R/sa2/blob/393357f7c9d46b5c10b6c41a57b80fe3b58f3c8d/.github/workflows/build.yml>
8. <https://github.com/SAT-R/sa2/tree/393357f7c9d46b5c10b6c41a57b80fe3b58f3c8d/asm/non_matching>
9. <https://github.com/SAT-R/sa2/tree/393357f7c9d46b5c10b6c41a57b80fe3b58f3c8d/graphics>
10. <https://github.com/SAT-R/sa2/tree/393357f7c9d46b5c10b6c41a57b80fe3b58f3c8d/sound>
11. <https://github.com/SAT-R/sa2/blob/393357f7c9d46b5c10b6c41a57b80fe3b58f3c8d/chao_garden/data/data.s>
12. <https://github.com/SAT-R/sa2/blob/393357f7c9d46b5c10b6c41a57b80fe3b58f3c8d/src/data/sa2/recordings.c>
13. <https://github.com/SAT-R/sa2/tree/393357f7c9d46b5c10b6c41a57b80fe3b58f3c8d/libagbsyscall>

## More in Games

- [Sonic Advance 3: an AI-assisted match of one enemy module](https://awesomerea.org/resources/sa3-marun-ai-decomp-case/index.md) · Case study
- [Star Fox 64: a complete matching Nintendo 64 decompilation](https://awesomerea.org/resources/sf64-matching-decomp-case/index.md) · Case study
- [Super Mario 64 DS: matching decompilation with relocation checks](https://awesomerea.org/resources/sm64ds-decomp-case/index.md) · Case study
- [Super Mario 64: ROM reconstruction with explicit comparison gates](https://awesomerea.org/resources/sm64-decomp-case/index.md) · Case study
- [Super Mario Odyssey: per-function matching decompilation of the Switch executable](https://awesomerea.org/resources/odyssey-decomp-case/index.md) · Case study
- [Super Mario Sunshine (USA): an AI-assisted matching decompilation fork](https://awesomerea.org/resources/sms-english-gmse01-decomp-case/index.md) · Case study

## About this entry

The description was reviewed against primary sources.
Original editorial content: MIT. Linked projects, papers and assets retain their own rights and licenses.
