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.
This commit is contained in:
vadosnaprimer 2023-04-09 21:38:56 +03:00
parent 8aa03c3059
commit b4394af824
3 changed files with 36 additions and 1 deletions

View File

@ -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;

View File

@ -33,6 +33,10 @@
Unknown,
Bios,
Overdump,
NotInDatabase
NotInDatabase,
// MAME
Imperfect,
Unimplemented,
NotWorking
}
}

View File

@ -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()