{
  "added_at": "2026-10-18",
  "additional_evidence_urls": [
    "https://github.com/pret/pokefirered/blob/037335f4c725d7c9aecdac87066f2002b4bd7e14/INSTALL.md",
    "https://github.com/pret/pokefirered/blob/037335f4c725d7c9aecdac87066f2002b4bd7e14/config.mk",
    "https://github.com/pret/pokefirered/blob/037335f4c725d7c9aecdac87066f2002b4bd7e14/Makefile",
    "https://github.com/pret/pokefirered/blob/037335f4c725d7c9aecdac87066f2002b4bd7e14/firered.sha1",
    "https://github.com/pret/pokefirered/blob/037335f4c725d7c9aecdac87066f2002b4bd7e14/leafgreen.sha1",
    "https://github.com/pret/pokefirered/blob/037335f4c725d7c9aecdac87066f2002b4bd7e14/firered_rev1.sha1",
    "https://github.com/pret/pokefirered/blob/037335f4c725d7c9aecdac87066f2002b4bd7e14/leafgreen_rev1.sha1",
    "https://github.com/pret/pokefirered/blob/037335f4c725d7c9aecdac87066f2002b4bd7e14/firered_switch.sha1",
    "https://github.com/pret/pokefirered/blob/037335f4c725d7c9aecdac87066f2002b4bd7e14/leafgreen_switch.sha1",
    "https://github.com/pret/pokefirered/blob/037335f4c725d7c9aecdac87066f2002b4bd7e14/compare.sh",
    "https://github.com/pret/pokefirered/blob/037335f4c725d7c9aecdac87066f2002b4bd7e14/.github/workflows/build.yml",
    "https://github.com/pret/pokefirered/blob/037335f4c725d7c9aecdac87066f2002b4bd7e14/docs/bugs_and_glitches.md",
    "https://github.com/pret/pokefirered/tree/037335f4c725d7c9aecdac87066f2002b4bd7e14/tools",
    "https://github.com/pret/agbcc/blob/da598c1d918402c42c0c0d7128ba14567f3175e9/gcc/COPYING"
  ],
  "category": "reconstruction-cases",
  "description_en": "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.",
  "description_zh": "为 Game Boy Advance 英文版《宝可梦 火红／叶绿》重建可构建的 C 源码，游戏脚本和数据以汇编指令形式保存。默认的 agbcc 构建可生成六个 ROM 镜像，涵盖两款游戏的 1.0 与 1.1 版本及两个标为 switch 的变体，并分别按各自的 SHA-1 清单校验。图像和音频源文件已提交在仓库中，因此文档所述的构建流程不读取原 ROM。",
  "entry_url": "https://awesomerea.org/resources/pokemon-firered-leafgreen-decomp-case/",
  "entry_url_zh": "https://awesomerea.org/zh/resources/pokemon-firered-leafgreen-decomp-case/",
  "evidence_url": "https://github.com/pret/pokefirered/blob/037335f4c725d7c9aecdac87066f2002b4bd7e14/README.md",
  "group": "cases",
  "id": "pokemon-firered-leafgreen-decomp-case",
  "json_url": "https://awesomerea.org/resources/pokemon-firered-leafgreen-decomp-case/record.json",
  "kind": "case-study",
  "markdown_url": "https://awesomerea.org/resources/pokemon-firered-leafgreen-decomp-case/index.md",
  "markdown_url_zh": "https://awesomerea.org/zh/resources/pokemon-firered-leafgreen-decomp-case/index.md",
  "name": "Pokémon FireRed and LeafGreen: a matching Game Boy Advance decompilation",
  "name_zh": "《宝可梦 火红／叶绿》：生成一致 ROM 的 Game Boy Advance 反编译重建",
  "reconstruction_method": "matching-decompilation",
  "record_type": "resource",
  "relationship": "independent-reconstruction",
  "requirement_facets": [
    "scope",
    "prerequisites",
    "prerequisites",
    "testing",
    "license"
  ],
  "requirements": [
    "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.",
    "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."
  ],
  "requirements_zh": [
    "README 将其描述为英文版火红与叶绿的反编译项目，可构建六个 ROM 镜像：两款游戏的原版与 rev1 版，以及名为 _switch 的变体（config.mk 以修订版 10 构建）。INSTALL.md 说明 make、make leafgreen 及 rev1 目标；Makefile 另有 _switch 目标。大部分代码为 C，启动代码、m4a 音频库的一部分及 GameCube 多重启动库仍为汇编，三个多重启动程序以预编译 .gba 二进制形式收录。产物是 GBA ROM，不是原生 PC 移植。",
    "文档所述的构建不读取原 ROM：图像、音频采样和地图数据以 PNG、WAV／AIF 和 JSON 文件提交在仓库中，由附带工具转换。六份 .sha1 清单列出目标镜像（例如 pokefirered.gba 的 SHA-1 为 41cb23d8dccc8ebd7c649cd8fbb58eeace6e2fdc），README 链接各镜像的 No-Intro 条目。贡献者辅助脚本 compare.sh 只在存在 baserom.gba 时对其与产物做十六进制差异比较。",
    "INSTALL.md 涵盖 Windows（推荐 WSL1，也可用 msys2 或 Cygwin）、macOS 和 Linux。在 Debian／Ubuntu 上需 build-essential、binutils-arm-none-eabi、git 和 libpng-dev；一致性构建还需先构建 pret/agbcc 并安装到仓库中。make modern 及对应的 *_modern 目标使用 devkitARM 的 arm-none-eabi-gcc，TOOLCHAIN 变量可指定其他 ARM 工具链。",
    "make compare 及各 compare_* 目标将构建出的镜像与对应 .sha1 清单比对；config.mk 注明比对只适用于非现代编译器构建。CI 比对全部六个镜像，并另外构建现代目标。docs/bugs_and_glitches.md 列出原游戏中的缺陷，可选的 BUGFIX 和 UBFIX 定义会修改这些行为，因此此类构建有意偏离原版。这些检查确认所列镜像的字节一致性。",
    "仓库没有顶层许可证文件，GitHub 也未识别出许可证；许可证文件只覆盖部分附带工具，agbcc 的 GCC 源码附 GPL v2。原游戏的代码、图像和音频仍受其权利人约束。"
  ],
  "targets": [
    "game"
  ],
  "url": "https://github.com/pret/pokefirered",
  "verification": "source-reviewed",
  "verified_at": "2026-10-18"
}
