PS5 games, running natively on your machine.
LeonPS5 relinks a PlayStation 5 executable into a native Linux, Windows or macOS binary and provides the PS5 system libraries it binds to. No emulation, no runtime process. The converted game is a normal program on your machine.
0/3,192 declared system functions0/1,166 RDNA instructions0 tests green
The film
0:59 · 1080p60The whole story in one pass: the relinker, the loader, the launcher with real covers.download the MP4
Features
Everything here is in the repository, and the progress numbers are generated by its own CI.
one command
One command from game directory to running game
Point the runner at a game directory or an ELF. LeonPS5 relinks the executable, assembles the runtime layout and launches. The exit code is printed when it returns.
--libs overrides the system-library source, and --windows / --macos prepare layouts for other hosts.
# from a terminal
$ ./build/core/runner/leonps5 <game-directory-or-elf>
relink app.elf → native executable
stage libs/ + app0/ + resources
exec converted program
exit code printed
relinker targets
Three native formats
One relinker emits a real executable for your host. No bundled runtime, no loader stub.
--to-intel lowers AMD-only instructions for Intel CPUs.
home launcher
A console-style home screen
Scans a games directory and shows every title as a card, then starts the runner.
Keyboard, mouse and gamepad control, analog sticks and triggers included.
strictness
Fails loudly, never silently
Every declared system function is either implemented or throws with a precise reason. Unknown states throw std::runtime_error, the message goes to stderr and the process terminates.
Nothing calls NotImplemented_nid_no_patch and pretends to work.
shader recompiler
Shaders recompiled, not interpreted
RDNA2 shader binaries become SPIR-V for Vulkan, with optional Spirv-Tools validation and optimization. The recompiler lives in core/shader/recompiler, is a pure function of its input and is built to be reused.
lineage
Continues AnyPS5
This fork carries boykopovar/AnyPS5 forward under its own name: the runner is leonps5 and config uses the LEONPS5_ prefix, while the upstream APS5_ ABI macros stay untouched so upstream patch sets keep applying.
Vibe coded end to end with an AI agent: code, tests and docs, with a 699-test suite required green on every change.
How a port runs
The loader does the binding. Nothing patches the game at runtime.
Relink
The relinker reads the PS5 ELF, resolves imports by NID, rewrites the dynamic section and emits a native executable for the host.
Bind
System libraries are renamed to their NIDs, so the OS loader binds every import by the same names at load time.
Assemble
The runner stages the runtime layout and launches the converted program.
leonps5-out/ ├─ app.elf relinked executable ├─ libs/ *.prx, NID-bound └─ app0/ game resources
Render
Along the way the shader recompiler turns RDNA2 binaries into SPIR-V, which the Vulkan driver compiles for your GPU.
Status
Every declared function. Every instruction.
The badges on the repository are generated by its own CI on every push to main. These are the same numbers.
System libraries
implemented / declared exports
0 / 3,192
Declared surface: the functions exported by core/libs/prx, not every firmware export. A function counts as implemented when it no longer calls NotImplemented_nid_no_patch.
RDNA ISA coverage
decoded / public instruction list
0 / 1,166
Decoder coverage of the public RDNA 1 + RDNA 2 list in tools/rdna_isa.txt. Opcodes outside AMD's public list are not counted.
Quick start
From clone to converted game in eight commands.
$ git clone https://github.com/loak7993-code/LeonPS5.git
$ cd LeonPS5
$ git submodule update --init --recursive
$ cmake -S . -B build -G Ninja -DCMAKE_BUILD_TYPE=Release -DBUILD_TESTING=ON
$ cmake --build build --parallel
$ cmake --build build --target libs --parallel
$ ctest --test-dir build
$ ./build/core/runner/leonps5 <game-directory-or-elf>
$
Requirements
- x86-64 host
- Git
- CMake 3.22 or newer, Ninja
- C++20 compiler
- Linux: libx11-dev, libxext-dev (SDL X11 headers)
The build tree is the deployment: no install step. The libs target produces the patched system libraries and the runner picks them up automatically.
Configure
LEONPS5_GPUVulkan device by name, case-insensitivedefault: first discrete deviceLEONPS5_SYSTEM_FONTSconsole font directorydefault: leonps5-fonts/APS5_CAPTURE_TRACEGPU execution trace at first usedefault: offAPS5_PIPELINE_STATSdriver pipeline stats per pipelinedefault: offAPS5_ENABLE_TIMING_LOGframe timings to frame-timing.logdefault: offInput: SDL-mapped controllers, plus a configurable keyboard and mouse mapping in leonps5-input.ini.
Known limits
Said out loud, tracked in a document.
docs/dev/TechnicalDebt.md
Signatures and error codes for functions never observed on real hardware come from reverse engineering references. Each is documented per file.
libSceAgc
A handful of AGC exports still throw: sceAgcGetDefaultCxStateFlat, sceAgcCbMemsetExclusive, and the _0300 branch-patch targets.
portability
The runner is verified on Linux. The --windows and --macos paths prepare the layout and print the command to run it on that host.
open work
Console hardware verification of the remaining unverified-on-hardware notes is open work, tracked in the technical debt document.