Skip to content

About

Matching decompilation of Ape Escape 3 (PS2, NTSC-U). No game files included.

Resources

Contributing

Stars

0 stars

Watchers

0 watching

Forks

 
 

Repository files navigation

Open-Ape

ae3-decomp

Code Repository check Discord

A matching decompilation of Ape Escape 3 for PlayStation 2 (NTSC-U, SCUS_975.01): the game code, rebuilt as readable C that compiles to the same bytes as the retail executable. Part of Open-Ape.

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

Status

The compiler is found: Sony EE GCC 3.2 with -Os reproduces retail code byte for byte (see docs/build/toolchain.md). splat finds 25,184 functions (5,399,520 bytes of code) in .text. Matched so far: 12,221 functions (48.53 % of functions, 12.54 % of code bytes), all checked byte for byte and at full length by tools/build.sh, including every call target and global address (every relocated field resolved the way the linker would and compared with retail, except 8 fields in 4 expat functions, see docs/contributing/workflow.md): 3,534 simple shapes generated by tools/gen_trivial.py (src/auto/) and 8,147 m2c drafts that matched as written, after decomp-permuter or after small hand fixes (src/m2c/). 466 Sony SDK and C library functions carry their real names (identified by their code), 22 functions of the game's sound engine are named from its own assert messages, and the game's copies of zlib 1.2.1, Lua 5.0 and expat 1.95.8 are built from their original sources (src/lib/: 48 zlib, 378 Lua and 152 expat functions located so far); everything else still uses placeholder names and types. python3 tools/progress.py prints the current numbers.

Supported version

Release Region Boot executable Notes
v1.00 NTSC-U SCUS_975.01 Primary version

Expected SHA-1 of the executable:

475f5225b1be4890e114063ece0578baa3dce89d

Setup

git clone https://github.com/Open-Ape/ae3-decomp.git && cd ae3-decomp
cp /path/to/SCUS_975.01 baserom/                   # the executable from your own disc
python3 tools/check_baserom.py                     # checks the SHA-1
python3 -m pip install "splat64[mips]"
python3 -m splat split config/SCUS_975.01.yaml     # disassembly into asm/ (not committed)
bash tools/build.sh                                # Linux / WSL: compiles src/ and compares every function

tools/build.sh needs Sony's EE GCC 3.2, builds 040921 and 030926 (32-bit Linux programs; on Windows they run in WSL). Where to get them, the packages they need and every step in detail: docs/build/building.md. Linking a complete executable is not set up yet; functions are compared one by one, including their relocations.

Contributing

Start with CONTRIBUTING.md. Questions and discussion: Discord. All docs are listed in docs/README.md. Keep the build matching retail. Never commit game images, extracted game data, disassembly or proprietary compiler binaries.

Related projects

  • reape3: the Ape Escape 3 PC port (static recompilation), also part of Open-Ape. A developer preview: it runs, slowly, and needs your own copy of the game.
  • Inspired by OpenRAC, whose Ratchet & Clank decompilation shows how a project like this can be organised.

License

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

This project is not affiliated with or endorsed by Sony Interactive Entertainment. Ape Escape and PlayStation are its trademarks, used here only to identify the game and the console.

About

Matching decompilation of Ape Escape 3 (PS2, NTSC-U). No game files included.

Resources

Contributing

Stars

0 stars

Watchers

0 watching

Forks

Releases

Packages

Contributors

Languages