# deadinside28/bloodborne_pc architecture

> Architecture diagram of the GitHub repository deadinside28/bloodborne_pc, generated by GitDiagram from its file tree, README and a sample of source files (last updated 2026-10-20). It is an AI-made overview: check details against the source.

- Interactive diagram: https://gitdiagram.com/deadinside28/bloodborne_pc
- Repository: https://github.com/deadinside28/bloodborne_pc

## Overview

bbport is a native Linux port of Bloodborne 1.09: it runs the game’s x86-64 code directly, replaces PS4 services, translates graphics work to Vulkan, and adds game-specific hooks and online features. The main path runs from game installation and launcher configuration through native runtime execution, GPU command translation, rendering, and display. The graph also preserves the documented input, settings, upscaling, and online branches. Relationships for unsampled subsystems are based on the README, not inspected implementation; source-level evidence is limited to the sampled GPU pipeline and command-processing files.

Main entry points: [`src/runtime_services.c`](https://github.com/deadinside28/bloodborne_pc/blob/master/src/runtime_services.c) (Native Runtime), [`gpu/render/pipeline_cache.cpp`](https://github.com/deadinside28/bloodborne_pc/blob/master/gpu/render/pipeline_cache.cpp) (Pipeline Selection), [`launcher/bbport_launcher.py`](https://github.com/deadinside28/bloodborne_pc/blob/master/launcher/bbport_launcher.py) (GTK Launcher), [`gpu/cp/cp_tasks.cpp`](https://github.com/deadinside28/bloodborne_pc/blob/master/gpu/cp/cp_tasks.cpp) (Command Processor)

## Diagram (Mermaid)

```mermaid
flowchart TD

subgraph group_runtime["Native Runtime"]
  node_launcher["GTK Launcher<br/>[bbport_launcher.py]"]
  node_image_prep["Image Preparation"]
  node_native_runtime["Native Runtime<br/>[runtime_services.c]"]
  node_ps4_services["PS4 Service Replacements"]
end

subgraph group_gpu["GPU Translation"]
  node_gpu_commands["Command Processor<br/>[cp_tasks.cpp]"]
  node_memory_layer["GPU Memory Layer"]
  node_shader_translation["Shader Translation"]
  node_pipeline_cache["Pipeline Selection<br/>[pipeline_cache.cpp]"]
  node_vulkan_pipeline["Vulkan Pipelines<br/>[pipeline.cpp]"]
  node_pipeline_store[("Pipeline Persistence<br/>[pipeline_store.cpp]")]
  node_renderer["Renderer<br/>[rasterizer.cpp]"]
  node_display["Display Output<br/>[display.cpp]"]
  node_upscaling["Temporal Upscaling"]
end

subgraph group_experience["Game Experience"]
  node_game_hooks["Game Hooks"]
  node_input["Input and Prompts"]
  node_game_settings["Game Settings UI<br/>[bbport_overlay.cpp]"]
end

subgraph group_online["Online Services"]
  node_network_stack["PS4 Network Stack"]
  node_np_services["Network Platform Services"]
  node_shadnet["Shadnet Client<br/>[client.cpp]"]
end

node_player(("Player"))
node_game_files["Game Files"]
node_online_services{{"Online Services"}}

node_player -->|"configures"| node_launcher
node_game_files -->|"provides executable"| node_image_prep
node_image_prep -->|"prepares image for"| node_native_runtime
node_launcher -->|"configures"| node_native_runtime
node_native_runtime -->|"uses replacements"| node_ps4_services
node_native_runtime -.->|"submits GPU work"| node_gpu_commands
node_native_runtime -->|"runs with hooks"| node_game_hooks
node_gpu_commands -->|"translates memory work"| node_memory_layer
node_gpu_commands -.->|"selects pipelines"| node_pipeline_cache
node_pipeline_cache -->|"translates shaders"| node_shader_translation
node_pipeline_cache -->|"creates pipelines"| node_vulkan_pipeline
node_pipeline_cache -->|"loads and saves"| node_pipeline_store
node_vulkan_pipeline -.->|"feeds rendering"| node_renderer
node_renderer -.->|"presents frames"| node_display
node_renderer -->|"uses temporal upscaling"| node_upscaling
node_player -->|"controls game with"| node_input
node_input -.->|"drives game controls"| node_game_hooks
node_player -->|"configures in game"| node_game_settings
node_launcher -->|"selects online mode"| node_network_stack
node_network_stack -.->|"provides networking for"| node_np_services
node_np_services -.->|"supports online play"| node_shadnet
node_shadnet -->|"connects to"| node_online_services

click node_launcher "https://github.com/deadinside28/bloodborne_pc/blob/master/launcher/bbport_launcher.py"
click node_image_prep "https://github.com/deadinside28/bloodborne_pc/tree/master/scripts"
click node_native_runtime "https://github.com/deadinside28/bloodborne_pc/blob/master/src/runtime_services.c"
click node_ps4_services "https://github.com/deadinside28/bloodborne_pc/tree/master/gpu/bbnet/include/core/libraries"
click node_game_hooks "https://github.com/deadinside28/bloodborne_pc/blob/master/gpu/shim/bbport_guest_hooks.cpp"
click node_gpu_commands "https://github.com/deadinside28/bloodborne_pc/blob/master/gpu/cp/cp_tasks.cpp"
click node_memory_layer "https://github.com/deadinside28/bloodborne_pc/tree/master/gpu/layer"
click node_shader_translation "https://github.com/deadinside28/bloodborne_pc/tree/master/gpu/shader"
click node_pipeline_cache "https://github.com/deadinside28/bloodborne_pc/blob/master/gpu/render/pipeline_cache.cpp"
click node_vulkan_pipeline "https://github.com/deadinside28/bloodborne_pc/blob/master/gpu/render/pipeline.cpp"
click node_pipeline_store "https://github.com/deadinside28/bloodborne_pc/blob/master/gpu/render/pipeline_store.cpp"
click node_renderer "https://github.com/deadinside28/bloodborne_pc/blob/master/gpu/render/rasterizer.cpp"
click node_display "https://github.com/deadinside28/bloodborne_pc/blob/master/gpu/platform/videoout/display.cpp"
click node_upscaling "https://github.com/deadinside28/bloodborne_pc/blob/master/gpu/upscale/vk_temporal_upscaler.cpp"
click node_input "https://github.com/deadinside28/bloodborne_pc/blob/master/gpu/shim/bbport_button_prompts.cpp"
click node_game_settings "https://github.com/deadinside28/bloodborne_pc/blob/master/gpu/shim/bbport_overlay.cpp"
click node_network_stack "https://github.com/deadinside28/bloodborne_pc/tree/master/gpu/bbnet/shadps4/core/libraries/network"
click node_np_services "https://github.com/deadinside28/bloodborne_pc/tree/master/gpu/bbnet/shadps4/core/libraries/np"
click node_shadnet "https://github.com/deadinside28/bloodborne_pc/blob/master/gpu/bbnet/shadps4/shadnet/client.cpp"

classDef toneNeutral fill:#f8fafc,stroke:#334155,stroke-width:1.5px,color:#0f172a
classDef toneBlue fill:#dbeafe,stroke:#2563eb,stroke-width:1.5px,color:#172554
classDef toneAmber fill:#fef3c7,stroke:#d97706,stroke-width:1.5px,color:#78350f
classDef toneMint fill:#dcfce7,stroke:#16a34a,stroke-width:1.5px,color:#14532d
classDef toneRose fill:#ffe4e6,stroke:#e11d48,stroke-width:1.5px,color:#881337
classDef toneIndigo fill:#e0e7ff,stroke:#4f46e5,stroke-width:1.5px,color:#312e81
classDef toneTeal fill:#ccfbf1,stroke:#0f766e,stroke-width:1.5px,color:#134e4a
class node_launcher,node_image_prep,node_native_runtime,node_ps4_services toneBlue
class node_gpu_commands,node_memory_layer,node_shader_translation,node_pipeline_cache,node_vulkan_pipeline,node_pipeline_store,node_renderer,node_display,node_upscaling toneAmber
class node_game_hooks,node_input,node_game_settings toneMint
class node_network_stack,node_np_services,node_shadnet toneRose
class node_player,node_game_files,node_online_services toneIndigo
```

## Components

### Native Runtime

- [GTK Launcher](https://github.com/deadinside28/bloodborne_pc/blob/master/launcher/bbport_launcher.py): `launcher/bbport_launcher.py`
- [Image Preparation](https://github.com/deadinside28/bloodborne_pc/tree/master/scripts): `scripts`
- [Native Runtime](https://github.com/deadinside28/bloodborne_pc/blob/master/src/runtime_services.c): `src/runtime_services.c`
- [PS4 Service Replacements](https://github.com/deadinside28/bloodborne_pc/tree/master/gpu/bbnet/include/core/libraries): `gpu/bbnet/include/core/libraries`

### GPU Translation

- [Command Processor](https://github.com/deadinside28/bloodborne_pc/blob/master/gpu/cp/cp_tasks.cpp): `gpu/cp/cp_tasks.cpp`
- [GPU Memory Layer](https://github.com/deadinside28/bloodborne_pc/tree/master/gpu/layer): `gpu/layer`
- [Shader Translation](https://github.com/deadinside28/bloodborne_pc/tree/master/gpu/shader): `gpu/shader`
- [Pipeline Selection](https://github.com/deadinside28/bloodborne_pc/blob/master/gpu/render/pipeline_cache.cpp): `gpu/render/pipeline_cache.cpp`
- [Vulkan Pipelines](https://github.com/deadinside28/bloodborne_pc/blob/master/gpu/render/pipeline.cpp): `gpu/render/pipeline.cpp`
- [Pipeline Persistence](https://github.com/deadinside28/bloodborne_pc/blob/master/gpu/render/pipeline_store.cpp): `gpu/render/pipeline_store.cpp`
- [Renderer](https://github.com/deadinside28/bloodborne_pc/blob/master/gpu/render/rasterizer.cpp): `gpu/render/rasterizer.cpp`
- [Display Output](https://github.com/deadinside28/bloodborne_pc/blob/master/gpu/platform/videoout/display.cpp): `gpu/platform/videoout/display.cpp`
- [Temporal Upscaling](https://github.com/deadinside28/bloodborne_pc/blob/master/gpu/upscale/vk_temporal_upscaler.cpp): `gpu/upscale/vk_temporal_upscaler.cpp`

### Game Experience

- [Game Hooks](https://github.com/deadinside28/bloodborne_pc/blob/master/gpu/shim/bbport_guest_hooks.cpp): `gpu/shim/bbport_guest_hooks.cpp`
- [Input and Prompts](https://github.com/deadinside28/bloodborne_pc/blob/master/gpu/shim/bbport_button_prompts.cpp): `gpu/shim/bbport_button_prompts.cpp`
- [Game Settings UI](https://github.com/deadinside28/bloodborne_pc/blob/master/gpu/shim/bbport_overlay.cpp): `gpu/shim/bbport_overlay.cpp`

### Online Services

- [PS4 Network Stack](https://github.com/deadinside28/bloodborne_pc/tree/master/gpu/bbnet/shadps4/core/libraries/network): `gpu/bbnet/shadps4/core/libraries/network`
- [Network Platform Services](https://github.com/deadinside28/bloodborne_pc/tree/master/gpu/bbnet/shadps4/core/libraries/np): `gpu/bbnet/shadps4/core/libraries/np`
- [Shadnet Client](https://github.com/deadinside28/bloodborne_pc/blob/master/gpu/bbnet/shadps4/shadnet/client.cpp): `gpu/bbnet/shadps4/shadnet/client.cpp`

### Other components

- **Player**
- **Game Files**
- **Online Services**

## Connections

- Player → GTK Launcher: configures (evidence: `README.md`)
- Game Files → Image Preparation: provides executable (evidence: `README.md`)
- Image Preparation → Native Runtime: prepares image for (evidence: `README.md`)
- GTK Launcher → Native Runtime: configures (evidence: `README.md`)
- Native Runtime → PS4 Service Replacements: uses replacements (evidence: `README.md`)
- Native Runtime → Command Processor: submits GPU work
- Native Runtime → Game Hooks: runs with hooks (evidence: `README.md`)
- Command Processor → GPU Memory Layer: translates memory work (evidence: `README.md`)
- Command Processor → Pipeline Selection: selects pipelines
- Pipeline Selection → Shader Translation: translates shaders (evidence: `gpu/render/pipeline_cache.cpp`)
- Pipeline Selection → Vulkan Pipelines: creates pipelines (evidence: `gpu/render/pipeline.cpp`)
- Pipeline Selection → Pipeline Persistence: loads and saves
- Vulkan Pipelines → Renderer: feeds rendering
- Renderer → Display Output: presents frames
- Renderer → Temporal Upscaling: uses temporal upscaling (evidence: `README.md`)
- Player → Input and Prompts: controls game with (evidence: `README.md`)
- Input and Prompts → Game Hooks: drives game controls
- Player → Game Settings UI: configures in game (evidence: `README.md`)
- GTK Launcher → PS4 Network Stack: selects online mode (evidence: `README.md`)
- PS4 Network Stack → Network Platform Services: provides networking for
- Network Platform Services → Shadnet Client: supports online play
- Shadnet Client → Online Services: connects to (evidence: `README.md`)
