A book of the faults (VICTORY_FAULT_BOOK=<file>, diagnostics) says of the
dorm: 586 faults a frame on 900 blocks, 245 of them on a block that had
faulted in the same frame already, 220 within 3 ms of the refresh that made
the block read-only; 69 ms a frame of the title's threads, of which 6 with
the guards' lock and 63 waiting for it. What is held under it is mostly
VirtualProtect (5 us and more in the game's process, one at a time whoever
asks: a bench found 14 threads no faster than one).
- A block a write fault opened is left open by the refreshes of the next
3 ms and told as written at each.
- The other views of its page stay read-only, not clean.
- The sets of guarded, clean, absent and aliased blocks are bits, a range is
looked at by words; the lock is let go between the runs a refresh guards;
a fault that finds its block open takes no lock; the record of the title's
views is read by many threads at once; the kernel is not asked about memory
known to be a guarded view.
Run faults-2 (A/B of both switches, 20 phases of 10 s in the dorm): faults
601 -> 391 a frame, blocks made read-only 928 -> 407, the title's threads
27.5 -> 15.8 ms a frame in them (69 before), frame 64.8 -> 62.5 ms.
Co-Authored-By: Claude Opus 5.5 <[email protected]>
The title's 45,000 to 60,000 list calls a frame append their arguments to a
stream; threads of ours translate it, several lists at a time, and the line of
submissions goes on with a submission when its recordings are translated.
Co-Authored-By: Claude Opus 5.5 <[email protected]>
Diagnostics only. VICTORY_TIMELINE=<file> records three frames (or
VICTORY_TIMELINE_FRAMES) after VICTORY_TIMELINE_AT seconds and writes a
Chrome trace and a text summary: spans of our work, the waits and wake-ups
of the title's threads (its imports) and of ours (our import table), long
kernel calls on the address space, and when each submission ran on the card.
The summary walks back from each present through who waited on whom.
Nothing is wrapped without the variable.
Co-Authored-By: Claude Opus 5.5 <[email protected]>
(cherry picked from commit 008de5f9ffcef132079b1af8b7f4f1c22235cee9)
The idea is fxceless/victory-fork's, commit f85101b6. Here one line holds
what all queues were given, presents too, in the order of the calls.
Co-Authored-By: Claude Opus 5.5 <[email protected]>
Mapping and unmapping a view wait for what every protection change of a
view takes too (about 100,000 a second, the guards'): 0.2-4 ms a page, all
on the one thread the title loads with. Scatter maps and the GPU's
page-mapping copies go in groups of up to 64 pages, noted before and after
on the caller's thread, the system calls on up to eight
(VICTORY_MAP_THREADS=1: one after the other, as before).
Co-Authored-By: Claude Opus 5.5 <[email protected]>
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]>
World rendering, lighting, frame-rate and memory work for Grand Theft Auto VI
(Xbox Series X profile) on one Windows PC with an NVIDIA RTX 4070. The README
describes the state, the changes and the credits. Based on VIctory by Marvisak
and contributors (GPL-3.0-or-later); XCL by ivall and contributors was used as
a reference. No game files are included.
Co-Authored-By: Claude Fable 5.2 <[email protected]>
The title now boots through every first-boot and menu screen at its own
30 fps, drawing with translated shaders, with input, sound, saves and
loading served; it reaches the world, where the host GPU path still
fails (see "Not working yet").
Loader and runtime
- Crash reports unwind properly, name C++ throws and host GPU failures,
carry the title's last debug lines and are appended to crashes.log.
- Thread notices on our own threads, reentrant late DLL loading, exit in
the console's order, relaunch on a launch-new-game request.
- Offline guard: the title cannot reach the network (sockets, name
lookups, WinHTTP, the media source resolver); by-name lookups and
loads follow the import rules.
- Every runtime area the title calls is served (networking hint,
packages, store, saves, display, UI, speech stubs, user, async pool).
Saves persist; an update is one rename and survives a kill at any step.
- DirectStorage reads for real: shared worker pool, priorities, zlib and
BCPack. BCPack is our own decoder; the format's constant tables ship in
crates/victory-formats/src/bcpack-tables.bin (the asset policy's one
exception, see docs/asset-policy.md).
- GameInput from XInput pads and the keyboard, with a keyboard stand-in
pad; console timers (1 ms) for the whole process.
- Audio: XMA2 decoding on the emulated contexts, Opus on the decoder
queues, the DSP interface as a stub; title memory placed below 2^40.
- Console texture layouts (sizes, tiling, detiling) and the layout
library's imports.
GPU
- Draws, mesh dispatches and compute dispatches run on the host with
shaders translated at first use and cached on disk; descriptor heaps,
views, root signatures, barriers and host texture states; rectangle
lists; comparison samplers.
- Title memory reaches the host through persistent mirrors that copy
only pages written since the last copy; shader-written buffers are
copied back.
- Presentation with frame pacing per event kind; framerate in the window
caption.
Shaders
- DXIL emission for vertex, pixel, compute and mesh programs from the
console's native code, with a differential test suite against the PC
compile. World set: mesh 8,191 of 8,506, vertex/pixel 10,617 of
12,346, compute 1,643 of 2,539; utility set complete.
Build
- Debugging aids (debug logs, frame capture, stack dumps, scripted keys,
the host debug layer, the software adapter) exist only with the
`diagnostics` feature; `[profile.diag]` keeps that build apart.
Not working yet
- In the world the host device is removed within seconds (descriptor
handling fixes are in, unproven by a surviving run) and frames present
black.
- 64-bit image atomics, merged geometry stages and the BVH builder's own
shaders do not translate; reverb is silent.
Co-Authored-By: Claude Fable 5.2 <[email protected]>
Loader: map title-shipped DLLs, patch static TLS loads to slot 0, crash
reporter, title paths for GetModuleFileName*.
HLE: task queue and async, XUser (one offline user), system ids,
title id, features, invites, game events, persistent local storage,
GameInput with no devices, xmem, console audio hardware queues, life
cycle (close suspends, then terminates), and a file layer with virtual
drives rewritten in path-taking imports.
GPU: D3D12.X device, DXGI chain, heaps, resources, fences, queues and
command lists translated onto a host D3D12 device; clears, barriers,
copies, resolves and PresentX into the title's window.
Shaders: SGD5 reader and `victory translate`; SSA IR with node
splitting for irreducible flow; structurisation removing EXEC.
Co-Authored-By: Claude Opus 5.5 <[email protected]>