Skip to content

Commit

Permalink
revert changes to BSNES CoreConstructor
Browse files Browse the repository at this point in the history
The system id will still be SGB for BSNES cores by default
  • Loading branch information
Fortranm committed Jun 23, 2023
1 parent d9344bd commit 734c83e
Show file tree
Hide file tree
Showing 3 changed files with 9 additions and 6 deletions.
5 changes: 5 additions & 0 deletions src/BizHawk.Client.Common/RomLoader.cs
Original file line number Diff line number Diff line change
Expand Up @@ -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";
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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<BsnesCore.SnesSettings, BsnesCore.SnesSyncSettings>, 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<SnesSettings, SnesSyncSettings> loadParameters) : this(loadParameters, false) { }
public BsnesCore(CoreLoadParameters<SnesSettings, SnesSyncSettings> loadParameters, bool subframe = false)
Expand All @@ -29,11 +28,11 @@ public BsnesCore(CoreLoadParameters<SnesSettings, SnesSyncSettings> 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();
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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<BsnesCore.SnesSettings, BsnesCore.SnesSyncSettings> loadParameters)
{
Expand Down

0 comments on commit 734c83e

Please sign in to comment.