# readmet3xt-lab/foxhound architecture

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

- Interactive diagram: https://gitdiagram.com/readmet3xt-lab/foxhound
- Repository: https://github.com/readmet3xt-lab/foxhound

## Overview

foxhound is a Windows compatibility layer that runs a user-supplied Xbox Series title natively, translating console behavior into host Windows and Direct3D 12 behavior. The main workflow is launch the title, load and prepare its executable, emulate console APIs, translate shaders and issue GPU work; optional commands inspect, translate, and prewarm shaders and pipelines. The README also documents NVIDIA DLSS/Frame Generation, 1440p changes, and frame replay/capture. Source excerpts support several internal GPU and HLE relationships; some launch-to-runtime wiring is not shown, so those links are omitted or marked unverified.

Main entry points: [`apps/victory/src/run.rs`](https://github.com/readmet3xt-lab/foxhound/blob/main/apps/victory/src/run.rs) (Title runner), [`apps/victory/src/main.rs`](https://github.com/readmet3xt-lab/foxhound/blob/main/apps/victory/src/main.rs) (CLI commands), [`crates/victory-gpu/src/draw.rs`](https://github.com/readmet3xt-lab/foxhound/blob/main/crates/victory-gpu/src/draw.rs) (Draw execution), [`crates/victory-hle/src/modules/xgameruntime.rs`](https://github.com/readmet3xt-lab/foxhound/blob/main/crates/victory-hle/src/modules/xgameruntime.rs) (Game runtime APIs)

## Diagram (Mermaid)

```mermaid
flowchart TD

subgraph group_front["Launcher and tools"]
  node_launcher["CLI commands<br/>[main.rs]"]
  node_run["Title runner<br/>[run.rs]"]
  node_translate["Shader commands<br/>[translate.rs]"]
  node_warm["Pipeline warmup<br/>[warm.rs]"]
end

subgraph group_compat["Console compatibility"]
  node_loader["Executable loading<br/>[prepare.rs]"]
  node_pe["PE image handling<br/>[image.rs]"]
  node_hle["Console API emulation<br/>[runtime.rs]"]
  node_xgame["Game runtime APIs<br/>[xgameruntime.rs]"]
  node_async["Async services<br/>[xasync.rs]"]
  node_storage["Title storage<br/>[storage.rs]"]
  node_dstorage["DirectStorage<br/>[dstorage.rs]"]
  node_formats["Console formats<br/>[lib.rs]"]
end

subgraph group_gpu["GPU translation"]
  node_gpu["D3D12 GPU layer<br/>[lib.rs]"]
  node_draw["Draw execution<br/>[draw.rs]"]
  node_resource["GPU resources<br/>[resource.rs]"]
  node_descriptors["Descriptor heaps<br/>[host.rs]"]
  node_pipelines["Host pipelines<br/>[pipeline.rs]"]
end

subgraph group_shader["Shader translation"]
  node_shaderir["Shader IR<br/>[ir.rs]"]
  node_isa["GFX10 decoder<br/>[mod.rs]"]
  node_emit["DXIL emission<br/>[mod.rs]"]
  node_shaderresource["Shader resource analysis<br/>[resource.rs]"]
end

subgraph group_enhance["Enhancements and diagnostics"]
  node_capture["Frame capture<br/>[capture.rs]"]
  node_replay["Frame replay<br/>[play.rs]"]
  node_streamline["DLSS integration<br/>[streamline.rs]"]
  node_native["1440p profile<br/>[native_1440p.rs]"]
end

node_player(("Title owner"))

node_player -->|"invokes"| node_launcher
node_launcher -->|"dispatches"| node_run
node_launcher -->|"dispatches"| node_translate
node_launcher -->|"dispatches"| node_warm
node_run -.->|"loads title"| node_loader
node_loader -->|"prepares image"| node_pe
node_run -.->|"starts runtime"| node_hle
node_hle -->|"registers APIs"| node_xgame
node_xgame -->|"uses services"| node_async
node_xgame -->|"registers storage"| node_storage
node_storage -->|"completes requests"| node_async
node_run -.->|"emulates file queues"| node_dstorage
node_run -.->|"initializes graphics"| node_gpu
node_gpu -.->|"executes draws"| node_draw
node_draw -->|"reads descriptors"| node_descriptors
node_draw -->|"uses resources"| node_resource
node_draw -->|"binds pipelines"| node_pipelines
node_capture -->|"records resources"| node_resource
node_capture -.->|"supports replay"| node_replay
node_run -.->|"optionally enables"| node_streamline
node_run -.->|"applies profile"| node_native
node_translate -.->|"translates shaders"| node_shaderir
node_shaderir -->|"decodes instructions"| node_isa
node_shaderir -->|"emits DXIL"| node_emit
node_emit -->|"analyzes resources"| node_shaderresource
node_warm -.->|"prewarms host"| node_pipelines

click node_launcher "https://github.com/readmet3xt-lab/foxhound/blob/main/apps/victory/src/main.rs"
click node_run "https://github.com/readmet3xt-lab/foxhound/blob/main/apps/victory/src/run.rs"
click node_translate "https://github.com/readmet3xt-lab/foxhound/blob/main/apps/victory/src/translate.rs"
click node_warm "https://github.com/readmet3xt-lab/foxhound/blob/main/apps/victory/src/warm.rs"
click node_loader "https://github.com/readmet3xt-lab/foxhound/blob/main/crates/victory-loader/src/prepare.rs"
click node_pe "https://github.com/readmet3xt-lab/foxhound/blob/main/crates/victory-pe/src/image.rs"
click node_hle "https://github.com/readmet3xt-lab/foxhound/blob/main/crates/victory-hle/src/runtime.rs"
click node_xgame "https://github.com/readmet3xt-lab/foxhound/blob/main/crates/victory-hle/src/modules/xgameruntime.rs"
click node_async "https://github.com/readmet3xt-lab/foxhound/blob/main/crates/victory-hle/src/modules/xasync.rs"
click node_storage "https://github.com/readmet3xt-lab/foxhound/blob/main/crates/victory-hle/src/modules/storage.rs"
click node_dstorage "https://github.com/readmet3xt-lab/foxhound/blob/main/crates/victory-hle/src/modules/dstorage.rs"
click node_gpu "https://github.com/readmet3xt-lab/foxhound/blob/main/crates/victory-gpu/src/lib.rs"
click node_draw "https://github.com/readmet3xt-lab/foxhound/blob/main/crates/victory-gpu/src/draw.rs"
click node_resource "https://github.com/readmet3xt-lab/foxhound/blob/main/crates/victory-gpu/src/resource.rs"
click node_descriptors "https://github.com/readmet3xt-lab/foxhound/blob/main/crates/victory-gpu/src/descriptor/host.rs"
click node_pipelines "https://github.com/readmet3xt-lab/foxhound/blob/main/crates/victory-gpu/src/pipeline.rs"
click node_capture "https://github.com/readmet3xt-lab/foxhound/blob/main/crates/victory-gpu/src/capture.rs"
click node_replay "https://github.com/readmet3xt-lab/foxhound/blob/main/crates/victory-gpu/src/replay/play.rs"
click node_streamline "https://github.com/readmet3xt-lab/foxhound/blob/main/crates/victory-gpu/src/streamline.rs"
click node_native "https://github.com/readmet3xt-lab/foxhound/blob/main/apps/victory/src/native_1440p.rs"
click node_shaderir "https://github.com/readmet3xt-lab/foxhound/blob/main/crates/victory-shader/src/ir.rs"
click node_isa "https://github.com/readmet3xt-lab/foxhound/blob/main/crates/victory-shader/src/gfx10/mod.rs"
click node_emit "https://github.com/readmet3xt-lab/foxhound/blob/main/crates/victory-shader/src/emit/mod.rs"
click node_shaderresource "https://github.com/readmet3xt-lab/foxhound/blob/main/crates/victory-shader/src/resource.rs"
click node_formats "https://github.com/readmet3xt-lab/foxhound/blob/main/crates/victory-formats/src/lib.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_launcher,node_run,node_translate,node_warm toneBlue
class node_loader,node_pe,node_hle,node_xgame,node_async,node_storage,node_dstorage,node_formats toneAmber
class node_gpu,node_draw,node_resource,node_descriptors,node_pipelines toneMint
class node_shaderir,node_isa,node_emit,node_shaderresource toneRose
class node_capture,node_replay,node_streamline,node_native,node_player toneIndigo
```

## Components

### Launcher and tools

- [CLI commands](https://github.com/readmet3xt-lab/foxhound/blob/main/apps/victory/src/main.rs): `apps/victory/src/main.rs`
- [Title runner](https://github.com/readmet3xt-lab/foxhound/blob/main/apps/victory/src/run.rs): `apps/victory/src/run.rs`
- [Shader commands](https://github.com/readmet3xt-lab/foxhound/blob/main/apps/victory/src/translate.rs): `apps/victory/src/translate.rs`
- [Pipeline warmup](https://github.com/readmet3xt-lab/foxhound/blob/main/apps/victory/src/warm.rs): `apps/victory/src/warm.rs`

### Console compatibility

- [Executable loading](https://github.com/readmet3xt-lab/foxhound/blob/main/crates/victory-loader/src/prepare.rs): `crates/victory-loader/src/prepare.rs`
- [PE image handling](https://github.com/readmet3xt-lab/foxhound/blob/main/crates/victory-pe/src/image.rs): `crates/victory-pe/src/image.rs`
- [Console API emulation](https://github.com/readmet3xt-lab/foxhound/blob/main/crates/victory-hle/src/runtime.rs): `crates/victory-hle/src/runtime.rs`
- [Game runtime APIs](https://github.com/readmet3xt-lab/foxhound/blob/main/crates/victory-hle/src/modules/xgameruntime.rs): `crates/victory-hle/src/modules/xgameruntime.rs`
- [Async services](https://github.com/readmet3xt-lab/foxhound/blob/main/crates/victory-hle/src/modules/xasync.rs): `crates/victory-hle/src/modules/xasync.rs`
- [Title storage](https://github.com/readmet3xt-lab/foxhound/blob/main/crates/victory-hle/src/modules/storage.rs): `crates/victory-hle/src/modules/storage.rs`
- [DirectStorage](https://github.com/readmet3xt-lab/foxhound/blob/main/crates/victory-hle/src/modules/dstorage.rs): `crates/victory-hle/src/modules/dstorage.rs`
- [Console formats](https://github.com/readmet3xt-lab/foxhound/blob/main/crates/victory-formats/src/lib.rs): `crates/victory-formats/src/lib.rs`

### GPU translation

- [D3D12 GPU layer](https://github.com/readmet3xt-lab/foxhound/blob/main/crates/victory-gpu/src/lib.rs): `crates/victory-gpu/src/lib.rs`
- [Draw execution](https://github.com/readmet3xt-lab/foxhound/blob/main/crates/victory-gpu/src/draw.rs): `crates/victory-gpu/src/draw.rs`
- [GPU resources](https://github.com/readmet3xt-lab/foxhound/blob/main/crates/victory-gpu/src/resource.rs): `crates/victory-gpu/src/resource.rs`
- [Descriptor heaps](https://github.com/readmet3xt-lab/foxhound/blob/main/crates/victory-gpu/src/descriptor/host.rs): `crates/victory-gpu/src/descriptor/host.rs`
- [Host pipelines](https://github.com/readmet3xt-lab/foxhound/blob/main/crates/victory-gpu/src/pipeline.rs): `crates/victory-gpu/src/pipeline.rs`

### Shader translation

- [Shader IR](https://github.com/readmet3xt-lab/foxhound/blob/main/crates/victory-shader/src/ir.rs): `crates/victory-shader/src/ir.rs`
- [GFX10 decoder](https://github.com/readmet3xt-lab/foxhound/blob/main/crates/victory-shader/src/gfx10/mod.rs): `crates/victory-shader/src/gfx10/mod.rs`
- [DXIL emission](https://github.com/readmet3xt-lab/foxhound/blob/main/crates/victory-shader/src/emit/mod.rs): `crates/victory-shader/src/emit/mod.rs`
- [Shader resource analysis](https://github.com/readmet3xt-lab/foxhound/blob/main/crates/victory-shader/src/resource.rs): `crates/victory-shader/src/resource.rs`

### Enhancements and diagnostics

- [Frame capture](https://github.com/readmet3xt-lab/foxhound/blob/main/crates/victory-gpu/src/capture.rs): `crates/victory-gpu/src/capture.rs`
- [Frame replay](https://github.com/readmet3xt-lab/foxhound/blob/main/crates/victory-gpu/src/replay/play.rs): `crates/victory-gpu/src/replay/play.rs`
- [DLSS integration](https://github.com/readmet3xt-lab/foxhound/blob/main/crates/victory-gpu/src/streamline.rs): `crates/victory-gpu/src/streamline.rs`
- [1440p profile](https://github.com/readmet3xt-lab/foxhound/blob/main/apps/victory/src/native_1440p.rs): `apps/victory/src/native_1440p.rs`

### Other components

- **Title owner**

## Connections

- Title owner → CLI commands: invokes (evidence: `README.md`)
- CLI commands → Title runner: dispatches (evidence: `apps/victory/src/main.rs`)
- CLI commands → Shader commands: dispatches (evidence: `apps/victory/src/main.rs`)
- CLI commands → Pipeline warmup: dispatches (evidence: `apps/victory/src/main.rs`)
- Title runner → Executable loading: loads title
- Executable loading → PE image handling: prepares image (evidence: `crates/victory-pe/src/image.rs`)
- Title runner → Console API emulation: starts runtime
- Console API emulation → Game runtime APIs: registers APIs
- Game runtime APIs → Async services: uses services (evidence: `crates/victory-hle/src/modules/xgameruntime.rs`)
- Game runtime APIs → Title storage: registers storage (evidence: `crates/victory-hle/src/modules/xgameruntime.rs`)
- Title storage → Async services: completes requests (evidence: `crates/victory-hle/src/modules/storage.rs`)
- Title runner → DirectStorage: emulates file queues
- Title runner → D3D12 GPU layer: initializes graphics
- D3D12 GPU layer → Draw execution: executes draws
- Draw execution → Descriptor heaps: reads descriptors (evidence: `crates/victory-gpu/src/draw.rs`)
- Draw execution → GPU resources: uses resources (evidence: `crates/victory-gpu/src/draw.rs`)
- Draw execution → Host pipelines: binds pipelines (evidence: `crates/victory-gpu/src/draw.rs`)
- Frame capture → GPU resources: records resources (evidence: `crates/victory-gpu/src/capture.rs`)
- Frame capture → Frame replay: supports replay (evidence: `crates/victory-gpu/src/replay/play.rs`)
- Title runner → DLSS integration: optionally enables (evidence: `README.md`)
- Title runner → 1440p profile: applies profile (evidence: `README.md`)
- Shader commands → Shader IR: translates shaders (evidence: `README.md`)
- Shader IR → GFX10 decoder: decodes instructions (evidence: `crates/victory-shader/src/ir.rs`)
- Shader IR → DXIL emission: emits DXIL (evidence: `crates/victory-shader/src/emit/mod.rs`)
- DXIL emission → Shader resource analysis: analyzes resources (evidence: `crates/victory-shader/src/emit/mod.rs`)
- Pipeline warmup → Host pipelines: prewarms host (evidence: `README.md`)
