From 38d9b45177d64f5864a9204091981f5efb21417c Mon Sep 17 00:00:00 2001 From: TomW Date: Wed, 16 Sep 2015 20:44:34 +0100 Subject: [PATCH] Clear PIC interrupt service registers on writing ICW1. --- src/pic.c | 2 ++ 1 file changed, 2 insertions(+) diff --git a/src/pic.c b/src/pic.c index a73ad15..60e92a0 100644 --- a/src/pic.c +++ b/src/pic.c @@ -87,6 +87,7 @@ void pic_write(uint16_t addr, uint8_t val, void *priv) pic.mask2=0; pic.icw=1; pic.icw1=val; + pic.ins = 0; pic_updatepending(); } else if (!(val&8)) /*OCW2*/ @@ -187,6 +188,7 @@ void pic2_write(uint16_t addr, uint8_t val, void *priv) pic2.mask2=0; pic2.icw=1; pic2.icw1=val; + pic2.ins = 0; pic_updatepending(); } else if (!(val&8)) /*OCW2*/