{
  "added_at": "2026-10-19",
  "additional_evidence_urls": [
    "https://github.com/snuri00/ps2-web-recomp/blob/6526f4803d98e10de50bea3af104a4d26e9df033/scripts/port.sh",
    "https://github.com/snuri00/ps2-web-recomp/blob/6526f4803d98e10de50bea3af104a4d26e9df033/scripts/test_vu_codegen.py",
    "https://github.com/snuri00/ps2-web-recomp/blob/6526f4803d98e10de50bea3af104a4d26e9df033/CMakeLists.txt",
    "https://github.com/snuri00/ps2-web-recomp/blob/6526f4803d98e10de50bea3af104a4d26e9df033/LICENSE",
    "https://github.com/snuri00/ps2-web-recomp/blob/6526f4803d98e10de50bea3af104a4d26e9df033/runtime/src/ipu/NOTICE"
  ],
  "category": "game-analysis",
  "description_en": "Statically recompiles PlayStation 2 games for the browser: eerecomp translates the Emotion Engine code of a game's boot executable into C++ that is compiled to WebAssembly, and a runtime emulates the rest of the console, including a high-level EE kernel, an interpreted I/O processor running the disc's IRX modules, the vector units, SPU2 sound and the Graphics Synthesizer on WebGPU compute shaders. Its port script repeats headless runs to find functions reached through pointers and vector-unit microprograms to compile ahead of time, then builds the web page and a native runner.",
  "description_zh": "将 PlayStation 2 游戏静态重编译后在浏览器中运行：eerecomp 把游戏启动程序中的 Emotion Engine 代码转换为 C++，再编译为 WebAssembly；运行时负责仿真主机的其余部分，包括高层仿真的 EE 内核、以解释器运行光盘 IRX 模块的 I/O 处理器、向量单元、SPU2 音频，以及基于 WebGPU 计算着色器的 Graphics Synthesizer。其移植脚本会反复进行无界面运行，找出经指针调用的函数和需要预先编译的向量单元微程序，最后构建网页和原生运行程序。",
  "entry_url": "https://awesomerea.org/resources/ps2-web-recomp/",
  "entry_url_zh": "https://awesomerea.org/zh/resources/ps2-web-recomp/",
  "evidence_url": "https://github.com/snuri00/ps2-web-recomp/blob/6526f4803d98e10de50bea3af104a4d26e9df033/README.md",
  "group": "tools",
  "id": "ps2-web-recomp",
  "json_url": "https://awesomerea.org/resources/ps2-web-recomp/record.json",
  "kind": "tool",
  "markdown_url": "https://awesomerea.org/resources/ps2-web-recomp/index.md",
  "markdown_url_zh": "https://awesomerea.org/zh/resources/ps2-web-recomp/index.md",
  "name": "PS2 Web Recomp",
  "name_zh": "PS2 Web Recomp 浏览器游戏重编译工具",
  "record_type": "resource",
  "relationship": "foundation",
  "requirements": [
    "The README reports two titles brought up so far: the PAL Gran Turismo 4, playable from boot through races at full speed in Chrome, and God of War II from its menus into combat, which needed no game-specific code but exposed a recompiler bug and a vector-unit timing bug. It warns that another game will most likely stop at an unimplemented system call, IOP library function or GS feature, and that vector-unit results can differ from the console's in the last bit.",
    "Users bring a disc image of a game they own; the repository contains no game code or data. The README states that the generated C++ and the built WebAssembly are translations of the game's executable that belong to its owners, asks users to keep them on their own machine and not publish them, and warns that anyone who can reach the local server can load the game.",
    "Porting needs Git, CMake 3.20+, Ninja, a C++20 compiler (Clang preferred), Python 3 and 7-Zip for .7z images; the first run installs the Emscripten SDK and downloads wgpu-native, and the native window needs SDL2. Everything has been run on x86-64 Linux, and the scripts also build on Apple-silicon macOS; expect about 300 MB of disk per game. The page needs WebGPU, which Linux Chrome enables only behind flags (the software renderer fallback is too slow for 3D), plus cross-origin isolation headers and HTTP Range support.",
    "There is no release, tag or CI workflow. scripts/test_vu_codegen.py exercises native and WebAssembly vector-unit code generation without a game disc, and a software GS rasterizer is kept as the reference for the GPU output. Frame rates are the author's measurements on one laptop. Last commit at review: 2026-10-19.",
    "MIT-licensed; the MPEG decoder's VLC tables adapted from Play! keep its BSD 2-clause notice, and the README names PCSX2, Play! and the ps2sdk headers as behavior references. It states no affiliation with Sony or the games' publishers."
  ],
  "requirements_zh": [
    "README 报告目前已移植两款游戏：PAL 版 Gran Turismo 4 可在 Chrome 中全速运行，从启动一直玩到比赛；God of War II 可从菜单进入战斗，它没有用到任何游戏专用代码，但暴露了重编译器中的一个错误和向量单元时序中的一个错误。README 提醒，其他游戏很可能停在尚未实现的系统调用、IOP 库函数或 GS 功能上，而且向量单元的计算结果可能在最后一位与主机不同。",
    "使用者需自备所拥有游戏的光盘镜像；仓库不含任何游戏代码或数据。README 说明生成的 C++ 和构建出的 WebAssembly 是对游戏可执行文件的转换，归游戏权利人所有，要求使用者只保留在自己的机器上、不得公开发布，并提醒任何能访问本地服务器的人都可以加载该游戏。",
    "移植需要 Git、CMake 3.20+、Ninja、C++20 编译器（首选 Clang）、Python 3，镜像为 .7z 时还需 7-Zip；首次运行会安装 Emscripten SDK 并下载 wgpu-native，原生窗口还需要 SDL2。全部流程均在 x86-64 Linux 上运行过，脚本也能在 Apple 芯片的 macOS 上构建；每款游戏约需 300 MB 磁盘空间。网页需要 WebGPU，Linux 版 Chrome 须开启实验性开关才能使用（软件渲染回退对 3D 而言过慢），还需要跨源隔离响应头和 HTTP Range 支持。",
    "项目没有发布版本、标签或 CI 工作流。scripts/test_vu_codegen.py 无需游戏光盘即可测试原生与 WebAssembly 的向量单元代码生成，软件 GS 光栅化器则保留为 GPU 输出的比对基准。帧率数据是作者在一台笔记本上的测量结果。审阅时最后一次提交为 2026-10-19。",
    "采用 MIT 许可证；MPEG 解码器中改编自 Play! 的 VLC 表保留其 BSD 2-clause 声明，README 将 PCSX2、Play! 和 ps2sdk 头文件列为行为参考。项目声明与 Sony 及各游戏发行商无关联。"
  ],
  "targets": [
    "binary",
    "game"
  ],
  "url": "https://github.com/snuri00/ps2-web-recomp",
  "verification": "source-reviewed",
  "verified_at": "2026-10-19"
}
