Add sizes and stuff

Still need hash locations (placeholder for now)
Still need offset remaps for main/personal
This commit is contained in:
Kurt
2020-07-02 21:02:22 -05:00
parent 014c88b553
commit c45fdc41d7
2 changed files with 54 additions and 0 deletions

View File

@@ -161,6 +161,56 @@ public static class FileHashRevision
}),
});
private const uint REVISION_130_ID = 3;
private const int REV_130_MAIN_SAVE_SIZE = 0xACED80;
private const int REV_130_PERSONAL_SAVE_SIZE = 0x6D6D0;
private const int REV_130_POSTBOX_SAVE_SIZE = REV_110_POSTBOX_SAVE_SIZE;
private const int REV_130_PHOTO_STUDIO_ISLAND_SIZE = REV_120_PHOTO_STUDIO_ISLAND_SIZE;
private const int REV_130_PROFILE_SIZE = REV_110_PROFILE_SIZE;
public static readonly FileHashInfo REV_130 = new FileHashInfo(REVISION_130_ID, new[]
{
new FileHashDetails("main.dat", REV_130_MAIN_SAVE_SIZE, new[]
{
new FileHashRegion(0x000110, 0x000114, 0x1D6D5C),
new FileHashRegion(0x1D6E70, 0x1D6E74, 0x323EBC),
new FileHashRegion(0x4FAE40, 0x4FAE44, 0x035D2C),
new FileHashRegion(0x530B70, 0x530B74, 0x03787C),
new FileHashRegion(0x568500, 0x568504, 0x035D2C),
new FileHashRegion(0x59E230, 0x59E234, 0x03787C),
new FileHashRegion(0x5D5BC0, 0x5D5BC4, 0x035D2C),
new FileHashRegion(0x60B8F0, 0x60B8F4, 0x03787C),
new FileHashRegion(0x643280, 0x643284, 0x035D2C),
new FileHashRegion(0x678FB0, 0x678FB4, 0x03787C),
new FileHashRegion(0x6B0940, 0x6B0944, 0x035D2C),
new FileHashRegion(0x6E6670, 0x6E6674, 0x03787C),
new FileHashRegion(0x71E000, 0x71E004, 0x035D2C),
new FileHashRegion(0x753D30, 0x753D34, 0x03787C),
new FileHashRegion(0x78B6C0, 0x78B6C4, 0x035D2C),
new FileHashRegion(0x7C13F0, 0x7C13F4, 0x03787C),
new FileHashRegion(0x7F8D80, 0x7F8D84, 0x035D2C),
new FileHashRegion(0x82EAB0, 0x82EAB4, 0x03787C),
new FileHashRegion(0x866330, 0x866334, 0x26899C)
}),
new FileHashDetails("personal.dat", REV_130_PERSONAL_SAVE_SIZE, new[]
{
new FileHashRegion(0x00110, 0x00114, 0x35D2C),
new FileHashRegion(0x35E40, 0x35E44, 0x3787C)
}),
new FileHashDetails("postbox.dat", REV_130_POSTBOX_SAVE_SIZE, new[]
{
new FileHashRegion(0x000100, 0x00104, 0xB4448C)
}),
new FileHashDetails("photo_studio_island.dat", REV_130_PHOTO_STUDIO_ISLAND_SIZE, new[]
{
new FileHashRegion(0x000100, 0x00104, 0x2C8BC)
}),
new FileHashDetails("profile.dat", REV_130_PROFILE_SIZE, new[]
{
new FileHashRegion(0x000100, 0x00104, 0x6945C)
}),
});
#endregion
}
}

View File

@@ -14,6 +14,7 @@ public static class RevisionChecker
new SaveFileSizes(0xAC0938, 0x6BC50, 0x263B4, 0xB44580, 0x69508), // 1.0.0
new SaveFileSizes(0xAC2AA0, 0x6BED0, 0x263C0, 0xB44590, 0x69560), // 1.1.0
new SaveFileSizes(0xACECD0, 0x6D6C0, 0x2C9C0, 0xB44590, 0x69560), // 1.2.0
new SaveFileSizes(0xACED80, 0x6D6D0, 0x2C9C0, 0xB44590, 0x69560), // 1.3.0
};
private static readonly FileHeaderInfo[] RevisionInfo =
@@ -26,6 +27,7 @@ public static class RevisionChecker
new FileHeaderInfo { Major = 0x6D, Minor = 0x78, HeaderRevision = 0, Unk1 = 2, SaveRevision = 5, Unk2 = 2 }, // 1.1.4
new FileHeaderInfo { Major = 0x20006, Minor = 0x20008, HeaderRevision = 0, Unk1 = 2, SaveRevision = 6, Unk2 = 2 }, // 1.2.0
new FileHeaderInfo { Major = 0x20006, Minor = 0x20008, HeaderRevision = 0, Unk1 = 2, SaveRevision = 7, Unk2 = 2 }, // 1.2.1
new FileHeaderInfo { Major = 0x40002, Minor = 0x40008, HeaderRevision = 0, Unk1 = 2, SaveRevision = 8, Unk2 = 2 }, // 1.3.0
};
public static readonly IReadOnlyList<SaveFileSizes> SizeInfo = new[]
@@ -38,6 +40,7 @@ public static class RevisionChecker
SizesByRevision[1], // 1.1.4
SizesByRevision[2], // 1.2.0
SizesByRevision[2], // 1.2.1
SizesByRevision[3], // 1.3.0
};
public static readonly IReadOnlyList<FileHashInfo> HashInfo = new[]
@@ -50,6 +53,7 @@ public static class RevisionChecker
FileHashRevision.REV_110, // 1.1.4
FileHashRevision.REV_120, // 1.2.0
FileHashRevision.REV_120, // 1.2.1
FileHashRevision.REV_130, // 1.3.0
};
public static bool IsRevisionKnown(this FileHeaderInfo info) => info.GetKnownRevisionIndex() >= 0;