{
  "added_at": "2026-10-28",
  "additional_evidence_urls": [
    "https://github.com/SAT-R/sa2/blob/393357f7c9d46b5c10b6c41a57b80fe3b58f3c8d/INSTALL.md",
    "https://github.com/SAT-R/sa2/blob/393357f7c9d46b5c10b6c41a57b80fe3b58f3c8d/Makefile",
    "https://github.com/SAT-R/sa2/blob/393357f7c9d46b5c10b6c41a57b80fe3b58f3c8d/config.mk",
    "https://github.com/SAT-R/sa2/blob/393357f7c9d46b5c10b6c41a57b80fe3b58f3c8d/sa2.sha1",
    "https://github.com/SAT-R/sa2/blob/393357f7c9d46b5c10b6c41a57b80fe3b58f3c8d/sa1.sha1",
    "https://github.com/SAT-R/sa2/blob/393357f7c9d46b5c10b6c41a57b80fe3b58f3c8d/.github/workflows/build.yml",
    "https://github.com/SAT-R/sa2/tree/393357f7c9d46b5c10b6c41a57b80fe3b58f3c8d/asm/non_matching",
    "https://github.com/SAT-R/sa2/tree/393357f7c9d46b5c10b6c41a57b80fe3b58f3c8d/graphics",
    "https://github.com/SAT-R/sa2/tree/393357f7c9d46b5c10b6c41a57b80fe3b58f3c8d/sound",
    "https://github.com/SAT-R/sa2/blob/393357f7c9d46b5c10b6c41a57b80fe3b58f3c8d/chao_garden/data/data.s",
    "https://github.com/SAT-R/sa2/blob/393357f7c9d46b5c10b6c41a57b80fe3b58f3c8d/src/data/sa2/recordings.c",
    "https://github.com/SAT-R/sa2/tree/393357f7c9d46b5c10b6c41a57b80fe3b58f3c8d/libagbsyscall"
  ],
  "category": "reconstruction-cases",
  "description_en": "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.",
  "description_zh": "将 Game Boy Advance 版《索尼克 Advance》和《索尼克 Advance 2》重建为 C 源码，借助 SAT-R 的 agbcc 分支重新构建六个列有哈希值的 ROM，同一套代码还可编译为面向 Linux、macOS 和 Windows 的宽屏 SDL 移植版，以及 PSP 和 PS2 版本。README 报告《索尼克 Advance 2》已全部由 C 构建，仍有约 60 个函数不一致。提取出的图像、音乐和数据都提交在仓库中，因此构建时不读取原 ROM。",
  "entry_url": "https://awesomerea.org/resources/sonic-advance-1-2-decomp-port-case/",
  "entry_url_zh": "https://awesomerea.org/zh/resources/sonic-advance-1-2-decomp-port-case/",
  "evidence_url": "https://github.com/SAT-R/sa2/blob/393357f7c9d46b5c10b6c41a57b80fe3b58f3c8d/README.md",
  "group": "cases",
  "id": "sonic-advance-1-2-decomp-port-case",
  "json_url": "https://awesomerea.org/resources/sonic-advance-1-2-decomp-port-case/record.json",
  "kind": "case-study",
  "markdown_url": "https://awesomerea.org/resources/sonic-advance-1-2-decomp-port-case/index.md",
  "markdown_url_zh": "https://awesomerea.org/zh/resources/sonic-advance-1-2-decomp-port-case/index.md",
  "name": "Sonic Advance 1 & 2: a matching GBA decompilation with widescreen ports",
  "name_zh": "《索尼克 Advance》1 与 2：一致性 GBA 反编译及宽屏移植",
  "reconstruction_method": "matching-decompilation",
  "record_type": "resource",
  "relationship": "independent-reconstruction",
  "requirements": [
    "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."
  ],
  "requirements_zh": [
    "README 标明项目尚未完成、仍在积极开发。它列出六个附 SHA-1 的 ROM 目标：《索尼克 Advance》（欧版），以及《索尼克 Advance 2》的美版、欧版、日版、日本 Virtual Console 版和 2002-10-25 的美版测试版。README 报告 SA2 已 100% 由 C 构建，约 60 个不一致函数从 asm/non_matching 引入汇编；在所审提交中，该目录有 SA2 文件 64 个、SA1 文件 99 个、共享文件 17 个、引擎文件 8 个，另有 600 多个 SA2 函数尚未命名。Tiny Chao Garden 和 Collect Rings 这两个多重启动子游戏为构建一致 ROM 而一并编译，只完成了部分反编译。",
    "文档所述的构建不读取原 ROM。仓库提交了 12,000 多个 PNG 精灵帧和图块、474 首 MIDI 乐曲、瓦片地图及其他原始数据，其中包括一个 191 KB、分段并入 Tiny Chao Garden 多重启动 ROM 的数据文件。移植版的 CI 任务仍从私有存储下载一个基础 ROM，但 Makefile 并不引用它。",
    "INSTALL.md 面向 Linux（Windows 用户使用 WSL）和 macOS：需 ARM GCC 与 binutils、libpng、SDL2 和 MinGW-w64，构建 PS2 版另需 mkisofs 或 cdrtools。一致的 GBA 构建需将 SAT-R 的 agbcc 分支编译并安装到仓库中。移植版分别用 make sdl（Linux／macOS）、sdl_win32（Windows）、sdl_psp（PSPDEV）和 ps2（PS2DEV）构建，分辨率为 426×240 宽屏；README 标注 Win32 OpenGL 目标不可用，GitHub 上也没有发布版。",
    "在 GBA 平台上，make 会按所列哈希值对构建出的 ROM 做 SHA-1 校验。CI 检查代码格式，构建并校验 SA2 美版、SA1 欧版及另外四个 SA2 版本；还在 Ubuntu 和 macOS 上为两款游戏构建 SDL、Win32、PSP 和 PS2 移植目标，并用无界面的 SDL 构建回放仓库中的一段 any% 速通输入录制。一致性只针对 GBA ROM，不适用于宽屏移植版。",
    "仓库没有许可证文件，GitHub 也未识别出许可证。提取出的图像、音乐和数据，以及在 libagbsyscall、m4a 和 agb_flash 中重建的 Nintendo SDK 库，仍受其权利人条款约束。README 规定对议题和拉取请求严格禁止使用 LLM／AI。"
  ],
  "targets": [
    "game"
  ],
  "url": "https://github.com/SAT-R/sa2",
  "verification": "source-reviewed",
  "verified_at": "2026-10-19"
}
