Case study

Pokémon FireRed and LeafGreen: a matching Game Boy Advance decompilation

Reconstructs the English Game Boy Advance releases of Pokémon FireRed and LeafGreen as buildable C source, with game scripts and data kept as assembler directives. Default agbcc builds produce six ROM images, covering both games' 1.0 and 1.1 releases and two variants labeled switch, each checked against its own SHA-1 manifest. Graphics and audio sources are committed in the tree, so the documented build reads no base ROM.

Requirements and limitations

  • README describes a decompilation of English FireRed and LeafGreen that builds six ROM images: each game’s original and rev1 releases plus variants named _switch, which config.mk builds as revision 10. INSTALL.md documents make, make leafgreen and the rev1 targets; the Makefile adds the _switch targets. Most code is C, while startup code, part of the m4a sound library and the GameCube multiboot library remain assembly, and three multiboot programs are included as prebuilt .gba binaries. The outputs are GBA ROMs, not a native PC port.
  • The documented build reads no original ROM: graphics, audio samples and map data are committed as PNG, WAV/AIF and JSON files and converted by bundled tools. Six .sha1 manifests name the target images (for example pokefirered.gba, SHA-1 41cb23d8dccc8ebd7c649cd8fbb58eeace6e2fdc), and README links each image’s No-Intro record. The contributor helper compare.sh hex-diffs the output against a baserom.gba only when one is present.
  • INSTALL.md covers Windows (WSL1 recommended; msys2 or Cygwin), macOS and Linux. On Debian/Ubuntu it lists build-essential, binutils-arm-none-eabi, git and libpng-dev; the matching builds also need pret/agbcc built and installed into the tree. make modern and the matching *_modern targets use devkitARM’s arm-none-eabi-gcc, and a TOOLCHAIN variable selects another ARM toolchain.
  • make compare and the compare_* targets check each built image against its .sha1 manifest; config.mk notes that comparison only makes sense for non-modern builds. CI compares all six images and also builds the modern target. docs/bugs_and_glitches.md lists original-game bugs that the optional BUGFIX and UBFIX defines change, so those builds intentionally diverge. These checks establish byte identity for the listed images, not gameplay coverage; this collection did not build the ROMs.
  • The repository has no top-level license file and GitHub detects none; license files cover only some bundled tools, and agbcc’s GCC sources carry GPL v2. The original games’ code, graphics and audio remain subject to their rights holders. The reviewed sources establish no AI or REA use, and no runtime reproduction is claimed.

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

  1. README.md GitHub · pret/pokefirered · Revision 037335f
  2. INSTALL.md GitHub · pret/pokefirered · Revision 037335f
  3. config.mk GitHub · pret/pokefirered · Revision 037335f
  4. Makefile GitHub · pret/pokefirered · Revision 037335f
  5. firered.sha1 GitHub · pret/pokefirered · Revision 037335f
  6. leafgreen.sha1 GitHub · pret/pokefirered · Revision 037335f
  7. firered_rev1.sha1 GitHub · pret/pokefirered · Revision 037335f
  8. leafgreen_rev1.sha1 GitHub · pret/pokefirered · Revision 037335f
  9. firered_switch.sha1 GitHub · pret/pokefirered · Revision 037335f
  10. leafgreen_switch.sha1 GitHub · pret/pokefirered · Revision 037335f
  11. compare.sh GitHub · pret/pokefirered · Revision 037335f
  12. .github/workflows/build.yml GitHub · pret/pokefirered · Revision 037335f
  13. docs/bugs_and_glitches.md GitHub · pret/pokefirered · Revision 037335f
  14. tools GitHub · pret/pokefirered · Revision 037335f
  15. gcc/COPYING GitHub · pret/agbcc · Revision da598c1