I found possible copypast issue in CIA::process_irq(&mut self) function (see link below).
Perhaps timer B is needed to check after timer A?
|
pub fn process_irq(&mut self) { |
|
if self.timer_a.irq_next_cycle { |
|
if self.trigger_irq(1) { |
|
if self.is_cia1 { |
|
as_mut!(self.cpu_ref).set_cia_irq(true); |
|
} |
|
else { |
|
as_mut!(self.cpu_ref).set_nmi(true); |
|
} |
|
} |
|
|
|
self.timer_a.irq_next_cycle = false |
|
} |
|
if self.timer_a.irq_next_cycle { |
|
if self.trigger_irq(2) { |
|
if self.is_cia1 { |
|
as_mut!(self.cpu_ref).set_cia_irq(true); |
|
} |
|
else { |
|
as_mut!(self.cpu_ref).set_nmi(true); |
|
} |
|
} |
|
|
|
self.timer_a.irq_next_cycle = false |
|
} |
|
} |