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

Merged
mstrmoos merged 1 commit from upstream-pr/1155 into main 2026-11-29 08:16:57 +00:00
mstrmoos commented 2026-11-28 14:29:11 +00:00 (Migrated from github.com)

Imported from trustno1-coder/VIctory-NVIDIA. Originally posted by mstrmoos on 2026-11-28T14:29:11Z.


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.
<!-- greyfinch-sync:trustno1-coder/VIctory-NVIDIA:issue:5541151521 --> Imported from [trustno1-coder/VIctory-NVIDIA](https://github.com/trustno1-coder/VIctory-NVIDIA/pull/1155). Originally posted by [mstrmoos](https://github.com/mstrmoos) on 2026-11-28T14:29:11Z. --- 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.
Sign in to join this conversation.
No reviewers
No labels
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.

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