diff --git a/src/BizHawk.Emulation.Cores/Consoles/Nintendo/Gameboy/GBDisassembler.cs b/src/BizHawk.Emulation.Cores/Consoles/Nintendo/Gameboy/GBDisassembler.cs
index c5e801d376..5e0f0b29cd 100644
--- a/src/BizHawk.Emulation.Cores/Consoles/Nintendo/Gameboy/GBDisassembler.cs
+++ b/src/BizHawk.Emulation.Cores/Consoles/Nintendo/Gameboy/GBDisassembler.cs
@@ -1,8 +1,8 @@
-using System.Collections.Generic;
-
-using BizHawk.Emulation.Common;
+using BizHawk.Emulation.Common;
using BizHawk.Emulation.Cores.Components.LR35902;
+using System.Collections.Generic;
+
namespace BizHawk.Emulation.Cores.Nintendo.Gameboy
{
public class GBDisassembler : VerifiedDisassembler
diff --git a/src/BizHawk.Emulation.Cores/Consoles/Nintendo/Gameboy/Gambatte.ICodeDataLog.cs b/src/BizHawk.Emulation.Cores/Consoles/Nintendo/Gameboy/Gambatte.ICodeDataLog.cs
index 40600228ca..83d3885825 100644
--- a/src/BizHawk.Emulation.Cores/Consoles/Nintendo/Gameboy/Gambatte.ICodeDataLog.cs
+++ b/src/BizHawk.Emulation.Cores/Consoles/Nintendo/Gameboy/Gambatte.ICodeDataLog.cs
@@ -1,8 +1,8 @@
+using BizHawk.Emulation.Common;
+
using System;
using System.IO;
-using BizHawk.Emulation.Common;
-
namespace BizHawk.Emulation.Cores.Nintendo.Gameboy
{
public partial class Gameboy : ICodeDataLogger
@@ -37,34 +37,19 @@ namespace BizHawk.Emulation.Cores.Nintendo.Gameboy
private void CDCallbackProc(int addr, LibGambatte.CDLog_AddrType addrtype, LibGambatte.CDLog_Flags flags)
{
- if (_cdl == null)
+ if (_cdl == null || !_cdl.Active)
{
return;
}
- if (!_cdl.Active)
+ string key = addrtype switch
{
- return;
- }
-
- string key;
- switch (addrtype)
- {
- case LibGambatte.CDLog_AddrType.ROM:
- key = "ROM";
- break;
- case LibGambatte.CDLog_AddrType.HRAM:
- key = "HRAM";
- break;
- case LibGambatte.CDLog_AddrType.WRAM:
- key = "WRAM";
- break;
- case LibGambatte.CDLog_AddrType.CartRAM:
- key = "CartRAM";
- break;
- default:
- throw new InvalidOperationException("Juniper lightbulb proxy");
- }
+ LibGambatte.CDLog_AddrType.ROM => "ROM",
+ LibGambatte.CDLog_AddrType.HRAM => "HRAM",
+ LibGambatte.CDLog_AddrType.WRAM => "WRAM",
+ LibGambatte.CDLog_AddrType.CartRAM => "CartRAM",
+ _ => throw new InvalidOperationException("Juniper lightbulb proxy"),
+ };
_cdl[key][addr] |= (byte)flags;
}
diff --git a/src/BizHawk.Emulation.Cores/Consoles/Nintendo/Gameboy/Gambatte.IDebuggable.cs b/src/BizHawk.Emulation.Cores/Consoles/Nintendo/Gameboy/Gambatte.IDebuggable.cs
index d4c827303f..7eb863616c 100644
--- a/src/BizHawk.Emulation.Cores/Consoles/Nintendo/Gameboy/Gambatte.IDebuggable.cs
+++ b/src/BizHawk.Emulation.Cores/Consoles/Nintendo/Gameboy/Gambatte.IDebuggable.cs
@@ -1,7 +1,7 @@
-using System;
-using System.Collections.Generic;
+using BizHawk.Emulation.Common;
-using BizHawk.Emulation.Common;
+using System;
+using System.Collections.Generic;
namespace BizHawk.Emulation.Cores.Nintendo.Gameboy
{
diff --git a/src/BizHawk.Emulation.Cores/Consoles/Nintendo/Gameboy/Gambatte.IEmulator.cs b/src/BizHawk.Emulation.Cores/Consoles/Nintendo/Gameboy/Gambatte.IEmulator.cs
index 298c06bd6f..14b4309867 100644
--- a/src/BizHawk.Emulation.Cores/Consoles/Nintendo/Gameboy/Gambatte.IEmulator.cs
+++ b/src/BizHawk.Emulation.Cores/Consoles/Nintendo/Gameboy/Gambatte.IEmulator.cs
@@ -1,7 +1,7 @@
-using System;
-using System.Diagnostics;
+using BizHawk.Emulation.Common;
-using BizHawk.Emulation.Common;
+using System;
+using System.Diagnostics;
namespace BizHawk.Emulation.Cores.Nintendo.Gameboy
{
@@ -9,7 +9,7 @@ namespace BizHawk.Emulation.Cores.Nintendo.Gameboy
{
public IEmulatorServiceProvider ServiceProvider { get; }
- public ControllerDefinition ControllerDefinition { get; set; }
+ public ControllerDefinition ControllerDefinition { get; }
public bool FrameAdvance(IController controller, bool render, bool rendersound)
{
diff --git a/src/BizHawk.Emulation.Cores/Consoles/Nintendo/Gameboy/Gambatte.IMemoryDomains.cs b/src/BizHawk.Emulation.Cores/Consoles/Nintendo/Gameboy/Gambatte.IMemoryDomains.cs
index 5d0e1fcbb3..d9f5703777 100644
--- a/src/BizHawk.Emulation.Cores/Consoles/Nintendo/Gameboy/Gambatte.IMemoryDomains.cs
+++ b/src/BizHawk.Emulation.Cores/Consoles/Nintendo/Gameboy/Gambatte.IMemoryDomains.cs
@@ -1,7 +1,7 @@
-using System;
-using System.Collections.Generic;
+using BizHawk.Emulation.Common;
-using BizHawk.Emulation.Common;
+using System;
+using System.Collections.Generic;
namespace BizHawk.Emulation.Cores.Nintendo.Gameboy
{
diff --git a/src/BizHawk.Emulation.Cores/Consoles/Nintendo/Gameboy/Gambatte.ISaveRam.cs b/src/BizHawk.Emulation.Cores/Consoles/Nintendo/Gameboy/Gambatte.ISaveRam.cs
index d0c2ace32d..2e965ae8c7 100644
--- a/src/BizHawk.Emulation.Cores/Consoles/Nintendo/Gameboy/Gambatte.ISaveRam.cs
+++ b/src/BizHawk.Emulation.Cores/Consoles/Nintendo/Gameboy/Gambatte.ISaveRam.cs
@@ -1,5 +1,6 @@
-using System;
-using BizHawk.Emulation.Common;
+using BizHawk.Emulation.Common;
+
+using System;
namespace BizHawk.Emulation.Cores.Nintendo.Gameboy
{
diff --git a/src/BizHawk.Emulation.Cores/Consoles/Nintendo/Gameboy/Gambatte.ISettable.cs b/src/BizHawk.Emulation.Cores/Consoles/Nintendo/Gameboy/Gambatte.ISettable.cs
index 308f143a6e..1c1f05f00b 100644
--- a/src/BizHawk.Emulation.Cores/Consoles/Nintendo/Gameboy/Gambatte.ISettable.cs
+++ b/src/BizHawk.Emulation.Cores/Consoles/Nintendo/Gameboy/Gambatte.ISettable.cs
@@ -1,10 +1,10 @@
-using System;
-using System.ComponentModel;
+using BizHawk.Common;
+using BizHawk.Emulation.Common;
using Newtonsoft.Json;
-using BizHawk.Common;
-using BizHawk.Emulation.Common;
+using System;
+using System.ComponentModel;
namespace BizHawk.Emulation.Cores.Nintendo.Gameboy
{
@@ -115,7 +115,7 @@ namespace BizHawk.Emulation.Cores.Nintendo.Gameboy
}
[DisplayName("Console Mode")]
- [Description("Pick which console to run, 'Auto' chooses from ROM header; 'GB', 'GBC', and 'GBA' chooses the respective system")]
+ [Description("Pick which console to run, 'Auto' chooses from ROM header; 'GB', 'GBC', and 'GBA' chooses the respective system. Does nothing in SGB mode.")]
[DefaultValue(ConsoleModeType.Auto)]
public ConsoleModeType ConsoleMode { get; set; }
diff --git a/src/BizHawk.Emulation.Cores/Consoles/Nintendo/Gameboy/Gambatte.ISoundProvider.cs b/src/BizHawk.Emulation.Cores/Consoles/Nintendo/Gameboy/Gambatte.ISoundProvider.cs
index c2b779b52a..95b21d9c03 100644
--- a/src/BizHawk.Emulation.Cores/Consoles/Nintendo/Gameboy/Gambatte.ISoundProvider.cs
+++ b/src/BizHawk.Emulation.Cores/Consoles/Nintendo/Gameboy/Gambatte.ISoundProvider.cs
@@ -1,5 +1,6 @@
-using System;
-using BizHawk.Emulation.Common;
+using BizHawk.Emulation.Common;
+
+using System;
namespace BizHawk.Emulation.Cores.Nintendo.Gameboy
{
diff --git a/src/BizHawk.Emulation.Cores/Consoles/Nintendo/Gameboy/Gambatte.IStatable.cs b/src/BizHawk.Emulation.Cores/Consoles/Nintendo/Gameboy/Gambatte.IStatable.cs
index 85c82d1010..243be72032 100644
--- a/src/BizHawk.Emulation.Cores/Consoles/Nintendo/Gameboy/Gambatte.IStatable.cs
+++ b/src/BizHawk.Emulation.Cores/Consoles/Nintendo/Gameboy/Gambatte.IStatable.cs
@@ -1,10 +1,11 @@
-//#define USE_UPSTREAM_STATES
+//#define USE_UPSTREAM_STATES // really more for testing due to needing to use these anyways for initial state code. could potentially be used outright for states
+
+using BizHawk.Emulation.Common;
+
+using Newtonsoft.Json;
using System;
using System.IO;
-using Newtonsoft.Json;
-
-using BizHawk.Emulation.Common;
namespace BizHawk.Emulation.Cores.Nintendo.Gameboy
{
diff --git a/src/BizHawk.Emulation.Cores/Consoles/Nintendo/Gameboy/Gambatte.ITraceable.cs b/src/BizHawk.Emulation.Cores/Consoles/Nintendo/Gameboy/Gambatte.ITraceable.cs
index 638174fdbd..6ed9dbf67b 100644
--- a/src/BizHawk.Emulation.Cores/Consoles/Nintendo/Gameboy/Gambatte.ITraceable.cs
+++ b/src/BizHawk.Emulation.Cores/Consoles/Nintendo/Gameboy/Gambatte.ITraceable.cs
@@ -1,8 +1,8 @@
-using System;
-
-using BizHawk.Emulation.Common;
+using BizHawk.Emulation.Common;
using BizHawk.Emulation.Cores.Components.LR35902;
+using System;
+
namespace BizHawk.Emulation.Cores.Nintendo.Gameboy
{
public partial class Gameboy
@@ -18,8 +18,27 @@ namespace BizHawk.Emulation.Cores.Nintendo.Gameboy
Tracer.Put(new(
disassembly: LR35902.Disassemble(
- (ushort) s[1],
- addr => (addr == (ushort)s[1]) ? (byte)((s[12] >> 16) & 0xFF) : ((addr == (ushort)s[1] + 1) ? (byte)((s[12] >> 8) & 0xFF) : (byte)(s[12] & 0xFF)),
+ PC,
+ addr => {
+ if (addr == PC)
+ {
+ //opcode
+ return (byte)((s[12] >> 16) & 0xFF);
+ }
+ else
+ {
+ if (addr == ((PC + 1) & 0xFFFF))
+ {
+ //high operand
+ return (byte)((s[12] >> 8) & 0xFF);
+ }
+ else
+ {
+ //low operand
+ return (byte)(s[12] & 0xFF);
+ }
+ }
+ },
_settings.RgbdsSyntax,
out _).PadRight(36),
registerInfo: string.Format(
diff --git a/src/BizHawk.Emulation.Cores/Consoles/Nintendo/Gameboy/Gambatte.cs b/src/BizHawk.Emulation.Cores/Consoles/Nintendo/Gameboy/Gambatte.cs
index 672b6300c2..f1f97b20c2 100644
--- a/src/BizHawk.Emulation.Cores/Consoles/Nintendo/Gameboy/Gambatte.cs
+++ b/src/BizHawk.Emulation.Cores/Consoles/Nintendo/Gameboy/Gambatte.cs
@@ -1,12 +1,11 @@
using System;
using System.Collections.Generic;
-using System.IO;
using System.Linq;
+
using BizHawk.Common;
using BizHawk.Common.BufferExtensions;
using BizHawk.Emulation.Common;
using BizHawk.Emulation.Cores.Consoles.Nintendo.Gameboy;
-using BizHawk.Emulation.Cores.Properties;
namespace BizHawk.Emulation.Cores.Nintendo.Gameboy
{
@@ -163,35 +162,35 @@ namespace BizHawk.Emulation.Cores.Nintendo.Gameboy
if (DeterministicEmulation)
{
int[] rtcRegs = new int[11];
- rtcRegs[(int)LibGambatte.RtcRegIndicies.Dh] = 0;
+ rtcRegs[(int)LibGambatte.RtcRegIndices.Dh] = 0;
if (_syncSettings.InternalRTCOverflow)
{
- rtcRegs[(int)LibGambatte.RtcRegIndicies.Dh] |= 0x80;
+ rtcRegs[(int)LibGambatte.RtcRegIndices.Dh] |= 0x80;
}
if (_syncSettings.InternalRTCHalt)
{
- rtcRegs[(int)LibGambatte.RtcRegIndicies.Dh] |= 0x40;
+ rtcRegs[(int)LibGambatte.RtcRegIndices.Dh] |= 0x40;
}
- rtcRegs[(int)LibGambatte.RtcRegIndicies.Dh] |= _syncSettings.InternalRTCDays >> 8;
- rtcRegs[(int)LibGambatte.RtcRegIndicies.Dl] = _syncSettings.InternalRTCDays & 0xFF;
- rtcRegs[(int)LibGambatte.RtcRegIndicies.H] = (_syncSettings.InternalRTCHours < 0) ? (_syncSettings.InternalRTCHours + 0x20) : _syncSettings.InternalRTCHours;
- rtcRegs[(int)LibGambatte.RtcRegIndicies.M] = (_syncSettings.InternalRTCMinutes < 0) ? (_syncSettings.InternalRTCMinutes + 0x40) : _syncSettings.InternalRTCMinutes;
- rtcRegs[(int)LibGambatte.RtcRegIndicies.S] = (_syncSettings.InternalRTCSeconds < 0) ? (_syncSettings.InternalRTCSeconds + 0x40) : _syncSettings.InternalRTCSeconds;
- rtcRegs[(int)LibGambatte.RtcRegIndicies.C] = _syncSettings.InternalRTCCycles;
- rtcRegs[(int)LibGambatte.RtcRegIndicies.Dh_L] = 0;
+ rtcRegs[(int)LibGambatte.RtcRegIndices.Dh] |= _syncSettings.InternalRTCDays >> 8;
+ rtcRegs[(int)LibGambatte.RtcRegIndices.Dl] = _syncSettings.InternalRTCDays & 0xFF;
+ rtcRegs[(int)LibGambatte.RtcRegIndices.H] = (_syncSettings.InternalRTCHours < 0) ? (_syncSettings.InternalRTCHours + 0x20) : _syncSettings.InternalRTCHours;
+ rtcRegs[(int)LibGambatte.RtcRegIndices.M] = (_syncSettings.InternalRTCMinutes < 0) ? (_syncSettings.InternalRTCMinutes + 0x40) : _syncSettings.InternalRTCMinutes;
+ rtcRegs[(int)LibGambatte.RtcRegIndices.S] = (_syncSettings.InternalRTCSeconds < 0) ? (_syncSettings.InternalRTCSeconds + 0x40) : _syncSettings.InternalRTCSeconds;
+ rtcRegs[(int)LibGambatte.RtcRegIndices.C] = _syncSettings.InternalRTCCycles;
+ rtcRegs[(int)LibGambatte.RtcRegIndices.Dh_L] = 0;
if (_syncSettings.LatchedRTCOverflow)
{
- rtcRegs[(int)LibGambatte.RtcRegIndicies.Dh_L] |= 0x80;
+ rtcRegs[(int)LibGambatte.RtcRegIndices.Dh_L] |= 0x80;
}
if (_syncSettings.LatchedRTCHalt)
{
- rtcRegs[(int)LibGambatte.RtcRegIndicies.Dh_L] |= 0x40;
+ rtcRegs[(int)LibGambatte.RtcRegIndices.Dh_L] |= 0x40;
}
- rtcRegs[(int)LibGambatte.RtcRegIndicies.Dh_L] |= _syncSettings.LatchedRTCDays >> 8;
- rtcRegs[(int)LibGambatte.RtcRegIndicies.Dl_L] = _syncSettings.LatchedRTCDays & 0xFF;
- rtcRegs[(int)LibGambatte.RtcRegIndicies.H_L] = _syncSettings.LatchedRTCHours;
- rtcRegs[(int)LibGambatte.RtcRegIndicies.M_L] = _syncSettings.LatchedRTCMinutes;
- rtcRegs[(int)LibGambatte.RtcRegIndicies.S_L] = _syncSettings.LatchedRTCSeconds;
+ rtcRegs[(int)LibGambatte.RtcRegIndices.Dh_L] |= _syncSettings.LatchedRTCDays >> 8;
+ rtcRegs[(int)LibGambatte.RtcRegIndices.Dl_L] = _syncSettings.LatchedRTCDays & 0xFF;
+ rtcRegs[(int)LibGambatte.RtcRegIndices.H_L] = _syncSettings.LatchedRTCHours;
+ rtcRegs[(int)LibGambatte.RtcRegIndices.M_L] = _syncSettings.LatchedRTCMinutes;
+ rtcRegs[(int)LibGambatte.RtcRegIndices.S_L] = _syncSettings.LatchedRTCSeconds;
LibGambatte.gambatte_setrtcregs(GambatteState, rtcRegs);
}
@@ -234,7 +233,7 @@ namespace BizHawk.Emulation.Cores.Nintendo.Gameboy
///
/// keep a copy of the input callback delegate so it doesn't get GCed
///
- private LibGambatte.InputGetter InputCallback;
+ private readonly LibGambatte.InputGetter InputCallback;
///
/// whatever keys are currently depressed
@@ -414,32 +413,32 @@ namespace BizHawk.Emulation.Cores.Nintendo.Gameboy
private static string MapperName(byte[] romdata)
{
- switch (romdata[0x147])
+ return (romdata[0x147]) switch
{
- case 0x00: return "Plain ROM"; // = PLAIN; break;
- case 0x01: return "MBC1 ROM"; // = MBC1; break;
- case 0x02: return "MBC1 ROM+RAM"; // = MBC1; break;
- case 0x03: return "MBC1 ROM+RAM+BATTERY"; // = MBC1; break;
- case 0x05: return "MBC2 ROM"; // = MBC2; break;
- case 0x06: return "MBC2 ROM+BATTERY"; // = MBC2; break;
- case 0x08: return "Plain ROM+RAM"; // = PLAIN; break;
- case 0x09: return "Plain ROM+RAM+BATTERY"; // = PLAIN; break;
- case 0x0F: return "MBC3 ROM+TIMER+BATTERY"; // = MBC3; break;
- case 0x10: return "MBC3 ROM+TIMER+RAM+BATTERY"; // = MBC3; break;
- case 0x11: return "MBC3 ROM"; // = MBC3; break;
- case 0x12: return "MBC3 ROM+RAM"; // = MBC3; break;
- case 0x13: return "MBC3 ROM+RAM+BATTERY"; // = MBC3; break;
- case 0x19: return "MBC5 ROM"; // = MBC5; break;
- case 0x1A: return "MBC5 ROM+RAM"; // = MBC5; break;
- case 0x1B: return "MBC5 ROM+RAM+BATTERY"; // = MBC5; break;
- case 0x1C: return "MBC5 ROM+RUMBLE"; // = MBC5; break;
- case 0x1D: return "MBC5 ROM+RUMBLE+RAM"; // = MBC5; break;
- case 0x1E: return "MBC5 ROM+RUMBLE+RAM+BATTERY"; // = MBC5; break;
- case 0xFC: return "Pocket Camera ROM+RAM+BATTERY"; // = POCKETCAMERA; break
- case 0xFE: return "HuC3 ROM+RAM+BATTERY"; // = HUC3; break;
- case 0xFF: return "HuC1 ROM+RAM+BATTERY"; // = HUC1; break;
- default: return "UNKNOWN";
- }
+ 0x00 => "Plain ROM",
+ 0x01 => "MBC1 ROM",
+ 0x02 => "MBC1 ROM+RAM",
+ 0x03 => "MBC1 ROM+RAM+BATTERY",
+ 0x05 => "MBC2 ROM",
+ 0x06 => "MBC2 ROM+BATTERY",
+ 0x08 => "Plain ROM+RAM",
+ 0x09 => "Plain ROM+RAM+BATTERY",
+ 0x0F => "MBC3 ROM+TIMER+BATTERY",
+ 0x10 => "MBC3 ROM+TIMER+RAM+BATTERY",
+ 0x11 => "MBC3 ROM",
+ 0x12 => "MBC3 ROM+RAM",
+ 0x13 => "MBC3 ROM+RAM+BATTERY",
+ 0x19 => "MBC5 ROM",
+ 0x1A => "MBC5 ROM+RAM",
+ 0x1B => "MBC5 ROM+RAM+BATTERY",
+ 0x1C => "MBC5 ROM+RUMBLE",
+ 0x1D => "MBC5 ROM+RUMBLE+RAM",
+ 0x1E => "MBC5 ROM+RUMBLE+RAM+BATTERY",
+ 0xFC => "Pocket Camera ROM+RAM+BATTERY",
+ 0xFE => "HuC3 ROM+RAM+BATTERY",
+ 0xFF => "HuC1 ROM+RAM+BATTERY",
+ _ => "UNKNOWN",
+ };
}
///
@@ -463,30 +462,30 @@ namespace BizHawk.Emulation.Cores.Nintendo.Gameboy
case 0x08: break;
case 0x09: break;
- case 0x0b: throw new UnsupportedGameException("\"MM01\" Mapper not supported!");
- case 0x0c: throw new UnsupportedGameException("\"MM01\" Mapper not supported!");
- case 0x0d: throw new UnsupportedGameException("\"MM01\" Mapper not supported!");
+ case 0x0B: throw new UnsupportedGameException("\"MM01\" Mapper not supported!");
+ case 0x0C: throw new UnsupportedGameException("\"MM01\" Mapper not supported!");
+ case 0x0D: throw new UnsupportedGameException("\"MM01\" Mapper not supported!");
- case 0x0f: break;
+ case 0x0F: break;
case 0x10: break;
case 0x11: break;
case 0x12: break;
case 0x13: break;
case 0x19: break;
- case 0x1a: break;
- case 0x1b: break;
- case 0x1c: break; // rumble
- case 0x1d: break; // rumble
- case 0x1e: break; // rumble
+ case 0x1A: break;
+ case 0x1B: break;
+ case 0x1C: break; // rumble
+ case 0x1D: break; // rumble
+ case 0x1E: break; // rumble
case 0x20: throw new UnsupportedGameException("\"MBC6\" Mapper not supported!");
case 0x22: throw new UnsupportedGameException("\"MBC7\" Mapper not supported!");
- case 0xfc: break;
- case 0xfd: throw new UnsupportedGameException("\"Bandai TAMA5\" Mapper not supported!");
- case 0xfe: break;
- case 0xff: break;
+ case 0xFC: break;
+ case 0xFD: throw new UnsupportedGameException("\"Bandai TAMA5\" Mapper not supported!");
+ case 0xFE: break;
+ case 0xFF: break;
default: throw new UnsupportedGameException($"Unknown mapper: {romdata[0x147]:x2}");
}
}
@@ -499,244 +498,126 @@ namespace BizHawk.Emulation.Cores.Nintendo.Gameboy
titleHash += romdata[0x134 + i];
}
- switch (titleHash & 0xFF)
+ return (titleHash & 0xFF) switch
{
- case 0x01:
- case 0x10:
- case 0x29:
- case 0x52:
- case 0x5D:
- case 0x68:
- case 0x6D:
- case 0xF6:
- return new int[] { 0xFFFFFF, 0xFFAD63, 0x843100, 0x000000, 0xFFFFFF, 0x63A5FF, 0x0000FF, 0x000000, 0xFFFFFF, 0x7BFF31, 0x008400, 0x000000 };
- case 0x0C:
- case 0x16:
- case 0x35:
- case 0x67:
- case 0x75:
- case 0x92:
- case 0x99:
- case 0xB7:
- return new int[] { 0xFFFFFF, 0xFFAD63, 0x843100, 0x000000, 0xFFFFFF, 0xFFAD63, 0x843100, 0x000000, 0xFFFFFF, 0xFFAD63, 0x843100, 0x000000 };
- case 0x14:
- return new int[] { 0xFFFFFF, 0xFF8484, 0x943A3A, 0x000000, 0xFFFFFF, 0x7BFF31, 0x008400, 0x000000, 0xFFFFFF, 0xFF8484, 0x943A3A, 0x000000 };
- case 0x15:
- case 0xDB:
- return new int[] { 0xFFFFFF, 0xFFFF00, 0xFF0000, 0x000000, 0xFFFFFF, 0xFFFF00, 0xFF0000, 0x000000, 0xFFFFFF, 0xFFFF00, 0xFF0000, 0x000000 };
- case 0x17:
- case 0x8B:
- return new int[] { 0xFFFFFF, 0x7BFF31, 0x008400, 0x000000, 0xFFFFFF, 0xFF8484, 0x943A3A, 0x000000, 0xFFFFFF, 0x63A5FF, 0x0000FF, 0x000000 };
- case 0x19:
- return new int[] { 0xFFFFFF, 0xFF9C00, 0xFF0000, 0x000000, 0xFFFFFF, 0xFF8484, 0x943A3A, 0x000000, 0xFFFFFF, 0xFF8484, 0x943A3A, 0x000000 };
- case 0x1D:
- return new int[] { 0xA59CFF, 0xFFFF00, 0x006300, 0x000000, 0xFF6352, 0xD60000, 0x630000, 0x000000, 0xFF6352, 0xD60000, 0x630000, 0x000000 };
- case 0x34:
- return new int[] { 0xFFFFFF, 0x7BFF00, 0xB57300, 0x000000, 0xFFFFFF, 0xFF8484, 0x943A3A, 0x000000, 0xFFFFFF, 0xFF8484, 0x943A3A, 0x000000 };
- case 0x36:
- return new int[] { 0x52DE00, 0xFF8400, 0xFFFF00, 0xFFFFFF, 0xFFFFFF, 0xFFFFFF, 0x63A5FF, 0x0000FF, 0xFFFFFF, 0xFF8484, 0x943A3A, 0x000000 };
- case 0x39:
- case 0x43:
- case 0x97:
- return new int[] { 0xFFFFFF, 0xFFAD63, 0x843100, 0x000000, 0xFFFFFF, 0x63A5FF, 0x0000FF, 0x000000, 0xFFFFFF, 0x63A5FF, 0x0000FF, 0x000000 };
- case 0x3C:
- return new int[] { 0xFFFFFF, 0x63A5FF, 0x0000FF, 0x000000, 0xFFFFFF, 0x63A5FF, 0x0000FF, 0x000000, 0xFFFFFF, 0xFF8484, 0x943A3A, 0x000000 };
- case 0x3D:
- return new int[] { 0xFFFFFF, 0x52FF00, 0xFF4200, 0x000000, 0xFFFFFF, 0xFF8484, 0x943A3A, 0x000000, 0xFFFFFF, 0xFF8484, 0x943A3A, 0x000000 };
- case 0x3E:
- case 0xE0:
- return new int[] { 0xFFFFFF, 0xFF9C00, 0xFF0000, 0x000000, 0xFFFFFF, 0xFF9C00, 0xFF0000, 0x000000, 0xFFFFFF, 0x5ABDFF, 0xFF0000, 0x0000FF };
- case 0x49:
- case 0x5C:
- return new int[] { 0xA59CFF, 0xFFFF00, 0x006300, 0x000000, 0xFF6352, 0xD60000, 0x630000, 0x000000, 0x0000FF, 0xFFFFFF, 0xFFFF7B, 0x0084FF };
- case 0x4B:
- case 0x90:
- case 0x9A:
- case 0xBD:
- return new int[] { 0xFFFFFF, 0x7BFF31, 0x008400, 0x000000, 0xFFFFFF, 0xFF8484, 0x943A3A, 0x000000, 0xFFFFFF, 0xFF8484, 0x943A3A, 0x000000 };
- case 0x4E:
- return new int[] { 0xFFFFFF, 0x63A5FF, 0x0000FF, 0x000000, 0xFFFFFF, 0xFF8484, 0x943A3A, 0x000000, 0xFFFFFF, 0xFFFF7B, 0x0084FF, 0xFF0000 };
- case 0x58:
- return new int[] { 0xFFFFFF, 0xA5A5A5, 0x525252, 0x000000, 0xFFFFFF, 0xA5A5A5, 0x525252, 0x000000, 0xFFFFFF, 0xA5A5A5, 0x525252, 0x000000 };
- case 0x59:
- return new int[] { 0xFFFFFF, 0xADAD84, 0x42737B, 0x000000, 0xFFFFFF, 0xFF7300, 0x944200, 0x000000, 0xFFFFFF, 0x5ABDFF, 0xFF0000, 0x0000FF };
- case 0x69:
- case 0xF2:
- return new int[] { 0xFFFFFF, 0xFFFF00, 0xFF0000, 0x000000, 0xFFFFFF, 0xFFFF00, 0xFF0000, 0x000000, 0xFFFFFF, 0x5ABDFF, 0xFF0000, 0x0000FF };
- case 0x6B:
- return new int[] { 0xFFFFFF, 0x8C8CDE, 0x52528C, 0x000000, 0xFFC542, 0xFFD600, 0x943A00, 0x4A0000, 0xFFFFFF, 0x5ABDFF, 0xFF0000, 0x0000FF };
- case 0x6F:
- return new int[] { 0xFFFFFF, 0xFFCE00, 0x9C6300, 0x000000, 0xFFFFFF, 0xFFCE00, 0x9C6300, 0x000000, 0xFFFFFF, 0xFFCE00, 0x9C6300, 0x000000 };
- case 0x70:
- return new int[] { 0xFFFFFF, 0xFF8484, 0x943A3A, 0x000000, 0xFFFFFF, 0x00FF00, 0x318400, 0x004A00, 0xFFFFFF, 0x63A5FF, 0x0000FF, 0x000000 };
- case 0x71:
- case 0xFF:
- return new int[] { 0xFFFFFF, 0xFF9C00, 0xFF0000, 0x000000, 0xFFFFFF, 0xFF9C00, 0xFF0000, 0x000000, 0xFFFFFF, 0xFF9C00, 0xFF0000, 0x000000 };
- case 0x86:
- case 0xA8:
- return new int[] { 0xFFFF9C, 0x94B5FF, 0x639473, 0x003A3A, 0xFFC542, 0xFFD600, 0x943A00, 0x4A0000, 0xFFFFFF, 0xFF8484, 0x943A3A, 0x000000 };
- case 0x88:
- return new int[] { 0xA59CFF, 0xFFFF00, 0x006300, 0x000000, 0xA59CFF, 0xFFFF00, 0x006300, 0x000000, 0xA59CFF, 0xFFFF00, 0x006300, 0x000000 };
- case 0x8C:
- return new int[] { 0xFFFFFF, 0xADAD84, 0x42737B, 0x000000, 0xFFFFFF, 0xFF7300, 0x944200, 0x000000, 0xFFFFFF, 0xADAD84, 0x42737B, 0x000000 };
- case 0x95:
- return new int[] { 0xFFFFFF, 0x52FF00, 0xFF4200, 0x000000, 0xFFFFFF, 0x52FF00, 0xFF4200, 0x000000, 0xFFFFFF, 0x5ABDFF, 0xFF0000, 0x0000FF };
- case 0x9C:
- return new int[] { 0xFFFFFF, 0x8C8CDE, 0x52528C, 0x000000, 0xFFFFFF, 0x8C8CDE, 0x52528C, 0x000000, 0xFFC542, 0xFFD600, 0x943A00, 0x4A0000 };
- case 0x9D:
- return new int[] { 0xFFFFFF, 0x8C8CDE, 0x52528C, 0x000000, 0xFFFFFF, 0xFF8484, 0x943A3A, 0x000000, 0xFFFFFF, 0xFFAD63, 0x843100, 0x000000 };
- case 0xA2:
- case 0xF7:
- return new int[] { 0xFFFFFF, 0xFFAD63, 0x843100, 0x000000, 0xFFFFFF, 0x7BFF31, 0x008400, 0x000000, 0xFFFFFF, 0x63A5FF, 0x0000FF, 0x000000 };
- case 0xAA:
- return new int[] { 0xFFFFFF, 0x7BFF31, 0x0063C5, 0x000000, 0xFFFFFF, 0xFF8484, 0x943A3A, 0x000000, 0xFFFFFF, 0x7BFF31, 0x0063C5, 0x000000 };
- case 0xC9:
- return new int[] { 0xFFFFCE, 0x63EFEF, 0x9C8431, 0x5A5A5A, 0xFFFFFF, 0xFF7300, 0x944200, 0x000000, 0xFFFFFF, 0x63A5FF, 0x0000FF, 0x000000 };
- case 0xCE:
- case 0xD1:
- case 0xF0:
- return new int[] { 0x6BFF00, 0xFFFFFF, 0xFF524A, 0x000000, 0xFFFFFF, 0xFFFFFF, 0x63A5FF, 0x0000FF, 0xFFFFFF, 0xFFAD63, 0x843100, 0x000000 };
- case 0xE8:
- return new int[] { 0x000000, 0x008484, 0xFFDE00, 0xFFFFFF, 0x000000, 0x008484, 0xFFDE00, 0xFFFFFF, 0x000000, 0x008484, 0xFFDE00, 0xFFFFFF };
- case 0x0D:
- switch (romdata[0x137])
- {
- case 0x45:
- return new int[] { 0xFFFFFF, 0x8C8CDE, 0x52528C, 0x000000, 0xFFC542, 0xFFD600, 0x943A00, 0x4A0000, 0xFFC542, 0xFFD600, 0x943A00, 0x4A0000 };
- case 0x52:
- return new int[] { 0xFFFFFF, 0xFFFF00, 0xFF0000, 0x000000, 0xFFFFFF, 0xFFFF00, 0xFF0000, 0x000000, 0xFFFFFF, 0x5ABDFF, 0xFF0000, 0x0000FF };
- default:
- return new int[] { 0xFFFFFF, 0x7BFF31, 0x0063C5, 0x000000, 0xFFFFFF, 0xFF8484, 0x943A3A, 0x000000, 0xFFFFFF, 0xFF8484, 0x943A3A, 0x000000 };
- }
- case 0x18:
- switch (romdata[0x137])
- {
- case 0x4B:
- return new int[] { 0xFFFFFF, 0x8C8CDE, 0x52528C, 0x000000, 0xFFC542, 0xFFD600, 0x943A00, 0x4A0000, 0xFFFFFF, 0x5ABDFF, 0xFF0000, 0x0000FF };
- default:
- return new int[] { 0xFFFFFF, 0x7BFF31, 0x0063C5, 0x000000, 0xFFFFFF, 0xFF8484, 0x943A3A, 0x000000, 0xFFFFFF, 0xFF8484, 0x943A3A, 0x000000 };
- }
- case 0x27:
- switch (romdata[0x137])
- {
- case 0x42:
- return new int[] { 0xA59CFF, 0xFFFF00, 0x006300, 0x000000, 0xFF6352, 0xD60000, 0x630000, 0x000000, 0x0000FF, 0xFFFFFF, 0xFFFF7B, 0x0084FF };
- case 0x4E:
- return new int[] { 0xFFFFFF, 0x7BFF31, 0x008400, 0x000000, 0xFFFFFF, 0xFF8484, 0x943A3A, 0x000000, 0xFFFFFF, 0x63A5FF, 0x0000FF, 0x000000 };
- default:
- return new int[] { 0xFFFFFF, 0x7BFF31, 0x0063C5, 0x000000, 0xFFFFFF, 0xFF8484, 0x943A3A, 0x000000, 0xFFFFFF, 0xFF8484, 0x943A3A, 0x000000 };
- }
- case 0x28:
- switch (romdata[0x137])
- {
- case 0x41:
- return new int[] { 0x000000, 0x008484, 0xFFDE00, 0xFFFFFF, 0x000000, 0x008484, 0xFFDE00, 0xFFFFFF, 0x000000, 0x008484, 0xFFDE00, 0xFFFFFF };
- case 0x46:
- return new int[] { 0xFFFFFF, 0x7BFF31, 0x008400, 0x000000, 0xFFFFFF, 0xFF8484, 0x943A3A, 0x000000, 0xFFFFFF, 0xFF8484, 0x943A3A, 0x000000 };
- default:
- return new int[] { 0xFFFFFF, 0x7BFF31, 0x0063C5, 0x000000, 0xFFFFFF, 0xFF8484, 0x943A3A, 0x000000, 0xFFFFFF, 0xFF8484, 0x943A3A, 0x000000 };
- }
- case 0x46:
- switch (romdata[0x137])
- {
- case 0x45:
- return new int[] { 0xB5B5FF, 0xFFFF94, 0xAD5A42, 0x000000, 0x000000, 0xFFFFFF, 0xFF8484, 0x943A3A, 0x000000, 0xFFFFFF, 0xFF8484, 0x943A3A };
- case 0x52:
- return new int[] { 0xFFFFFF, 0x63A5FF, 0x0000FF, 0x000000, 0xFFFF00, 0xFF0000, 0x630000, 0x000000, 0xFFFFFF, 0x7BFF31, 0x008400, 0x000000 };
- default:
- return new int[] { 0xFFFFFF, 0x7BFF31, 0x0063C5, 0x000000, 0xFFFFFF, 0xFF8484, 0x943A3A, 0x000000, 0xFFFFFF, 0xFF8484, 0x943A3A, 0x000000 };
- }
- case 0x61:
- switch (romdata[0x137])
- {
- case 0x41:
- return new int[] { 0xFFFFFF, 0x7BFF31, 0x008400, 0x000000, 0xFFFFFF, 0xFF8484, 0x943A3A, 0x000000, 0xFFFFFF, 0x63A5FF, 0x0000FF, 0x000000 };
- case 0x45:
- return new int[] { 0xFFFFFF, 0x63A5FF, 0x0000FF, 0x000000, 0xFFFFFF, 0xFF8484, 0x943A3A, 0x000000, 0xFFFFFF, 0x63A5FF, 0x0000FF, 0x000000 };
- default:
- return new int[] { 0xFFFFFF, 0x7BFF31, 0x0063C5, 0x000000, 0xFFFFFF, 0xFF8484, 0x943A3A, 0x000000, 0xFFFFFF, 0xFF8484, 0x943A3A, 0x000000 };
- }
- case 0x66:
- switch (romdata[0x137])
- {
- case 0x45:
- return new int[] { 0xFFFFFF, 0x7BFF00, 0xB57300, 0x000000, 0xFFFFFF, 0xFF8484, 0x943A3A, 0x000000, 0xFFFFFF, 0xFF8484, 0x943A3A, 0x000000 };
- default:
- return new int[] { 0xFFFFFF, 0x7BFF31, 0x0063C5, 0x000000, 0xFFFFFF, 0xFF8484, 0x943A3A, 0x000000, 0xFFFFFF, 0xFF8484, 0x943A3A, 0x000000 };
- }
- case 0x6A:
- switch (romdata[0x137])
- {
- case 0x49:
- return new int[] { 0xFFFFFF, 0x52FF00, 0xFF4200, 0x000000, 0xFFFFFF, 0xFF8484, 0x943A3A, 0x000000, 0xFFFFFF, 0xFF8484, 0x943A3A, 0x000000 };
- case 0x4B:
- return new int[] { 0xFFFFFF, 0x8C8CDE, 0x52528C, 0x000000, 0xFFC542, 0xFFD600, 0x943A00, 0x4A0000, 0xFFFFFF, 0x5ABDFF, 0xFF0000, 0x0000FF };
- default:
- return new int[] { 0xFFFFFF, 0x7BFF31, 0x0063C5, 0x000000, 0xFFFFFF, 0xFF8484, 0x943A3A, 0x000000, 0xFFFFFF, 0xFF8484, 0x943A3A, 0x000000 };
- }
- case 0xA5:
- switch (romdata[0x137])
- {
- case 0x41:
- return new int[] { 0x000000, 0x008484, 0xFFDE00, 0xFFFFFF, 0x000000, 0x008484, 0xFFDE00, 0xFFFFFF, 0x000000, 0x008484, 0xFFDE00, 0xFFFFFF };
- case 0x52:
- return new int[] { 0xFFFFFF, 0xFFAD63, 0x843100, 0x000000, 0xFFFFFF, 0x7BFF31, 0x008400, 0x000000, 0xFFFFFF, 0x7BFF31, 0x008400, 0x000000 };
- default:
- return new int[] { 0xFFFFFF, 0x7BFF31, 0x0063C5, 0x000000, 0xFFFFFF, 0xFF8484, 0x943A3A, 0x000000, 0xFFFFFF, 0xFF8484, 0x943A3A, 0x000000 };
- }
- case 0xB3:
- switch (romdata[0x137])
- {
- case 0x42:
- return new int[] { 0xA59CFF, 0xFFFF00, 0x006300, 0x000000, 0xFF6352, 0xD60000, 0x630000, 0x000000, 0x0000FF, 0xFFFFFF, 0xFFFF7B, 0x0084FF };
- case 0x52:
- return new int[] { 0xFFFFFF, 0x52FF00, 0xFF4200, 0x000000, 0xFFFFFF, 0x52FF00, 0xFF4200, 0x000000, 0xFFFFFF, 0x5ABDFF, 0xFF0000, 0x0000FF };
- case 0x55:
- return new int[] { 0xFFFFFF, 0xADAD84, 0x42737B, 0x000000, 0xFFFFFF, 0xFF7300, 0x944200, 0x000000, 0xFFFFFF, 0xFF7300, 0x944200, 0x000000 };
- default:
- return new int[] { 0xFFFFFF, 0x7BFF31, 0x0063C5, 0x000000, 0xFFFFFF, 0xFF8484, 0x943A3A, 0x000000, 0xFFFFFF, 0xFF8484, 0x943A3A, 0x000000 };
- }
- case 0xBF:
- switch (romdata[0x137])
- {
- case 0x20:
- return new int[] { 0xFFFFFF, 0x8C8CDE, 0x52528C, 0x000000, 0xFFFFFF, 0xFF8484, 0x943A3A, 0x000000, 0xFFFFFF, 0xFF8484, 0x943A3A, 0x000000 };
- case 0x43:
- return new int[] { 0x6BFF00, 0xFFFFFF, 0xFF524A, 0x000000, 0xFFFFFF, 0xFFFFFF, 0x63A5FF, 0x0000FF, 0xFFFFFF, 0xFFAD63, 0x843100, 0x000000 };
- default:
- return new int[] { 0xFFFFFF, 0x7BFF31, 0x0063C5, 0x000000, 0xFFFFFF, 0xFF8484, 0x943A3A, 0x000000, 0xFFFFFF, 0xFF8484, 0x943A3A, 0x000000 };
- }
- case 0xC6:
- switch (romdata[0x137])
- {
- case 0x41:
- return new int[] { 0xFFFFFF, 0xADAD84, 0x42737B, 0x000000, 0xFFFFFF, 0xFF7300, 0x944200, 0x000000, 0xFFFFFF, 0x5ABDFF, 0xFF0000, 0x0000FF };
- default:
- return new int[] { 0xFFFFFF, 0x7BFF31, 0x0063C5, 0x000000, 0xFFFFFF, 0xFF8484, 0x943A3A, 0x000000, 0xFFFFFF, 0xFF8484, 0x943A3A, 0x000000 };
- }
- case 0xD3:
- switch (romdata[0x137])
- {
- case 0x49:
- return new int[] { 0xFFFFFF, 0xADAD84, 0x42737B, 0x000000, 0xFFFFFF, 0xFFAD63, 0x843100, 0x000000, 0xFFFFFF, 0x63A5FF, 0x0000FF, 0x000000 };
- case 0x52:
- return new int[] { 0xFFFFFF, 0x8C8CDE, 0x52528C, 0x000000, 0xFFFFFF, 0xFF8484, 0x943A3A, 0x000000, 0xFFFFFF, 0x8C8CDE, 0x52528C, 0x000000 };
- default:
- return new int[] { 0xFFFFFF, 0x7BFF31, 0x0063C5, 0x000000, 0xFFFFFF, 0xFF8484, 0x943A3A, 0x000000, 0xFFFFFF, 0xFF8484, 0x943A3A, 0x000000 };
- }
- case 0xF4:
- switch (romdata[0x137])
- {
- case 0x20:
- return new int[] { 0xFFFFFF, 0x7BFF00, 0xB57300, 0x000000, 0xFFFFFF, 0xFF8484, 0x943A3A, 0x000000, 0xFFFFFF, 0xFF8484, 0x943A3A, 0x000000 };
- case 0x2D:
- return new int[] { 0xFFFFFF, 0x7BFF31, 0x0063C5, 0x000000, 0xFFFFFF, 0xFF8484, 0x943A3A, 0x000000, 0xFFFFFF, 0x63A5FF, 0x0000FF, 0x000000 };
- default:
- return new int[] { 0xFFFFFF, 0x7BFF31, 0x0063C5, 0x000000, 0xFFFFFF, 0xFF8484, 0x943A3A, 0x000000, 0xFFFFFF, 0xFF8484, 0x943A3A, 0x000000 };
- }
- default:
- return new int[] { 0xFFFFFF, 0x7BFF31, 0x0063C5, 0x000000, 0xFFFFFF, 0xFF8484, 0x943A3A, 0x000000, 0xFFFFFF, 0xFF8484, 0x943A3A, 0x000000 };
- }
+ 0x01 or 0x10 or 0x29 or 0x52 or 0x5D or 0x68 or 0x6D or 0xF6 => new int[] { 0xFFFFFF, 0xFFAD63, 0x843100, 0x000000, 0xFFFFFF, 0x63A5FF, 0x0000FF, 0x000000, 0xFFFFFF, 0x7BFF31, 0x008400, 0x000000 },
+ 0x0C or 0x16 or 0x35 or 0x67 or 0x75 or 0x92 or 0x99 or 0xB7 => new int[] { 0xFFFFFF, 0xFFAD63, 0x843100, 0x000000, 0xFFFFFF, 0xFFAD63, 0x843100, 0x000000, 0xFFFFFF, 0xFFAD63, 0x843100, 0x000000 },
+ 0x14 => new int[] { 0xFFFFFF, 0xFF8484, 0x943A3A, 0x000000, 0xFFFFFF, 0x7BFF31, 0x008400, 0x000000, 0xFFFFFF, 0xFF8484, 0x943A3A, 0x000000 },
+ 0x15 or 0xDB => new int[] { 0xFFFFFF, 0xFFFF00, 0xFF0000, 0x000000, 0xFFFFFF, 0xFFFF00, 0xFF0000, 0x000000, 0xFFFFFF, 0xFFFF00, 0xFF0000, 0x000000 },
+ 0x17 or 0x8B => new int[] { 0xFFFFFF, 0x7BFF31, 0x008400, 0x000000, 0xFFFFFF, 0xFF8484, 0x943A3A, 0x000000, 0xFFFFFF, 0x63A5FF, 0x0000FF, 0x000000 },
+ 0x19 => new int[] { 0xFFFFFF, 0xFF9C00, 0xFF0000, 0x000000, 0xFFFFFF, 0xFF8484, 0x943A3A, 0x000000, 0xFFFFFF, 0xFF8484, 0x943A3A, 0x000000 },
+ 0x1D => new int[] { 0xA59CFF, 0xFFFF00, 0x006300, 0x000000, 0xFF6352, 0xD60000, 0x630000, 0x000000, 0xFF6352, 0xD60000, 0x630000, 0x000000 },
+ 0x34 => new int[] { 0xFFFFFF, 0x7BFF00, 0xB57300, 0x000000, 0xFFFFFF, 0xFF8484, 0x943A3A, 0x000000, 0xFFFFFF, 0xFF8484, 0x943A3A, 0x000000 },
+ 0x36 => new int[] { 0x52DE00, 0xFF8400, 0xFFFF00, 0xFFFFFF, 0xFFFFFF, 0xFFFFFF, 0x63A5FF, 0x0000FF, 0xFFFFFF, 0xFF8484, 0x943A3A, 0x000000 },
+ 0x39 or 0x43 or 0x97 => new int[] { 0xFFFFFF, 0xFFAD63, 0x843100, 0x000000, 0xFFFFFF, 0x63A5FF, 0x0000FF, 0x000000, 0xFFFFFF, 0x63A5FF, 0x0000FF, 0x000000 },
+ 0x3C => new int[] { 0xFFFFFF, 0x63A5FF, 0x0000FF, 0x000000, 0xFFFFFF, 0x63A5FF, 0x0000FF, 0x000000, 0xFFFFFF, 0xFF8484, 0x943A3A, 0x000000 },
+ 0x3D => new int[] { 0xFFFFFF, 0x52FF00, 0xFF4200, 0x000000, 0xFFFFFF, 0xFF8484, 0x943A3A, 0x000000, 0xFFFFFF, 0xFF8484, 0x943A3A, 0x000000 },
+ 0x3E or 0xE0 => new int[] { 0xFFFFFF, 0xFF9C00, 0xFF0000, 0x000000, 0xFFFFFF, 0xFF9C00, 0xFF0000, 0x000000, 0xFFFFFF, 0x5ABDFF, 0xFF0000, 0x0000FF },
+ 0x49 or 0x5C => new int[] { 0xA59CFF, 0xFFFF00, 0x006300, 0x000000, 0xFF6352, 0xD60000, 0x630000, 0x000000, 0x0000FF, 0xFFFFFF, 0xFFFF7B, 0x0084FF },
+ 0x4B or 0x90 or 0x9A or 0xBD => new int[] { 0xFFFFFF, 0x7BFF31, 0x008400, 0x000000, 0xFFFFFF, 0xFF8484, 0x943A3A, 0x000000, 0xFFFFFF, 0xFF8484, 0x943A3A, 0x000000 },
+ 0x4E => new int[] { 0xFFFFFF, 0x63A5FF, 0x0000FF, 0x000000, 0xFFFFFF, 0xFF8484, 0x943A3A, 0x000000, 0xFFFFFF, 0xFFFF7B, 0x0084FF, 0xFF0000 },
+ 0x58 => new int[] { 0xFFFFFF, 0xA5A5A5, 0x525252, 0x000000, 0xFFFFFF, 0xA5A5A5, 0x525252, 0x000000, 0xFFFFFF, 0xA5A5A5, 0x525252, 0x000000 },
+ 0x59 => new int[] { 0xFFFFFF, 0xADAD84, 0x42737B, 0x000000, 0xFFFFFF, 0xFF7300, 0x944200, 0x000000, 0xFFFFFF, 0x5ABDFF, 0xFF0000, 0x0000FF },
+ 0x69 or 0xF2 => new int[] { 0xFFFFFF, 0xFFFF00, 0xFF0000, 0x000000, 0xFFFFFF, 0xFFFF00, 0xFF0000, 0x000000, 0xFFFFFF, 0x5ABDFF, 0xFF0000, 0x0000FF },
+ 0x6B => new int[] { 0xFFFFFF, 0x8C8CDE, 0x52528C, 0x000000, 0xFFC542, 0xFFD600, 0x943A00, 0x4A0000, 0xFFFFFF, 0x5ABDFF, 0xFF0000, 0x0000FF },
+ 0x6F => new int[] { 0xFFFFFF, 0xFFCE00, 0x9C6300, 0x000000, 0xFFFFFF, 0xFFCE00, 0x9C6300, 0x000000, 0xFFFFFF, 0xFFCE00, 0x9C6300, 0x000000 },
+ 0x70 => new int[] { 0xFFFFFF, 0xFF8484, 0x943A3A, 0x000000, 0xFFFFFF, 0x00FF00, 0x318400, 0x004A00, 0xFFFFFF, 0x63A5FF, 0x0000FF, 0x000000 },
+ 0x71 or 0xFF => new int[] { 0xFFFFFF, 0xFF9C00, 0xFF0000, 0x000000, 0xFFFFFF, 0xFF9C00, 0xFF0000, 0x000000, 0xFFFFFF, 0xFF9C00, 0xFF0000, 0x000000 },
+ 0x86 or 0xA8 => new int[] { 0xFFFF9C, 0x94B5FF, 0x639473, 0x003A3A, 0xFFC542, 0xFFD600, 0x943A00, 0x4A0000, 0xFFFFFF, 0xFF8484, 0x943A3A, 0x000000 },
+ 0x88 => new int[] { 0xA59CFF, 0xFFFF00, 0x006300, 0x000000, 0xA59CFF, 0xFFFF00, 0x006300, 0x000000, 0xA59CFF, 0xFFFF00, 0x006300, 0x000000 },
+ 0x8C => new int[] { 0xFFFFFF, 0xADAD84, 0x42737B, 0x000000, 0xFFFFFF, 0xFF7300, 0x944200, 0x000000, 0xFFFFFF, 0xADAD84, 0x42737B, 0x000000 },
+ 0x95 => new int[] { 0xFFFFFF, 0x52FF00, 0xFF4200, 0x000000, 0xFFFFFF, 0x52FF00, 0xFF4200, 0x000000, 0xFFFFFF, 0x5ABDFF, 0xFF0000, 0x0000FF },
+ 0x9C => new int[] { 0xFFFFFF, 0x8C8CDE, 0x52528C, 0x000000, 0xFFFFFF, 0x8C8CDE, 0x52528C, 0x000000, 0xFFC542, 0xFFD600, 0x943A00, 0x4A0000 },
+ 0x9D => new int[] { 0xFFFFFF, 0x8C8CDE, 0x52528C, 0x000000, 0xFFFFFF, 0xFF8484, 0x943A3A, 0x000000, 0xFFFFFF, 0xFFAD63, 0x843100, 0x000000 },
+ 0xA2 or 0xF7 => new int[] { 0xFFFFFF, 0xFFAD63, 0x843100, 0x000000, 0xFFFFFF, 0x7BFF31, 0x008400, 0x000000, 0xFFFFFF, 0x63A5FF, 0x0000FF, 0x000000 },
+ 0xAA => new int[] { 0xFFFFFF, 0x7BFF31, 0x0063C5, 0x000000, 0xFFFFFF, 0xFF8484, 0x943A3A, 0x000000, 0xFFFFFF, 0x7BFF31, 0x0063C5, 0x000000 },
+ 0xC9 => new int[] { 0xFFFFCE, 0x63EFEF, 0x9C8431, 0x5A5A5A, 0xFFFFFF, 0xFF7300, 0x944200, 0x000000, 0xFFFFFF, 0x63A5FF, 0x0000FF, 0x000000 },
+ 0xCE or 0xD1 or 0xF0 => new int[] { 0x6BFF00, 0xFFFFFF, 0xFF524A, 0x000000, 0xFFFFFF, 0xFFFFFF, 0x63A5FF, 0x0000FF, 0xFFFFFF, 0xFFAD63, 0x843100, 0x000000 },
+ 0xE8 => new int[] { 0x000000, 0x008484, 0xFFDE00, 0xFFFFFF, 0x000000, 0x008484, 0xFFDE00, 0xFFFFFF, 0x000000, 0x008484, 0xFFDE00, 0xFFFFFF },
+ 0x0D => (romdata[0x137]) switch
+ {
+ 0x45 => new int[] { 0xFFFFFF, 0x8C8CDE, 0x52528C, 0x000000, 0xFFC542, 0xFFD600, 0x943A00, 0x4A0000, 0xFFC542, 0xFFD600, 0x943A00, 0x4A0000 },
+ 0x52 => new int[] { 0xFFFFFF, 0xFFFF00, 0xFF0000, 0x000000, 0xFFFFFF, 0xFFFF00, 0xFF0000, 0x000000, 0xFFFFFF, 0x5ABDFF, 0xFF0000, 0x0000FF },
+ _ => new int[] { 0xFFFFFF, 0x7BFF31, 0x0063C5, 0x000000, 0xFFFFFF, 0xFF8484, 0x943A3A, 0x000000, 0xFFFFFF, 0xFF8484, 0x943A3A, 0x000000 },
+ },
+ 0x18 => (romdata[0x137]) switch
+ {
+ 0x4B => new int[] { 0xFFFFFF, 0x8C8CDE, 0x52528C, 0x000000, 0xFFC542, 0xFFD600, 0x943A00, 0x4A0000, 0xFFFFFF, 0x5ABDFF, 0xFF0000, 0x0000FF },
+ _ => new int[] { 0xFFFFFF, 0x7BFF31, 0x0063C5, 0x000000, 0xFFFFFF, 0xFF8484, 0x943A3A, 0x000000, 0xFFFFFF, 0xFF8484, 0x943A3A, 0x000000 },
+ },
+ 0x27 => (romdata[0x137]) switch
+ {
+ 0x42 => new int[] { 0xA59CFF, 0xFFFF00, 0x006300, 0x000000, 0xFF6352, 0xD60000, 0x630000, 0x000000, 0x0000FF, 0xFFFFFF, 0xFFFF7B, 0x0084FF },
+ 0x4E => new int[] { 0xFFFFFF, 0x7BFF31, 0x008400, 0x000000, 0xFFFFFF, 0xFF8484, 0x943A3A, 0x000000, 0xFFFFFF, 0x63A5FF, 0x0000FF, 0x000000 },
+ _ => new int[] { 0xFFFFFF, 0x7BFF31, 0x0063C5, 0x000000, 0xFFFFFF, 0xFF8484, 0x943A3A, 0x000000, 0xFFFFFF, 0xFF8484, 0x943A3A, 0x000000 },
+ },
+ 0x28 => (romdata[0x137]) switch
+ {
+ 0x41 => new int[] { 0x000000, 0x008484, 0xFFDE00, 0xFFFFFF, 0x000000, 0x008484, 0xFFDE00, 0xFFFFFF, 0x000000, 0x008484, 0xFFDE00, 0xFFFFFF },
+ 0x46 => new int[] { 0xFFFFFF, 0x7BFF31, 0x008400, 0x000000, 0xFFFFFF, 0xFF8484, 0x943A3A, 0x000000, 0xFFFFFF, 0xFF8484, 0x943A3A, 0x000000 },
+ _ => new int[] { 0xFFFFFF, 0x7BFF31, 0x0063C5, 0x000000, 0xFFFFFF, 0xFF8484, 0x943A3A, 0x000000, 0xFFFFFF, 0xFF8484, 0x943A3A, 0x000000 },
+ },
+ 0x46 => (romdata[0x137]) switch
+ {
+ 0x45 => new int[] { 0xB5B5FF, 0xFFFF94, 0xAD5A42, 0x000000, 0x000000, 0xFFFFFF, 0xFF8484, 0x943A3A, 0x000000, 0xFFFFFF, 0xFF8484, 0x943A3A },
+ 0x52 => new int[] { 0xFFFFFF, 0x63A5FF, 0x0000FF, 0x000000, 0xFFFF00, 0xFF0000, 0x630000, 0x000000, 0xFFFFFF, 0x7BFF31, 0x008400, 0x000000 },
+ _ => new int[] { 0xFFFFFF, 0x7BFF31, 0x0063C5, 0x000000, 0xFFFFFF, 0xFF8484, 0x943A3A, 0x000000, 0xFFFFFF, 0xFF8484, 0x943A3A, 0x000000 },
+ },
+ 0x61 => (romdata[0x137]) switch
+ {
+ 0x41 => new int[] { 0xFFFFFF, 0x7BFF31, 0x008400, 0x000000, 0xFFFFFF, 0xFF8484, 0x943A3A, 0x000000, 0xFFFFFF, 0x63A5FF, 0x0000FF, 0x000000 },
+ 0x45 => new int[] { 0xFFFFFF, 0x63A5FF, 0x0000FF, 0x000000, 0xFFFFFF, 0xFF8484, 0x943A3A, 0x000000, 0xFFFFFF, 0x63A5FF, 0x0000FF, 0x000000 },
+ _ => new int[] { 0xFFFFFF, 0x7BFF31, 0x0063C5, 0x000000, 0xFFFFFF, 0xFF8484, 0x943A3A, 0x000000, 0xFFFFFF, 0xFF8484, 0x943A3A, 0x000000 },
+ },
+ 0x66 => (romdata[0x137]) switch
+ {
+ 0x45 => new int[] { 0xFFFFFF, 0x7BFF00, 0xB57300, 0x000000, 0xFFFFFF, 0xFF8484, 0x943A3A, 0x000000, 0xFFFFFF, 0xFF8484, 0x943A3A, 0x000000 },
+ _ => new int[] { 0xFFFFFF, 0x7BFF31, 0x0063C5, 0x000000, 0xFFFFFF, 0xFF8484, 0x943A3A, 0x000000, 0xFFFFFF, 0xFF8484, 0x943A3A, 0x000000 },
+ },
+ 0x6A => (romdata[0x137]) switch
+ {
+ 0x49 => new int[] { 0xFFFFFF, 0x52FF00, 0xFF4200, 0x000000, 0xFFFFFF, 0xFF8484, 0x943A3A, 0x000000, 0xFFFFFF, 0xFF8484, 0x943A3A, 0x000000 },
+ 0x4B => new int[] { 0xFFFFFF, 0x8C8CDE, 0x52528C, 0x000000, 0xFFC542, 0xFFD600, 0x943A00, 0x4A0000, 0xFFFFFF, 0x5ABDFF, 0xFF0000, 0x0000FF },
+ _ => new int[] { 0xFFFFFF, 0x7BFF31, 0x0063C5, 0x000000, 0xFFFFFF, 0xFF8484, 0x943A3A, 0x000000, 0xFFFFFF, 0xFF8484, 0x943A3A, 0x000000 },
+ },
+ 0xA5 => (romdata[0x137]) switch
+ {
+ 0x41 => new int[] { 0x000000, 0x008484, 0xFFDE00, 0xFFFFFF, 0x000000, 0x008484, 0xFFDE00, 0xFFFFFF, 0x000000, 0x008484, 0xFFDE00, 0xFFFFFF },
+ 0x52 => new int[] { 0xFFFFFF, 0xFFAD63, 0x843100, 0x000000, 0xFFFFFF, 0x7BFF31, 0x008400, 0x000000, 0xFFFFFF, 0x7BFF31, 0x008400, 0x000000 },
+ _ => new int[] { 0xFFFFFF, 0x7BFF31, 0x0063C5, 0x000000, 0xFFFFFF, 0xFF8484, 0x943A3A, 0x000000, 0xFFFFFF, 0xFF8484, 0x943A3A, 0x000000 },
+ },
+ 0xB3 => (romdata[0x137]) switch
+ {
+ 0x42 => new int[] { 0xA59CFF, 0xFFFF00, 0x006300, 0x000000, 0xFF6352, 0xD60000, 0x630000, 0x000000, 0x0000FF, 0xFFFFFF, 0xFFFF7B, 0x0084FF },
+ 0x52 => new int[] { 0xFFFFFF, 0x52FF00, 0xFF4200, 0x000000, 0xFFFFFF, 0x52FF00, 0xFF4200, 0x000000, 0xFFFFFF, 0x5ABDFF, 0xFF0000, 0x0000FF },
+ 0x55 => new int[] { 0xFFFFFF, 0xADAD84, 0x42737B, 0x000000, 0xFFFFFF, 0xFF7300, 0x944200, 0x000000, 0xFFFFFF, 0xFF7300, 0x944200, 0x000000 },
+ _ => new int[] { 0xFFFFFF, 0x7BFF31, 0x0063C5, 0x000000, 0xFFFFFF, 0xFF8484, 0x943A3A, 0x000000, 0xFFFFFF, 0xFF8484, 0x943A3A, 0x000000 },
+ },
+ 0xBF => (romdata[0x137]) switch
+ {
+ 0x20 => new int[] { 0xFFFFFF, 0x8C8CDE, 0x52528C, 0x000000, 0xFFFFFF, 0xFF8484, 0x943A3A, 0x000000, 0xFFFFFF, 0xFF8484, 0x943A3A, 0x000000 },
+ 0x43 => new int[] { 0x6BFF00, 0xFFFFFF, 0xFF524A, 0x000000, 0xFFFFFF, 0xFFFFFF, 0x63A5FF, 0x0000FF, 0xFFFFFF, 0xFFAD63, 0x843100, 0x000000 },
+ _ => new int[] { 0xFFFFFF, 0x7BFF31, 0x0063C5, 0x000000, 0xFFFFFF, 0xFF8484, 0x943A3A, 0x000000, 0xFFFFFF, 0xFF8484, 0x943A3A, 0x000000 },
+ },
+ 0xC6 => (romdata[0x137]) switch
+ {
+ 0x41 => new int[] { 0xFFFFFF, 0xADAD84, 0x42737B, 0x000000, 0xFFFFFF, 0xFF7300, 0x944200, 0x000000, 0xFFFFFF, 0x5ABDFF, 0xFF0000, 0x0000FF },
+ _ => new int[] { 0xFFFFFF, 0x7BFF31, 0x0063C5, 0x000000, 0xFFFFFF, 0xFF8484, 0x943A3A, 0x000000, 0xFFFFFF, 0xFF8484, 0x943A3A, 0x000000 },
+ },
+ 0xD3 => (romdata[0x137]) switch
+ {
+ 0x49 => new int[] { 0xFFFFFF, 0xADAD84, 0x42737B, 0x000000, 0xFFFFFF, 0xFFAD63, 0x843100, 0x000000, 0xFFFFFF, 0x63A5FF, 0x0000FF, 0x000000 },
+ 0x52 => new int[] { 0xFFFFFF, 0x8C8CDE, 0x52528C, 0x000000, 0xFFFFFF, 0xFF8484, 0x943A3A, 0x000000, 0xFFFFFF, 0x8C8CDE, 0x52528C, 0x000000 },
+ _ => new int[] { 0xFFFFFF, 0x7BFF31, 0x0063C5, 0x000000, 0xFFFFFF, 0xFF8484, 0x943A3A, 0x000000, 0xFFFFFF, 0xFF8484, 0x943A3A, 0x000000 },
+ },
+ 0xF4 => (romdata[0x137]) switch
+ {
+ 0x20 => new int[] { 0xFFFFFF, 0x7BFF00, 0xB57300, 0x000000, 0xFFFFFF, 0xFF8484, 0x943A3A, 0x000000, 0xFFFFFF, 0xFF8484, 0x943A3A, 0x000000 },
+ 0x2D => new int[] { 0xFFFFFF, 0x7BFF31, 0x0063C5, 0x000000, 0xFFFFFF, 0xFF8484, 0x943A3A, 0x000000, 0xFFFFFF, 0x63A5FF, 0x0000FF, 0x000000 },
+ _ => new int[] { 0xFFFFFF, 0x7BFF31, 0x0063C5, 0x000000, 0xFFFFFF, 0xFF8484, 0x943A3A, 0x000000, 0xFFFFFF, 0xFF8484, 0x943A3A, 0x000000 },
+ },
+ _ => new int[] { 0xFFFFFF, 0x7BFF31, 0x0063C5, 0x000000, 0xFFFFFF, 0xFF8484, 0x943A3A, 0x000000, 0xFFFFFF, 0xFF8484, 0x943A3A, 0x000000 },
+ };
}
public IGPUMemoryAreas LockGPU()
@@ -797,12 +678,12 @@ namespace BizHawk.Emulation.Cores.Nintendo.Gameboy
}
else if (line == -2)
{
- callback(LibGambatte.gambatte_cpuread(GambatteState, 0xff40));
+ callback(LibGambatte.gambatte_cpuread(GambatteState, 0xFF40));
}
}
else if (line >= 0 && line <= 153)
{
- scanlinecb = () => callback(LibGambatte.gambatte_cpuread(GambatteState, 0xff40));
+ scanlinecb = () => callback(LibGambatte.gambatte_cpuread(GambatteState, 0xFF40));
LibGambatte.gambatte_setscanlinecallback(GambatteState, scanlinecb, line);
}
else
diff --git a/src/BizHawk.Emulation.Cores/Consoles/Nintendo/Gameboy/GambatteLink.ICodeDataLog.cs b/src/BizHawk.Emulation.Cores/Consoles/Nintendo/Gameboy/GambatteLink.ICodeDataLog.cs
index 07baaf12ea..00a2bdb93c 100644
--- a/src/BizHawk.Emulation.Cores/Consoles/Nintendo/Gameboy/GambatteLink.ICodeDataLog.cs
+++ b/src/BizHawk.Emulation.Cores/Consoles/Nintendo/Gameboy/GambatteLink.ICodeDataLog.cs
@@ -1,6 +1,7 @@
-using System.IO;
using BizHawk.Emulation.Common;
+using System.IO;
+
namespace BizHawk.Emulation.Cores.Nintendo.Gameboy
{
partial class GambatteLink
diff --git a/src/BizHawk.Emulation.Cores/Consoles/Nintendo/Gameboy/GambatteLink.IDebuggable.cs b/src/BizHawk.Emulation.Cores/Consoles/Nintendo/Gameboy/GambatteLink.IDebuggable.cs
index 04783cc4b2..267331a055 100644
--- a/src/BizHawk.Emulation.Cores/Consoles/Nintendo/Gameboy/GambatteLink.IDebuggable.cs
+++ b/src/BizHawk.Emulation.Cores/Consoles/Nintendo/Gameboy/GambatteLink.IDebuggable.cs
@@ -1,9 +1,9 @@
-using System;
+using BizHawk.Emulation.Common;
+
+using System;
using System.Collections.Generic;
using System.Linq;
-using BizHawk.Emulation.Common;
-
namespace BizHawk.Emulation.Cores.Nintendo.Gameboy
{
public partial class GambatteLink : IDebuggable
diff --git a/src/BizHawk.Emulation.Cores/Consoles/Nintendo/Gameboy/GambatteLink.IEmulator.cs b/src/BizHawk.Emulation.Cores/Consoles/Nintendo/Gameboy/GambatteLink.IEmulator.cs
index 8bf9801108..69c6154dfa 100644
--- a/src/BizHawk.Emulation.Cores/Consoles/Nintendo/Gameboy/GambatteLink.IEmulator.cs
+++ b/src/BizHawk.Emulation.Cores/Consoles/Nintendo/Gameboy/GambatteLink.IEmulator.cs
@@ -1,5 +1,6 @@
-using System;
-using BizHawk.Emulation.Common;
+using BizHawk.Emulation.Common;
+
+using System;
namespace BizHawk.Emulation.Cores.Nintendo.Gameboy
{
diff --git a/src/BizHawk.Emulation.Cores/Consoles/Nintendo/Gameboy/GambatteLink.IMemoryDomains.cs b/src/BizHawk.Emulation.Cores/Consoles/Nintendo/Gameboy/GambatteLink.IMemoryDomains.cs
index 5268637ec9..f1a70748c7 100644
--- a/src/BizHawk.Emulation.Cores/Consoles/Nintendo/Gameboy/GambatteLink.IMemoryDomains.cs
+++ b/src/BizHawk.Emulation.Cores/Consoles/Nintendo/Gameboy/GambatteLink.IMemoryDomains.cs
@@ -1,5 +1,6 @@
-using System.Collections.Generic;
-using BizHawk.Emulation.Common;
+using BizHawk.Emulation.Common;
+
+using System.Collections.Generic;
namespace BizHawk.Emulation.Cores.Nintendo.Gameboy
{
diff --git a/src/BizHawk.Emulation.Cores/Consoles/Nintendo/Gameboy/GambatteLink.ISaveRam.cs b/src/BizHawk.Emulation.Cores/Consoles/Nintendo/Gameboy/GambatteLink.ISaveRam.cs
index 7a6908930e..a14cd9d535 100644
--- a/src/BizHawk.Emulation.Cores/Consoles/Nintendo/Gameboy/GambatteLink.ISaveRam.cs
+++ b/src/BizHawk.Emulation.Cores/Consoles/Nintendo/Gameboy/GambatteLink.ISaveRam.cs
@@ -1,5 +1,6 @@
-using System;
-using BizHawk.Emulation.Common;
+using BizHawk.Emulation.Common;
+
+using System;
namespace BizHawk.Emulation.Cores.Nintendo.Gameboy
{
diff --git a/src/BizHawk.Emulation.Cores/Consoles/Nintendo/Gameboy/GambatteLink.ISoundProvider.cs b/src/BizHawk.Emulation.Cores/Consoles/Nintendo/Gameboy/GambatteLink.ISoundProvider.cs
index f2a8105e70..4de4e2ec51 100644
--- a/src/BizHawk.Emulation.Cores/Consoles/Nintendo/Gameboy/GambatteLink.ISoundProvider.cs
+++ b/src/BizHawk.Emulation.Cores/Consoles/Nintendo/Gameboy/GambatteLink.ISoundProvider.cs
@@ -1,5 +1,6 @@
-using System;
-using BizHawk.Emulation.Common;
+using BizHawk.Emulation.Common;
+
+using System;
namespace BizHawk.Emulation.Cores.Nintendo.Gameboy
{
diff --git a/src/BizHawk.Emulation.Cores/Consoles/Nintendo/Gameboy/GambatteLink.IStatable.cs b/src/BizHawk.Emulation.Cores/Consoles/Nintendo/Gameboy/GambatteLink.IStatable.cs
index 088a43ea01..e8fc8b6451 100644
--- a/src/BizHawk.Emulation.Cores/Consoles/Nintendo/Gameboy/GambatteLink.IStatable.cs
+++ b/src/BizHawk.Emulation.Cores/Consoles/Nintendo/Gameboy/GambatteLink.IStatable.cs
@@ -1,7 +1,8 @@
-using System.IO;
+using BizHawk.Emulation.Common;
+
using Newtonsoft.Json;
-using BizHawk.Emulation.Common;
+using System.IO;
namespace BizHawk.Emulation.Cores.Nintendo.Gameboy
{
diff --git a/src/BizHawk.Emulation.Cores/Consoles/Nintendo/Gameboy/GambatteLink.cs b/src/BizHawk.Emulation.Cores/Consoles/Nintendo/Gameboy/GambatteLink.cs
index 2a16894ff4..a69050e1ca 100644
--- a/src/BizHawk.Emulation.Cores/Consoles/Nintendo/Gameboy/GambatteLink.cs
+++ b/src/BizHawk.Emulation.Cores/Consoles/Nintendo/Gameboy/GambatteLink.cs
@@ -1,5 +1,6 @@
-using System;
-using BizHawk.Emulation.Common;
+using BizHawk.Emulation.Common;
+
+using System;
namespace BizHawk.Emulation.Cores.Nintendo.Gameboy
{
@@ -9,14 +10,14 @@ namespace BizHawk.Emulation.Cores.Nintendo.Gameboy
IBoardInfo, IRomInfo, IDebuggable, ISettable, ICodeDataLogger
{
[CoreConstructor("DGB")]
- public GambatteLink(CoreLoadParameters lp)
+ public GambatteLink(CoreLoadParameters lp)
{
if (lp.Roms.Count != 2)
throw new InvalidOperationException("Wrong number of roms");
ServiceProvider = new BasicServiceProvider(this);
- GambatteLinkSettings linkSettings = (GambatteLinkSettings)lp.Settings ?? new GambatteLinkSettings();
- GambatteLinkSyncSettings linkSyncSettings = (GambatteLinkSyncSettings)lp.SyncSettings ?? new GambatteLinkSyncSettings();
+ GambatteLinkSettings linkSettings = lp.Settings ?? new GambatteLinkSettings();
+ GambatteLinkSyncSettings linkSyncSettings = lp.SyncSettings ?? new GambatteLinkSyncSettings();
L = new Gameboy(lp.Comm, lp.Roms[0].Game, lp.Roms[0].RomData, linkSettings.L, linkSyncSettings.L, lp.DeterministicEmulationRequested);
R = new Gameboy(lp.Comm, lp.Roms[1].Game, lp.Roms[1].RomData, linkSettings.R, linkSyncSettings.R, lp.DeterministicEmulationRequested);
diff --git a/src/BizHawk.Emulation.Cores/Consoles/Nintendo/Gameboy/IGameboyCommon.cs b/src/BizHawk.Emulation.Cores/Consoles/Nintendo/Gameboy/IGameboyCommon.cs
index 762414be88..99ebdc1c2a 100644
--- a/src/BizHawk.Emulation.Cores/Consoles/Nintendo/Gameboy/IGameboyCommon.cs
+++ b/src/BizHawk.Emulation.Cores/Consoles/Nintendo/Gameboy/IGameboyCommon.cs
@@ -1,5 +1,5 @@
-using BizHawk.Common;
-using BizHawk.Emulation.Common;
+using BizHawk.Emulation.Common;
+
using System;
namespace BizHawk.Emulation.Cores.Consoles.Nintendo.Gameboy
diff --git a/src/BizHawk.Emulation.Cores/Consoles/Nintendo/Gameboy/LibGambatte.cs b/src/BizHawk.Emulation.Cores/Consoles/Nintendo/Gameboy/LibGambatte.cs
index 767099e975..5368b8e94e 100644
--- a/src/BizHawk.Emulation.Cores/Consoles/Nintendo/Gameboy/LibGambatte.cs
+++ b/src/BizHawk.Emulation.Cores/Consoles/Nintendo/Gameboy/LibGambatte.cs
@@ -1,6 +1,7 @@
-using System;
+using BizHawk.Emulation.Common;
+
+using System;
using System.Runtime.InteropServices;
-using BizHawk.Emulation.Common;
namespace BizHawk.Emulation.Cores.Nintendo.Gameboy
{
@@ -505,7 +506,7 @@ namespace BizHawk.Emulation.Cores.Nintendo.Gameboy
[DllImport("libgambatte", CallingConvention = CallingConvention.Cdecl)]
public static extern void gambatte_setrtcregs(IntPtr core, int[] src);
- public enum RtcRegIndicies : int
+ public enum RtcRegIndices : int
{
Dh, Dl, H, M, S, C, Dh_L, Dl_L, H_L, M_L, S_L
}