From 7adeebb59ae287c330d05a15359a1d5c3c554321 Mon Sep 17 00:00:00 2001 From: nattthebear Date: Sat, 15 Aug 2020 13:20:26 -0400 Subject: [PATCH] TurboNyma/HyperNyma - make SystemId = "PCECD" when in cd mode --- src/BizHawk.Emulation.Cores/Consoles/NEC/PCE/HyperNyma.cs | 6 +++++- src/BizHawk.Emulation.Cores/Consoles/NEC/PCE/TurboNyma.cs | 6 +++++- 2 files changed, 10 insertions(+), 2 deletions(-) diff --git a/src/BizHawk.Emulation.Cores/Consoles/NEC/PCE/HyperNyma.cs b/src/BizHawk.Emulation.Cores/Consoles/NEC/PCE/HyperNyma.cs index 014aa20a73..3a1a812e87 100644 --- a/src/BizHawk.Emulation.Cores/Consoles/NEC/PCE/HyperNyma.cs +++ b/src/BizHawk.Emulation.Cores/Consoles/NEC/PCE/HyperNyma.cs @@ -13,6 +13,7 @@ namespace BizHawk.Emulation.Cores.Consoles.NEC.PCE public class HyperNyma : NymaCore, IRegionable, IPceGpuView { private readonly LibHyperNyma _hyperNyma; + private readonly bool _hasCds; [CoreConstructor("PCE", Priority = CorePriority.Low)] [CoreConstructor("SGX", Priority = CorePriority.Low)] @@ -23,13 +24,16 @@ namespace BizHawk.Emulation.Cores.Consoles.NEC.PCE var firmwares = new Dictionary(); if (lp.Discs.Count > 0) { + _hasCds = true; firmwares.Add("FIRMWARE:syscard3.pce", ("PCECD", "Bios")); } _hyperNyma = DoInit(lp, "hyper.wbx", firmwares); } - public override string SystemId => IsSgx ? "SGX" : "PCE"; + public override string SystemId => IsSgx + ? _hasCds ? "SGXCD" : "SGX" + : _hasCds ? "PCECD" : "PCE"; protected override IDictionary SettingOverrides { get; } = new Dictionary { diff --git a/src/BizHawk.Emulation.Cores/Consoles/NEC/PCE/TurboNyma.cs b/src/BizHawk.Emulation.Cores/Consoles/NEC/PCE/TurboNyma.cs index 6522e393cd..6215eb4da9 100644 --- a/src/BizHawk.Emulation.Cores/Consoles/NEC/PCE/TurboNyma.cs +++ b/src/BizHawk.Emulation.Cores/Consoles/NEC/PCE/TurboNyma.cs @@ -15,6 +15,7 @@ namespace BizHawk.Emulation.Cores.Consoles.NEC.PCE public class TurboNyma : NymaCore, IRegionable, IPceGpuView { private readonly LibTurboNyma _turboNyma; + private readonly bool _hasCds; [CoreConstructor("PCE")] [CoreConstructor("SGX")] @@ -25,6 +26,7 @@ namespace BizHawk.Emulation.Cores.Consoles.NEC.PCE var firmwares = new Dictionary(); if (lp.Discs.Count > 0) { + _hasCds = true; var ids = lp.Discs.Select(dg => dg.DiscType).ToList(); if (ids.Contains(DiscType.TurboCD)) firmwares.Add("FIRMWARE:syscard3.pce", ("PCECD", "Bios")); @@ -40,7 +42,9 @@ namespace BizHawk.Emulation.Cores.Consoles.NEC.PCE _turboNyma = DoInit(lp, "turbo.wbx", firmwares); } - public override string SystemId => IsSgx ? "SGX" : "PCE"; + public override string SystemId => IsSgx + ? _hasCds ? "SGXCD" : "SGX" + : _hasCds ? "PCECD" : "PCE"; protected override IDictionary SettingOverrides { get; } = new Dictionary {