diff options
| author | shayder <darknessshayder@gmail.com> | 2026-11-22 12:50:28 -0600 |
|---|---|---|
| committer | GitHub <noreply@github.com> | 2026-11-22 12:50:28 -0600 |
| commit | 673d3d16c009f99a72c890b9e2e00be809aec141 (patch) | |
| tree | 58d5bad34fc40839ea6358357430910ac5343eac /docs | |
| parent | 89c2d9ac12d3cc6d3298330e653ccaabf4a2203a (diff) | |
| parent | 996191afabae43e61bf8f2c1412466b48c1a87b3 (diff) | |
Merge pull request #2377 from Kam471/docs/sixstars-verified-format-facts
docs: record the 6stars format facts that reproduce
Diffstat (limited to 'docs')
| -rw-r--r-- | docs/navmesh.md | 9 | ||||
| -rw-r--r-- | docs/rpf.md | 19 | ||||
| -rw-r--r-- | docs/world.md | 10 |
3 files changed, 37 insertions, 1 deletions
diff --git a/docs/navmesh.md b/docs/navmesh.md index f512310d3..a12a239a7 100644 --- a/docs/navmesh.md +++ b/docs/navmesh.md | |||
| @@ -182,7 +182,7 @@ layout, fixed `0xF0`-byte header, `14.36 GiB` / `15,420,757,856` bytes inflated | |||
| 182 | | `+0x80` | 8 | `ptr64` | `aiSplitArray` of vertex indices (`2` B: `u16`) | Valid, total `== u32@0x90`, all `< u32@0xC0` on `27,644 / 27,644` | | 182 | | `+0x80` | 8 | `ptr64` | `aiSplitArray` of vertex indices (`2` B: `u16`) | Valid, total `== u32@0x90`, all `< u32@0xC0` on `27,644 / 27,644` | |
| 183 | | `+0x88` | 8 | `ptr64` | `aiSplitArray` of adjacent-poly edges (`12` B) | Valid & total `== u32@0x90` on `27,644 / 27,644` | | 183 | | `+0x88` | 8 | `ptr64` | `aiSplitArray` of adjacent-poly edges (`12` B) | Valid & total `== u32@0x90` on `27,644 / 27,644` | |
| 184 | | `+0x90` | 4 | `u32` | Index / adjacency pool size | Sum `493,024,188`, max `235,411`; equals `sum(poly.num_verts)` on `27,644 / 27,644` | | 184 | | `+0x90` | 4 | `u32` | Index / adjacency pool size | Sum `493,024,188`, max `235,411`; equals `sum(poly.num_verts)` on `27,644 / 27,644` | |
| 185 | | `+0x98` | 8 | `ptr64` | `aiSplitArray` of polygons (`44` B) | Valid, total `== u32@0xC4` (`124,768,148` polys, max `71,803`), contiguous chain & `poly+0 == u32@0xC8` on `27,644 / 27,644` | | 185 | | `+0x98` | 8 | `ptr64` | `aiSplitArray` of polygons (`44` B) | Valid, total `== u32@0xC4` (`124,768,148` polys, max `71,803`), contiguous chain, `poly+0 == u32@0xC8` and `poly+4 == (index start << 4) \| count` on `27,644 / 27,644` | |
| 186 | | `+0xA0` | 8 | `ptr64` | Spatial quadtree root (`96` B nodes, `32` B leaves) | Full tree (`2,337,904` nodes, `1,760,339` leaves, max depth `9`) valid & all leaf indices `< u32@0xC4` on `27,644 / 27,644` | | 186 | | `+0xA0` | 8 | `ptr64` | Spatial quadtree root (`96` B nodes, `32` B leaves) | Full tree (`2,337,904` nodes, `1,760,339` leaves, max depth `9`) valid & all leaf indices `< u32@0xC4` on `27,644 / 27,644` | |
| 187 | | `+0xA8` | 8 | `ptr64` | Nullable special-link array (`32` B, count `u32@0xD4`) | Non-null iff `flags & 2` (`8,817` pages); in-bounds `27,644 / 27,644` | | 187 | | `+0xA8` | 8 | `ptr64` | Nullable special-link array (`32` B, count `u32@0xD4`) | Non-null iff `flags & 2` (`8,817` pages); in-bounds `27,644 / 27,644` | |
| 188 | | `+0xB0` | 8 | `ptr64` | Nullable special-link index table (`u16`, count `u32@0xD8`) | Non-null iff `flags & 2`; in-bounds & all entries `< u32@0xD4` on `27,644 / 27,644` (`2` tiles have `d8 < d4`) | | 188 | | `+0xB0` | 8 | `ptr64` | Nullable special-link index table (`u16`, count `u32@0xD8`) | Non-null iff `flags & 2`; in-bounds & all entries `< u32@0xD4` on `27,644 / 27,644` (`2` tiles have `d8 < d4`) | |
| @@ -197,6 +197,13 @@ layout, fixed `0xF0`-byte header, `14.36 GiB` / `15,420,757,856` bytes inflated | |||
| 197 | Reserved slots `+0x18..+0x1f`, `+0x6c..+0x6f`, `+0x78..+0x7f`, `+0x94..+0x97`, `+0xd0..+0xd3`, `+0xe0..+0xe7`, and | 197 | Reserved slots `+0x18..+0x1f`, `+0x6c..+0x6f`, `+0x78..+0x7f`, `+0x94..+0x97`, `+0xd0..+0xd3`, `+0xe0..+0xe7`, and |
| 198 | `+0xec..+0xef` are zero on `27,644 / 27,644` pages. | 198 | `+0xec..+0xef` are zero on `27,644 / 27,644` pages. |
| 199 | 199 | ||
| 200 | The `+4` word of a polygon packs `(index start << 4) | count`; the runs tile the index pool in order | ||
| 201 | (`tools/navmesh_decode.py --deep` checks it on all `124,768,148` polygons, 0 failures), which caps a polygon at 15 | ||
| 202 | vertices. 6stars independently reads the same packing. Its polygon `+0x28` bit 17 and `+0x18` bit 27 | ||
| 203 | road/pavement labels were not adopted: a 1,027,984-polygon sample over 238 tiles sets both bits on 258 polygons, so | ||
| 204 | they are not a partition and neither meaning is confirmed. No 6stars code was copied; the repository has no | ||
| 205 | licence. | ||
| 206 | |||
| 200 | ### Flags (`u32@0x10`) and 512 × 512 world grid | 207 | ### Flags (`u32@0x10`) and 512 × 512 world grid |
| 201 | 208 | ||
| 202 | - **Bit 0 (`0x01`)**: set on `27,644 / 27,644` (compressed 6-byte vertices at `+0x70`, `+0x78 == 0`). | 209 | - **Bit 0 (`0x01`)**: set on `27,644 / 27,644` (compressed 6-byte vertices at `+0x70`, `+0x78 == 0`). |
diff --git a/docs/rpf.md b/docs/rpf.md index 2f8f7862a..f589ef591 100644 --- a/docs/rpf.md +++ b/docs/rpf.md | |||
| @@ -15,6 +15,25 @@ are offset-based (`recovered/...`), not the original paths. | |||
| 15 | `story000.rpf` and `shared_minigame000.rpf` is non-zlib. Unread bytes are recorded as ranges (the `unread` | 15 | `story000.rpf` and `shared_minigame000.rpf` is non-zlib. Unread bytes are recorded as ranges (the `unread` |
| 16 | list in `rpf9_carve.py`'s `index.json`), never guessed. | 16 | list in `rpf9_carve.py`'s `index.json`), never guessed. |
| 17 | 17 | ||
| 18 | ## Stream roles | ||
| 19 | |||
| 20 | In the measured carve indexes, a resource's system prefix can be separated from its graphics pages without | ||
| 21 | decoding the resource: the prefix ends at the first stream whose inflated size is a multiple of `0x10000`, plus at | ||
| 22 | most one following non-multiple stream (a spill reached by a `0x5…` pointer). This reproduces the first | ||
| 23 | `42 40 00 00` graphics page on all 36,911 resources with one in `packs.rpf` and the 20–21, 40–41 and 70–70.8 GiB | ||
| 24 | `levels.rpf` windows, and on all 2,478 two-stream `0DRP` navmesh pages. It is a boundary, not a page test: only | ||
| 25 | 17,994 of the 40,038 graphics pages measured (44.9%) are multiples of `0x10000`, so the stream at the boundary is | ||
| 26 | often the last system page. `42 40 00 00` stays the direct graphics-page marker. | ||
| 27 | |||
| 28 | An inflated size of exactly `0x800000` is a chunk head, not a continuation. All 43 in `core_bvh4.rpf` follow a | ||
| 29 | 208–544-byte header stream and are followed by a separate continuation stream; the eight in the other measured | ||
| 30 | indexes are resource or graphics pages. [bvh.md](bvh.md) records the same 8 MiB-first relationship from the payload | ||
| 31 | side. | ||
| 32 | |||
| 33 | The boundary rule is independently read by meetox80/6stars. No 6stars code, prose or table was used; the | ||
| 34 | repository has **no licence** (all rights reserved), and every count above was re-measured from this package. See | ||
| 35 | [related_projects.md](related_projects.md). | ||
| 36 | |||
| 18 | ## Carving | 37 | ## Carving |
| 19 | 38 | ||
| 20 | ```powershell | 39 | ```powershell |
diff --git a/docs/world.md b/docs/world.md index 166d9f26f..22ec723ce 100644 --- a/docs/world.md +++ b/docs/world.md | |||
| @@ -153,6 +153,16 @@ struct hash, byte size, `u64` pointer. The pointers are `0x50000000 | file offse | |||
| 153 | reach an appended graphics page. Fields are not named on disk. Their 32-bit hashes are the **case-sensitive | 153 | reach an appended graphics page. Fields are not named on disk. Their 32-bit hashes are the **case-sensitive |
| 154 | joaat** of the engine names; matching those hashes is how the fields below were identified. | 154 | joaat** of the engine names; matching those hashes is how the fields below were identified. |
| 155 | 155 | ||
| 156 | The member `type` byte uses the PSIN type enum ([psin.md](psin.md#layouts)). Measured in the `CMapData` | ||
| 157 | (`d3593fa6`) and `CEntityDef` (`ce501483`) member tables of three carved `levels.rpf` maps: `0x34` is the | ||
| 158 | `4×f32` quaternion (`rotation`), `0x32` a 12-byte vec3 (`position`), `0x33` its 16-byte padded form (the four | ||
| 159 | extent triples), `0x21` f32 (`scaleXY`, `scaleZ`, `lodDist`, `childLodDist`), `0x12` i16 (`parentIndex`, | ||
| 160 | `parentInstance`), `0x15` u32 (`flags`, `numChildren`), `0x08` u64 (`entity id`), `0x60` an 8-bit enum | ||
| 161 | (`lodLevel`, `priorityLevel`), `0x4A` a u32 name hash, `0x52` and `0x5C` the two array forms, and `0x05` a struct | ||
| 162 | reference whose `extra` word is the referenced struct hash. `0x0C` is a 16-byte vector in the PSIN table but did | ||
| 163 | not occur in these schemas. 6stars independently reads these members with the same codes; no code or table was | ||
| 164 | copied, and its repository has no licence. | ||
| 165 | |||
| 156 | Every 0x7a header is checked the same way: the struct/instance table pointers must lie inside the stream, every | 166 | Every 0x7a header is checked the same way: the struct/instance table pointers must lie inside the stream, every |
| 157 | struct's member table must lie inside the stream, and at least one block must have a known struct and a | 167 | struct's member table must lie inside the stream, and at least one block must have a known struct and a |
| 158 | resolvable pointer. A block whose struct hash is not in the table is kept opaque rather than guessed (some | 168 | resolvable pointer. A block whose struct hash is not in the table is kept opaque rather than guessed (some |