AnyPS5 Runs PS5 Games Natively on PC by Rewriting System Libraries, No Emulator
AnyPS5 enables PS5 games to run natively on Linux, Windows, and macOS by relinking ELF binaries and reimplementing Sony's system libraries in C++, translating RDNA shaders to SPIR-V for Vulkan, all without emulation, achieving 60-160 FPS on six titles.
AnyPS5 (boykopovar/AnyPS5) has gained 43.7k stars in 76 days while still at version v0.1.2. It converts PS5 game executables (.elf) and system libraries (.prx) into native Linux ELF, Windows PE, or macOS Mach-O binaries that run as ordinary PC processes — no emulator runtime, no background translation process. Six games have been demonstrated running at 60–160 FPS: Animal Well, Ape Academy 2, Hollow Knight, Balatro, Dreaming Sarah, and Hello Neighbor 2.
How It Achieves "No Emulation"
A PS5 game consists of a main ELF executable (eboot.bin) and a set of dynamic libraries in sce_module/ (e.g., libkernel, libc, libSceAgcDriver). Games call system functions via NID hashes rather than symbol names. AnyPS5 works on both sides:
Relinker reads the game ELF, scans its import table, records each NID, filters unused ones, and rewrites the dynamic section to produce a native ELF or PE. Imports still reference NIDs.
Reimplemented system libraries under core/libs/prx/ (libkernel, libc, pthread, APR/AMM command buffers, libSceAgcDriver graphics driver) are rewritten in C++ and compiled to .so/.dll. A nid_patcher renames each exported function to its NID hash so the OS loader resolves imports correctly.
When the game calls sceKernelCreateThread, it enters AnyPS5's pthread wrapper; GPU command buffers go to AnyPS5's Vulkan backend.
Conversion Pipeline: From .elf to Runnable
Command-line usage:
# input directory structure
source/input.elf sce_module/ libkernel.prx libc.prx ...
# convert to Linux
relinker source/input.elf app.elf
# convert to Windows
relinker --windows source/input.elf app.exe
# convert to macOS (x86-64 Mach-O, Rosetta on Apple Silicon)
relinker --macos --to-rosetta source/input.elf ebootThe relinker runs five steps: --to-intel: instruction lowering. PS5's Zen 2 binaries may contain AMD-specific or Intel-unsupported instructions (e.g., ANDN → scalar NOT/AND, RDSEED → RDRAND, CLWB → NOP). Only static instructions are handled; dynamically generated AMD instructions require an AMD host. RelinkerPipeline: reads imports by NID, scans syscall instructions, filters unreferenced NIDs, builds SysV-style dynamic section. GuestModuleBuilder: processes each module in sce_module/, converts to target-platform dynamic library, outputs to app0/sce_module/. LinuxElfPatcher or WindowsPePatcher: rewrites executable headers. Windows adds optional mimalloc redirection (redirects CRT malloc/free to mimalloc to reduce lock contention) and handles delayed module initialization so constructors run once.
Build-time nid_patcher: renames exports to NID hashes. Libraries are compiled once and reused across games.
Browser-Based Converter
A Web converter at boykopovar.github.io/AnyPS5 compiles the relinker to WebAssembly. Files never leave the machine. Supports batch conversion: drag multiple app ZIPs, each processed into numbered folders, final output as a ZIP (Linux output can also be an uncompressed folder, limited to 256 MiB for direct download).
Differences Across Three Output Platforms
Linux & Windows : full support.
macOS : only relinker works; output is x86-64 Mach-O running via Rosetta. --macos alone does not lower Rosetta-unsupported instructions; --to-rosetta must be added.
Windows extras : --windows-gui switches to GUI subsystem (avoids console window), --windows-diagnostics prints startup dependency diagnostics, --windows-fixed-base fixes the lowest load page address for games assuming fixed mappings.
Linux equivalent : --linux-fixed-base maps virtual address 0 to a specified address, produces ET_EXEC without ASLR, matching console mapping behavior.
Game Patches: Byte-Level Fixes
Some games hardcode console-specific constants (memory pool sizes, alignment). A relinker-patches.toml file alongside the input is auto-loaded. Format (TOML subset):
format = 1
[[patch]]
name = "pool_size"
target = "eboot.elf"
va = 0x1234
type = "i32"
expected = 0x10000000
value = 0x18000000
max = 0x7f000000
align = 0x1000
description = "pool size"The expected field ensures the patch only applies if the current bytes match, preventing silent corruption on wrong versions. Applied patches are summarized to <output-stem>.patches.toml; --verify-patches validates without writing.
Shaders: RDNA to SPIR-V Recompilation
PS5's GPU is AMD RDNA 2; its shader bytecode is not understood by PC GPUs (NVIDIA, Intel, AMD RDNA 3/4). AnyPS5 recompiles at runtime: RdnaDecoder decodes RDNA machine code. ControlFlow builds and structures a control-flow graph. Translation translates instructions. Optimization: SSA formation, resource planning, binding analysis. SpirvBackend emits SPIR-V. With ANYPS5_ENABLE_SPIRV_TOOLS, SPIRV-Tools validates the output.
Results are cached in memory and on disk ( ShaderDiskCache). Precompiled caches under shader_cache/prebuilt can be shared by the community. Vulkan pipeline library extension splits a full pipeline into four libraries (vertex input, pre-rasterization shaders, fragment shader, fragment output) so changing blend mode or vertex layout only rebuilds one part, reducing first-run stutter.
Is It Worth Using?
Legal boundary : Project states it is for interoperability, research, preservation, and compatibility. It does not include, distribute, or require any copyrighted software, firmware, encryption keys, or proprietary libraries. Users must legally obtain game binaries.
Suitable for :
Players with PS5 games who want to run them on PC.
Game preservation and compatibility researchers.
Engineers studying binary relinking, system library rewriting, cross-architecture shader compilation — the repo's architecture docs are high quality.
AMD GPU users on Linux/Windows with Vulkan support.
Not suitable for :
Users expecting one-click play. Converted games often have runtime issues; a community blocker map tracks per-game progress.
NVIDIA or Intel GPU users — Vulkan shader recompilation is theoretically cross-vendor but practical compatibility is per-game.
Players wanting new AAA titles — graphics feature coverage is far from playable.
Intel or Apple Silicon CPUs — unless the game lacks AMD-specific instructions.
Hidden barriers :
Version v0.1.2, pre-1.0, API may change drastically. Per-game usability varies wildly; blocker map records progress, known blockers, library coverage.
Host CPU must support AVX2, FMA, F16C, BMI1, BMI2, LZCNT, MOVBE (present in Zen 2). Missing any causes immediate exit with a list of missing extensions.
Conversion takes ~5 seconds; getting a game playable may take hours of log analysis, blocker map consultation, patch writing, and Discord community help.
AnyPS5 offers an unconventional path: instead of hardware emulation, it rewrites the entire system library layer and relinks. The bet is that PS5's system library interfaces are finite, enumerable, and reimplementable. 76 days, 43.7k stars, 11k+ commits prove the approach works for at least six games. The real test ahead is coverage of complex 3D exclusives — library function and shader coverage percentages on the project's progress page will determine how far it goes.
Signed-in readers can open the original source through BestHub's protected redirect.
This article has been distilled and summarized from source material, then republished for learning and reference. If you believe it infringes your rights, please contactand we will review it promptly.
Geek Labs
Daily shares of interesting GitHub open-source projects. AI tools, automation gems, technical tutorials, open-source inspiration.
How this landed with the community
Was this worth your time?
0 Comments
Thoughtful readers leave field notes, pushback, and hard-won operational detail here.
