From ff000b53ccb7cfc0961d0c7147b84858b4f3012c Mon Sep 17 00:00:00 2001 From: nerd73 Date: Fri, 3 Jul 2020 03:09:09 -0600 Subject: [PATCH] actually make it work this time --- src/chipset/opti291.c | 15 ++++++++------- src/win/Makefile.mingw | 2 +- 2 files changed, 9 insertions(+), 8 deletions(-) diff --git a/src/chipset/opti291.c b/src/chipset/opti291.c index 173d8e12f..0d49ec1c0 100644 --- a/src/chipset/opti291.c +++ b/src/chipset/opti291.c @@ -44,27 +44,28 @@ static void opti291_recalc(opti291_t *dev) for (i = 0; i < 4; i++) { base = 0xe0000 + (i << 14); - shflags = (dev->regs[0x24] & (1 << i)) ? MEM_READ_INTERNAL : MEM_READ_EXTANY; - shflags |= (dev->regs[0x24] & (1 << (i+4))) ? write : MEM_WRITE_EXTANY; + shflags = (dev->regs[0x24] & (1 << (i+4))) ? MEM_READ_INTERNAL : MEM_READ_EXTANY; + shflags |= (dev->regs[0x24] & (1 << (i))) ? write : MEM_WRITE_EXTANY; write = (dev->regs[0x27] & 0x40) ? MEM_WRITE_DISABLED : MEM_WRITE_INTERNAL; mem_set_mem_state(base, 0x4000, shflags); } for (i = 0; i < 4; i++) { base = 0xd0000 + (i << 14); - shflags = (dev->regs[0x25] & (1 << i)) ? MEM_READ_INTERNAL : MEM_READ_EXTANY; - shflags |= (dev->regs[0x25] & (1 << (i+4))) ? write : MEM_WRITE_EXTANY; + shflags = (dev->regs[0x25] & (1 << (i+4))) ? MEM_READ_INTERNAL : MEM_READ_EXTANY; + shflags |= (dev->regs[0x25] & (1 << (i))) ? write : MEM_WRITE_EXTANY; write = (dev->regs[0x27] & 0x20) ? MEM_WRITE_DISABLED : MEM_WRITE_INTERNAL; mem_set_mem_state(base, 0x4000, shflags); } + for (i = 0; i < 4; i++) { base = 0xc0000 + (i << 14); - shflags = (dev->regs[0x26] & (1 << i)) ? MEM_READ_INTERNAL : MEM_READ_EXTANY; - shflags |= (dev->regs[0x26] & (1 << (i+4))) ? write : MEM_WRITE_EXTANY; + shflags = (dev->regs[0x26] & (1 << (i+4))) ? MEM_READ_INTERNAL : MEM_READ_EXTANY; + shflags |= (dev->regs[0x26] & (1 << i)) ? write : MEM_WRITE_EXTANY; write = (dev->regs[0x27] & 0x10) ? MEM_WRITE_DISABLED : MEM_WRITE_INTERNAL; mem_set_mem_state(base, 0x4000, shflags); } flushmmucache(); -} +} static void opti291_write(uint16_t addr, uint8_t val, void *priv) { diff --git a/src/win/Makefile.mingw b/src/win/Makefile.mingw index 69983be69..2743019eb 100644 --- a/src/win/Makefile.mingw +++ b/src/win/Makefile.mingw @@ -572,7 +572,7 @@ CPUOBJ := cpu.o cpu_table.o \ CHIPSETOBJ := acc2168.o cs8230.o ali1429.o headland.o i82335.o \ intel_420ex.o intel_4x0.o intel_sio.o intel_piix.o ioapic.o \ neat.o opti495.o opti895.o opti5x7.o scamp.o scat.o \ - sis_85c310.o sis_85c471.o sis_85c496.o opti283.o \ + sis_85c310.o sis_85c471.o sis_85c496.o opti283.o opti291.o \ via_apollo.o via_vpx.o via_vt82c586b.o via_vt82c596b.o wd76c10.o vl82c480.o \ amd640.o