Idle skipping... maybe?
This commit is contained in:
@@ -110,6 +110,15 @@ void Core::Run(const float volumeL, const float volumeR) {
|
||||
}
|
||||
|
||||
while (cycles < mem->mmio.vi.cyclesPerHalfline) {
|
||||
if (IsAnythingSkippable()) {
|
||||
const u32 taken = Scheduler::GetInstance().events.top().time - Scheduler::GetInstance().ticks;
|
||||
cycles += taken;
|
||||
frameCycles += taken;
|
||||
Scheduler::GetInstance().Tick(taken);
|
||||
isReadingAnyIO = false;
|
||||
continue;
|
||||
}
|
||||
|
||||
const u32 taken = StepCPU();
|
||||
cycles += taken;
|
||||
|
||||
@@ -141,4 +150,9 @@ void Core::Run(const float volumeL, const float volumeR) {
|
||||
if (broken)
|
||||
pause = true;
|
||||
}
|
||||
|
||||
bool Core::IsAnythingSkippable() {
|
||||
MMIO &mmio = mem->mmio;
|
||||
return (mmio.si.status.dmaBusy || mmio.pi.dmaBusy || mmio.pi.ioBusy) && isReadingAnyIO;
|
||||
}
|
||||
} // namespace n64
|
||||
|
||||
Reference in New Issue
Block a user