Skip to content

About

No description, website, or topics provided.

Resources

Stars

0 stars

Watchers

0 watching

Forks

 
 

Repository files navigation

Victory-Nvidia-optimized

A performance-focused fork for running an Xbox Series title natively on Windows with NVIDIA GeForce RTX GPUs, built on fxceless/victory-fork, trustno1-coder/VIctory-NVIDIA, readmet3xt-lab/foxhound, and Marvisak/VIctory.

This repository contains no game files, code, or assets. You must supply your own legally obtained copy of the title (game_scarlett_master.exe, Xbox Series build v1.0.2.1). It is not affiliated with or endorsed by the title's developer, publisher, or NVIDIA. See docs/asset-policy.md.


Performance & Key Changes

Measured on Windows 11, RTX 4070 Ti SUPER (16 GB VRAM), DLSS + 2x Frame Generation:

  • Open-world gameplay: ~20 FPS rendered (18–22 FPS typical across medium/heavy scenes, peaking 23–24.8 FPS, ~17–21 FPS in heavy/ultra daytime scenes) -> ~40–50 FPS shown with 2x DLSS Frame Generation.
  • Eliminated multi-second pipeline-compile hitches: 0 stalls >= 50 ms in cached gameplay (13.0 FPS worst window vs 1.8 FPS / 7.85 s stalls before).
  • Zero regressions to visual/lighting fixes: retains VICTORY_AMBIENT, VICTORY_AMBIENT_SPECULAR, VICTORY_AMBIENT_AIR, VICTORY_WATER_LIGHT, and the 512 MB rolling BVH page budget.

What Victory-NV Adds

  1. Community Input, Display & Quality-of-Life (victory.exe & F1 menu)

    • Mouse & Keyboard + Live F1 Rebinding: Toggle Mouse & Keyboard directly in F1 and customize key bindings / look sensitivity live without losing controller support.
    • Console Profiles Down to 540p: Supports SERIES X (1440p / 1080to1440 / 4k) and SERIES S (1080 / 720 / 626 / 540) profiles, plus DLSS presets (DLAA through Performance, model K default), shared cross-build %LOCALAPPDATA%\victory\data saves, and Windows 10/11 Agility SDK auto-matching.
    • Opt-In Frame Generation (--framegen / --framegen-ready): Supports 2x–6x DLSS Frame Generation (MFG Unlocker optional for RTX 20/30) with an F1 restart notice; victory.exe play keeps Frame Gen off unless requested or saved in F1, while Play.cmd enables 2x by default on 12 GB+ RTX 40/50 GPUs with > 20 GB system RAM.
    • Experimental Ray Tracing (RAY TRACING (BVH)) OFF by Default: Avoids trapping 8–12 GB GPUs at ~3–6 FPS; toggle on in F1 (SAVE AND RESTART NOW) when testing BVH ray tracing.
  2. Issue #4 Submission Thread & Descriptor Sync Fixes

    • list/thin.rs & descriptor/host.rs: lowers the VICTORY_THIN_GATE pending dynamic descriptor reserve from 5/8 (163,840 free) to 3/8 (98,304 free; configurable via VICTORY_THIN_GATE_PERCENT), eliminating false list parking and 16–25 ms/frame submission-thread stalls while still holding ~100k slots in reserve; wakes parked translators immediately when HostHeap::release returns dynamic slots.
    • descriptor.rs: removes cross-core atomic contention inside sync_heaps and hoists per-heap sync state out of hot record loops.
  3. 16 GB+ System RAM Hardening, Leak Fixes & OOM Recovery

    • residency.rs, pool.rs, ahead.rs, host.rs, pipeline/make.rs: adds 3-tier system RAM scaling (Low <= 20 GiB for 16 GB PCs, Mid 21–32 GiB, High > 32 GiB).
    • Fixes a pool.rs staging-pool leak where idle mapped upload blocks could retain up to 64 blocks instead of capping to 2 / 4 / 8 by RAM tier; reclaims untranslated boxed chunk allocations in list/thin.rs; replaces std::mem::forget overlay buffer leaks in host/panel.rs and host/menu.rs with deferred retirement (host::retire); and adds pressure/idle trim hooks across host/send.rs, list.rs, shadow.rs, and host.rs.
    • Caps background pipeline worker concurrency on 16 GB PCs (<= 4 workers) and throttles speculative slow shader builds during OS commit pressure, with immediate emergency_trim() + one-shot E_OUTOFMEMORY retry on host upload, shared, and read-back allocations.
  4. 8 GB / 12 GB / 16 GB / 24+ GB VRAM Scaling

    • resource.rs: scales targets_most() dynamically (26% of DXGI local VRAM budget, 768 MiB – 3,072 MiB) instead of a hardcoded 3,072 MiB reserve that starved texture streaming / black-screened 8 GB GPUs, and reserves tighter texture headroom (84%) on <= 8.5 GiB budgets unless VICTORY_TEXTURE_ROOM_PERCENT is explicitly set.
    • shadow.rs & pool.rs: adds dedicated 8 GB (~6.6–8.5 GiB DXGI budget) card/window shadow tiers and caps idle 64 MiB texture heap blocks by VRAM (4 / 8 / 16 / 32).
  5. Intel & AMD CPU Topology Scaling

    • cores.rs, land.rs, list/thin.rs, shadow.rs, pipeline/make.rs: queries Windows processor efficiency classes (Topology { total, fast, hybrid }) so hybrid Intel (P+E cores) and homogeneous AMD Ryzen CPUs (6 to 16+ cores) size thin, land, under, records, views, wide, and pipeline worker pools without oversubscribing P-cores.

