From f57ba74547e89236827d8fe30d36d6e29838219a Mon Sep 17 00:00:00 2001 From: Brandon Wright Date: Sat, 26 May 2018 18:16:12 -0500 Subject: [PATCH] More WAI fixing. --- cpuexec.cpp | 4 +++- cpuops.cpp | 2 +- 2 files changed, 4 insertions(+), 2 deletions(-) diff --git a/cpuexec.cpp b/cpuexec.cpp index 0b4c58ec..032ed803 100644 --- a/cpuexec.cpp +++ b/cpuexec.cpp @@ -223,6 +223,8 @@ void S9xMainLoop (void) { CPU.WaitingForInterrupt = FALSE; Registers.PCw++; + CPU.Cycles += ONE_CYCLE; + S9xDoHEventProcessing(); } S9xOpcode_NMI(); @@ -239,7 +241,7 @@ void S9xMainLoop (void) { CPU.WaitingForInterrupt = FALSE; Registers.PCw++; - CPU.Cycles += ONE_CYCLE * 2; + CPU.Cycles += ONE_CYCLE; S9xDoHEventProcessing(); } diff --git a/cpuops.cpp b/cpuops.cpp index 23fa3a2b..c943f8fd 100644 --- a/cpuops.cpp +++ b/cpuops.cpp @@ -3480,7 +3480,7 @@ static void OpCB (void) #else CPU.WaitingForInterrupt = TRUE; Registers.PCw--; - AddCycles(TWO_CYCLES); + AddCycles(ONE_CYCLE); #endif }