# zm0kiemedia/neptune_vi architecture

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

- Interactive diagram: https://gitdiagram.com/zm0kiemedia/neptune_vi
- Repository: https://github.com/zm0kiemedia/neptune_vi

## Overview

Neptune VI is a Windows runtime that runs an Xbox Series game build on PC. The principal workflow is to start the runtime with the user’s game executable, prepare and load the title, emulate its console services, translate its shaders, and execute/present its graphics work through D3D12. The README also documents shader warming, performance overlay and screenshots, ocean-memory fixes, and diagnostics. Several runtime subsystems are represented by their exact enclosing source directories because their implementation files were not sampled; those links are omitted where evidence is unavailable.

Main entry points: [`crates/victory-gpu/src/host.rs`](https://github.com/zm0kiemedia/neptune_vi/blob/main/crates/victory-gpu/src/host.rs) (D3D12 host GPU), [`apps/victory/src`](https://github.com/zm0kiemedia/neptune_vi/tree/main/apps/victory/src) (Title runner), [`crates/victory-hle/src/modules/storage.rs`](https://github.com/zm0kiemedia/neptune_vi/blob/main/crates/victory-hle/src/modules/storage.rs) (Title storage), [`crates/victory-hle/src`](https://github.com/zm0kiemedia/neptune_vi/tree/main/crates/victory-hle/src) (Console API emulation)

## Diagram (Mermaid)

```mermaid
flowchart TD

subgraph group_runtime["Runtime and loading"]
  node_cli["Victory CLI<br/>[main.rs]"]
  node_run["Title runner"]
  node_pe["PE image<br/>[image.rs]"]
  node_loader["Console loader"]
end

subgraph group_services["Console services"]
  node_hle["Console API emulation"]
  node_async["Async services<br/>[xasync.rs]"]
  node_gameapi["Game runtime APIs<br/>[xgameruntime.rs]"]
  node_storage["Title storage<br/>[storage.rs]"]
  node_files["File services<br/>[files.rs]"]
end

subgraph group_graphics["GPU execution"]
  node_gpu["D3D12 host GPU<br/>[host.rs]"]
  node_frame["Frame pacing<br/>[frame.rs]"]
  node_resources["GPU resources<br/>[resource.rs]"]
  node_shadows["Title-memory copies<br/>[shadow.rs]"]
  node_descriptors["Host descriptors<br/>[host.rs]"]
  node_draws["Draw and indirect work<br/>[draw.rs]"]
  node_pipelines["Pipeline creation<br/>[pipeline.rs]"]
end

subgraph group_translation["Shader translation"]
  node_shader["Shader translation<br/>[lower.rs]"]
  node_shaderir["Shader IR and structure<br/>[ir.rs]"]
end

subgraph group_support["Formats and observability"]
  node_formats["Game formats<br/>[texture.rs]"]
  node_overlay["Overlay and capture<br/>[overlay.rs]"]
  node_cache[("Pipeline cache<br/>[cache.rs]")]
end

node_player(("Game owner"))

node_player -->|"starts"| node_cli
node_cli -->|"dispatches"| node_run
node_run -.->|"loads title"| node_pe
node_run -.->|"prepares title"| node_loader
node_loader -.->|"provides emulation"| node_hle
node_hle -->|"uses"| node_async
node_hle -->|"exposes APIs"| node_gameapi
node_storage -->|"completes calls"| node_async
node_storage -->|"uses interfaces"| node_gameapi
node_storage -->|"routes file access"| node_files
node_run -.->|"runs graphics"| node_gpu
node_gpu -->|"paces frames"| node_frame
node_gpu -->|"manages resources"| node_resources
node_gpu -->|"syncs title memory"| node_shadows
node_gpu -->|"submits work"| node_draws
node_gpu -->|"uses heaps"| node_descriptors
node_draws -->|"uses pipeline"| node_pipelines
node_pipelines -->|"translates shaders"| node_shader
node_shader -->|"lowers IR"| node_shaderir
node_player -.->|"supplies game data"| node_formats
node_gpu -.->|"presents overlay"| node_overlay
node_pipelines -.->|"uses cache"| node_cache

click node_cli "https://github.com/zm0kiemedia/neptune_vi/blob/main/apps/victory/src/main.rs"
click node_run "https://github.com/zm0kiemedia/neptune_vi/tree/main/apps/victory/src"
click node_pe "https://github.com/zm0kiemedia/neptune_vi/blob/main/crates/victory-pe/src/image.rs"
click node_loader "https://github.com/zm0kiemedia/neptune_vi/tree/main/crates/victory-loader/src"
click node_hle "https://github.com/zm0kiemedia/neptune_vi/tree/main/crates/victory-hle/src"
click node_async "https://github.com/zm0kiemedia/neptune_vi/blob/main/crates/victory-hle/src/modules/xasync.rs"
click node_gameapi "https://github.com/zm0kiemedia/neptune_vi/blob/main/crates/victory-hle/src/modules/xgameruntime.rs"
click node_storage "https://github.com/zm0kiemedia/neptune_vi/blob/main/crates/victory-hle/src/modules/storage.rs"
click node_files "https://github.com/zm0kiemedia/neptune_vi/blob/main/crates/victory-hle/src/modules/files.rs"
click node_gpu "https://github.com/zm0kiemedia/neptune_vi/blob/main/crates/victory-gpu/src/host.rs"
click node_frame "https://github.com/zm0kiemedia/neptune_vi/blob/main/crates/victory-gpu/src/frame.rs"
click node_resources "https://github.com/zm0kiemedia/neptune_vi/blob/main/crates/victory-gpu/src/resource.rs"
click node_shadows "https://github.com/zm0kiemedia/neptune_vi/blob/main/crates/victory-gpu/src/shadow.rs"
click node_descriptors "https://github.com/zm0kiemedia/neptune_vi/blob/main/crates/victory-gpu/src/descriptor/host.rs"
click node_draws "https://github.com/zm0kiemedia/neptune_vi/blob/main/crates/victory-gpu/src/draw.rs"
click node_pipelines "https://github.com/zm0kiemedia/neptune_vi/blob/main/crates/victory-gpu/src/pipeline.rs"
click node_shader "https://github.com/zm0kiemedia/neptune_vi/blob/main/crates/victory-shader/src/emit/lower.rs"
click node_shaderir "https://github.com/zm0kiemedia/neptune_vi/blob/main/crates/victory-shader/src/ir.rs"
click node_formats "https://github.com/zm0kiemedia/neptune_vi/blob/main/crates/victory-formats/src/texture.rs"
click node_overlay "https://github.com/zm0kiemedia/neptune_vi/blob/main/crates/victory-gpu/src/overlay.rs"
click node_cache "https://github.com/zm0kiemedia/neptune_vi/blob/main/crates/victory-pipeline/src/cache.rs"

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_cli,node_run,node_pe,node_loader toneBlue
class node_hle,node_async,node_gameapi,node_storage,node_files toneAmber
class node_gpu,node_frame,node_resources,node_shadows,node_descriptors,node_draws,node_pipelines toneMint
class node_shader,node_shaderir toneRose
class node_formats,node_overlay,node_cache,node_player toneIndigo
```

## Components

### Runtime and loading

- [Victory CLI](https://github.com/zm0kiemedia/neptune_vi/blob/main/apps/victory/src/main.rs): `apps/victory/src/main.rs`
- [Title runner](https://github.com/zm0kiemedia/neptune_vi/tree/main/apps/victory/src): `apps/victory/src`
- [PE image](https://github.com/zm0kiemedia/neptune_vi/blob/main/crates/victory-pe/src/image.rs): `crates/victory-pe/src/image.rs`
- [Console loader](https://github.com/zm0kiemedia/neptune_vi/tree/main/crates/victory-loader/src): `crates/victory-loader/src`

### Console services

- [Console API emulation](https://github.com/zm0kiemedia/neptune_vi/tree/main/crates/victory-hle/src): `crates/victory-hle/src`
- [Async services](https://github.com/zm0kiemedia/neptune_vi/blob/main/crates/victory-hle/src/modules/xasync.rs): `crates/victory-hle/src/modules/xasync.rs`
- [Game runtime APIs](https://github.com/zm0kiemedia/neptune_vi/blob/main/crates/victory-hle/src/modules/xgameruntime.rs): `crates/victory-hle/src/modules/xgameruntime.rs`
- [Title storage](https://github.com/zm0kiemedia/neptune_vi/blob/main/crates/victory-hle/src/modules/storage.rs): `crates/victory-hle/src/modules/storage.rs`
- [File services](https://github.com/zm0kiemedia/neptune_vi/blob/main/crates/victory-hle/src/modules/files.rs): `crates/victory-hle/src/modules/files.rs`

### GPU execution

- [D3D12 host GPU](https://github.com/zm0kiemedia/neptune_vi/blob/main/crates/victory-gpu/src/host.rs): `crates/victory-gpu/src/host.rs`
- [Frame pacing](https://github.com/zm0kiemedia/neptune_vi/blob/main/crates/victory-gpu/src/frame.rs): `crates/victory-gpu/src/frame.rs`
- [GPU resources](https://github.com/zm0kiemedia/neptune_vi/blob/main/crates/victory-gpu/src/resource.rs): `crates/victory-gpu/src/resource.rs`
- [Title-memory copies](https://github.com/zm0kiemedia/neptune_vi/blob/main/crates/victory-gpu/src/shadow.rs): `crates/victory-gpu/src/shadow.rs`
- [Host descriptors](https://github.com/zm0kiemedia/neptune_vi/blob/main/crates/victory-gpu/src/descriptor/host.rs): `crates/victory-gpu/src/descriptor/host.rs`
- [Draw and indirect work](https://github.com/zm0kiemedia/neptune_vi/blob/main/crates/victory-gpu/src/draw.rs): `crates/victory-gpu/src/draw.rs`
- [Pipeline creation](https://github.com/zm0kiemedia/neptune_vi/blob/main/crates/victory-gpu/src/pipeline.rs): `crates/victory-gpu/src/pipeline.rs`

### Shader translation

- [Shader translation](https://github.com/zm0kiemedia/neptune_vi/blob/main/crates/victory-shader/src/emit/lower.rs): `crates/victory-shader/src/emit/lower.rs`
- [Shader IR and structure](https://github.com/zm0kiemedia/neptune_vi/blob/main/crates/victory-shader/src/ir.rs): `crates/victory-shader/src/ir.rs`

### Formats and observability

- [Game formats](https://github.com/zm0kiemedia/neptune_vi/blob/main/crates/victory-formats/src/texture.rs): `crates/victory-formats/src/texture.rs`
- [Overlay and capture](https://github.com/zm0kiemedia/neptune_vi/blob/main/crates/victory-gpu/src/overlay.rs): `crates/victory-gpu/src/overlay.rs`
- [Pipeline cache](https://github.com/zm0kiemedia/neptune_vi/blob/main/crates/victory-pipeline/src/cache.rs): `crates/victory-pipeline/src/cache.rs`

### Other components

- **Game owner**

## Connections

- Game owner → Victory CLI: starts
- Victory CLI → Title runner: dispatches (evidence: `apps/victory/src/main.rs`)
- Title runner → PE image: loads title
- Title runner → Console loader: prepares title
- Console loader → Console API emulation: provides emulation
- Console API emulation → Async services: uses (evidence: `crates/victory-hle/src/modules/storage.rs`)
- Console API emulation → Game runtime APIs: exposes APIs (evidence: `crates/victory-hle/src/modules/storage.rs`)
- Title storage → Async services: completes calls (evidence: `crates/victory-hle/src/modules/storage.rs`)
- Title storage → Game runtime APIs: uses interfaces (evidence: `crates/victory-hle/src/modules/storage.rs`)
- Title storage → File services: routes file access (evidence: `crates/victory-hle/src/modules/storage.rs`)
- Title runner → D3D12 host GPU: runs graphics
- D3D12 host GPU → Frame pacing: paces frames (evidence: `crates/victory-gpu/src/host.rs`)
- D3D12 host GPU → GPU resources: manages resources (evidence: `crates/victory-gpu/src/host.rs`)
- D3D12 host GPU → Title-memory copies: syncs title memory (evidence: `crates/victory-gpu/src/host.rs`)
- D3D12 host GPU → Draw and indirect work: submits work (evidence: `crates/victory-gpu/src/host.rs`)
- D3D12 host GPU → Host descriptors: uses heaps (evidence: `crates/victory-gpu/src/host.rs`)
- Draw and indirect work → Pipeline creation: uses pipeline (evidence: `crates/victory-gpu/src/pipeline.rs`)
- Pipeline creation → Shader translation: translates shaders (evidence: `crates/victory-gpu/src/pipeline.rs`)
- Shader translation → Shader IR and structure: lowers IR (evidence: `crates/victory-shader/src/ir.rs`)
- Game owner → Game formats: supplies game data
- D3D12 host GPU → Overlay and capture: presents overlay (evidence: `crates/victory-gpu/src/host.rs`)
- Pipeline creation → Pipeline cache: uses cache