Requirements

  • OS: Windows 10 or Windows 11 (x64), SSD, 16 GB RAM minimum (32 GB+ recommended) — automatic memory-pressure trimming and commit recovery run on 16 GB systems; see docs/windows-memory.md for paging file tips
  • CPU: x86_64 with AVX2 support (Intel & AMD topology auto-scaled)
  • GPU: NVIDIA GeForce RTX with an up-to-date driver (8 GB VRAM minimum with auto-scaled reserves; 12–16 GB+ VRAM recommended for Series X 1440p + DLSS Frame Generation; RTX 40+ for official FG)
  • Build tools: Rust (rustup) (the repo pins 1.98.1 in rust-toolchain.toml) and Visual Studio Build Tools (Desktop development with C++)
  • Game files: your own dump of the title's Xbox Series build v1.0.2.1 containing game_scarlett_master.exe

How to Build

In PowerShell:

git clone https://github.com/CHECK6960/Victory-Nvidia-optimized.git
cd Victory-Nvidia-optimized

# Point victory.toml (git-ignored) at your dump folder outside the repository
copy victory.example.toml victory.toml

# Optional (once): downloads NVIDIA Streamline DLSS & Frame Generation (~70 MB into git-ignored nvidia-sdk\)
.\Get-NVIDIA-DLSS.cmd

# Build with host CPU optimizations (AVX2)
$env:RUSTFLAGS = "-C target-cpu=native"
cargo build --release -p victory

Optional test verification:

$env:RUSTFLAGS = "-C target-cpu=native"
cargo test --release -p victory
cargo test --release -p victory-gpu --lib

The compiled executable is created at target\release\victory.exe.


How to Run

Option 1: Unified Smart Launcher (Play.cmd) — Recommended

Double-click Play.cmd in the repository folder, or run it in PowerShell:

.\Play.cmd

All Play.cmd / scripts/play-nv.ps1 ways to run:

.\Play.cmd                                            # Auto-detect PC, warm --used, and launch
.\Play.cmd check                                      # Inspect CPU/RAM/GPU tier, F1 file, SDK, & caches
.\Play.cmd preload                                    # Run full shader preload + background discovery + library build
.\Play.cmd -Help                                      # Print all launcher options
.\Play.cmd -Exe "D:\Games\MyDump\game_scarlett_master.exe"  # Point at a specific dump & save victory.toml
.\Play.cmd -Fullscreen                                # Make game window borderless fullscreen
.\Play.cmd -SkipPreload                               # Skip first-time preload setup & launch immediately
.\Play.cmd -BootWarmSeconds 90                        # Change background discovery duration during setup (or -SkipBootWarm)
.\Play.cmd -NoWarm                                    # Skip per-run `victory warm --used`
.\Play.cmd -Rebuild                                   # Force Release rebuild with `-C target-cpu=native` (or -NoBuild)
.\Play.cmd -NoBackup                                  # Skip `%LOCALAPPDATA%\victory\data\7952987A` backup
.\Play.cmd -ResetSettings                             # Regenerate hardware-matched defaults in victory-settings.txt
.\Play.cmd -Set "VICTORY_THIN_GATE_PERCENT=30"        # Apply custom VICTORY_* switches for this session

Note: On a first run without victory-settings.txt, you can also pass -SeriesS, -Res 1440|1080to1440|4k, -Dlss off|dlaa|quality|balanced|performance, -FrameGen off|2|3|4|5|6, and -Fps N to seed initial profile values. Once victory-settings.txt exists, your saved F1 edits always take priority unless you pass -ResetSettings or -Set.

