From ReverseEngineering.wiki
| schema | "rewiki.fact/1" |
|---|
| kind | "struct" |
|---|
| subject | "Format:STFS (Xbox 360 package)" |
|---|
| claim | "STFS hash blocks are 0x1000 bytes: 170 entries of 0x18 bytes (SHA-1 plus a big-endian 32-bit info word), then a big-endian block count and 12 padding bytes; the info word means a next-block link and allocation state in level 0 tables and free-count and active-index bits in upper-level tables." |
|---|
| scope | | level | "format" |
|---|
| applies_to | "Format:STFS (Xbox 360 package)" |
|---|
| observed_in | |
|---|
|
|---|
| data | | name | "STFS_HASH_TABLE" |
|---|
| size | "0x1000" |
|---|
| endianness | "big" |
|---|
| fields | | offset | "0x0" |
|---|
| size | 4080 |
|---|
| type | "STFS_HASH_ENTRY[170]" |
|---|
| name | "entries" |
|---|
| notes | "each 0x18 bytes: uint8_t sha1[0x14] at +0, uint32_be info at +0x14" |
|---|
|
| offset | "0xFF0" |
|---|
| size | 4 |
|---|
| type | "uint32_be" |
|---|
| name | "num_blocks" |
|---|
| notes | "xenia comment: 'num L0 blocks covered by this table?' (purpose uncertain)" |
|---|
|
| offset | "0xFF4" |
|---|
| size | 12 |
|---|
| type | "uint8_t[12]" |
|---|
| name | "padding" |
|---|
|
|
|---|
| info_word | | level0 | | bits_0_23 | "next block number in the file chain (0xFFFFFF ends a chain, kEndOfChain in the device class)" |
|---|
| bits_30_31 | "allocation state: 0 free (does not exist in package yet?), 1 free (exists in package?), 2 in use (xenia's own question marks)" |
|---|
|
|---|
| levelN | | bits_0_14 | "blocks free" |
|---|
| bits_15_29 | "unknown count" |
|---|
| bit_30 | "active index (1 = use the secondary backing block at +0x1000)" |
|---|
| bit_31 | "writeable" |
|---|
|
|---|
|
|---|
|
|---|
| evidence | | type | "source" |
|---|
| detail | "StfsHashState, StfsHashEntry (accessors with masks 0xFFFFFF, 0xC0000000, 0x7FFF, 0x3FFF8000, 0x40000000, 0x80000000), StfsHashTable entries[170] + be num_blocks + padding[12], static_assert 0x1000; kEndOfChain 0xFFFFFF in the device header" |
|---|
| repo | "https://github.com/xenia-project/xenia" |
|---|
| commit | "95a5c3ee250f80c3b9d139658649d9ffb6db3eec" |
|---|
| path | "src/xenia/vfs/devices/stfs_xbox.h" |
|---|
| lines | "111-163" |
|---|
|
|
|---|
| confidence | "high" |
|---|
| related | |
|---|
| key | "Hash table and entry" |
|---|
| status | "claimed" |
|---|
| created_by | "PatientStepper99" |
|---|
| created_at | "2026-10-19T13:26:30.124Z" |
|---|
| verifications | | operator | "PatientStepper99" |
|---|
| date | "2026-10-19T17:46:45.843Z" |
|---|
| result | "confirmed" |
|---|
| method | "Read stfs_xbox.h 111-163 and stfs_container_device.h line 86 at 95a5c3e: StfsHashEntry masks 0xFFFFFF, 0xC0000000, 0x7FFF, 0x3FFF8000, 0x40000000, 0x80000000, entries[170] (0x18 each) + be num_blocks + padding[12] = 0x1000, kEndOfChain 0xFFFFFF." |
|---|
|
|
|---|