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