diff --git a/Components/6526/Implementation/6526Implementation.hpp b/Components/6526/Implementation/6526Implementation.hpp index b88e7351a..11b2e0a04 100644 --- a/Components/6526/Implementation/6526Implementation.hpp +++ b/Components/6526/Implementation/6526Implementation.hpp @@ -126,7 +126,7 @@ void MOS6526::write(int address, uint8_t value) { // Interrupt control. case 13: { - if(interrupt_control_ & 0x80) { + if(value & 0x80) { interrupt_control_ |= value & 0x7f; } else { interrupt_control_ &= ~(value & 0x7f); @@ -233,6 +233,7 @@ template void MOS6526::run_for(const HalfCycles half_cycles) { half_divider_ += half_cycles; const int sub = half_divider_.divide_cycles().template as(); + if(!sub) return; // Is counter A running and linked to the clock input? int counter_a_underflows = 0;