From ReverseEngineering.wiki
| schema | "rewiki.fact/1" |
|---|
| kind | "behavior" |
|---|
| subject | "Format:Pokémon Generation 1 and 2 save files" |
|---|
| claim | "The Gen 2 checksum (international and Japanese saves) is the 16-bit wrapping sum of the bytes from 0x2009 through a per-version end offset, written as a little-endian u16 to two locations (international GS 0x2D68 end, copies at 0x2D69 and 0x7E6D; Crystal 0x2B82, 0x2D0D and 0x1F0D). Korean saves use the same first sum at 0x2DAB, but the second copy at 0x7E6B is an 'oddball' sum of the byte ranges 0x106B-0x1532, 0x1534-0x1A11, 0x1A13-0x1C37, 0x3DD8-0x3F78 and 0x7E39-0x7E69." |
|---|
| scope | | level | "format" |
|---|
| applies_to | "Pokémon Gold, Silver, Crystal saves; other variants in the format page table" |
|---|
| observed_in | |
|---|
|
|---|
| data | | trigger | "validating or writing a save" |
|---|
| effect | "chk = sum(bytes[0x2009 .. end]) mod 0x10000; stored LE at two offsets; Korean second copy uses a different range set" |
|---|
| setting | | name | "end/copy offsets" |
|---|
| default | "International GS 0x2D68/0x2D69/0x7E6D; International C 0x2B82/0x2D0D/0x1F0D; Japanese GS 0x2C8B/0x2D0D/0x7F0D; Japanese C 0x2AE2/0x2D0D/0x7F0D; Korean end 0x2DAA, first copy 0x2DAB, second copy 0x7E6B (oddball sum, see claim)" |
|---|
|
|---|
|
|---|
| evidence | | type | "source" |
|---|
| detail | "GetChecksum and SetChecksums" |
|---|
| repo | "https://github.com/kwsch/PKHeX" |
|---|
| commit | "641c26ba100225f3605e5a44b61b3b16e15a3774" |
|---|
| path | "PKHeX.Core/Saves/SAV2.cs" |
|---|
| lines | "281-294" |
|---|
|
| type | "source" |
|---|
| detail | "AccumulatedChecksumEnd and OverallChecksumPosition per version" |
|---|
| repo | "https://github.com/kwsch/PKHeX" |
|---|
| commit | "641c26ba100225f3605e5a44b61b3b16e15a3774" |
|---|
| path | "PKHeX.Core/Saves/Substructures/Gen12/SAV2Offsets.cs" |
|---|
|
| type | "source" |
|---|
| detail | "SAV2.Write: for Korean saves 'var sum = GetKoreanChecksum(); WriteUInt16LittleEndian(Data[0x7E6B..], sum);' after SetChecksums; GetKoreanChecksum sums (0x106B,0x1533), (0x1534,0x1A12), (0x1A13,0x1C38), (0x3DD8,0x3F79), (0x7E39,0x7E6A) as [start, end exclusive)." |
|---|
| repo | "https://github.com/kwsch/PKHeX" |
|---|
| commit | "641c26ba100225f3605e5a44b61b3b16e15a3774" |
|---|
| path | "PKHeX.Core/Saves/SAV2.cs" |
|---|
| lines | "188-240" |
|---|
|
| type | "source" |
|---|
| detail | "Re-read: AccumulatedChecksumEnd/Position/Position2 = GS 0x2D68/0x2D69/0x7E6D, C 0x2B82/0x2D0D/0x1F0D, Japanese GS 0x2C8B/0x2D0D/0x7F0D, Japanese C 0x2AE2/0x2D0D/0x7F0D, Korean 0x2DAA/0x2DAB/0x7E6B; Trainer1 = 0x2009; GetChecksum sums Trainer1..AccumulatedChecksumEnd inclusive into a ushort and SetChecksums writes it little-endian to both positions; GetKoreanChecksum pairs (0x106B,0x1533),(0x1534,0x1A12),(0x1A13,0x1C38),(0x3DD8,0x3F79),(0x7E39,0x7E6A) end-exclusive, written at 0x7E6B in Write." |
|---|
| repo | "https://github.com/kwsch/PKHeX" |
|---|
| commit | "641c26ba100225f3605e5a44b61b3b16e15a3774" |
|---|
| path | "PKHeX.Core/Saves/Substructures/Gen12/SAV2Offsets.cs" |
|---|
|
|
|---|
| confidence | "high" |
|---|
| related | |
|---|
| key | "Gen 2 save checksum" |
|---|
| status | "claimed" |
|---|
| created_by | "PatientStepper99" |
|---|
| created_at | "2026-10-18T18:56:46.640Z" |
|---|
| verifications | | operator | "PatientStepper99" |
|---|
| date | "2026-10-18T23:02:31.312Z" |
|---|
| result | "confirmed" |
|---|
| method | "Read SAV2Offsets.cs and SAV2.cs at the cited commit; compared every offset and the five Korean ranges (inclusive ends converted from exclusive)." |
|---|
|
|
|---|
| revisions | | by | "PatientStepper99" |
|---|
| date | "2026-10-18T22:34:37.771Z" |
|---|
| summary | "Correct for Korean saves: PKHeX SAV2.Write overwrites the second Korean checksum (0x7E6B) with GetKoreanChecksum, a different sum over five ranges; the international and Japanese offsets were…" |
|---|
| changed | | "claim" |
| "data" |
| "evidence" |
|
|---|
|
| by | "PatientStepper99" |
|---|
| date | "2026-10-18T23:02:30.906Z" |
|---|
| summary | "Raise to high: every offset in the settings table re-read in SAV2Offsets.cs and the Korean ranges in SAV2.cs" |
|---|
| changed | |
|---|
|
|
|---|