GUIDES / COMMUNITY FIELD GUIDE

PS2 Web Recomp Setup Guide

Build and run PS2 Web Recomp locally with a source-backed setup walkthrough, tool checklist, expected outputs, troubleshooting, and a timestamped video overview.

Documentation-based guide. Reviewed against the cited source revision. These instructions have not been independently tested by this community.

Use the original project’s tools to turn a disc image you own into a local browser build. This walkthrough explains the prerequisites, commands, output files, and first-run checks for the source revision listed above. It combines the author’s documentation and script review with a short YouTube background guide. We have not independently performed a game build or tested gameplay.

Before you begin

PS2 Web Recomp translates a game’s Emotion Engine code to C++, then compiles it to WebAssembly. A runtime handles the remaining console systems. You build each game on your own machine; this website provides guides and an author recording.

Requirement What to prepare
Build platform Linux x86-64 is author-tested; Apple silicon macOS builds are documented. The reviewed source provides no Windows build recipe.
Build tools Git, CMake, Ninja, a C++20 compiler, and Python 3. Clang is preferred by the scripts.
Game input Your own disc image: ISO, or a ZIP / 7z containing an ISO. A 7z archive also needs 7-Zip.
Browser A usable WebGPU adapter and the runtime’s required WebAssembly features. See the browser requirements.
Storage The author estimates about 300 MB per game for code and builds, plus the disc image. Extracting an archive needs room for the ISO too.

The two documented game records cover Gran Turismo 4 races and God of War II combat. Another title can stop at an unimplemented runtime function. Neither a completed build nor a title screen establishes full compatibility.

Watch the project explained

PS2 no navegador: como essa recompilação funciona, by Calma, dev!, published 14 October 2026, is a Portuguese explainer with captions. These links jump to useful background for the steps below:

This video explains the workflow; it does not record a complete installation. The commands and expected files below are checked against the pinned upstream README and scripts, which remain the primary sources. The video supplies background, not independent performance or compatibility evidence.

1. Check your build tools

In a terminal, check that these programs are available:

git --version
cmake --version
ninja --version
python3 --version
c++ --version
bash --version

Each command should print its installed version. A version response only confirms that the tool exists; the compiler still needs C++20 support. Install any missing tools using your platform’s package manager before continuing.

Apple silicon macOS: the scripts need Bash 4 or later; macOS’s built-in Bash 3.2 is too old. In a terminal with Homebrew already installed, the README lists:

brew install bash cmake ninja sevenzip

Make Homebrew’s executables available first in this terminal, then check which Bash the scripts will find:

export PATH="$(brew --prefix)/bin:$PATH"
command -v bash
bash --version

Confirm that the version is 4 or later. Git, Python 3, and a suitable compiler are separate prerequisites. Windows browser support does not establish a Windows build workflow.

2. Download the source code

Clone the author’s repository and select the revision used for this walkthrough:

git clone https://github.com/snuri00/ps2-web-recomp.git
cd ps2-web-recomp
git checkout ebf86d3b8fa915d38cb070bfd70b6b41669816d5

You can confirm the checkout with:

git rev-parse HEAD

It should print the commit above. This guide downloads source code; there is no game included. If you use a newer revision, follow its current README and record that commit when reporting a problem.

3. Build a game from your disc image

Run this from the repository directory. Replace the quoted path with the actual path to your own image, preserving the quotes if it contains spaces:

scripts/port.sh mygame "/absolute/path/My Game.iso"

mygame is a local identifier, not a game title to download. It determines the output paths used throughout this guide. Use a different identifier for a different disc: the script retains a disc already present under an existing identifier.

The first browser build installs Emscripten into tools/emsdk, unless EMSDK already points to an installation, and downloads wgpu-native. Initial setup therefore needs network access. Build duration depends on the machine and game; no fixed completion time is promised.

After tool setup, the script labels six stages:

