mirror of
https://github.com/TomHarte/CLK.git
synced 2025-03-29 17:30:23 +00:00
Corrects 6526 interrupt control write.
This seems to imply that the 6526 should be interrupting too.
This commit is contained in:
parent
69ae9d72c8
commit
37a55c3a77
@ -126,7 +126,7 @@ void MOS6526<BusHandlerT, personality>::write(int address, uint8_t value) {
|
|||||||
|
|
||||||
// Interrupt control.
|
// Interrupt control.
|
||||||
case 13: {
|
case 13: {
|
||||||
if(interrupt_control_ & 0x80) {
|
if(value & 0x80) {
|
||||||
interrupt_control_ |= value & 0x7f;
|
interrupt_control_ |= value & 0x7f;
|
||||||
} else {
|
} else {
|
||||||
interrupt_control_ &= ~(value & 0x7f);
|
interrupt_control_ &= ~(value & 0x7f);
|
||||||
@ -233,6 +233,7 @@ template <typename BusHandlerT, Personality personality>
|
|||||||
void MOS6526<BusHandlerT, personality>::run_for(const HalfCycles half_cycles) {
|
void MOS6526<BusHandlerT, personality>::run_for(const HalfCycles half_cycles) {
|
||||||
half_divider_ += half_cycles;
|
half_divider_ += half_cycles;
|
||||||
const int sub = half_divider_.divide_cycles().template as<int>();
|
const int sub = half_divider_.divide_cycles().template as<int>();
|
||||||
|
if(!sub) return;
|
||||||
|
|
||||||
// Is counter A running and linked to the clock input?
|
// Is counter A running and linked to the clock input?
|
||||||
int counter_a_underflows = 0;
|
int counter_a_underflows = 0;
|
||||||
|
Loading…
x
Reference in New Issue
Block a user