diff --git a/EightBit/IntelProcessor.cs b/EightBit/IntelProcessor.cs index 67ef438..f7ae4a6 100644 --- a/EightBit/IntelProcessor.cs +++ b/EightBit/IntelProcessor.cs @@ -173,13 +173,11 @@ namespace EightBit protected virtual bool JumpRelativeConditional(bool condition) { - this.Intermediate.Assign(this.PC); - ++this.PC.Word; + var offset = this.FetchByte(); if (condition) { - this.JumpRelative(this.MemoryRead(this.Intermediate)); + this.JumpRelative(offset); } - return condition; } diff --git a/LR35902/LR35902.cs b/LR35902/LR35902.cs index 73224d7..a30d6d1 100644 --- a/LR35902/LR35902.cs +++ b/LR35902/LR35902.cs @@ -354,15 +354,6 @@ namespace LR35902 return base.ReturnConditional(condition); } - protected override bool JumpRelativeConditional(bool condition) - { - if (!base.JumpRelativeConditional(condition)) - { - this.MemoryRead(this.PC); - } - return condition; - } - protected override void Return() { base.Return(); diff --git a/Z80/Z80.cs b/Z80/Z80.cs index 63f36c2..fae51fd 100644 --- a/Z80/Z80.cs +++ b/Z80/Z80.cs @@ -563,16 +563,6 @@ namespace Z80 this.Tick(5); } - protected override bool JumpRelativeConditional(bool condition) - { - var offset = this.FetchByte(); - if (condition) - { - this.JumpRelative(offset); - } - return condition; - } - private int Zero() { return ZeroTest(this.F);