Made the condition for asserting an IRQ stricter.

This commit is contained in:
OBattler
2023-10-03 20:03:13 +02:00
parent 71d4c4837f
commit 7fed7c1510

View File

@@ -680,7 +680,8 @@ picint_common(uint16_t num, int level, int set, uint8_t *irq_state)
if ((!!*irq_state) != !!set)
set ? dev->lines[b]++ : dev->lines[b]--;
if (!pic_level_triggered(dev, b) || (dev->lines[b] == (!!set)))
if (!pic_level_triggered(dev, b) ||
(((!!*irq_state) != !!set) && (dev->lines[b] == (!!set))))
lines |= w;
}
}