mirror of
https://github.com/TomHarte/CLK.git
synced 2025-01-26 15:32:04 +00:00
Writes to a timer _during reload_ now have effect.
Net: one CIA test passed.
This commit is contained in:
parent
ef58ce6277
commit
ee6039bfa5
@ -39,6 +39,11 @@ struct MOS6526Storage {
|
||||
pending |= ReloadInOne;
|
||||
}
|
||||
}
|
||||
|
||||
// If this write has hit during a reload cycle, reload.
|
||||
if(pending & ReloadNow) {
|
||||
value = reload;
|
||||
}
|
||||
}
|
||||
|
||||
template <bool is_counter_2> void set_control(uint8_t v) {
|
||||
@ -46,9 +51,9 @@ struct MOS6526Storage {
|
||||
}
|
||||
|
||||
template <bool is_counter_2> bool advance(bool chained_input) {
|
||||
// TODO: remove most of the conditionals here.
|
||||
// TODO: remove most of the conditionals here in favour of bit shuffling.
|
||||
|
||||
pending <<= 1;
|
||||
pending = (pending & PendingClearMask) << 1;
|
||||
|
||||
//
|
||||
// Apply feeder states inputs: anything that
|
||||
@ -117,11 +122,6 @@ struct MOS6526Storage {
|
||||
}
|
||||
|
||||
|
||||
//
|
||||
// Clear any bits that would flow into the wrong field.
|
||||
//
|
||||
pending &= PendingClearMask;
|
||||
|
||||
return should_reload;
|
||||
}
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user