From fda52af2602b79bd47c745f5a9772c6ceda823ac Mon Sep 17 00:00:00 2001 From: Adrian Conlon <98398945+AdrianConlon@users.noreply.github.com> Date: Fri, 2 May 2025 14:07:15 +0100 Subject: [PATCH] Only DJNZ has the extra tick (presumably to decrement the B register) --- Z80/Z80.cs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Z80/Z80.cs b/Z80/Z80.cs index 992b8fe..1574374 100644 --- a/Z80/Z80.cs +++ b/Z80/Z80.cs @@ -558,7 +558,6 @@ namespace Z80 protected override bool JumpRelativeConditional(bool condition) { - this.Tick(); var offset = this.FetchByte(); if (condition) { @@ -1156,6 +1155,7 @@ namespace Z80 this.ExxAF(); break; case 2: // DJNZ d + this.Tick(); _ = this.JumpRelativeConditional(--this.B != 0); break; case 3: // JR d