mirror of
https://github.com/MoleskiCoder/EightBitNet.git
synced 2025-03-13 07:33:10 +00:00
Correct a couple of small LR35902 timing issues.
Signed-off-by: Adrian Conlon <Adrian.conlon@gmail.com>
This commit is contained in:
parent
2b3bc80f8a
commit
583c5444a0
@ -60,6 +60,7 @@ namespace EightBit.GameBoy
|
|||||||
this.ExecuteOther(x, y, z, p, q);
|
this.ExecuteOther(x, y, z, p, q);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
System.Diagnostics.Debug.Assert(this.Cycles > 0, $"No timing associated with instruction (CB prefixed? {this.prefixCB}) 0x{this.OpCode:X2}");
|
||||||
return this.ClockCycles;
|
return this.ClockCycles;
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -365,7 +366,7 @@ namespace EightBit.GameBoy
|
|||||||
break;
|
break;
|
||||||
case 3: // JR d
|
case 3: // JR d
|
||||||
this.JumpRelative((sbyte)this.FetchByte());
|
this.JumpRelative((sbyte)this.FetchByte());
|
||||||
this.Tick(4);
|
this.Tick(3);
|
||||||
break;
|
break;
|
||||||
case 4: // JR cc,d
|
case 4: // JR cc,d
|
||||||
case 5:
|
case 5:
|
||||||
@ -715,7 +716,11 @@ namespace EightBit.GameBoy
|
|||||||
case 1:
|
case 1:
|
||||||
case 2:
|
case 2:
|
||||||
case 3:
|
case 3:
|
||||||
this.JumpConditionalFlag(y);
|
if (this.JumpConditionalFlag(y))
|
||||||
|
{
|
||||||
|
this.Tick();
|
||||||
|
}
|
||||||
|
|
||||||
this.Tick(3);
|
this.Tick(3);
|
||||||
break;
|
break;
|
||||||
case 4: // GB: LD (FF00 + C),A
|
case 4: // GB: LD (FF00 + C),A
|
||||||
|
Loading…
x
Reference in New Issue
Block a user