From 3832352dbe71c2c5d748e9b344c359365c7a9a48 Mon Sep 17 00:00:00 2001 From: goyuken Date: Mon, 8 Oct 2012 20:37:41 +0000 Subject: [PATCH] add default RomStatusDetails (name, sha1, md5). add pcecd specific RomStatusDetails generated from the Disc --- BizHawk.Emulation/Consoles/PC Engine/PCEngine.cs | 3 +++ BizHawk.MultiClient/MainForm.cs | 9 +++++++++ 2 files changed, 12 insertions(+) diff --git a/BizHawk.Emulation/Consoles/PC Engine/PCEngine.cs b/BizHawk.Emulation/Consoles/PC Engine/PCEngine.cs index a862fc898d..65683a704f 100644 --- a/BizHawk.Emulation/Consoles/PC Engine/PCEngine.cs +++ b/BizHawk.Emulation/Consoles/PC Engine/PCEngine.cs @@ -77,6 +77,9 @@ namespace BizHawk.Emulation.Consoles.TurboGrafx Type = NecSystemType.TurboCD; this.disc = disc; Init(game, rom); + // the default RomStatusDetails don't do anything with Disc + CoreOutputComm.RomStatusDetails = string.Format( + "{0}\r\nDisk partial hash:{1}", game.Name, disc.GetHash()); } void Init(GameInfo game, byte[] rom) diff --git a/BizHawk.MultiClient/MainForm.cs b/BizHawk.MultiClient/MainForm.cs index f3a929e182..d88cda6e57 100644 --- a/BizHawk.MultiClient/MainForm.cs +++ b/BizHawk.MultiClient/MainForm.cs @@ -1580,6 +1580,15 @@ namespace BizHawk.MultiClient Text = DisplayNameForSystem(game.System) + " - " + game.Name; ResetRewindBuffer(); + if (Global.Emulator.CoreOutputComm.RomStatusDetails == null) + { + Global.Emulator.CoreOutputComm.RomStatusDetails = + string.Format("{0}\r\nSHA1:{1}\r\nMD5:{2}\r\n", + game.Name, + Util.BytesToHexString(System.Security.Cryptography.SHA1.Create().ComputeHash(rom.RomData)), + Util.BytesToHexString(System.Security.Cryptography.MD5.Create().ComputeHash(rom.RomData))); + } + //restarts the lua console if a different rom is loaded. //im not really a fan of how this is done.. if (Global.Config.RecentRoms.IsEmpty() || Global.Config.RecentRoms.GetRecentFileByPosition(0) != file.CanonicalFullPath)