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

TL;DR

A project introduced on Hacker News recompiles PlayStation 2 game executables into WebAssembly and recreates parts of the console’s hardware and operating system for browser playback. Its developers report Gran Turismo 4 and God of War II running in Chrome, but users must supply their own game disc images and results depend on the computer and browser.

A developer has published ps2-web-recomp, a project that translates PlayStation 2 game code into WebAssembly and runs it in a browser using software that recreates key PS2 hardware and system functions. The project’s GitHub report demonstrates Gran Turismo 4 and God of War II running in Chrome, with players providing their own game disc images rather than downloading game data from the repository.

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.

The project does not run the games through a conventional, general-purpose PS2 emulator, according to its GitHub documentation. Instead, its eerecomp tool analyzes a game executable, follows its control flow and generates C++ code in units of guest machine code. That code is compiled to WebAssembly and linked with implementations of PS2 operating-system services, input and output components, sound, graphics and other hardware.

The report says Gran Turismo 4 runs from startup through its opening movie, menus and races, including music and sound effects. Its browser-based memory card stores saves locally in the browser. For the PAL release, the developers report a race running at 50 frames per second in Chrome on a laptop with integrated graphics, at twice the PS2’s resolution. That figure describes the project’s recording setup, not a guarantee for other devices.

God of War II was brought up using the same scripts, without game-specific code, the report says. The work exposed two bugs—one in the recompiler and one in vector-unit timing—and gaps in the emulated input/output processor. The developers report that it now runs from menus through cutscenes and combat, at 60 frames per second in heavy combat at native resolution in Chrome; at double resolution, they report 48 to 60 frames per second on the same class of integrated GPU.

At a glance
announcementWhen: Recently shared on Hacker News; the rep…
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)

Browser Play Depends on More Than WebAssembly

The project is a technical demonstration of how ahead-of-time recompilation can bring software written for older hardware into a modern browser environment. Rather than translating each PS2 instruction during ordinary gameplay, the tool generates host code from the game executable; other system components reproduce the behavior the game expects from the console.

Its reported results also show why the achievement is not simply a matter of compiling code. PS2 games rely on specialized vector processors, unusual floating-point behavior, graphics memory layouts and tightly timed interactions between components. The project’s WebGPU graphics pipeline and separate handling of vector-unit programs are central to the reported performance. Whether the approach can support more games reliably, and on a wider range of devices, remains an open question.

For players, the stated requirement to supply a disc image is material: the repository does not include game data. For developers, the implementation offers a concrete example of browser technologies—WebAssembly, WebGPU, workers and browser audio features—being combined to reproduce a demanding console workload. The report describes one project and specific tests, not a broadly validated compatibility or performance benchmark.

Products Worth Considering

LG UltraGear 27-inch 4K UHD IPS Gaming Monitor, Dual Mode 180Hz/360Hz, 1ms, G-SYNC Compatible

LG UltraGear 27-inch 4K UHD IPS Gaming Monitor, Dual Mode 180Hz/360Hz, 1ms, G-SYNC Compatible

As an affiliate, we earn on qualifying purchases.

How the PS2 Work Is Recreated

The PS2’s main processor, the Emotion Engine, is not the only part of the console a game depends on. The repository says its recompilation preserves details such as the processor’s 128-bit registers, branch delay slots and non-standard floating-point rules. The project also models the behavior of vector units used for game calculations, including pipeline timing that developers say games can depend on.

Other components are handled through a mix of high-level reimplementation and interpretation. The project supplies PS2 kernel services, while game-provided modules for functions such as sound, disc streaming, controllers and memory cards run on an interpreter for the console’s R3000-based input/output processor. Disc contents are requested using HTTP range requests, so the report says only the executable is downloaded at the start.

Graphics are rendered through WebGPU compute shaders, with the project keeping the PS2 Graphics Synthesizer’s video memory in GPU memory and reproducing its drawing rules. The documentation describes a software renderer used as a reference for checking GPU output. Sound uses a software implementation of the SPU2, and movies use an implementation of the PS2’s MPEG-2 video decoder.

The development account describes substantial performance work. The first Gran Turismo 4 race ran at about three frames per second at native resolution with a software renderer and interpreted vector programs. The developers say moving graphics work to WebGPU and compiling vector programs raised performance to about 70 frames per second in that setup. They also report reducing graphics dispatches from about 650 to about 80 per frame and cutting data sent per frame by around 60% through a GPU-side cache. These are project-reported results, not independent measurements.

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

— The ps2-web-recomp GitHub project

Compatibility and Performance Still Need Testing

The report does not establish how many PS2 games work, how reliably they run, or which browsers and operating systems are supported beyond the cited Chrome demonstrations. It also does not provide independent testing of the stated frame rates or specify enough hardware detail to compare results across machines. Performance may vary with the device’s CPU and GPU, browser implementation and selected resolution.

The project notes that its vector arithmetic uses the host’s arithmetic in places, which can produce results differing from the original console in the last bit. It describes special handling for PS2 floating-point behavior, but the documentation does not establish that every game’s calculations will match original hardware. Legal rules for creating or using disc images vary by jurisdiction, and the project’s instruction to use a game one owns is not a legal assessment.

More Games and Tests Will Clarify Reach

The repository presents the work as a project that can be extended, but the supplied report does not announce a release date, a compatibility list or a schedule for new titles. Its next practical test is whether other games can be brought up with the same general tools, and whether the bugs and missing system components exposed by additional titles can be addressed without game-specific fixes.

Readers following the project can check its GitHub repository for changes to the scripts, documentation and supported demonstrations. Until broader results are published, the clearest confirmed scope is the developers’ own Chrome tests of Gran Turismo 4 and God of War II on a laptop with integrated graphics.

Key Questions

Does the project include PS2 game files?

No. The repository says game data is not included. Users must provide a disc image themselves.

Are the games running through a standard PS2 emulator?

The project describes a different approach: it translates executable code ahead of time into C++ and then WebAssembly, while recreating PS2 system and hardware functions needed by the games.

Which games have been demonstrated?

The GitHub report describes Gran Turismo 4 and God of War II running in Chrome. It does not establish compatibility with the wider PS2 library.

What performance does the report claim?

For its PAL Gran Turismo 4 test, the project reports 50 frames per second at twice native resolution. For God of War II, it reports 60 frames per second in heavy combat at native resolution and 48 to 60 at double resolution. These are developer-reported results from a laptop with integrated graphics, not independent benchmarks.

Source: hn

You May Also Like

Wolfspeed Introduces Optical-Grade Silicon Carbide For Augmented Reality And Quantum Computing

Wolfspeed commercially introduced transparent silicon carbide substrates aimed at AR optics, quantum computing and other optical applications.

Bio‑Robots: Machines That Heal Themselves With Living Cells

Glimpse into bio-robots that heal themselves with living cells, revealing a future where machines and biology seamlessly merge—discover how far this innovation could go.

Marketing operating system Nectar Social raises $30M Series A led by Menlo

Nectar Social, an AI-powered marketing OS, raises $30M Series A led by Menlo Ventures to expand its autonomous marketing platform.

Show HN: Firefox In WebAssembly

A developer has demonstrated Firefox rendering and functioning within a WebAssembly environment, including Gecko, UI, and SpiderMonkey engine.