1
0
mirror of https://github.com/TomHarte/CLK.git synced 2026-04-20 10:17:05 +00:00

Attempts to route CIA interrupts.

This commit is contained in:
Thomas Harte
2021-07-28 19:36:30 -04:00
parent 37a55c3a77
commit 759007ffc1
5 changed files with 27 additions and 6 deletions
+3
View File
@@ -57,6 +57,9 @@ template <typename PortHandlerT, Personality personality> class MOS6526:
/// Pulses the TOD input the specified number of times.
void advance_tod(int count);
/// @returns @c true if the interrupt output is active, @c false otherwise.
bool get_interrupt_line();
private:
PortHandlerT &port_handler_;
@@ -37,12 +37,14 @@ template <typename BusHandlerT, Personality personality>
void MOS6526<BusHandlerT, personality>::update_interrupts() {
if(interrupt_state_ & interrupt_control_) {
interrupt_state_ |= 0x80;
printf("6526 should signal interrupt\n");
assert(false);
}
}
template <typename BusHandlerT, Personality personality>
bool MOS6526<BusHandlerT, personality>::get_interrupt_line() {
return interrupt_state_ & 0x80;
}
template <typename BusHandlerT, Personality personality>
void MOS6526<BusHandlerT, personality>::write(int address, uint8_t value) {
address &= 0xf;