3 ZEXALL tests now pass. Removed timing to speed up (temp)

This commit is contained in:
2026-04-23 12:34:25 +01:00
parent 02680cb92d
commit 112b6d15fe
3 changed files with 184 additions and 116 deletions

View File

@@ -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)
{