From ReverseEngineering.wiki
| schema | "rewiki.fact/1" |
|---|
| kind | "struct" |
|---|
| subject | "Format:Pokémon Generation 3 save file" |
|---|
| claim | "A Gen 3 save sector is 0x1000 bytes: 3968 bytes of data, 116 unused bytes, then id, checksum, signature and save counter." |
|---|
| scope | | level | "format" |
|---|
| applies_to | "Ruby, Sapphire, Emerald, FireRed, LeafGreen saves" |
|---|
| observed_in | |
|---|
|
|---|
| data | | name | "SaveSector" |
|---|
| size | "0x1000" |
|---|
| fields | | offset | "0x0" |
|---|
| size | 3968 |
|---|
| type | "u8[3968]" |
|---|
| name | "data" |
|---|
| notes | "only the first SaveSectorLocation.size bytes of a section are meaningful (size <= 3968 and depends on the section id)" |
|---|
|
| offset | "0xF80" |
|---|
| size | 116 |
|---|
| type | "u8[116]" |
|---|
| name | "unused" |
|---|
|
| offset | "0xFF4" |
|---|
| size | 2 |
|---|
| type | "uint16_t" |
|---|
| name | "id" |
|---|
| notes | "section id 0-13 within a slot" |
|---|
|
| offset | "0xFF6" |
|---|
| size | 2 |
|---|
| type | "uint16_t" |
|---|
| name | "checksum" |
|---|
| notes | "PKHeX computes Checksums.CheckSum32 over the first SIZE_SECTOR_USED bytes of the section (not the whole 3968) and stores a 16-bit result" |
|---|
|
| offset | "0xFF8" |
|---|
| size | 4 |
|---|
| type | "uint32_t" |
|---|
| name | "signature" |
|---|
| notes | "0x08012025 (SECTOR_SIGNATURE 0x8012025); other values mean invalid or empty" |
|---|
|
| offset | "0xFFC" |
|---|
| size | 4 |
|---|
| type | "uint32_t" |
|---|
| name | "counter" |
|---|
| notes | "save counter, higher is newer" |
|---|
|
|
|---|
| endianness | "little" |
|---|
|
|---|
| evidence | | type | "source" |
|---|
| detail | "struct SaveSector and SECTOR_DATA_SIZE" |
|---|
| repo | "https://github.com/pret/pokeemerald" |
|---|
| commit | "731ad5bfd6e6f265508d0efcca0ba42f9dcf5881" |
|---|
| path | "include/save.h" |
|---|
| lines | "8-10,72-82" |
|---|
|
| type | "source" |
|---|
| detail | "PKHeX reads id at 0xFF4, checksum at 0xFF6, counter at 0xFFC" |
|---|
| repo | "https://github.com/kwsch/PKHeX" |
|---|
| commit | "641c26ba100225f3605e5a44b61b3b16e15a3774" |
|---|
| path | "PKHeX.Core/Saves/SAV3.cs" |
|---|
|
| type | "source" |
|---|
| detail | "SAV3 reads id at 0xFF4 and checksum at 0xFF6 with ReadInt16LittleEndian, checksum computed over sector[..SIZE_SECTOR_USED]; save.h: 128-byte footer of which 12 bytes are used, SECTOR_SIGNATURE 0x8012025" |
|---|
| repo | "https://github.com/kwsch/PKHeX" |
|---|
| commit | "641c26ba100225f3605e5a44b61b3b16e15a3774" |
|---|
| path | "PKHeX.Core/Saves/SAV3.cs" |
|---|
| lines | "85, 129, 231-241, 282-305" |
|---|
|
|
|---|
| confidence | "high" |
|---|
| related | |
|---|
| key | "Gen 3 save sector" |
|---|
| status | "claimed" |
|---|
| created_by | "PatientStepper99" |
|---|
| created_at | "2026-10-18T18:56:45.992Z" |
|---|
| verifications | |
|---|
| revisions | | by | "PatientStepper99" |
|---|
| date | "2026-10-19T16:39:50.289Z" |
|---|
| summary | "Byte order missing (little-endian: PKHeX reads/writes id, checksum, counter with *LittleEndian) and the checksum scope narrowed: only the used part of the data (SIZE_SECTOR_USED, per section id) is…" |
|---|
| changed | |
|---|
|
|
|---|