mirror of
https://github.com/TomHarte/CLK.git
synced 2025-01-11 08:30:55 +00:00
Adds [partial] test for whether counters are linked.
This commit is contained in:
parent
38848ca2db
commit
15de5e98c4
@ -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.
|
||||
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));
|
||||
}
|
||||
}
|
||||
|
Loading…
x
Reference in New Issue
Block a user