PS2 Web Recomp: PS2 games recompiled to WebAssembly
PS2 Web Recomp is an open-source project (MIT License) that runs PlayStation 2 games in the browser by translating them ahead of time, instead of emulating the main CPU while you play. It was shared on Hacker News on October 12, 2026.
Facts on this page come from the project's README and its public pull requests and issues, as read on November 16, 2026. Games reported only in pull requests or issues are labelled as such below. First published October 14, 2026.
How it works
Recompilation. A tool called eerecomp reads the game's executable, follows its control flow to find the functions, and emits C++ for them in units of 16 KiB of guest code. That C++ is compiled to WebAssembly, so the PS2's main CPU, the Emotion Engine, is never interpreted. The output keeps the R5900 CPU's quirks: 128-bit registers and the multimedia instructions that work on them, branch delay slots, and the PS2's floating point unit, which has no infinities or denormals and rounds differently from IEEE.
A small PS2 kernel. The operating system calls the game makes are answered by high-level emulation: threads, semaphores, interrupt handlers and the channel that connects the main CPU to the I/O processor. The I/O processor runs the game's own modules – the sound driver, the disc streaming code and the controller and memory card drivers that ship on the disc – on an interpreter of its R3000 CPU. The disc is read over HTTP Range requests, so only the executable is downloaded up front.
Vector units, graphics and sound. Most 3D work on a PS2 happens in microprograms on vector unit 1. Those seen during a test run are compiled ahead of time into SIMD C++; any new one is translated into a WebAssembly module on the spot. The Graphics Synthesizer's 4 MB of video memory lives on the GPU, and drawing is done by WebGPU compute shaders, at one, two or three times the native resolution. The sound chip is reimplemented with its 48 voices, and movies are decoded by an implementation of the PS2's MPEG-2 decoder.
Which games run?
As read on November 16, 2026, the README names two games, and adds: "About a dozen games have been tried since, and how far each gets varies." It also notes that a game nobody has tried may stop at an unimplemented system call or I/O processor library function. The two games it names:
- Gran Turismo 4 – the first title, chosen because it is one of the most demanding games on the system: it uses both vector units, relies on exact floating point behaviour for its replays and license tests, and reads rendered images back as palettes. It plays from boot through the opening movie, the menus and races, with music and sound effects, and saves to a memory card kept in the browser. A race runs at full speed – 50 frames per second for the PAL release – in Chrome on a laptop's integrated GPU at twice the PS2's resolution.
- God of War II – ported through the same scripts with no game-specific code. It plays from the menus through its cutscenes into combat, and holds 60 frames per second in heavy combat at the PS2's resolution in Chrome; at twice the resolution it runs at 48 to 60, limited by the laptop's integrated GPU.
God of War II also found two bugs Gran Turismo 4 never triggered. One was in the recompiler: when a branch was the last instruction of a 16 KiB unit, the next instruction could run twice. The other was in vector unit timing: the game's microcode reads clip flags three instructions after the instruction that sets them, while the model made them visible only after four. It also needed an I/O processor hardware timer for its sound driver, a boot path like the BIOS gives, a module loaded from memory instead of the disc, and a DMA mode the first game never used. Each fix is generic, so the next game benefits.
Other games: contributor reports, not README claims
The following come from pull requests and issues on the project's GitHub page, read on November 16, 2026. They are what contributors wrote, not claims by the README, and each links to its source. The README itself also has a section titled "Experimental GT3 bring-up" (Gran Turismo 3), which it says is "not a claim of complete GT3 compatibility".
| Game | What the report says | Source |
|---|---|---|
| Midnight Club 3: DUB Edition Remix | Went from a hang at boot to its title screen and menus; the contributor notes the in-game radio keeps switching tracks while driving | PR #2, merged October 13 |
| Burnout 3 Takedown (PAL) | Boots through the loading screen, intros and title screen into the front-end menus | PR #7, merged October 13 |
| Kingdom Hearts II (PAL) | Runs its real-time opening cinematic at full PAL speed, natively and in the browser | PR #13, merged October 18 |
| Downhill Domination (PAL) | Plays from boot through the intro movies and menus into races, including two-player split screen, at full speed in Chrome | PR #20, merged October 24 |
| Metal Gear Solid 2 and 3 (Korean releases) | Play in Chrome through several stage changes; Metal Gear Solid 3 runs at 60 frames per second | PR #30 (merged October 28), PR #33 (merged November 12) |
| Shadow of the Colossus | A crash report was closed on November 12 with the maintainer's reply that support for the game's relocatable code modules was added and that "now it boots and plays" | Issue #36 |
| Sly 3: Honor Among Thieves | A report that the 3D world was not drawn was closed on October 26; the maintainer replied that it was fixed and "the world renders now" | Issue #26 |
| Pro Evolution Soccer 6 (PAL) | A black screen after the intro video was closed on November 12; the maintainer replied that it was fixed | Issue #42 |
| NFL 2K5 | Black screen, freeze and missing-code reports in mid-October; the maintainer replied "fixed" on two of them | Issue #12, Issue #17 |
| Grand Theft Auto: San Andreas | Open report: black screen after the loading screen | Issue #46, filed November 16 |
Every one of these still means a build made on the reporter's own machine, not a page you can open. A game missing here has not necessarily been tried or ruled out; we only list what we read.
README features added since October 14
The README now also describes: a 4:3 / 16:9 selector that tells the game the TV is widescreen; support for PCSX2 patch files (.pnach) when porting; an Invitebutton that makes a room so a friend can watch over WebRTC and play as player 2 from their own browser; export and import of the memory card as a .ps2 file; and a native window runner (SDL2, wgpu-native), including on macOS with Apple silicon through Metal.
How it was made fast
- The first race ran at 3 frames per second natively; moving graphics to WebGPU compute shaders and compiling the vector unit programs brought it to about 70.
- The GPU renderer first submitted around 650 compute dispatches per frame; reordering texture uploads brought that to about 80.
- A 16 MB cache of recently uploaded textures on the GPU cut the data sent per frame by about 60 percent in Gran Turismo 4.
- At three times the native resolution, shader fixes took the frame rate from 23 to 48–50 frames per second on the same integrated GPU.
Why you can't play it on a website
The project's README is explicit: the generated C++ and the built WebAssembly are translations of the game's executable, so they belong to the game's owners – keep them on your own machine and do not publish them. It also warns that anyone who can reach the server can load the game. That is why we do not host PS2 Web Recomp games.
Since late October 2026, some fan-run sites have published browser builds of individual PS2 games. Such sites ship the game's data themselves. This site does not link to them or name them, in line with our rule of not linking to game files.
If you want to play a disc image you own in the browser right now, ourbrowser emulator takes a different route: it is an emulator, and your file is read locally without being uploaded.
What you need to try it yourself
- git, CMake, Ninja, a C++20 compiler (clang preferred) and Python 3; 7-Zip if your disc image is a
.7z. - Linux on x86-64 is where everything has been run; the scripts also build on macOS on Apple silicon with a newer bash than the system one.
- About 300 MB of disk space per game for generated code and builds. The disc image is linked, not copied.
- A disc image of a game you own.
- A browser with WebGPU: Chrome and Edge have it on Windows and macOS; on Linux it must be enabled in Chrome's flags. Without WebGPU a software renderer takes over, which is fine for menus and far too slow for 3D.
One script, port.sh, does the whole job: it reads the boot program named on the disc, translates it, then runs the game headless a few times to discover functions reached through pointers, adding them until a run finds no new ones. God of War II goes from disc image to page in three and a half minutes on an 8-core laptop. A step-by-step guide based on our own local tests is coming.
Three browser approaches side by side
As read on November 16, 2026, from each project's own README or site.
| Approach | BIOS needed? | How you run it | Where it stands | |
|---|---|---|---|---|
| Play!.js (what this site runs) | Play! emulator compiled to WebAssembly | No | Open the page, pick your own disc image; read locally | Experimental; see our compatibility list |
| TabStationToo | PCSX2 compiled to WebAssembly, with its own WebAssembly-emitting CPU and vector unit compilers and a WebGPU renderer | Yes: a PS2 BIOS file you supply | Open the project's emulator page, pick your BIOS and disc images; read locally | "Early and experimental, but games play"; six games listed as tested |
| PS2 Web Recomp | One game's CPU code translated ahead of time to C++ and WebAssembly; a runtime emulates the rest | The README does not mention one | Build the game yourself from your disc image with scripts, then serve it locally | Two games named in the README; about a dozen tried |
For more on TabStationToo, read PCSX2 in the browser: TabStationToo explained.
Saves and controls
The page keeps a memory card in the browser's storage, so progress survives a reload, and can export or import it as a .ps2 file in the layout PCSX2 uses. On a keyboard, Z, X, A and S are cross, circle, square and triangle; Enter and Backspace are start and select; the arrow keys are the D-pad. Gamepads work through the browser, phones get on-screen controls, and the same build can also run in a native window.
Recompilation vs emulation
| PS2 Web Recomp | Browser emulator (Play!) | |
|---|---|---|
| Main CPU | Translated ahead of time to WebAssembly | Emulated while you play |
| Per-game work | Each game is ported once on your machine | Load any supported disc image |
| What a website hosts | Nothing from the project itself – it says the output belongs to the game's owners and must stay on your machine | Only the emulator; you load your own file locally |
A separate project with a similar name, PS2Recomp(GPL-3.0), is a static recompiler and runtime for making native PC ports rather than browser builds.
PS2 Web Recomp FAQ
Can I play PS2 Web Recomp games online?
Not from this project. It produces a web page on your own machine from a disc image you own, and its README says the generated code belongs to the game's owners and must not be published. Since late October 2026 some fan-run sites have published browser builds of individual games; they ship the game's data, and this site does not link to them.
Is PS2 Web Recomp the same as PCSX2 in the browser?
No. PS2 Web Recomp translates a game ahead of time on your machine. TabStationToo is a separate project that compiles the PCSX2 emulator to WebAssembly and needs a PS2 BIOS file. See our TabStationToo explainer.
Which games does PS2 Web Recomp support?
As of November 16, 2026, the README names two games: Gran Turismo 4 and God of War II. It also says about a dozen games have been tried and that how far each gets varies. Contributor pull requests and issue reports describe a few more, from "boots to its menus" to "plays through races" to a black screen; they are listed on this page and are not README claims.
Is PS2 Web Recomp an emulator?
Partly. The main CPU code is translated ahead of time into WebAssembly instead of being emulated, while the rest of the console – the operating system, the I/O processor, the vector units, graphics and sound – is handled by an emulation runtime.
Does it work on a Mac?
The scripts build on macOS on Apple silicon (with a newer bash than the system one), and Chrome and Edge have WebGPU on macOS. Everything has been run on Linux on x86-64.
What happens if I try a game that is not supported?
It will most likely stop at a system call or I/O processor library function that nobody has implemented yet – logged as "[sys] unhandled syscall" or "[iop] missing <library> #<n>" – or use a graphics feature the renderer does not handle yet.
Sources: snuri00/ps2-web-recomp on GitHub (README, pull requests and issues linked above), read November 16, 2026.