Words of the title's image held at given values (VICTORY_IMAGE_HOLD, off by default): a fixed world clock for A/B runs #1155

Manually merged
github merged 1 commit from github-bot/gh-1155 into main 2026-11-29 08:21:59 +00:00 AGit
Owner

@⁠mstrmoos on GitHub · 2026-11-28 14:29 UTC · original
mstrmoos:feat/image-hold → main · +75 −0 · 1 files · 1 commits · merged 2026-11-29 08:16 UTC

The game's world clock keeps running between launches. The same save can load by day or by night, and that alone moves frame times by 30-60%. On an RTX 5080 at Series S 720p to 1440p with frame generation 4X, the card was about 71% busy by day and 91-95% by night. As a result, runs from separate launches could not be compared unless the lighting happened to match.

This adds VICTORY_IMAGE_HOLD, the write-back twin of the existing VICTORY_IMAGE_WATCH. It names words of the title's image and the values to hold them at. A thread of its own writes them back ten times a second, the way a trainer does. It is off by default and does nothing unless set, in any build.

VICTORY_IMAGE_HOLD=hour=<offset>:4=12,minute=<offset>:4=0

Each word is given as a name, the offset in the image (hexadecimal), the bytes (1, 2, 4 or 8), then = and the value (decimal, or hexadecimal with 0x). Words that cannot be parsed are left out. A write that fails is logged once and does not stop the others.

No offsets are in the code. Each user supplies them from their own settings, like VICTORY_IMAGE_WATCH.

For the GTA VI Series build 1.0.2.1 (game_scarlett_master.exe): the clock is a block of u32 values in .data: day, month, year, hour, minute, second. The hour is at image offset ab5cdd0 and the minute at ab5cdd4:

VICTORY_IMAGE_HOLD=hour=ab5cdd0:4=12,minute=ab5cdd4:4=0

I found it by scanning the image's writable sections from outside the process for u32 values that stay within 0-59 and step forward by exactly one. I then confirmed it by writing 22:00 (the scene goes to night, 14.7 fps) and 12:00 (back to daylight). The clock carries on from whatever is written there, so holding the hour and minute keeps the light fixed. Other builds of the game will have a different offset.

Tested:

  • Unit tests for parsing and writing (cargo test -p victory-hle image_watch).
  • cargo xtask policy passes.
  • Clippy is clean for the file.
  • In game (diagnostics build, 5080 / 9800X3D): launched with the line above, the log shows the title's image: holding hour=12 minute=0 (VICTORY_IMAGE_HOLD). The clock read from outside stayed at 12:00 over the run while its seconds ran.
**@⁠mstrmoos** on GitHub · 2026-11-28 14:29 UTC · [original](https://github.com/trustno1-coder/VIctory-NVIDIA/pull/1155) `mstrmoos:feat/image-hold` → `main` · +75 −0 · 1 files · 1 commits · merged 2026-11-29 08:16 UTC The game's world clock keeps running between launches. The same save can load by day or by night, and that alone moves frame times by 30-60%. On an RTX 5080 at Series S 720p to 1440p with frame generation 4X, the card was about 71% busy by day and 91-95% by night. As a result, runs from separate launches could not be compared unless the lighting happened to match. This adds `VICTORY_IMAGE_HOLD`, the write-back twin of the existing `VICTORY_IMAGE_WATCH`. It names words of the title's image and the values to hold them at. A thread of its own writes them back ten times a second, the way a trainer does. It is off by default and does nothing unless set, in any build. ``` VICTORY_IMAGE_HOLD=hour=<offset>:4=12,minute=<offset>:4=0 ``` Each word is given as a name, the offset in the image (hexadecimal), the bytes (1, 2, 4 or 8), then `=` and the value (decimal, or hexadecimal with `0x`). Words that cannot be parsed are left out. A write that fails is logged once and does not stop the others. No offsets are in the code. Each user supplies them from their own settings, like `VICTORY_IMAGE_WATCH`. **For the GTA VI Series build 1.0.2.1 (`game_scarlett_master.exe`):** the clock is a block of u32 values in `.data`: day, month, year, hour, minute, second. The hour is at image offset `ab5cdd0` and the minute at `ab5cdd4`: ``` VICTORY_IMAGE_HOLD=hour=ab5cdd0:4=12,minute=ab5cdd4:4=0 ``` I found it by scanning the image's writable sections from outside the process for u32 values that stay within 0-59 and step forward by exactly one. I then confirmed it by writing 22:00 (the scene goes to night, 14.7 fps) and 12:00 (back to daylight). The clock carries on from whatever is written there, so holding the hour and minute keeps the light fixed. Other builds of the game will have a different offset. **Tested:** - Unit tests for parsing and writing (`cargo test -p victory-hle image_watch`). - `cargo xtask policy` passes. - Clippy is clean for the file. - In game (diagnostics build, 5080 / 9800X3D): launched with the line above, the log shows `the title's image: holding hour=12 minute=0 (VICTORY_IMAGE_HOLD)`. The clock read from outside stayed at 12:00 over the run while its seconds ran.
The write-back twin of VICTORY_IMAGE_WATCH, as a trainer does: a value the
title keeps moving, such as its world clock, held still ten times a second
so that launches compared against each other show the same scene (by day,
the card is ~71% busy; by night 91-95%, and frame times differ by 30-60%).
The offsets and values come from the user's settings; nothing of the
title's is in the layer.
github-bot locked as GitHub sync and limited conversation to collaborators 2026-11-28 14:44:02 +00:00
github manually merged commit be203aa39c into main 2026-11-29 08:21:59 +00:00
This discussion has been locked. Commenting is limited to contributors.
No reviewers
No milestone
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set

Reference
github/trustno1-coder--VIctory-NVIDIA!1155
No description provided.