From fe093a97488e8e3e27f0eed50dc37a0641b0d2d3 Mon Sep 17 00:00:00 2001 From: Adrian Conlon Date: Fri, 18 Sep 2026 09:20:05 +0100 Subject: [PATCH] Simplify Z80 logging a little --- EightBit/AbstractLogger.cs | 12 ------------ EightBit/ILogger.cs | 4 ++-- Z80/Disassembler.cs | 1 + 3 files changed, 3 insertions(+), 14 deletions(-) diff --git a/EightBit/AbstractLogger.cs b/EightBit/AbstractLogger.cs index 53fa806..7a1efd2 100644 --- a/EightBit/AbstractLogger.cs +++ b/EightBit/AbstractLogger.cs @@ -17,18 +17,6 @@ set => this._context = value; } - public bool Debugging - { - get => this.Verbosity > ILogger.LogLevel.Information; - set => throw new NotImplementedException("Derived from logging verbosity"); - } - - public bool Strict - { - get => this.Debugging; - set => throw new NotImplementedException("Derived from logging verbosity"); - } - public abstract void Log(string context, string message, ILogger.LogLevel level); } } diff --git a/EightBit/ILogger.cs b/EightBit/ILogger.cs index 271cc16..422a2e8 100644 --- a/EightBit/ILogger.cs +++ b/EightBit/ILogger.cs @@ -8,9 +8,9 @@ abstract LogLevel Verbosity { get; set; } - abstract bool Strict { get; set; } + bool Debugging => this.Verbosity > ILogger.LogLevel.Information; - abstract bool Debugging { get; set; } + bool Strict => this.Debugging; abstract void Log(string context, string message, LogLevel level); diff --git a/Z80/Disassembler.cs b/Z80/Disassembler.cs index 13ca9c8..937a9e7 100644 --- a/Z80/Disassembler.cs +++ b/Z80/Disassembler.cs @@ -84,6 +84,7 @@ namespace Z80 public string Disassemble(Z80 cpu) { ArgumentNullException.ThrowIfNull(cpu); + if (cpu.RESET.Lowered()) return string.Empty; this._prefixCB = this._prefixDD = this._prefixED = this._prefixFD = false; return this.Disassemble(cpu, cpu.PC.Joined); }