bbhost README

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

bbhost

bbhost is a translation layer that runs Bloodborne on Windows and Linux. The game's own 1.09 executable runs unmodified on the PC's x86-64 CPU; bbhost answers its calls into the PS4's system libraries with PC implementations, and recompiles its GPU work, GCN shaders and the engine's draw calls, for Vulkan. The aim is a definitive PC version of the game - the original, intact, with what a PC release would add: any resolution and aspect ratio, 60 fps and beyond, keyboard and mouse, proper settings, mods and online play.

Cainhurst Castle

bbhost contains no game code or data. You need your own copy of the game: a dump with the 1.09 update and its decrypted executable.

Why not emulation

The PS4 has an x86-64 CPU, so the game's code does not need to be translated to run on a PC - it needs a place to live. bbhost provides that place:

Features

Yharnam in 21:9 Any resolution, ultrawide included. 21:9 and 32:9 with a wider field of view and the HUD where it belongs, and the resolution can be changed while playing. FSR 1 upscaling for slower GPUs.
PC Graphics settings Settings in the game's own menus. The System menu gains PC Settings, PC Graphics, PC Effects, PC Controls, PC Camera and Key Bindings, drawn in the game's style: anti-aliasing, ambient occlusion, shadow distance, fog, motion blur, field of view, frame cap and more.

The setup window

Status

The game is playable on Windows and Linux: the world, its bosses and online sessions. What runs on native code and what is still emulated:

Part State
Game logic (CPU) the game's own code, running natively
System libraries reimplemented by bbhost: all 660 named imports the game binds
Window, input, audio, movies, saves native (SDL3, Vulkan, FFmpeg, LibAtrac9)
Online native sockets and HTTP against a private server; peer-to-peer UDP with NAT traversal
Draws native: each draw is built from the engine's graphics objects; the command buffer only marks its place in the stream
Post-processing (YEBIS) native: every stage's resources built by bbhost
Tessellation native: the host GPU's own tessellation stages
Shaders translated from GCN to SPIR-V by bbhost's own compiler when the game creates them; pixel shaders the lifter accepts are decompiled to typed, structured SPIR-V instead
Frame pacing native: the game's frame-time manager runs as bbhost source; 30 fps by default, 60 by option
Compute dispatches, labels, fences still emulated: run through bbhost's command processor, which walks the game's PM4 command buffers
Texture memory the game's tiled textures are detiled on the GPU; changes are tracked by watching the game's writes

Known issues:

See docs/rendering.md for the graphics in detail and docs/decomp.md for which game functions have been rewritten.

Getting started

  1. Get the game files: a dump of Bloodborne with the 1.09 update copied over it (or kept beside it as CUSA00900-UPDATE, the way shadPS4 keeps it), and the 1.09 eboot.bin decrypted to an ELF (SHA-256 941f887a562aae054fac35af8cc8f27cf075f3d4cc2e029fb5ae2a663aaa5ae7).
  2. Download a release for Windows or Linux, or build bbhost yourself.
  3. Start bbhost. The setup window asks for the two paths, checks them and saves them; press Play.

docs/running.md covers the configuration, the controls, saves, logs and troubleshooting.

Building

cmake -S . -B build -DCMAKE_BUILD_TYPE=RelWithDebInfo
cmake --build build -j
./build/bbhost

Linux builds natively with GCC or Clang; the Windows executable is cross-compiled from Linux with Clang and mingw-w64 (MSVC cannot express the calling conventions involved). Dependencies, the Windows build, tests and packaging are in docs/building.md.

Documentation

Project layout

