From fcc6b783164c012e4920934d13fe97b4be9c8bdb Mon Sep 17 00:00:00 2001 From: TC1995 Date: Sun, 14 Jul 2024 20:19:51 +0200 Subject: [PATCH] PVGA 256 col+ fixes (July 14th, 2024) Sometimes 256 color+ would still glitch because the generic way of enabling 8bpp mode is triggered instead. This fixes some stuff that relies on it. --- src/video/vid_paradise.c | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/src/video/vid_paradise.c b/src/video/vid_paradise.c index f572521f2..34e433760 100644 --- a/src/video/vid_paradise.c +++ b/src/video/vid_paradise.c @@ -364,7 +364,7 @@ paradise_write(uint32_t addr, uint8_t val, void *priv) addr = (addr & 0x7fff) + paradise->write_bank[(addr >> 15) & 3]; /*Could be done in a better way but it works.*/ - if (svga->gdcreg[0x0e] & 0x01) { + if ((svga->gdcreg[0x0e] & 0x01) || (svga->gdcreg[5] & 0x40)) { if (((svga->gdcreg[6] & 0x0c) == 0x04) && (svga->crtc[0x14] & 0x40) && ((svga->gdcreg[0x0b] & 0xc0) == 0xc0) && !svga->chain4) { prev_addr = addr & 3; prev_addr2 = addr & 0xfffc; @@ -401,7 +401,7 @@ paradise_writew(uint32_t addr, uint16_t val, void *priv) addr = (addr & 0x7fff) + paradise->write_bank[(addr >> 15) & 3]; /*Could be done in a better way but it works.*/ - if (svga->gdcreg[0x0e] & 0x01) { + if ((svga->gdcreg[0x0e] & 0x01) || (svga->gdcreg[5] & 0x40)) { if (((svga->gdcreg[6] & 0x0c) == 0x04) && (svga->crtc[0x14] & 0x40) && ((svga->gdcreg[0x0b] & 0xc0) == 0xc0) && !svga->chain4) { prev_addr = addr & 3; prev_addr2 = addr & 0xfffc; @@ -437,7 +437,7 @@ paradise_read(uint32_t addr, void *priv) addr = (addr & 0x7fff) + paradise->read_bank[(addr >> 15) & 3]; /*Could be done in a better way but it works.*/ - if (svga->gdcreg[0x0e] & 0x01) { + if ((svga->gdcreg[0x0e] & 0x01) || (svga->gdcreg[5] & 0x40)) { if (((svga->gdcreg[6] & 0x0c) == 0x04) && (svga->crtc[0x14] & 0x40) && ((svga->gdcreg[0x0b] & 0xc0) == 0xc0) && !svga->chain4) { prev_addr = addr & 3; prev_addr2 = addr & 0xfffc; @@ -472,7 +472,7 @@ paradise_readw(uint32_t addr, void *priv) addr = (addr & 0x7fff) + paradise->read_bank[(addr >> 15) & 3]; /*Could be done in a better way but it works.*/ - if (svga->gdcreg[0x0e] & 0x01) { + if ((svga->gdcreg[0x0e] & 0x01) || (svga->gdcreg[5] & 0x40)) { { if (((svga->gdcreg[6] & 0x0c) == 0x04) && (svga->crtc[0x14] & 0x40) && ((svga->gdcreg[0x0b] & 0xc0) == 0xc0) && !svga->chain4) { prev_addr = addr & 3; prev_addr2 = addr & 0xfffc;