Case study
Ratchet & Clank: a matching PS2 decompilation with a documented agent workflow
Reconstructs C source for SCES_509.16, the PAL v2.00 PlayStation 2 executable of Ratchet & Clank (2002), with every function linked at its retail address. Functions not yet decompiled are still built from disassembly generated from the user's own executable, and the build audits functions, layout and the whole image against retail. The project documents an LLM-agent matching workflow and written build-fidelity rules for what counts as a match.
- Targets
- Game
- Category
- Independent reconstruction cases
- Relationship
- Independent reconstruction project
- Sources reviewed
Requirements & limits
- Prerequisites: No game assets, retail executables or disassembly are included. Users supply SCES_509.16 from their own disc image, checked against the SHA-1 in README and LEGAL.md, and tools/setup_asm.sh generates the disassembly locally. LEGAL.md says the repository will not build a runnable game for anyone who does not own and dump a copy. Credited sibling projects, such as the Lombyte NTSC decompilation and the ReRAC PC port, are references.
- Prerequisites: Linux and macOS builds run in a prebuilt Wine container under Docker or Podman; Windows builds use Git Bash and Python 3.10+ natively, with a short repository path. Both clone community mirrors of SN Systems ProDG for PS2 3.01 and the SCE PS2 SDK 2.4. Game code compiles with ProDG GCC 2.95.3 and Sony SDK objects with EE-GCC 2.9-ee-991111; GNU as is used together with listed tools that model the original ps2eeas assembler and linker behaviour.
- Scope: README describes a work-in-progress matching decompilation of SCES_509.16 (PAL v2.00) within the OpenRAC initiative; matched code is then refactored toward readable C++, with matching builds as regression tests. BUILD_FIDELITY.md records 3,591 matched functions as of 2026-10-07, and live progress is published on openrac.dev and bytematch.dev. The repository description names native PC reimplementation as a later goal; no port is part of this repository.
- Testing evidence: tools/build_sn.sh rebuilds from scratch, audits each decompiled function's bytes and address against retail, and compares every loaded section, allowing differences only inside known near-miss C functions; level code is checked per function. The image therefore matches retail outside in-progress functions rather than as a whole. CI enforces the build-fidelity list.
- Attribution: AGENT_WORKFLOW.md describes a lead model directing tiers of worker models whose candidates a strict match tool accepts or rejects; a Claude Code worker definition is committed, and a Ghidra MCP container serves decompilation to agents. Project code is GPLv3; reconstructed libraries and third-party components keep their own licenses, and the game and toolchains keep separate rights. CONTRIBUTING bans Sony SDK source and leaked material, and LEGAL.md reports that movie code derived from an SDK sample was reverted to assembly on 2026-09-30.
About this entry
The description was reviewed against primary sources.
Primary sources
- README.md GitHub · OpenRAC/rac1-decomp · Revision 7f5d3ff
- LEGAL.md GitHub · OpenRAC/rac1-decomp · Revision 7f5d3ff
- CONTRIBUTING.md GitHub · OpenRAC/rac1-decomp · Revision 7f5d3ff
- docs/BUILD_FIDELITY.md GitHub · OpenRAC/rac1-decomp · Revision 7f5d3ff
- tools/build_sn.sh GitHub · OpenRAC/rac1-decomp · Revision 7f5d3ff
- tools/check_image.py GitHub · OpenRAC/rac1-decomp · Revision 7f5d3ff
- docs/AGENT_WORKFLOW.md GitHub · OpenRAC/rac1-decomp · Revision 7f5d3ff
- docs/CONTAINERS.md GitHub · OpenRAC/rac1-decomp · Revision 7f5d3ff
- .claude/agents/match-worker.md GitHub · OpenRAC/rac1-decomp · Revision 7f5d3ff
- .recomp.json GitHub · OpenRAC/rac1-decomp · Revision 7f5d3ff
- LICENSE GitHub · OpenRAC/rac1-decomp · Revision 7f5d3ff
- THIRD_PARTY_NOTICES.md GitHub · OpenRAC/rac1-decomp · Revision 7f5d3ff
- https://bytematch.dev/OpenRAC/rac1-decomp
More in Games
- re4: a byte-identical decompilation of the Resident Evil 4 GameCube debug build · Case study
- sead: a decompilation of Nintendo’s first-party C++ standard library · Case study
- Skyward Sword: Wii decompilation with hash-checked relinking · Case study
- Sly Cooper and the Thievius Raccoonus: matching PlayStation 2 decompilation · Case study
- Snowboard Kids 2: an LLM-assisted N64 matching decompilation · Case study
- Snowboard Kids: an agent-assisted N64 matching decompilation · Case study