Show HN: PS2 games statically recompiled to WebAssembly
Article URL: https://github.com/snuri00/ps2-web-recomp Comments URL: https://news.ycombinator.com/item?id=50052251 Points: 229 # Comments: 118
WebAssembly recompilation enables running PlayStation 2 games in web browsers. Emotion Engine machine code is first translated into C++, then compiled to WebAssembly and linked against a reimplementation of the PS2 operating system and hardware for drawing with WebGPU. Gran Turismo 4, known for being one of the most demanding games, was the initial title to be recompiled in this manner.
The game runs smoothly at full speed, 50 frames per second, in Chrome on a laptop's integrated GPU at double the original console's resolution. God of War II followed the same process and now runs at 60 frames per second in heavy combat at the original resolution. The recompiler, eerecomp, reads the game's executable, finds the functions, and emits C++ code in units of 16 KiB for guest code.
The emulation includes the PS2's kernel, high-level emulation of the EE side, I/O processor, and sound driver, all implemented in C++. The recompiled games run in workers, with vector units running in separate workers and the Graphics Synthesizer's video memory residing on the GPU. The recompiled games perform well, with Gran Turismo 4 reaching 60 frames per second at the original resolution and God of War II running at 50 frames per second. No game data is included, and players need to provide a disc image of the game they own.
Rewritten by urgent.news; may contain errors — check the original.
Source: github.com
This story
This is one outlet's version. Read the fullest account.