Add placeholder v1.2.0 values

Need to repoint offsets and update with the actual hash regions
This commit is contained in:
Kurt 2020-04-22 19:40:35 -07:00
parent 0ff0b02b53
commit 6e72f2e1a9
4 changed files with 57 additions and 1 deletions

View File

@ -111,6 +111,56 @@ public static class FileHashRevision
}),
});
private const uint REVISION_120_ID = 2;
private const int REV_120_MAIN_SAVE_SIZE = 0xACECD0;
private const int REV_120_PERSONAL_SAVE_SIZE = 0x6D6C0;
private const int REV_120_POSTBOX_SAVE_SIZE = REV_110_POSTBOX_SAVE_SIZE;
private const int REV_120_PHOTO_STUDIO_ISLAND_SIZE = 0x2C9C0;
private const int REV_120_PROFILE_SIZE = REV_110_PROFILE_SIZE;
public static readonly FileHashInfo REV_120 = new FileHashInfo(REVISION_120_ID, new[]
{
new FileHashDetails("main.dat", REV_120_MAIN_SAVE_SIZE, new[]
{
new FileHashRegion(0x000110, 0x000114, 0x1D6D5C),
new FileHashRegion(0x1D6E70, 0x1D6E74, 0x323C0C),
new FileHashRegion(0x4FAB90, 0x4FAB94, 0x035AFC),
new FileHashRegion(0x530690, 0x530694, 0x0362BC),
new FileHashRegion(0x566A60, 0x566A64, 0x035AFC),
new FileHashRegion(0x59C560, 0x59C564, 0x0362BC),
new FileHashRegion(0x5D2930, 0x5D2934, 0x035AFC),
new FileHashRegion(0x608430, 0x608434, 0x0362BC),
new FileHashRegion(0x63E800, 0x63E804, 0x035AFC),
new FileHashRegion(0x674300, 0x674304, 0x0362BC),
new FileHashRegion(0x6AA6D0, 0x6AA6D4, 0x035AFC),
new FileHashRegion(0x6E01D0, 0x6E01D4, 0x0362BC),
new FileHashRegion(0x7165A0, 0x7165A4, 0x035AFC),
new FileHashRegion(0x74C0A0, 0x74C0A4, 0x0362BC),
new FileHashRegion(0x782470, 0x782474, 0x035AFC),
new FileHashRegion(0x7B7F70, 0x7B7F74, 0x0362BC),
new FileHashRegion(0x7EE340, 0x7EE344, 0x035AFC),
new FileHashRegion(0x823E40, 0x823E44, 0x0362BC),
new FileHashRegion(0x85A100, 0x85A104, 0x26899C)
}),
new FileHashDetails("personal.dat", REV_120_PERSONAL_SAVE_SIZE, new[]
{
new FileHashRegion(0x00110, 0x00114, 0x35AFC),
new FileHashRegion(0x35C10, 0x35C14, 0x362BC)
}),
new FileHashDetails("postbox.dat", REV_120_POSTBOX_SAVE_SIZE, new[]
{
new FileHashRegion(0x000100, 0x00104, 0xB4448C)
}),
new FileHashDetails("photo_studio_island.dat", REV_120_PHOTO_STUDIO_ISLAND_SIZE, new[]
{
new FileHashRegion(0x000100, 0x00104, 0x262BC)
}),
new FileHashDetails("profile.dat", REV_120_PROFILE_SIZE, new[]
{
new FileHashRegion(0x000100, 0x00104, 0x6945C)
}),
});
#endregion
}
}
}

View File

@ -13,6 +13,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
};
private static readonly FileHeaderInfo[] RevisionInfo =
@ -23,6 +24,7 @@ public static class RevisionChecker
new FileHeaderInfo { Major = 0x6D, Minor = 0x78, HeaderRevision = 0, Unk1 = 2, SaveRevision = 3, Unk2 = 2 }, // 1.1.2
new FileHeaderInfo { Major = 0x6D, Minor = 0x78, HeaderRevision = 0, Unk1 = 2, SaveRevision = 4, Unk2 = 2 }, // 1.1.3
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
};
public static readonly IReadOnlyList<SaveFileSizes> SizeInfo = new[]
@ -33,6 +35,7 @@ public static class RevisionChecker
SizesByRevision[1], // 1.1.2
SizesByRevision[1], // 1.1.3
SizesByRevision[1], // 1.1.4
SizesByRevision[2], // 1.2.0
};
public static readonly IReadOnlyList<FileHashInfo> HashInfo = new[]
@ -43,6 +46,7 @@ public static class RevisionChecker
FileHashRevision.REV_110, // 1.1.2
FileHashRevision.REV_110, // 1.1.3
FileHashRevision.REV_110, // 1.1.4
FileHashRevision.REV_120, // 1.2.0
};
public static bool IsRevisionKnown(this FileHeaderInfo info) => info.GetKnownRevisionIndex() >= 0;

View File

@ -44,6 +44,7 @@ public static MainSaveOffsets GetOffsets(FileHeaderInfo Info)
3 => new MainSaveOffsets11(),
4 => new MainSaveOffsets11(),
5 => new MainSaveOffsets11(),
6 => new MainSaveOffsets11(),
_ => throw new IndexOutOfRangeException("Unknown revision!"),
};
}

View File

@ -39,6 +39,7 @@ public static PersonalOffsets GetOffsets(FileHeaderInfo Info)
3 => new PersonalOffsets11(),
4 => new PersonalOffsets11(),
5 => new PersonalOffsets11(),
6 => new PersonalOffsets11(),
_ => throw new IndexOutOfRangeException("Unknown revision!"),
};
}