Case study
pokeruby: a matching Pokémon Ruby and Sapphire decompilation
Reconstructs the Game Boy Advance games Pokémon Ruby and Sapphire as C source built with pret's agbcc compiler, alongside assembly data scripts and editable graphics. Matching builds cover the English 1.0, 1.1 and 1.2 revisions, debug builds and the first German editions, each checked against a stored SHA-1. A separate modern-GCC target is not expected to match.
Requirements and limitations
- README still calls the project a disassembly and lists hashes for English pokeruby.gba and pokesapphire.gba; INSTALL.md adds 1.1/1.2 revision targets, 1.0-only debug targets and first-edition German builds, and the tree holds 14 SHA-1 files. No asm/ directory remains in the reviewed tree: game code is C under src/, apart from handwritten startup and library assembly and functions marked NONMATCHING whose matching builds keep inline assembly. The contributor guide still describes the earlier asm-to-C workflow.
- The build reads no original ROM: code, scripts, text, graphics and sound sources are in the repository, so the repository carries the game's content in source form. German builds need a setup script before compiling and a teardown script before any English build.
- INSTALL.md lists Linux, macOS with Xcode Command Line Tools, and Windows through WSL or the devkitPro MSYS2 environment, plus build-essential, git, libpng and devkitARM. pret's agbcc must be cloned, built and installed into the tree; make modern uses devkitARM's arm-none-eabi-gcc instead, and other toolchains can be set with TOOLCHAIN.
- With COMPARE=1 the Makefile checks the selected build against its SHA-1 file. The GitHub Actions workflow compares the English 1.0/1.1/1.2 Ruby and Sapphire builds and German first-edition variants, then compiles the NONMATCHING sources and the modern target without comparison; README's build badge still points to Travis CI. Matching hashes show identical ROM bytes, not that NONMATCHING C or modern builds behave identically. This collection did not build the ROMs.
- No license file is present, so reuse terms are unstated; the original game's content remains its rights holders', and agbcc and devkitPro components keep their own terms. The reviewed sources establish no AI or REA attribution.
About this entry
- Type
- Case study
- Category
- Independent reconstruction cases
- Relationship
- Independent reconstruction project
- Targets
- Game
Sources reviewed
The description was reviewed against primary sources. This does not establish runtime testing, security auditing or verified compatibility.
Primary sources
- README.md GitHub · pret/pokeruby · Revision 5784633
- INSTALL.md GitHub · pret/pokeruby · Revision 5784633
- CONTRIBUTING.md GitHub · pret/pokeruby · Revision 5784633
- Makefile GitHub · pret/pokeruby · Revision 5784633
- config.mk GitHub · pret/pokeruby · Revision 5784633
- ruby.sha1 GitHub · pret/pokeruby · Revision 5784633
- sapphire.sha1 GitHub · pret/pokeruby · Revision 5784633
- .github/workflows/build.yml GitHub · pret/pokeruby · Revision 5784633
- src/money.c GitHub · pret/pokeruby · Revision 5784633