From daaa28f4513cc6b135a1718783f71c3df448168a Mon Sep 17 00:00:00 2001 From: adelikat Date: Sun, 24 May 2020 15:22:48 -0500 Subject: [PATCH] wire up as much as I can pcecd to TerboGrafix core --- src/BizHawk.Client.Common/RomLoader.cs | 20 ++++++++++++++++++-- 1 file changed, 18 insertions(+), 2 deletions(-) diff --git a/src/BizHawk.Client.Common/RomLoader.cs b/src/BizHawk.Client.Common/RomLoader.cs index 1d484ad472..9ab08e8475 100644 --- a/src/BizHawk.Client.Common/RomLoader.cs +++ b/src/BizHawk.Client.Common/RomLoader.cs @@ -27,6 +27,7 @@ using BizHawk.Emulation.Cores.Consoles.Sega.Saturn; using BizHawk.Emulation.Cores.Consoles.NEC.PCFX; using BizHawk.Emulation.Cores.Computers.AmstradCPC; using BizHawk.Emulation.Cores.Consoles.ChannelF; +using BizHawk.Emulation.Cores.Consoles.NEC.PCE; namespace BizHawk.Client.Common { @@ -510,9 +511,24 @@ namespace BizHawk.Client.Common nextEmulator = new Tst(nextComm, new[] { disc }, (Tst.Settings)GetCoreSettings(), (Tst.SyncSettings)GetCoreSyncSettings()); break; - case "PCE": + case "PCE": // TODO: this is clearly not used, its set to PCE by code above case "PCECD": - nextEmulator = new PCEngine(nextComm, game, disc, GetCoreSettings(), GetCoreSyncSettings()); + string core = CoreNames.PceHawk; + if (Global.Config.PreferredCores.TryGetValue("PCECD", out string preferredCore)) + { + core = preferredCore; + } + + if (core == CoreNames.PceHawk) + { + nextEmulator = new PCEngine(nextComm, game, disc, GetCoreSettings(), GetCoreSyncSettings()); + } + else + { + // TODO: pass disc in + nextEmulator = new TerboGrafix(game, null, nextComm, "dunno what to put here"); + } + break; } }