{
  "added_at": "2026-10-18",
  "additional_evidence_urls": [
    "https://github.com/pret/pokeemerald/blob/731ad5bfd6e6f265508d0efcca0ba42f9dcf5881/INSTALL.md",
    "https://github.com/pret/pokeemerald/blob/731ad5bfd6e6f265508d0efcca0ba42f9dcf5881/Makefile",
    "https://github.com/pret/pokeemerald/blob/731ad5bfd6e6f265508d0efcca0ba42f9dcf5881/rom.sha1",
    "https://github.com/pret/pokeemerald/blob/731ad5bfd6e6f265508d0efcca0ba42f9dcf5881/.github/workflows/build.yml",
    "https://github.com/pret/pokeemerald/tree/731ad5bfd6e6f265508d0efcca0ba42f9dcf5881/tools",
    "https://github.com/pret/agbcc/blob/da598c1d918402c42c0c0d7128ba14567f3175e9/gcc/COPYING"
  ],
  "category": "reconstruction-cases",
  "description_en": "Reconstructs Pokémon Emerald for the Game Boy Advance as buildable C source, with game scripts and data kept as assembler directives. The default agbcc build produces pokeemerald.gba, and make compare checks it against the SHA-1 of the original English ROM; an optional modern-GCC build is not hash-checked. Graphics and audio sources are committed in the tree, so the documented build reads no base ROM.",
  "description_zh": "为 Game Boy Advance 版《宝可梦 绿宝石》重建可构建的 C 源码，游戏脚本和数据以汇编指令形式保存。默认的 agbcc 构建生成 pokeemerald.gba，make compare 将其与英文原版 ROM 的 SHA-1 比对；可选的现代 GCC 构建不做哈希校验。图像和音频源文件已提交在仓库中，因此文档所述的构建流程不读取原 ROM。",
  "entry_url": "https://awesomerea.org/resources/pokemon-emerald-decomp-case/",
  "entry_url_zh": "https://awesomerea.org/zh/resources/pokemon-emerald-decomp-case/",
  "evidence_url": "https://github.com/pret/pokeemerald/blob/731ad5bfd6e6f265508d0efcca0ba42f9dcf5881/README.md",
  "group": "cases",
  "id": "pokemon-emerald-decomp-case",
  "json_url": "https://awesomerea.org/resources/pokemon-emerald-decomp-case/record.json",
  "kind": "case-study",
  "markdown_url": "https://awesomerea.org/resources/pokemon-emerald-decomp-case/index.md",
  "markdown_url_zh": "https://awesomerea.org/zh/resources/pokemon-emerald-decomp-case/index.md",
  "name": "Pokémon Emerald: 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 Pokémon Emerald that builds a single ROM, pokeemerald.gba; the Makefile sets game code BPEE, revision 0, and CI builds the English version. Most game code is C, while startup code, part of the m4a sound library and the GameCube multiboot library remain assembly files, and three multiboot programs (berry fix, Colosseum, e-Reader) are included as prebuilt .gba binaries. The output is a GBA ROM, 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. rom.sha1 records the target English release as SHA-1 f3ae088181bf583e55daf962a92bb46f4f1d07b7, and README links that ROM’s No-Intro record.",
    "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 build also needs pret/agbcc built and installed into the tree. make modern instead uses devkitARM’s arm-none-eabi-gcc and writes pokeemerald_modern.gba.",
    "make compare runs a SHA-1 check of the built ROM against rom.sha1 and reports pokeemerald.gba: OK on a match; the Makefile notes that comparison only makes sense for non-modern builds. CI builds with COMPARE=1 and also builds the modern target. These checks establish byte identity for this one release.",
    "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 game’s code, graphics and audio remain subject to their rights holders."
  ],
  "requirements_zh": [
    "README 将其描述为《宝可梦 绿宝石》的反编译项目，构建单一 ROM：pokeemerald.gba；Makefile 设定游戏代码 BPEE、修订版 0，CI 构建英文版。大部分游戏代码为 C，启动代码、m4a 音频库的一部分及 GameCube 多重启动库仍为汇编文件，三个多重启动程序（树果修复、Colosseum、e-Reader）以预编译 .gba 二进制形式收录。产物是 GBA ROM，不是原生 PC 移植。",
    "文档所述的构建不读取原 ROM：图像、音频采样和地图数据以 PNG、WAV／AIF 和 JSON 文件提交在仓库中，由附带工具转换。rom.sha1 记录目标英文版的 SHA-1 为 f3ae088181bf583e55daf962a92bb46f4f1d07b7，README 链接该 ROM 的 No-Intro 条目。",
    "INSTALL.md 涵盖 Windows（推荐 WSL1，也可用 msys2 或 Cygwin）、macOS 和 Linux。在 Debian／Ubuntu 上需 build-essential、binutils-arm-none-eabi、git 和 libpng-dev；一致性构建还需先构建 pret/agbcc 并安装到仓库中。make modern 则改用 devkitARM 的 arm-none-eabi-gcc，输出 pokeemerald_modern.gba。",
    "make compare 将构建出的 ROM 与 rom.sha1 做 SHA-1 校验，匹配时报告 pokeemerald.gba: OK；Makefile 注明比对只适用于非现代编译器构建。CI 以 COMPARE=1 构建，并另外构建现代目标。这些检查确认该单一版本的字节一致性。",
    "仓库没有顶层许可证文件，GitHub 也未识别出许可证；许可证文件只覆盖部分附带工具，agbcc 的 GCC 源码附 GPL v2。原游戏的代码、图像和音频仍受其权利人约束。"
  ],
  "targets": [
    "game"
  ],
  "url": "https://github.com/pret/pokeemerald",
  "verification": "source-reviewed",
  "verified_at": "2026-10-18"
}
