Skip to content

PS2 games in the browser: static recompilation to WebAssembly with a native runtime

C++

README: Gran Turismo 4 recording

Samir Nurid2064edb811f
diff --git a/README.md b/README.md
index 6257d11..5626d76 100644
--- a/README.md
+++ b/README.md
@@ -2,9 +2,15 @@
PlayStation 2 games running in the browser without an emulator. The game's Emotion Engine machine code is translated ahead of time into C++, compiled to WebAssembly, and linked against a reimplementation of the PS2's operating system and hardware that draws with WebGPU.
-This is the sibling of [psp-web-recomp](https://github.com/snuri00/psp-web-recomp) and follows the same method. The first title brought up this way is Gran Turismo 4, chosen because it is one of the most demanding games on the system: it leans on both vector units, on exact floating point behaviour for its replays and license tests, and on graphics tricks that read rendered images back as palettes. It plays from boot through the opening movie, the menus and races, with music and sound effects, and saves to a memory card kept in the browser. A race runs at about 50 frames per second in Chrome on a laptop's integrated GPU, at the PS2's resolution or up to three times above it.
+<p align="center">
+ <img src="docs/media/demo.webp" alt="Gran Turismo 4 running in a browser" width="720">
+ <br>
+ <a href="docs/media/demo.mp4">Watch the full recording (1:24)</a>
+</p>
-God of War II followed through the same scripts. It needed no game-specific code, but it found two bugs that Gran Turismo 4 had never triggered, one in the recompiler and one in the vector unit timing, and a few missing pieces of the PS2's input/output processor. It now plays from the menus through its cutscenes into combat. In Chrome the menus and movies hold 60 frames per second, while combat runs at about 33 so far, limited by the thread that runs vector unit 1.
+This is the sibling of [psp-web-recomp](https://github.com/snuri00/psp-web-recomp) and follows the same method. The first title brought up this way is Gran Turismo 4, chosen because it is one of the most demanding games on the system: it leans on both vector units, on exact floating point behaviour for its replays and license tests, and on graphics tricks that read rendered images back as palettes. It plays from boot through the opening movie, the menus and races, with music and sound effects, and saves to a memory card kept in the browser. A race runs at full speed, 50 frames per second for this PAL release, in Chrome on a laptop's integrated GPU at twice the PS2's resolution, which is how the recording above was made.
+
+God of War II followed through the same scripts. It needed no game-specific code, but it found two bugs that Gran Turismo 4 had never triggered, one in the recompiler and one in the vector unit timing, and a few missing pieces of the PS2's input/output processor. It now plays from the menus through its cutscenes into combat, and holds 60 frames per second in heavy combat at the PS2's resolution in Chrome. At twice the resolution it runs at 48 to 60, limited by the laptop's integrated GPU.
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.
diff --git a/docs/media/demo.mp4 b/docs/media/demo.mp4
new file mode 100644
index 0000000..aaa6860
Binary files /dev/null and b/docs/media/demo.mp4 differ
diff --git a/docs/media/demo.webp b/docs/media/demo.webp
new file mode 100644
index 0000000..e3184b6
Binary files /dev/null and b/docs/media/demo.webp differ