TurboNyma/HyperNyma - make SystemId = "PCECD" when in cd mode

This commit is contained in:
nattthebear 2020-08-15 13:20:26 -04:00 committed by GitHub
parent 77057d4b16
commit 7adeebb59a
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
2 changed files with 10 additions and 2 deletions

View File

@ -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<string, (string, string)>();
if (lp.Discs.Count > 0)
{
_hasCds = true;
firmwares.Add("FIRMWARE:syscard3.pce", ("PCECD", "Bios"));
}
_hyperNyma = DoInit<LibHyperNyma>(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<string, SettingOverride> SettingOverrides { get; } = new Dictionary<string, SettingOverride>
{

View File

@ -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<string, (string, string)>();
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<LibTurboNyma>(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<string, SettingOverride> SettingOverrides { get; } = new Dictionary<string, SettingOverride>
{