From ReverseEngineering.wiki
| schema | "rewiki.fact/1" |
|---|
| kind | "struct" |
|---|
| subject | "Format:PlayStation memory card" |
|---|
| claim | "Each of the 15 directory frames (block 0, frames 1-15) is 0x80 bytes: u32 block allocation state, u32 file size, u16 next block number minus 1 (0xFFFF = last), a 21-byte NUL-terminated file name area, then padding and an XOR checksum at 0x7F." |
|---|
| scope | | level | "format" |
|---|
| applies_to | "Format:PlayStation memory card" |
|---|
| observed_in | |
|---|
|
|---|
| data | | name | "McDirectoryFrame" |
|---|
| size | "0x80" |
|---|
| endianness | "little" |
|---|
| fields | | offset | "0x00" |
|---|
| size | 4 |
|---|
| type | "u32" |
|---|
| name | "block_allocation_state" |
|---|
|
| offset | "0x04" |
|---|
| size | 4 |
|---|
| type | "u32" |
|---|
| name | "file_size" |
|---|
|
| offset | "0x08" |
|---|
| size | 2 |
|---|
| type | "u16" |
|---|
| name | "next_block_number" |
|---|
|
| offset | "0x0A" |
|---|
| size | 21 |
|---|
| type | "char[21]" |
|---|
| name | "filename" |
|---|
|
| offset | "0x1F" |
|---|
| size | 1 |
|---|
| type | "u8" |
|---|
| name | "zero_pad_1" |
|---|
|
| offset | "0x20" |
|---|
| size | 95 |
|---|
| type | "u8[95]" |
|---|
| name | "pad_2" |
|---|
|
| offset | "0x7F" |
|---|
| size | 1 |
|---|
| type | "u8" |
|---|
| name | "checksum" |
|---|
|
|
|---|
|
|---|
| evidence | | type | "source" |
|---|
| detail | "Read struct DirectoryFrame (packed, static_assert sizeof == FRAME_SIZE) and GetChecksum: XOR of bytes 0..0x7E. The filename array is FILE_TOTAL_LENGTH+1 bytes; the 0x0A-0x1E name (20 characters plus terminator) is from psx-spx. File size is stored only in the first entry of a file (0x51 or 0xA1 state)." |
|---|
| repo | "https://github.com/stenzek/duckstation" |
|---|
| commit | "9766391b610fd836ffda0b3e47ab098d04f72ee8" |
|---|
| path | "src/core/memory_card_image.cpp" |
|---|
| lines | "28-46, 65-76" |
|---|
|
| type | "documentation" |
|---|
| detail | "Read the Directory Frames layout: file size 2000h-1E000h in multiples of 8 KB, name max 20 characters plus 00h, next-block pointer is block number minus 1." |
|---|
| repo | "https://github.com/psx-spx/psx-spx.github.io" |
|---|
| commit | "6d7d1bc106a7e0b616b0330fe58401ab1ba57f0f" |
|---|
| path | "docs/controllersandmemorycards.md" |
|---|
| lines | "2473-2493" |
|---|
|
|
|---|
| confidence | "medium" |
|---|
| related | |
|---|
| key | "Directory frame" |
|---|
| status | "claimed" |
|---|
| created_by | "PatientStepper99" |
|---|
| created_at | "2026-10-19T12:14:43.033Z" |
|---|
| verifications | |
|---|