PIC clears pending flag when acknowledging interrupt.

PIT latch mode works correctly.
Fixes 'High Performance PC' mode in Lemmings.
This commit is contained in:
TomW 2015-09-12 14:57:14 +01:00
commit 5260f5f5cd
2 changed files with 17 additions and 1 deletions

View file

@ -110,6 +110,7 @@ void pic_write(uint16_t addr, uint8_t val, void *priv)
if (pic.ins&(1<<c))
{
pic.ins&=~(1<<c);
pic.pend &= ~(1 << c);
pic_update_mask(&pic.mask2, pic.ins);
if (c == 2 && (pic2.pend&~pic2.mask)&~pic2.mask2)