[PR #163] [MERGED] kb: the .bundle entry offset is a u64 in two words, not a 0/1 flag (The Witcher 3) #173

Closed
opened 2026-10-15 20:54:00 +00:00 by bsakaguchi · 0 comments
Owner

📋 Pull Request Information

Original PR: https://github.com/rehan-remade/universal-modder/pull/163
Author: @Selene0623
Created: 10/8/2026
Status: ✅ Merged
Merged: 10/10/2026
Merged by: @rehan-remade

Base: main ← Head: kb/w3-u64-offset-correction


📝 Commits (3)

  • b9e0d60 fix(knowledge): the .bundle entry offset is a u64 in two words, not a 0/1 flag
  • cbc1fb1 kb: The Witcher 3 Remastered .bundle note: review fixes
  • 140a689 Merge remote-tracking branch 'origin/main' into land/pr-163

📊 Changes

1 file changed (+39 additions, -22 deletions)

View changed files

📝 knowledge/games/the-witcher-3/the-witcher-3-remastered-bundle-container-and-cr2w-decoded.md (+39 -22)

📄 Description

Follow-up to #133 (merged), whose reviewer asked for this check as item 3:

whether the 0/1 flag marks exactly the entries needing +2^32 (⇒ u64 high half; drop gotcha 3's "try +2^32")

Checked against all 31 shipped content/content0/bundles/*.bundle. The second u32 of each 304-byte entry is the high half of a u64 offset, not a flag:

check result
offset = w0 | (w1 << 32) monotonicity, buffers.bundle 0 violations over all 113,009 entries
same, movies.bundle 0 violations over all 1,236 entries
second word is 0/1 and marks the high half 0 disagreements in 8,359 resolved samples (dlc0 5,800 / buffers 2,545 / movies 14)
where the word is ever non-zero only the two bundles over 4 GiB: buffers 52,989/113,009, movies 624/1,236
CRC word zlib.crc32 of the decompressed payload (8/8 buffers, 5/5 ep1), not of the stored bytes

So this PR rewrites the entry field list and the offsets paragraph, drops the + 2^32 workaround from build step 4, gotcha 3 and gotcha 4, and records the evidence in Verification. The relative paths inside boot.log-style paths are untouched, and the rest of the merged review changes are left as they are.

Gate: um kb index · um kb check --index PASS 128 notes · uv run --with pytest pytest -q tests 76 passed, 1 skipped · um publish check . 437 files, 0 failures (2 pre-existing warnings).


🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.

## 📋 Pull Request Information **Original PR:** https://github.com/rehan-remade/universal-modder/pull/163 **Author:** [@Selene0623](https://github.com/Selene0623) **Created:** 10/8/2026 **Status:** ✅ Merged **Merged:** 10/10/2026 **Merged by:** [@rehan-remade](https://github.com/rehan-remade) **Base:** `main` ← **Head:** `kb/w3-u64-offset-correction` --- ### 📝 Commits (3) - [`b9e0d60`](https://github.com/rehan-remade/universal-modder/commit/b9e0d60be509dede36e37685b09185e415164c38) fix(knowledge): the .bundle entry offset is a u64 in two words, not a 0/1 flag - [`cbc1fb1`](https://github.com/rehan-remade/universal-modder/commit/cbc1fb14a3a5d211b7d81cb419c896075151e655) kb: The Witcher 3 Remastered .bundle note: review fixes - [`140a689`](https://github.com/rehan-remade/universal-modder/commit/140a689772c813a13c816c95fa1cd3cc34942ded) Merge remote-tracking branch 'origin/main' into land/pr-163 ### 📊 Changes **1 file changed** (+39 additions, -22 deletions) <details> <summary>View changed files</summary> 📝 `knowledge/games/the-witcher-3/the-witcher-3-remastered-bundle-container-and-cr2w-decoded.md` (+39 -22) </details> ### 📄 Description Follow-up to #133 (merged), whose reviewer asked for this check as item 3: > whether the 0/1 flag marks exactly the entries needing +2^32 (⇒ u64 high half; drop gotcha 3's "try +2^32") Checked against all 31 shipped `content/content0/bundles/*.bundle`. The second `u32` of each 304-byte entry is the **high half of a u64 offset**, not a flag: | check | result | |---|---| | `offset = w0 \| (w1 << 32)` monotonicity, `buffers.bundle` | 0 violations over all 113,009 entries | | same, `movies.bundle` | 0 violations over all 1,236 entries | | second word is 0/1 and marks the high half | 0 disagreements in 8,359 resolved samples (`dlc0` 5,800 / `buffers` 2,545 / `movies` 14) | | where the word is ever non-zero | only the two bundles over 4 GiB: `buffers` 52,989/113,009, `movies` 624/1,236 | | CRC word | `zlib.crc32` of the **decompressed** payload (8/8 `buffers`, 5/5 `ep1`), not of the stored bytes | So this PR rewrites the entry field list and the offsets paragraph, drops the `+ 2^32` workaround from build step 4, gotcha 3 and gotcha 4, and records the evidence in Verification. The relative paths inside `boot.log`-style paths are untouched, and the rest of the merged review changes are left as they are. Gate: `um kb index` · `um kb check --index` **PASS 128 notes** · `uv run --with pytest pytest -q tests` **76 passed, 1 skipped** · `um publish check .` **437 files, 0 failures** (2 pre-existing warnings). --- <sub>🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.</sub>
bsakaguchi 2026-10-15 20:54:00 +00:00
Sign in to join this conversation.
No labels
pull-request
No milestone
No project
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
rehan-remade/universal-modder#173
No description provided.