Stage What the script does
1 / Disc Links or extracts the ISO and reads the boot program from SYSTEM.CNF.
2 / Executable Locates the game’s executable and any handled modules.
3 / Machine code to C++ Generates the main CPU code.
4 / Exploring Runs discovery passes, adds missing entry points, and translates again.
5 / Vector unit programs Compiles vector programs found during discovery.
6 / Builds Produces the native runner and browser page.

Discovery uses automated button presses to explore a limited path. The script can finish while a game still has unresolved runtime or graphics problems.

After a successful browser build, these paths help you check the result:

Path for mygame Purpose
build/web-mygame/ps2web.html Generated browser page, served as the local root URL.
games/mygame/disc.iso Disc image used by the local server; raw ISO inputs are linked.
games/mygame/shots/ Images captured during the last discovery run.
games/mygame/explore.log Discovery log to inspect when progress stops.

The completion message prints the serve command for your chosen identifier. If a build fails, retain the terminal error and inspect the named log before rerunning. The troubleshooting guide explains runtime gaps separately from browser startup problems.

4. Start the local server

For the mygame identifier used above, run:

python3 scripts/serve.py build/web-mygame games/mygame/disc.iso

Keep this terminal running, then open http://localhost:8620/ in a browser on the same machine. The supplied server provides the headers needed for shared memory and supports HTTP Range requests for disc streaming. Double-clicking the generated HTML or substituting a generic file server can leave required features unavailable.

If port 8620 is already occupied, stop the conflicting local process or choose another port using the server’s optional third argument:

python3 scripts/serve.py build/web-mygame games/mygame/disc.iso 8621

That command uses http://localhost:8621/. Browser saves belong to the address you play from, so keep a consistent address and export your memory card before moving between setups.

Press Ctrl+C in the server terminal when you finish. Follow the author’s instruction to keep generated game code and builds on your own machine.

5. Check the first run

  1. Read any startup capability message before pressing Start. The runtime checks cross-origin isolation, WebAssembly JSPI, exception handling, tail calls, and SIMD. WebGPU support alone does not satisfy every check.
  2. Check that the GPU renderer has a usable WebGPU adapter. The author describes software rendering as useful for menus and too slow for 3D gameplay. Consult the browser guide for the source revision’s platform guidance.
  3. Begin at 1× native internal resolution. Record a successful scene before comparing higher resolutions.
  4. Check input. Enter maps to Start and Z to Cross. Use the controls and gamepads reference for the rest of the mappings.
  5. Record what you actually reach: startup, menus, a race, or combat. Include the game region/revision, project commit, browser version, operating system, CPU, GPU, and resolution with any report.

For context, the author’s Gran Turismo 4 record reaches races and the God of War II record reaches combat. These are author-documented milestones, with the conditions and unknowns listed on each page.

Common setup problems

Symptom First thing to check
A tool is not found, or Bash rejects script syntax Recheck the tool versions and, on macOS, which Bash is first in PATH.
Browser page is missing after the build Read the terminal failure and check that you built the web target. --native-only skips it.
Start is marked unsupported Record the exact missing capability; use the supplied server and the startup checklist.
A menu appears but 3D is very slow Check the active renderer, WebGPU adapter, and internal resolution.
An unfamiliar game stops during discovery Inspect games/mygame/explore.log. Missing system calls or IOP functions can be gaps in the runtime.
Saves seem missing after changing the URL Return to the original address and check your exported memory card before replacing anything.

These are source-based checks, not independently reproduced fixes. Run the browser check to identify missing browser features. For a useful troubleshooting record, keep the exact error, environment, source revision, and scene reached.

Sources & verification

Evidence: Project author documentation. This community has not independently run the game or verified these instructions.

Source checked:
Version basis: ebf86d3b8fa915d38cb070bfd70b6b41669816d5

These notes describe the reviewed source revision. Newer upstream changes may require different steps. Suggest a correction with evidence.