mirror of
https://github.com/MoleskiCoder/EightBitNet.git
synced 2026-03-10 14:37:00 +00:00
Catch another couple of Z80 timing issues
This commit is contained in:
@@ -201,15 +201,15 @@
|
||||
var interestingCycleData = expectedCycle.Value is not null;
|
||||
if (interestingCycleData)
|
||||
{
|
||||
var expectedAddress = expectedCycle.Address;
|
||||
var actualAddress = actualCycle.Address;
|
||||
_ = this.Check("Cycle address", expectedAddress, actualAddress);
|
||||
|
||||
var expectedValue = expectedCycle.Value ?? throw new InvalidOperationException("Expected cycle value cannot be null.");
|
||||
var actualValue = actualCycle.Value ?? throw new InvalidOperationException("Actual cycle value cannot be null.");
|
||||
_ = this.Check("Cycle value", expectedValue, actualValue);
|
||||
}
|
||||
|
||||
var expectedAddress = expectedCycle.Address;
|
||||
var actualAddress = actualCycle.Address;
|
||||
_ = this.Check("Cycle address", expectedAddress, actualAddress);
|
||||
|
||||
var expectedAction = expectedCycle.Type;
|
||||
var actualAction = actualCycle.Type;
|
||||
_ = this.Check("Cycle action", expectedAction, actualAction);
|
||||
|
||||
11
Z80/Z80.cs
11
Z80/Z80.cs
@@ -1225,7 +1225,14 @@ namespace Z80
|
||||
this.FetchDisplacement();
|
||||
}
|
||||
|
||||
this.R(y, this.FetchByte(), 3); // LD r,n
|
||||
{
|
||||
var value = this.FetchByte(); // LD r,n
|
||||
if (memoryY)
|
||||
{
|
||||
this.Tick(2);
|
||||
}
|
||||
this.R(y, value);
|
||||
}
|
||||
break;
|
||||
|
||||
case 7: // Assorted operations on accumulator/flags
|
||||
@@ -1315,7 +1322,7 @@ namespace Z80
|
||||
if (normal)
|
||||
{
|
||||
var value = this.R(z);
|
||||
this.R(y, value, 1);
|
||||
this.R(y, value);
|
||||
}
|
||||
}
|
||||
else
|
||||
|
||||
Reference in New Issue
Block a user