diff --git a/M6502/M6502.Symbols/IdentifiableSection.cs b/M6502/M6502.Symbols/IdentifiableSection.cs index f128b9c..925fd30 100644 --- a/M6502/M6502.Symbols/IdentifiableSection.cs +++ b/M6502/M6502.Symbols/IdentifiableSection.cs @@ -1,6 +1,5 @@ namespace M6502.Symbols { - using System.Collections; using System.Diagnostics; public class IdentifiableSection : Section diff --git a/M6502/M6502.Symbols/Section.cs b/M6502/M6502.Symbols/Section.cs index fd65b84..07ebc6b 100644 --- a/M6502/M6502.Symbols/Section.cs +++ b/M6502/M6502.Symbols/Section.cs @@ -23,6 +23,7 @@ protected static ReflectedSectionProperties GetSectionProperties(System.Type type) { + ArgumentNullException.ThrowIfNull(type); var obtained = SectionPropertiesCache.TryGetValue(type, out var properties); Debug.Assert(obtained, $"Section properties for {type.Name} have not been built"); Debug.Assert(properties is not null); diff --git a/M6502/M6502.Symbols/Symbol.cs b/M6502/M6502.Symbols/Symbol.cs index ae2322b..e5b0051 100644 --- a/M6502/M6502.Symbols/Symbol.cs +++ b/M6502/M6502.Symbols/Symbol.cs @@ -1,7 +1,5 @@ namespace M6502.Symbols { - using System.Collections.Generic; - // sym id = 16, name = "solve", addrsize = absolute, size = 274, scope = 0, def = 94,ref=144+17+351,val=0xF314,seg=6,type=lab [Section("symbol", "Symbols")] public sealed class Symbol(Parser container) : NamedSection(container) diff --git a/M6502/M6502.Test/Board.cs b/M6502/M6502.Test/Board.cs index 139dda9..afbc4f5 100644 --- a/M6502/M6502.Test/Board.cs +++ b/M6502/M6502.Test/Board.cs @@ -11,7 +11,7 @@ namespace M6502.Test using System.Text; using System.Threading.Tasks; - internal class Board : Bus + internal sealed class Board : Bus { private readonly Configuration configuration; private readonly Ram ram = new(0x10000); diff --git a/Z80/Z80.FuseTest/TestRunner.cs b/Z80/Z80.FuseTest/TestRunner.cs index 7ade54d..ede3664 100644 --- a/Z80/Z80.FuseTest/TestRunner.cs +++ b/Z80/Z80.FuseTest/TestRunner.cs @@ -33,15 +33,15 @@ namespace Z80.FuseTest private readonly TestEvents actualEvents = new(); private readonly EightBit.Ram ram = new(0x10000); private readonly EightBit.InputOutput ports = new(); - private readonly Z80.Z80 cpu; + private readonly Z80 cpu; private readonly Disassembler disassembler; private int totalCycles; public TestRunner(Test test, Result result) { - this.cpu = new EightBit.Z80(this, this.ports); - this.disassembler = new EightBit.Disassembler(this); + this.cpu = new Z80(this, this.ports); + this.disassembler = new Disassembler(this); this.test = test ?? throw new ArgumentNullException(nameof(test)); this.result = result ?? throw new ArgumentNullException(nameof(result)); diff --git a/Z80/Z80.Test/Board.cs b/Z80/Z80.Test/Board.cs index 6f39176..2a3289b 100644 --- a/Z80/Z80.Test/Board.cs +++ b/Z80/Z80.Test/Board.cs @@ -110,6 +110,6 @@ namespace Z80.Test private void CPU_LoweredHALT(object? sender, System.EventArgs e) => this.LowerPOWER(); - private void CPU_ExecutingInstruction_Debug(object? sender, System.EventArgs e) => System.Console.Error.WriteLine($"{Z80.Disassembler.State(this.CPU)}\t{this.disassembler.Disassemble(this.CPU)}"); + private void CPU_ExecutingInstruction_Debug(object? sender, System.EventArgs e) => System.Console.Error.WriteLine($"{Disassembler.State(this.CPU)}\t{this.disassembler.Disassemble(this.CPU)}"); } }