wire up more pce core picker
This commit is contained in:
parent
d9eb9c86ec
commit
e332096731
src
BizHawk.Client.Common
BizHawk.Client.EmuHawk
BizHawk.Emulation.Cores
|
@ -837,7 +837,15 @@ namespace BizHawk.Client.Common
|
|||
switch (game.System)
|
||||
{
|
||||
default:
|
||||
core = CoreInventory.Instance[game.System];
|
||||
if (Global.Config.PreferredCores.TryGetValue(game.System, out string coreName))
|
||||
{
|
||||
core = CoreInventory.Instance[game.System, coreName];
|
||||
}
|
||||
else
|
||||
{
|
||||
core = CoreInventory.Instance[game.System];
|
||||
}
|
||||
|
||||
break;
|
||||
|
||||
case null:
|
||||
|
|
|
@ -324,7 +324,8 @@ namespace BizHawk.Client.Common
|
|||
["SNES"] = CoreNames.Snes9X,
|
||||
["GB"] = CoreNames.Gambatte,
|
||||
["PCE"] = CoreNames.PceHawk,
|
||||
["PCECD"] = CoreNames.PceHawk
|
||||
["PCECD"] = CoreNames.PceHawk,
|
||||
["SGX"] = CoreNames.PceHawk
|
||||
};
|
||||
|
||||
// ReSharper disable once UnusedMember.Global
|
||||
|
|
|
@ -193,8 +193,11 @@
|
|||
this.CorebsnesMenuItem = new System.Windows.Forms.ToolStripMenuItem();
|
||||
this.SGBCoreSubmenu = new System.Windows.Forms.ToolStripMenuItem();
|
||||
this.SgbBsnesMenuItem = new System.Windows.Forms.ToolStripMenuItem();
|
||||
this.PceHawkMenuItem = new System.Windows.Forms.ToolStripMenuItem();
|
||||
this.TurboNymaMenuItem = new System.Windows.Forms.ToolStripMenuItem();
|
||||
this.SgbSameBoyMenuItem = new System.Windows.Forms.ToolStripMenuItem();
|
||||
this.GBCoreSubmenu = new System.Windows.Forms.ToolStripMenuItem();
|
||||
this.PceCoreSubmenu = new System.Windows.Forms.ToolStripMenuItem();
|
||||
this.GBGambatteMenuItem = new System.Windows.Forms.ToolStripMenuItem();
|
||||
this.GBGBHawkMenuItem = new System.Windows.Forms.ToolStripMenuItem();
|
||||
this.GBInSGBMenuItem = new System.Windows.Forms.ToolStripMenuItem();
|
||||
|
@ -1789,6 +1792,7 @@
|
|||
this.CoreSNESSubMenu,
|
||||
this.SGBCoreSubmenu,
|
||||
this.GBCoreSubmenu,
|
||||
this.PceCoreSubmenu,
|
||||
this.GBInSGBMenuItem,
|
||||
this.toolStripMenuItem16,
|
||||
this.AllowGameDbCoreOverridesMenuItem,
|
||||
|
@ -1879,6 +1883,16 @@
|
|||
this.SGBCoreSubmenu.Text = "SGB";
|
||||
this.SGBCoreSubmenu.DropDownOpened += new System.EventHandler(this.SGBCoreSubmenu_DropDownOpened);
|
||||
//
|
||||
// PceCoreSubmenu
|
||||
//
|
||||
this.PceCoreSubmenu.DropDownItems.AddRange(new System.Windows.Forms.ToolStripItem[] {
|
||||
this.PceHawkMenuItem,
|
||||
this.TurboNymaMenuItem});
|
||||
this.PceCoreSubmenu.Name = "PceCoreSubmenu";
|
||||
this.PceCoreSubmenu.Size = new System.Drawing.Size(223, 22);
|
||||
this.PceCoreSubmenu.Text = "PCE";
|
||||
this.PceCoreSubmenu.DropDownOpened += new System.EventHandler(this.PceCoreSubmenu_DropDownOpened);
|
||||
//
|
||||
// SgbBsnesMenuItem
|
||||
//
|
||||
this.SgbBsnesMenuItem.Name = "SgbBsnesMenuItem";
|
||||
|
@ -1893,6 +1907,20 @@
|
|||
this.SgbSameBoyMenuItem.Text = "SameBoy";
|
||||
this.SgbSameBoyMenuItem.Click += new System.EventHandler(this.SgbCorePick_Click);
|
||||
//
|
||||
// PceHawkMenuItem
|
||||
//
|
||||
this.PceHawkMenuItem.Name = "PceHawkMenuItem";
|
||||
this.PceHawkMenuItem.Size = new System.Drawing.Size(118, 22);
|
||||
this.PceHawkMenuItem.Text = "PCEHawk";
|
||||
this.PceHawkMenuItem.Click += new System.EventHandler(this.PceHawkCorePick_Click);
|
||||
//
|
||||
// TurboNymaMenuItem
|
||||
//
|
||||
this.TurboNymaMenuItem.Name = "TurboNymaMenuItem";
|
||||
this.TurboNymaMenuItem.Size = new System.Drawing.Size(118, 22);
|
||||
this.TurboNymaMenuItem.Text = "TurboNyma";
|
||||
this.TurboNymaMenuItem.Click += new System.EventHandler(this.TurboNymaCorePick_Click);
|
||||
//
|
||||
// GBCoreSubmenu
|
||||
//
|
||||
this.GBCoreSubmenu.DropDownItems.AddRange(new System.Windows.Forms.ToolStripItem[] {
|
||||
|
@ -4311,7 +4339,10 @@
|
|||
private System.Windows.Forms.ToolStripMenuItem SGBCoreSubmenu;
|
||||
private System.Windows.Forms.ToolStripMenuItem SgbBsnesMenuItem;
|
||||
private System.Windows.Forms.ToolStripMenuItem SgbSameBoyMenuItem;
|
||||
private System.Windows.Forms.ToolStripMenuItem PceHawkMenuItem;
|
||||
private System.Windows.Forms.ToolStripMenuItem TurboNymaMenuItem;
|
||||
private System.Windows.Forms.ToolStripMenuItem GBCoreSubmenu;
|
||||
private System.Windows.Forms.ToolStripMenuItem PceCoreSubmenu;
|
||||
private System.Windows.Forms.ToolStripMenuItem GBGambatteMenuItem;
|
||||
private System.Windows.Forms.ToolStripMenuItem GBGBHawkMenuItem;
|
||||
private System.Windows.Forms.ToolStripMenuItem pCFXToolStripMenuItem;
|
||||
|
|
|
@ -1257,6 +1257,12 @@ namespace BizHawk.Client.EmuHawk
|
|||
SubGBHawkMenuItem.Checked = Config.PreferredCores["GB"] == CoreNames.SubGbHawk;
|
||||
}
|
||||
|
||||
private void PceCoreSubmenu_DropDownOpened(object sender, EventArgs e)
|
||||
{
|
||||
PceHawkMenuItem.Checked = Config.PreferredCores["PCE"] == CoreNames.PceHawk;
|
||||
TurboNymaMenuItem.Checked = Config.PreferredCores["PCE"] == CoreNames.TurboNyma;
|
||||
}
|
||||
|
||||
private void SubGBCorePick_Click(object sender, EventArgs e)
|
||||
{
|
||||
Config.PreferredCores["GB"] = CoreNames.SubGbHawk;
|
||||
|
@ -1285,11 +1291,36 @@ namespace BizHawk.Client.EmuHawk
|
|||
}
|
||||
}
|
||||
|
||||
private void PceHawkCorePick_Click(object sender, EventArgs e)
|
||||
{
|
||||
// TODO: do we want to be able to pick different cores for each system?
|
||||
Config.PreferredCores["PCE"] = CoreNames.PceHawk;
|
||||
Config.PreferredCores["PCECD"] = CoreNames.PceHawk;
|
||||
Config.PreferredCores["SGX"] = CoreNames.PceHawk;
|
||||
|
||||
if (Emulator.SystemId == "PCE" || Emulator.SystemId == "PCECD" || Emulator.SystemId == "SGX")
|
||||
{
|
||||
FlagNeedsReboot();
|
||||
}
|
||||
}
|
||||
|
||||
private void TurboNymaCorePick_Click(object sender, EventArgs e)
|
||||
{
|
||||
Config.PreferredCores["PCE"] = CoreNames.TurboNyma;
|
||||
Config.PreferredCores["PCECD"] = CoreNames.TurboNyma;
|
||||
Config.PreferredCores["SGX"] = CoreNames.TurboNyma;
|
||||
|
||||
if (Emulator.SystemId == "PCE" || Emulator.SystemId == "PCECD" || Emulator.SystemId == "SGX")
|
||||
{
|
||||
FlagNeedsReboot();
|
||||
}
|
||||
}
|
||||
|
||||
private void GBCorePick_Click(object sender, EventArgs e)
|
||||
{
|
||||
Config.PreferredCores["GB"] = CoreNames.GbHawk;
|
||||
Config.PreferredCores["PCE"] = CoreNames.TurboNyma;
|
||||
|
||||
if (Emulator.SystemId == "GB" || Emulator.SystemId == "GBC")
|
||||
if (Emulator.SystemId == "PCE" || Emulator.SystemId == "PCECD")
|
||||
{
|
||||
FlagNeedsReboot();
|
||||
}
|
||||
|
|
|
@ -3,7 +3,7 @@ using BizHawk.Emulation.Cores.Waterbox;
|
|||
|
||||
namespace BizHawk.Emulation.Cores.Consoles.NEC.PCE
|
||||
{
|
||||
[Core(CoreNames.TerboGrafix, "Mednafen Team", true, false, "", "", false)]
|
||||
[Core(CoreNames.TurboNyma, "Mednafen Team", true, false, "", "", false)]
|
||||
public class TerboGrafix : NymaCore, IRegionable
|
||||
{
|
||||
[CoreConstructor("PCE")]
|
||||
|
|
|
@ -19,7 +19,7 @@ namespace BizHawk.Emulation.Cores.PCEngine
|
|||
public sealed partial class PCEngine : IEmulator, ISaveRam, IInputPollable, IVideoLogicalOffsets, IRomInfo,
|
||||
IDebuggable, ISettable<PCEngine.PCESettings, PCEngine.PCESyncSettings>, IDriveLight, ICodeDataLogger
|
||||
{
|
||||
// [CoreConstructor(new[] { "PCE", "SGX" })]
|
||||
[CoreConstructor(new[] { "PCE", "SGX" })]
|
||||
public PCEngine(GameInfo game, byte[] rom, object settings, object syncSettings)
|
||||
{
|
||||
switch (game.System)
|
||||
|
|
|
@ -22,6 +22,6 @@ namespace BizHawk.Emulation.Cores
|
|||
public const string PicoDrive = "PicoDrive";
|
||||
public const string Gpgx = "Genplus-gx";
|
||||
public const string PceHawk = "PCEHawk";
|
||||
public const string TerboGrafix = "Terbo Grafix";
|
||||
public const string TurboNyma = "Terbo Grafix";
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue