From 734c83ef363677c91b81d7fbfbcd2b2e974d88ec Mon Sep 17 00:00:00 2001 From: Fortranm Date: Fri, 23 Jun 2023 01:56:28 -0700 Subject: [PATCH] revert changes to BSNES CoreConstructor The system id will still be SGB for BSNES cores by default --- src/BizHawk.Client.Common/RomLoader.cs | 5 +++++ .../Consoles/Nintendo/BSNES/BsnesCore.cs | 7 +++---- .../Consoles/Nintendo/BSNES/SubBsnesCore.cs | 3 +-- 3 files changed, 9 insertions(+), 6 deletions(-) diff --git a/src/BizHawk.Client.Common/RomLoader.cs b/src/BizHawk.Client.Common/RomLoader.cs index bc17b03260f..98c65dda593 100644 --- a/src/BizHawk.Client.Common/RomLoader.cs +++ b/src/BizHawk.Client.Common/RomLoader.cs @@ -482,6 +482,11 @@ private void LoadOther( ); return; } + + if (_config.PreferredCores[game.System].Contains(CoreNames.Bsnes115)) + { + game.System = VSystemID.Raw.SGB; + } break; case VSystemID.Raw.PSX when ext is ".bin": const string FILE_EXT_CUE = ".cue"; diff --git a/src/BizHawk.Emulation.Cores/Consoles/Nintendo/BSNES/BsnesCore.cs b/src/BizHawk.Emulation.Cores/Consoles/Nintendo/BSNES/BsnesCore.cs index 490a4dbbc64..4e4c748aea4 100644 --- a/src/BizHawk.Emulation.Cores/Consoles/Nintendo/BSNES/BsnesCore.cs +++ b/src/BizHawk.Emulation.Cores/Consoles/Nintendo/BSNES/BsnesCore.cs @@ -15,9 +15,8 @@ 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.GB)] - [CoreConstructor(VSystemID.Raw.GBC)] [CoreConstructor(VSystemID.Raw.Satellaview)] + [CoreConstructor(VSystemID.Raw.SGB)] [CoreConstructor(VSystemID.Raw.SNES)] public BsnesCore(CoreLoadParameters loadParameters) : this(loadParameters, false) { } public BsnesCore(CoreLoadParameters loadParameters, bool subframe = false) @@ -29,11 +28,11 @@ public BsnesCore(CoreLoadParameters loadParamete CoreComm = loadParameters.Comm; _syncSettings = loadParameters.SyncSettings ?? new SnesSyncSettings(); SystemId = loadParameters.Game.System; - _isSGB = SystemId == VSystemID.Raw.GB || SystemId == VSystemID.Raw.GBC; + _isSGB = SystemId == VSystemID.Raw.SGB; + byte[] sgbRomData = null; if (_isSGB) { - SystemId = VSystemID.Raw.SGB; if ((loadParameters.Roms[0].RomData[0x143] & 0xc0) == 0xc0) { throw new CGBNotSupportedException(); diff --git a/src/BizHawk.Emulation.Cores/Consoles/Nintendo/BSNES/SubBsnesCore.cs b/src/BizHawk.Emulation.Cores/Consoles/Nintendo/BSNES/SubBsnesCore.cs index a66178219ca..f84cf5c905e 100644 --- a/src/BizHawk.Emulation.Cores/Consoles/Nintendo/BSNES/SubBsnesCore.cs +++ b/src/BizHawk.Emulation.Cores/Consoles/Nintendo/BSNES/SubBsnesCore.cs @@ -8,9 +8,8 @@ namespace BizHawk.Emulation.Cores.Nintendo.BSNES [ServiceNotApplicable(new[] { typeof(IDriveLight) })] public class SubBsnesCore : IEmulator, ICycleTiming { - [CoreConstructor(VSystemID.Raw.GB)] - [CoreConstructor(VSystemID.Raw.GBC)] [CoreConstructor(VSystemID.Raw.Satellaview)] + [CoreConstructor(VSystemID.Raw.SGB)] [CoreConstructor(VSystemID.Raw.SNES)] public SubBsnesCore(CoreLoadParameters loadParameters) {