Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
30 commits
Select commit Hold shift + click to select a range
dd14f8e
merge SGB into a mode option of Gambatte
Fortranm Jun 18, 2022
5f95a93
merge the core choices for SGB
Fortranm Jun 18, 2022
f8b294f
GBL compatibility
Fortranm Jun 19, 2022
eecee30
rename SGB mode to SGB2 for Gambatte and fix BSNES initialization
Fortranm Jun 19, 2022
dd6abbc
SGB border in GBL
Fortranm Jun 21, 2022
7dd40dd
adjust sgb core detection
Fortranm Jun 22, 2022
511f48d
reformat controller button naming
Fortranm Jun 30, 2022
2e6f59b
adjust for 2.9
Fortranm Apr 16, 2023
2e534a9
adjust for 2.9 again
Fortranm Apr 16, 2023
ff268f3
revert changes to BSNES CoreConstructor
Fortranm Jun 23, 2023
c183e6e
one Player tab per SNES controller for SGB
Fortranm Jun 23, 2023
0a3a727
idiomatic rephrase for showAnyBorder
Fortranm Jul 12, 2023
ef87a48
no dummy for CreateSGBVideoBuffer
Fortranm Jul 12, 2023
c0ff230
fix SGB conversion in LsmvImport
Fortranm Jul 13, 2023
b2a4720
add legacy BSNES option for (S)GB
Fortranm Jul 13, 2023
e8aa24a
minor cosmetic changes
Morilli May 29, 2024
3786258
Fix `.vbm` importer when Gambatte isn't the preferred GB core
YoshiRulz May 30, 2024
0f5cc8d
Fix button mapping spaghetti
YoshiRulz May 30, 2024
b910c38
Code style nitpicks
YoshiRulz May 30, 2024
864ee92
minor cleanups in Gambatte.cs
Morilli Jun 19, 2024
c68e9db
Remove special SGB handling and mark bsnes* as GB/GBC cores
Morilli Jun 19, 2024
c56f047
remove SGB from CorePickerUIData
Fortranm Jul 1, 2024
f148272
Un-revert submodule pull
YoshiRulz Jul 1, 2024
cddb113
Un-revert other submodule pulls
YoshiRulz Jul 1, 2024
02746ef
fix the crash from Toggle Link Connection
Fortranm Jul 2, 2024
06496c6
remove inaccurate description of how Auto works for console
Fortranm Jul 4, 2024
3e401db
Merge branch 'master' into SGB-link
Fortranm Jul 4, 2024
0e32693
Remove unused import
YoshiRulz Jul 5, 2024
f0c5575
Merge branch 'master' into more-sgb
Fortranm Mar 12, 2026
d08804a
Update Config.cs
Fortranm Mar 12, 2026
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
10 changes: 0 additions & 10 deletions src/BizHawk.Client.Common/RomLoader.cs
Original file line number Diff line number Diff line change
Expand Up @@ -507,11 +507,6 @@ private void LoadOther(
);
return;
}

