From 7701caf2312da6602cf6d13c5d03ca2d8a212a4e Mon Sep 17 00:00:00 2001 From: Cacodemon345 Date: Sun, 24 Dec 2023 14:18:55 +0600 Subject: [PATCH 1/2] Mystique: Fix flickering display on Direct3D --- src/video/vid_mga.c | 1 + 1 file changed, 1 insertion(+) diff --git a/src/video/vid_mga.c b/src/video/vid_mga.c index 74a81741b..119d3ad15 100644 --- a/src/video/vid_mga.c +++ b/src/video/vid_mga.c @@ -915,6 +915,7 @@ mystique_recalctimings(svga_t *svga) svga->hdisp_time = svga->hdisp; svga->rowoffset = svga->crtc[0x13] | ((mystique->crtcext_regs[0] & CRTCX_R0_OFFSET_MASK) << 4); svga->lut_map = 1; + svga->ma_latch = ((mystique->crtcext_regs[0] & CRTCX_R0_STARTADD_MASK) << 16) | (svga->crtc[0xc] << 8) | svga->crtc[0xd]; if (mystique->pci_regs[0x41] & (OPTION_INTERLEAVE >> 8)) { svga->rowoffset <<= 1; From 0eb2b2915e5541430b6ec7a34f67fbc0b8040d3a Mon Sep 17 00:00:00 2001 From: Cacodemon345 Date: Sun, 24 Dec 2023 14:22:23 +0600 Subject: [PATCH 2/2] Don't apply to Millennium --- src/video/vid_mga.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/src/video/vid_mga.c b/src/video/vid_mga.c index 119d3ad15..2eb129c07 100644 --- a/src/video/vid_mga.c +++ b/src/video/vid_mga.c @@ -915,7 +915,8 @@ mystique_recalctimings(svga_t *svga) svga->hdisp_time = svga->hdisp; svga->rowoffset = svga->crtc[0x13] | ((mystique->crtcext_regs[0] & CRTCX_R0_OFFSET_MASK) << 4); svga->lut_map = 1; - svga->ma_latch = ((mystique->crtcext_regs[0] & CRTCX_R0_STARTADD_MASK) << 16) | (svga->crtc[0xc] << 8) | svga->crtc[0xd]; + if (mystique->type >= MGA_1064SG) + svga->ma_latch = ((mystique->crtcext_regs[0] & CRTCX_R0_STARTADD_MASK) << 16) | (svga->crtc[0xc] << 8) | svga->crtc[0xd]; if (mystique->pci_regs[0x41] & (OPTION_INTERLEAVE >> 8)) { svga->rowoffset <<= 1;