bbcpu: a PS4 x86-64 code runtime for arm64 Macs
bbcpu is a runtime that runs PS4 x86-64 game code on arm64 Macs. The Bloodborne Mac port uses it.
PS4 → Mac · Recompilation
bbcpu is a CPU runtime that runs PS4 x86-64 game code inside an arm64 process for Apple Silicon Macs. It came out of the Bloodborne Mac port, where it has run the game since that port dropped Rosetta. The repo holds no game code, addresses or data, so other PS4 ports can use it.
It includes a decoder, an interpreter, an x86-64 to arm64 JIT translator, a record and replay tracer and a runtime for recompiled code. Guest pointers are host pointers, and guest calls to addresses outside the guest code run host functions. Every guest thread becomes a host thread. There is no syscall layer, so the host implements the PS4 libraries the game imports. bbcpu does not load executables or draw anything.
Only arm64 macOS is tested. A missing instruction stops execution and reports the guest address and bytes.
To try it, you need clang, cmake and ninja. Rosetta is needed only for the tests.
- Run
bash build.sh. It fetches Zydis into deps/ and builds out/libbbcpu.a and out/hello. - Run
out/hello. The README says the guest returns 42. - Run
bash tools/cpu/test_jit.shto compare the interpreter and translator against native x86-64 results.
A player gets nothing from this alone. You still need your own copy of the game and a host that uses bbcpu. For porters, the useful part is the split: the CPU layer is generic, and the game-specific work stays in the host and the recompiler. bloodborne-runtime and bloodborne-recomp already use it.

