diff --git a/.editorconfig b/.editorconfig index 36f16df505..3b3e030434 100644 --- a/.editorconfig +++ b/.editorconfig @@ -24,3 +24,7 @@ dotnet_code_quality.CA1826.exclude_ordefault_methods = true dotnet_diagnostic.CA1805.severity = silent dotnet_diagnostic.CA1822.severity = silent dotnet_diagnostic.CA1838.severity = suggestion + +# Usage rules +dotnet_diagnostic.CA1816.severity = none +dotnet_diagnostic.CA2201.severity = suggestion diff --git a/Common.props b/Common.props index c2acdab16f..4f26374ee2 100644 --- a/Common.props +++ b/Common.props @@ -5,6 +5,7 @@ Recommended Recommended Recommended + Recommended $(MSBuildProjectDirectory)/../../Common.ruleset true true diff --git a/src/BizHawk.Bizware.BizwareGL/TexAtlas.cs b/src/BizHawk.Bizware.BizwareGL/TexAtlas.cs index 9b39b779f1..501edee5e2 100644 --- a/src/BizHawk.Bizware.BizwareGL/TexAtlas.cs +++ b/src/BizHawk.Bizware.BizwareGL/TexAtlas.cs @@ -295,4 +295,4 @@ namespace BizHawk.Bizware.BizwareGL } } } -} \ No newline at end of file +} diff --git a/src/BizHawk.Client.Common/RecentFiles.cs b/src/BizHawk.Client.Common/RecentFiles.cs index ed6dcdf33b..041cd97177 100644 --- a/src/BizHawk.Client.Common/RecentFiles.cs +++ b/src/BizHawk.Client.Common/RecentFiles.cs @@ -71,7 +71,7 @@ namespace BizHawk.Client.Common { if (!Frozen) { - return recentlist.RemoveAll(recent => string.Compare(newFile, recent, StringComparison.OrdinalIgnoreCase) == 0) != 0; // none removed => return false + return recentlist.RemoveAll(recent => string.Equals(newFile, recent, StringComparison.OrdinalIgnoreCase)) != 0; // none removed => return false } return false; diff --git a/src/BizHawk.Client.Common/config/MessagePosition.cs b/src/BizHawk.Client.Common/config/MessagePosition.cs index 5cecd2af74..039b3f24c7 100644 --- a/src/BizHawk.Client.Common/config/MessagePosition.cs +++ b/src/BizHawk.Client.Common/config/MessagePosition.cs @@ -36,14 +36,14 @@ public static class DefaultMessagePositions { - public static MessagePosition Fps = new MessagePosition { X = 0, Y = 0 }; - public static MessagePosition FrameCounter = new MessagePosition { X = 0, Y = 14 }; - public static MessagePosition LagCounter = new MessagePosition { X = 0, Y = 42 }; - public static MessagePosition InputDisplay = new MessagePosition { X = 0, Y = 28 }; - public static MessagePosition ReRecordCounter = new MessagePosition { X = 0, Y = 56 }; - public static MessagePosition Messages = new MessagePosition { X = 0, Y = 0, Anchor = MessagePosition.AnchorType.BottomLeft }; - public static MessagePosition Autohold = new MessagePosition { X = 0, Y = 0, Anchor = MessagePosition.AnchorType.TopRight }; - public static MessagePosition RamWatches = new MessagePosition { X = 0, Y = 70 }; + public static readonly MessagePosition Fps = new MessagePosition { X = 0, Y = 0 }; + public static readonly MessagePosition FrameCounter = new MessagePosition { X = 0, Y = 14 }; + public static readonly MessagePosition LagCounter = new MessagePosition { X = 0, Y = 42 }; + public static readonly MessagePosition InputDisplay = new MessagePosition { X = 0, Y = 28 }; + public static readonly MessagePosition ReRecordCounter = new MessagePosition { X = 0, Y = 56 }; + public static readonly MessagePosition Messages = new MessagePosition { X = 0, Y = 0, Anchor = MessagePosition.AnchorType.BottomLeft }; + public static readonly MessagePosition Autohold = new MessagePosition { X = 0, Y = 0, Anchor = MessagePosition.AnchorType.TopRight }; + public static readonly MessagePosition RamWatches = new MessagePosition { X = 0, Y = 70 }; public const int MessagesColor = -1, diff --git a/src/BizHawk.Client.Common/config/PathEntryCollection.cs b/src/BizHawk.Client.Common/config/PathEntryCollection.cs index b4c296a817..c2dec1d2c7 100644 --- a/src/BizHawk.Client.Common/config/PathEntryCollection.cs +++ b/src/BizHawk.Client.Common/config/PathEntryCollection.cs @@ -172,7 +172,7 @@ namespace BizHawk.Client.Common [JsonIgnore] internal string TempFilesFragment => this[GLOBAL, "Temp Files"].Path; - public static Lazy> Defaults = new(() => new[] + public static readonly Lazy> Defaults = new(() => new[] { new[] { BaseEntryFor(GLOBAL, "."), diff --git a/src/BizHawk.Client.Common/tools/Watch/WatchList/WatchNoteComparer.cs b/src/BizHawk.Client.Common/tools/Watch/WatchList/WatchNoteComparer.cs index faf5353a6e..3d0259b45a 100644 --- a/src/BizHawk.Client.Common/tools/Watch/WatchList/WatchNoteComparer.cs +++ b/src/BizHawk.Client.Common/tools/Watch/WatchList/WatchNoteComparer.cs @@ -32,7 +32,7 @@ namespace BizHawk.Client.Common return 0; } - if (string.Compare(x.Notes, y.Notes, StringComparison.OrdinalIgnoreCase) == 0) + if (string.Equals(x.Notes, y.Notes, StringComparison.OrdinalIgnoreCase)) { if (x.Address.Equals(y.Address)) { diff --git a/src/BizHawk.Client.DiscoHawk/Program.cs b/src/BizHawk.Client.DiscoHawk/Program.cs index d4d481e42d..d6b061b37a 100644 --- a/src/BizHawk.Client.DiscoHawk/Program.cs +++ b/src/BizHawk.Client.DiscoHawk/Program.cs @@ -74,8 +74,6 @@ namespace BizHawk.Client.DiscoHawk OSTC.LinkedLibManager.FreeByPtr(lib); } - FFmpegService.FFmpegPath = Path.Combine(PathUtils.DataDirectoryPath, "dll", OSTC.IsUnixHost ? "ffmpeg" : "ffmpeg.exe"); - if (args.Length == 0) { using var dialog = new MainDiscoForm(); diff --git a/src/BizHawk.Client.EmuHawk/Input/Input.cs b/src/BizHawk.Client.EmuHawk/Input/Input.cs index 4574725ab9..7acc6246a7 100644 --- a/src/BizHawk.Client.EmuHawk/Input/Input.cs +++ b/src/BizHawk.Client.EmuHawk/Input/Input.cs @@ -27,7 +27,7 @@ namespace BizHawk.Client.EmuHawk private readonly HashSet _wantingMouseFocus = new HashSet(); - public static Input Instance; + public static Input Instance { get; set; } private readonly Thread _updateThread; diff --git a/src/BizHawk.Client.EmuHawk/Program.cs b/src/BizHawk.Client.EmuHawk/Program.cs index 4d5baf4985..68c6031fee 100644 --- a/src/BizHawk.Client.EmuHawk/Program.cs +++ b/src/BizHawk.Client.EmuHawk/Program.cs @@ -172,8 +172,6 @@ namespace BizHawk.Client.EmuHawk if (initialConfig.SaveSlot is 0) initialConfig.SaveSlot = 10; //TODO remove after a while // initialConfig should really be globalConfig as it's mutable - FFmpegService.FFmpegPath = Path.Combine(PathUtils.DataDirectoryPath, "dll", OSTC.IsUnixHost ? "ffmpeg" : "ffmpeg.exe"); - StringLogUtil.DefaultToDisk = initialConfig.Movies.MoviesOnDisk; var glInitCount = 0; diff --git a/src/BizHawk.Client.EmuHawk/UpdateChecker.cs b/src/BizHawk.Client.EmuHawk/UpdateChecker.cs index 9983ba42a9..045682a2c8 100644 --- a/src/BizHawk.Client.EmuHawk/UpdateChecker.cs +++ b/src/BizHawk.Client.EmuHawk/UpdateChecker.cs @@ -15,7 +15,7 @@ namespace BizHawk.Client.EmuHawk private static readonly string _latestVersionInfoURL = "https://api.github.com/repos/TASVideos/BizHawk/releases/latest"; private static readonly TimeSpan _minimumCheckDuration = TimeSpan.FromHours(8); - public static Config GlobalConfig; + public static Config GlobalConfig { get; set; } private static bool AutoCheckEnabled { diff --git a/src/BizHawk.Client.EmuHawk/tools/TAStudio/TAStudioPalette.cs b/src/BizHawk.Client.EmuHawk/tools/TAStudio/TAStudioPalette.cs index fc3936558b..016c183830 100644 --- a/src/BizHawk.Client.EmuHawk/tools/TAStudio/TAStudioPalette.cs +++ b/src/BizHawk.Client.EmuHawk/tools/TAStudio/TAStudioPalette.cs @@ -9,7 +9,7 @@ namespace BizHawk.Client.EmuHawk /// public readonly struct TAStudioPalette { - public static TAStudioPalette Default = new( + public static readonly TAStudioPalette Default = new( // currentFrame_FrameCol: Color.FromArgb(0xCF, 0xED, 0xFC), currentFrame_InputLog: Color.FromArgb(0xB5, 0xE7, 0xF7), greenZone_FrameCol: Color.FromArgb(0xDD, 0xFF, 0xDD), diff --git a/src/BizHawk.Common/FFmpegService.cs b/src/BizHawk.Common/FFmpegService.cs index 1fd249c9d3..87e0568e65 100644 --- a/src/BizHawk.Common/FFmpegService.cs +++ b/src/BizHawk.Common/FFmpegService.cs @@ -7,6 +7,7 @@ using System.Text; using System.Text.RegularExpressions; using System.IO; using System.Threading.Tasks; +using BizHawk.Common.PathExtensions; namespace BizHawk.Common { @@ -18,7 +19,7 @@ namespace BizHawk.Common private const string VERSION = "ffmpeg version 4.4.1"; - public static string FFmpegPath = string.Empty; // always updated in DiscoHawk.Program/EmuHawk.Program + public static string FFmpegPath => Path.Combine(PathUtils.DataDirectoryPath, "dll", OSTailoredCode.IsUnixHost ? "ffmpeg" : "ffmpeg.exe"); public static readonly string Url = OSTailoredCode.IsUnixHost ? BIN_HOST_URI_LINUX_X64 : BIN_HOST_URI_WIN_X64; @@ -155,4 +156,4 @@ namespace BizHawk.Common } } -} \ No newline at end of file +} diff --git a/src/BizHawk.Common/HawkFile/HawkFile.cs b/src/BizHawk.Common/HawkFile/HawkFile.cs index d6a6a793c7..67231a929f 100644 --- a/src/BizHawk.Common/HawkFile/HawkFile.cs +++ b/src/BizHawk.Common/HawkFile/HawkFile.cs @@ -285,7 +285,7 @@ namespace BizHawk.Common } /// Set this with an instance which can construct archive handlers as necessary for archive handling. - public static IFileDearchivalMethod? DearchivalMethod; + public static IFileDearchivalMethod? DearchivalMethod { get; set; } [return: HawkFilePath] private static string MakeCanonicalName(string root, string? member) => member == null ? root : $"{root}|{member}"; diff --git a/src/BizHawk.Common/Log.cs b/src/BizHawk.Common/Log.cs index d421ece810..4b73db550f 100644 --- a/src/BizHawk.Common/Log.cs +++ b/src/BizHawk.Common/Log.cs @@ -39,7 +39,7 @@ namespace BizHawk.Common } // -------------- Logging Action Configuration -------------- - public static Action LogAction = DefaultLogger; + public static readonly Action LogAction = DefaultLogger; // NOTEs are only logged if the domain is enabled. // ERRORs are logged regardless. diff --git a/src/BizHawk.Emulation.Common/Sound/Waves.cs b/src/BizHawk.Emulation.Common/Sound/Waves.cs index 27077e0a48..b708846efa 100644 --- a/src/BizHawk.Emulation.Common/Sound/Waves.cs +++ b/src/BizHawk.Emulation.Common/Sound/Waves.cs @@ -4,10 +4,10 @@ namespace BizHawk.Emulation.Common { public static class Waves { - public static short[] SquareWave; - public static short[] ImperfectSquareWave; - public static short[] NoiseWave; - public static short[] PeriodicWave16; + public static short[] SquareWave { get; private set; } + public static short[] ImperfectSquareWave { get; private set; } + public static short[] NoiseWave { get; private set; } + public static short[] PeriodicWave16 { get; private set; } public static void InitWaves() { @@ -56,4 +56,4 @@ namespace BizHawk.Emulation.Common #endif } } -} \ No newline at end of file +} diff --git a/src/BizHawk.Emulation.Common/zstd/Zstd.cs b/src/BizHawk.Emulation.Common/zstd/Zstd.cs index 4015e7c110..ea7932ad53 100644 --- a/src/BizHawk.Emulation.Common/zstd/Zstd.cs +++ b/src/BizHawk.Emulation.Common/zstd/Zstd.cs @@ -114,6 +114,8 @@ namespace BizHawk.Emulation.Common _ctx.InUse = false; _disposed = true; } + + base.Dispose(disposing); } public override bool CanRead @@ -286,6 +288,8 @@ namespace BizHawk.Emulation.Common _ctx.InUse = false; _disposed = true; } + + base.Dispose(disposing); } public override bool CanRead diff --git a/src/BizHawk.Emulation.Cores/CPUs/LR35902/Registers.cs b/src/BizHawk.Emulation.Cores/CPUs/LR35902/Registers.cs index 5c7b66e181..ecd6a5e932 100644 --- a/src/BizHawk.Emulation.Cores/CPUs/LR35902/Registers.cs +++ b/src/BizHawk.Emulation.Cores/CPUs/LR35902/Registers.cs @@ -8,21 +8,21 @@ namespace BizHawk.Emulation.Cores.Components.LR35902 { // registers - public static ushort PCl = 0; - public static ushort PCh = 1; - public static ushort SPl = 2; - public static ushort SPh = 3; - public static ushort A = 4; - public static ushort F = 5; - public static ushort B = 6; - public static ushort C = 7; - public static ushort D = 8; - public static ushort E = 9; - public static ushort H = 10; - public static ushort L = 11; - public static ushort W = 12; - public static ushort Z = 13; - public static ushort Aim = 14; // use this indicator for RLCA etc., since the Z flag is reset on those + public const ushort PCl = 0; + public const ushort PCh = 1; + public const ushort SPl = 2; + public const ushort SPh = 3; + public const ushort A = 4; + public const ushort F = 5; + public const ushort B = 6; + public const ushort C = 7; + public const ushort D = 8; + public const ushort E = 9; + public const ushort H = 10; + public const ushort L = 11; + public const ushort W = 12; + public const ushort Z = 13; + public const ushort Aim = 14; // use this indicator for RLCA etc., since the Z flag is reset on those public ushort[] Regs = new ushort[14]; @@ -151,4 +151,4 @@ namespace BizHawk.Emulation.Cores.Components.LR35902 } } } -} \ No newline at end of file +} diff --git a/src/BizHawk.Emulation.Cores/CPUs/W65816/Disassembler.cs b/src/BizHawk.Emulation.Cores/CPUs/W65816/Disassembler.cs index 4c660873ee..0f66bc23bc 100644 --- a/src/BizHawk.Emulation.Cores/CPUs/W65816/Disassembler.cs +++ b/src/BizHawk.Emulation.Cores/CPUs/W65816/Disassembler.cs @@ -295,7 +295,7 @@ namespace BizHawk.Emulation.Cores.Components.W65816 break; // Block Move case 0x44: case 0x54: - pbuf = string.Format("${0:X2},${0:X2}", peek(addr + 1), peek(addr + 2)); + pbuf = $"${peek(addr + 1):X2},${peek(addr + 2):X2}"; //sprintf(pbuf, "$%02X,$%02X", mem[1], mem[2]); offset = 3; break; @@ -494,4 +494,4 @@ namespace BizHawk.Emulation.Cores.Components.W65816 return sb.ToString(); } } -} \ No newline at end of file +} diff --git a/src/BizHawk.Emulation.Cores/Computers/MSX/MSX.cs b/src/BizHawk.Emulation.Cores/Computers/MSX/MSX.cs index 6364a03d68..6f4a7f42cb 100644 --- a/src/BizHawk.Emulation.Cores/Computers/MSX/MSX.cs +++ b/src/BizHawk.Emulation.Cores/Computers/MSX/MSX.cs @@ -171,15 +171,15 @@ namespace BizHawk.Emulation.Cores.Computers.MSX private IntPtr MSX_Pntr { get; set; } = IntPtr.Zero; private byte[] MSX_core = new byte[0x28000]; - public static byte[] Bios = null; - public static byte[] Basic; + private static byte[] Bios = null; + private static byte[] Basic; // Constants private const int BankSize = 16384; // ROM - public static byte[] RomData; - public static byte[] RomData2; + private static byte[] RomData; + private static byte[] RomData2; // Machine resources private IController _controller = NullController.Instance; diff --git a/src/BizHawk.Emulation.Cores/Consoles/Atari/A7800Hawk/A7800Hawk.IEmulator.cs b/src/BizHawk.Emulation.Cores/Consoles/Atari/A7800Hawk/A7800Hawk.IEmulator.cs index 934082f43e..80e0ba0a9b 100644 --- a/src/BizHawk.Emulation.Cores/Consoles/Atari/A7800Hawk/A7800Hawk.IEmulator.cs +++ b/src/BizHawk.Emulation.Cores/Consoles/Atari/A7800Hawk/A7800Hawk.IEmulator.cs @@ -364,7 +364,7 @@ namespace BizHawk.Emulation.Cores.Atari.A7800Hawk } - public static Dictionary ValidFilterTypes = new Dictionary + public static readonly Dictionary ValidFilterTypes = new Dictionary { { "None", "None"}, { "NTSC", "NTSC"}, diff --git a/src/BizHawk.Emulation.Cores/Consoles/Atari/A7800Hawk/Maria.cs b/src/BizHawk.Emulation.Cores/Consoles/Atari/A7800Hawk/Maria.cs index e207c4b09b..9ae9f74da9 100644 --- a/src/BizHawk.Emulation.Cores/Consoles/Atari/A7800Hawk/Maria.cs +++ b/src/BizHawk.Emulation.Cores/Consoles/Atari/A7800Hawk/Maria.cs @@ -46,12 +46,12 @@ namespace BizHawk.Emulation.Cores.Atari.A7800Hawk public int DMA_phase = 0; public int DMA_phase_counter; - public static int DMA_START_UP = 0; - public static int DMA_HEADER = 1; - public static int DMA_GRAPHICS = 2; - public static int DMA_CHAR_MAP = 3; - public static int DMA_SHUTDOWN_OTHER = 4; - public static int DMA_SHUTDOWN_LAST = 5; + public const int DMA_START_UP = 0; + public const int DMA_HEADER = 1; + public const int DMA_GRAPHICS = 2; + public const int DMA_CHAR_MAP = 3; + public const int DMA_SHUTDOWN_OTHER = 4; + public const int DMA_SHUTDOWN_LAST = 5; public int header_read_time = 8; // default for 4 byte headers (10 for 5 bytes ones) public int graphics_read_time = 3; // depends on content of graphics header diff --git a/src/BizHawk.Emulation.Cores/Consoles/GCE/Vectrex/PPU.cs b/src/BizHawk.Emulation.Cores/Consoles/GCE/Vectrex/PPU.cs index 6b258d3a0b..a9ed4171fa 100644 --- a/src/BizHawk.Emulation.Cores/Consoles/GCE/Vectrex/PPU.cs +++ b/src/BizHawk.Emulation.Cores/Consoles/GCE/Vectrex/PPU.cs @@ -14,7 +14,7 @@ namespace BizHawk.Emulation.Cores.Consoles.Vectrex public int skip; public uint bright_int_1, bright_int_2, bright_int_3; - public static uint br = 0xFFFFFFFF; + public const uint br = 0xFFFFFFFF; // lines to draw in a frame and vairables to go to new line public double[] draw_lines = new double[1024 * 4 * 4]; diff --git a/src/BizHawk.Emulation.Cores/Consoles/Nintendo/GBHawk/Audio.cs b/src/BizHawk.Emulation.Cores/Consoles/Nintendo/GBHawk/Audio.cs index 9825fd31d6..53c8a6dc3a 100644 --- a/src/BizHawk.Emulation.Cores/Consoles/Nintendo/GBHawk/Audio.cs +++ b/src/BizHawk.Emulation.Cores/Consoles/Nintendo/GBHawk/Audio.cs @@ -15,12 +15,12 @@ namespace BizHawk.Emulation.Cores.Nintendo.GBHawk private BlipBuffer _blip_L = new BlipBuffer(15000); private BlipBuffer _blip_R = new BlipBuffer(15000); - public static bool[] DUTY_CYCLES = { false, false, false, false, false, false, false, true, + public static readonly bool[] DUTY_CYCLES = { false, false, false, false, false, false, false, true, true, false, false, false, false, false, false, true, true, false, false, false, false, true, true, true, false, true, true, true, true, true, true, false }; - public static int[] DIVISOR = { 8, 16, 32, 48, 64, 80, 96, 112 }; + public static readonly int[] DIVISOR = { 8, 16, 32, 48, 64, 80, 96, 112 }; public const int NR10 = 0; public const int NR11 = 1; @@ -44,7 +44,7 @@ namespace BizHawk.Emulation.Cores.Nintendo.GBHawk public const int NR51 = 19; public const int NR52 = 20; - public static int[] unused_bits = { 0x80, 0x3F, 0x00, 0xFF, 0xBF, + public static readonly int[] unused_bits = { 0x80, 0x3F, 0x00, 0xFF, 0xBF, 0x3F, 0x00, 0xFF, 0xBF, 0x7F, 0xFF, 0x9F, 0xFF, 0xBF, 0xFF, 0x00, 0x00, 0xBF, @@ -1249,4 +1249,4 @@ namespace BizHawk.Emulation.Cores.Nintendo.GBHawk _blip_R = null; } } -} \ No newline at end of file +} 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 d1b3d2614a..d677c9184e 100644 --- a/src/BizHawk.Emulation.Cores/Consoles/Nintendo/Gameboy/Gambatte.ITraceable.cs +++ b/src/BizHawk.Emulation.Cores/Consoles/Nintendo/Gameboy/Gambatte.ITraceable.cs @@ -41,6 +41,7 @@ namespace BizHawk.Emulation.Cores.Nintendo.Gameboy }, _settings.RgbdsSyntax, out _).PadRight(36), +#pragma warning disable CA2241 registerInfo: string.Format( "A:{3:x2} F:{8:x2} B:{4:x2} C:{5:x2} D:{6:x2} E:{7:x2} H:{9:x2} L:{10:x2} LY:{13:x2} SP:{2:x2} {11} Cy:{0}", (ulong)s[0] + _cycleCount, @@ -57,6 +58,7 @@ namespace BizHawk.Emulation.Cores.Nintendo.Gameboy s[11] != 0 ? "prefetched" : "", s[12] & 0xffffff, // unused (this is the opcode) s[13] & 0xff))); +#pragma warning restore CA2241 } } } diff --git a/src/BizHawk.Emulation.Cores/Consoles/Nintendo/NES/PPU.cs b/src/BizHawk.Emulation.Cores/Consoles/Nintendo/NES/PPU.cs index aa405a8dad..d70f517d6b 100644 --- a/src/BizHawk.Emulation.Cores/Consoles/Nintendo/NES/PPU.cs +++ b/src/BizHawk.Emulation.Cores/Consoles/Nintendo/NES/PPU.cs @@ -187,9 +187,9 @@ namespace BizHawk.Emulation.Cores.Nintendo.NES return nes.Board.PeekPPU(addr); } - public static int PPU_PHASE_VBL = 0; - public static int PPU_PHASE_BG = 1; - public static int PPU_PHASE_OBJ = 2; + public const int PPU_PHASE_VBL = 0; + public const int PPU_PHASE_BG = 1; + public const int PPU_PHASE_OBJ = 2; public int ppuphase; diff --git a/src/BizHawk.Emulation.Cores/Consoles/Nintendo/NES/Palettes.cs b/src/BizHawk.Emulation.Cores/Consoles/Nintendo/NES/Palettes.cs index 3ca3f90632..074c3525c8 100644 --- a/src/BizHawk.Emulation.Cores/Consoles/Nintendo/NES/Palettes.cs +++ b/src/BizHawk.Emulation.Cores/Consoles/Nintendo/NES/Palettes.cs @@ -52,7 +52,7 @@ namespace BizHawk.Emulation.Cores.Nintendo.NES } private const int SHIFT = 2; - public static byte[,] FCEUX_Standard = + public static readonly byte[,] FCEUX_Standard = { { 0x1D<