Pokémon XY Save File Structure
X/Y Save files are comprised of 4 sections, the latter two storing the contents of the two savegames.
The game alternates between the two game saves similar to Generations 3 & 4.
Save files are 0x100000 (1MB). The area between sections is either FF or 00, for Cartridges and Digital saves respectively.
Single Partition Save File
http://3dbrew.org/wiki/Savegames
Image Header (0x00000-0x00460)
Offset | Length | Value | Description |
00000 | 0x10 | -- | AES MAC Header |
00100 | 0x100 | -- | DISA |
00200 | 0x130 | -- | DIFI Blob 1 |
00330 | 0x130 | -- | DIFI Blob 2 |
First Partition (0x01000-0x01107)
Offset | Description |
01000 | DPFS Partition |
Save File 1 (0x02000 - 0x6AFFF)
(420 KB)
Offset | Description |
02000 | IVFC Hash Region |
03000 | SAVE Header (0x3F0 medias, 0x200 length) = 0x7E000 total |
03100 | SAVE Data |
ID | Start | Length | CHK | Description |
0000 | 05400 | 000002C8 | 6A81A | 05400 - Pokepuff Inventory (Index * 100ct) 05464 - u32 counter |
0001 | 05800 | 00000B88 | 6A822 | 05800 - Items Pocket 05E40 - Key Items Pocket 05FC0 - TM Pocket 06168 - Medicine Pocket 06268 - Berry Pocket |
0002 | 06400 | 0000002C | 6A82A | Select Bound Items |
0003 | 06600 | 00000038 | 6A82A | ???? |
0004 | 06800 | 00000150 | 6A83A | Trainer Stat Flags (Style) |
0005 | 06A00 | 00000004 | 6A842 | ???? |
0006 | 06C00 | 00000008 | 6A84A | ???? |
0007 | 06E00 | 000001C0 | 6A852 | Wardrobe (Bitflags) & Saved Outfits (Index #s) |
0008 | 07000 | 000000BE | 6A85A | u16/u8 storage |
0009 | 07200 | 00000024 | 6A862 | FFFFFFFF |
000A | 07400 | 00002100 | 6A86A | Overworld Data |
000B | 09600 | 00000140 | 6A872 | Trainer Information ($) |
000C | 09800 | 00000440 | 6A87A | Box Names [0x22] Box Name (* 31) [0x22] Extra Flag Related data |
000D | 09E00 | 00000574 | 6A882 | Battle Box |
000E | 0A400 | 00004E28 | 6A88A | PSS Data - Friends |
000F | 0F400 | 00004E28 | 6A892 | PSS Data - Acquaintances |
0010 | 14400 | 00004E28 | 6A89A | PSS Data - Passerby |
0011 | 19400 | 00000170 | 6A8A2 | Trainer Card (ID/SID/OT/Greeting) |
0012 | 19600 | 0000061C | 6A8AA | Party Members |
0013 | 19E00 | 00000504 | 6A8B2 | Constant & Event Flags |
0014 | 1A400 | 000006A0 | 6A8BA | Pokedex |
0015 | 1AC00 | 00000644 | 6A8C2 | Sorted Variables |
0016 | 1B400 | 00000104 | 6A8CA | Fused Zekrom/Reshiram Storage |
0017 | 1B600 | 00000004 | 6A8D2 | ???? |
0018 | 1B800 | 00000420 | 6A8DA | ???? |
0019 | 1BE00 | 00000064 | 6A8E2 | O-Power Flags |
001A | 1C000 | 000003F0 | 6A8EA | ???? |
001B | 1C400 | 0000070C | 6A8F2 | User Metadata |
001C | 1CC00 | 00000180 | 6A8FA | GTS Upload & Match Criteria |
001D | 1CE00 | 00000004 | 6A902 | ???? |
001E | 1D000 | 0000000C | 6A90A | ???? |
001F | 1D200 | 00000048 | 6A912 | ???? |
0020 | 1D400 | 00000054 | 6A91A | ???? |
0021 | 1D600 | 00000644 | 6A922 | WiFi Tournament Data |
0022 | 1DE00 | 000005C8 | 6A92A | Live Tournament Data |
0023 | 1E400 | 000002F8 | 6A932 | MAC Address & Network Connection Logging |
0024 | 1E800 | 00001B40 | 6A93A | Hall of Fame Data (First Game Clear + 15 Latest) |
0025 | 20400 | 000001F4 | 6A942 | Maison Data
|
0026 | 20600 | 000001F0 | 6A94A | Daycare Data |
0027 | 20800 | 00000216 | 6A952 | Egg Data |
0028 | 20C00 | 00000390 | 6A95A | Berry Field Data (0x18 per tree, 36 trees) |
0029 | 21000 | 00001A90 | 6A962 | Wondercard Data 0x100 bitflag-card received storage Wondercard slots (0x108 between) |
002A | 22C00 | 00000308 | 6A96A | EBUS Pokemon Storage |
002B | 23000 | 00000618 | 6A972 | Friend Safari Data |
002C | 23800 | 0000025C | 6A97A | PSS Data |
002D | 23C00 | 00000834 | 6A982 | Medals |
002E | 24600 | 00000318 | 6A98A | Species related history |
002F | 24A00 | 000007D0 | 6A992 | ???? |
0030 | 25200 | 00000C48 | 6A99A | Pokemon Bank Gifts |
0031 | 26000 | 00000078 | 6A9A2 | ???? |
0032 | 26200 | 00000200 | 6A9AA | PGL Promotion Gifts |
0033 | 26400 | 00000C84 | 6A9B2 | ???? |
0034 | 27200 | 00000628 | 6A9BA | ???? |
0035 | 27A00 | 00034AD0 | 6A9C2 | Box Data (31 Boxes, 30 Slots, 232 bytes each) |
0036 | 5C600 | 0000E058 | 6A9CA | Picture Data (JPEG Exif Ver 2.2) ~ 5C654 starts the JPEG (FF D8 marker) - Sent to PGL |
---- | 6A800 | 00000800 | ----- | Checksum Storage [0x14] Header: u64 savetime1 & u64 savetime2, u16 BEEF magic [0x10] Checksum Entries: u32 len, u16 ID, u16 checksum (ccitt16, 0xFFFF initial) |
Save File 2 (0x81000 - 0xE9FFF)
(420 KB)
Same as Game Save 1's offsets; add 0x7F000.
IVFC Hash Region
SHA256 Hash over a 0x1000 large block (4096 bytes).
Start | End | Hash Location |
???? | ???? | 2000 - First Hash |
???? | ???? | 2020 - Second Hash |
3000 | 3FFF | 2040 |
4000 | 4FFF | 2060 |
5000 | 5FFF | 2080 |
6000 | 6FFF | 20A0 |
7000 | 7FFF | 20C0 |
8000 | 8FFF | 20E0 |
9000 | 9FFF | 2100 |
A000 | AFFF | 2120 |
B000 | BFFF | 2140 |
C000 | CFFF | 2160 |
D000 | DFFF | 2180 |
E000 | EFFF | 21A0 |
F000 | FFFF | 21C0 |
10000 | 10FFF | 21E0 |
11000 | 11FFF | 2200 |
12000 | 12FFF | 2220 |
13000 | 13FFF | 2240 |
14000 | 14FFF | 2260 |
15000 | 15FFF | 2280 |
16000 | 16FFF | 22A0 |
17000 | 17FFF | 22C0 |
18000 | 18FFF | 22E0 |
19000 | 19FFF | 2300 |
1A000 | 1AFFF | 2320 |
1B000 | 1BFFF | 2340 |
1C000 | 1CFFF | 2360 |
1D000 | 1DFFF | 2380 |
1E000 | 1EFFF | 23A0 |
1F000 | 1FFFF | 23C0 |
20000 | 20FFF | 23E0 |
21000 | 21FFF | 2400 |
22000 | 22FFF | 2420 |
23000 | 23FFF | 2440 |
24000 | 24FFF | 2460 |
25000 | 25FFF | 2480 |
26000 | 26FFF | 24A0 |
27000 | 27FFF | 24C0 |
28000 | 28FFF | 24E0 |
29000 | 29FFF | 2500 |
2A000 | 2AFFF | 2520 |
2B000 | 2BFFF | 2540 |
2C000 | 2CFFF | 2560 |
2D000 | 2DFFF | 2580 |
2E000 | 2EFFF | 25A0 |
2F000 | 2FFFF | 25C0 |
30000 | 30FFF | 25E0 |
31000 | 31FFF | 2600 |
32000 | 32FFF | 2620 |
33000 | 33FFF | 2640 |
34000 | 34FFF | 2660 |
35000 | 35FFF | 2680 |
36000 | 36FFF | 26A0 |
37000 | 37FFF | 26C0 |
38000 | 38FFF | 26E0 |
39000 | 39FFF | 2700 |
3A000 | 3AFFF | 2720 |
3B000 | 3BFFF | 2740 |
3C000 | 3CFFF | 2760 |
3D000 | 3DFFF | 2780 |
3E000 | 3EFFF | 27A0 |
3F000 | 3FFFF | 27C0 |
40000 | 40FFF | 27E0 |
41000 | 41FFF | 2800 |
42000 | 42FFF | 2820 |
43000 | 43FFF | 2840 |
44000 | 44FFF | 2860 |
45000 | 45FFF | 2880 |
46000 | 46FFF | 28A0 |
47000 | 47FFF | 28C0 |
48000 | 48FFF | 28E0 |
49000 | 49FFF | 2900 |
4A000 | 4AFFF | 2920 |
4B000 | 4BFFF | 2940 |
4C000 | 4CFFF | 2960 |
4D000 | 4DFFF | 2980 |
4E000 | 4EFFF | 29A0 |
4F000 | 4FFFF | 29C0 |
50000 | 50FFF | 29E0 |
51000 | 51FFF | 2A00 |
52000 | 52FFF | 2A20 |
53000 | 53FFF | 2A40 |
54000 | 54FFF | 2A60 |
55000 | 55FFF | 2A80 |
56000 | 56FFF | 2AA0 |
57000 | 57FFF | 2AC0 |
58000 | 58FFF | 2AE0 |
59000 | 59FFF | 2B00 |
5A000 | 5AFFF | 2B20 |
5B000 | 5BFFF | 2B40 |
5C000 | 5CFFF | 2B60 |
5D000 | 5DFFF | 2B80 |
5E000 | 5EFFF | 2BA0 |
5F000 | 5FFFF | 2BC0 |
60000 | 60FFF | 2BE0 |
61000 | 61FFF | 2C00 |
62000 | 62FFF | 2C20 |
63000 | 63FFF | 2C40 |
64000 | 64FFF | 2C60 |
65000 | 65FFF | 2C80 |
66000 | 66FFF | 2CA0 |
67000 | 67FFF | 2CC0 |
68000 | 68FFF | 2CE0 |
69000 | 69FFF | 2D00 |
6A000 | 6AFFF | 2D20 |