add new field to gamedb to specify which core should be used.

allow it to be 'neshawk' or 'quicknes'.

this should only be employed by end-users; we won't make those choices in the gamedb officially.

the quicknes blacklist is still implemented separately.

yeah, that's a lot of prioritization levels.
This commit is contained in:
zeromus 2016-11-12 19:23:54 -06:00
parent c7b639be28
commit 595a207c97
8 changed files with 427 additions and 380 deletions

View File

@ -744,16 +744,29 @@ namespace BizHawk.Client.Common
break;
case "NES":
if (!Global.Config.NES_InQuickNES || forceAccurateCore)
{
core = CoreInventory.Instance["NES", "NesHawk"];
}
else
{
core = CoreInventory.Instance["NES", "QuickNes"];
}
//apply main spur-of-the-moment switcheroo as lowest priority
string preference = "neshawk";
if(Global.Config.NES_InQuickNES) preference = "quicknes";
//if user has saw fit to override in gamedb, apply that
if(Global.Config.CoreForcingViaGameDB)
preference = game.ForcedCore;
//but only neshawk is accurate
if (forceAccurateCore) preference = "neshawk";
if (preference == "neshawk")
{
core = CoreInventory.Instance["NES", "NesHawk"];
}
else
{
core = CoreInventory.Instance["NES", "QuickNes"];
}
}
break;
case "GB":
case "GBC":
if (!Global.Config.GB_AsSGB)

View File

@ -513,6 +513,7 @@ namespace BizHawk.Client.Common
public bool NES_InQuickNES = true;
public bool SNES_InSnes9x = false;
public bool GBA_UsemGBA = false;
public bool CoreForcingViaGameDB = true;
public string LibretroCore;
}

File diff suppressed because it is too large Load Diff

View File

@ -1173,6 +1173,7 @@ namespace BizHawk.Client.EmuHawk
GBInSGBMenuItem.Checked = Global.Config.GB_AsSGB;
NesInQuickNESMenuItem.Checked = Global.Config.NES_InQuickNES;
gBAWithMGBAToolStripMenuItem.Checked = Global.Config.GBA_UsemGBA;
allowGameDBCoreOverridesToolStripMenuItem.Checked = Global.Config.CoreForcingViaGameDB;
}
private void CoreSNESSubMenu_DropDownOpened(object sender, EventArgs e)

View File

@ -4152,5 +4152,10 @@ namespace BizHawk.Client.EmuHawk
quickNESToolStripMenuItem.Checked = Global.Config.NES_InQuickNES == true;
nesHawkToolStripMenuItem.Checked = Global.Config.NES_InQuickNES == false;
}
private void allowGameDBCoreOverridesToolStripMenuItem_Click(object sender, EventArgs e)
{
Global.Config.CoreForcingViaGameDB ^= true;
}
}
}

View File

@ -138,7 +138,7 @@
<data name="FirmwaresMenuItem.Image" type="System.Drawing.Bitmap, System.Drawing" mimetype="application/x-microsoft.net.object.bytearray.base64">
<value>
iVBORw0KGgoAAAANSUhEUgAAABAAAAAQCAYAAAAf8/9hAAAABGdBTUEAALGPC/xhBQAAACBjSFJNAAB6
JgAAgIQAAPoAAACA6AAAdTAAAOpgAAA6mAAAF3CculE8AAAACXBIWXMAABBDAAAQQwHDBU0eAAAAcElE
JgAAgIQAAPoAAACA6AAAdTAAAOpgAAA6mAAAF3CculE8AAAACXBIWXMAABBBAAAQQQG8+46XAAAAcElE
QVQ4T82Q4QoAIQiDffR7804DY+pOov5c8GltwyiRR8YVTLTFOsWK2iA0eAapQkPOznwRGnJ25rX87AmK
/3ruFCvhCR9oclI8PNggJHg7A46w4rf5zY6H8jlAxQQOKMPWBswSIpmloXkEFbeR8QKDpKJKL1M/dQAA
AABJRU5ErkJggg==
@ -563,7 +563,7 @@
<data name="toolStripMenuItem11.Image" type="System.Drawing.Bitmap, System.Drawing" mimetype="application/x-microsoft.net.object.bytearray.base64">
<value>
iVBORw0KGgoAAAANSUhEUgAAABAAAAAQCAYAAAAf8/9hAAAABGdBTUEAALGPC/xhBQAAACBjSFJNAAB6
JgAAgIQAAPoAAACA6AAAdTAAAOpgAAA6mAAAF3CculE8AAAACXBIWXMAABBDAAAQQwHDBU0eAAAAcElE
JgAAgIQAAPoAAACA6AAAdTAAAOpgAAA6mAAAF3CculE8AAAACXBIWXMAABBBAAAQQQG8+46XAAAAcElE
QVQ4T82Q4QoAIQiDffR7804DY+pOov5c8GltwyiRR8YVTLTFOsWK2iA0eAapQkPOznwRGnJ25rX87AmK
/3ruFCvhCR9oclI8PNggJHg7A46w4rf5zY6H8jlAxQQOKMPWBswSIpmloXkEFbeR8QKDpKJKL1M/dQAA
AABJRU5ErkJggg==

View File

@ -17,6 +17,7 @@ namespace BizHawk.Emulation.Common
public string Hash { get; set; }
public string Region { get; set; }
public RomStatus Status { get; set; }
public string ForcedCore { get; set; }
}
public static class Database
@ -192,6 +193,11 @@ namespace BizHawk.Emulation.Common
game.System = items[3];
game.MetaData = items.Length >= 6 ? items[5] : null;
game.Region = items.Length >= 7 ? items[6] : string.Empty;
game.ForcedCore = items.Length >= 8 ? items[7].ToLowerInvariant() : string.Empty;
if (items.Length >= 8)
{
int zzz = 9;
}
if (db.ContainsKey(game.Hash))
{

View File

@ -20,6 +20,7 @@ namespace BizHawk.Emulation.Common
public RomStatus Status = RomStatus.NotInDatabase;
public bool NotInDatabase = true;
public string FirmwareHash;
public string ForcedCore;
Dictionary<string, string> Options = new Dictionary<string, string>();
@ -43,6 +44,7 @@ namespace BizHawk.Emulation.Common
Hash = "",
Region = "",
Status = RomStatus.GoodDump,
ForcedCore = "",
NotInDatabase = false
};
}
@ -60,6 +62,7 @@ namespace BizHawk.Emulation.Common
Hash = cgi.Hash;
Region = cgi.Region;
Status = cgi.Status;
ForcedCore = cgi.ForcedCore;
NotInDatabase = false;
ParseOptionsDictionary(cgi.MetaData);
}