diff options
| author | NotRexed <therealnothingfn@gmail.com> | 2026-11-21 13:46:24 -0500 |
|---|---|---|
| committer | NotRexed <therealnothingfn@gmail.com> | 2026-11-21 13:46:24 -0500 |
| commit | b70ddd632cabe1a8feefab4d6efda69003d89da5 (patch) | |
| tree | 451af542c6a4dbaa68e4de776e95c4e12ca34db1 /docs | |
| parent | 7a468c93ab104b2be92d7a35901d965e732201f3 (diff) | |
| parent | fa54b20fc58339a550c9094a41cfeef14e0d70dc (diff) | |
Merge pull request #85 from Kam471
# Conflicts:
# docs/design.md
Diffstat (limited to 'docs')
| -rw-r--r-- | docs/animation.md | 310 | ||||
| -rw-r--r-- | docs/design.md | 1 |
2 files changed, 311 insertions, 0 deletions
diff --git a/docs/animation.md b/docs/animation.md new file mode 100644 index 000000000..44c89e8ff --- /dev/null +++ b/docs/animation.md | |||
| @@ -0,0 +1,310 @@ | |||
| 1 | # Animation archive (`anim.rpf`) | ||
| 2 | |||
| 3 | Measured state of the animation archive in the Xbox Series 1.0.2.1 package. Everything here was read from a | ||
| 4 | local copy; no archive, payload, name list or byte dump is committed. The tables are counts and short header | ||
| 5 | excerpts only. | ||
| 6 | |||
| 7 | The table of contents of an RPF9 is encrypted. This work does not read or decrypt it. It indexes the data area | ||
| 8 | the same way `tools/rpf9_carve.py` does: every zlib stream that inflates cleanly to its end is one **stream** in | ||
| 9 | the tables below. A logical RAGE resource can span several streams, so "stream" is not "file". | ||
| 10 | |||
| 11 | ## Measured archive composition | ||
| 12 | |||
| 13 | ``` | ||
| 14 | archive 4,407,626,384 bytes | ||
| 15 | RPF9 magic b"9FPR" | ||
| 16 | data start 0x4660 (18,016) | ||
| 17 | data span 4,407,608,368 bytes | ||
| 18 | ``` | ||
| 19 | |||
| 20 | The requested command (`python -I tools/rpf9_carve.py <package>/anim.rpf <work>/anim-index --index-only`) prints: | ||
| 21 | |||
| 22 | | Measure | rpf9_carve | | ||
| 23 | |---|---:| | ||
| 24 | | validated zlib streams | 130,449 | | ||
| 25 | | stored (compressed) bytes | 4,204,677,247 (3.92 GiB) | | ||
| 26 | | inflated bytes | 11,592,111,696 (10.80 GiB) | | ||
| 27 | | zero padding | 180,165,556 (4.09% of span) | | ||
| 28 | | unread bytes | 23,664,707 (0.54% of span) | | ||
| 29 | | readable | 95.40% of span | | ||
| 30 | | Bink 2 | 0 streams | | ||
| 31 | | elapsed | 141 s | | ||
| 32 | |||
| 33 | `rpf9_carve.py` overreads its last stream: it advances a 1 MiB read cursor by 1 MiB even when the final mmap | ||
| 34 | slice is shorter. That makes the last `PSIN` stream look 974,742 bytes stored instead of 1,766 and skips 21 | ||
| 35 | streams at the tail. `tools/anim_index.py` advances by the actual slice length. Its corrected walk finds: | ||
| 36 | |||
| 37 | | Measure | corrected walk | | ||
| 38 | |---|---:| | ||
| 39 | | streams | 130,470 | | ||
| 40 | | stored bytes | 4,203,762,662 (3.915 GiB) | | ||
| 41 | | inflated bytes | 11,593,460,132 (10.80 GiB) | | ||
| 42 | | zero padding | 180,167,209 (4.09%) | | ||
| 43 | | unread bytes | 23,678,497 (0.54%) | | ||
| 44 | | readable | 95.38% | | ||
| 45 | | elapsed | ~140 s | | ||
| 46 | |||
| 47 | The 21 extra streams are the 1.35 MB `RBF0` rig metadata at the end of the data area (below). The class table | ||
| 48 | uses the corrected counts: the `PSIN` group is 213,747 stored in total, and the tail is its own row. | ||
| 49 | |||
| 50 | | Class (first bytes) | Streams | Stored | Inflated | Median | Max | Where | | ||
| 51 | |---|---:|---:|---:|---:|---:|---| | ||
| 52 | | `0DRP` at +16 (page directory) | 22,823 | 169,144,668 (161 MiB) | 3,883,044,624 (3.62 GiB) | 196,608 | 5,636,096 | first 1/8 of data area | | ||
| 53 | | starts with 8 zero bytes | 78,688 | 3,569,562,146 (3.32 GiB) | 6,918,674,880 (6.44 GiB) | 46,864 | 20,578,304 | throughout | | ||
| 54 | | other (no match below) | 28,646 | 464,618,867 (443 MiB) | 789,033,180 (752 MiB) | 23,984 | 65,536 | throughout | | ||
| 55 | | `RBF0` rig blob (1 header + 20 blocks) | 21 | 58,391 (57 KiB) | 1,348,436 (1.29 MiB) | 65,536 | 65,536 | tail | | ||
| 56 | | `pack:/` name table at 0 | 273 | 164,654 (161 KiB) | 711,536 (695 KiB) | 896 | 61,056 | throughout | | ||
| 57 | | `PSIN` at 0 | 18 | 213,747 (209 KiB) | 646,580 (631 KiB) | 35,768 | 65,536 | scattered | | ||
| 58 | | `SKEL_` bone list at 0 | 1 | 189 | 896 | 896 | 896 | early | | ||
| 59 | |||
| 60 | Only the first `RBF0` stream has the header; the other 20 are continuation blocks, so `anim_index.py` reports one | ||
| 61 | `rbf0` and 20 `raw:<hex>` records for that tail. | ||
| 62 | |||
| 63 | Two observations matter for a decoder: | ||
| 64 | |||
| 65 | - Every `0DRP` stream is in the first 1/8 of the data area (about 551 MB of span). The remaining 7/8 contains no | ||
| 66 | `0DRP` header at +16. | ||
| 67 | - The 78,688 zero-prefixed streams are not opaque blobs. In a 200-stream sample, 78% have a 64-bit pointer into | ||
| 68 | the `0x50000000` range at +8; the rest are mostly zero or other tables. Some pages carry a name table and | ||
| 69 | high-entropy blocks later in the same stream. | ||
| 70 | |||
| 71 | ## Container signatures actually observed | ||
| 72 | |||
| 73 | ### `0DRP` page marker at +16 | ||
| 74 | |||
| 75 | 22,823 streams. The fixed part of the header is: | ||
| 76 | |||
| 77 | ``` | ||
| 78 | +0x00 8 zero bytes | ||
| 79 | +0x08 u64 pointer into 0x50xxxxxx | ||
| 80 | +0x10 "0DRP" (bytes 30 44 52 50) | ||
| 81 | +0x14 u32 122 (same value in all 22,823) | ||
| 82 | +0x20 u64 page count (observed 1..41, 32 distinct values) | ||
| 83 | +0x28 four u64 pointers (0x50xxxxxx) | ||
| 84 | +0x48 four u16 values | ||
| 85 | ``` | ||
| 86 | |||
| 87 | Top page-count values: 1 (1,883), 2 (7,571), 3 (9,241), 4 (2,022), 19–26 (1,592). The largest sampled page | ||
| 88 | (5,636,096 bytes) is 94.6% zero bytes, with sparse pointers. That is a page directory/relocation table, not | ||
| 89 | keyframe data. The marker is reported as a page marker, not as a known GTA V resource magic. | ||
| 90 | |||
| 91 | ### `MoVE` container | ||
| 92 | |||
| 93 | 324 streams, all with the same header prefix: | ||
| 94 | |||
| 95 | ``` | ||
| 96 | +0x00 "MoVE" (bytes 4D 6F 56 45) | ||
| 97 | +0x04 u32 19 (all 324) | ||
| 98 | +0x14 u32 size hint (e.g. 852 for an 898-byte stream) | ||
| 99 | ``` | ||
| 100 | |||
| 101 | Stored 330,677 bytes, inflated 1,488,625 bytes. All 324 payloads are distinct. Entropy is 1.67–4.49 bits/byte, so | ||
| 102 | the payload is structured, not zlib-compressed. No readable name is stored at the start. The remaining fields are | ||
| 103 | not mapped; the name is the only evidence that it is motion-related. | ||
| 104 | |||
| 105 | ### Name tables (`pack:/...`) | ||
| 106 | |||
| 107 | 273 streams start directly with NUL-terminated ASCII paths; there is no container header before the names. They | ||
| 108 | hold 711,536 inflated bytes and 2,298 distinct paths: | ||
| 109 | |||
| 110 | | Suffix | Distinct paths | | ||
| 111 | |---|---:| | ||
| 112 | | `.clip` | 2,012 | | ||
| 113 | | `.anim` | 274 | | ||
| 114 | | `.motion` | 12 | | ||
| 115 | |||
| 116 | Paths are padded to 16-byte boundaries. The records include a 32-bit name hash; a second 32-bit value recurs as | ||
| 117 | `0x98e1750c` in some tables, but its meaning is not established. The name hash is **joaat32 of the path stem**: | ||
| 118 | strip `pack:/`, strip the final extension, lowercase. In one 161-name table all 161 hashes matched exactly; | ||
| 119 | across the 273 tables, 3,229 of 3,637 name occurrences (88.8%) and 248 of 273 tables matched every name. The | ||
| 120 | remaining 11.2% are not explained (duplicate names, missing records or a different record layout). A separate scan of the first 4 KiB of the 130,449 `rpf9_carve` streams found 7,661 distinct | ||
| 121 | `pack:/...` paths and 31,020 | ||
| 122 | occurrences; 5,880 of those streams contain at least one path, bone name or animation word in that prefix. The | ||
| 123 | union of the two name sources is 8,020 distinct paths. Names also appear embedded at non-zero offsets in | ||
| 124 | zero-prefixed pages (for example at +0x497e0 and +0x4aa8 in one 327,680-byte page), not only in the 273 | ||
| 125 | start-of-stream tables. | ||
| 126 | |||
| 127 | ### Skeleton and bone names | ||
| 128 | |||
| 129 | A full-corpus prefix scan found 31 distinct `SKEL_*` tokens, 170 occurrences, in the first 4 KiB of the streams. | ||
| 130 | Two forms were seen in carved samples: | ||
| 131 | |||
| 132 | - a plain NUL-terminated bone list (896-byte stream), and | ||
| 133 | - a front-coded table (2,064 bytes) whose entries are length-prefixed name fragments plus parent indices. | ||
| 134 | |||
| 135 | The `SKEL_<region>_<part>` shape is the conventional RAGE bone naming. The model manifest available here does | ||
| 136 | not expose bone names, so that match is not measured; the animation pages carry no model name next to the bones. | ||
| 137 | |||
| 138 | ### Type-hash containers | ||
| 139 | |||
| 140 | 1,371 streams share this 16-byte header shape: | ||
| 141 | |||
| 142 | ``` | ||
| 143 | +0x00 u32 type id | ||
| 144 | +0x04 u32 8 | ||
| 145 | +0x08 u32 chunk count (1..4096) | ||
| 146 | +0x0c u32 0 | ||
| 147 | ``` | ||
| 148 | |||
| 149 | The most frequent type ids are `0x88560988` (721 streams), `0x51e5606c` (220), `0x51404a31` (133), | ||
| 150 | `0x8db79d92` (119) and `0x98a13c55` (7). Their payload is chunk-like, entropy 2.57–4.26 bits/byte. `PSIN` is a | ||
| 151 | separate 18-stream group (`PSIN` at offset 0, 0.21 MB stored / 0.65 MB inflated); `docs/design.md` already | ||
| 152 | describes `PSIN` as PSO metadata, and these bytes do not show that it is animation data. | ||
| 153 | |||
| 154 | ### Packed clip streams | ||
| 155 | |||
| 156 | 1,781 streams start with: | ||
| 157 | |||
| 158 | ``` | ||
| 159 | 02 00 00 00 01 01 00 00 ... or 03 00 00 00 01 01 00 00 ... | ||
| 160 | ``` | ||
| 161 | |||
| 162 | The leading u32 is 2 or 3; the next four bytes are constant. Stored 18,168,950 bytes, inflated 32,691,776 bytes. | ||
| 163 | 1,767 distinct payloads (duplicates up to 10 copies). Entropy 4.03–7.79 bits/byte, so these are packed/quantized | ||
| 164 | bitstreams rather than zlib streams. The 24-byte header has five small fields after the type, but their meaning | ||
| 165 | is not established; no name is stored in the stream. | ||
| 166 | |||
| 167 | ### Tail `RBF0` rig metadata | ||
| 168 | |||
| 169 | The last 21 streams appear to be one logical `RBF0` blob split into 64 KiB blocks (20 × 65,536 plus 37,716 | ||
| 170 | bytes); the first block ends mid-path (`...anim/rig`) and the next starts `/canonical/...`: | ||
| 171 | |||
| 172 | ``` | ||
| 173 | 52 42 46 30 fb ff 01 00 00 00 15 00 "rage__crRigSetManager" | ||
| 174 | ``` | ||
| 175 | |||
| 176 | They hold 58,391 stored / 1,348,436 inflated bytes and 20,224 printable runs of at least 6 bytes (4,819 | ||
| 177 | distinct). The readable | ||
| 178 | content is a rig-set manager, not clip keyframes: | ||
| 179 | |||
| 180 | | Lowercase token | Occurrences | Distinct | | ||
| 181 | |---|---:|---:| | ||
| 182 | | `anim/rigset/` paths | 1,126 | 1,126 | | ||
| 183 | | `anim/rig/` paths | 6,677 | 3,669 | | ||
| 184 | | `generated@source` | 3,616 | 1 | | ||
| 185 | | `pipelined@source` | 2,135 | 1 | | ||
| 186 | | `canonical@source` | 888 | 1 | | ||
| 187 | | `deformation` | 4,217 | 6 | | ||
| 188 | | `pose.` | 253 | 6 | | ||
| 189 | | `ped/` paths | 4,828 | 1,974 | | ||
| 190 | | `vehicle/` paths | 2,691 | 2,567 | | ||
| 191 | | `prop/` paths | 79 | 79 | | ||
| 192 | | `facial` | 164 | 5 | | ||
| 193 | | `motion` | 150 | 1 | | ||
| 194 | | `bone`, `SKEL_`, `clip` | 0 | 0 | | ||
| 195 | |||
| 196 | Counts are case-sensitive lowercase matches. Case-insensitively, `bone` is 4/2 and `skel` is 2/1, all inside two | ||
| 197 | rig path names; `clip` stays 0. `facial` and `motion` also appear capitalised in a few path names. | ||
| 198 | |||
| 199 | Schema field names include `rage__crRigSetManager`, `RigSet`, `Item`, `Entries`, `Dictionary`, `Priority`, `key`, | ||
| 200 | `canonical@legacy`, `canonical@source`, `generated@source`, `pipelined@source`, `deformation`, `facial`, | ||
| 201 | `identity` and `pose.ragdoll.post`. This is the likely rig-set → rig mapping table. It is the strongest lead for | ||
| 202 | joining animation paths to skeletons, and it was missing from the `rpf9_carve` index because of the tail overread. | ||
| 203 | |||
| 204 | ### Magics not found | ||
| 205 | |||
| 206 | At stream starts across the 130,449 `rpf9_carve` streams, the counts of `YCD`, `YDD`, `YLD`, `YFD`, `RSC7`, | ||
| 207 | `RSC8`, `ADAT`, `AWC`, `RBF0`, `FSSM` and `KB2` are all zero. The corrected walk adds 21 tail streams whose first | ||
| 208 | starts with `RBF0`; the rest start inside the same blob. One three-byte `YDD` sequence occurs at +0xE1 inside a | ||
| 209 | high-entropy stream; it is not at a header boundary and is treated as coincidence, not as a YDD file. | ||
| 210 | |||
| 211 | ## Readable, compressed and still opaque | ||
| 212 | |||
| 213 | - **Readable:** all 273 name tables (2,298 paths), 31 distinct `SKEL_*` tokens, the `0DRP` version/page count, 1,371 | ||
| 214 | type-hash headers, 1,781 clip-stream headers, and the 4,819 distinct strings in the `RBF0` rig metadata. Some | ||
| 215 | `MoVE` and zero-prefixed pages expose counts and float arrays directly. | ||
| 216 | - **Outer compression:** the only compression this work inverts is the RPF9 zlib framing. Inflating the 130,470 | ||
| 217 | streams accounts for the 11.59 GB above. | ||
| 218 | - **No nested zlib:** in eight sampled zero-prefixed pages, none of the `78 01/5E/9C/DA` byte pairs started a | ||
| 219 | valid nested zlib stream. The outer zlib stream is the only compression layer observed. | ||
| 220 | - **No known codec at the sampled headers:** no zstd or LZ4 frame magic was found in the first 4 KiB of the | ||
| 221 | 130,449 indexed streams. gzip, bzip2 and lzma byte patterns occur, but none started a valid stream at the | ||
| 222 | sampled positions. | ||
| 223 | No Oodle signature is known from these bytes; none is guessed. | ||
| 224 | - **Still opaque:** high-entropy blocks inside `other` and zero-prefixed pages (4 KiB blocks up to 7.96 | ||
| 225 | bits/byte), the 1,781 packed clip streams, and the fields of `MoVE` beyond the version and size hint. | ||
| 226 | |||
| 227 | ## Cross-check with the model and XML work | ||
| 228 | |||
| 229 | - `models-out/data/models/manifest.json` (the only model manifest available here) has 1,350 models: 1,341 with | ||
| 230 | `HasBoneBindings`, 689 fragments, all with material entries. It exposes model names and 64-bit texture | ||
| 231 | `Id64` keys, but no bone names or skeleton hashes. | ||
| 232 | - None of the 1,350 model names occurs in the 8,020 animation paths collected here, and none occurs in the | ||
| 233 | `RBF0` rig metadata either. The sampled clip hash `0x25ed0554e58ba1fc` and the recurring `0x98e1750c` are | ||
| 234 | absent from all manifest names and integer/string values. A real cross-check needs the full model export | ||
| 235 | (155,598 models per `docs/design.md`) and the rig table. | ||
| 236 | - `common.rpf` is the readable metadata layer. It carved to 781 streams, 710 of them XML-ish. Strict keyword | ||
| 237 | occurrences: `clip` 734, `anim` 1,131, `motion` 237, `gesture` 2, `bone` 428 (214 `<Bones>` open/close | ||
| 238 | pairs), `ped_` 1,308, `blend` 40; `facial`, `ycd` and `skeleton` 0. The tags include `<AnimData>`, | ||
| 239 | `<ClipSet>`, `<ClipSelectionRule>` and `<Bones>`, and a path to `platform:/anim/animscenes/gesture/gesture.rpf`. | ||
| 240 | These are configuration references, not clip payloads. | ||
| 241 | - A 64 MiB sample of `data.rpf` (6,359 streams, 3 XML-ish) yielded no animation catalog. Its strict keyword | ||
| 242 | hits are dialogue or model/decal names; the five `ycd#` hits are part of a model hash table, not a container | ||
| 243 | header. | ||
| 244 | |||
| 245 | ## Likely format family | ||
| 246 | |||
| 247 | The bytes support **new RAGE resource pages**, not the GTA V `YCD`/`RSC7` family: | ||
| 248 | |||
| 249 | - RPF9 container, `0DRP` page directories with `0x50xxxxxx` virtual pointers and page counts. | ||
| 250 | - `pack:/...` path tables with 16-byte-aligned names and 16-byte hash/pointer records. | ||
| 251 | - `SKEL_*` bone tables in plain and front-coded forms. | ||
| 252 | - `RBF0` rig-set metadata (`rage__crRigSetManager`) mapping rig-set paths to canonical/generated/pipelined rigs. | ||
| 253 | - `MoVE` (version 19) and the 2/3 clip streams as the animation payloads; neither is zlib inside the page. | ||
| 254 | - No `YCD`, `YDD`, `YLD`, `YFD`, `RSC7` or `RSC8` at any stream start. | ||
| 255 | |||
| 256 | `MoVE` is probably motion/motion-matching data and the 2/3 streams are probably packed clips, but only the bytes | ||
| 257 | above are measured. Treat those two labels as hypotheses until a decoder reads a known clip. | ||
| 258 | |||
| 259 | ### What the bytes do not prove | ||
| 260 | |||
| 261 | - `0DRP` is a page marker with a version, page count and pointers. Its role is inferred from the page layout, not | ||
| 262 | decoded, and the marker is not proven to be animation-specific. | ||
| 263 | - `MoVE` is named like motion data, but its fields beyond the version and size hint are unmapped. | ||
| 264 | - The 2/3 streams are packed bitstreams with a constant four-byte prefix. No clip has been decoded. | ||
| 265 | - The `RBF0` rig-set manager is readable strings and schema field names. Its value encoding (indices, hashes, | ||
| 266 | parent links) is not parsed yet. | ||
| 267 | |||
| 268 | ## What a future decoder needs | ||
| 269 | |||
| 270 | 1. **Parse the `RBF0` rig-set manager first.** It is 1.35 MB, has an explicit schema name | ||
| 271 | (`rage__crRigSetManager`) and 4,819 readable rig/rig-set paths. Extract the rig-set → rig entries and the | ||
| 272 | channel names (`deformation`, `facial`, `pose.*`). That is the missing rig-set mapping; combined with the | ||
| 273 | `SKEL_*` bone tables it gives bone order. Without a rig entry, a clip has no skeleton binding. | ||
| 274 | 2. **Group streams into resources.** The TOC is encrypted, so use the `0DRP` page header: count at +0x20, | ||
| 275 | pointers at +0x08 and +0x28..+0x40, four u16 values at +0x48. The sampled layout places page headers among | ||
| 276 | zero-prefixed pages; a logical resource can span several streams. Do not assume one stream is one file. | ||
| 277 | 3. **Parse the name/hash tables.** Names are NUL-terminated and 16-byte aligned; the name hash is joaat32 of | ||
| 278 | the stem (path without `pack:/` and without the final extension). The record stride varies (16 or 32 bytes in | ||
| 279 | sampled tables), so do not assume one layout. The recurring `0x98e1750c` needs a meaning before it can be | ||
| 280 | used as a type or source id. | ||
| 281 | 4. **Join rigs to clips, then decode a known clip.** Pick one `.clip` name table entry, follow its pointer into | ||
| 282 | the page, and use the rig entry for its bone order. The 24-byte header and the packed bitstream are the | ||
| 283 | blocking unknowns. `MoVE` (version 19, size hint at +0x14) is a second, separate format; map its fields only | ||
| 284 | after a known payload decodes. | ||
| 285 | 5. **Keep the compression boundary explicit.** Outer RPF9 zlib is understood. Do not add a zlib pass inside a | ||
| 286 | page without evidence; the sampled pages had no valid nested stream. | ||
| 287 | 6. **Re-run the model cross-check with the full export.** The current 1,350-model data.rpf manifest has bone | ||
| 288 | bindings but no bone names or hashes. The full 155,598-model export plus the `RBF0` rig table is needed to | ||
| 289 | match skeletons to models. | ||
| 290 | |||
| 291 | ## Reproduction | ||
| 292 | |||
| 293 | ```powershell | ||
| 294 | # Full stream index and coverage (writes index.json only) | ||
| 295 | python -I tools/rpf9_carve.py <package>\anim.rpf <work>\anim-index --index-only | ||
| 296 | |||
| 297 | # Signature index (CSV or JSON; --limit/--start for a bounded scan) | ||
| 298 | python -I tools/anim_index.py <package>\anim.rpf <work>\anim-index.csv | ||
| 299 | python -I tools/anim_index.py <work>\anim-carve <work>\anim-index.json | ||
| 300 | ``` | ||
| 301 | |||
| 302 | `tools/anim_index.py` reports `MoVE`, `0DRP`, `pack:/`, `SKEL_`, `RBF0`, `PSIN`, type-hash and 2/3 clip headers, | ||
| 303 | plus `raw:<hex>` for anything it does not recognise. It writes no payloads. | ||
| 304 | |||
| 305 | ## No-sharing rule | ||
| 306 | |||
| 307 | Game files, carved streams, name lists, payload dumps and reports that quote them stay on the machine that owns | ||
| 308 | the package. Do not commit them, attach them to an issue or PR, or paste them into a chat. Short header excerpts | ||
| 309 | (a few bytes) and aggregate counts are allowed, as in `CONTRIBUTING.md`. The work folder is git-ignored; this | ||
| 310 | document contains no archive data. | ||
diff --git a/docs/design.md b/docs/design.md index 498286561..37613b086 100644 --- a/docs/design.md +++ b/docs/design.md | |||
| @@ -91,6 +91,7 @@ add a source file, add it to `runtime\CMakeLists.txt` and to the file list in `b | |||
| 91 | | Models | **Done: 155,598 models** (levels.rpf 149,811 with 1.9 billion triangles, story000 3,303, data 1,350, shared_minigame000 783, packs 314, core_restofworld 37; 0 failures). Exported with `tools\rpf9dump` (built on breadbbbb/rpf9-explorer's Core; see below). Resources are found at page offset +16 after 16 zero bytes, followed by a zlib system blob with a drawable/fragment header and then the following zlib blocks as graphics data. Positions are quantized: `bias + scale * ((q >> 8) & 0xFFFFFF)`. Output is OBJ (positions, UVs, indices) plus a manifest with real model names (e.g. `cvar_int_grg2b_toys_1`), bounds, per-mesh shader index and material texture references (parameter hash, name hash, 64-bit asset key). My earlier `0x1380`/`0x1601` descriptor notes stand, but the "data not located" blocker was wrong. | `<work>\assets\<archive>\models\` | | 91 | | Models | **Done: 155,598 models** (levels.rpf 149,811 with 1.9 billion triangles, story000 3,303, data 1,350, shared_minigame000 783, packs 314, core_restofworld 37; 0 failures). Exported with `tools\rpf9dump` (built on breadbbbb/rpf9-explorer's Core; see below). Resources are found at page offset +16 after 16 zero bytes, followed by a zlib system blob with a drawable/fragment header and then the following zlib blocks as graphics data. Positions are quantized: `bias + scale * ((q >> 8) & 0xFFFFFF)`. Output is OBJ (positions, UVs, indices) plus a manifest with real model names (e.g. `cvar_int_grg2b_toys_1`), bounds, per-mesh shader index and material texture references (parameter hash, name hash, 64-bit asset key). My earlier `0x1380`/`0x1601` descriptor notes stand, but the "data not located" blocker was wrong. | `<work>\assets\<archive>\models\` | |
| 92 | | Texture dictionaries | Same tool: TXD resources become DDS per texture. | `<work>\assets\<archive>\textures\` | | 92 | | Texture dictionaries | Same tool: TXD resources become DDS per texture. | `<work>\assets\<archive>\textures\` | |
| 93 | | World textures (TTPF) | **Done: 308,895 textures from all 57 pools, 0 failures, 48,220 entries skipped** (33,507 BCPack, 14,030 compact mapping, 678 arrays/volumes, 5 unsupported format, 0 unmapped). 46 pools are in `data\ttdb\**`, 11 in `pack\<name>\data\ttdb\**` (exported under `ttpf_pack\<pack>\`). `data\ttdb\**\*.ttpf` (57 pools, 58 GiB) are loose RDS5 texture pools, **not** inside RPFs. rpf9-explorer's `TtpfReader` reads the catalog and detiles them; checked visually (`ttdb_graphics`: scope reticles, clean lines). Names are generated (`texture_N_<assetkey>`); models reference textures by asset key. Some rows are skipped; the measured breakdown and the BCPack next step are in [textures.md](textures.md). | `<work>\assets\ttpf\<pool>\` + `manifest.json` | | 93 | | World textures (TTPF) | **Done: 308,895 textures from all 57 pools, 0 failures, 48,220 entries skipped** (33,507 BCPack, 14,030 compact mapping, 678 arrays/volumes, 5 unsupported format, 0 unmapped). 46 pools are in `data\ttdb\**`, 11 in `pack\<name>\data\ttdb\**` (exported under `ttpf_pack\<pack>\`). `data\ttdb\**\*.ttpf` (57 pools, 58 GiB) are loose RDS5 texture pools, **not** inside RPFs. rpf9-explorer's `TtpfReader` reads the catalog and detiles them; checked visually (`ttdb_graphics`: scope reticles, clean lines). Names are generated (`texture_N_<assetkey>`); models reference textures by asset key. Some rows are skipped; the measured breakdown and the BCPack next step are in [textures.md](textures.md). | `<work>\assets\ttpf\<pool>\` + `manifest.json` | |
| 94 | | Animation | Indexed without the TOC: 130,470 zlib streams (4,203,762,662 stored / 11,593,460,132 inflated), 95.4% readable. New RAGE page directories (`0DRP`, version 122), `MoVE` (version 19), 273 `pack:/` name tables (2,298 paths), and a tail `RBF0` rig-set manager (`rage__crRigSetManager`, 4,819 strings). No `YCD`/`RSC7` at any stream start. The `rpf9_carve` tail overread is measured in `docs/animation.md`. | `tools\anim_index.py`, `<work>\anim-index\` | | ||
| 94 | | Audio | `audio.rpf` holds raw (not zlib) **AWC** banks: Opus (codec 0x0B) and XMA2 streams. Exported as whole `.awc` files plus `audio_manifest.json` (stream ids, codec, channels, rate, duration). **Done: 7,162 banks, 27 GiB, 1,603,231 streams, about 1,324 hours** (codec 0x0B Opus 1,601,167; 5: 1,818; 2: 227; 0 PCM: 19). `tools/awc_opus.py` repackages every Opus stream **losslessly** into a standard Ogg Opus file (no re-encode; PCM streams become .wav). The AWC framing is 2048-byte blocks of [u16 length][packet], with a zero length padding the block (as rpf9-explorer's OpusPreview reads it). The final granule is trimmed to the declared sample count. Checked: 300 random streams decode with ffmpeg with no errors, lengths match the declared counts. XMA2 streams (codec 5, 1,818) are written as RIFF XMA2 files by `rpf9dump xma` (rpf9-explorer's `AwcRecovery.WriteXmaWave`) and decoded to PCM WAV by ffmpeg: all 1,818 decode. Streamed music (tag 0x48: chunks with a per-channel record table, each channel's 2048-byte subblocks after the aligned header, and a repeated-prefix skip per chunk) becomes one mono Ogg Opus per channel (3,008 banks contain music). Checked: a 4-channel music bank gives four 42.0 s channels with real levels and no decoder errors. Output: `<work>\assets\audio\ogg\<bank>\<stream id>.ogg`. **Done: 1,598,051 Opus streams + 3,116 music channels as Ogg Opus (22 GB), 19 PCM16 and 227 codec-2 streams (32-bit float PCM, 4 bytes per sample; values can exceed ±1) as WAV, 1,818 XMA2 as WAV. Every audio stream is converted; all WAVs decode.** `make_game.py --wav` also decodes the Ogg Opus output to 16-bit PCM WAV with `tools/audio_wav.py` (ffmpeg required; existing WAVs are skipped on resume). | `<work>\assets\audio\awc\` | | 95 | | Audio | `audio.rpf` holds raw (not zlib) **AWC** banks: Opus (codec 0x0B) and XMA2 streams. Exported as whole `.awc` files plus `audio_manifest.json` (stream ids, codec, channels, rate, duration). **Done: 7,162 banks, 27 GiB, 1,603,231 streams, about 1,324 hours** (codec 0x0B Opus 1,601,167; 5: 1,818; 2: 227; 0 PCM: 19). `tools/awc_opus.py` repackages every Opus stream **losslessly** into a standard Ogg Opus file (no re-encode; PCM streams become .wav). The AWC framing is 2048-byte blocks of [u16 length][packet], with a zero length padding the block (as rpf9-explorer's OpusPreview reads it). The final granule is trimmed to the declared sample count. Checked: 300 random streams decode with ffmpeg with no errors, lengths match the declared counts. XMA2 streams (codec 5, 1,818) are written as RIFF XMA2 files by `rpf9dump xma` (rpf9-explorer's `AwcRecovery.WriteXmaWave`) and decoded to PCM WAV by ffmpeg: all 1,818 decode. Streamed music (tag 0x48: chunks with a per-channel record table, each channel's 2048-byte subblocks after the aligned header, and a repeated-prefix skip per chunk) becomes one mono Ogg Opus per channel (3,008 banks contain music). Checked: a 4-channel music bank gives four 42.0 s channels with real levels and no decoder errors. Output: `<work>\assets\audio\ogg\<bank>\<stream id>.ogg`. **Done: 1,598,051 Opus streams + 3,116 music channels as Ogg Opus (22 GB), 19 PCM16 and 227 codec-2 streams (32-bit float PCM, 4 bytes per sample; values can exceed ±1) as WAV, 1,818 XMA2 as WAV. Every audio stream is converted; all WAVs decode.** `make_game.py --wav` also decodes the Ogg Opus output to 16-bit PCM WAV with `tools/audio_wav.py` (ffmpeg required; existing WAVs are skipped on resume). | `<work>\assets\audio\awc\` | |
| 95 | 96 | ||
| 96 | ### rpf9dump (bulk export) | 97 | ### rpf9dump (bulk export) |