Files
6gbvram---16gb-ram/docs/architecture.md
T
MarvisandClaude Sonnet 5.5 f4504f6413 Initial commit
Rust workspace for VIctory: PE analysis, loader, HLE skeleton,
DXBC/DXIL parsing with a GFX10 decoder, conversion cache, CLI and
asset-policy enforcement.

Co-Authored-By: Claude Sonnet 5.5 <[email protected]>
2026-11-23 01:15:26 +01:00

58 lines
2.9 KiB
Markdown

# Architecture
```
user's files (outside repo) VIctory
─────────────────────────── ─────────────────────────────────────────
game assets ──────────────────────────► victory-pipeline + victory-game
(victory-formats, victory-shader)
│
▼
cache_dir: converted data
│
game executable ─► victory-loader ────► title code (native x86-64)
prepare, map, bind │ imports
▼
victory-hle ── host Windows (shared APIs)
│ D3D12.X
▼
victory-gpu ─► host D3D12
│ shaders at pipeline creation
▼
victory-shader ◄─► cache_dir
```
Shaders are translated when the title creates a pipeline, from the bytes it
passes, wherever it loaded them from (executable, archive, memory).
Converting them ahead of time from files is only a warm-up.
## Crates
| Crate | Role |
|-------|------|
| `victory-core` | config, asset-policy guard, logging |
| `victory-pe` | read-only PE32+ and import-library analysis |
| `victory-loader` | prepare, map, bind and start the title image |
| `victory-hle` | console API implementations, host pass-through policy |
| `victory-gpu` | D3D12.X packet streams and GPU memory → host D3D12 (skeleton) |
| `victory-shader` | Xbox shader containers → host shaders |
| `victory-formats` | texture layouts, BCPack, audio codecs (skeleton) |
| `victory-pipeline` | converter trait, content-addressed cache |
| `victory-game` | Grand Theft Auto VI-specific formats, build identities, hooks |
| `apps/victory` | command-line front end |
| `xtask` | asset-policy check, git hooks |
| `tests/fixtures/hle-probe` | a stand-in "title" (our own code) for loader tests |
Everything except `victory-game` is platform-level and can be tested with
any Xbox Series title.
## Import resolution
For every `dll!function` the title imports, in order:
1. our implementation in `victory-hle::modules` (always wins);
2. the host's own function, if `HostPolicy` allows that DLL;
3. a generated stub that names the import when called (`--unimplemented
trap` breaks into the debugger and aborts; `zero` logs once and returns 0).
`victory census` shows this classification without running anything.