feat(ps5lift): run lifted programs and titles on AnyPS5's libraries #15807
Loading…
Reference in a new issue
No description provided.
Delete branch "upstream-pr/15807"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
Imported from boykopovar/AnyPS5. Originally posted by oberonlift on 2026-11-04T16:24:18Z.
Merge after #15804 and #15806. Until the PRs before it merge, this PR also shows their changes; oberonlift/AnyPS5#16 shows only its own.
ps5lift is a static recompiler for PS5 executables: it lifts a game's x86-64 code to LLVM IR and compiles it ahead of time to aarch64, which runs on Linux against AnyPS5's own libraries with no interpreter or JIT. It runs AnyPS5's PS5-style test programs and a homebrew media player to its home screen; commercial games are not playable yet. Branch
ps5lift-previewmerges all of its PRs (how to try it); native Apple Silicon support is coming along fast. It is a separate approach from the ARM64 compiler in #5021; #1835 has an introduction.This connects the lifter, #15806, to AnyPS5's libraries, which #15797, #15798 and #15799 to #15804 build for a lifted program, and takes a title from its files to a running game. With it, all of ps5lift is in.
What
tools/ps5lift.py bridgesreads an AnyPS5 library's exports with libclang and writes a bridge per export, which takes the arguments from the guest's SysV registers and stack and calls the native implementation through its C prototype. Function-pointer parameters become thunks that call back into the guest,long doublecrosses between the guest's x87 format and the host's, and a variadic export calls itsvsibling with a SysVva_list. For libc it writes 1532 bridges and leaves 27 exports, which it reports.ANYPS5_GUEST_LIFTEDand runs lifted guests against them: libc, C++ exception, libkernel, libSceFiber and module-loading fixtures at -O0 and -O2, AnyPS5's PS5-style import and TLS executables, and AnyPS5's own libc tests. A further test checks the bridges' classification of records against clang's lowering.tools/ps5lift.py gameunwraps and relinks an extracted title with AnyPS5'sunwrap_self.pyand relinker, generates the bridges for the libraries it imports, lifts it and links it with the runtime;tools/ps5lift.py runstarts it with the title's files asapp0.lifterjob also installs the libclang Python bindings and AnyPS5's build dependencies and checks out every submodule.docs/dev/PS5LIFT.mdsays how to run a title, and the design and the ps5lift section of the technical debt cover the bridges and the lifted libraries.Tested
On a DGX Spark (aarch64 Linux, NVIDIA GB10, LLVM 18), with all the other PRs: all 69 of ps5lift's tests pass, at each of this PR's two commits. EVO Player, a homebrew media player, lifts, links and runs to its home screen at 60 fps. As on #15806, the convention check passes with #15805's script and with
main's reports only the system LLVM line until #15805 merges.Checklist
main; no other open PR implements the same functionsNotImplemented_nid_no_patch); silent stubs are listed under Silent stubs in their library's technical debt file.mdfiles or images added to the repository (attach them to this PR)🤖 Generated with Claude Code
Pull request closed