if (_config.GbAsSgb)
{
game.System = VSystemID.Raw.SGB;
}
break;
case VSystemID.Raw.PSX when ext is ".bin":
if (TryLoadSiblingCue(
Expand Down Expand Up @@ -1012,11 +1007,6 @@ private void DispatchErrorMessage(Exception ex, string system, string path)
{
DoLoadErrorCallback(ex.Message, system, path, Deterministic, LoadErrorType.MissingFirmware);
}
else if (ex is CGBNotSupportedException)
{
// failed to load SGB bios or game does not support SGB mode.
DoLoadErrorCallback("Failed to load a GB rom in SGB mode. You might try disabling SGB Mode.", system);
}
else if (ex is NoAvailableCoreException)
{
// handle exceptions thrown by the new detected systems that BizHawk does not have cores for
Expand Down
6 changes: 1 addition & 5 deletions src/BizHawk.Client.Common/config/Config.cs
Original file line number Diff line number Diff line change
Expand Up @@ -31,11 +31,9 @@ public class Config
([ VSystemID.Raw.Satellaview ],
[ CoreNames.Bsnes115, CoreNames.SubBsnes115 ]),
([ VSystemID.Raw.GB, VSystemID.Raw.GBC ],
[ CoreNames.Gambatte, CoreNames.Sameboy, CoreNames.GbHawk, CoreNames.SubGbHawk ]),
[ CoreNames.Gambatte, CoreNames.Sameboy, CoreNames.GbHawk, CoreNames.SubGbHawk, CoreNames.Bsnes, CoreNames.Bsnes115, CoreNames.SubBsnes115 ]),
([ VSystemID.Raw.GBL ],
[ CoreNames.GambatteLink, CoreNames.GBHawkLink, CoreNames.GBHawkLink3x, CoreNames.GBHawkLink4x ]),
([ VSystemID.Raw.SGB ],
[ CoreNames.Gambatte, CoreNames.Bsnes115, CoreNames.SubBsnes115, CoreNames.Bsnes ]),
([ VSystemID.Raw.N64 ],
[ CoreNames.Mupen64Plus, CoreNames.Ares64 ]),
([ VSystemID.Raw.NES ],
Expand Down Expand Up @@ -411,8 +409,6 @@ public void SetWindowScaleFor(string sysID, int windowScale)
public Dictionary<string, Dictionary<string, AnalogBind>> AllTrollersAnalog { get; set; } = new Dictionary<string, Dictionary<string, AnalogBind>>();
public Dictionary<string, Dictionary<string, FeedbackBind>> AllTrollersFeedbacks { get; set; } = new Dictionary<string, Dictionary<string, FeedbackBind>>();

/// <remarks>as this setting spans multiple cores and doesn't actually affect the behavior of any core, it hasn't been absorbed into the new system</remarks>
public bool GbAsSgb { get; set; }
public string LibretroCore { get; set; }

public Dictionary<string, string> PreferredCores = GenDefaultCorePreferences();
Expand Down
8 changes: 0 additions & 8 deletions src/BizHawk.Client.EmuHawk/MainForm.cs
Original file line number Diff line number Diff line change
Expand Up @@ -147,17 +147,9 @@ private void MainForm_Load(object sender, EventArgs e)
CoresSubMenu.DropDownItems.Add(submenu);
}
CoresSubMenu.DropDownItems.Add(new ToolStripSeparator { AutoSize = true });
var GBInSGBMenuItem = new ToolStripMenuItem { Text = "GB in SGB" };
GBInSGBMenuItem.Click += (_, _) =>
{
Config.GbAsSgb = !Config.GbAsSgb;
if (Emulator.SystemId is VSystemID.Raw.GB or VSystemID.Raw.GBC or VSystemID.Raw.SGB) FlagNeedsReboot();
};
CoresSubMenu.DropDownItems.Add(GBInSGBMenuItem);
var setLibretroCoreToolStripMenuItem = new ToolStripMenuItem { Text = "Set Libretro Core..." };
setLibretroCoreToolStripMenuItem.Click += (_, _) => RunLibretroCoreChooser();
CoresSubMenu.DropDownItems.Add(setLibretroCoreToolStripMenuItem);
CoresSubMenu.DropDownOpened += (_, _) => GBInSGBMenuItem.Checked = Config.GbAsSgb;

ToolStripMenuItemEx recentCoreSettingsSubmenu = new() { Text = "Recent" };
recentCoreSettingsSubmenu.DropDownItems.AddRange(CreateCoreSettingsSubmenus().ToArray());
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -16,8 +16,9 @@ namespace BizHawk.Emulation.Cores.Nintendo.BSNES
[PortedCore(CoreNames.Bsnes115, "bsnes team", "v115+", "https://github.com/bsnes-emu/bsnes")]
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 @@ -28,8 +29,8 @@ public BsnesCore(CoreLoadParameters<SnesSettings, SnesSyncSettings> loadParamete
this._romPath = Path.ChangeExtension(loadParameters.Roms[0].RomPath.SubstringBefore('|'), null);
CoreComm = loadParameters.Comm;
_syncSettings = loadParameters.SyncSettings ?? new SnesSyncSettings();
SystemId = loadParameters.Game.System;
_isSGB = SystemId == VSystemID.Raw.SGB;
_isSGB = loadParameters.Game.System is VSystemID.Raw.GB or VSystemID.Raw.GBC;
SystemId = _isSGB ? VSystemID.Raw.SGB : loadParameters.Game.System;
_currentMsuTrack = new ProxiedFile();

byte[] sgbRomData = null;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -11,8 +11,9 @@ namespace BizHawk.Emulation.Cores.Nintendo.BSNES
portedUrl: "https://github.com/bsnes-emu/bsnes")]
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
Original file line number Diff line number Diff line change
Expand Up @@ -115,7 +115,7 @@ public enum ConsoleModeType
}

