diff --git a/docs/re/INDEX.md b/docs/re/INDEX.md index 59e6fb0..f46c305 100644 --- a/docs/re/INDEX.md +++ b/docs/re/INDEX.md @@ -19,7 +19,7 @@ Promote to a prose `structures/…md` file when a format needs behavioural notes | LSTA sprite list | βœ… | `sylpheed-formats/src/lsta.rs` | A display list of inline elements: **T8aD sprites and `PRMD` primitives**. The `count` at `0x04` is **exact and counts both** β€” `count == T8aD + PRMD` for **64/64** lists on the disc, which retires the old "a few entries disagree" note (it compared sprites against a total including primitives). **All 1 281 sprite frames decode** after the T8aD rectangle-list fix | | IXUD subtitle | 🟑/βœ… | `sylpheed-formats/src/ixud.rs` + [movie link](movie-subtitle-link.md) | timed cues. **The movie↔subtitle↔voice link is solved β€” statically**, from the movie config record in `tables.pak` (schema `0x067025b9`), not from the running game as this row previously assumed: [101 movies mapped](captures/movie-subtitle-voice-map.csv), 94 with subtitles, 83 with voice, 21 with a telop overlay. 93 of 94 subtitle refs resolve in the language paks; **`SUBTITLE_S12B.tbl` is missing from all six languages** β€” a dangling reference on the disc. Naming is `SUBTITLE_.tbl` / `VOICE_` with six documented exceptions. The record's ~104 **script ids** are ❔ β€” positional pairing drifts by three because the IDXD pool dedupes repeated values | | Fonts (ttf/otf/ttc) | βœ… | `sylpheed-formats/src/font.rs` | standard OpenType, parsed via ttf-parser | -| XBG7 mesh | 🟑/❔ | `sylpheed-formats/src/mesh.rs` + `tests/mesh_disc.rs` ([xbg7](structures/xbg7-mesh.md)) | weapons/props: declaration-driven variable stride (36 models), GPU-confirmed. **Stage containers: 5662 sub-models across 22 stages** via content-anchored grouped pools (`stage_models`). Quantized hero bodies (DeltaSaber `f004`) still declined | +| XBG7 mesh | 🟑/❔ | `sylpheed-formats/src/mesh.rs` + `tests/mesh_disc.rs` ([xbg7](structures/xbg7-mesh.md)) | weapons/props: declaration-driven variable stride (36 models), GPU-confirmed. **Stage containers: 5662 sub-models across 22 stages** via content-anchored grouped pools (`stage_models`). **Declined set now measured**: 6 294 resources, **5 480 decode (87.1 %), 814 declined** in 31/166 containers β€” and it is *not* "a few quantized hero bodies" but 492 `e*`, 142 `f*`, 73 `n*`, 23 `eff*` plus `*_dead` variants. The descriptor does **not** declare decodability (word[2] is a sub-mesh count; decoded and declined appear at every value), so the gap is the anchor scan, not an unread format flag β€” see [xbg7](structures/xbg7-mesh.md) | | Capital-ship part placement | 🟑 | `sylpheed-formats/src/ship.rs` (static) + [runtime capture](ship-placement-runtime-capture.md) | hull placement static-exact; external parts approximate statically. **Runtime capture** (Canary F10 β†’ VS-constant WorldView) gives ground truth β€” validated on `e106` destroyer; not yet baked into the viewer | | Weapon fields defaulted on disc | βœ… | [runtime struct](structures/weapon-struct-runtime.md) Β· [DATA SHEET route](weapon-datasheet-runtime.md) | **Solved.** Canary maps guest RAM into `/dev/shm`, so the parsed `Weapon`/`Shell` objects are readable live; their layout is solved against disc ground truth (zero contradictions over 100+ records). All 126 weapons, exact numbers, no story progress needed β€” [4 393 values](captures/weapon-runtime-fields.csv) the disc does not carry. Supersedes the letter-bucket limit of the DATA SHEET route, which now serves as the independent cross-check | | Unit (craft/vessel) fields defaulted on disc | βœ…/🟑 | [runtime struct](structures/unit-struct-runtime.md) | The parsed `unit\UN_*.tbl` definition object, vtable `0x820af844`, β‰₯`0x380` bytes, one per unit β€” **discovered, not assumed** (`unit_discover.py`), and distinguished from the spawned-entity class `0x820af030` by being one-per-ID and byte-constant within a run. Across runs only pointer words move β€” `--crosscheck` proves **no reported field offset is run-dependent** (two words, `+0x2c8`/`+0x2d0`, are stage-dependent and remain unidentified). 27 fields βœ… (21 units, 7 runs); the `Maneuver` block is **schema declaration order, 4 bytes/field, base `0x9c` with a two-slot gap after `AA_Roll_Min`** (29 anchors, 0 conflicts), which also pins 5 fields *no* disc record ever values. Angles are **radians at runtime, degrees on disc**. Unlike weapons, unit definitions are instantiated **per stage**, so coverage (21/110) grows by visiting missions β€” but a defaulted field is **not** a global constant: `Size_Y` provably inherits `Size_X` (7 independent units, 6 distinct values), and three more sibling rules are recorded ❔, recovering 65 values in units never visited β€” [values](captures/unit-runtime-fields.csv) | diff --git a/docs/re/structures/xbg7-mesh.md b/docs/re/structures/xbg7-mesh.md index 665eb00..7b7f62c 100644 --- a/docs/re/structures/xbg7-mesh.md +++ b/docs/re/structures/xbg7-mesh.md @@ -252,3 +252,40 @@ mission* (where `DeltaSaber` renders) would hand over its exact declaration dire validated so a stray trailing marker ends the chain. Result: **all 19 previously-declined weapons decode** (`wep_81` 460 t missile w/ tail fins; `wep_30_hangar` 334 t). DeltaSaber unchanged (its body IS the largest marker β†’ same pivot). 7/7 disc tests green, stage quality audit unchanged. + +## The declined set, measured (2026-08-11) + +The module note said "a few multi-stream / quantized bodies remain" declined. +Measured across all 166 `hidden/resource3d/*.xpr`: + +- **6 294 XBG7 resources, 5 480 decoded (87.1 %), 814 declined**, in **31 of 166** + containers. Worst: `Stage_S09` 64/380, `Stage_S06` 58/324, `ptc_pack` 57/136. +- The declined set is **not** "a few hero bodies". By name prefix it is **492 + `e*`** (enemy craft), **142 `f*`**, **73 `n*`**, **23 `eff*`**, plus destroyed + variants (`_rou_f402_dead`, `_rou_f302_base_dead`) and one weapon + (`_rou_e011_wep04`). + +### A shortcut that does not work + +The resource descriptor's third word looked like a format/stream flag β€” decoded +`g001…g003` carry `0x00010001` while declined `t170`/`t180` carry `0x00020004`, +which reads temptingly as `(streams << 16) | format`. **It is not that.** +Histogramming it over the whole disc puts decoded *and* declined resources at +every value: + +``` +word[2] decoded declined +0x00010001 4479 328 +0x00010002 126 27 +0x00010003 120 112 +0x00010004 142 84 +… … … +``` + +Its low half runs 1…0x52 and tracks sub-mesh count, not vertex format. **So +decodability is not declared in the descriptor** β€” it is a property of whether +the unit-normal anchor scan can locate `vb0`, which is exactly what the current +code already tests. Anyone attacking this should not spend time on the +descriptor: 229 of the declined resources even carry the *most* common +`0x00010001` with under 1 KB of data, i.e. they are small meshes the scan has too +little signal to anchor, not exotic formats.