From a3fa181b01a584b8cd880c933d537e29d12f7e1b Mon Sep 17 00:00:00 2001 From: TC1995 Date: Tue, 21 Nov 2023 20:06:12 +0100 Subject: [PATCH] 8-bit renderer fix about the Tseng cards: Seems the Tseng cards are as incompatible as the S3 cards in terms of pure IBM VGA emulation, especially the chain4 stuff, so accomodate the fix to the renderer. Fixes 8bpp rendering on Tseng cards when invoked. --- src/video/vid_svga_render.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/src/video/vid_svga_render.c b/src/video/vid_svga_render.c index 0a6be44fa..fea4490d5 100644 --- a/src/video/vid_svga_render.c +++ b/src/video/vid_svga_render.c @@ -470,9 +470,9 @@ svga_render_indexed_gfx(svga_t *svga, bool highres, bool combine8bits) const bool dwordincr = ((svga->crtc[0x14] & 0x20) != 0) && !wordincr; const bool dwordshift = ((svga->crtc[0x14] & 0x40) != 0); const bool wordshift = ((svga->crtc[0x17] & 0x40) == 0) && !dwordshift; - const uint32_t incbypow2 = combine8bits && svga->force_old_addr ? 0 : (dwordshift ? 2 : wordshift ? 1 : 0); - const uint32_t incevery = combine8bits && svga->force_old_addr ? 1 : (dwordincr ? 4 : wordincr ? 2 : 1); - const uint32_t loadevery = combine8bits && svga->force_old_addr ? 1 : (dwordload ? 4 : wordload ? 2 : 1); + const uint32_t incbypow2 = (combine8bits && (svga->force_old_addr || svga->packed_chain4)) ? 0 : (dwordshift ? 2 : wordshift ? 1 : 0); + const uint32_t incevery = (combine8bits && (svga->force_old_addr || svga->packed_chain4)) ? 1 : (dwordincr ? 4 : wordincr ? 2 : 1); + const uint32_t loadevery = (combine8bits && (svga->force_old_addr || svga->packed_chain4)) ? 1 : (dwordload ? 4 : wordload ? 2 : 1); const bool shift2bit = ((svga->gdcreg[0x05] & 0x60) == 0x20 ); const bool shift4bit = ((svga->gdcreg[0x05] & 0x40) == 0x40 );