Byrgenwerthnotes of Paleblood, rebuilding Bloodborne one verified function at a time

Last updated: October 28, 2026

Glossary: PS4 and port terms

A running glossary for terms used across the devlog and the system pages. Hover any of them on another page for a short definition.

The project

Functional decompilation
Rewriting the game's code as readable source that behaves exactly like the original, checked by running both on the same inputs. A matching decompilation goes further and requires the rebuilt bytes to be identical; this project does not, because the goal is a native port, not the original binary. What it does require is that every replaced function does the same thing: the same return value, the same memory written, the same calls made.
Source port
The game rebuilt from source to run natively somewhere else, here on a PC. It is where Paleblood is headed, not what it is today: the game does not run on Paleblood until its own runtime is far enough along.
Hook
A 14-byte jump written over the first bytes of an original function, pointing at the replacement. Every caller still calls the original address and lands in the replacement. A function shorter than the jump cannot be hooked this way. The hook table is installed by the runtime once it runs the game; the verification harness calls replacements directly.
Thunk
A tiny piece of code that only forwards a call. The game calls each PS4 library function through a thunk; our replacements call the same thunks, so whatever answers the original's calls (the harness's scripted stubs, or the runtime) answers the replacement's the same way.

Verification

Replaced, edge-verified and verified
A function is replaced once it is registered for hooking and the game library builds. It is edge-verified once its generated edge cases match the original instructions. It is verified once matching recorded-game cases also pass, mutation tests reject known wrong versions, and an independent reviewer approves the evidence and readability. These labels describe the recorded evidence, not every possible input or game state. tools/promote.py reruns the required cases and checks the review record before promotion; it does not create captures or supply approval.
Harness, captures and edge cases
The harness runs the original function from your own dump and its replacement, natively, outside the game, on the same inputs. Captures are inputs recorded while the game ran (the existing library was recorded on the old borrowed runtime; Paleblood's own recorder now has a stable, self-identifying output format, but still needs production call sites); edge cases are generated for situations a short run does not reach.
Mutation test
Deliberately wrong versions of a replacement go through verification too: each must fail. If one passes, the cases cannot see that difference, and they are fixed before anything is called verified.
Instruction trace and CFG coverage
An instruction trace records supported memory accesses made while single-stepping a bounded fixture. A control-flow graph (CFG) describes blocks and the edges between them; dynamic CFG coverage records only the blocks and edges that the fixture actually reached. Complete supported coverage, partial coverage, and unavailable coverage are different outcomes. A skipped host call or unsupported instruction cannot be treated as a complete trace. See Architecture: Verification for the guarantees and limits.

Runtime

Runtime and loader
The runtime is what the game's code runs on: Paleblood's own loader, which maps the executable and the game's own C library and file system modules and binds every system import, and its own versions of the PS4 system libraries, written clean-room. The project-owned runtime does not yet run the full game; see Runtime.
Boot milestone and import coverage
The runtime track measures how far the game's executable gets on Paleblood's own runtime. Import coverage distinguishes imports supplied by bundled guest modules, imports implemented by Paleblood, registered unresolved diagnostics, and unbound imports. The dashboard reports the last saved boot; registry changes alone do not refresh it. A boot milestone records a reached stage in startup, such as entry, threads, files, input, audio, video out, GPU, or first flip. The boot harness names the first unresolved call or execution failure.

PS4 platform

PS4, Orbis
The PlayStation 4 runs an AMD x86-64 CPU (Jaguar) and Orbis OS, derived from FreeBSD. Because the CPU is x86-64 like a PC's, the game's code can run directly on a PC once something provides the operating system around it.
SELF, ELF, PRX, eboot
An ELF is the standard executable format of Linux and FreeBSD. The PS4 wraps executables in a SELF (signed ELF); ours are fake-signed and unencrypted, so turning them back into ELFs only unwraps them. The main executable is eboot.bin; PRX files are the PS4's shared libraries.
NID
PS4 programs link to library functions by NID: a hash of the function's name. GhidraOrbis carries a database that turns NIDs back into names, so sceKernelUsleep shows up instead of a hash.
FDE
A Frame Description Entry: one function's unwind record in the executable's .eh_frame. Counting them gave an independent check on how many functions Ghidra found.
GNM, PM4, GCN
GNM is the PS4's low-level graphics API; the game builds PM4 command packets for its AMD GCN graphics chip. Paleblood does not plan to emulate that chip: the graphics are to be rebuilt at the level of the game's own graphics layer, on Vulkan.
vblank and flip
The screen refreshes at a fixed rate; the gap between two refreshes is the vertical blank. A flip shows a finished frame at a vblank. The frame limiter can flip every vblank (60 frames a second on a 60 Hz screen) or every other one (30).