mirror of
https://github.com/MoleskiCoder/EightBitNet.git
synced 2025-09-19 10:24:47 +00:00
Unify Intel style JR CC code and fix SM83 timing issues.
This commit is contained in:
@@ -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;
|
||||
}
|
||||
|
||||
|
@@ -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();
|
||||
|
10
Z80/Z80.cs
10
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);
|
||||
|
Reference in New Issue
Block a user