What Play.cmd / scripts/play-nv.ps1 does automatically:

  • Hardware-aware profile: Detects your CPU, system RAM (16 / 32 / 64+ GB), and NVIDIA RTX GPU + VRAM (nvidia-smi / WMI) to initialize optimal settings (Series S + DLSS Balanced/Quality + FG off on <= 9 GB VRAM or <= 20 GB RAM; Series X 1080->1440p + Quality + 2x FG on 12 GB RTX 40/50; Series X Native 1440p + Quality + 2x FG on 16+ GB RTX 40/50). Existing edits in %LOCALAPPDATA%\victory\victory-settings.txt are never overwritten unless you pass -ResetSettings.
  • One-click prerequisites & save backups: Builds target\release\victory.exe if missing/updated, fetches Windows 10 Agility SDK or NVIDIA Streamline DLSS once when needed, and backs up %LOCALAPPDATA%\victory\data\7952987A (keeping the latest 5 backups).
  • First-time shader preload + per-launch --used warming: On a brand-new cache, translates shaders (victory shaders), runs up to a 60s minimized background capture (skip or shorten via -BootWarmSeconds / -SkipBootWarm) to discover initial prologue pipelines, and packs them with victory preload. Once caches exist (known-shaders.bin, known-pipelines.bin, host-pipelines.bin), normal Play.cmd skips straight to a fast victory warm --used check (compiling only newly seen pipelines not yet in warm-done.txt; run .\Play.cmd preload anytime to force a full preload).

Option 2: Direct Binary & CLI Subcommands (victory.exe)

# Launch directly (reads victory-settings.txt if saved; keeps Frame Gen off unless requested)
.\target\release\victory.exe play "D:\Games\MyDump\game_scarlett_master.exe"

# Example manual launch with explicit profile & switches:
.\target\release\victory.exe play "D:\Games\MyDump\game_scarlett_master.exe" --res 1080to1440 --dlss quality --framegen 2 --fps 1000
.\target\release\victory.exe play "D:\Games\MyDump\game_scarlett_master.exe" --series-s --dlss balanced --set VICTORY_THIN_GATE_PERCENT=30

(You can also copy target\release\victory.exe next to game_scarlett_master.exe and double-click it — play runs automatically.)

Additional CLI utilities in victory.exe:

.\target\release\victory.exe shaders                  # Pre-translate shaders into cache
.\target\release\victory.exe warm --used              # Compile previously used pipelines not yet in warm-done.txt
.\target\release\victory.exe preload                  # Run shaders + warm + pack host-pipelines.bin
.\target\release\victory.exe get-dlss                 # Download NVIDIA Streamline DLSS / FG runtime
.\target\release\victory.exe get-d3d12                # Download Windows 10 D3D12 Agility SDK into target\release\D3D12
.\target\release\victory.exe get-mfg                  # Optional MFG Unlocker (RTX 20/30 Frame Generation)
.\target\release\victory.exe config                   # Show resolved paths from victory.toml / environment
.\target\release\victory.exe upscaler-check --device --present  # Test Streamline DLSS / FG standalone
  • One-time 10-second warm-up restart: On the very first launch of a newly built victory.exe, it automatically restarts once 10 seconds after entering the game world and saves a mark under %LOCALAPPDATA%\victory\warmed\. Later starts launch directly without restarting.
  • In-game hotkeys:
    • F1: Settings menu (Up/Down select, Left/Right change, Enter apply/save, including Mouse & Keyboard bindings)
    • F3: Live stats overlay (FPS, FRAME GEN, DRAWS, SUBMIT BUSY, GPU BUSY, IDLE BEHIND US, VRAM/RAM)
  • Logs, saves & settings location: Kept outside the game folder under %LOCALAPPDATA%\victory\:
    • Logs: %LOCALAPPDATA%\victory\logs\victory-nvidia-play-*.log
    • Saved F1 overrides: %LOCALAPPDATA%\victory\victory-settings.txt
    • Saves: %LOCALAPPDATA%\victory\data

(Pre-warming manually: .\target\release\victory.exe warm --used.)


Recommended Settings (Quality vs FPS)

Settings changed in the F1 menu are saved to %LOCALAPPDATA%\victory\victory-settings.txt and override defaults on every launch.

1. Best Quality ("Console-Like Look", RTX 4070 Ti SUPER / 16 GB VRAM)

Balances native 1440p sharpness, Series X assets/LODs, clean raster lighting, and safe VRAM margins with Frame Gen active:

