From ed6c7968bd5f0a79c9b2a0bae63d40905d854830 Mon Sep 17 00:00:00 2001 From: Adrian Conlon Date: Thu, 7 Aug 2025 09:42:23 +0100 Subject: [PATCH] Remove effectively impossible to use methods --- EightBit/Bus.cs | 56 ++----------------------------------------------- 1 file changed, 2 insertions(+), 54 deletions(-) diff --git a/EightBit/Bus.cs b/EightBit/Bus.cs index fb5a773..aa1664a 100644 --- a/EightBit/Bus.cs +++ b/EightBit/Bus.cs @@ -22,23 +22,15 @@ namespace EightBit public abstract MemoryMapping Mapping(ushort absolute); - public byte Peek() => this.Reference(); - public byte Peek(ushort absolute) => this.Reference(absolute); - public byte Peek(Register16 absolute) - { - return this.Peek(absolute.Word); - } + public byte Peek(Register16 absolute) => this.Peek(absolute.Word); public void Poke(byte value) => this.Reference() = value; public void Poke(ushort absolute, byte value) => this.Reference(absolute) = value; - public void Poke(Register16 absolute, byte value) - { - this.Poke(absolute.Word, value); - } + public void Poke(Register16 absolute, byte value) => this.Poke(absolute.Word, value); public byte Read() { @@ -48,24 +40,6 @@ namespace EightBit return this.Data; } - public byte Read(ushort absolute) - { - this.Address.Word = absolute; - return this.Read(); - } - - public byte Read(Register16 absolute) - { - this.Address.Assign(absolute); - return this.Read(); - } - - public byte Read(byte low, byte high) - { - this.Address.Assign(low, high); - return this.Read(); - } - public void Write() { this.WritingByte?.Invoke(this, EventArgs.Empty); @@ -73,32 +47,6 @@ namespace EightBit this.WrittenByte?.Invoke(this, EventArgs.Empty); } - public void Write(byte value) - { - this.Data = value; - this.Write(); - } - - public void Write(ushort absolute, byte value) - { - this.Address.Word = absolute; - this.Data = value; - this.Write(); - } - - public void Write(Register16 absolute, byte value) - { - this.Address.Assign(absolute); - this.Data = value; - this.Write(); - } - - public void Write(byte low, byte high, byte value) - { - this.Address.Assign(low, high); - this.Data = value; - this.Write(); - } [System.Diagnostics.CodeAnalysis.SuppressMessage("Design", "CA1030:Use events where appropriate", Justification = "The word 'raise' is used in an electrical sense")] public virtual void RaisePOWER()