[DisplayName("Console Mode")]
[Description("Picks which console to emulate. 'SGB2' is always in effect when 'GB in SGB' is checked.")]
[Description("Picks which console to emulate.")]
[DefaultValue(ConsoleModeType.Auto)]
public ConsoleModeType ConsoleMode { get; set; }

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -20,8 +20,7 @@ public partial class Gameboy : IInputPollable, IRomInfo, IGameboyCommon, ICycleT

[CoreConstructor(VSystemID.Raw.GB)]
[CoreConstructor(VSystemID.Raw.GBC)]
[CoreConstructor(VSystemID.Raw.SGB)]
public Gameboy(CoreComm comm, IGameInfo game, byte[] file, GambatteSettings settings, GambatteSyncSettings syncSettings, bool deterministic)
public Gameboy(CoreComm comm, GameInfo game, byte[] file, GambatteSettings settings, GambatteSyncSettings syncSettings, bool deterministic)
{
_serviceProvider = new(this);
_serviceProvider.Register<IDisassemblable>(_disassembler);
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,8 @@ namespace BizHawk.Emulation.Cores.Nintendo.SNES
public unsafe partial class LibsnesCore : IEmulator, IVideoProvider, ISaveRam, IStatable, IInputPollable, IRegionable, ICodeDataLogger,
IDebuggable, ISettable<LibsnesCore.SnesSettings, LibsnesCore.SnesSyncSettings>, IBSNESForGfxDebugger
{
[CoreConstructor(VSystemID.Raw.SGB)]
[CoreConstructor(VSystemID.Raw.GB)]
[CoreConstructor(VSystemID.Raw.GBC)]
[CoreConstructor(VSystemID.Raw.SNES)]
public LibsnesCore(GameInfo game, byte[] rom, CoreComm comm,
LibsnesCore.SnesSettings settings, LibsnesCore.SnesSyncSettings syncSettings)
Expand All @@ -44,8 +45,9 @@ public LibsnesCore(GameInfo game, byte[] romData, byte[] xmlData, string baseRom
_game = game;
CoreComm = comm;
byte[] sgbRomData = null;
IsSGB = game.System is VSystemID.Raw.GB or VSystemID.Raw.GBC;

if (game.System == VSystemID.Raw.SGB)
if (IsSGB)
{
if ((romData[0x143] & 0xc0) == 0xc0)
{
Expand Down Expand Up @@ -109,9 +111,8 @@ public LibsnesCore(GameInfo game, byte[] romData, byte[] xmlData, string baseRom
romData = newData;
}

if (game.System == VSystemID.Raw.SGB)
if (IsSGB)
{
IsSGB = true;
SystemId = VSystemID.Raw.SNES;
ser.Register<IBoardInfo>(new SGBBoardInfo());

Expand Down