Show HN: PS2 Games Statically Recompiled To WebAssembly
AIThis post was created with the assistance of artificial intelligence (AI).

TL;DR

Before you orderOffer from Amazon

Get the latest gadgets delivered free with Prime

  • Fast, free delivery on millions of items
  • Prime Video, Amazon Music and more included
  • Member-only deals all year
Start your free Prime trial Free trial for eligible customers · Cancel anytime
As an affiliate, we earn on qualifying purchases.

A GitHub project called ps2-web-recomp translates PlayStation 2 game executables into C++ and WebAssembly, with a custom software layer and WebGPU graphics renderer. Its developer reports Gran Turismo 4 and God of War II running in Chrome, but users must supply their own game disc images and performance depends on hardware and resolution.

A developer has published ps2-web-recomp, a project that converts PlayStation 2 game code into WebAssembly so selected games can run in a browser without using a conventional console emulator. The project reports that Gran Turismo 4 and God of War II run in Chrome, using WebGPU for graphics; users must provide their own game disc images.

The project translates a game’s Emotion Engine executable ahead of time into C++, then compiles that code to WebAssembly. A reimplementation of parts of the PS2 operating system and hardware provides the surrounding services, while WebGPU compute shaders render graphics. The developer describes the work as a sibling to psp-web-recomp, which applies a similar method to PlayStation Portable games.

According to the project report, Gran Turismo 4 runs from startup through its opening movie, menus and races, with sound and browser-based memory-card saves. A recorded race runs at 50 frames per second, matching the PAL release’s frame rate, in Chrome on a laptop with integrated graphics at twice the PS2’s resolution. The report says God of War II also runs from menus through cutscenes and combat: it reaches 60 frames per second in heavy combat at native resolution, and 48 to 60 at twice native resolution on the same general class of hardware. These are developer-reported results, not independently verified benchmarks.

The browser does not receive game data from the repository. Instead, users supply a disc image of a game they own; the project’s scripts process it locally. The report says only the executable is downloaded at first, with disc content read through HTTP Range requests as needed. It does not provide game files for distribution.

At a glance
announcementWhen: Reported in the GitHub project and a Sh…
The developmentA developer has published a project that statically recompiles PS2 games for browser execution, demonstrating Gran Turismo 4 and God of War II in Chrome.
Top Steam deals right now
Halo: The Master Chief Collection-75%$9.99
Red Dead Redemption 2-75%$14.99
Grand Theft Auto V Enhanced-56%$19.79
ARC Raiders-50%$19.99
Core Keeper-40%$11.99
Risk of Rain 2: Alloyed Collective-35%$9.74
Palworld-30%$20.99
Permafrost-20%$19.99
Live · Steam store (current discounts)

What Browser Recompilation Enables

The project illustrates a different route to running console software on modern devices: translate a game’s machine code in advance rather than interpret every instruction as it runs. That approach can reduce runtime overhead, while the browser supplies WebAssembly execution and WebGPU access without requiring users to install a standalone emulator. The reported demonstrations also show how much system behavior a project must reproduce beyond the main processor, including sound, memory cards, input/output and graphics.

For players and preservation work, browser execution could make some games easier to access across devices, subject to the game files and hardware requirements. But the demonstration does not establish broad compatibility with the PS2 library. The project describes two titles, and its performance figures come from its own report. Games that rely on different hardware behavior may require additional fixes or may not work at all.

Amazon

PlayStation 2 game disc images

As an affiliate, we earn on qualifying purchases.

As an affiliate, we earn on qualifying purchases.

How the PS2 Code Is Recreated

The PS2 uses multiple processors and specialized hardware, so reproducing its games involves more than translating the main CPU’s instructions. The project says its recompiler follows executable control flow and emits C++ in units of 16 KiB of guest code. It accounts for PS2-specific register and floating-point behavior, while the graphics layer recreates the console’s Graphics Synthesizer rules, including texture layouts, palettes, blending and depth tests.

Some game components run through separate implementations. The project’s account says the PS2’s I/O processor executes game-supplied modules on an R3000 interpreter, while its kernel and supporting libraries are reimplemented in C++. Vector-unit programs are compiled into SIMD C++; programs encountered for the first time in a browser session are translated then. Sound is handled by a reimplemented SPU2, and movies by an implementation of the PS2’s MPEG-2 decoder.

The developer says early Gran Turismo 4 testing ran at about 3 frames per second at native resolution with software graphics and an interpreted vector unit. Moving graphics to WebGPU and compiling vector-unit programs raised performance to about 70 frames per second natively in that test. Subsequent work reduced graphics dispatches and data transfers. The report says a GPU cache cut data sent per frame by about 60 percent; at three times native resolution, frame rate fell to 23.

“No game data is included here. You bring a disc image of a game you own.”

— The ps2-web-recomp project

Compatibility and Performance Limits

The project report does not establish how many other PS2 games work, what range of computers can run them smoothly, or whether results can be reproduced across browsers and graphics hardware. Its frame-rate figures describe particular tests on a laptop with an integrated GPU and are not independent measurements. The source also notes that some vector-unit arithmetic can differ from the original console in the last bit, despite efforts to reproduce PS2 floating-point rules.

God of War II exposed a recompiler bug, a vector-unit timing bug and missing I/O processor features that Gran Turismo 4 had not triggered, according to the developer. That account indicates that testing one game does not cover every system behavior. The supplied report ends while describing further graphics profiling, so it does not state the outcome of that work. It also gives no project license details or broader compatibility list in the material provided.

Further Testing and Optimization

The next steps described by the project are continued debugging and performance work, including analysis of the GPU renderer at higher resolutions. Its account does not announce a release schedule, a compatibility target or a specific next game. Future reports or repository updates would be needed to establish whether more titles run and how performance varies across devices.

For now, readers can inspect the GitHub repository and its demonstration, subject to the project’s instructions and the requirement to supply their own game image. Any claims about compatibility, speed or hardware support should be treated as specific to the tests the developer reports until independently reproduced.

Key Questions

What is ps2-web-recomp?

It is a project that translates PS2 game executables into C++ and WebAssembly, then recreates needed console functions and renders graphics through WebGPU so games can run in a browser.

Which games does the project report running?

The report describes Gran Turismo 4 and God of War II. It does not claim that the full PS2 library is compatible.

Does the project include game files?

No. The project says users must supply a disc image of a game they own; it does not include game data.

How fast do the games run?

The developer reports Gran Turismo 4 at 50 frames per second in a PAL race at twice native resolution, and God of War II at 60 frames per second in heavy combat at native resolution. These figures are tied to the reported Chrome laptop tests and have not been independently verified.

Is it a conventional PS2 emulator?

Not in the method described by the project. It statically recompiles executable code into C++ and WebAssembly, while separately recreating parts of the PS2’s operating system and hardware.

Source: hn

HALLOWEEN

Halloween Picks

As an affiliate, we earn on qualifying purchases.

You May Also Like

The Roblox Cheat That Broke Vercel.

A Roblox auto-farm script downloaded by an employee led to a breach of Vercel, exposing customer credentials across major cloud platforms in April 2026.

Why ByteDance Is Resisting AI Distillation Despite Slower Progress

ByteDance’s Seed team commits to avoiding AI model distillation, risking slower development to maintain independent research integrity amid industry disputes.

Microsoft Comic Chat is now open source

Microsoft has released Comic Chat as open source, allowing developers to access and modify the classic chat application code.

One Transformer, Sound Included: What MiniMax H3 Actually Ships — And What “Open” Means This Time

MiniMax launched H3 on July 31, 2026, delivering 2K video with integrated sound via a novel architecture; open weights are limited and qualified.