docs(native-host): who answers "not written" at 0x1330a44, and the folder's download state #633

Open
AnastasisKon wants to merge 277 commits from upstream-pr/633 into main
AnastasisKon commented 2026-11-28 17:47:06 +00:00 (Migrated from github.com)

Imported from LakshanSivakumar/Native-Victory-macOS. Originally posted by AnastasisKon on 2026-11-28T17:47:06Z.


Closes #632.

What

Two additions to the image+0x1330a44 section of docs/native-host.md, both measured today on this Mac (M3 Pro, 36 GB) with /Volumes/Anastasis' SSD/GTA6.Xbox.v1.0.2.1-CYBERLEEK.

  1. Who answers "not written". The destination is not per-run state. 0x1331110 is xor eax,eax; cmp cl,3; lea image+0x6dd5b08; cmove rax,rdx; ret and 0x13310f0 is kind == 3, so for the record's kind byte 3 the gather-write asks the singleton at image+0x6dd5b08 (in .data) to take the chunk. Its vtable is image+0x66fdd40, in .rdata — a dump taken with the .data file offset is misaligned by 0x200 and shows code-looking slots that are not its methods; with the right offset the slots are +0x28 = image+0x1331660, +0x30 = image+0x1331210, +0x38 = image+0x1331100, +0x50 = image+0xc11a50. +0x30 reads the descriptor 0x1330cd0 has just written (+0x00 data, +0x08 size, +0x18 source, +0x20 remaining) and takes its early path at 0x13312d9 when the size or the remaining count is zero. So the answer comes from a statically constructed object against the descriptor's own counts, not from the lookup and not from a host call.

  2. The folder's download state. From the torrent's resume file rather than the file sizes (pieces is one byte per piece against info.piece length and info.files): 8,829 of 13,345 pieces, 148.1 GB of 223.9 GB. shaders.rpf holds pieces 0, 12 and 24 of 25 — header, one middle piece, last piece — and everything between them reads as zeros, while the file is preallocated to its full 411,695,600 bytes, so its size, header and last piece all look valid. packs.rpf, levels.rpf, story000.rpf, core_bvh4.rpf, navmeshes.rpf and core_restofworld.rpf are partial too. That is a second, independent way to arrive at "a shader database that references a state the loaded data does not have", and it means no run on this folder can settle what the write needs until the download finishes.

What this does not claim

That the missing shader pieces are the cause of the missing state, and nothing here changes behaviour: docs only, no code.

Testing

  • nice -n 10 sh tools/macos/verify.sh full — == gate PASSED == (suite-hle 554, suite-shader 593, suite-gpu 493, policy, clippy-win), on x86_64-pc-windows-gnullvm.
  • The addresses in the text were re-read from the image with the section map (.text raw 0x400/VA 0x1000, .rdata raw 0x5f3fe00/VA 0x5f41000, .data raw 0x67e0c00/VA 0x67e2000) and each function begin checked against .pdata.
  • The download numbers were checked twice: sizes are stable over 6 s, and the piece map agrees with the on-disk du (142 GB allocated of 223.9 GB in the torrent).
<!-- greyfinch-sync:LakshanSivakumar/Native-Victory-macOS:issue:5542969678 --> Imported from [LakshanSivakumar/Native-Victory-macOS](https://github.com/LakshanSivakumar/Native-Victory-macOS/pull/633). Originally posted by [AnastasisKon](https://github.com/AnastasisKon) on 2026-11-28T17:47:06Z. --- Closes #632. ## What Two additions to the `image+0x1330a44` section of `docs/native-host.md`, both measured today on this Mac (M3 Pro, 36 GB) with `/Volumes/Anastasis' SSD/GTA6.Xbox.v1.0.2.1-CYBERLEEK`. 1. **Who answers "not written".** The destination is not per-run state. `0x1331110` is `xor eax,eax; cmp cl,3; lea image+0x6dd5b08; cmove rax,rdx; ret` and `0x13310f0` is `kind == 3`, so for the record's kind byte 3 the gather-write asks the *singleton* at `image+0x6dd5b08` (in `.data`) to take the chunk. Its vtable is `image+0x66fdd40`, in `.rdata` — a dump taken with the `.data` file offset is misaligned by `0x200` and shows code-looking slots that are not its methods; with the right offset the slots are `+0x28` = `image+0x1331660`, `+0x30` = `image+0x1331210`, `+0x38` = `image+0x1331100`, `+0x50` = `image+0xc11a50`. `+0x30` reads the descriptor `0x1330cd0` has just written (`+0x00` data, `+0x08` size, `+0x18` source, `+0x20` remaining) and takes its early path at `0x13312d9` when the size or the remaining count is zero. So the answer comes from a statically constructed object against the descriptor's own counts, not from the lookup and not from a host call. 2. **The folder's download state.** From the torrent's resume file rather than the file sizes (`pieces` is one byte per piece against `info.piece length` and `info.files`): 8,829 of 13,345 pieces, 148.1 GB of 223.9 GB. `shaders.rpf` holds pieces 0, 12 and 24 of 25 — header, one middle piece, last piece — and everything between them reads as zeros, while the file is preallocated to its full 411,695,600 bytes, so its size, header and last piece all look valid. `packs.rpf`, `levels.rpf`, `story000.rpf`, `core_bvh4.rpf`, `navmeshes.rpf` and `core_restofworld.rpf` are partial too. That is a second, independent way to arrive at "a shader database that references a state the loaded data does not have", and it means no run on this folder can settle what the write needs until the download finishes. ## What this does not claim That the missing shader pieces are *the* cause of the missing state, and nothing here changes behaviour: docs only, no code. ## Testing - [x] `nice -n 10 sh tools/macos/verify.sh full` — `== gate PASSED ==` (suite-hle 554, suite-shader 593, suite-gpu 493, policy, clippy-win), on `x86_64-pc-windows-gnullvm`. - [x] The addresses in the text were re-read from the image with the section map (`.text` raw `0x400`/VA `0x1000`, `.rdata` raw `0x5f3fe00`/VA `0x5f41000`, `.data` raw `0x67e0c00`/VA `0x67e2000`) and each function begin checked against `.pdata`. - [x] The download numbers were checked twice: sizes are stable over 6 s, and the piece map agrees with the on-disk `du` (142 GB allocated of 223.9 GB in the torrent).
This pull request cannot be merged automatically due to conflicts.
Merge manually to resolve the conflicts.
View command line instructions

Checkout

From your project repository, check out a new branch and test the changes.
git fetch -u origin 'upstream-pr/633:upstream-pr/633'
git switch 'upstream-pr/633'

Merge

Merge the changes and update on Forgejo.

Warning: The "Autodetect manual merge" setting is not enabled for this repository, you will have to mark this pull request as manually merged afterwards.

git switch 'main'
git merge --no-ff 'upstream-pr/633'
git switch 'upstream-pr/633'
git rebase 'main'
git switch 'main'
git merge --ff-only 'upstream-pr/633'
git switch 'upstream-pr/633'
git rebase 'main'
git switch 'main'
git merge --no-ff 'upstream-pr/633'
git switch 'main'
git merge --squash 'upstream-pr/633'
git switch 'main'
git merge --ff-only 'upstream-pr/633'
git switch 'main'
git merge 'upstream-pr/633'
git push origin 'main'
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
LakshanSivakumar/Native-Victory-macOS!633
No description provided.