diff options
| author | DadaCap <167002618+DadaCap@users.noreply.github.com> | 2026-11-24 21:09:02 +0100 |
|---|---|---|
| committer | DadaCap <167002618+DadaCap@users.noreply.github.com> | 2026-11-24 21:09:02 +0100 |
| commit | bc245e5046124941bbdc7bb5c3bd7c739da4e03e (patch) | |
| tree | 5b780fbcbc1dd131ee635980dfe3e996ac72928f /docs/textures.md | |
| parent | 30450e0e96e1df700bbfa9505433c9b9940e8694 (diff) | |
| parent | 58be9cdf8df9a31bc7f6c068991f1aed381f7f4d (diff) | |
Merge remote-tracking branch 'origin/main' into vcc-tuple-resync
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Diffstat (limited to 'docs/textures.md')
| -rw-r--r-- | docs/textures.md | 38 |
1 files changed, 38 insertions, 0 deletions
diff --git a/docs/textures.md b/docs/textures.md index 7644272ff..14c3615cc 100644 --- a/docs/textures.md +++ b/docs/textures.md | |||
| @@ -453,6 +453,44 @@ exceptions. The chunk table's offsets are 256-byte aligned (physical) and 4 KiB | |||
| 453 | (virtual), and the virtual ranges cover every allocation the parser could lay out. The | 453 | (virtual), and the virtual ranges cover every allocation the parser could lay out. The |
| 454 | 12-bit padding on BCPack chunks is zero-filled (see the header section). | 454 | 12-bit padding on BCPack chunks is zero-filled (see the header section). |
| 455 | 455 | ||
| 456 | ### No name streams in the pools | ||
| 457 | |||
| 458 | A pool holds no name table and no string data (BUILD-1368). An earlier claim described a | ||
| 459 | `nameTable` stream of 64-byte records (65,536 slots) and a `nameData` stream of ASCII strings; | ||
| 460 | neither exists in this install. Every byte of a pool falls into one of the regions below | ||
| 461 | (`tools/ttpf_mips.py` `Pool`; all 57 pools, counts only): | ||
| 462 | |||
| 463 | | Region | Where | What it holds | | ||
| 464 | |---|---|---| | ||
| 465 | | RDS5 header and chunk table | 0x00 to `0x18 + (count − 1) * 8`, zero-padded to the ETPF index | the fields in the table above | | ||
| 466 | | ETPF header | `etpf`, 16 bytes | magic, version, `textures`, `area` | | ||
| 467 | | descriptors | `etpf + 0x10`, 16 bytes × `textures` | one texture record each | | ||
| 468 | | asset keys | after the descriptors, 8 bytes × `textures` | one u64 per record; unique within each pool (57 / 57), 357,115 keys | | ||
| 469 | | trailing metadata | after the keys, to `etpf + 0x10 + area + 32 × textures` | `area + 8 × textures` bytes: 13,973,528 in all | | ||
| 470 | | zero padding | to chunk 0's physical offset | 0 non-zero bytes in 57 / 57 pools | | ||
| 471 | | texture data | the chunk ranges | one virtual allocation per texture | | ||
| 472 | |||
| 473 | - **The virtual space has no room for another stream.** Chunk 0's virtual offset is the | ||
| 474 | 4 KiB-aligned metadata size and equals the lowest texture base in 57 / 57 pools. Texture bases | ||
| 475 | rise strictly in record order (0 duplicates, 0 unmapped), each allocation runs to the next base | ||
| 476 | and the last one to the virtual size (`Pool.span`). | ||
| 477 | - **The trailing metadata reads as uniform random bytes.** In each of the 52 pools with at least | ||
| 478 | 1 KiB of it, it has 7.87–8.00 bits/byte. It holds 54,497 zero bytes against 54,584 for uniform | ||
| 479 | bytes, and 0 repeated aligned 16-byte blocks. Its 3,166 printable ASCII runs of 8 bytes or more | ||
| 480 | (longest 17) match the 3,161 that uniform bytes give. Neither zlib nor raw deflate inflates it | ||
| 481 | from its start, from the end of the descriptors or from the end of `area`. | ||
| 482 | *Hypothesis:* per-texture digests or encrypted data. Under the ground rules it stays unread. | ||
| 483 | - **The names occur nowhere else either.** The literal strings `nameTable`, `nameData` and | ||
| 484 | `streamName` occur 0 times in the 57 pool files (raw bytes, 57.94 GiB) and in the inflated | ||
| 485 | streams of `common.rpf` (954 streams), `script.rpf` (1,057) and `data.rpf` (28,509). Only 5 of | ||
| 486 | those streams contain `ttdb` at all: 2 XML content documents in `common.rpf` and 3 `RBF0` UI | ||
| 487 | documents in `data.rpf`. The UI documents use it in a member that holds a texture ID; no stream | ||
| 488 | holds a name table. | ||
| 489 | |||
| 490 | What links a texture to the rest of the game is its u64 asset key. Models and materials | ||
| 491 | reference textures by that key, and exported textures are named `texture_<index>_<key>`. The | ||
| 492 | original texture names are not in the pools, and none of the streams searched above holds them. | ||
| 493 | |||
| 456 | ### Codec ids are the BCPack mode | 494 | ### Codec ids are the BCPack mode |
| 457 | 495 | ||
| 458 | The on-disk codec ids are `0x04, 0x0C, 0x10, 0x14, 0x18, 0x1C, 0x20`; shifting right by 26 | 496 | The on-disk codec ids are `0x04, 0x0C, 0x10, 0x14, 0x18, 0x1C, 0x20`; shifting right by 26 |