3 ZEXALL tests now pass. Removed timing to speed up (temp)
This commit is contained in:
@@ -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