bloodborne_pc README

The project's README from github.com/deadinside28/bloodborne_pc. As one markdown file: README.md.

THIS PROJECT IS NOT RELATED TO SHADPS4. ALL QUESTIONS RELATED TO THIS PROJECT SHOULD BE SENT TO THE DISCORD SERVER https://discord.gg/KYZRKk9CB, NOT TO THE SHADPS4 SERVER.

bbport — a native Linux port of Bloodborne

English · Русский

bbport runs the original PlayStation 4 executable of Bloodborne (CUSA03173, game version 1.09) directly on an x86-64 Linux PC. It is not a general emulator. The game's own x86-64 code executes natively; a small runtime written for this one game replaces the PS4 system libraries; the GPU work is translated to Vulkan by a renderer derived from shadPS4 and heavily extended for this game, including temporal upscaling with AMD FSR 3.1, FSR 4 and FSR 4.1.1.

No game files are included. You need your own dump of Bloodborne (CUSA03173, v1.09). This project is not affiliated with Sony Interactive Entertainment, FromSoftware or AMD.

Status: experimental, playable. The game boots, loads saves and plays (the Hunter's Dream and several areas of Yharnam were played with it) with sound, gamepad and saving. A full play-through has not been verified, and only one machine (Linux, AMD Radeon RX 7800 XT, Mesa/RADV) has been tested thoroughly.

Highlights

How it differs from shadPS4

shadPS4 bbport
Scope General PS4 emulator, many games One game: Bloodborne v1.09
Loading Its own ELF loader and kernel emulation at run time The eboot is converted offline (scripts/) into an image with PS4 libc/Fios2 linked in; a C loader maps it and jumps into the game (loader and runtime: ~5k lines)
System libraries Broad HLE of the PS4 OS A small runtime (src/runtime_*.c) that implements exactly what Bloodborne calls: memory, threads, sync, files, audio (incl. ATRAC9), pad, saves, AppContent
GPU shadPS4 video core and shader recompiler The same core (vendored, GPL) with ~200 marked changes (bbport:) plus new modules: two-stage draw pipeline, render-state and texture-set memoization, render-scale proxies, motion vectors, FSR 3.1/4/4.1.1, frame capture and GPU profiler
GPU thread One thread processes the whole command stream (the bottleneck in Bloodborne) Decode and draw recording run on separate threads; the work scales with the hardware threads (Steam Deck included)
Upscaling — Temporal (FSR 3.1, FSR 4, FSR 4.1.1) with the game's own motion vectors and jitter
Game patches Patch files applied by the emulator The same community patches, compiled at start (scripts/patches.py); render resolution, effects and FPS from the launcher

Without shadPS4 there would be no bbport: its renderer and shader recompiler are the base of the graphics side.

Requirements

Build and run

git clone --recursive <this repository> bbport && cd bbport
bash build.sh                        # builds out/bb-probe and out/gpu/libbbgpu.so
BB_GAME_DIR=/path/to/CUSA03173 bash run.sh

or the launcher (pick the game folder, settings, Start):

bash launcher/bb-launcher.sh         # launcher/install-desktop.sh adds it to the app menu

By default the game folder is expected next to the repository (../CUSA03173). Saves and the shader cache go to user/ (the launcher lets you choose another folder); settings to bbport.ini. A gamepad is used through SDL3; there is a keyboard fallback.

Resolution and preset changes: for outputs other than 1080p (720p on the Steam Deck, 1440p, 4K) the whole game renders at the preset's resolution, set by a patch at start — the fastest path. Changing the output or the preset in the in-game menu then needs Apply and restart the game. The Live resolution changes setting (launcher, in-game menu, bbport.ini live_resolution=0|1|auto; off by default) instead keeps the game at 1080p internally and scales its render targets at run time, so 720p/1080p/1440p/4K and the presets switch without a restart. It costs more: the game then believes it renders 1080p and draws more (e.g. ~8× more small lights), and some targets are copied between sizes — use it on strong desktop GPUs only (auto turns it on for discrete GPUs with 8+ GB that are not pre-Turing NVIDIA). 1080p output and TAA always use the live path.

TAA: a separate native-resolution temporal AA mode in the launcher and overlay, switchable live without an FSR model. The saved FSR preset is restored when returning to FSR. FSR Native AA adds reconstruction on top of full-resolution rendering and can be slower than disabling AA. TAA also adds work compared with no temporal AA. The RCAS switch and the 0–2 sharpness control also work with TAA. Sharpening runs after temporal accumulation and leaves its history and HUD unchanged.

Mods: the launcher accepts separate loose-file mod folders (with dvdroot_ps4/, an extra wrapper folder, or the game folders such as chr/ directly; file name case does not matter), with enable switches and load order. A sibling CUSA03173-mods/ overlay also works. The original game is preserved; later mods override conflicting files. Third-party patches: shadPS4-format XML patch files in the data directory's patches/, switched on and off in the launcher. See mods and patches.

Launcher language: Russian or English (follows the system language by default).

Free camera and game debug menu (v1.09): enable the corresponding switches in the launcher or in-game menu and restart. Free camera uses Lance McDonald's GoldHEN patch: hold Cross and press L3 to cycle modes (keyboard: hold Space and press Z). It needs no fonts and conflicts with Enemy Control. For the game debug menu, install DbgFont14h.ccm and DbgFont14h.tpf from Debug Menu and XML Patch into the game's dvdroot_ps4/font/ first. Startup rejects missing or empty font files instead of launching the unsafe patch. Open it with the left touchpad / Tab; Backspace is the right touchpad. Touch coordinates are forwarded from SDL gamepads; Back/Select emulates a left click on pads without a touch surface. The port's settings menu remains Insert / L3+R3.

GPU occlusion queries still use synthetic pixel counters (PixelPipeStatDump), and IT_SET_PREDICATION is unimplemented. Free camera allows visual investigation; it does not implement GPU occlusion culling.

Upscaler assets (not included; FSR 3.1 needs none):

bash tools/fetch_fsr4_assets.sh      # FSR 4 v07 (MIT, built from AMD's source by Q2RTX)
# FSR 4.1.1, from your own AMD DLLs (e.g. OptiScaler's FSR4_LATEST), needs Proton (GE-Proton):
bash tools/fsr4cap/build_assets.sh <amd_fidelityfx_upscaler_dx12.dll> <amd_fidelityfx_loader_dx12.dll>

AppImage (Steam Deck): bash build.sh && bash packaging/appimage.sh → dist/Bloodborne-bbport-x86_64.AppImage; data in ~/.local/share/bbport, --play starts the game without the launcher window (Game Mode). FSR 4.1.1 models are not packaged: build them (see above) into ~/.local/share/bbport/fsr4_411 (BB_PACKAGE_FSR411=1 bundles a local fsr4_411 into an AppImage for your own devices). On the Steam Deck pick the 1280×720 output (the game is 16:9; on the 1280×800 screen it gets thin bars).

Adding the AppImage to Steam (Add a Non-Steam Game) needs no options; the compatibility tool does not matter. (Steam preloads its overlay into every non-Steam game; the AppImage removes it before its own programs start, so the Steam overlay is not shown in the game.) Where Steam runs games without FUSE (NixOS: Steam's FHS sandbox; the AppImage then exits with Cannot mount AppImage), set the launch options to

TMPDIR=$HOME/.cache APPIMAGE_EXTRACT_AND_RUN=1 NO_CLEANUP=1 %command%

The AppImage then unpacks itself (2 GB, `/.cache/appimage_extracted_*) on the first start (~10 s) and reuses that copy afterwards; a new AppImage version gets a new copy, the old one can be deleted. Without TMPDIRit would unpack into Steam's/tmp, which is in RAM there. Add --playafter%command%` to skip the launcher.

NVIDIA in the AppImage: startup discovers the host's installed 64-bit NVIDIA Vulkan ICD and exposes its vendor libraries alongside the bundled AMD/Intel drivers. This keeps the NVIDIA userspace driver matched to the host kernel module. Standard Linux distributions keep these libraries under /usr/lib*; on NixOS the AppImage's internal /nix/store may hide them. In that case copy the NVIDIA libraries into an accessible directory and set BB_NVIDIA_LIB_DIR=/path/to/libraries (the NVIDIA manifest must also be accessible). Explicit VK_DRIVER_FILES/VK_ICD_FILENAMES overrides are preserved. Diagnose drivers inside the package with:

./Bloodborne-bbport-x86_64.AppImage --vulkan-info 2>&1 | tee bbport-vulkan.log

A user reported successful startup with FSR 3 on a GTX 1060 6GB (Fedora 44, NVIDIA 580.178.04); selecting FSR 4 caused a black window. Use FSR 3 on this configuration.

MangoHud is bundled in the AppImage; enable its checkbox in the launcher. When running from source, install MangoHud separately. A diagnostic launch with VK_LOADER_LAYERS_DISABLE=~implicit~ also disables MangoHud.

Useful variables: BB_FRAME_STATS=1 (frame statistics), BB_GPU_PROFILE=1 (GPU time per pass), BB_FSR4_PROFILE=1 (GPU time per FSR 4 pass), BB_UPSCALER=taa|fsr3|fsr4|fsr411|off|none, BB_FRAMES_AHEAD=N (how many frames the GPU command thread may run ahead of the GPU; 1 by default, 0 = unbounded), BB_PRESENT_THREAD=0 (present on the vblank thread, as before), BB_LIVE_RES=1 (live resolution changes instead of the startup patch for outputs other than 1080p), BB_PAD_RECORD=file / BB_PAD_REPLAY=file (record a route with F9, replay it in scripted tests), BB_GC_BUDGET_MB=N (texture cache budget, as on integrated GPUs), BB_PRESENT_DUMP_TRIGGER=file with BB_PRESENT_DUMP_COUNT=N (dump N consecutive presented frames). More in docs/; recent changes: docs/CHANGES_2026-10-02.md, docs/CHANGES_2026-10-03.md.

Repository layout

Path Contents
src/ Loader (probe.c) and the HLE runtime
scripts/ Offline preparation of the game image, module linking, patch compiler
gpu/ Renderer library: vendored shadPS4 video core with this port's changes (gpu/VENDOR.txt), shims, ImGui menu, FSR 4.1.1 runtime (gpu/shadps4/video_core/renderer_vulkan/fsr411)
launcher/, packaging/ GTK4 launcher; Nix package and AppImage
patches/ Community patches for Bloodborne
tools/ Developer tools: scripted runs, A/B toggles, FSR benchmark helpers, FSR 4 shader rewrites, fsr4cap (FSR 4.1.1 recording/extraction)
tests/ Loader, runtime, patch and renderer tests
docs/ Design notes and measurements (upscaler, parallel GPU, motion vectors, roadmap)

Tests: bash build.sh --test, python3 -m unittest discover -s tests, and ninja -C out/gpu motion-history-test ui-composition-test scene-resolution-test motion-shader-test.

Roadmap

Credits and licenses

bbport is licensed under the GNU GPL v2 or later (LICENSE) — it contains code from shadPS4 (GPL-2.0-or-later). Third-party components keep their licenses: shadPS4 video core and shader recompiler (GPL-2.0+), sirit, half, FSR-Vulkan by FireBurn (MIT; FSR 3.1 on Vulkan and the FSR 4 v07 provider), AMD FidelityFX SDK (MIT), LibAtrac9 (MIT), Dear ImGui (MIT), DejaVu fonts, dxil-spirv (MIT, used to build the FSR 4.1.1 assets). Game patches by Kyo, Lance McDonald, auser1337, illusion, emoose and other community members (patches/Bloodborne.xml). AMD's FSR 4 DLLs and model data are not distributed here.

bloodborne_pc (deadinside28/bloodborne_pc)

performance
Searching Database…

What is this?bbport is a native Linux port of Bloodborne (CUSA03173, v1.09) that runs the original PS4 executable directly on an x86-64 Linux PC. It isn't a general emulator — the game's own code executes natively, a small custom runtime replaces the PS4 system libraries, and a Vulkan renderer derived from shadPS4 handles the GPU side, including temporal upscaling with FSR 3.1/4/4.1.1.
Is this a general PS4 emulator like shadPS4?No — bbport is built for exactly one game. The eboot is converted offline into a native memory image with PS4 libc and libSceFios2 linked in, so the game runs with no per-instruction CPU emulation; shadPS4's GPU renderer is vendored and heavily extended rather than reused as a general emulator core.
How do I build and run it?Build with GCC, CMake, Ninja, Python 3, glslang, SDL3 and Vulkan headers (or let Nix's shell.nix provide everything), place your own CUSA03173 game folder next to the repository, then launch through the GTK4 launcher. For the Steam Deck, run 'bash build.sh && bash packaging/appimage.sh' to produce an AppImage.
Do I need my own copy of Bloodborne?Yes — no game files are included. You must supply your own decrypted CUSA03173 dump (eboot.bin, scemodule, etc.) at version 1.09, plus a Vulkan 1.3-capable GPU.
Is the whole game fully playable right now?Status is experimental: the Hunter's Dream and several areas of Yharnam have been played through with sound, gamepad and saving working, but a full playthrough hasn't been verified, and only one machine (AMD RX 7800 XT on Mesa/RADV) has been tested thoroughly.
Does it work on NVIDIA GPUs or only AMD?Both are supported in principle — the AppImage auto-detects your host's NVIDIA Vulkan driver and exposes it alongside the bundled AMD/Intel drivers — but FSR 4 needs specific shader features and has been reported to fail on older NVIDIA cards like a GTX 1060, where FSR 3 works instead.
How does FSR 4.1.1 work without AMD's official shaders for Linux?bbport records AMD's official FSR 4.1.1 DLL once under vkd3d-proton and replays its passes natively on Vulkan, producing output that's bit-exact with the DLL; the assets are built locally from your own DLLs via tools/fsr4cap.
Does it support mods?Yes — the launcher can load separate loose-file mod folders or a sibling CUSA03173-mods/ overlay, with enable switches and load order, plus shadPS4-format XML patch files for additional tweaks.
How well does it run on the Steam Deck?There's a dedicated AppImage built with 'bash build.sh && bash packaging/appimage.sh' that bundles MangoHud and strips the Steam overlay before launch; pick the 1280x720 output on the Deck since the game is 16:9 on its 16:10 screen.
Why is it so much faster than a typical single-threaded emulator?The PS4 command stream decode and GPU draw recording run on separate threads instead of one, raising the frame rate from roughly 26 FPS to 90-150 FPS depending on resolution and scene.
Size
5.5 MB
Stars
3.2K
Age
17d
Commits · 90 Days