diff --git a/sources/APU/APU.cpp b/sources/APU/APU.cpp index c2cacd9..cc56ec6 100644 --- a/sources/APU/APU.cpp +++ b/sources/APU/APU.cpp @@ -706,6 +706,10 @@ namespace ComSquare::APU { unsigned total = 0; + if (this->_paddingCycles > cycles) { + this->_paddingCycles -= cycles; + return; + } cycles -= this->_paddingCycles; while (total < cycles && this->_state == Running) total += this->_executeInstruction();