0xreversed/with.ai
Games and modsPartialSource available
Target: Gran Turismo 4 and God of War II (PlayStation 2)

Recompiled PS2 games into the browser at full speed, with Claude in the commits

Gran Turismo 4 and God of War II (PlayStation 2): Two of the PS2 heaviest games, statically recompiled into a browser page.
Image: snuri00 (ps2-web-recomp README)

What was done

snuri00 PS2 Web Recomp brings Gran Turismo 4 and God of War II into Chrome as WebAssembly with WebGPU graphics at 50 to 60 fps, and every port starts from your own disc image.

snuri00 PS2 Web Recomp statically recompiles PlayStation 2 games into WebAssembly and runs them in a browser page with WebGPU graphics and no emulator for the main code. Its commit history carries Co-Authored-By: Claude trailers, so AI agents helped write it. The first target was deliberately hard, Gran Turismo 4, and God of War II followed through the same scripts with no game-specific code. No game data ships: the port script turns your own disc image into a page on your machine.

How it was done

The recompiler reads the game executable, follows its control flow and emits C++ in 16 KiB units, keeping the Emotion Engine 128-bit registers, branch delay slots and the exact floating point rules of the console. Vector unit programs are compiled ahead of time, and anything a game uploads unseen is translated to a WebAssembly module within milliseconds on the spot. The graphics chip runs as compute shaders with the console own texture, palette and blending rules, and SPU2 audio, IOP kernel modules and movies are reimplemented, with a software renderer as the reference the GPU output is checked against.

Results

God of War II plays from menus through cutscenes into combat and holds 60 fps in heavy combat at console resolution, 48 to 60 at twice that on a laptop integrated GPU. Gran Turismo 4 boots, plays the menus and full races at a clean 50 fps for the PAL release at twice the resolution, and a browser-stored memory card exports to PCSX2. Only two games are ported; the next one usually stops where an unhandled system call or a graphics feature is logged for you to bring upstream.