3 ZEXALL tests now pass. Removed timing to speed up (temp)
This commit is contained in:
@@ -1112,8 +1112,12 @@ namespace Desktop
|
||||
case 0xFD:
|
||||
{
|
||||
byte fdOpcode = _memoryBus.Read((ushort)(currentPc + 1));
|
||||
|
||||
if (fdOpcode == 0x19) // ADD IY, DE
|
||||
if (fdOpcode == 0x09) // ADD IY, BC
|
||||
{
|
||||
mnemonic = $"ADD IY, BC";
|
||||
instructionLength = 2;
|
||||
}
|
||||
else if (fdOpcode == 0x19) // ADD IY, DE
|
||||
{
|
||||
mnemonic = $"ADD IY, DE";
|
||||
instructionLength = 2;
|
||||
@@ -1124,6 +1128,11 @@ namespace Desktop
|
||||
mnemonic = $"LD IY, 0x{iyVal:X4}";
|
||||
instructionLength = 4;
|
||||
}
|
||||
else if (fdOpcode == 0x29) //Add IY, IY
|
||||
{
|
||||
mnemonic = $"ADD IY, IY";
|
||||
instructionLength = 2;
|
||||
}
|
||||
else if (fdOpcode == 0x34) // INC IY
|
||||
{
|
||||
//sbyte d = (sbyte)_memoryBus.Read((ushort)(currentPc + 2));
|
||||
@@ -1290,7 +1299,7 @@ namespace Desktop
|
||||
mnemonic = "POP IY";
|
||||
instructionLength = 2;
|
||||
}
|
||||
else if(fdOpcode == 0xE5)
|
||||
else if (fdOpcode == 0xE5)
|
||||
{
|
||||
mnemonic = "PUSH IY";
|
||||
instructionLength = 2;
|
||||
|
||||
@@ -102,12 +102,12 @@ namespace Desktop
|
||||
_tapManager.Update(elapsedTStates);
|
||||
|
||||
//Process audio at the correct time
|
||||
while (_cpu.TotalTStates >= (long)(audioSampleCount * 79.365))
|
||||
{
|
||||
bool finalAudioOutput = _simpleIoBus.BeeperState ^ _tapManager.EarBit;
|
||||
_beeper.AddSample(finalAudioOutput);
|
||||
audioSampleCount++;
|
||||
}
|
||||
//while (_cpu.TotalTStates >= (long)(audioSampleCount * 79.365))
|
||||
//{
|
||||
// bool finalAudioOutput = _simpleIoBus.BeeperState ^ _tapManager.EarBit;
|
||||
// _beeper.AddSample(finalAudioOutput);
|
||||
// audioSampleCount++;
|
||||
//}
|
||||
|
||||
// --- Check for End of Frame ---
|
||||
if (_cpu.TotalTStates >= nextScanlineTarget)
|
||||
@@ -131,13 +131,13 @@ namespace Desktop
|
||||
TotalFrameCount++;
|
||||
|
||||
// Throttle to real-time (50 FPS = 20ms)
|
||||
long targetTimeMs = (scanlineCount / 312) * 20;
|
||||
long elapsedMs = stopwatch.ElapsedMilliseconds;
|
||||
//long targetTimeMs = (scanlineCount / 312) * 20;
|
||||
//long elapsedMs = stopwatch.ElapsedMilliseconds;
|
||||
|
||||
if (elapsedMs < targetTimeMs)
|
||||
{
|
||||
//Thread.Sleep((int)(targetTimeMs - elapsedMs));
|
||||
}
|
||||
//if (elapsedMs < targetTimeMs)
|
||||
//{
|
||||
// Thread.Sleep((int)(targetTimeMs - elapsedMs));
|
||||
//}
|
||||
TotalFrameTime += fpsStopwatch.Elapsed.TotalMilliseconds;
|
||||
if (TotalFrameCount % 50 == 0)
|
||||
{
|
||||
|
||||
Reference in New Issue
Block a user