Commit Graph
85 Commits
Author SHA1 Message Date
theme613 de86068a05 docs/scripts: remove legacy scripts, add portable play-6gb launcher, and update README
CI / check (push) Canceled after 0s
2026-11-28 17:29:33 +08:00
theme613 84b4509fa3 loader/gpu: port VICTORY_OUTPUT resolution patch, F1 output option, and ask_ahead kept early-out 2026-11-28 13:44:59 +08:00
trustno1-coderandClaude Opus 5.5 63b902fe17 Series S picture row in F1 down to 540p, memory stack on by default
- F1 shows SERIES S PICTURE in place of SERIES X PICTURE when CONSOLE is
  Series S: 1920x1080 (DLAA), 1280x720 (the game), 1113x626, 960x540.
  The size is DLSS's mode (dlaa, quality, balanced, performance), and the
  size and DLSS rows follow each other. Without DLSS the game stays at
  720: the title's own FidelityFX path from 540 stopped it at the start
  (0xc0000094, a division by zero in the title).
- Memory stack on by default again: VICTORY_SLOT_EVICT,
  VICTORY_ALLOCATOR_TRIM and VICTORY_BUDGET_PACK.

Co-Authored-By: Claude Opus 5.5 <[email protected]>
2026-11-27 19:51:18 -08:00
trustno1-coderandClaude Opus 5.5 8fc22547c8 Frames shown as soon as presented, underwater shader back, warm-up restart only with frame generation
- Swap chain: DXGI's tearing support where the system has it, so a focused
  window (independent flip) no longer waits for each refresh, about 2 fps
  more in front. VICTORY_TEARING=0 turns it off; a refused present of that
  kind falls back to presenting at the next refresh for the rest of the run,
  and is logged.
