From 1a9f9fcfe58799a3cb70b0ea58ded17b40eef60e Mon Sep 17 00:00:00 2001 From: Kurt Date: Thu, 25 Nov 2021 18:09:05 -0800 Subject: [PATCH] Add more savedata notes --- PKHeX.Core/Saves/SAV8BS.cs | 6 +++--- PKHeX.Core/Saves/Substructures/Gen8/BS/Poketch8b.cs | 2 +- PKHeX.Core/Saves/Substructures/Gen8/BS/SystemData8b.cs | 10 ++++++++-- 3 files changed, 12 insertions(+), 6 deletions(-) diff --git a/PKHeX.Core/Saves/SAV8BS.cs b/PKHeX.Core/Saves/SAV8BS.cs index e6ef78a03..5fce3f54b 100644 --- a/PKHeX.Core/Saves/SAV8BS.cs +++ b/PKHeX.Core/Saves/SAV8BS.cs @@ -42,12 +42,12 @@ public SAV8BS(byte[] data, bool exportable = true) : base(data, exportable) // SaveBallDecoData CapsuleData[99], AffixSealData[20] SealList = new SealList8b(this, 0x93E0C); // size: 0x960 SaveSealData[200] // _RANDOM_GROUP - // FIeldGimmickSaveData; int[3] gearRotate + // FieldGimmickSaveData; int[3] gearRotate BerryTrees = new BerryTreeGrowSave8b(this, 0x94DA8); // size: 0x808 Poffins = new PoffinSaveData8b(this, 0x955B0); // size: 0x644 BattleTower = new BattleTowerWork8b(this, 0x95BF4); // size: 0x1B8 - System = new SystemData8b(this, 0x95DAC); - Poketch = new Poketch8b(this, 0); // todo + System = new SystemData8b(this, 0x95DAC); // size: 0x138 + Poketch = new Poketch8b(this, 0x95EE4); // todo Daycare = new Daycare8b(this, 0x96080); // 0x2C0 // 0x96340 - _DENDOU_SAVEDATA; DENDOU_RECORD[30], POKEMON_DATA_INSIDE[6], ushort[4] ? // BadgeSaveData; byte[8] diff --git a/PKHeX.Core/Saves/Substructures/Gen8/BS/Poketch8b.cs b/PKHeX.Core/Saves/Substructures/Gen8/BS/Poketch8b.cs index deb731cea..2a6695079 100644 --- a/PKHeX.Core/Saves/Substructures/Gen8/BS/Poketch8b.cs +++ b/PKHeX.Core/Saves/Substructures/Gen8/BS/Poketch8b.cs @@ -5,7 +5,7 @@ namespace PKHeX.Core /// /// Details about the Poketch corner app. /// - /// size: ??? + /// size: 0x19C [TypeConverter(typeof(ExpandableObjectConverter))] public sealed class Poketch8b : SaveBlock { diff --git a/PKHeX.Core/Saves/Substructures/Gen8/BS/SystemData8b.cs b/PKHeX.Core/Saves/Substructures/Gen8/BS/SystemData8b.cs index d86e0ba38..acdbee189 100644 --- a/PKHeX.Core/Saves/Substructures/Gen8/BS/SystemData8b.cs +++ b/PKHeX.Core/Saves/Substructures/Gen8/BS/SystemData8b.cs @@ -6,7 +6,7 @@ namespace PKHeX.Core /// /// Details about the Console and specific timestamps. /// - /// size: ??? + /// size: 0x138 [TypeConverter(typeof(ExpandableObjectConverter))] public sealed class SystemData8b : SaveBlock { @@ -15,10 +15,16 @@ public sealed class SystemData8b : SaveBlock // (u32 count, u64 FILETIME) Latest Save Time // (u32 count, u64 FILETIME) Penalty Timeout Time // (u32 count, u64 FILETIME) Last Daily Event Time - // byte[???] Snapshot + // byte[208] ClockSnapshot (char[0x24]) // u32 "fd_bgmEvnet" // s64[6] reserved private const int SIZE_GMTIME = 12; + private const int SIZE_SNAPSHOT = 0xD0; + + private const int OFS_SNAPSHOT = 4 + (3 * SIZE_GMTIME) + SIZE_GMTIME; // 0x34 + private const int OFS_FDBGM = OFS_SNAPSHOT + SIZE_SNAPSHOT; + private const int OFS_RESERVED = OFS_FDBGM + 4; + private const int SIZE_TOTAL = OFS_RESERVED + (6 * 8); // 0x138 public SystemData8b(SAV8BS sav, int offset) : base(sav) => Offset = offset;