Skip to content

About

A work-in-progress matching decompilation of the original Ratchet & Clank (2002) for PlayStation 2 (SCES_509.16, PAL v2.00). Focuses on reconstructing clean, idiomatic C/C++ source code identical to the retail executable, paving the way for native PC re-implementation and game preservation.

Topics

Resources

Contributing

Stars

81 stars

Watchers

2 watching

Forks

Repository files navigation

OpenRAC

Ratchet & Clank decompilation project

Code matched CI openrac.dev Discord

A matching decompilation of Ratchet & Clank (2002) for PlayStation 2.
The game code, rebuilt as readable C that matches retail byte for byte.

Warning

This repository has no game data, executables, disc images or proprietary toolchains. You need your own copy of the game. Read LEGAL.md before contributing.

Progress

All 5116 functions of the PAL v2.00 executable match. The work now is making the code easier to read: names, types and structs. Live numbers are on ByteMatch.

Supported versions

Release Region Boot executable Code Notes
v2.00 PAL (Europe) SCES_509.16 Code Primary version
v1.00 PAL (Europe) SCES_509.16 Code Report id SCES_509.16_v1
v1.02 NTSC-J SCPS_150.37 Code Shares the PAL C source, with its own code where the bytes differ
v1.00 NTSC-U SCUS_971.99 Code ByteMatch shows Lombyte's count, the NTSC-U decompilation

All versions share one C source. Expected SHA-1 of the primary executable:

79956931bd62fafd8d20fa2eae796dbaf2e15e83

How the versions fit together: docs/build/versions.md.

Quick setup

On Linux and macOS the build runs in a container, so you need Docker or Podman.

git clone https://github.com/OpenRAC/rac1-decomp.git && cd rac1-decomp
cp /path/to/SCES_509.16 baserom/              # the executable from your disc
cp /path/to/your-disc.iso baserom/SCES_509.16.iso
git clone https://github.com/AngheloAlf/SN-Systems-ProDG_for_PS2_3.01 toolchain/sn-prodg-3.01
git clone https://github.com/AngheloAlf/sce_ps2_sdk_24 toolchain/sn-prodg-24
bash tools/setup_compilers.sh
bash tools/docker/run.sh python3 tools/gcc323.py --setup
bash tools/docker/run.sh python3 tools/overlays.py dump
bash tools/docker/run.sh bash tools/setup_asm.sh
bash tools/docker/run.sh bash tools/build_sn.sh

Windows, the other versions and every step in detail: docs/build/building.md.

Contributing

Start with CONTRIBUTING.md. All docs are listed in docs/README.md:

Keep the build matching retail. Never commit game images, extracted game data or proprietary compiler binaries.

Credits

License

Code written for this project is under the GNU General Public License v3.0. Code reconstructed from third-party binaries belongs to its copyright holders; see THIRD_PARTY_NOTICES.md.

About

A work-in-progress matching decompilation of the original Ratchet & Clank (2002) for PlayStation 2 (SCES_509.16, PAL v2.00). Focuses on reconstructing clean, idiomatic C/C++ source code identical to the retail executable, paving the way for native PC re-implementation and game preservation.

Topics

Resources

Contributing

Stars

81 stars

Watchers

2 watching

Forks

Packages

Contributors

Languages