# supermedo/bloodborne_pc architecture

> Architecture diagram of the GitHub repository supermedo/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/supermedo/bloodborne_pc
- Repository: https://github.com/supermedo/bloodborne_pc

## Overview

Bloodborne for Windows runs the game’s x86-64 code natively and translates its graphics to Vulkan. The user workflow is to choose a game folder in the launcher, configure options, and start the game; runtime code loads the game, supplies PlayStation-compatible services, and renders it. The graph also preserves documented launcher, input, online, cache, and graphics-enhancement capabilities. Source evidence is uneven: launcher imports and selected GPU/cache relationships are indexed, while several runtime connections are shown only at the README level or remain unverified.

Main entry points: [`launcher/bbport_launcher_win.py`](https://github.com/supermedo/bloodborne_pc/blob/windows/launcher/bbport_launcher_win.py) (Windows launcher), [`src/runtime.c`](https://github.com/supermedo/bloodborne_pc/blob/windows/src/runtime.c) (Native game code), [`gpu/shadps4/video_core/renderer_vulkan/vk_pipeline_cache.cpp`](https://github.com/supermedo/bloodborne_pc/blob/windows/gpu/shadps4/video_core/renderer_vulkan/vk_pipeline_cache.cpp) (Pipeline management), [`gpu/shadps4/video_core/renderer_vulkan/vk_presenter.cpp`](https://github.com/supermedo/bloodborne_pc/blob/windows/gpu/shadps4/video_core/renderer_vulkan/vk_presenter.cpp) (Presentation and output)

## Diagram (Mermaid)

```mermaid
flowchart TD

subgraph group_launcher["Launcher and setup"]
  node_launcher_app["Windows launcher"]
  node_game_setup["Game preparation<br/>[prepare.py]"]
  node_mod_patches["Mods and patches<br/>[mods.py]"]
  node_patch_scripts["Patch handling<br/>[patches.py]"]
end

subgraph group_runtime["Native game runtime"]
  node_native_game["Native game code<br/>[runtime.c]"]
  node_compat_runtime["Compatibility services<br/>[runtime_services.c]"]
  node_input_runtime["Controller and input<br/>[runtime_pad.c]"]
end

subgraph group_gpu["Graphics translation"]
  node_gpu_entry["GPU integration<br/>[bbgpu.h]"]
  node_gpu_commands["GPU command processing<br/>[liverpool.cpp]"]
  node_shader_frontend["Shader translation<br/>[decode.cpp]"]
  node_shader_ir["Shader IR<br/>[program.cpp]"]
  node_spirv_backend["SPIR-V emission<br/>[emit_spirv.cpp]"]
  node_pipeline_cache["Pipeline management"]
  node_pipeline_storage[("Shader cache storage<br/>[cache_storage.cpp]")]
  node_vulkan_device["Vulkan device<br/>[vk_instance.h]"]
  node_vulkan_scheduler["GPU scheduling<br/>[vk_scheduler.h]"]
end

subgraph group_presentation["Display and enhancements"]
  node_display["Presentation and output<br/>[vk_presenter.cpp]"]
  node_upscaling["Upscaling and frame generation<br/>[vk_fsr4.cpp]"]
  node_dlss["DLSS integration"]
end

subgraph group_services["Game services"]
  node_online["Online play<br/>[thd_session.cpp]"]
  node_overlay["In-game settings overlay<br/>[bbport_overlay.cpp]"]
end

node_player(("Player"))
node_shadnet(("shadNet service"))
node_vulkan(("Vulkan runtime"))

node_player -->|"configures and starts"| node_launcher_app
node_launcher_app -->|"uses preparation"| node_game_setup
node_launcher_app -->|"loads mods"| node_mod_patches
node_launcher_app -->|"uses patches"| node_patch_scripts
node_launcher_app -.->|"launches game"| node_native_game
node_native_game -.->|"uses services"| node_compat_runtime
node_native_game -.->|"reads controls"| node_input_runtime
node_native_game -.->|"submits graphics"| node_gpu_entry
node_gpu_entry -.->|"dispatches GPU work"| node_gpu_commands
node_gpu_commands -.->|"requests pipelines"| node_pipeline_cache
node_pipeline_cache -->|"decodes shaders"| node_shader_frontend
node_shader_frontend -.->|"builds IR"| node_shader_ir
node_shader_ir -.->|"emits SPIR-V"| node_spirv_backend
node_pipeline_cache -->|"loads and saves"| node_pipeline_storage
node_pipeline_cache -->|"creates pipelines"| node_vulkan_device
node_vulkan_device -.->|"uses API"| node_vulkan
node_vulkan_scheduler -.->|"submits commands"| node_vulkan_device
node_vulkan_scheduler -.->|"presents frames"| node_display
node_display -.->|"supports enhancement"| node_upscaling
node_display -.->|"supports DLSS"| node_dlss
node_online -->|"connects online"| node_shadnet
node_player -->|"opens settings"| node_overlay

click node_launcher_app "https://github.com/supermedo/bloodborne_pc/blob/windows/launcher/bbport_launcher_win.py"
click node_game_setup "https://github.com/supermedo/bloodborne_pc/blob/windows/scripts/prepare.py"
click node_mod_patches "https://github.com/supermedo/bloodborne_pc/blob/windows/scripts/mods.py"
click node_patch_scripts "https://github.com/supermedo/bloodborne_pc/blob/windows/scripts/patches.py"
click node_native_game "https://github.com/supermedo/bloodborne_pc/blob/windows/src/runtime.c"
click node_compat_runtime "https://github.com/supermedo/bloodborne_pc/blob/windows/src/runtime_services.c"
click node_input_runtime "https://github.com/supermedo/bloodborne_pc/blob/windows/src/runtime_pad.c"
click node_gpu_entry "https://github.com/supermedo/bloodborne_pc/blob/windows/gpu/bbgpu.h"
click node_gpu_commands "https://github.com/supermedo/bloodborne_pc/blob/windows/gpu/shadps4/video_core/amdgpu/liverpool.cpp"
click node_shader_frontend "https://github.com/supermedo/bloodborne_pc/blob/windows/gpu/shadps4/shader_recompiler/frontend/decode.cpp"
click node_shader_ir "https://github.com/supermedo/bloodborne_pc/blob/windows/gpu/shadps4/shader_recompiler/ir/program.cpp"
click node_spirv_backend "https://github.com/supermedo/bloodborne_pc/blob/windows/gpu/shadps4/shader_recompiler/backend/spirv/emit_spirv.cpp"
click node_pipeline_cache "https://github.com/supermedo/bloodborne_pc/blob/windows/gpu/shadps4/video_core/renderer_vulkan/vk_pipeline_cache.cpp"
click node_pipeline_storage "https://github.com/supermedo/bloodborne_pc/blob/windows/gpu/shadps4/video_core/cache_storage.cpp"
click node_vulkan_device "https://github.com/supermedo/bloodborne_pc/blob/windows/gpu/shadps4/video_core/renderer_vulkan/vk_instance.h"
click node_vulkan_scheduler "https://github.com/supermedo/bloodborne_pc/blob/windows/gpu/shadps4/video_core/renderer_vulkan/vk_scheduler.h"
click node_display "https://github.com/supermedo/bloodborne_pc/blob/windows/gpu/shadps4/video_core/renderer_vulkan/vk_presenter.cpp"
click node_upscaling "https://github.com/supermedo/bloodborne_pc/blob/windows/gpu/shadps4/video_core/renderer_vulkan/vk_fsr4.cpp"
click node_dlss "https://github.com/supermedo/bloodborne_pc/blob/windows/gpu/dlss_bridge/bbport_dlss_bridge.cpp"
click node_online "https://github.com/supermedo/bloodborne_pc/blob/windows/gpu/bbnet/thd/thd_session.cpp"
click node_overlay "https://github.com/supermedo/bloodborne_pc/blob/windows/gpu/shim/bbport_overlay.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_app,node_game_setup,node_mod_patches,node_patch_scripts toneBlue
class node_native_game,node_compat_runtime,node_input_runtime toneAmber
class node_gpu_entry,node_gpu_commands,node_shader_frontend,node_shader_ir,node_spirv_backend,node_pipeline_cache,node_pipeline_storage,node_vulkan_device,node_vulkan_scheduler toneMint
class node_display,node_upscaling,node_dlss toneRose
class node_online,node_overlay,node_player,node_shadnet,node_vulkan toneIndigo
```

## Components

### Launcher and setup

- [Windows launcher](https://github.com/supermedo/bloodborne_pc/blob/windows/launcher/bbport_launcher_win.py): `launcher/bbport_launcher_win.py`
- [Game preparation](https://github.com/supermedo/bloodborne_pc/blob/windows/scripts/prepare.py): `scripts/prepare.py`
- [Mods and patches](https://github.com/supermedo/bloodborne_pc/blob/windows/scripts/mods.py): `scripts/mods.py`
- [Patch handling](https://github.com/supermedo/bloodborne_pc/blob/windows/scripts/patches.py): `scripts/patches.py`

### Native game runtime

- [Native game code](https://github.com/supermedo/bloodborne_pc/blob/windows/src/runtime.c): `src/runtime.c`
- [Compatibility services](https://github.com/supermedo/bloodborne_pc/blob/windows/src/runtime_services.c): `src/runtime_services.c`
- [Controller and input](https://github.com/supermedo/bloodborne_pc/blob/windows/src/runtime_pad.c): `src/runtime_pad.c`

### Graphics translation

- [GPU integration](https://github.com/supermedo/bloodborne_pc/blob/windows/gpu/bbgpu.h): `gpu/bbgpu.h`
- [GPU command processing](https://github.com/supermedo/bloodborne_pc/blob/windows/gpu/shadps4/video_core/amdgpu/liverpool.cpp): `gpu/shadps4/video_core/amdgpu/liverpool.cpp`
- [Shader translation](https://github.com/supermedo/bloodborne_pc/blob/windows/gpu/shadps4/shader_recompiler/frontend/decode.cpp): `gpu/shadps4/shader_recompiler/frontend/decode.cpp`
- [Shader IR](https://github.com/supermedo/bloodborne_pc/blob/windows/gpu/shadps4/shader_recompiler/ir/program.cpp): `gpu/shadps4/shader_recompiler/ir/program.cpp`
- [SPIR-V emission](https://github.com/supermedo/bloodborne_pc/blob/windows/gpu/shadps4/shader_recompiler/backend/spirv/emit_spirv.cpp): `gpu/shadps4/shader_recompiler/backend/spirv/emit_spirv.cpp`
- [Pipeline management](https://github.com/supermedo/bloodborne_pc/blob/windows/gpu/shadps4/video_core/renderer_vulkan/vk_pipeline_cache.cpp): `gpu/shadps4/video_core/renderer_vulkan/vk_pipeline_cache.cpp`
- [Shader cache storage](https://github.com/supermedo/bloodborne_pc/blob/windows/gpu/shadps4/video_core/cache_storage.cpp): `gpu/shadps4/video_core/cache_storage.cpp`
- [Vulkan device](https://github.com/supermedo/bloodborne_pc/blob/windows/gpu/shadps4/video_core/renderer_vulkan/vk_instance.h): `gpu/shadps4/video_core/renderer_vulkan/vk_instance.h`
- [GPU scheduling](https://github.com/supermedo/bloodborne_pc/blob/windows/gpu/shadps4/video_core/renderer_vulkan/vk_scheduler.h): `gpu/shadps4/video_core/renderer_vulkan/vk_scheduler.h`

### Display and enhancements

- [Presentation and output](https://github.com/supermedo/bloodborne_pc/blob/windows/gpu/shadps4/video_core/renderer_vulkan/vk_presenter.cpp): `gpu/shadps4/video_core/renderer_vulkan/vk_presenter.cpp`
- [Upscaling and frame generation](https://github.com/supermedo/bloodborne_pc/blob/windows/gpu/shadps4/video_core/renderer_vulkan/vk_fsr4.cpp): `gpu/shadps4/video_core/renderer_vulkan/vk_fsr4.cpp`
- [DLSS integration](https://github.com/supermedo/bloodborne_pc/blob/windows/gpu/dlss_bridge/bbport_dlss_bridge.cpp): `gpu/dlss_bridge/bbport_dlss_bridge.cpp`

### Game services

- [Online play](https://github.com/supermedo/bloodborne_pc/blob/windows/gpu/bbnet/thd/thd_session.cpp): `gpu/bbnet/thd/thd_session.cpp`
- [In-game settings overlay](https://github.com/supermedo/bloodborne_pc/blob/windows/gpu/shim/bbport_overlay.cpp): `gpu/shim/bbport_overlay.cpp`

### Other components

- **Player**
- **shadNet service**
- **Vulkan runtime**

## Connections

- Player → Windows launcher: configures and starts
- Windows launcher → Game preparation: uses preparation (evidence: `launcher/bbport_launcher_win.py`)
- Windows launcher → Mods and patches: loads mods (evidence: `launcher/bbport_launcher_win.py`)
- Windows launcher → Patch handling: uses patches (evidence: `launcher/bbport_launcher_win.py`)
- Windows launcher → Native game code: launches game
- Native game code → Compatibility services: uses services
- Native game code → Controller and input: reads controls
- Native game code → GPU integration: submits graphics
- GPU integration → GPU command processing: dispatches GPU work
- GPU command processing → Pipeline management: requests pipelines
- Pipeline management → Shader translation: decodes shaders (evidence: `gpu/shadps4/video_core/renderer_vulkan/vk_pipeline_cache.cpp`)
- Shader translation → Shader IR: builds IR
- Shader IR → SPIR-V emission: emits SPIR-V
- Pipeline management → Shader cache storage: loads and saves
- Pipeline management → Vulkan device: creates pipelines (evidence: `gpu/shadps4/video_core/renderer_vulkan/vk_pipeline_cache.cpp`)
- Vulkan device → Vulkan runtime: uses API
- GPU scheduling → Vulkan device: submits commands
- GPU scheduling → Presentation and output: presents frames
- Presentation and output → Upscaling and frame generation: supports enhancement
- Presentation and output → DLSS integration: supports DLSS
- Online play → shadNet service: connects online
- Player → In-game settings overlay: opens settings
