{
  "added_at": "2026-10-18",
  "additional_evidence_urls": [
    "https://github.com/pret/pokeruby/blob/5784633ce4ef7ade1a7f2d2d0c288e3d5e6cdd7f/INSTALL.md",
    "https://github.com/pret/pokeruby/blob/5784633ce4ef7ade1a7f2d2d0c288e3d5e6cdd7f/CONTRIBUTING.md",
    "https://github.com/pret/pokeruby/blob/5784633ce4ef7ade1a7f2d2d0c288e3d5e6cdd7f/Makefile",
    "https://github.com/pret/pokeruby/blob/5784633ce4ef7ade1a7f2d2d0c288e3d5e6cdd7f/config.mk",
    "https://github.com/pret/pokeruby/blob/5784633ce4ef7ade1a7f2d2d0c288e3d5e6cdd7f/ruby.sha1",
    "https://github.com/pret/pokeruby/blob/5784633ce4ef7ade1a7f2d2d0c288e3d5e6cdd7f/sapphire.sha1",
    "https://github.com/pret/pokeruby/blob/5784633ce4ef7ade1a7f2d2d0c288e3d5e6cdd7f/.github/workflows/build.yml",
    "https://github.com/pret/pokeruby/blob/5784633ce4ef7ade1a7f2d2d0c288e3d5e6cdd7f/src/money.c"
  ],
  "category": "reconstruction-cases",
  "description_en": "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.",
  "description_zh": "以 C 源码重建 Game Boy Advance 游戏《精灵宝可梦 红宝石／蓝宝石》，使用 pret 的 agbcc 编译器构建，并附有汇编数据脚本和可编辑图像。一致构建涵盖英文版 1.0、1.1、1.2 修订版、调试构建以及德文初版，并逐一与保存的 SHA-1 比对。另有使用现代 GCC 的构建目标，不以一致为目标。",
  "entry_url": "https://awesomerea.org/resources/pokeruby-decomp-case/",
  "entry_url_zh": "https://awesomerea.org/zh/resources/pokeruby-decomp-case/",
  "evidence_url": "https://github.com/pret/pokeruby/blob/5784633ce4ef7ade1a7f2d2d0c288e3d5e6cdd7f/README.md",
  "group": "cases",
  "id": "pokeruby-decomp-case",
  "json_url": "https://awesomerea.org/resources/pokeruby-decomp-case/record.json",
  "kind": "case-study",
  "markdown_url": "https://awesomerea.org/resources/pokeruby-decomp-case/index.md",
  "markdown_url_zh": "https://awesomerea.org/zh/resources/pokeruby-decomp-case/index.md",
  "name": "pokeruby: a matching Pokémon Ruby and Sapphire decompilation",
  "name_zh": "pokeruby：一致构建的《精灵宝可梦 红宝石／蓝宝石》反编译",
  "reconstruction_method": "matching-decompilation",
  "record_type": "resource",
  "relationship": "independent-reconstruction",
  "requirement_facets": [
    "scope",
    "prerequisites",
    "prerequisites",
    "testing",
    "license"
  ],
  "requirements": [
    "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.",
    "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."
  ],
  "requirements_zh": [
    "README 仍称该项目为反汇编，并列出英文版 pokeruby.gba 和 pokesapphire.gba 的哈希；INSTALL.md 另列 1.1／1.2 修订版目标、仅支持 1.0 的调试目标及德文初版构建，仓库中共有 14 个 SHA-1 文件。所审版本已没有 asm/ 目录：游戏代码均为 src/ 下的 C 源码，仅手写的启动与库汇编以及标为 NONMATCHING 的函数除外，后者在一致构建中仍使用内联汇编。贡献指南仍描述早期从汇编逐步转为 C 的流程。",
    "构建不读取任何原版 ROM：代码、脚本、文本、图像和音频源文件都在仓库中，因此仓库本身以源文件形式包含游戏内容。德文构建需先运行设置脚本再编译，并在构建任何英文版之前运行还原脚本。",
    "INSTALL.md 列出 Linux、需 Xcode Command Line Tools 的 macOS，以及通过 WSL 或 devkitPro MSYS2 环境的 Windows，并要求 build-essential、git、libpng 和 devkitARM。需克隆、构建 pret 的 agbcc 并安装到仓库中；make modern 则改用 devkitARM 的 arm-none-eabi-gcc，也可通过 TOOLCHAIN 指定其他工具链。",
    "设置 COMPARE=1 时，Makefile 会用对应的 SHA-1 文件检查所选构建。GitHub Actions 工作流比对英文版 1.0／1.1／1.2 的红宝石和蓝宝石构建及德文初版各变体，随后编译 NONMATCHING 源码和 modern 目标但不作比对；README 的构建徽章仍指向 Travis CI。哈希一致说明 ROM 字节相同。",
    "仓库没有许可证文件，复用条款未作说明；原游戏内容仍归其权利人所有，agbcc 和 devkitPro 组件各自适用其条款。"
  ],
  "targets": [
    "game"
  ],
  "url": "https://github.com/pret/pokeruby",
  "verification": "source-reviewed",
  "verified_at": "2026-10-18"
}
