From e434b3f837056f75fdacac2364ee4d3f3947dd79 Mon Sep 17 00:00:00 2001 From: OBattler Date: Mon, 22 Jul 2024 02:33:03 +0200 Subject: [PATCH] Opti x81/391: Fix D0000-DFFFF and E0000-EFFFF shadow RAM and disable excess logging. --- src/chipset/opti391.c | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/src/chipset/opti391.c b/src/chipset/opti391.c index 8c5dd7b7c..c4c5534f8 100644 --- a/src/chipset/opti391.c +++ b/src/chipset/opti391.c @@ -106,11 +106,11 @@ opti391_shadow_recalc(opti391_t *dev) for (uint8_t i = 0; i < 8; i++) { base = 0xd0000 + (i << 14); if (base >= 0xe0000) { - sh_master = (dev->regs[0x02] & 0x40); - sh_wp = (dev->regs[0x02] & 0x10); - } else { sh_master = (dev->regs[0x02] & 0x20); sh_wp = (dev->regs[0x02] & 0x08); + } else { + sh_master = (dev->regs[0x02] & 0x40); + sh_wp = (dev->regs[0x02] & 0x10); } sh_enable = dev->regs[0x03] & (1 << i); @@ -253,7 +253,7 @@ opti391_write(uint16_t addr, uint8_t val, void *priv) case 0x02: case 0x03: case 0x06: - pclog("Write %02X: %02X\n", dev->index - dev->reg_base, val); + opti391_log("Write %02X: %02X\n", dev->index - dev->reg_base, val); dev->regs[dev->index - dev->reg_base] = val; opti391_shadow_recalc(dev); break;