diff --git a/BizHawk.Emulation.Cores/Consoles/Nintendo/GBA/MGBAHawk.cs b/BizHawk.Emulation.Cores/Consoles/Nintendo/GBA/MGBAHawk.cs index f000310679..206ba7b526 100644 --- a/BizHawk.Emulation.Cores/Consoles/Nintendo/GBA/MGBAHawk.cs +++ b/BizHawk.Emulation.Cores/Consoles/Nintendo/GBA/MGBAHawk.cs @@ -52,7 +52,6 @@ namespace BizHawk.Emulation.Cores.Nintendo.GBA ser.Register(_memoryDomains); ServiceProvider = ser; - CoreComm = comm; PutSettings(_settings); _tracer = new TraceBuffer @@ -149,8 +148,6 @@ namespace BizHawk.Emulation.Cores.Nintendo.GBA IsLagFrame = false; } - public CoreComm CoreComm { get; } - public void Dispose() { if (_core != IntPtr.Zero) diff --git a/BizHawk.Emulation.Cores/Consoles/Nintendo/GBA/VBANext.cs b/BizHawk.Emulation.Cores/Consoles/Nintendo/GBA/VBANext.cs index 2ca2657c63..65a96b83ec 100644 --- a/BizHawk.Emulation.Cores/Consoles/Nintendo/GBA/VBANext.cs +++ b/BizHawk.Emulation.Cores/Consoles/Nintendo/GBA/VBANext.cs @@ -19,9 +19,7 @@ namespace BizHawk.Emulation.Cores.Nintendo.GBA ser.Register(new ArmV4Disassembler()); ServiceProvider = ser; - CoreComm = comm; - - byte[] biosfile = CoreComm.CoreFileProvider.GetFirmware("GBA", "Bios", true, "GBA bios file is mandatory."); + byte[] biosfile = comm.CoreFileProvider.GetFirmware("GBA", "Bios", true, "GBA bios file is mandatory."); if (file.Length > 32 * 1024 * 1024) throw new ArgumentException("ROM is too big to be a GBA ROM!"); if (biosfile.Length != 16 * 1024) @@ -131,8 +129,6 @@ namespace BizHawk.Emulation.Cores.Nintendo.GBA /// public string GameCode { get; } - public CoreComm CoreComm { get; } - public void Dispose() { if (Core != IntPtr.Zero) diff --git a/BizHawk.Emulation.Cores/Consoles/Nintendo/Gameboy/Gambatte.IEmulator.cs b/BizHawk.Emulation.Cores/Consoles/Nintendo/Gameboy/Gambatte.IEmulator.cs index 8c15640a43..d96826f861 100644 --- a/BizHawk.Emulation.Cores/Consoles/Nintendo/Gameboy/Gambatte.IEmulator.cs +++ b/BizHawk.Emulation.Cores/Consoles/Nintendo/Gameboy/Gambatte.IEmulator.cs @@ -91,8 +91,6 @@ namespace BizHawk.Emulation.Cores.Nintendo.Gameboy frameOverflow = 0; } - public CoreComm CoreComm { get; } - public void Dispose() { if (GambatteState != IntPtr.Zero) diff --git a/BizHawk.Emulation.Cores/Consoles/Nintendo/Gameboy/Gambatte.cs b/BizHawk.Emulation.Cores/Consoles/Nintendo/Gameboy/Gambatte.cs index 05de85fb0f..8816e63748 100644 --- a/BizHawk.Emulation.Cores/Consoles/Nintendo/Gameboy/Gambatte.cs +++ b/BizHawk.Emulation.Cores/Consoles/Nintendo/Gameboy/Gambatte.cs @@ -34,7 +34,6 @@ namespace BizHawk.Emulation.Cores.Nintendo.Gameboy }; ser.Register(Tracer); InitMemoryCallbacks(); - CoreComm = comm; ThrowExceptionForBadRom(file); BoardName = MapperName(file); @@ -94,7 +93,8 @@ namespace BizHawk.Emulation.Cores.Nintendo.Gameboy { Bios = comm.CoreFileProvider.GetFirmware("GBC", "World", true, "BIOS Not Found, Cannot Load"); IsCgb = true; - } + } + if (LibGambatte.gambatte_loadbios(GambatteState, Bios, (uint)Bios.Length) != 0) { throw new InvalidOperationException($"{nameof(LibGambatte.gambatte_loadbios)}() returned non-zero (bios error)"); diff --git a/BizHawk.Emulation.Cores/Consoles/Nintendo/Gameboy/GambatteLink.IEmulator.cs b/BizHawk.Emulation.Cores/Consoles/Nintendo/Gameboy/GambatteLink.IEmulator.cs index 1458fd746e..53592d3585 100644 --- a/BizHawk.Emulation.Cores/Consoles/Nintendo/Gameboy/GambatteLink.IEmulator.cs +++ b/BizHawk.Emulation.Cores/Consoles/Nintendo/Gameboy/GambatteLink.IEmulator.cs @@ -166,8 +166,6 @@ namespace BizHawk.Emulation.Cores.Nintendo.Gameboy IsLagFrame = false; } - public CoreComm CoreComm { get; } - public void Dispose() { if (!_disposed) diff --git a/BizHawk.Emulation.Cores/Consoles/Nintendo/Gameboy/GambatteLink.cs b/BizHawk.Emulation.Cores/Consoles/Nintendo/Gameboy/GambatteLink.cs index 54d27c0c3c..a9f94bc7a3 100644 --- a/BizHawk.Emulation.Cores/Consoles/Nintendo/Gameboy/GambatteLink.cs +++ b/BizHawk.Emulation.Cores/Consoles/Nintendo/Gameboy/GambatteLink.cs @@ -17,7 +17,6 @@ namespace BizHawk.Emulation.Cores.Nintendo.Gameboy GambatteLinkSettings linkSettings = (GambatteLinkSettings)settings ?? new GambatteLinkSettings(); GambatteLinkSyncSettings linkSyncSettings = (GambatteLinkSyncSettings)syncSettings ?? new GambatteLinkSyncSettings(); - CoreComm = comm; L = new Gameboy(comm.Clone(), leftinfo, leftrom, linkSettings.L, linkSyncSettings.L, deterministic); R = new Gameboy(comm.Clone(), rightinfo, rightrom, linkSettings.R, linkSyncSettings.R, deterministic);