TL;DR
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
A GitHub project called ps2-web-recomp translates PlayStation 2 game code ahead of time into C++ and WebAssembly, then recreates key console hardware and software functions in the browser. Its developers report Gran Turismo 4 and God of War II running in Chrome, but users must supply their own game disc images and the results are based on the project’s demonstrations.
Developers behind ps2-web-recomp say they have brought Gran Turismo 4 and God of War II to Chrome by translating PlayStation 2 machine code into C++ and compiling it to WebAssembly. The project recreates parts of the PS2’s operating system and hardware in the browser, with WebGPU handling graphics; it is not a conventional emulator, and it does not include game data.
The project’s GitHub description says the first title, Gran Turismo 4, runs from startup through its opening movie, menus and races, with audio and memory-card saves stored in the browser. In a recording of 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 native resolution. Those are project-reported results, not independent performance tests.
The developers say God of War II was brought up using the same scripts, without game-specific code. While working on it, they found a bug in the recompiler, another in vector-unit timing, and missing parts of the PS2’s input/output processor. They report that the game now runs from menus through cutscenes and combat, at 60 frames per second in heavy combat at native resolution in Chrome. At twice native resolution, they report 48 to 60 frames per second, with the integrated GPU limiting performance.
To use the project, a player supplies a disc image of a game they own. The repository’s scripts turn that image into a web page locally; the developers say the disc is accessed with HTTP Range requests, so only the executable is downloaded at the start. The project’s account describes ahead-of-time translation for the Emotion Engine, an interpreter for the I/O processor’s R3000 CPU, and browser implementations of PS2 components including sound, movies and graphics.
A Different Route to Browser Play
The demonstration matters because it shows one route for running console software in a browser without asking the browser to interpret every guest instruction as a traditional emulator would. The project translates much of the game’s main CPU code ahead of time, while reproducing selected hardware behavior and using WebGPU compute shaders for the PS2 graphics system.
That approach could be useful to preservation and compatibility work: a local browser page can, in principle, make an old game accessible without installing a console emulator. But the project’s own description shows how much system-specific engineering is involved. Correct behavior depends on details such as vector-unit timing, floating-point rules, graphics memory layouts, audio and disc streaming. The two game demonstrations establish progress, not broad compatibility across the PS2 library.
There are also practical limits. Players need their own game images, and performance varies with resolution and hardware. The reported frame rates come from a particular laptop and Chrome setup; they do not establish how the project performs on other devices or browsers. The source does not provide an independent evaluation of compatibility, accuracy or legal requirements for making and using disc images.
As an affiliate, we earn on qualifying purchases.
How the Recompiler Handles PS2 Hardware
The project describes itself as a sibling to psp-web-recomp and says it follows the same general method. Its tool, eerecomp, follows executable control flow and emits C++ in units of 16 KiB of guest code. The output accounts for PS2-specific CPU behavior, including 128-bit registers, branch delay slots and floating-point differences. The generated C++ is then compiled to WebAssembly for browser execution.
Other parts of the console are handled through a mix of reimplementation and translation. The project says it provides high-level versions of functions from the PS2’s main CPU operating system, while the I/O processor runs game-supplied modules on an R3000 interpreter. Vector-unit microprograms are compiled ahead of time when known, or translated into WebAssembly when first encountered. The Graphics Synthesizer’s video memory is kept on the GPU, and a software renderer acts as a reference for the WebGPU output.
The developers also describe performance work behind the results. They say an early version ran the first race at about 3 frames per second at native resolution using software rendering and an interpreter for a vector unit. Moving graphics work to WebGPU and compiling vector programs raised performance to about 70 frames per second in their tests. Later optimizations reduced graphics dispatches and data transfers. These figures describe the project’s development account, not a standardized benchmark.
“No game data is included here. You bring a disc image of a game you own.”
— The ps2-web-recomp project’s GitHub description
WebAssembly game development tools
As an affiliate, we earn on qualifying purchases.
As an affiliate, we earn on qualifying purchases.
Compatibility and Performance Still Open
The repository describes two games, but it does not establish how many other PS2 titles work or how reliably they run. The developers say God of War II exposed bugs and missing system features that Gran Turismo 4 had not, suggesting that additional games may reveal further compatibility issues. The source does not give a full compatibility list or independent test results.
Performance claims are tied to Chrome on a laptop with integrated graphics, and the supplied material does not specify the laptop model or provide results across different browsers and GPUs. The project also acknowledges that some vector arithmetic can differ from the console in the last bit. How those differences affect other games, and whether they cause visible or gameplay problems, is not stated. The source does not detail the project’s licensing position or provide legal advice on disc images.
As an affiliate, we earn on qualifying purchases.
More Games Will Test the Method
The project’s next practical test is whether its recompilation scripts and hardware implementations can support a wider range of games without title-specific fixes. The developers have shown Gran Turismo 4 and God of War II, but the supplied description gives no release schedule, compatibility target or promised list of upcoming titles.
Readers can inspect the repository and its brief recording to see the implementation and demonstrations. Further reports would be needed to establish results on other machines, browsers and games, and to clarify how often users must address compatibility problems. Until those tests are available, the confirmed scope is the two titles and configurations described by the project itself.
gaming laptop with integrated graphics
As an affiliate, we earn on qualifying purchases.
As an affiliate, we earn on qualifying purchases.
Key Questions
What is ps2-web-recomp?
It is a GitHub project that translates PS2 game code into C++ and WebAssembly and recreates parts of the console’s software and hardware for browser execution.
Which games have the developers demonstrated?
The project reports demos of Gran Turismo 4 and God of War II. The source does not establish compatibility with the wider PS2 library.
Does the project include the games?
No. The project says users must provide a disc image of a game they own; it does not include game data.
How fast do the games run?
The developers report Gran Turismo 4 at 50 frames per second at twice native resolution and God of War II at 60 frames per second in heavy combat at native resolution on Chrome with a laptop’s integrated GPU. These are project-reported results, not independent benchmarks.
Is this a standard PS2 emulator?
The project says it does not use a conventional emulator approach for the main game code: it recompiles that code ahead of time, while interpreting or reimplementing other PS2 components.
Source: hn
Halloween Picks
halloween
As an affiliate, we earn on qualifying purchases.
