# paulcombal/mw2-recompiled architecture

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

- Interactive diagram: https://gitdiagram.com/paulcombal/mw2-recompiled
- Repository: https://github.com/paulcombal/mw2-recompiled

## Overview

This repository is a native recompilation of the Xbox 360 version of Modern Warfare 2, with a launcher and a separate multiplayer relay service. The player’s path is to install from their own disc, configure or convert content in the launcher, then start campaign or multiplayer; the runtime loads the recompiled title and provides console-compatible services and Vulkan rendering. README-described features such as profiles, updates, and online backends are included. Several implementation links are left out because their source was not sampled.

Main entry points: [`launcher/main.cpp`](https://github.com/paulcombal/mw2-recompiled/blob/master/launcher/main.cpp) (Launcher UI), [`runtime/main.cpp`](https://github.com/paulcombal/mw2-recompiled/blob/master/runtime/main.cpp) (Runtime entry), [`runtime/online/service.h`](https://github.com/paulcombal/mw2-recompiled/blob/master/runtime/online/service.h) (Online service API), [`relay/src/relay.rs`](https://github.com/paulcombal/mw2-recompiled/blob/master/relay/src/relay.rs) (Relay server)

## Diagram (Mermaid)

```mermaid
flowchart TD

subgraph group_launcher["Launcher"]
  node_launcher_app["Launcher UI<br/>[main.cpp]"]
  node_profiles["Profiles<br/>[profile.h]"]
  node_settings["Settings<br/>[settings.cpp]"]
  node_map_conversion["Custom map conversion<br/>[maps.cpp]"]
  node_update["Launcher updates<br/>[update.cpp]"]
end

subgraph group_install["Game installation"]
  node_disc["Disc validation<br/>[disc.cpp]"]
  node_install_flow["Install and update<br/>[install.cpp]"]
end

subgraph group_runtime["Recompiled runtime"]
  node_runtime_entry["Runtime entry<br/>[main.cpp]"]
  node_guest["Guest memory and values<br/>[guest.h]"]
  node_kernel["Xbox kernel services<br/>[kernel.cpp]"]
end

subgraph group_graphics["Graphics and audio"]
  node_gpu_runtime["GPU runtime<br/>[gpu.cpp]"]
  node_vulkan_pipeline["Vulkan pipelines<br/>[pipeline.cpp]"]
  node_shader_build["Shader building<br/>[shader_build.h]"]
  node_renderer_pipelines["Renderer pipelines"]
  node_audio["Audio runtime<br/>[audio.cpp]"]
end

subgraph group_online["Online play"]
  node_online_service["Online service API<br/>[service.h]"]
  node_lan_steam["LAN and Steam"]
  node_server_transport["Server transport<br/>[server.cpp]"]
end

subgraph group_relay["Relay service"]
  node_relay_server["Relay server<br/>[relay.rs]"]
  node_relay_protocol["Relay protocol<br/>[protocol.rs]"]
end

node_player(("Player"))
node_relay_operator(("Relay operator"))
node_relay_network(("Other players"))

node_player -->|"opens"| node_launcher_app
node_launcher_app -->|"installs from"| node_disc
node_disc -->|"provides ISO"| node_install_flow
node_launcher_app -->|"starts install"| node_install_flow
node_launcher_app -->|"configures"| node_profiles
node_launcher_app -->|"sets"| node_settings
node_launcher_app -->|"converts maps"| node_map_conversion
node_launcher_app -->|"checks updates"| node_update
node_install_flow -->|"launches title"| node_runtime_entry
node_player -->|"starts game"| node_runtime_entry
node_runtime_entry -->|"initializes"| node_guest
node_runtime_entry -->|"initializes"| node_kernel
node_runtime_entry -->|"initializes"| node_gpu_runtime
node_runtime_entry -->|"starts service"| node_online_service
node_kernel -->|"requests backend services"| node_online_service
node_online_service -.->|"selects backend"| node_lan_steam
node_online_service -.->|"uses transport"| node_server_transport
node_server_transport -->|"exchanges packets"| node_relay_server
node_relay_operator -->|"runs"| node_relay_server
node_relay_server -->|"uses messages"| node_relay_protocol
node_relay_server -->|"relays traffic"| node_relay_network
node_gpu_runtime -->|"uses Vulkan"| node_vulkan_pipeline
node_renderer_pipelines -->|"builds shaders"| node_shader_build
node_gpu_runtime -.->|"provides game runtime"| node_audio

click node_launcher_app "https://github.com/paulcombal/mw2-recompiled/blob/master/launcher/main.cpp"
click node_disc "https://github.com/paulcombal/mw2-recompiled/blob/master/launcher/disc.cpp"
click node_install_flow "https://github.com/paulcombal/mw2-recompiled/blob/master/runtime/install/install.cpp"
click node_profiles "https://github.com/paulcombal/mw2-recompiled/blob/master/launcher/profile.h"
click node_settings "https://github.com/paulcombal/mw2-recompiled/blob/master/launcher/settings.cpp"
click node_map_conversion "https://github.com/paulcombal/mw2-recompiled/blob/master/launcher/maps.cpp"
click node_update "https://github.com/paulcombal/mw2-recompiled/blob/master/launcher/update.cpp"
click node_runtime_entry "https://github.com/paulcombal/mw2-recompiled/blob/master/runtime/main.cpp"
click node_guest "https://github.com/paulcombal/mw2-recompiled/blob/master/runtime/guest.h"
click node_kernel "https://github.com/paulcombal/mw2-recompiled/blob/master/runtime/kernel/kernel.cpp"
click node_online_service "https://github.com/paulcombal/mw2-recompiled/blob/master/runtime/online/service.h"
click node_lan_steam "https://github.com/paulcombal/mw2-recompiled/tree/master/runtime/online"
click node_server_transport "https://github.com/paulcombal/mw2-recompiled/blob/master/runtime/online/server.cpp"
click node_relay_server "https://github.com/paulcombal/mw2-recompiled/blob/master/relay/src/relay.rs"
click node_relay_protocol "https://github.com/paulcombal/mw2-recompiled/blob/master/relay/src/protocol.rs"
click node_gpu_runtime "https://github.com/paulcombal/mw2-recompiled/blob/master/runtime/gpu/gpu.cpp"
click node_vulkan_pipeline "https://github.com/paulcombal/mw2-recompiled/blob/master/runtime/gpu/vulkan/pipeline.cpp"
click node_shader_build "https://github.com/paulcombal/mw2-recompiled/blob/master/runtime/gpu/vulkan/shader_build.h"
click node_renderer_pipelines "https://github.com/paulcombal/mw2-recompiled/blob/master/runtime/gpu/vulkan/renderer_pipelines.cpp"
click node_audio "https://github.com/paulcombal/mw2-recompiled/blob/master/runtime/apu/audio.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_profiles,node_settings,node_map_conversion,node_update toneBlue
class node_disc,node_install_flow toneAmber
class node_runtime_entry,node_guest,node_kernel toneMint
class node_gpu_runtime,node_vulkan_pipeline,node_shader_build,node_renderer_pipelines,node_audio toneRose
class node_online_service,node_lan_steam,node_server_transport,node_player,node_relay_operator,node_relay_network toneIndigo
class node_relay_server,node_relay_protocol toneTeal
```

## Components

### Launcher

- [Launcher UI](https://github.com/paulcombal/mw2-recompiled/blob/master/launcher/main.cpp): `launcher/main.cpp`
- [Profiles](https://github.com/paulcombal/mw2-recompiled/blob/master/launcher/profile.h): `launcher/profile.h`
- [Settings](https://github.com/paulcombal/mw2-recompiled/blob/master/launcher/settings.cpp): `launcher/settings.cpp`
- [Custom map conversion](https://github.com/paulcombal/mw2-recompiled/blob/master/launcher/maps.cpp): `launcher/maps.cpp`
- [Launcher updates](https://github.com/paulcombal/mw2-recompiled/blob/master/launcher/update.cpp): `launcher/update.cpp`

### Game installation

- [Disc validation](https://github.com/paulcombal/mw2-recompiled/blob/master/launcher/disc.cpp): `launcher/disc.cpp`
- [Install and update](https://github.com/paulcombal/mw2-recompiled/blob/master/runtime/install/install.cpp): `runtime/install/install.cpp`

### Recompiled runtime

- [Runtime entry](https://github.com/paulcombal/mw2-recompiled/blob/master/runtime/main.cpp): `runtime/main.cpp`
- [Guest memory and values](https://github.com/paulcombal/mw2-recompiled/blob/master/runtime/guest.h): `runtime/guest.h`
- [Xbox kernel services](https://github.com/paulcombal/mw2-recompiled/blob/master/runtime/kernel/kernel.cpp): `runtime/kernel/kernel.cpp`

### Graphics and audio

- [GPU runtime](https://github.com/paulcombal/mw2-recompiled/blob/master/runtime/gpu/gpu.cpp): `runtime/gpu/gpu.cpp`
- [Vulkan pipelines](https://github.com/paulcombal/mw2-recompiled/blob/master/runtime/gpu/vulkan/pipeline.cpp): `runtime/gpu/vulkan/pipeline.cpp`
- [Shader building](https://github.com/paulcombal/mw2-recompiled/blob/master/runtime/gpu/vulkan/shader_build.h): `runtime/gpu/vulkan/shader_build.h`
- [Renderer pipelines](https://github.com/paulcombal/mw2-recompiled/blob/master/runtime/gpu/vulkan/renderer_pipelines.cpp): `runtime/gpu/vulkan/renderer_pipelines.cpp`
- [Audio runtime](https://github.com/paulcombal/mw2-recompiled/blob/master/runtime/apu/audio.cpp): `runtime/apu/audio.cpp`

### Online play

- [Online service API](https://github.com/paulcombal/mw2-recompiled/blob/master/runtime/online/service.h): `runtime/online/service.h`
- [LAN and Steam](https://github.com/paulcombal/mw2-recompiled/tree/master/runtime/online): `runtime/online`
- [Server transport](https://github.com/paulcombal/mw2-recompiled/blob/master/runtime/online/server.cpp): `runtime/online/server.cpp`

### Relay service

- [Relay server](https://github.com/paulcombal/mw2-recompiled/blob/master/relay/src/relay.rs): `relay/src/relay.rs`
- [Relay protocol](https://github.com/paulcombal/mw2-recompiled/blob/master/relay/src/protocol.rs): `relay/src/protocol.rs`

### Other components

- **Player**
- **Relay operator**
- **Other players**

## Connections

- Player → Launcher UI: opens
- Launcher UI → Disc validation: installs from
- Disc validation → Install and update: provides ISO
- Launcher UI → Install and update: starts install (evidence: `launcher/main.cpp`)
- Launcher UI → Profiles: configures (evidence: `launcher/main.cpp`)
- Launcher UI → Settings: sets
- Launcher UI → Custom map conversion: converts maps
- Launcher UI → Launcher updates: checks updates
- Install and update → Runtime entry: launches title (evidence: `runtime/main.cpp`)
- Player → Runtime entry: starts game
- Runtime entry → Guest memory and values: initializes (evidence: `runtime/main.cpp`)
- Runtime entry → Xbox kernel services: initializes (evidence: `runtime/main.cpp`)
- Runtime entry → GPU runtime: initializes (evidence: `runtime/main.cpp`)
- Runtime entry → Online service API: starts service (evidence: `runtime/main.cpp`)
- Xbox kernel services → Online service API: requests backend services (evidence: `runtime/online/service.h`)
- Online service API → LAN and Steam: selects backend (evidence: `runtime/online/service.cpp`)
- Online service API → Server transport: uses transport
- Server transport → Relay server: exchanges packets (evidence: `runtime/online/server.cpp`)
- Relay operator → Relay server: runs
- Relay server → Relay protocol: uses messages (evidence: `relay/src/main.rs`)
- Relay server → Other players: relays traffic
- GPU runtime → Vulkan pipelines: uses Vulkan
- Renderer pipelines → Shader building: builds shaders (evidence: `runtime/gpu/vulkan/renderer_pipelines.cpp`)
- GPU runtime → Audio runtime: provides game runtime
