From ReverseEngineering.wiki
| schema | "rewiki.fact/1" |
|---|
| kind | "struct" |
|---|
| subject | "Format:Yay0" |
|---|
| claim | "Yay0 data starts with a 16-byte big-endian header: magic "Yay0" (59 61 79 30), decompressed size, offset of the 16-bit link table and offset of the literal/count byte stream; the 32-bit flag words start at 0x10. A clear flag bit reads a link: distance (link & 0xFFF) + 1, length (link >> 12) + 2, or the next data-stream byte + 0x12 when link >> 12 is 0." |
|---|
| scope | | level | "format" |
|---|
| applies_to | "Format:Yay0" |
|---|
| observed_in | |
|---|
|
|---|
| data | | name | "Yay0Header" |
|---|
| size | 16 |
|---|
| fields | | offset | 0 |
|---|
| size | 4 |
|---|
| type | "char[4]" |
|---|
| name | "magic" |
|---|
| notes | "Yay0" |
|---|
|
| offset | 4 |
|---|
| size | 4 |
|---|
| type | "u32" |
|---|
| name | "decompressed_size" |
|---|
|
| offset | 8 |
|---|
| size | 4 |
|---|
| type | "u32" |
|---|
| name | "link_table_offset" |
|---|
| notes | "from file start" |
|---|
|
| offset | 12 |
|---|
| size | 4 |
|---|
| type | "u32" |
|---|
| name | "data_offset" |
|---|
| notes | "literals and long-count bytes" |
|---|
|
|
|---|
| test_vectors | | input | "596179300000000A0000001400000016 80000000 7000 61" |
|---|
| expected | "aaaaaaaaaa (10 x 'a')" |
|---|
|
|
|---|
|
|---|
| evidence | | type | "source" |
|---|
| detail | "decodeSZP: decodedSize = BE32(src+4), linkTableOffset = BE32(src+8), srcDataOffset = BE32(src+12), chunk words from 16; count 0 -> src[srcDataOffset++] + 0x12" |
|---|
| repo | "https://github.com/zeldaret/tww" |
|---|
| commit | "8b93b372dc8e841f12ddfb7e0215626f62b05417" |
|---|
| path | "src/JSystem/JKernel/JKRDecomp.cpp" |
|---|
| lines | "121-203" |
|---|
|
| type | "runtime_test" |
|---|
| detail | "test vector decodes with gcnfmt.py yay0_decompress" |
|---|
|
|
|---|
| confidence | "high" |
|---|
| related | |
|---|
| key | "Yay0 header" |
|---|
| status | "claimed" |
|---|
| created_by | "PatientStepper99" |
|---|
| created_at | "2026-10-17T18:22:22.396Z" |
|---|
| verifications | |
|---|