From 2edbc38ec323f7591f5333f56365274ad0e2a7e0 Mon Sep 17 00:00:00 2001 From: OBattler Date: Tue, 21 Jan 2020 03:47:37 +0100 Subject: [PATCH] Fixed bugs with PIC 2, fixes IDE bugs among other things. --- src/pic.c | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/src/pic.c b/src/pic.c index 4ed1d4315..12cbcb251 100644 --- a/src/pic.c +++ b/src/pic.c @@ -8,7 +8,7 @@ * * Implementation of the Intel PIC chip emulation. * - * Version: @(#)pic.c 1.0.6 2020/01/17 + * Version: @(#)pic.c 1.0.7 2020/01/21 * * Author: Miran Grca, * @@ -375,17 +375,17 @@ pic2_read(uint16_t addr, void *priv) { uint8_t ret = 0xff; - if ((addr == 0x20) && shadow) { + if ((addr == 0xa0) && shadow) { ret = ((pic2.ocw3 & 0x20) >> 5) << 4; ret |= ((pic2.ocw2 & 0x80) >> 7) << 3; ret |= ((pic2.icw4 & 0x10) >> 4) << 2; ret |= ((pic2.icw4 & 0x02) >> 1) << 1; ret |= ((pic2.icw4 & 0x08) >> 3) << 0; - } else if ((addr == 0x21) && shadow) + } else if ((addr == 0xa1) && shadow) ret = ((pic2.vector & 0xf8) >> 3) << 0; else if (addr & 1) ret = pic2.mask; - else if (pic.read) + else if (pic2.read) ret = pic2.ins; else ret = pic2.pend;