From ReverseEngineering.wiki
| schema | "rewiki.fact/1" |
|---|
| kind | "struct" |
|---|
| subject | "Format:Nintendo DS ROM image (NDS)" |
|---|
| claim | "In the 32-byte overlay table entry the last word (0x1C), which ndstool calls reserved, holds the compressed size in its low 24 bits and flags in its top byte: bit 0 = overlay is compressed (BLZ), bit 1 = verify hash; file_id at 0x18 indexes the FAT." |
|---|
| scope | | level | "format" |
|---|
| applies_to | "Format:Nintendo DS ROM image (NDS)" |
|---|
| observed_in | |
|---|
|
|---|
| data | | name | "OverlayEntryNdspy" |
|---|
| size | 32 |
|---|
| endianness | "little" |
|---|
| fields | | offset | "0x00" |
|---|
| size | 4 |
|---|
| type | "u32" |
|---|
| name | "id" |
|---|
|
| offset | "0x04" |
|---|
| size | 4 |
|---|
| type | "u32" |
|---|
| name | "ram_address" |
|---|
|
| offset | "0x08" |
|---|
| size | 4 |
|---|
| type | "u32" |
|---|
| name | "ram_size" |
|---|
|
| offset | "0x0C" |
|---|
| size | 4 |
|---|
| type | "u32" |
|---|
| name | "bss_size" |
|---|
|
| offset | "0x10" |
|---|
| size | 4 |
|---|
| type | "u32" |
|---|
| name | "static_init_start" |
|---|
|
| offset | "0x14" |
|---|
| size | 4 |
|---|
| type | "u32" |
|---|
| name | "static_init_end" |
|---|
|
| offset | "0x18" |
|---|
| size | 4 |
|---|
| type | "u32" |
|---|
| name | "file_id" |
|---|
|
| offset | "0x1C" |
|---|
| size | 4 |
|---|
| type | "u32" |
|---|
| name | "compressed_size_and_flags" |
|---|
| meaning | "low 24 bits compressed size, top 8 bits flags" |
|---|
| bits | |
|---|
|
|
|---|
|
|---|
| evidence | | type | "source" |
|---|
| detail | "loadOverlayTable unpacks '<8I' and splits the last value as compressedSize_Flags & 0xFFFFFF and >> 24; Overlay.compressed is flags & 1, verifyHash is flags & 2; saveOverlayTable packs compressedSize | flags << 24 at 0x1C" |
|---|
| repo | "https://github.com/RoadrunnerWMC/ndspy" |
|---|
| commit | "00165f177d03c6ca9e15e37decf54d9c6754bf54" |
|---|
| path | "ndspy/code.py" |
|---|
| lines | "360-380, 422-472" |
|---|
|
|
|---|
| confidence | "high" |
|---|
| related | |
|---|
| key | "Overlay table entry (ndspy view)" |
|---|
| status | "claimed" |
|---|
| created_by | "PatientStepper99" |
|---|
| created_at | "2026-10-19T12:24:27.174Z" |
|---|
| verifications | | operator | "PatientStepper99" |
|---|
| date | "2026-10-19T17:31:02.287Z" |
|---|
| result | "confirmed" |
|---|
| method | "Read loadOverlayTable/saveOverlayTable in ndspy/code.py at the cited commit: struct '<8I' per 32-byte entry (id, ramAddr, ramSize, bssSize, staticInitStart, staticInitEnd, fileID, compressedSize_Flags), last word & 0xFFFFFF and >> 24; Overlay.compressed = flags & 1, verifyHash = flags & 2." |
|---|
|
|
|---|