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 code ahead of time into C++, then compiles it to WebAssembly for browser execution, without using a conventional emulator. Its developers report that Gran Turismo 4 and God of War II run in Chrome, but users must supply their own game disc images and results depend on the game, browser and hardware.

A developer project called ps2-web-recomp has demonstrated PlayStation 2 games running in a browser after translating their machine code into C++ and WebAssembly, rather than running them through a conventional emulator. The project report says Gran Turismo 4 and God of War II can play in Chrome, with game data supplied by the user rather than distributed with the project.

The project’s GitHub report describes a pipeline that analyzes a game’s executable, translates its Emotion Engine code into C++ in advance, and compiles that output to WebAssembly. A browser page then links the generated code to software that recreates parts of the PS2 operating system and hardware. WebGPU handles graphics, while other components reproduce functions including sound, video playback, input and memory-card saves. The repository’s scripts create a page locally from a disc image; the project does not include game data.

The report says Gran Turismo 4 runs from startup through its opening movie, menus and races, with music and sound effects. In the recording, the PAL version reaches 50 frames per second in Chrome on a laptop with integrated graphics, at twice the PS2’s native resolution. The report says the result depends on the tested setup, rather than establishing performance across browsers and computers.

God of War II was also brought up using the same scripts, according to the project. It reportedly runs from menus through cutscenes into combat, reaching 60 frames per second in demanding scenes at native resolution in Chrome, and 48 to 60 frames per second at twice that resolution on the tested laptop. The developers say this game exposed a recompiler bug, a vector-unit timing bug and missing input/output processor functions that Gran Turismo 4 had not triggered.

At a glance
announcementWhen: Project demonstration and GitHub report…
The developmentThe ps2-web-recomp project has demonstrated two PlayStation 2 games running in a browser after their code is statically recompiled to WebAssembly.
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)

A Different Route to Browser Play

The demonstration is notable because it uses static recompilation rather than interpreting the original game instructions frame by frame or relying on a standard console emulator. Translating executable code ahead of time can reduce runtime work, while the accompanying hardware and system reimplementations address the specialized behavior games expect from the PS2. The report’s performance figures indicate that this approach can support demanding games in a browser on at least one laptop configuration.

It is also a test of how much of a complex console can be recreated with browser technologies. The project accounts for PS2-specific processor behavior, vector-unit programs, graphics memory, audio and disc access, then uses WebAssembly and WebGPU to run the result. That may interest preservation and software-engineering communities, but the report does not establish that every PS2 game works or that the project offers a simple, universal replacement for existing emulators.

For players, the practical distinction is that the project supplies tools, not games: users are expected to provide a disc image they own. Performance and compatibility are tied to the local browser and device, and the report’s examples should be understood as demonstrations of two titles rather than a compatibility guarantee.

Products Worth Considering

LG UltraGear 32GX850A-B 32-inch 4K UHD Glossy OLED Gaming Monitor

LG UltraGear 32GX850A-B 32-inch 4K UHD Glossy OLED Gaming Monitor

Apple MacBook Air 13-inch Laptop with M5 Chip, 16GB Memory, 512GB SSD, Liquid Retina Display, and Touch ID – Midnight

Apple MacBook Air 13-inch Laptop with M5 Chip, 16GB Memory, 512GB SSD, Liquid Retina Display, and Touch ID – Midnight

As an affiliate, we earn on qualifying purchases.

How the Recompiler Handles PS2 Hardware

The PS2 combines a main Emotion Engine processor with vector units that perform much of the system’s 3D work, alongside a separate graphics synthesizer and input/output processor. Games can depend on details that ordinary desktop code does not, including instruction timing, unusual floating-point behavior and how graphics memory is organized. The project says its generated code preserves many of these details, while its vector-unit support models pipeline effects that game programs rely on.

For graphics, the report says the project keeps the Graphics Synthesizer’s 4 MB of video memory in its native swizzled layout and uses WebGPU compute shaders to draw with PS2-style texturing, blending and depth rules. It also includes a software renderer as a reference for comparing GPU output. Vector-unit programs are compiled to SIMD C++; programs first encountered while a game is running are translated into a WebAssembly module, a process the developers say takes a few milliseconds per program.

The developers describe performance work as a major part of the effort. They report that an early Gran Turismo 4 race ran at three frames per second at native resolution with a software renderer and interpreted vector code. After moving graphics to WebGPU and compiling vector programs, it reached about 70 frames per second natively. They also describe reducing graphics dispatches and caching repeated texture uploads. These are project-reported measurements, not independent benchmark results.

“No game data is included here. You bring a disc image of a game you own, and the scripts in this repository turn it into a web page on your machine.”

— The ps2-web-recomp project’s GitHub report

Compatibility and Performance Limits

The report documents two games, but does not provide a full compatibility list, independent testing or results across a range of browsers and hardware. It is not clear how many other titles boot, play reliably or require fixes, nor how demanding the setup is for users beyond the examples described. The stated frame rates are tied to the project’s own tests on a laptop with integrated graphics and Chrome.

Some technical behavior also remains approximate. The developers say vector arithmetic uses the host’s arithmetic and can differ from the console in the last bit, even though the project models PS2-specific floating-point rules. The supplied source ends partway through its account of performance work at three times native resolution, so it does not establish the final performance limit or explain the remaining results. No release status, installation requirements or broader support plans are specified in the material provided.

Testing Beyond Two Demonstrations

The immediate next step for readers interested in the project is to review its GitHub repository and documentation for the current scripts, setup requirements and supported browsers. Users would need to supply their own disc image; the report says the disc is accessed through HTTP Range requests, with only the executable downloaded at the start.

Further demonstrations, compatibility information and testing on additional devices would clarify how broadly the method works beyond Gran Turismo 4 and God of War II. The source material does not announce a timetable for those updates or describe a formal release plan, so any expansion of the project’s supported games remains uncertain.

Key Questions

What is ps2-web-recomp?

ps2-web-recomp is a project that translates PS2 game executable code into C++, compiles it to WebAssembly and connects it to browser-based implementations of console systems.

Which games has the project demonstrated?

The report describes Gran Turismo 4 and God of War II running in Chrome. It does not provide a complete compatibility list or claim that all PS2 games work.

Does the project include the games?

No. The project says no game data is included. Users supply their own disc image, which the repository’s scripts use to create a local web page.

How fast do the games run?

In the project’s reported Chrome test on a laptop with integrated graphics, Gran Turismo 4 reached 50 frames per second at twice native resolution. God of War II reportedly reached 60 frames per second at native resolution and 48 to 60 at twice native resolution. These are project-reported results from the tested setup, not guarantees for other devices.

Is this a conventional PS2 emulator?

The project says it does not use a conventional emulator for the main game code: it statically recompiles that code to WebAssembly and reimplements relevant PS2 systems. The report does not compare its overall compatibility or accuracy with established emulators.

Source: hn

You May Also Like

How To Match A WiFi 7 Router To Your AI Setup: 9 Picks

A buyer’s guide compares nine Wi-Fi 7 router picks for AI workloads, gaming, mesh coverage and multi-gigabit wired connections.

Arch Linux disables AUR package adoption

Arch Linux has officially disabled the ability for users to adopt AUR packages, impacting package management and community contributions.

Rymvard Gives SAP HANA Memory A Place In Capacity Planning

Rymvard’s early-access 0.23 release adds HANA capacity and failover checks, tested in a simulated estate rather than a customer deployment.

How These 8 Mechanical Keyboards Fit Work And Gaming In 2027

A comparison of eight mechanical keyboards for office work and gaming, with tradeoffs in layout, connectivity, switch flexibility and controls.