# mrsuss60/bloodborne_pc_windows_port architecture

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

- Interactive diagram: https://gitdiagram.com/mrsuss60/bloodborne_pc_windows_port
- Repository: https://github.com/mrsuss60/bloodborne_pc_windows_port

## Overview

This is a native Windows port that runs Bloodborne’s x86-64 game code, provides a compatibility runtime for PS4 system calls, and translates graphics work to Vulkan. The principal workflow is: select game files and options in a launcher, start the game through the runtime, and render its output through the GPU path. The README documents major capabilities, while the source index confirms selected module references; many implementation details are unsampled, so the graph omits unverified internal call relationships.

Main entry points: [`src/runtime.c`](https://github.com/mrsuss60/bloodborne_pc_windows_port/blob/master/src/runtime.c) (System-call runtime), [`bblauncherAPP/bblauncher_app.py`](https://github.com/mrsuss60/bloodborne_pc_windows_port/blob/master/bblauncherAPP/bblauncher_app.py) (Graphical launcher), [`gpu/shadps4/video_core/renderer_vulkan`](https://github.com/mrsuss60/bloodborne_pc_windows_port/tree/master/gpu/shadps4/video_core/renderer_vulkan) (Vulkan rendering), [`src/probe.c`](https://github.com/mrsuss60/bloodborne_pc_windows_port/blob/master/src/probe.c) (Native game loader)

## Diagram (Mermaid)

```mermaid
flowchart TD

subgraph group_launch["Launch and configuration"]
  node_launcher["Graphical launcher<br/>[bblauncher_app.py]"]
  node_launcher_ui["Launcher interface<br/>[bblauncher_UI.py]"]
  node_launcher_utils["Launch validation"]
  node_game_files["Game executable"]
end

subgraph group_runtime["Windows runtime"]
  node_runtime_entry["Native game loader<br/>[probe.c]"]
  node_runtime_core["System-call runtime<br/>[runtime.c]"]
  node_runtime_host["Win32 compatibility<br/>[runtime_host.c]"]
  node_runtime_memory["Memory and exceptions<br/>[win32_memory.c]"]
  node_runtime_services["System services<br/>[runtime_services.c]"]
  node_runtime_audio["Audio runtime<br/>[runtime_audio.c]"]
  node_runtime_pad["Input runtime<br/>[runtime_pad.c]"]
  node_runtime_savedata["Save data<br/>[runtime_savedata.c]"]
end

subgraph group_graphics["GPU translation and rendering"]
  node_gpu_bridge["GPU bridge<br/>[bbgpu.h]"]
  node_command_decode["PS4 command decoding"]
  node_shader_recompiler["Shader translation"]
  node_pipeline_cache["Pipeline compilation and cache"]
  node_cache_storage[("Persistent cache storage<br/>[cache_storage.cpp]")]
  node_vulkan_renderer["Vulkan rendering"]
  node_texture_cache["Texture and buffer caches"]
  node_upscaling["Temporal upscaling"]
  node_presenter["Frame presentation"]
end

subgraph group_features["Game-facing capabilities"]
  node_overlay["In-game overlay<br/>[bbport_overlay.cpp]"]
  node_patches["Community patches<br/>[patches.py]"]
end

node_user(("Player"))

node_user -->|"configures"| node_launcher
node_launcher -->|"opens interface"| node_launcher_ui
node_launcher -->|"validates launch"| node_launcher_utils
node_launcher -->|"selects executable"| node_game_files
node_launcher -->|"starts game"| node_runtime_entry
node_runtime_entry -->|"runs game code"| node_runtime_core
node_runtime_core -->|"uses Win32 support"| node_runtime_host
node_runtime_core -->|"uses native memory"| node_runtime_memory
node_runtime_core -->|"handles services"| node_runtime_services
node_runtime_core -.->|"supports audio"| node_runtime_audio
node_runtime_core -.->|"supports gamepad"| node_runtime_pad
node_runtime_core -.->|"persists saves"| node_runtime_savedata
node_runtime_entry -->|"dispatches graphics"| node_gpu_bridge
node_gpu_bridge -.->|"submits GPU work"| node_command_decode
node_command_decode -.->|"translates shaders"| node_shader_recompiler
node_shader_recompiler -->|"provides shader programs"| node_pipeline_cache
node_pipeline_cache -->|"loads and saves"| node_cache_storage
node_pipeline_cache -->|"creates pipelines"| node_vulkan_renderer
node_command_decode -.->|"streams textures"| node_texture_cache
node_vulkan_renderer -.->|"upscales frames"| node_upscaling
node_vulkan_renderer -.->|"presents frames"| node_presenter
node_user -->|"opens overlay"| node_overlay
node_overlay -.->|"configures graphics"| node_vulkan_renderer
node_launcher -->|"selects patches"| node_patches

click node_launcher "https://github.com/mrsuss60/bloodborne_pc_windows_port/blob/master/bblauncherAPP/bblauncher_app.py"
click node_launcher_ui "https://github.com/mrsuss60/bloodborne_pc_windows_port/blob/master/bblauncherAPP/bblauncher_UI.py"
click node_launcher_utils "https://github.com/mrsuss60/bloodborne_pc_windows_port/blob/master/bblauncherAPP/bblauncher_Utils.py"
click node_runtime_entry "https://github.com/mrsuss60/bloodborne_pc_windows_port/blob/master/src/probe.c"
click node_runtime_core "https://github.com/mrsuss60/bloodborne_pc_windows_port/blob/master/src/runtime.c"
click node_runtime_host "https://github.com/mrsuss60/bloodborne_pc_windows_port/blob/master/src/runtime_host.c"
click node_runtime_memory "https://github.com/mrsuss60/bloodborne_pc_windows_port/blob/master/src/win32_memory.c"
click node_runtime_services "https://github.com/mrsuss60/bloodborne_pc_windows_port/blob/master/src/runtime_services.c"
click node_runtime_audio "https://github.com/mrsuss60/bloodborne_pc_windows_port/blob/master/src/runtime_audio.c"
click node_runtime_pad "https://github.com/mrsuss60/bloodborne_pc_windows_port/blob/master/src/runtime_pad.c"
click node_runtime_savedata "https://github.com/mrsuss60/bloodborne_pc_windows_port/blob/master/src/runtime_savedata.c"
click node_gpu_bridge "https://github.com/mrsuss60/bloodborne_pc_windows_port/blob/master/gpu/bbgpu.h"
click node_command_decode "https://github.com/mrsuss60/bloodborne_pc_windows_port/tree/master/gpu/shadps4/video_core/amdgpu"
click node_shader_recompiler "https://github.com/mrsuss60/bloodborne_pc_windows_port/tree/master/gpu/shadps4/shader_recompiler"
click node_pipeline_cache "https://github.com/mrsuss60/bloodborne_pc_windows_port/blob/master/gpu/shadps4/video_core/renderer_vulkan/vk_pipeline_cache.cpp"
click node_cache_storage "https://github.com/mrsuss60/bloodborne_pc_windows_port/blob/master/gpu/shadps4/video_core/cache_storage.cpp"
click node_vulkan_renderer "https://github.com/mrsuss60/bloodborne_pc_windows_port/tree/master/gpu/shadps4/video_core/renderer_vulkan"
click node_texture_cache "https://github.com/mrsuss60/bloodborne_pc_windows_port/tree/master/gpu/shadps4/video_core/texture_cache"
click node_upscaling "https://github.com/mrsuss60/bloodborne_pc_windows_port/tree/master/gpu/shadps4/video_core/renderer_vulkan"
click node_overlay "https://github.com/mrsuss60/bloodborne_pc_windows_port/blob/master/gpu/shim/bbport_overlay.cpp"
click node_patches "https://github.com/mrsuss60/bloodborne_pc_windows_port/blob/master/scripts/patches.py"
click node_presenter "https://github.com/mrsuss60/bloodborne_pc_windows_port/tree/master/gpu/shadps4/core/libraries/videoout"

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_launcher_ui,node_launcher_utils,node_game_files toneBlue
class node_runtime_entry,node_runtime_core,node_runtime_host,node_runtime_memory,node_runtime_services,node_runtime_audio,node_runtime_pad,node_runtime_savedata toneAmber
class node_gpu_bridge,node_command_decode,node_shader_recompiler,node_pipeline_cache,node_cache_storage,node_vulkan_renderer,node_texture_cache,node_upscaling,node_presenter toneMint
class node_overlay,node_patches toneRose
class node_user toneIndigo
```

## Components

### Launch and configuration

- [Graphical launcher](https://github.com/mrsuss60/bloodborne_pc_windows_port/blob/master/bblauncherAPP/bblauncher_app.py): `bblauncherAPP/bblauncher_app.py`
- [Launcher interface](https://github.com/mrsuss60/bloodborne_pc_windows_port/blob/master/bblauncherAPP/bblauncher_UI.py): `bblauncherAPP/bblauncher_UI.py`
- [Launch validation](https://github.com/mrsuss60/bloodborne_pc_windows_port/blob/master/bblauncherAPP/bblauncher_Utils.py): `bblauncherAPP/bblauncher_Utils.py`
- **Game executable**

### Windows runtime

- [Native game loader](https://github.com/mrsuss60/bloodborne_pc_windows_port/blob/master/src/probe.c): `src/probe.c`
- [System-call runtime](https://github.com/mrsuss60/bloodborne_pc_windows_port/blob/master/src/runtime.c): `src/runtime.c`
- [Win32 compatibility](https://github.com/mrsuss60/bloodborne_pc_windows_port/blob/master/src/runtime_host.c): `src/runtime_host.c`
- [Memory and exceptions](https://github.com/mrsuss60/bloodborne_pc_windows_port/blob/master/src/win32_memory.c): `src/win32_memory.c`
- [System services](https://github.com/mrsuss60/bloodborne_pc_windows_port/blob/master/src/runtime_services.c): `src/runtime_services.c`
- [Audio runtime](https://github.com/mrsuss60/bloodborne_pc_windows_port/blob/master/src/runtime_audio.c): `src/runtime_audio.c`
- [Input runtime](https://github.com/mrsuss60/bloodborne_pc_windows_port/blob/master/src/runtime_pad.c): `src/runtime_pad.c`
- [Save data](https://github.com/mrsuss60/bloodborne_pc_windows_port/blob/master/src/runtime_savedata.c): `src/runtime_savedata.c`

### GPU translation and rendering

- [GPU bridge](https://github.com/mrsuss60/bloodborne_pc_windows_port/blob/master/gpu/bbgpu.h): `gpu/bbgpu.h`
- [PS4 command decoding](https://github.com/mrsuss60/bloodborne_pc_windows_port/tree/master/gpu/shadps4/video_core/amdgpu): `gpu/shadps4/video_core/amdgpu`
- [Shader translation](https://github.com/mrsuss60/bloodborne_pc_windows_port/tree/master/gpu/shadps4/shader_recompiler): `gpu/shadps4/shader_recompiler`
- [Pipeline compilation and cache](https://github.com/mrsuss60/bloodborne_pc_windows_port/blob/master/gpu/shadps4/video_core/renderer_vulkan/vk_pipeline_cache.cpp): `gpu/shadps4/video_core/renderer_vulkan/vk_pipeline_cache.cpp`
- [Persistent cache storage](https://github.com/mrsuss60/bloodborne_pc_windows_port/blob/master/gpu/shadps4/video_core/cache_storage.cpp): `gpu/shadps4/video_core/cache_storage.cpp`
- [Vulkan rendering](https://github.com/mrsuss60/bloodborne_pc_windows_port/tree/master/gpu/shadps4/video_core/renderer_vulkan): `gpu/shadps4/video_core/renderer_vulkan`
- [Texture and buffer caches](https://github.com/mrsuss60/bloodborne_pc_windows_port/tree/master/gpu/shadps4/video_core/texture_cache): `gpu/shadps4/video_core/texture_cache`
- [Temporal upscaling](https://github.com/mrsuss60/bloodborne_pc_windows_port/tree/master/gpu/shadps4/video_core/renderer_vulkan): `gpu/shadps4/video_core/renderer_vulkan`
- [Frame presentation](https://github.com/mrsuss60/bloodborne_pc_windows_port/tree/master/gpu/shadps4/core/libraries/videoout): `gpu/shadps4/core/libraries/videoout`

### Game-facing capabilities

- [In-game overlay](https://github.com/mrsuss60/bloodborne_pc_windows_port/blob/master/gpu/shim/bbport_overlay.cpp): `gpu/shim/bbport_overlay.cpp`
- [Community patches](https://github.com/mrsuss60/bloodborne_pc_windows_port/blob/master/scripts/patches.py): `scripts/patches.py`

### Other components

- **Player**

## Connections

- Player → Graphical launcher: configures
- Graphical launcher → Launcher interface: opens interface (evidence: `bblauncherAPP/bblauncher_app.py`)
- Graphical launcher → Launch validation: validates launch (evidence: `bblauncherAPP/bblauncher_app.py`)
- Graphical launcher → Game executable: selects executable
- Graphical launcher → Native game loader: starts game
- Native game loader → System-call runtime: runs game code (evidence: `src/probe.c`)
- System-call runtime → Win32 compatibility: uses Win32 support
- System-call runtime → Memory and exceptions: uses native memory
- System-call runtime → System services: handles services (evidence: `src/runtime_services.c`)
- System-call runtime → Audio runtime: supports audio
- System-call runtime → Input runtime: supports gamepad
- System-call runtime → Save data: persists saves
- Native game loader → GPU bridge: dispatches graphics (evidence: `src/probe.c`)
- GPU bridge → PS4 command decoding: submits GPU work
- PS4 command decoding → Shader translation: translates shaders
- Shader translation → Pipeline compilation and cache: provides shader programs (evidence: `gpu/shadps4/video_core/renderer_vulkan/vk_pipeline_cache.cpp`)
- Pipeline compilation and cache → Persistent cache storage: loads and saves
- Pipeline compilation and cache → Vulkan rendering: creates pipelines (evidence: `gpu/shadps4/video_core/renderer_vulkan/vk_graphics_pipeline.cpp`)
- PS4 command decoding → Texture and buffer caches: streams textures
- Vulkan rendering → Temporal upscaling: upscales frames
- Vulkan rendering → Frame presentation: presents frames
- Player → In-game overlay: opens overlay
- In-game overlay → Vulkan rendering: configures graphics (evidence: `gpu/shim/bbport_overlay.cpp`)
- Graphical launcher → Community patches: selects patches
