How doubleghosty/cool_fox works
cool_fox is an experimental Xbox Series x64 compatibility layer and shader-translation runtime for native Windows D3D12. Its main workflow launches a title, supplies console runtime APIs and graphics behavior, translates console shaders, and submits rendering work to the host GPU. Separate CLI commands inspect and translate shader inputs or pre-warm caches; GPU capture and replay support diagnostics. The graph preserves the major documented rendering, residency, pipeline, and DirectStorage areas. Some connections are documented or indexed rather than visible in the excerpts; uncertain implementation links are omitted.
Main entry points: main.rs Victory CLI · draw.rs Draw translation · run.rs Title runner · translate.rs Batch translation
Components 27
Launch and tools
- Victory CLI
apps/victory/src/main.rs - Title runner
apps/victory/src/run.rs - Inspect commands
apps/victory/src/inspect.rs - Shader commands
apps/victory/src/shader.rs - Batch translation
apps/victory/src/translate.rs - Pipeline warming
apps/victory/src/warm.rs
Console compatibility
- Xbox title
- Executable loader
crates/victory-loader/src/prepare.rs - Console API runtime
crates/victory-hle/src/runtime.rs - Game runtime APIs
crates/victory-hle/src/modules/xgameruntime.rs - Async queues
crates/victory-hle/src/modules/xasync.rs - DirectStorage
crates/victory-hle/src/modules/dstorage.rs - Persistent storage
crates/victory-hle/src/modules/storage.rs
Shader translation
- Console shader input
crates/victory-shader/src/gfx10/mod.rs - Shader IR
crates/victory-shader/src/ir.rs - Shader resources
crates/victory-shader/src/resource.rs - DXIL emitter
crates/victory-shader/src/emit/mod.rs
GPU rendering
- Pipeline cache
crates/victory-pipeline/src/cache.rs - GPU objects
crates/victory-gpu/src/object.rs - GPU resources
crates/victory-gpu/src/resource.rs - Descriptor heaps
crates/victory-gpu/src/descriptor/host.rs - Host pipelines
crates/victory-gpu/src/pipeline.rs - Draw translation
crates/victory-gpu/src/draw.rs - GPU submission
crates/victory-gpu/src/queue.rs
Diagnostics
- Capture and replay
crates/victory-gpu/src/capture.rs - Replay analysis
crates/victory-gpu/src/replay/play.rs
Other components
- Title operator
Connections 31
- Title operator → Victory CLI: runs commands
- Victory CLI → Title runner: dispatches run
apps/victory/src/main.rs - Victory CLI → Inspect commands: dispatches inspect
apps/victory/src/main.rs - Victory CLI → Shader commands: dispatches shaders
apps/victory/src/main.rs - Victory CLI → Batch translation: dispatches translate
apps/victory/src/main.rs - Victory CLI → Pipeline warming: dispatches warm
apps/victory/src/main.rs - Title runner → Xbox title: runs executable
- Title runner → Console API runtime: uses compatibility runtime
- Title runner → Host pipelines: renders through
- Xbox title → Console API runtime: calls console APIs
- Console API runtime → Game runtime APIs: registers APIs
- Game runtime APIs → Async queues: exposes async APIs
crates/victory-hle/src/modules/xgameruntime.rs - Xbox title → DirectStorage: submits storage requests
crates/victory-hle/src/modules/dstorage.rs - Xbox title → Persistent storage: uses save storage
crates/victory-hle/src/modules/storage.rs - Persistent storage → Async queues: completes requests
crates/victory-hle/src/modules/storage.rs - Shader commands → Batch translation: uses translation flow
apps/victory/src/translate.rs - Batch translation → Console shader input: finds shader inputs
- Console shader input → Shader IR: decodes into
crates/victory-shader/src/gfx10/mod.rs - Shader IR → Shader resources: tracks resources
crates/victory-shader/src/resource.rs - Shader resources → DXIL emitter: feeds emission
crates/victory-shader/src/emit/mod.rs - DXIL emitter → Pipeline cache: caches translated shaders
- Pipeline warming → Pipeline cache: prewarms pipelines
- GPU objects → GPU resources: backs resources
crates/victory-gpu/src/resource.rs - GPU resources → Descriptor heaps: provides views
crates/victory-gpu/src/descriptor/host.rs - Draw translation → Descriptor heaps: reads descriptors
crates/victory-gpu/src/draw.rs - Draw translation → GPU resources: uses resources
crates/victory-gpu/src/draw.rs - Draw translation → Host pipelines: selects pipeline
crates/victory-gpu/src/draw.rs - Host pipelines → Pipeline cache: uses cache
- Draw translation → GPU submission: records commands
crates/victory-gpu/src/draw.rs - Capture and replay → GPU submission: captures work
crates/victory-gpu/src/capture.rs - Replay analysis → Capture and replay: reads captures
crates/victory-gpu/src/replay/play.rs