diff --git a/Z80/Disassembler.cs b/Z80/Disassembler.cs index 8ae9e86..71e1a5e 100644 --- a/Z80/Disassembler.cs +++ b/Z80/Disassembler.cs @@ -104,6 +104,8 @@ namespace Z80 public string Disassemble(Z80 cpu, ushort pc) { + ArgumentNullException.ThrowIfNull(cpu); + var opCode = this.Bus.Peek(pc); var decoded = cpu.GetDecodedOpCode(opCode); diff --git a/Z80/Z80.FuseTest/RegisterState.cs b/Z80/Z80.FuseTest/RegisterState.cs index 97693ae..1b38255 100644 --- a/Z80/Z80.FuseTest/RegisterState.cs +++ b/Z80/Z80.FuseTest/RegisterState.cs @@ -7,7 +7,7 @@ namespace Z80.FuseTest using Fuse; using System.Globalization; - internal class RegisterState : AbstractRegisterState, IRegisterState + internal sealed class RegisterState : AbstractRegisterState, IRegisterState { public int I { get; private set; } = -1; diff --git a/Z80/Z80.FuseTest/TestRunner.cs b/Z80/Z80.FuseTest/TestRunner.cs index 63585fc..62588f7 100644 --- a/Z80/Z80.FuseTest/TestRunner.cs +++ b/Z80/Z80.FuseTest/TestRunner.cs @@ -25,7 +25,7 @@ namespace Z80.FuseTest MEMPTR, } - internal class TestRunner : EightBit.Bus + internal sealed class TestRunner : EightBit.Bus { private readonly Test test; private readonly Result result; diff --git a/Z80/Z80.FuseTest/TestSuite.cs b/Z80/Z80.FuseTest/TestSuite.cs index 8e61e1e..db3d00e 100644 --- a/Z80/Z80.FuseTest/TestSuite.cs +++ b/Z80/Z80.FuseTest/TestSuite.cs @@ -6,7 +6,7 @@ namespace Z80.FuseTest { using Fuse; - internal class TestSuite(string path) + internal sealed class TestSuite(string path) { private readonly Tests tests = new(path + ".in"); private readonly Results results = new(path + ".expected"); diff --git a/Z80/Z80.Test/Board.cs b/Z80/Z80.Test/Board.cs index 2a3289b..dde66bd 100644 --- a/Z80/Z80.Test/Board.cs +++ b/Z80/Z80.Test/Board.cs @@ -7,7 +7,7 @@ namespace Z80.Test using EightBit; using System.Globalization; - internal class Board : Bus + internal sealed class Board : Bus { private readonly Configuration configuration; private readonly Ram ram;