From b4394af8246542dd460ebcfaf6017432e3932d72 Mon Sep 17 00:00:00 2001 From: vadosnaprimer Date: Sun, 9 Apr 2023 21:38:56 +0300 Subject: [PATCH] mame: report emulation status via rom info icon and text mame won't care too much about how good the dump is, but it will warn you in orange that emulation is imperfect, and in red if it's broken. we happen to use rom status icon to inform the user about multidisk bundle, so using it for mame info feels natural, because it directly affects what users can safely submit to tasvideos. we warn them about bad dumps because it's banned for pub, so it's similar here. --- src/BizHawk.Client.EmuHawk/MainForm.cs | 15 +++++++++++++++ src/BizHawk.Emulation.Common/Enums.cs | 6 +++++- src/BizHawk.Emulation.Cores/Arcades/MAME/MAME.cs | 16 ++++++++++++++++ 3 files changed, 36 insertions(+), 1 deletion(-) diff --git a/src/BizHawk.Client.EmuHawk/MainForm.cs b/src/BizHawk.Client.EmuHawk/MainForm.cs index 51ad267229..95a2d060f7 100644 --- a/src/BizHawk.Client.EmuHawk/MainForm.cs +++ b/src/BizHawk.Client.EmuHawk/MainForm.cs @@ -1884,6 +1884,21 @@ namespace BizHawk.Client.EmuHawk DumpStatusButton.Image = Properties.Resources.Hack; DumpStatusButton.ToolTipText = "Warning: ROM of Unknown Character"; } + else if (Game.Status == RomStatus.Imperfect) + { + DumpStatusButton.Image = Properties.Resources.RetroQuestion; + DumpStatusButton.ToolTipText = "Warning: Imperfect emulation"; + } + else if (Game.Status == RomStatus.Unimplemented) + { + DumpStatusButton.Image = Properties.Resources.ExclamationRed; + DumpStatusButton.ToolTipText = "Warning: Unemulated features"; + } + else if (Game.Status == RomStatus.NotWorking) + { + DumpStatusButton.Image = Properties.Resources.ExclamationRed; + DumpStatusButton.ToolTipText = "Warning: The game does not work"; + } else { DumpStatusButton.Image = Properties.Resources.GreenCheck; diff --git a/src/BizHawk.Emulation.Common/Enums.cs b/src/BizHawk.Emulation.Common/Enums.cs index d5355850bd..2319010244 100644 --- a/src/BizHawk.Emulation.Common/Enums.cs +++ b/src/BizHawk.Emulation.Common/Enums.cs @@ -33,6 +33,10 @@ Unknown, Bios, Overdump, - NotInDatabase + NotInDatabase, + // MAME + Imperfect, + Unimplemented, + NotWorking } } diff --git a/src/BizHawk.Emulation.Cores/Arcades/MAME/MAME.cs b/src/BizHawk.Emulation.Cores/Arcades/MAME/MAME.cs index 339aefa700..ceca229ed4 100644 --- a/src/BizHawk.Emulation.Cores/Arcades/MAME/MAME.cs +++ b/src/BizHawk.Emulation.Cores/Arcades/MAME/MAME.cs @@ -38,6 +38,22 @@ namespace BizHawk.Emulation.Cores.Arcades.MAME _gameFullName + "\r\n\r\n" + text + (text == "" ? "" : "\r\n") + string.Join("\r\n", _romHashes.Select(static r => $"{r.Value} - {r.Key}")); + + if (text.ToLower().Contains("imperfect")) + { + lp.Game.Status = RomStatus.Imperfect; + } + + if (text.ToLower().Contains("unemulated")) + { + lp.Game.Status = RomStatus.Unimplemented; + } + + if (text.ToLower().Contains("doesn't work")) + { + lp.Game.Status = RomStatus.NotWorking; + } + }; _exe = new(new()