- Shaders: a program that has no wave32 lowering with the loop step on
  (VICTORY_LOOPS_WAVE) is translated again without it, so the water compute
  shader 926c46bab3b86bd6 runs again (black or missing water underwater,
  #539, #570).
- The first start of a new exe restarts by itself only when DLSS frame
  generation is ready or on; without it a first run plays at full speed.
- F1: turning frame generation on in a run started without it says
  "RESTART REQUIRED TO ENABLE FRAME GENERATION".

Co-Authored-By: Claude Opus 5.5 <[email protected]>
2026-11-27 18:44:17 -08:00
fromrivertotheseaandClaude Opus 5.5 b4e1b08245 Frame generation made ready only when asked for (--framegen-ready, -FrameGenReady) (#544)
A start without frame generation no longer goes through Streamline's swap
chain, which held some PCs at a flat 14 fps (#515, #574). --no-framegen-ready
is still accepted. FSR 3 frame generation follows the same rule and still
needs DLSS upscaling on.

Co-Authored-By: Claude Opus 5.5 <[email protected]>
2026-11-27 18:44:17 -08:00
Togicx 9b712a6ab2 CI green again: clippy clean in both builds, budget tests follow VICTORY_INDIRECT_REST
CI on main stopped at its first step (clippy, 40+ findings), so the
diagnostics clippy and the tests never ran. Locally all three steps of
.github/workflows/ci.yml now pass.

Tests: two indirect budget tests still assumed VICTORY_INDIRECT_REST on,
which 545f890 turned off by default.
- host_list_budget_starts_empty_at_each_submission: the big records now
  fill the budget exactly, so the small record after them runs empty with
  REST on or off and the test still shows that no budget carries over.
- warp_batch_charges_every_execution: the expected spend follows the REST
  rule in force (a job that does not fit takes nothing without REST).
Both pass with VICTORY_INDIRECT_REST unset and =1.

Clippy:
- mechanical: is_multiple_of, shift precedence, sort_by_key with Reverse,
  hex digit groups, contains_key, annotated transmutes, mem::take,
  from_ref, a same-type cast, an if with identical branches;
- host/indirects.rs and placed_filler_twins are only used by the
  diagnostics build and are only compiled there;
- removed the never-used `batched` in make_from and the never-read
  depth_written field; Touch::Title is only built by tests, marked so;
- book.rs: the heap that keeps the descriptor alive is a named field;
- ResourceDesc::from_level(&self) renamed levels_from;
- allowed with a reason: two 8-argument functions, the Late enum (boxing
  a flight would allocate per flight) and the CLI Command enum;
- apps/victory: default_paths moved above the test module; the match on
  a block in play.rs binds the block first.

No change in what the game runs.

Co-Authored-By: Claude Opus 5.5 <[email protected]>
(cherry picked from commit 7331b07bde8d7beca973f24a0575ca1866d034d4)
2026-11-27 17:51:24 -08:00
victory-contributor ed81cb9ee0 play: keep VICTORY_HOME and VICTORY_ADAPTER through prepare (#472)
`prepare` clears every VICTORY_ variable not in KEPT before putting the
play settings in. VICTORY_HOME and VICTORY_ADAPTER were not in KEPT, but
both are read again after the clearing:

- Config::load in run resolves the cache and save folders, so with
  VICTORY_HOME set they still went to %LOCALAPPDATA%\victory (#472).
- The F1 menu's restart and the warm-up restart inherit this process's
  environment, so the next start read victory-settings.txt from
  %LOCALAPPDATA% instead of VICTORY_HOME, and its saved choices seemed lost.
- hardware_adapter reads VICTORY_ADAPTER when the host device is made, so
  a named card was passed over for the one with the most memory.

Adds both to KEPT, with a test.

Co-Authored-By: Claude Opus 5.5 <[email protected]>
(cherry picked from commit 9f05995e1752dcd5a4e2698c0ea54d523df83940)
2026-11-27 17:29:37 -08:00
illuminatedfellow c12c4959a5 Tidy-ups: replay event, timeline after end, VICTORY_WATCH, validator status
- Replay: a Worker closes its fence event when dropped (one leaked per
  256 MiB upload batch in diagnostics builds).
- Timeline: put_of and stack write nothing once recording has ended, so
  events that straddle end() no longer land in the next recording.
- VICTORY_WATCH: rva + 4 is checked, as VICTORY_CRASH_SAVE's ranges are
  (a huge RVA in the list wrapped instead of being dropped).
- Validator: a failed GetStatus is an error, not a pass, and an error blob
  with a null pointer reads as empty instead of building a slice from null.

Port of avatarmanz/VIctory-7900XTX#319 (its issue #227).

(cherry picked from commit 8db88ce6fe40cdd03bc9f9b66fb5d31c92bd246d)
2026-11-27 17:29:35 -08:00
ZBZD-p 5732b3df3c translate: skip known non-shader asset packs in precompile
(cherry picked from commit 8e3a1f4cf99f06cb3425eb82c42026458cbcfed5)
2026-11-27 17:29:35 -08:00
fromrivertothesea 761de52baf preload: --jobs / VICTORY_PRELOAD_JOBS to leave the rest of the PC free
The preload passed no thread count to any of its three steps, so it took
every core to translate and two thirds of them to make pipelines, with no
way to play or work beside it. `victory preload --jobs N` (or the switch
VICTORY_PRELOAD_JOBS=N, which the launcher's -More and the F1 menu's
restart carry) now gives each step N threads or processes.

Co-Authored-By: Claude Opus 5.5 <[email protected]>
Claude-Session: https://claude.ai/code/session_01FsQtBz4aDhUTip3jBagKEX
(cherry picked from commit 3692a28bd7e561abd133495873543150f389aad8)
2026-11-27 17:29:35 -08:00
flav 261078d78c Fix native D3D12 runtime version assertion on Windows 10
(cherry picked from commit 45c4ded79a9e2892d9669617bb028523fb78d6a5)
2026-11-27 17:29:34 -08:00
Yorivel 5ed66db74f victory warm: pipelines left out or refused are not written down as done
A pipeline that gets no host pipeline in the warm's child (left out by the
run's switches, like the ~1,000 CS_RaytracingResolve without
VICTORY_BVH_BUILDER=1, or refused) was still written to warm-done.txt. A
later warm with the structure builder on then skipped them for good, and
every ray-traced run compiled them in play: ~670 pipelines "being made" in
the first minutes, and NVIDIA's background compile kept frames waiting for
seconds (RTX 4090: frames of 3-10 s while the D3D background threads
compiled). Only those with a host pipeline are done now; the others are
asked again by the next warm (refusals cost no compile).

Co-Authored-By: Claude Opus 5.5 <[email protected]>
(cherry picked from commit 4f2be389a4da33ae7d5e384389c7b428a2a75db6)
2026-11-27 17:29:34 -08:00
c1cbdc9d11 Save sharing in the F1 menu, restarts keep their options, DLSS fixes, monitor's card
- F1 EXPORT SAVE writes the save as one zip into the game folder's Saves
  folder; IMPORT SAVE lists the zips there to pick from. An import is put
  in place at the next start, and the save there before is zipped first
  ("backup before import ..."). Zips made by hand are taken too: with a
  folder around the save, or starting inside the saves folder. The game's
  own settings (SettingsProfileSettings) are never exported or imported:
  the player keeps theirs.
- A restart from the F1 menu keeps the options the game was started with
  (#197).
- DLSS picked in the F1 menu fetches NVIDIA's files at the next start,
  even after an earlier "no", and the menu says so (#514).
- When the driver refuses nearly every DLSS upscaling, DLSS and frame
  generation are turned off for the run.
- FSR 3 frame generation is made ready only with DLSS upscaling on: the
  title's own FidelityFX check stopped the game otherwise (#331, #459).
- RTX Ada, Blackwell and RTX PRO workstation cards count as cards with
  DLSS frame generation.
- On a PC with two cards the game plays on the card the monitor is on, and
  the preload's pipelines are kept per card.
- The warm-up restart comes after 10 seconds.

Co-Authored-By: Claude Opus 5.5 <[email protected]>
Co-authored-by: DueTonight <[email protected]>
Co-authored-by: mikan123pro <[email protected]>
2026-11-27 16:58:02 -08:00
trustno1-coderandClaude Opus 5.5 64d4931b3d Water light on, PS4 pads, F1 menu saves at once, long-session memory, memory switches
Rendering and memory (GPL-3.0 code ported in; credits in the source):
- Water: 64-lane compute programs on 32-lane waves keep each wave
  together through loops and set up shared memory from the first
  thread, so the water's tiled light no longer leaves dark blocks. It
  runs by default now (VICTORY_WATER_LIGHT=0 leaves it out; an empty
  value, an earlier version's saved OFF, runs it). Also cloud tiles and
  the screen probes' ray activation.
- Placed views: their padding cleared as before; folding a buffer
  view's first element into its address is VICTORY_PLACED_FOLD=1, off:
  with it on, clothing and caps swapped to other variants for single
  frames in the boat cutscene.
- Texture sweep: textures whose copy was let go leave the looks until
  used again. Static samplers made first, in one order. Small buffers
  made ahead of the first 3D frame.
- play mode: VICTORY_TEXSPK_PASS_MS=8, VICTORY_PASSES_HOT=1,
  VICTORY_HELPER_PRIORITY=1.
- Memory switches, all off: VICTORY_SLOT_EVICT, VICTORY_ALLOCATOR_TRIM,
  VICTORY_BUDGET_PACK (and VICTORY_LIST_POOL_IDLE_S).

Input: DualShock 4 (0x05C4, 0x09CC, 0x0BA0 adapter) read over HID, USB
and Bluetooth, beside the DualSense; PlayStation pads rumble, and stop
when the game ends (issue #352).

F1 menu: every change is saved at once; it saves to
victory-settings.txt in VICTORY_HOME or %LOCALAPPDATA%\victory however
the game was started (no more "NO SETTINGS FILE").

Warm-up start: its 30 s count from the first frame of 100 draws or
more, not from the start: waiting at the title screen restarted it too
early and the next run still sat at 14 fps.

Co-Authored-By: Claude Opus 5.5 <[email protected]>
2026-11-27 15:03:27 -08:00
trustno1-coderandClaude Opus 5.5 df2daafeb1 Launch fixes: VILauncher Agility hash, FSR 3 frame gen needs DLSS, Windows 10 runtime; ask for logs
get-d3d12.ps1 listed the nupkg's SHA-256 before D3D12Core.dll's. VILauncher
takes the first hash after a line naming D3D12Core.dll as the DLL's, so
"Fix and verify" looked for a DLL with the package's hash and refused every
Agility package. The DLL's hash now comes first.

FSR 3 frame generation with DLSS upscaling off leaves the title on its own
FidelityFX upscaler and it breaks at victory-image+0x2219650 5-11 s in, on
either console (issues #272, #308, #331). FSR 3 frame generation now needs
DLSS upscaling; the F1 notice says so and why it is off.

With v2026.11.27.6 Windows 10 got a device, but its own Direct3D 12 refuses
the root signatures the translated shaders need (descriptor heaps indexed
directly), and the title closed a second after its first frame (issue
#290: Windows 10 21H2 LTSC, RTX 4060, shader model 6.8 from System32's
runtime). check_shader_model offered the Agility SDK only below 6.6. On
Windows 10 (build below 22000, from RtlGetVersion; VICTORY_WINDOWS_BUILD
stands in for it) without a D3D12 folder, it is now offered whatever the
shader model; declined or failed, the game still starts, with a warning.

needs-logs.yml asks for the play log and crash log on a new issue that has
no attached file and no pasted log lines.

Co-Authored-By: Claude Opus 5.5 <[email protected]>
2026-11-27 13:31:15 -08:00
trustno1-coderandClaude Opus 5.5 0f0ada1909 Load d3d12.dll on first use so the D3D12SDKVersion set in main is the one Windows reads
Windows reads victory.exe's D3D12SDKVersion export when d3d12.dll is loaded.
As a static import, it was loaded before main, so match_d3d12_core's value
never took effect and v2026.11.27.4 and .5 always asked for 614 (0x887E0003
on Windows 10 and Windows 11 22H2/23H2 without a D3D12 folder, issue #271,
and with a 1.618/1.620 folder). A copy of .5 whose export starts at 9999
fails the shader-model check here even though main sets 4 first; with
/DELAYLOAD:d3d12.dll it passes.

Without a folder, ask for Windows' own runtime's version (the D3D12SDKVersion
System32's D3D12Core.dll exports, at most 614) instead of 4: once 4 was
really read, Windows turned off later features and muted runs held 14 fps
with a white window.

Co-Authored-By: Claude Opus 5.5 <[email protected]>
2026-11-27 12:53:32 -08:00
trustno1-coderandClaude Opus 5.5 f3534e6b09 Without a D3D12 folder, ask for Windows' own Direct3D 12 (0x887E0003 on Windows 10 and older Windows 11)
Since v2026.11.27.2 the exe asked for Agility SDK 614 everywhere. Where
Windows' own runtime is older (Windows 10, Windows 11 22H2 build 22623) and
no D3D12\D3D12Core.dll is beside the exe, Windows looked for 1.614 there and
refused Direct3D 12 (0x887E0003). The shader-model check that offers the
download failed the same way, so on Windows 10 the offer never appeared.

Now the version is the folder's file version, or 4 (Windows' own runtime)
without one. After `victory play` fetches the file, the same process reads it
again before Direct3D 12 is first loaded.

Co-Authored-By: Claude Opus 5.5 <[email protected]>
2026-11-27 12:21:55 -08:00
trustno1-coderandClaude Opus 5.5 e69e39c55b Crash fixes: upload room reserved at the start, D3D12 folder of any version, VICTORY_HOME
- upload.rs: 32 pieces of 64 MiB at the top of [4 GiB, 2^37) are reserved first
  thing in main, before the process's allocations can fill that window. On
  players' PCs it was full by the first ray-traced frame, the first upload
  failed and the title threw "D3D12 XDXR Error: Failed to allocate upload
  buffer". Past the pool: the window as before, a failed search not repeated
  for a second (with PR #88's per-frame limit in memory.rs), then the heap
  instead of null.
- main.rs: D3D12SDKVersion follows the version of D3D12\D3D12Core.dll beside
  the exe (a repack's 1.618 or 1.620 gave 0x887E0003 against our 614).
- VICTORY_HOME: one folder for settings, saves, caches, logs and downloads
  (a full C: drive, issue 135).
- README: both.

Co-Authored-By: Claude Opus 5.5 <[email protected]>
2026-11-27 12:07:42 -08:00
trustno1-coderandClaude Opus 5.5 0cef07e9d7 MFG Unlocker as an F1 option: downloaded and loaded at start when on
F1, MFG UNLOCKER (MOD, RTX 20/30), off by default. When it is on, the
launcher fetches MFG Unlocker v1.7.2 from its author's GitHub release
into %LOCALAPPDATA%\victory\mfg-unlocker. The zip and MFGUnlocker.dll
are both checked against the SHA-256 the author published
(scripts\get-mfg-unlocker.ps1). victory.exe then loads the DLL under
its own name before the device is made or Streamline is loaded, so
nothing is renamed or put beside the game.

- RTX 20 and 30 cards with DLSS on are asked once at the first start
  (default No), unless the choice was made or a mod DLL is already
  beside victory.exe.
- `victory get-mfg` fetches it by hand.
- The menu explains the item while it is picked.
- The log records the load.
- README updated.

The download and the mod itself are not tested here (RTX 50 only). The
load path was tested with a Windows DLL in its place: loaded before
Streamline, game ran normally.

Co-Authored-By: Claude Opus 5.5 <[email protected]>
2026-11-27 10:59:16 -08:00
trustno1-codeandClaude Opus 5.5 10862a6d87 Windows 10 runtime, F1 preload fix, AMD FSR download, warm-up restart, MFG Unlocker notice
- Windows 10: every pipeline was refused (E_INVALIDARG) and the game closed within seconds, because
  Windows 10's own Direct3D 12 stops at shader model 6.5 and the translated shaders are 6.6.
  victory.exe now exports D3D12SDKVersion = 614 and D3D12SDKPath = .\D3D12\. Where the GPU runs
  below 6.6, `play` offers Microsoft's D3D12Core.dll (Agility SDK 1.614.1, from nuget.org; pinned
  SHA-256 and Microsoft signature checked) into D3D12 beside the exe, then checks again and stops
  with a clear message if it still can't. `victory get-d3d12` does it by hand. The host logs its
  shader model and runtime file. Windows 11 keeps using its own newer runtime.
- F1 > PRELOAD SHADERS: the restart passed the script launcher's -Preload to victory.exe, which
  refused it, and the window closed at once. It now sets VICTORY_PRELOAD=1, which both launchers
  read, and a failed restart keeps its window open.
- AMD FSR 3 files: offered for download where FSR 3 would be used (`victory get-fsr`,
  Get-AMD-FSR.cmd, scripts\get-amd-fsr.ps1; pinned hashes, AMD signature).
- First start of a new victory.exe: it ran at a flat 14 fps for the whole session and normally from
  the second start on. The first start now plays 20 s with a notice, marks that exe under
  %LOCALAPPDATA%\victory\warmed and restarts by itself once (VICTORY_WARMUP_RESTART=0: not done).
- RTX 20/30 with DLSS frame generation running (MFG Unlocker as winmm.dll beside the exe): the
  start notice says it is unlocked by a mod, and the log names DLLs beside victory.exe.
- README: the above.

Co-Authored-By: Claude Opus 5.5 <[email protected]>
2026-11-27 10:43:30 -08:00
trustno1-coderandClaude Opus 5.5 29d8dbf7d9 AMD FSR 3 frame generation for cards without DLSS frame generation; start notice; F1 preload
- FSR 3 frame generation (AMD FidelityFX 2.x DLLs, never in the repository:
  VICTORY_FIDELITYFX_DIR or a fidelityfx folder beside victory.exe), 2x at most,
  with the HUD-less picture so the HUD is not doubled. Series X needs DLSS upscaling.
- F1 menu: FRAME GEN TYPE (auto, DLSS, FSR 3); PRELOAD SHADERS; unset rows read NOT SET;
  save and restart opens its own console window.
- A notice at the start (30 s on the picture, and in the console): the GPU, which
  frame generation runs, and why not (DLSS off, NVIDIA files missing, or the card).
- victory preload / --preload; warm keys its work to the program's path.
- Logs are named victory-nvidia-...; README: what each card supports, first.

Co-Authored-By: Claude Opus 5.5 <[email protected]>
2026-11-27 09:06:36 -08:00
trustno1-coder 1a94d3ad55 Merge pull request #26 from CuteBooty/feat/skip-bink
feat(hle): skip the title's Bink movies on request (VICTORY_SKIP_BINK, off by default)
2026-11-27 01:31:50 -08:00
Yusuf Al-Khawaldeh b1369afb40 fix(cli): hash only the embedded DXBC container
Validate and use the declared DXBC byte extent when scanning an embedded shader. Keep the borrowed slice and offset, and leave packed inputs unchanged.

Tested on Windows with the focused embedded-container regression and a synthetic CLI run.
2026-11-27 03:15:56 -05:00
CuteBootyandClaude Fable 5.2 e31f474068 feat(hle): skip the title's Bink movies on request (VICTORY_SKIP_BINK, off by default)
VICTORY_SKIP_BINK=1 skips the movies that play once (logos, the intro);
=all skips the looping ones too. Unset, nothing changes: no import is
rebound. The title's own Bink DLL still opens each movie; the exports a
player loop calls on an open movie (BinkWait, BinkDoFrame*, BinkNextFrame,
BinkGoto, BinkShouldSkip, BinkClose) are bound to wrappers that put a
skipped movie on its last frame, so the title's own end-of-movie check ends
it at once.

Wiring for this tree (run.rs): SkipMovies wraps WithTitleDlls at startup,
so the executable's and its DLLs' imports go through it, with the
FidelityFX Interpose on top (it only looks at its own DLL and is unchanged);
and it wraps the resolver LateDlls binds DLLs the title loads later with.

Original author: C-GDev (fxceless/victory-fork pull request 613, 75fe122c;
the idea is from XCL pull request #1053, the code was written anew for
VIctory's loader). Ported by hand from CuteBooty/victory-8gb.

Co-Authored-By: Claude Fable 5.2 <[email protected]>
2026-11-27 00:56:49 -07:00
trustno1-coderandClaude Fable 5.2 48ad7859fb victory play: the program alone, beside the title, is all there is to start
Started with no command (a double click) or as `victory play [exe]`, the
program finds game_scarlett_master.exe beside itself and starts it with the
settings scripts\play-foxhound.ps1 gives it, built in (apps/victory/src/play.rs):
the same switch table, what the F1 menu saved over it, DLSS and frame
generation made ready where NVIDIA's files are, the frame rate cap, and
`--set NAME=VALUE` for anything else. Nothing is written beside the program
or into the title's folder: the menu's settings file, a log for every start
(play-<utc>-<pid>.log, the newest ten kept) and NVIDIA's files are under
%LOCALAPPDATA%\victory, where the caches and saves already are.

NVIDIA's DLSS and frame generation files stay NVIDIA's and are not part of
the program: a first start without them asks once whether to fetch them from
NVIDIA's GitHub, and `victory get-dlss` does it later (the fetcher script,
embedded, with a new -To).

victory-core logging: VICTORY_LOG_FILE adds a plain-text log file.

README: the quick start is the release's exe (download, put beside the
title, double click); building it yourself is kept below.

Checked on an RTX 5070: no title beside it (a clear error), a file of that
name (found, Streamline loaded), get-dlss (66.6 MB in 38 s, files identical
to the SDK's), two muted runs of the title from a folder of the program's own
(25-28 fps in the opening rooms, right picture, nothing written beside it),
and a start from the title's folder by the user.

Co-Authored-By: Claude Fable 5.2 <[email protected]>
2026-11-26 21:28:35 -08:00
local 45f6250378 Frame rate switch: the timers' shortest step follows the rate too (+0x2241fd0)
Run fps-1 (our clock at 16.667 ms, the title left at 30): the menus ran at
16.7 ms until the title's own limiter came up at 30 s (then 33.3 ms), and
meanwhile five of its seven timers stepped 33.3 ms a frame: game time ran
at twice the wall clock. The timer update (+0x2226040) takes the real time
since the last frame but at least 1/rate (+0x6849844), and that rate comes
from +0x2241fd0, a third read of the same setting. It now returns the rate
asked for (1000 for no limit), the original bytes checked first.

Co-Authored-By: Claude Opus 5.5 <[email protected]>
(cherry picked from commit 08b88b8266c2d0294d483d29b15534872ebc7da9)
2026-11-27 01:08:53 +05:30
localandClaude Opus 5.5 bacb402091 Frame rate switch: VICTORY_FRAME_INTERVAL_MS (our clock) and the title's own 30 fps setting patched to match (off by default)
The title asks for 33,333 us (SetFrameIntervalX) because its graphics
settings hold a frame rate of 30 (settings +0x210): +0x1e0fb30 and
+0x22434a0 turn it into a frame time (+0x98f84ac), +0x247ab10 picks the
interval from it and the display's 60/120 Hz (a 120 Hz mode alone changes
nothing at 30), and +0x120530 is a QueryPerformanceCounter limiter of its
own at the same rate.

VICTORY_FRAME_INTERVAL_MS=<ms> (16.667, 8.333, 0 = no wait): frame.rs ticks
at that interval whatever the title sets; the loader makes the two loads of
the setting "mov eax, rate; nop" (rate = 1000/ms rounded, 0 = the title's
own "no limit"), with the original bytes checked. VICTORY_TITLE_FPS=<n>|off
overrides the rate or leaves the title alone. Diagnostics:
VICTORY_TIMER_LOG=1 logs the title's timers once a second and frame pacing
bands every 5 s.

Ported from Belobug/VIctory-Belobug-AMD 49cb83b (author: local); the descriptor-site module of renderer port 2 left out. Our VICTORY_FRAME_INTERVAL_US (our clock alone) still works; VICTORY_FRAME_INTERVAL_MS is read first.

Co-Authored-By: Claude Opus 5.5 <[email protected]>
2026-11-27 01:08:53 +05:30
readmet3xt-labandClaude Opus 5.5 24d6bbb876 VICTORY_FSR_PATH=1: the title's FidelityFX path with its own upscaling, for comparing with DLSS
The image is patched to the FidelityFX path at VICTORY_DLSS_MODE's scale
as for DLSS, without Streamline: on Series X what that path looks like
and costs by itself, so that a fault seen with DLSS can be put on the
path or on DLSS.

Co-Authored-By: Claude Opus 5.5 <[email protected]>
2026-11-26 20:25:34 +05:30
readmet3xt-labandClaude Opus 5.5 d11233aa22 The title's FidelityFX calls through ours, its FidelityFX path on Series X (from DexNom's fork)
With VICTORY_DLSS=1 or VICTORY_FRAMEGEN=1 and Streamline available, the
executable's imports of amd_fidelityfx_loader_xbox.dll (ffxCreateContext,
ffxDestroyContext, ffxQuery, ffxDispatch) are bound to ours, which call
the title's own DLL for everything and give an upscale dispatch to
victory_gpu::streamline: DLSS takes it (the title's is not called), or,
with frame generation alone, its inputs are noted and the title's runs.
The title's upscaler context stays its own, so its upscaling runs again
on any frame DLSS does not take; each reason is logged once.

Series X never uses that path by itself: no Series X run (stock or
1440p) loaded amd_fidelityfx_upscaler_xbox.dll, every Series S run did.
The renderer selection (title+0x7e9421) takes the FidelityFX path,
renderer 7, only on a Series S (title+0x75140 tests the device type for
6); Series X takes renderer 6, the title's own temporal pass. The title
sizes the FidelityFX path's scene itself (title+0x28ef69a: its scale
times the output size), not through ffxQuery. So with DLSS or frame
generation available, native_1440p::prepare_upscaler patches renderer 7
in and the scaled branch to VICTORY_DLSS_MODE's scale (dlaa 1, quality
2/3, balanced 0.58, performance 1/2, ultraperformance 1/3; noted as the
FidelityFX quality mode), and the temporal scene scale to the same, with
the 1440p output kept (images/native-1440p-upscaler-<mode>-sdr) or on
its own (images/upscaler-<mode>). Each instruction is checked against
the stock bytes first; the test does so with the retail executable.
Without Streamline the image is patched as before.

`victory upscaler-check [--device] [--present]` checks Streamline, DLSS
and frame generation on this PC without the title.

The FidelityFX description layouts and the image patch of the FidelityFX
path are ported from DexNom/VIctory (crates/victory-hle/src/modules/
fidelityfx.rs, apps/victory/src/native_1440p.rs prepare_fsr_4k,
GPL-3.0-or-later); here the title's DLL keeps serving the API and the
1440p output stays.

Co-Authored-By: Claude Opus 5.5 <[email protected]>
2026-11-26 20:22:58 +05:30
readmet3xt-labandClaude Opus 5.5 9a791323ba 1440p output for the Series X retail image (from DexNom's fork)
VICTORY_NATIVE_1440P=1 (scene 2560x1440) or VICTORY_RENDER_1080P=1
(scene 1920x1080 scaled up by the title) patch the retail image's SDR
display mode, scanout reservation, temporal scene scale and Settings
viewport load before it is mapped, each checked against the stock
bytes; the patched image is cached apart from the stock one. The
frontend's legacy 4K projection gets its viewport on the 1440p target.
Ported from DexNom/VIctory (GPL-3.0-or-later), native 1440p part only.

Series X on an RTX 4070 SUPER, the opening's cutscene: median frame
77 -> 67 ms, 95th percentile 506 -> 401 ms (bench x-nowait vs
x1440-vol, with the volumetric light also on).

Co-Authored-By: Claude Opus 5.5 <[email protected]>
2026-11-26 15:46:08 +05:30
localandClaude Opus 5.5 af3c946271 Merge local/next into day/shaders; pipeline workers are all woken
Queue: passes over the screen first (local/next), then what draws asked
for, the early ones, and those known to take long by a quarter of the
workers. start() woke one worker, which could be one of the two that take
passes over the screen alone: the pipeline then waited for the next push.
All are woken now. victory warm goes through the pipelines no run drew with
in no order, 40 a process. victory translate: VICTORY_HOST_RDNA=1.

Co-Authored-By: Claude Opus 5.5 <[email protected]>
2026-11-25 15:32:48 -06:00
localandClaude Opus 5.5 bd7be01b3b Pipelines known to take long are made beside the others, by a quarter of the workers (VICTORY_PIPELINE_SLOW=0: in the order created)
Run shaders-1, the first with a changed translator (fresh shader and
pipeline caches): 3,020 pipelines started at creation, all 16 workers in
programs of seconds to tens of seconds each while the title loaded (97 made in 20 s),
then the quick ones at 100-190 a second, too late: 0.5-1.6 s a frame and up
to 2,900 draws a frame dropped from 60 to 150 s. A pipeline that took a
second is now noted (slow-pipelines.txt; `victory warm` notes them too) and
waits in a list of its own.

Co-Authored-By: Claude Opus 5.5 <[email protected]>
2026-11-25 14:35:11 -06:00
localandClaude Opus 5.5 2f22f6e2c2 The title's pipelines written down (VICTORY_PIPELINE_BOOK=1, off) and made ahead of a run, each batch in a process of its own (victory warm)
Every pipeline the title creates goes to known-pipelines.bin beside the
pipeline library, its containers to known-shaders.bin (in the cache folder;
they are the title's code). `victory warm` makes their host pipelines in
idle-priority processes of 200 each and lets them go: the driver's cache on
disk keeps them. Those earlier runs drew with come first; what is done is
noted by translator and driver (warm-done.txt); a pipeline that ends or
hangs its process is named in warm-bad.txt and skipped. VICTORY_EARLY_ALL
does this in the running title and ended it inside the driver.

Not measured yet: how long, and how much the driver's cache grows.

Co-Authored-By: Claude Opus 5.5 <[email protected]>
2026-11-25 13:32:18 -06:00
local 8c69173bf0 Merge day/shaders 2026-11-25 13:29:56 -06:00
localandClaude Opus 5.5 ebdefa6f99 The image's name is kept for VICTORY_WRITE_SITES (the program did not build)
Co-Authored-By: Claude Opus 5.5 <[email protected]>
2026-11-25 13:21:00 -06:00
localandClaude Opus 5.5 2ad419b24d Writes of the title's that change nothing are not made: faulting stores and copies beside the guards, and flags it sets that are set (VICTORY_WRITE_SITES=<file>: places changed at load to look first; off without it)
A store that faults, or a part of a copy into a guarded block, whose bytes
are there already is left out (with VICTORY_STORE_BESIDE, VICTORY_COPY_BESIDE).
The places in the title's code where that is the rule and the instruction is
an `or` of a byte with a constant are written into the file, and made to look
before they write at the next start. The file holds offsets, no code.

Co-Authored-By: Claude Opus 5.5 <[email protected]>
2026-11-25 13:10:05 -06:00
localandClaude Opus 5.5 4b3141fac5 Frame replay: shaders of another translation (--retranslate, --shaders, --shaders-b turn by turn), times per pass as medians
--shaders after local/models 098ec1d4. The capture's 1,266 containers are
collected from the title's files once (beside the capture) and translated by
this build in 15 s; a pipeline that is refused with them keeps the recorded
ones.

Co-Authored-By: Claude Opus 5.5 <[email protected]>
2026-11-25 12:49:12 -06:00
localandClaude Opus 5.5 3b3aabc896 Merge branch 'local/next' into night/card
Co-Authored-By: Claude Opus 5.5 <[email protected]>
2026-11-25 04:47:24 -06:00
localandClaude Opus 5.5 86694b5ad2 VICTORY_CARD_AWAKE: the card's clocks kept up between submissions
A captured frame whose lists take 28.6 ms sent in one go takes 37.8 ms with
1.2 ms between its submissions, as the game sends them; with one group of
threads counting on a compute queue it takes 28.6 ms again, and nothing
changes when sent in one go (36.1 against 36.3 ms with its copies).
=turns: 20 s on, 20 s off, to compare in one run. Replay: --awake,
--no-restore makes no copies to restore from.

Co-Authored-By: Claude Opus 5.5 <[email protected]>
2026-11-25 04:00:22 -06:00
localandClaude Opus 5.5 26b15e8fe3 Card memory the CPU maps: windows, sends and scratch (VICTORY_WINDOWS_BAR_MB, VICTORY_SEND_BAR, VICTORY_SCRATCH_BAR); the card's own stamps (VICTORY_CARD_SPANS)
GPU_UPLOAD heaps, all off by default. Replayed yard frame (capture
play-1125-0127): 36.3 ms; windows in the card's memory 31.9, sends 32.7.
Replay: --pace, --breadcrumbs, copies counted by the memory they cross.
VICTORY_GPU_LOAD_MS: what the title's GPU timestamps show.

Co-Authored-By: Claude Opus 5.5 <[email protected]>
2026-11-25 03:35:03 -06:00
localandClaude Opus 5.5 baf947a380 Diagnostics: a sampling profiler (VICTORY_PROFILE=<from>,<to>,<ms>,<file>[;...])
Samples the 28 busiest threads, whole stacks, with what the frame is at.

Co-Authored-By: Claude Opus 5.5 <[email protected]>
2026-11-25 02:58:07 -06:00
Marvis 9849814165 Diagnostics: VICTORY_POKE writes title bytes twice a second
A title that ends itself when its main loop has not ticked for a while
runs on through slower frames.

Co-Authored-By: Claude Fable 5.2 <[email protected]>
(cherry picked from commit 532cb7cdfee02e6139a683f79ee4c9b4a92828a4)
2026-11-25 01:03:03 -06:00
AgneyaK 603a3eaf8f run: stop with a clear message when the title's own DLLs are missing
A package copied without the DLLs that ship beside the executable leaves
every import from them unbound, and the title stops at its first call into
one: Grand Theft Auto VI 1.0.2.1 at +0x2237178 during System Init (#930,
#1553, #8), with nothing saying why.

After mapping the title DLLs, name the main image's static imports that
must come from the title's folder (neither the host nor our runtime serves
them) but were not mapped from it. Print them; when executing with the
default trap policy, stop before running title code. With
`--unimplemented zero` the title still runs (stubs were asked for).

Co-Authored-By: Claude Opus 5.5 <[email protected]>
(cherry picked from commit e9cb14ad3ea2f7a3ec051d9f9691684d7e9037ae)
2026-11-25 01:03:03 -06:00
DoubleD17 8777df612c Deduplicate image paths in victory census
(cherry picked from commit 142ec8dd4563608b67ffabc8ba47175508f9a660)
2026-11-25 01:03:01 -06:00
David Palacios 36212045ae CLI: add AVX2 pre-flight CPU check before executing titles
(cherry picked from commit 534e1dd74c57448bef4c525e204acc123387d6f2)
2026-11-25 01:03:00 -06:00
Aws 2a23c5be20 List successfully emitted shaders in offline translation scans
(cherry picked from commit 6d174aeeeb93669ab9f43ff01b24963933433af8)
2026-11-25 01:03:00 -06:00
Thomas Askharoun c5692adf0a Show on-disk file size in victory inspect
(cherry picked from commit 43e2ca9de29f5833941970e82ed89872c9f86a81)
2026-11-25 01:02:59 -06:00
LF2000 Builder 20602d4b13 translate: refuse a VICTORY_EMIT_DUMP directory inside the repo
translate writes emitted DXIL and validator reports to the
VICTORY_EMIT_DUMP directory. Both are derived from the game's shaders,
but the directory was never checked against the source tree. With
VICTORY_EMIT_DUMP=. run from the checkout, the .txt reports land in the
repo, and git and cargo xtask policy both let them through.

Check the directory once at the start of translate::run, as Config
already does for the cache and data directories.

Co-Authored-By: Claude Opus 5.5 <[email protected]>
(cherry picked from commit 988fd9a64718ee9a235cff3b60192b6b86006c4d)
2026-11-25 01:02:59 -06:00
nathanbzrr 9f36aa67ce Census: deduplicate PE imports without hint
(cherry picked from commit a3f89eda547690efa8542b8b993b9de894f05bb1)
2026-11-25 01:02:58 -06:00
FIocker 6ecd412795 Shader info: show stage I/O even when instruction decoding fails
Co-authored-by: Claude Opus 5.5 <[email protected]>
(cherry picked from commit e6ebec9ccf0bc27cfe0b5509ec3d07a0969eb25f)
2026-11-25 01:02:58 -06:00