# speedbreakerproject/speedbreaker architecture

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

- Interactive diagram: https://gitdiagram.com/speedbreakerproject/speedbreaker
- Repository: https://github.com/speedbreakerproject/speedbreaker

## Overview

SpeedBreaker is a native static recompilation of the Xbox 360 version of Need for Speed: Most Wanted (2005), not an emulator. The main workflow is to install a verified copy from the user’s disc image, then launch the recompiled game and present its rendered frames. Supporting branches cover input and settings, graphics and display enhancements, updates, and diagnostics. The graph uses README claims and the supplied source excerpts/index; several subsystem details are documented but their internal implementations were not sampled.

Main entry points: [`runtime/ui/installer_screen.cpp`](https://github.com/speedbreakerproject/speedbreaker/blob/main/runtime/ui/installer_screen.cpp) (Installer Screen), [`runtime/video/presenter.cpp`](https://github.com/speedbreakerproject/speedbreaker/blob/main/runtime/video/presenter.cpp) (Frame Presentation), [`runtime/main.cpp`](https://github.com/speedbreakerproject/speedbreaker/blob/main/runtime/main.cpp) (Runtime Startup), [`runtime/cpu/guest_thread.cpp`](https://github.com/speedbreakerproject/speedbreaker/blob/main/runtime/cpu/guest_thread.cpp) (Guest Execution)

## Diagram (Mermaid)

```mermaid
flowchart TD

subgraph group_launch["Launch and Guest Runtime"]
  node_app["Runtime Startup<br/>[main.cpp]"]
  node_guest["Guest Execution<br/>[guest_thread.cpp]"]
  node_kernel["Guest Kernel<br/>[dispatcher.cpp]"]
  node_gpu["GPU Command Processing"]
end

subgraph group_install["Game Installation"]
  node_installerui["Installer Screen"]
  node_disc["Disc Image Scan<br/>[disc_source.cpp]"]
  node_verification["Game Verification<br/>[manifest.cpp]"]
  node_installation["Verified Installation<br/>[installer.cpp]"]
end

subgraph group_graphics["Graphics and Display"]
  node_renderer["Vulkan Renderer<br/>[renderer.cpp]"]
  node_shader["Shader Translation"]
  node_presenter["Frame Presentation<br/>[presenter.cpp]"]
  node_displayfit["Aspect and Ultrawide Fit<br/>[ultrawide.cpp]"]
  node_fps["Frame-rate Policy"]
end

subgraph group_interaction["Player Interaction"]
  node_input["Controller Input<br/>[input.cpp]"]
  node_settings[("Settings Storage<br/>[settings.cpp]")]
  node_ui["In-game UI<br/>[ui.cpp]"]
  node_settingsmenu["Settings Menu<br/>[settings_menu.cpp]"]
end

subgraph group_support["App Services"]
  node_update["Update Check<br/>[check.cpp]"]
  node_report["Bug Reports<br/>[bug_report.cpp]"]
end

node_player(("Player"))
node_release_service["GitHub Releases"]

node_player -->|"launches"| node_app
node_app -->|"offers first-run install"| node_installerui
node_installerui -->|"scans image"| node_disc
node_installerui -->|"checks game"| node_verification
node_installerui -->|"starts install"| node_installation
node_app -->|"starts guest thread"| node_guest
node_guest -.->|"uses guest imports"| node_kernel
node_guest -.->|"submits guest graphics"| node_gpu
node_gpu -.->|"dispatches commands"| node_renderer
node_renderer -->|"uses translation"| node_shader
node_renderer -.->|"provides rendered frames"| node_presenter
node_presenter -->|"initializes UI"| node_ui
node_presenter -->|"reads input"| node_input
node_presenter -->|"fits frame"| node_displayfit
node_presenter -->|"uses frame-rate policy"| node_fps
node_player -->|"controls game"| node_input
node_player -->|"opens settings"| node_settingsmenu
node_settingsmenu -.->|"applies preferences"| node_settings
node_installerui -->|"draws installer"| node_ui
node_player -->|"requests update check"| node_update
node_update -->|"checks releases"| node_release_service
node_player -->|"creates bug report"| node_report

click node_app "https://github.com/speedbreakerproject/speedbreaker/blob/main/runtime/main.cpp"
click node_guest "https://github.com/speedbreakerproject/speedbreaker/blob/main/runtime/cpu/guest_thread.cpp"
click node_kernel "https://github.com/speedbreakerproject/speedbreaker/blob/main/runtime/kernel/dispatcher.cpp"
click node_gpu "https://github.com/speedbreakerproject/speedbreaker/blob/main/runtime/gpu/command_processor.cpp"
click node_renderer "https://github.com/speedbreakerproject/speedbreaker/blob/main/runtime/gpu/renderer.cpp"
click node_shader "https://github.com/speedbreakerproject/speedbreaker/blob/main/runtime/gpu/shader_translator.cpp"
click node_presenter "https://github.com/speedbreakerproject/speedbreaker/blob/main/runtime/video/presenter.cpp"
click node_displayfit "https://github.com/speedbreakerproject/speedbreaker/blob/main/runtime/game/ultrawide.cpp"
click node_fps "https://github.com/speedbreakerproject/speedbreaker/blob/main/runtime/video/frame_rate_policy.cpp"
click node_input "https://github.com/speedbreakerproject/speedbreaker/blob/main/runtime/hid/input.cpp"
click node_settings "https://github.com/speedbreakerproject/speedbreaker/blob/main/runtime/user/settings.cpp"
click node_ui "https://github.com/speedbreakerproject/speedbreaker/blob/main/runtime/ui/ui.cpp"
click node_settingsmenu "https://github.com/speedbreakerproject/speedbreaker/blob/main/runtime/ui/settings_menu.cpp"
click node_installerui "https://github.com/speedbreakerproject/speedbreaker/blob/main/runtime/ui/installer_screen.cpp"
click node_disc "https://github.com/speedbreakerproject/speedbreaker/blob/main/runtime/install/disc_source.cpp"
click node_verification "https://github.com/speedbreakerproject/speedbreaker/blob/main/runtime/install/manifest.cpp"
click node_installation "https://github.com/speedbreakerproject/speedbreaker/blob/main/runtime/install/installer.cpp"
click node_update "https://github.com/speedbreakerproject/speedbreaker/blob/main/runtime/update/check.cpp"
click node_report "https://github.com/speedbreakerproject/speedbreaker/blob/main/runtime/report/bug_report.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_app,node_guest,node_kernel,node_gpu toneBlue
class node_installerui,node_disc,node_verification,node_installation toneAmber
class node_renderer,node_shader,node_presenter,node_displayfit,node_fps toneMint
class node_input,node_settings,node_ui,node_settingsmenu toneRose
class node_update,node_report,node_player,node_release_service toneIndigo
```

## Components

### Launch and Guest Runtime

- [Runtime Startup](https://github.com/speedbreakerproject/speedbreaker/blob/main/runtime/main.cpp): `runtime/main.cpp`
- [Guest Execution](https://github.com/speedbreakerproject/speedbreaker/blob/main/runtime/cpu/guest_thread.cpp): `runtime/cpu/guest_thread.cpp`
- [Guest Kernel](https://github.com/speedbreakerproject/speedbreaker/blob/main/runtime/kernel/dispatcher.cpp): `runtime/kernel/dispatcher.cpp`
- [GPU Command Processing](https://github.com/speedbreakerproject/speedbreaker/blob/main/runtime/gpu/command_processor.cpp): `runtime/gpu/command_processor.cpp`

### Game Installation

- [Installer Screen](https://github.com/speedbreakerproject/speedbreaker/blob/main/runtime/ui/installer_screen.cpp): `runtime/ui/installer_screen.cpp`
- [Disc Image Scan](https://github.com/speedbreakerproject/speedbreaker/blob/main/runtime/install/disc_source.cpp): `runtime/install/disc_source.cpp`
- [Game Verification](https://github.com/speedbreakerproject/speedbreaker/blob/main/runtime/install/manifest.cpp): `runtime/install/manifest.cpp`
- [Verified Installation](https://github.com/speedbreakerproject/speedbreaker/blob/main/runtime/install/installer.cpp): `runtime/install/installer.cpp`

### Graphics and Display

- [Vulkan Renderer](https://github.com/speedbreakerproject/speedbreaker/blob/main/runtime/gpu/renderer.cpp): `runtime/gpu/renderer.cpp`
- [Shader Translation](https://github.com/speedbreakerproject/speedbreaker/blob/main/runtime/gpu/shader_translator.cpp): `runtime/gpu/shader_translator.cpp`
- [Frame Presentation](https://github.com/speedbreakerproject/speedbreaker/blob/main/runtime/video/presenter.cpp): `runtime/video/presenter.cpp`
- [Aspect and Ultrawide Fit](https://github.com/speedbreakerproject/speedbreaker/blob/main/runtime/game/ultrawide.cpp): `runtime/game/ultrawide.cpp`
- [Frame-rate Policy](https://github.com/speedbreakerproject/speedbreaker/blob/main/runtime/video/frame_rate_policy.cpp): `runtime/video/frame_rate_policy.cpp`

### Player Interaction

- [Controller Input](https://github.com/speedbreakerproject/speedbreaker/blob/main/runtime/hid/input.cpp): `runtime/hid/input.cpp`
- [Settings Storage](https://github.com/speedbreakerproject/speedbreaker/blob/main/runtime/user/settings.cpp): `runtime/user/settings.cpp`
- [In-game UI](https://github.com/speedbreakerproject/speedbreaker/blob/main/runtime/ui/ui.cpp): `runtime/ui/ui.cpp`
- [Settings Menu](https://github.com/speedbreakerproject/speedbreaker/blob/main/runtime/ui/settings_menu.cpp): `runtime/ui/settings_menu.cpp`

### App Services

- [Update Check](https://github.com/speedbreakerproject/speedbreaker/blob/main/runtime/update/check.cpp): `runtime/update/check.cpp`
- [Bug Reports](https://github.com/speedbreakerproject/speedbreaker/blob/main/runtime/report/bug_report.cpp): `runtime/report/bug_report.cpp`

### Other components

- **Player**
- **GitHub Releases**

## Connections

- Player → Runtime Startup: launches (evidence: `runtime/main.cpp`)
- Runtime Startup → Installer Screen: offers first-run install (evidence: `runtime/main.cpp`)
- Installer Screen → Disc Image Scan: scans image (evidence: `runtime/ui/installer_screen.cpp`)
- Installer Screen → Game Verification: checks game (evidence: `README.md`)
- Installer Screen → Verified Installation: starts install (evidence: `README.md`)
- Runtime Startup → Guest Execution: starts guest thread (evidence: `runtime/main.cpp`)
- Guest Execution → Guest Kernel: uses guest imports
- Guest Execution → GPU Command Processing: submits guest graphics
- GPU Command Processing → Vulkan Renderer: dispatches commands
- Vulkan Renderer → Shader Translation: uses translation (evidence: `runtime/gpu/renderer.cpp`)
- Vulkan Renderer → Frame Presentation: provides rendered frames
- Frame Presentation → In-game UI: initializes UI (evidence: `runtime/video/presenter.cpp`)
- Frame Presentation → Controller Input: reads input (evidence: `runtime/video/presenter.cpp`)
- Frame Presentation → Aspect and Ultrawide Fit: fits frame (evidence: `runtime/video/presenter.cpp`)
- Frame Presentation → Frame-rate Policy: uses frame-rate policy (evidence: `runtime/video/presenter.cpp`)
- Player → Controller Input: controls game (evidence: `README.md`)
- Player → Settings Menu: opens settings (evidence: `README.md`)
- Settings Menu → Settings Storage: applies preferences
- Installer Screen → In-game UI: draws installer (evidence: `runtime/ui/installer_screen.cpp`)
- Player → Update Check: requests update check (evidence: `README.md`)
- Update Check → GitHub Releases: checks releases (evidence: `README.md`)
- Player → Bug Reports: creates bug report (evidence: `README.md`)
