add "FirmwareSHA1" to movie header for SGB and PCECD

This commit is contained in:
goyuken 2012-10-05 21:04:46 +00:00
parent a080889483
commit 2229b0ab93
4 changed files with 10 additions and 3 deletions

View File

@ -29,6 +29,7 @@ namespace BizHawk
public string Hash;
public RomStatus Status = RomStatus.NotInDatabase;
public bool NotInDatabase = true;
public string FirmwareHash;
Dictionary<string, string> Options = new Dictionary<string, string>();

View File

@ -1385,6 +1385,8 @@ namespace BizHawk.MultiClient
if (Global.Config.PceEqualizeVolume) game.AddOption("EqualizeVolumes");
if (Global.Config.PceArcadeCardRewindHack) game.AddOption("ArcadeRewindHack");
game.FirmwareHash = Util.BytesToHexString(System.Security.Cryptography.SHA1.Create().ComputeHash(rom.RomData));
nextEmulator = new PCEngine(game, disc, rom.RomData);
break;
}
@ -1506,6 +1508,7 @@ namespace BizHawk.MultiClient
game.AddOption("SGB");
var snes = new LibsnesCore();
nextEmulator = snes;
game.FirmwareHash = Util.BytesToHexString(System.Security.Cryptography.SHA1.Create().ComputeHash(sgbrom));
snes.Load(game, rom.FileData, sgbrom, deterministicemulation);
}
}

View File

@ -58,8 +58,8 @@ namespace BizHawk.MultiClient
if (result == System.Windows.Forms.DialogResult.Cancel)
return;
}
MovieToRecord = new Movie(path);
//Header
@ -72,6 +72,8 @@ namespace BizHawk.MultiClient
{
MovieToRecord.Header.SetHeaderLine(MovieHeader.GAMENAME, PathManager.FilesystemSafeName(Global.Game));
MovieToRecord.Header.SetHeaderLine(MovieHeader.SHA1, Global.Game.Hash);
if (Global.Game.FirmwareHash != null)
MovieToRecord.Header.SetHeaderLine(MovieHeader.FIRMWARESHA1, Global.Game.FirmwareHash);
}
else
{
@ -123,7 +125,7 @@ namespace BizHawk.MultiClient
}
else
MessageBox.Show("Please select a movie to record", "File selection error", MessageBoxButtons.OK, MessageBoxIcon.Error);
}
private void Cancel_Click(object sender, EventArgs e)

View File

@ -28,6 +28,7 @@ namespace BizHawk.MultiClient
public const string STARTSFROMSAVESTATE = "StartsFromSavestate";
public const string FOURSCORE = "FourScore";
public const string SHA1 = "SHA1";
public const string FIRMWARESHA1 = "FirmwareSHA1";
//Gameboy Settings that affect sync
public const string GB_FORCEDMG = "Force_DMG_Mode";