VIvidia is an experimental, research-oriented Xbox Series (Scarlett) compatibility, binary-recompilation/HLE runtime, and shader-translation layer targeting native Windows x86-64 execution on NVIDIA GeForce RTX GPUs (Direct3D 12, Shader Model 6.6+, Wave32). It currently focuses on running GTA VI (game_scarlett_master.exe, Xbox Series build v1.0.2.1) using user-supplied files.
Legal & Asset Safety Notice This repository contains zero proprietary game files, binaries, shaders, textures, archives, keys, or screenshots. Users must supply their own legally obtained dump of the title outside the repository directory. See Asset Policy.
VIvidia is an independent technical project and is not affiliated with, endorsed by, or supported by the title's developer or publisher, Microsoft, AMD, or NVIDIA.
- Project Scope & Architecture
- Workspace Crates
- Milestones & Current Status
- Self-Reported Hardware & Performance
- Shader & Wave64 → Wave32 Lowering Status
- Known Issues & Active Investigations
- Prerequisites & Building from Source
- Usage & Key Environment Variables
- Repository Safety & Policy Enforcement
- License & Upstream Acknowledgements
VIvidia executes native console x86-64 title code under Windows while translating console graphics, system APIs, and asset formats on the fly:
- PE Mapping & TLS Redirection (
victory-pe,victory-loader): Validates and maps the title executable and companion DLLs into the host address space, redirects static TLS slot accesses, and installs a structured crash handler (module+rvaunwind reporting). - Console High-Level Emulation (
victory-hle): Implements console-only runtime modules (xgameruntime.dll, virtual storage path mapping underVICTORY_DATA_DIR, offline service stubs, audio, and GameInput/DualSense/DualShock 4 USB & Bluetooth support) while enforcing a strict host DLL pass-through policy (HostPolicy). - GFX10/RDNA2 → DXIL Shader Translation (
victory-shader): Lifts native GPU shader binaries to an SSA IR, strips hardwareEXECmasks via control-flow structurization, traces descriptor/memory lineage back to root signatures, performs Wave64 → Wave32 lowering (widen,with_pair_meetings,split_lds_kernelwithSLOT_GROUP_SCRATCH, andSLOT_VIEW_ADDRESSES), and emits Shader Model 6.6 DXIL bitcode validated againstdxil.dll. - D3D12.X Command & Memory Bridge (
victory-gpu,victory-formats): Translates console D3D12.X command buffers, tracks unified-memory modifications via WindowsGetWriteWatch, manages tiled-to-linear texture detiling / BCPack decoding, maintains block-pooled VRAM and staging allocators (pool.rs) with host commit-headroom admission (residency.rs), and supports the title's BVH/ray-tracing workload (VICTORY_BVH_BUILDER=1).
All converted caches, pipeline libraries, and runtime save data are written strictly outside the source tree via victory_core::ensure_outside_repo.
| Component | Responsibility |
|---|---|
crates/victory-core |
Configuration (victory.toml), asset-policy path guards, logging initialization |
crates/victory-pe |
Read-only PE32+ and import-library inspection |
crates/victory-loader |
Console image mapping, import binding, TLS redirection, crash diagnostics |
crates/victory-hle |
Console OS/WinRT/XGameRuntime/filesystem/input HLE and HostPolicy |
crates/victory-gpu |
D3D12.X command replay, write-watch tracking, pools, descriptors, BVH host bridge |
crates/victory-shader |
GFX10/RDNA2 disassembler, SSA IR, structurizer, Wave32 lowering, DXIL emitter |
crates/victory-formats |
Console texture tiling/detiling, BCPack decompression, audio format decoding |
crates/victory-pipeline |
Converter trait and content-addressed conversion cache |
crates/victory-game |
Build identities (v1.0.2.1), title-specific format hooks and patches |
apps/victory |
CLI front end (play, run, shaders, translate, warm, preload, census) |
xtask |
Asset-policy verifier (cargo xtask policy) and git hook installer |
tests/fixtures/hle-probe |
Self-authored synthetic PE fixture for loader verification tests |
Self-Reported Verification Note: All measurements and stability observations below are self-reported from local testing on the hardware profile documented in the next section using native rendering (no DLSS, no Frame Generation).
| Milestone | Status | Technical Notes |
|---|---|---|
| Executable boot | ✅ Verified | game_scarlett_master.exe (Xbox Series v1.0.2.1) boots and initializes under HLE modules. |
| Shader & Wave32 translation | 🔧 Nearly Complete | 25,787 / 25,787 runnable containers translate in default cache census; 1 compute shader (6b82bc7d22016cb5) currently panics when explicitly lowered under VICTORY_HOST_WAVE=32 (tracked below). |
| Menu & input | ✅ Verified | Title menu renders and responds to DualSense/DS4, XInput, and keyboard input. |
| In-world rendering & RT | ✅ Functional | Opening cutscenes, street traversal, shoreline/ocean physics, and optional ray tracing (VICTORY_BVH_BUILDER=1) execute in-world. |
| Target 30 FPS (≤ 33.3 ms) | 🔧 In Progress | Light scenes (1,500 draws) reach 30.7 FPS / 32.6 ms; dense scenes (3,100–4,200 draws) reach 23.7–26.2 FPS / 38.1–42.1 ms, still CPU-bound in submission preparation and refresh/landing work. |
- GPU: NVIDIA GeForce RTX 4090 (24 GB VRAM, native Wave32, SM 6.8, driver
32.0.16.1714) - CPU: Intel Core i9-13900K (24 cores / 32 threads)
- Memory & OS: 64 GB DDR5, Windows 11 (
x86_64-pc-windows-msvc) - Execution Profile: Series S (
1280x720internal), native rendering (no DLSS / no FrameGen),releasebuild,VICTORY_HOST_WAVE=32,VICTORY_COPY_BESIDE=1,VICTORY_STORE_BESIDE=1
| Scene Complexity | Draws / Frame | Median Frame Time | Approximate FPS |
|---|---|---|---|
| Opening cutscene (title-locked) | 8–10 | 33.3 ms | 30.0 FPS |
| World — light / open water | 800–1,500 | 28.9–30.0 ms | 33.3–34.6 FPS |
| World — medium | 1,500–2,500 | 33.2–35.5 ms | 28.2–30.1 FPS |
| World — dense street | 2,500–3,500 | 37.3–38.5 ms | 26.0–26.8 FPS |
| World — heavy | 3,500–7,900 | 42.8–44.9+ ms | 14–23 FPS |
- Primary Bottleneck (CPU vs GPU): On the RTX 4090, GPU utilization sits around ~55–71% with
0.0 msGPU wait time. Frame pacing is strictly limited by single-threaded CPU preparation (preparing35–45 ms/frame in heavy scenes:copy_mappedat ~70–100 MB/frame, readback/landing at ~21–22 MB/frame,GetWriteWatchspan queries, and texture refreshes).
Measured on the same RTX 4090 / i9-13900K profile with a release build, native 1280x720 rendering, no DLSS and no Frame Generation. The game was entered from the same autosave and allowed to stream before sampling; figures are the in-game ten-second frame lines.
| Scene (draws/frame) | Median frame time | FPS | Preparing | Copy-back |
|---|---|---|---|---|
| Light (1,507) | 32.6 ms | 30.7 | 27.6 ms | 8.9 ms |
| Heavy street (3,133) | 38.1 ms | 26.2 | 30.4 ms | 13.5 ms |
| Heavy street (3,230) | 39.8 ms | 25.2 | 30.3 ms | 13.4 ms |
| Densest sampled (4,187) | 42.1 ms | 23.7 | 30.1 ms | 12.5 ms |
The remaining CPU wall in a 3,100-draw frame is dominated by: refreshes of host copies 9.5 ms, copies in the card's memory (card_before) 6.4 ms, the one write-watch asking 4.3 ms, planning the steps done on the card 3.2 ms, and title bytes put under flights' writes 2.7 ms. Copy-back runs on the relay thread and overlaps preparing, but its tail still contributes roughly 13 ms when the card is behind.
Verified lossless CPU/scheduling changes kept in this pass:
- Neptune worker affinity:
turbo::parallel_forhelpers now request the fast-core set and helper priority, like the existing wide/landing pools. In a comparable 3,080-draw window this moved refreshes from 10.8 ms to 9.4 ms. - Declared passes:
VICTORY_JOIN_PARTS=16reduced fixed per-submission overhead in the sampled heavy windows;8remains the conservative default in the launcher,16is the tested tuning value. - Pointer lookups:
card_beforeand relay range merging now use address-keyed fast sets/maps instead of nestedArc::ptr_eqscans. - Instrumentation: per-frame lines now split
card_before, refresh-front, and write-watch costs so the next pass can be measured without a profiler.
Rejected after measurement (not enabled): deferred pre-write snapshot batching (cross-copy aliasing can corrupt host copies and regressed to 8–12 FPS), 10 turbo workers, 8 landing threads, VICTORY_ASK_EARLY, a 32 MiB write-watch merge gap, and VICTORY_CARD_STEPS=1 (saved 2.4 ms of planning but added 8.8 ms of flight waits).
Status: the native 30 FPS target is not yet met in the densest scenes. The next viable work is narrower than thread-count tuning: reduce the 9.5 ms refresh and 6.4 ms card-copy preparation without changing the
writing/snapshot order, and shorten the relay landing tail.
- Default Cache Census (
victory.exe shaders, non-host-wave):25,787runnable shaders translated and cached (198skipped:195unreferenced dead-codeGs-only containers and3empty containers). - Dynamic Descriptor View Addresses: All 5 dynamic-offset
shadowmask:CS_TraceShadowRays_Halfvariants translate and validate (SLOT_VIEW_ADDRESSESSRV tablet251+ Wave32MASK_ELSEWHEREhandling). - Full-LDS Wave64 Compute Shaders: Both 32 KiB LDS
vfx_triangleClipkernels map per-group spill storage viaSLOT_GROUP_SCRATCHUAVu250(32 MiBbounded backing).
- Wave32 Lowering Panic in
6b82bc7d22016cb5(vfx_triangleClip:CS_CollectTriangles*):- Running with
VICTORY_HOST_WAVE=32triggers a compiler panic on a background pipeline worker (forward reference outside a phiincrates/victory-shader/src/emit/bitcode.rs, observed viawidenwhereCast(Bitcast, Inst(90))referencesExtract(Inst(89), 0)before its block order position). Until resolved, dispatches using this compute pipeline are dropped.
- Running with
- Heavy-Scene & Ray-Tracing CPU Overhead (< 30 FPS):
- Scenes exceeding ~2,500 draws/frame and ray-traced runs (
VICTORY_BVH_BUILDER=1, which adds substantialGetWriteWatchscanning and BVH memory traffic) currently exceed the 33.3 ms budget.
- Scenes exceeding ~2,500 draws/frame and ray-traced runs (
- Observed Visual & Streaming Artifacts (
diagCaptures on RTX 4090):- Localized black pixel clusters near volumetric/headlight fog, dynamic gray mosaic artifacts on ocean surfaces, black in-game phone display surface, and intermittent corrupted/rainbow skin textures on specific NPCs in crowded interior scenes.
- Multi-frame texture/prop pop-in when launch configs aggressively throttle texture staging (
VICTORY_TEXTURE_STAGE_MS=16,VICTORY_TEXTURE_CATCHUP=0,VICTORY_SHOW_NEW_LATER=1).
- Windows Commit-Limit Throttling (
residency.rs):- When available OS commit falls below 4 GiB (even with > 16 GiB physical RAM free),
residency.rsenters host memory pressure mode and throttles speculative texture prefetch and spare pool retention.
- When available OS commit falls below 4 GiB (even with > 16 GiB physical RAM free),
- NVIDIA Diagnostic False Positives in
pool.rs:- In
--features diagnosticsbuilds,where_the_card_readslogsPOOL: the card reads a pooled texture's first level past the end of the piece it was placed inwith multi-gigabyte offsets (into > 0x10_0000_0000) because its descriptor-base subtraction assumes AMD-style flat GPU virtual addresses inside a heap.
- In
- OS: Windows 11 (x64), or Windows 10 22H2+ with Direct3D 12 Agility SDK (
victory get-d3d12/D3D12\D3D12Core.dll) - GPU: NVIDIA GeForce RTX GPU (or D3D12 SM 6.6 + mesh-shader capable adapter) with current drivers
- RAM / Storage: 32 GB+ system RAM (64 GB recommended; ensure sufficient Windows pagefile/commit headroom), NVMe SSD
- Build Tools:
- Rust toolchain pinned in rust-toolchain.toml (
1.98.1,x86_64-pc-windows-msvc, Rust edition2024) - Visual Studio Build Tools with Desktop development with C++ (MSVC & Windows SDK, including
dxil.dllfor--validate)
- Rust toolchain pinned in rust-toolchain.toml (
# Verify asset policy compliance before building or committing
cargo xtask policy
# Optional: install git pre-commit asset-policy hook
cargo xtask install-hooks
# Release build (standard runtime)
cargo build --release
# Diagnostics build (separate target\diag profile with tracing/diagnostics enabled)
cargo build --profile diag -p victory --features diagnosticsConfigure your external game dump path in victory.toml (outside the repository) or pass it on the command line:
# Inspect missing/covered console imports without executing title code
target\release\victory.exe census C:\Path\To\TitleDump --missing
# Pre-translate shaders into the external cache
target\release\victory.exe shaders C:\Path\To\TitleDump
# Validate shader translation under explicit Wave32 host constraints
$env:VICTORY_HOST_WAVE = "32"
target\release\victory.exe translate C:\Path\To\TitleDump --validate --pipelines
# Launch via the play launcher (or direct HLE execution)
target\release\victory.exe play C:\Path\To\TitleDump\game_scarlett_master.exe --series-s
target\release\victory.exe run --execute C:\Path\To\TitleDump\game_scarlett_master.exe --console series-s| Variable | Purpose |
|---|---|
VICTORY_GAME_DIR / VICTORY_CACHE_DIR / VICTORY_DATA_DIR |
External paths for title dump, derived caches, and saves (kept outside the repo) |
VICTORY_HOST_WAVE |
Target wave width override (e.g., 32 for NVIDIA GeForce RTX Wave32 testing) |
VICTORY_BVH_BUILDER |
Enables title compute/BVH ray tracing (1) |
VICTORY_COPY_BESIDE / VICTORY_STORE_BESIDE |
Side-channel copy/store optimizations for host memory bridging |
VICTORY_TEXTURE_POOL / VICTORY_POOL_SMALL |
Controls 64 MiB heap/staging block pooling (0 disables pooling) |
VICTORY_TEXTURE_STAGE_MS / VICTORY_TEXTURE_CATCHUP |
Per-pass texture upload millisecond cap (default 250) and 3× backlog catch-up (0 disables) |
VICTORY_SHOW_NEW_LATER / VICTORY_TEXTURE_NO_WAIT |
Delays showing newly pooled textures / avoids blocking texture refreshes during title remaps |
VICTORY_EARLY_DEPTH / VICTORY_LEAVE_OUT |
Keeps console early-depth behavior / skips specific shader hashes by 16-hex ID |
VICTORY_PIPELINE_BOOK |
Records created pipelines for victory warm driver-cache prewarming |
VICTORY_JOIN_PARTS |
Joins independently-preparable submission parts; 16 measured as a small fixed-overhead win on the 13900K. |
VICTORY_AHEAD_GAP_MB |
Write-watch merge gap in MiB (default 8); larger values reduced ask calls but increased ask time in testing. |
- Pre-commit & CI Policy Check:
cargo xtask policy(xtask/src/policy.rs) enforces an allowlist of source/documentation extensions, rejects files ≥ 640 KiB, blocks binary signatures, and flags long hex/base64 sequences. - Permitted Sole Binary Exception:
crates/victory-formats/src/bcpack-tables.bin(~78 KB) holds standard BCPack entropy/dictionary tables required for format decoding and is explicitly registered inxtask/src/policy.rs(not covered by the repository source license; see docs/asset-policy.md). - Runtime Path Isolation: Runtime outputs are checked with
victory_core::ensure_outside_reposo derived artifacts never enter the git working tree.
- License: Workspace crates are licensed under GPL-3.0-or-later (see Cargo.toml; excluding the documented
bcpack-tables.binformat-constant table). - Upstream Acknowledgements: VIvidia builds directly upon and gratefully credits the open-source research and engineering of the VIctory community:
- trustno1-coder/VIctory-NVIDIA — primary upstream base for NVIDIA Wave32 lowering,
besidecopy/store optimizations, DualSense/DS4 input HLE, Streamline integration, and memory-packing work. - fxceless/victory-fork, Marvisak/VIctory, DexNom/VIctory, Belobug/VIctory-Belobug-AMD, and FQY55kai/ZJOU-VICTORY — foundational shader translator, GPU memory/write-watch tracking, BVH ray-tracing work, pool diagnostics, and HLE contributions documented in docs/findings.md and docs/bug-journal.md.
- trustno1-coder/VIctory-NVIDIA — primary upstream base for NVIDIA Wave32 lowering,