<!-- Canonical page: https://reversedwithai.com/p/gran-turismo-4-decomp-claude -->
Canonical page: https://reversedwithai.com/p/gran-turismo-4-decomp-claude

# Matched 98% of Gran Turismo 4's functions to the original PS2 compiler, using Claude

> A PS2 racing engine matched function by function.

Gustavo Canepa runs Claude agents against objdiff and a link check to match PS2 Gran Turismo 4 functions byte for byte, and reuses the work for Tourist Trophy and Gran Turismo 3.

## Key facts

- Target: Gran Turismo 4 (PS2)
- Category: Games and mods
- Platform: PlayStation 2
- Models: Claude
- Tools: splat, objdiff, m2c
- Outcome: Partial
- License: MIT
- Checks: Source available: yes; Repro steps: yes; Real hardware: not reported; Verified by others: not reported
- Author: [Gustavo Canepa](https://github.com/gustavocanepa)
- Added: 2026-10-15
- Updated: 2026-10-15
- Sources reviewed: 2026-10-15 (editor)

## What was done

Gustavo Canepa is rebuilding the engine of Gran Turismo 4 (PS2) as C++ that the original compiler turns into the same instructions as the game, with Claude agents doing most of the matching. The README's progress block for November 2026 reports 30,245 of 30,875 functions matching (98.0 percent, 98.0%), 89.6 percent of the code bytes, with 87.4 percent of the sources clean, meaning free of decompiler macros and raw casts. The full build still reproduces the original executable by SHA-1. The repository holds no game data.

He first identified the compiler, Sony's ee-gcc 2.96 at -O2. A pilot matched 13 of 20 random functions by hand. After that, Claude agents drive the project's tools, and every match is checked by the compiler and a judge script, not by eye. About 14% of functions are exact copies of another, so one match settles a group. The same tools were reused for Tourist Trophy and Gran Turismo 3. The separate GT4 Native project is experimental and not playable.

You need your own copy of the game (NTSC-U, SCUS-97328 v1.01), Python 3.11 or newer with rabbitizer, and Linux or WSL (Ubuntu). Place your disc image as orig/README.md describes, run tools/setup_linux.sh and tools/splat.sh, build the function list with tools/find_functions.py, then python tools/build.py. SETUP.md walks through a fresh machine.

Sources:
- https://github.com/gustavocanepa/gt4-decomp

## What the commit history shows

639 of 808 commits in the public repository credit an AI, over 36 days between 2026-10-06 and 2026-11-16. Credited: Claude Opus 5.5 (472), Claude Sonnet 5.5 (167).

Measured by this site from public git history.

## Questions about Gran Turismo 4 (PS2)

### What is the Gran Turismo 4 (PS2) project?

Gustavo Canepa runs Claude agents against objdiff and a link check to match PS2 Gran Turismo 4 functions byte for byte, and reuses the work for Tourist Trophy and Gran Turismo 3. It is listed under Games and mods for PlayStation 2.

### Which AI model was used on Gran Turismo 4 (PS2)?

The entry names Claude. The tools named alongside are splat, objdiff and m2c.

### Did the AI reverse engineering of Gran Turismo 4 (PS2) work?

Its author reports that it partly works. Checks recorded: source available yes, repro steps yes.

### Is the source code for Gran Turismo 4 (PS2) available?

Yes. The code, patches or tooling are public: https://github.com/gustavocanepa/gt4-decomp. Licence: MIT. The sources give enough steps to reproduce it.

## Sources

- [Repository](https://github.com/gustavocanepa/gt4-decomp)

Figures are reported by the author and not measured by this site, except the commit history. Entry drafted with AI from the linked sources and checked against them.

Cite as: Gustavo Canepa (2026). Matched 98% of Gran Turismo 4's functions to the original PS2 compiler, using Claude. Reversed with AI. https://reversedwithai.com/p/gran-turismo-4-decomp-claude