src/
  main.cpp       start-up and the main loop
  core/          ELF loading, relocation and import binding, TLS, configuration
  hle/           the PS4 system libraries: kernel, files, threads, audio, video,
                 network, NP, Gnm and the GPU command processor
  host/          the PC side: window, input, audio, Vulkan renderer, textures,
                 menus, overlay, plugins, updater
  gcn/           GCN shader decoding, translation and lifting to SPIR-V
  engine/        named engine structures and the features built on them:
                 frame rate, live resolution, menus, params, event flags,
                 PC enhancements
  decomp/        game functions rewritten as source
  net/           the private server's session service, accounts, STUN
  replay/        draw capture comparison
include/         the plugin API and the engine SDK (layouts, params, symbols)
plugins/         the official plugins (randomizer, boss rush, mutators) and an example
patches/         byte patches as data
res/             the Windows exe's icon and version details
tests/           unit tests (ctest)
tools/           shader tools, format tools, test drivers and packaging scripts
third_party/     LibAtrac9, Dear ImGui, Monocypher

Roadmap

License

bbhost is free software, licensed under the GNU General Public License, version 3 or later (see LICENSE). The third-party code in third_party/ and src/host/shaders/fsr1/ keeps its own licenses. The debug menu's glyphs (plugins/debug_menu/font14.bin) come from the X11 fonts k14 and 7x14, which are in the public domain.

Bloodborne is a trademark of Sony Interactive Entertainment. bbhost is not affiliated with or endorsed by Sony or FromSoftware, and contains none of the game's code or data.

Acknowledgements

bbhost (droogie/bbhost)

Searching Database…

641 ·GitHub
这是什么?bbhost 是一个转译层,它在 Windows 和 Linux 上运行 Bloodborne 未修改的 1.09 PS4 可执行文件,重新实现 PS4 的系统库,并把它的 GPU 工作(GCN 着色器和绘制调用)转译为 Vulkan,目标是做出一个支持任意分辨率、60 fps、键鼠、Mod 和在线游玩的最终 PC 版本。
这是模拟器吗?不是传统意义上的模拟器:由于 PS4 和 PC 都用 x86-64 CPU,游戏自己的代码可以原生运行,不需要解释器或重编译器,而 bbhost 重新实现 PS4 的系统库,并把图形越来越多地从模拟的 GPU 命令处理器迁移到原生 Vulkan 代码。
怎么让它跑起来?下载 Windows 或 Linux 的发布版本(或自行构建 bbhost),然后启动它;设置窗口会要求你提供游戏转储路径和解密后的可执行文件,检查并保存这些路径,然后你按下 Play 即可。
我需要自己拥有 Bloodborne 吗?需要——bbhost 不附带任何游戏代码或数据。你需要一份应用了 1.09 更新的 Bloodborne 转储,并且它的 eboot.bin 已解密为 ELF 文件。
现在所有内容都能完美运行吗?不能——计算调度、标签和栅栏仍要经过模拟的命令处理器,初次到访的区域在首次编译管线时可能卡顿,大约四分之一的初次召唤会失败并需要重试,而且在 Windows 下的 AMD RX 580 上有一个被报告、尚未解决的 GPU 挂起问题。
在线游玩能用吗?能用——bbhost 运行一个私人服务器,支持 bbhost 玩家之间的合作、入侵、留言、血迹和召唤印记,使用原生套接字/HTTP 加上带 NAT 穿透的点对点 UDP。
我可以通过 bbhost 修改游戏吗?可以,而且不用碰原始游戏文件:它自带文件替换、按字段名编辑参数表、以数据形式打入的字节补丁,以及原生插件,比如随机化、Boss Rush 和开发者自己的调试菜单。
相比原版,它增加了哪些 PC 特性?任意分辨率和纵横比(包括带正确 FOV 的 21:9/32:9)、FSR1 放大、修正了游戏计时的 60 fps、完整的键鼠支持,以及游戏内的 PC 设置菜单(画面、特效、操作和视角)。
支持 Steam Deck 吗?支持,设置窗口会明确检测并支持 Steam Deck 作为目标设备。
Creator
droogie
Size
8.9 MB
Stars
641
Age
11d
Commits · 90 Days