From 32a24574be1d73df76fa730803b3812d435f62d0 Mon Sep 17 00:00:00 2001 From: ReaperOfVeriod Date: Mon, 12 Oct 2026 02:50:24 +0200 Subject: [PATCH] Identify data.bin as the level file descriptor, not geometry data.bin is the largest per-level file -- 13.3 MB on level 0, 4.2 to 21.9 MB across the disc -- and had been characterised only as "4-byte structured". Range measured: the first 64 u32 of data.bin on levels 0, 1, 2 and 5, compared against the actual byte lengths of the other extracted level files. Method: read the first 64 u32 and look for any equal to the size of core_index.bin, gs_ram.bin, overlay.bin, gameplay.bin, sound_bank.bin or core_data.bin. Result: three exact matches, at the same indices on every level. u32 index 1 overlay.bin 2751268 2763668 2928424 2863676 u32 index 3 core_index.bin 31600 34016 33808 23536 u32 index 5 gs_ram.bin 518656 569344 513024 434176 Each is the exact byte length of the named file and each lands on the same index on all four levels. Three coincidences at fixed positions is not a coincidence. So data.bin is a descriptor for the level's other files, not geometry in its own right. The roadmap's "the large one: 4.2 to 21.9 MB of geometry per level" entry was wrong and is corrected. The intervening indices 0, 2 and 4 hold values that are not file sizes and their meaning is not established; they are plausibly offsets, but no cumulative-sum or offset+size relation has been checked yet. What follows the descriptor is still unknown, and the file is large enough that the descriptor is unlikely to be all of it. --- docs/plan/level-assets.md | 36 ++++++++++++++++++++++++++++++++++++ docs/roadmap.md | 5 ++++- 2 files changed, 40 insertions(+), 1 deletion(-) diff --git a/docs/plan/level-assets.md b/docs/plan/level-assets.md index cd1f69c..826e5d6 100644 --- a/docs/plan/level-assets.md +++ b/docs/plan/level-assets.md @@ -1369,3 +1369,39 @@ and overstates the case for the other five. `+13868` with deltas 204, 204, 200, 196 -- but the irregular deltas fit neither a flat table nor a simple stride, and level 1's apparent run is a byte-shift false positive. Nothing about the payload is asserted. + +## data.bin is the level's file descriptor + +`data.bin` is the largest per-level file -- 13.3 MB on level 0, 4.2 to 21.9 MB +across the disc -- and had been characterised only as "4-byte structured". + +**Range measured:** the first 64 `u32` of `data.bin` on levels 0, 1, 2 and 5, +compared against the actual byte lengths of the other extracted level files. + +**Method:** read the first 64 `u32`, and look for any that equals the size of +`core_index.bin`, `gs_ram.bin`, `overlay.bin`, `gameplay.bin`, `sound_bank.bin` +or `core_data.bin`. + +**Result: three exact matches, at the same indices on every level.** + +| u32 index | field | level 0 | level 1 | level 2 | level 5 | +|---|---|---|---|---|---| +| 1 | `overlay.bin` size | 2,751,268 | 2,763,668 | 2,928,424 | 2,863,676 | +| 3 | `core_index.bin` size | 31,600 | 34,016 | 33,808 | 23,536 | +| 5 | `gs_ram.bin` size | 518,656 | 569,344 | 513,024 | 434,176 | + +Each is the *exact* byte length of the named file, and each lands on the same +index on all four levels. Three coincidences at fixed positions is not a +coincidence. + +**So `data.bin` is a descriptor for the level's other files**, not geometry in +its own right -- which is what the roadmap's "the large one: 4.2 to 21.9 MB of +geometry per level" entry assumed. The intervening indices (0, 2, 4) hold +values that are not file sizes, and their meaning is not established; they are +plausibly offsets, but no cumulative-sum or offset+size relation has been +checked yet. + +**This retires a wrong roadmap entry and opens a question.** `data.bin` should +not be listed as unparsed geometry. What it contains *after* the descriptor is +still unknown, and the file is large enough that the descriptor is unlikely to +be all of it. diff --git a/docs/roadmap.md b/docs/roadmap.md index 71d7ef6..32fcc03 100644 --- a/docs/roadmap.md +++ b/docs/roadmap.md @@ -217,7 +217,10 @@ Phase 1 hands over the extents; this phase works out what each one contains. what it looked like. Corrected in `plan/level-assets.md`. - [ ] `occlusion` — 2 to 25 sectors, small enough to read whole. - [ ] `sound_bank` — `SBlk` and `DAW` signatures found in all 27. -- [ ] `data` — the large one: 4.2 to 21.9 MB of geometry per level. +- [x] `data` — **not geometry.** It is the level's file descriptor: its + first table carries the exact byte lengths of `overlay.bin`, + `core_index.bin` and `gs_ram.bin` at fixed `u32` indices 1, 3 and 5 on + every level checked. What follows the descriptor is still unknown. - [ ] `tfrag` — terrain: LOD chains, strips, morph targets - [ ] `tie` — instanced environment geometry, fat vertices