F1 Setting / Variable Recommended Value Why
CONSOLE (VICTORY_MENU_CONSOLE) SERIES X (series-x) Full Series X detail, LODs, textures, and HUD-less FG tagging
SERIES X PICTURE (VICTORY_MENU_RES) 2560X1440 (1440) Crisp native 1440p output & render targets
DLSS (VICTORY_MENU_DLSS) QUALITY (quality) Best clarity-to-performance ratio (DLAA if GPU still stays below ~90% busy)
DLSS MODEL (VICTORY_DLSS_PRESET) K (k) Cleaner temporal edge/foliage reconstruction
FRAME GENERATION (VICTORY_MENU_FRAMEGEN) 2X (2) Smooth frame pacing with minimal FG ghosting/VRAM overhead
RAY TRACING (BVH) (VICTORY_BVH_BUILDER) OFF ("") Keeps FPS high & avoids RT visual quirks/page lag
LIGHT ESTIMATE / REFLECTION / FOG CAP 0.8 / ON / 1.5 Prevents dark indoor shadows, blown-out sky reflections, and heavy brown haze
WATER LIGHT (VICTORY_WATER_LIGHT) ON (1) Proper tiled water lighting without dark patches
HEAT HAZE AND DECAL DEFRAG LEFT OUT Avoids smear artifacts and frame-time cost

Recommended victory-settings.txt VRAM tuning (16 GB cards with Frame Gen ON):

VICTORY_TEXTURE_ROOM_PERCENT=80
VICTORY_CARD_WINDOWS_MB=3072
VICTORY_CARD_BUFFERS_MB=3072
VICTORY_WINDOWS_LATE=1

Important: Make sure VICTORY_TEXTURE_ROOM_PERCENT is 80 (not 86) whenever DLSS Frame Gen is enabled, so ~1.5–2 GB of VRAM stays reserved for Streamline/render targets instead of spilling into system SHARED memory. (On 8–12 GB GPUs, leave VICTORY_CARD_WINDOWS_MB and VICTORY_CARD_BUFFERS_MB unset/default rather than 3072.)

2. Higher FPS Preset (~20 FPS Base / ~40–50 FPS Shown with 2x FG)

If you want maximum frame rate stability on heavy scenes:

  • CONSOLE: SERIES S (series-s)
  • SERIES X PICTURE: 1080P TO 1440P (1080to1440)
  • DLSS: PERFORMANCE (performance) or QUALITY (quality)
  • FRAME GENERATION: 2X (2)

3. Testing Hardware Ray Tracing (Experimental)

  • Set RAY TRACING (BVH) to ON (VICTORY_BVH_BUILDER=1) in the F1 menu (SAVE AND RESTART NOW), then run victory.exe warm --used once after exploring if desired.
  • Note: VICTORY_AMBIENT turns itself off while BVH ray tracing runs; expect roughly half the base frame rate and occasional WIP artifacts (such as flat green vehicle paint or page lag during fast movement).

Troubleshooting & Notes

  • Black/slow first launch (~14 FPS with Frame Gen): Let the automatic 10-second in-world warm-up finish and auto-restart once after rebuilding victory.exe.
  • SAVE AND RESTART NOW leaves a background process: If restarting from F1 hangs or fails to close cleanly, close the game normally and launch again.
  • Shader/VRAM issues after editing settings: Delete %LOCALAPPDATA%\victory\victory-settings.txt to reset to built-in launcher defaults.
  • More documentation: See docs/windows-memory.md, docs/architecture.md, docs/findings.md, docs/dlss.md, docs/fork-ray-tracing.md, and docs/README-foxhound.md.

Credits

Built directly upon the work of:

  • fxceless/victory-fork — RT rolling page budget, water light fixes, dynamic wait, texture pool gate
  • trustno1-coder/VIctory-NVIDIA — F1 settings menu, F3 stats panel, 2x–6x Frame Gen live switching, preload/DSP/DualSense upgrades
  • readmet3xt-lab/foxhound — card-side compares, descriptor synchronization, ambient/reflection estimation, Streamline DLSS/FG integration
  • Marvisak/VIctory and its contributors (including avatarmanz, Belobug, DexNom, codec-d, pate2464, and others) — the core loader, HLE, D3D12 translator, and shader compiler

License

GPL-3.0-or-later. See LICENSE; third-party binary/asset rules are documented in docs/asset-policy.md.

About

No description, website, or topics provided.

Resources

Stars

0 stars

Watchers

0 watching

Forks

Releases

Packages

Contributors

Languages