mirror of
https://github.com/dingusdev/dingusppc.git
synced 2026-12-01 14:33:18 -10:00
More accurately model the VBL interrupt behavior of ATI chips. When VBL begins, set the interrupt-pending bits and derive the PCI IRQ from each pending bit and its matching enable bit. Keep the pending state and PCI IRQ asserted until the guest driver acknowledges the event, even if VBL has already ended. The interrupt may therefore be asserted for less or more time than the physical VBL interval, depending on when the guest acknowledges it. This allows the driver to acknowledge the interrupt and resume other work while VBL may still be active. Previously the PCI IRQ followed the entire VBL interval, so it could remain asserted after the pending event had been acknowledged. Track the PCI IRQ output level and notify the interrupt controller only when that level changes.