You can play PS2 games in a browser now, recompiled from the original code
PlayStation 2 games are running in a web browser, their main processor's code translated ahead of time instead of emulated.
PlayStation 2 games are running in a web browser, their main processor’s code translated ahead of time instead of emulated. The hobbyist project ps2-web-recomp has Gran Turismo 4 and God of War II playing in the browser, and a race runs “at full speed, 50 frames per second for this PAL release, in Chrome on a laptop’s integrated GPU” (the project’s README).
The method is translation for the main processor and emulation for the rest. “The game’s Emotion Engine machine code is translated ahead of time into C++ and compiled to WebAssembly, so the main CPU is never interpreted,” while “the rest of the console, its operating system and hardware, is emulated by a runtime that draws with WebGPU” (README). The game’s own code becomes browser code before you press play, so nothing has to pretend to be the PS2’s main processor while you race.
Gran Turismo 4 was picked as the stress test because “it is one of the most demanding games on the system,” and God of War II “holds 60 frames per second in heavy combat” (README). Two games is the entire catalog, and the README warns the next one “will most likely stop at a system call or an IOP library function nobody implemented yet.”
The legal side is handled the right way. “No game data is included here,” the README says. “Use disc images of games you own,” and since the translated builds are “translations of the game’s executable,” keep them “on your own machine and do not publish them.” The project is “not affiliated with or endorsed by Sony” (README). The same author did it first for the PSP: in psp-web-recomp, God of War: Chains of Olympus “plays from boot through the menus, cutscenes and combat.”
If you want to try it, the README’s bar is a WebGPU browser, cross-origin-isolated hosting and about 300 MB of disk per game, plus your own discs. If you love old hardware like I do, the takeaway is the method: this is how software outlives the chip it was built for.
Emulators used to be the only way back into an old console. Now the game itself gets translated.