diff --git a/Z80/Z80.cs b/Z80/Z80.cs index 470264b..b7092cc 100644 --- a/Z80/Z80.cs +++ b/Z80/Z80.cs @@ -13,8 +13,6 @@ namespace Z80 { this._ports = ports; this.RaisedPOWER += this.Z80_RaisedPOWER; - this.LoweredHALT += this.Z80_LoweredHALT; - this.RaisedHALT += this.Z80_RaisedHALT; } private readonly InputOutput _ports; @@ -194,16 +192,6 @@ namespace Z80 this.ResetPrefixes(); } - private void Z80_RaisedHALT(object? sender, EventArgs e) - { - ++this.PC.Word; // Release the PC from HALT instruction - } - - private void Z80_LoweredHALT(object? sender, EventArgs e) - { - --this.PC.Word; // Keep the PC on the HALT instruction (i.e. executing NOP) - } - private void ResetPrefixes() { this._prefixCB = this._prefixDD = this._prefixED = this._prefixFD = false; @@ -494,11 +482,14 @@ namespace Z80 protected override void MemoryWrite() { + this.OnWritingMemory(); this.MemoryUpdate(3); + this.OnWroteMemory(); } protected override byte MemoryRead() { + this.OnReadingMemory(); this.Tick(); this.LowerMREQ(); this.LowerRD(); @@ -516,6 +507,7 @@ namespace Z80 this.RaiseRFSH(); } this.Tick(); + this.OnReadMemory(); return returned; }