Menu

#134 VDP IRQ loss bug not emulated

open
nobody
3
2005-12-29
2005-12-29
Edwin
No

The following bug that exists in all versions of the
VDP (as far as I can tell) is not emulated in openMSX
yet. From the docs:

The IRQ flag in bit 7 gets set at the beginning of the
VBlank period, if IE0 in VDP Register 1 is set (or gets
set at a later time, while the IRQ flag is still set)
then an interrupt is generated.

The IRQ flag (bit 7) and the collision flag (bit 5) get
cleared after reading Status register 0.
BUG: When reading this register at the same time when
IRQ changes from 0 to 1, this sometimes results in old
value to be read (IRQ=0) before it becomes changed to
1, but the read-signal still acknowledges the IRQ (and
sets it back to IRQ=0) - in that case the IRQ is lost.

The bug is fairly easy to trigger by polling the IRQ
flag. In R800 mode the effect is rather dramatic. :-)

Discussion