From 1ca1f4a3972079daa4033926df20f5e71fe43cfd Mon Sep 17 00:00:00 2001 From: YoshiRulz Date: Sat, 11 Mar 2023 08:46:16 +1000 Subject: [PATCH] Finalise sysID name and alphabetise --- src/BizHawk.Emulation.Common/Database/Database.cs | 2 +- src/BizHawk.Emulation.Common/Extensions.cs | 2 +- src/BizHawk.Emulation.Common/VSystemID.cs | 2 +- .../Consoles/Nintendo/BSNES/BsnesCore.cs | 14 +++++++------- .../Consoles/Nintendo/BSNES/SubBsnesCore.cs | 2 +- 5 files changed, 11 insertions(+), 11 deletions(-) diff --git a/src/BizHawk.Emulation.Common/Database/Database.cs b/src/BizHawk.Emulation.Common/Database/Database.cs index 90e36563a6..ec51ea3bb1 100644 --- a/src/BizHawk.Emulation.Common/Database/Database.cs +++ b/src/BizHawk.Emulation.Common/Database/Database.cs @@ -251,7 +251,7 @@ namespace BizHawk.Emulation.Common case ".BS": if (SatellaviewFileTypeDetector.IsSatellaviewRom(romData, out var warnings)) { - game.System = VSystemID.Raw.BSX; + game.System = VSystemID.Raw.Satellaview; foreach (var s in warnings) Console.WriteLine(s); } else diff --git a/src/BizHawk.Emulation.Common/Extensions.cs b/src/BizHawk.Emulation.Common/Extensions.cs index 46bb7a3084..7e597b9e2b 100644 --- a/src/BizHawk.Emulation.Common/Extensions.cs +++ b/src/BizHawk.Emulation.Common/Extensions.cs @@ -23,7 +23,6 @@ namespace BizHawk.Emulation.Common [VSystemID.Raw.AmstradCPC] = "Amstrad CPC", [VSystemID.Raw.AppleII] = "Apple II", [VSystemID.Raw.Arcade] = "Arcade", - [VSystemID.Raw.BSX] = "Satellaview", [VSystemID.Raw.C64] = "Commodore 64", [VSystemID.Raw.ChannelF] = "Channel F", [VSystemID.Raw.Coleco] = "ColecoVision", @@ -53,6 +52,7 @@ namespace BizHawk.Emulation.Common [VSystemID.Raw.PS2] = "PlayStation 2", [VSystemID.Raw.PSX] = "PlayStation", [VSystemID.Raw.SAT] = "Saturn", + [VSystemID.Raw.Satellaview] = "Satellaview", [VSystemID.Raw.Sega32X] = "Genesis 32X", [VSystemID.Raw.SG] = "SG-1000", [VSystemID.Raw.SGX] = "SuperGrafx", diff --git a/src/BizHawk.Emulation.Common/VSystemID.cs b/src/BizHawk.Emulation.Common/VSystemID.cs index c5bf162dcc..c052def262 100644 --- a/src/BizHawk.Emulation.Common/VSystemID.cs +++ b/src/BizHawk.Emulation.Common/VSystemID.cs @@ -20,7 +20,6 @@ namespace BizHawk.Emulation.Common public const string AmstradCPC = "AmstradCPC"; public const string AppleII = "AppleII"; public const string Arcade = "Arcade"; - public const string BSX = "BSX"; public const string C64 = "C64"; public const string ChannelF = "ChannelF"; public const string Coleco = "Coleco"; @@ -56,6 +55,7 @@ namespace BizHawk.Emulation.Common public const string PSP = "PSP"; public const string PSX = "PSX"; public const string SAT = "SAT"; + public const string Satellaview = "BSX"; public const string Sega32X = "32X"; public const string SG = "SG"; public const string SGB = "SGB"; diff --git a/src/BizHawk.Emulation.Cores/Consoles/Nintendo/BSNES/BsnesCore.cs b/src/BizHawk.Emulation.Cores/Consoles/Nintendo/BSNES/BsnesCore.cs index 0d24784e4c..20b534f3a0 100644 --- a/src/BizHawk.Emulation.Cores/Consoles/Nintendo/BSNES/BsnesCore.cs +++ b/src/BizHawk.Emulation.Cores/Consoles/Nintendo/BSNES/BsnesCore.cs @@ -15,9 +15,9 @@ namespace BizHawk.Emulation.Cores.Nintendo.BSNES [ServiceNotApplicable(new[] { typeof(IDriveLight) })] public partial class BsnesCore : IEmulator, IDebuggable, IVideoProvider, ISaveRam, IStatable, IInputPollable, IRegionable, ISettable, IBSNESForGfxDebugger, IBoardInfo { + [CoreConstructor(VSystemID.Raw.Satellaview)] [CoreConstructor(VSystemID.Raw.SGB)] [CoreConstructor(VSystemID.Raw.SNES)] - [CoreConstructor(VSystemID.Raw.BSX)] public BsnesCore(CoreLoadParameters loadParameters) : this(loadParameters, false) { } public BsnesCore(CoreLoadParameters loadParameters, bool subframe = false) { @@ -86,7 +86,12 @@ namespace BizHawk.Emulation.Cores.Nintendo.BSNES InitAudio(); ser.Register(_soundProvider); - if (SystemId == VSystemID.Raw.BSX) + if (_isSGB) + { + Api.core.snes_load_cartridge_super_gameboy(sgbRomData, loadParameters.Roms[0].RomData, + sgbRomData!.Length, loadParameters.Roms[0].RomData.Length); + } + else if (SystemId is VSystemID.Raw.Satellaview) { SATELLAVIEW_CARTRIDGE slottedCartridge = _syncSettings.SatellaviewCartridge; if (slottedCartridge == SATELLAVIEW_CARTRIDGE.Autodetect) @@ -106,11 +111,6 @@ namespace BizHawk.Emulation.Cores.Nintendo.BSNES Api.core.snes_load_cartridge_bsmemory(cartridgeData, loadParameters.Roms[0].RomData, cartridgeData.Length, loadParameters.Roms[0].RomData.Length); } - else if (_isSGB) - { - Api.core.snes_load_cartridge_super_gameboy(sgbRomData, loadParameters.Roms[0].RomData, - sgbRomData!.Length, loadParameters.Roms[0].RomData.Length); - } else { Api.core.snes_load_cartridge_normal(loadParameters.Roms[0].RomData, loadParameters.Roms[0].RomData.Length); diff --git a/src/BizHawk.Emulation.Cores/Consoles/Nintendo/BSNES/SubBsnesCore.cs b/src/BizHawk.Emulation.Cores/Consoles/Nintendo/BSNES/SubBsnesCore.cs index c971154787..35b5a9a3ef 100644 --- a/src/BizHawk.Emulation.Cores/Consoles/Nintendo/BSNES/SubBsnesCore.cs +++ b/src/BizHawk.Emulation.Cores/Consoles/Nintendo/BSNES/SubBsnesCore.cs @@ -8,9 +8,9 @@ namespace BizHawk.Emulation.Cores.Nintendo.BSNES [ServiceNotApplicable(new[] { typeof(IDriveLight) })] public class SubBsnesCore : IEmulator, ICycleTiming { + [CoreConstructor(VSystemID.Raw.Satellaview)] [CoreConstructor(VSystemID.Raw.SGB)] [CoreConstructor(VSystemID.Raw.SNES)] - [CoreConstructor(VSystemID.Raw.BSX)] public SubBsnesCore(CoreLoadParameters loadParameters) { _bsnesCore = new BsnesCore(loadParameters, true);