Gran Turismo 4 in Your Browser
Gran Turismo 4 was the first game brought up by PS2 Web Recomp, and it remains the project’s flagship result: a full race running at 50 fps in Chrome at twice the PS2’s resolution, on a laptop’s integrated GPU. This page covers what works, why this game was the hardest possible first target, and how to run your own copy.
Status
Playable
Frame rate
50 fps (PAL)
Resolution
2× native
Test hardware
Laptop iGPU
What you can actually play
According to the project author, the game plays from boot through its opening movie, the menus and races, with music and sound effects, and it saves to a memory card kept in the browser. That “from boot” part matters: the recompiled executable has to take over at the same point the real console does, rather than starting from a hand-picked menu screen.
The 50 fps figure is the PAL release’s native frame rate, not a compromise. At twice the console’s internal resolution the project still holds it in Chrome on an integrated GPU — the recording on this page was made that way.
Official 84-second demo from the ps2-web-recomp repository (MIT): Gran Turismo 4 recorded in Chrome at 2× resolution.
Why Gran Turismo 4 was the stress test
The author deliberately picked one of the most demanding games on the system as the first target. Three properties make it brutal for a recompiler:
- It leans on both vector units. Most of the game’s 3D work lives in microprograms uploaded to vector unit 1, which the project compiles ahead of time into SIMD C++; programs first seen at runtime are translated to WebAssembly on the spot, a few milliseconds each.
- It depends on exact floating-point behaviour for its replays and license tests. The PS2’s FPU has no infinities or denormals and rounds differently from IEEE, so the emulated pipeline has to match its special-value rules: denormals flushed to zero, overflow clamped to the largest float.
- It reads rendered images back as palettes — a graphics trick that breaks naive renderer designs. Because the Graphics Synthesizer’s 4 MB of video memory lives on the GPU in its native swizzled layouts, effects that render into a texture or reinterpret a framebuffer as a palette work the way they do on the console.
Performance: what the author reports
These figures come from the project’s own documentation, measured in Chrome on the author’s laptop with integrated graphics. They are not our independent benchmarks, and your results will depend on your GPU and the scene.
| Setting | Reported result | Notes |
|---|---|---|
| 1× resolution | Full speed (race) | Native PS2 resolution |
| 2× resolution | 50 fps (PAL) | The demo recording setup |
| 3× resolution | 48–50 fps after optimization | Was 23 fps before shader and upload fixes |
The path to those numbers is documented in unusual detail. The first race ran at 3 fps with a software rasterizer and interpreted vector programs; moving the GS to WebGPU compute shaders and compiling vector programs brought it to about 70 natively. The GPU renderer originally submitted around 650 compute dispatches per frame because every texture upload split the triangle batch; hoisting uploads ahead of independent triangles brought that to about 80. Gran Turismo 4 re-uploads the same 3 MB of textures every frame, so the project added a 16 MB GPU cache of recently uploaded contents, cutting per-frame data by roughly 60%.
Run your own copy
You need a disc image of Gran Turismo 4 that you own, plus the build tools. The full walkthrough is in the step-by-step tutorial; the short version:
git clone https://github.com/snuri00/ps2-web-recomp.git
cd ps2-web-recomp
scripts/port.sh gt4 "Gran Turismo 4.iso"
python3 scripts/serve.py build/web-gt4 games/gt4/disc.iso Then open http://localhost:8620/ in Chrome or Edge. The page needs WebGPU; on Linux it is off by default and must be enabled in Chrome’s flags. You can also build only the native runner with --native-only if you prefer a desktop window.
Requirements at a glance: git, CMake, Ninja, a C++20 compiler (clang preferred), Python 3, and 7-Zip for .7z images. Expect about 300 MB of disk per game for generated code and builds; the disc image itself is linked, not copied. First run installs the Emscripten SDK automatically.
Controls, saves and browser tips
The keyboard maps the PS2 face buttons to Z (cross), X (circle), A (square) and S (triangle); the shoulders to Q, W, 1 and 2; Start and Select to Enter and Backspace; the D-pad to the arrow keys; and the left stick to I, J, K and L. Gamepads work through the browser’s gamepad API — analog triggers reach the game as the DualShock 2’s pressure-sensitive L2 and R2, and rumble works in browsers that expose vibration (Chrome and Edge do). Phones get on-screen controls, and F toggles fullscreen.
Saves go to a PS2 memory card kept in the browser’s storage for the address you play from, so progress survives a reload. Export card downloads the card as a .ps2 file in the layout PCSX2 uses; Import card puts such a file back in the slot, so a card can travel between browsers or come from PCSX2. Append ?nocard to the address to start with an empty slot.
Browser notes: the page needs WebGPU, which Chrome and Edge ship on Windows and macOS; on Linux enable chrome://flags/#enable-unsafe-webgpu and chrome://flags/#enable-vulkan, then restart. Without WebGPU a software renderer takes over — fine for menus, far too slow for racing. On dual-GPU laptops a canvas drawn on the discrete GPU sometimes cannot be displayed; the page tries both adapters and falls back to copying frames. Changing the internal resolution reloads the page, so save in-game first.
Frequently asked questions
Does Gran Turismo 4 run at full speed in the browser? +
Which version of Gran Turismo 4 is verified? +
Can I save my progress? +
Does it work with a gamepad? +
Do I need a PS2 BIOS or game files from this site? +
Can I play Gran Turismo 4 online in the browser? +
Next
See the other verified title, or the full compatibility picture including community experiments.
Sources: the ps2-web-recomp repository README and the author’s public notes, reviewed October 21, 2026. Performance figures are the author’s reported measurements, not independently benchmarked. Gran Turismo is a trademark of Sony Interactive Entertainment; this guide is unofficial and not affiliated with the project or Sony. No game files are hosted or distributed here.