Parcourir la source

mos6522: remove additional interrupt flag filter from mos6522_update_irq()

The datasheet indicates that the interrupt is generated by ANDing the
interrupt flags register (IFR) with the interrupt enable register (IER)
but currently there is an extra filter for the SR and timer interrupts.

Remove this extra filter to allow interrupts to be generated by external
inputs on bits 1 and 2 of ports A and B.

Signed-off-by: Mark Cave-Ayland <mark.cave-ayland@ilande.co.uk>
Signed-off-by: David Gibson <david@gibson.dropbear.id.au>
Mark Cave-Ayland il y a 7 ans
Parent
commit
32a8c27b5d
1 fichiers modifiés avec 1 ajouts et 1 suppressions
  1. 1 1
      hw/misc/mos6522.c

+ 1 - 1
hw/misc/mos6522.c

@@ -40,7 +40,7 @@ static void mos6522_timer_update(MOS6522State *s, MOS6522Timer *ti,
 
 
 static void mos6522_update_irq(MOS6522State *s)
 static void mos6522_update_irq(MOS6522State *s)
 {
 {
-    if (s->ifr & s->ier & (SR_INT | T1_INT | T2_INT)) {
+    if (s->ifr & s->ier) {
         qemu_irq_raise(s->irq);
         qemu_irq_raise(s->irq);
     } else {
     } else {
         qemu_irq_lower(s->irq);
         qemu_irq_lower(s->irq);