/// <summary>Checks to see if the data belongs to a Gen4 Battle Revolution save</summary> /// <param name="data">Save data of which to determine the type</param> /// <returns>Version Identifier or Invalid if type cannot be determined.</returns> internal static GameVersion GetIsG4BRSAV(byte[] data) { if (data.Length != SIZE_G4BR) return Invalid; byte[] sav = SAV4BR.DecryptPBRSaveData(data); return SAV4BR.IsChecksumsValid(sav) ? BATREV : Invalid; }
/// <summary>Checks to see if the data belongs to a Gen4 Battle Revolution save</summary> /// <param name="data">Save data of which to determine the type</param> /// <returns>Version Identifier or Invalid if type cannot be determined.</returns> internal static GameVersion GetIsG4BRSAV(byte[] data) { if (data.Length != SIZE_G4BR) { return(GameVersion.Invalid); } byte[] sav = SAV4BR.DecryptPBRSaveData(data); return(SAV4BR.IsChecksumsValid(sav) ? GameVersion.BATREV : GameVersion.Invalid); }
/// <summary>Determines the type of 4th gen Battle Revolution</summary> /// <param name="data">Save data of which to determine the type</param> /// <returns>Version Identifier or Invalid if type cannot be determined.</returns> public static GameVersion getIsG4BRSAV(byte[] data) { if (data.Length != SIZE_G4BR) { return(GameVersion.Invalid); } byte[] sav = SAV4BR.DecryptPBRSaveData(data); bool valid = SAV4BR.VerifyChecksum(sav, 0, 0x1C0000, 0x1BFF80); valid &= SAV4BR.VerifyChecksum(sav, 0, 0x100, 8); valid &= SAV4BR.VerifyChecksum(sav, 0x1C0000, 0x1C0000, 0x1BFF80 + 0x1C0000); valid &= SAV4BR.VerifyChecksum(sav, 0x1C0000, 0x100, 0x1C0008); return(valid ? GameVersion.BATREV : GameVersion.Invalid); }