ps3recomp: how games run on a PC
← project docs main page ps3recomp (upstream) fork
PS3RECOMP, HOW GAMES RUN ON A PC two simulated walk-throughs
ps3recomp is a toolkit that turns PlayStation 3 programs into native PC programs ahead of time, so no emulator has to run beside them. These two scenarios follow a port from the build to the first frames. They are fixed scripts that explain the project's own README, not a recording of a game.
tool or call inside the program work on the host PC SPU work
The project is sp00nznet/ps3recomp (MIT licence); this site links to a fork and the upstream. As of its README on 2026-11-13, the runtime builds on Windows, macOS and Linux, and runs a recompiled game on Windows; macOS and Linux have no title booted to gameplay from that tree yet. No game code or data is part of ps3recomp: you need your own copy of a game.
Build: from an executable to a native port
What the tools do to a game's executable, ahead of time, to get a program that runs on a PC.
- executable → loader
ppu_loaderStage 1: the loader reads the executable from your own copy of the game and writes out its image, function table, TOC and firmware imports. - loader → lifter
ppu_lifterStage 2: the lifter turns every PowerPC function into C++. With --hle-stubs, each firmware import stub becomes a ps3_hle_call(nid). - lifter SPU programs are handled separately: they are pulled out of the executable, and spu_lifter turns each into C. Its 256 KB local store becomes an array.
- lifter → NID tool
gen_hle_nidsStage 3: gen_hle_nids writes the table that maps each NID (the id of a firmware function) to a handler in the runtime. - NID tool → compiler
compileThe lifted code, the NID table and the ps3recomp runtime library are built together with CMake and a C++ compiler. - compiler → program
native exeThe result is an ordinary native program for your PC. No emulator runs underneath it.
Run: what happens when the port plays
What the native program does when the game calls the console's firmware, threads, graphics and SPUs.
- game code → dispatch
ps3_hle_callThe lifted game code calls a firmware function. Its stub is now ps3_hle_call(nid). - dispatch → libraries
cellPad, cellFs ...The NID table finds the handler in the HLE libraries, which are written for this project: input, audio, files, save data and more. - libraries → your PC
host APIsThe handler does the real work on your PC: files by ordinary file I/O, a pad through XInput or SDL2, sound through WASAPI or SDL2. - libraries → your PC
cellGcmGraphics go through cellGcm to a command processor that stands in for the console's GPU, then to a backend: D3D12 on Windows, Metal on macOS, Vulkan on Linux (opt-in). - libraries → dispatch
resultThe handler returns its result to the dispatcher. - dispatch → game code
resultThe dispatcher hands it back, and the game code carries on as if the firmware had answered. - game code → runtime
LV2 callsThreads, mutexes, memory and file calls go to implementations of the console's kernel calls, on a virtual 256 MB address space. - game code → SPU program
SPU jobWhen the game starts an SPU program, it runs as lifted C. Its local store is an array. - SPU program → runtime
DMA, channelsDMA becomes a memory copy through a transfer engine, and channels become message queues between threads.