Fixing APU's padding cycles

This commit is contained in:
Melefo
2020-03-26 22:03:02 +01:00
committed by Anonymus Raccoon
parent 30191db9cb
commit 654f2f4c49
+4
View File
@@ -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();