mirror of
https://github.com/TomHarte/CLK.git
synced 2025-08-09 05:25:01 +00:00
Adds [partial] test for whether counters are linked.
This commit is contained in:
@@ -249,7 +249,9 @@ void MOS6526<BusHandlerT, personality>::run_for(const HalfCycles half_cycles) {
|
|||||||
|
|
||||||
// TODO: use CNT potentially to clock timer A, elimiante conditional above.
|
// TODO: use CNT potentially to clock timer A, elimiante conditional above.
|
||||||
const bool timer1_did_reload = counter_[0].advance(false);
|
const bool timer1_did_reload = counter_[0].advance(false);
|
||||||
const bool timer2_did_reload = counter_[1].advance(timer1_did_reload);
|
|
||||||
|
const bool timer1_carry = timer1_did_reload && (counter_[1].control & 0x60) == 0x40;
|
||||||
|
const bool timer2_did_reload = counter_[1].advance(timer1_carry);
|
||||||
posit_interrupt((timer1_did_reload ? 0x01 : 0x00) | (timer2_did_reload ? 0x02 : 0x00));
|
posit_interrupt((timer1_did_reload ? 0x01 : 0x00) | (timer2_did_reload ? 0x02 : 0x00));
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
Reference in New Issue
Block a user