From 104d21f806d300841784dad8b16f8915de37ce13 Mon Sep 17 00:00:00 2001 From: Cacodemon345 Date: Thu, 12 Jan 2023 14:00:10 +0600 Subject: [PATCH] vid_mga: Fix Matrox Mystique MGA modes Clock selection now works properly --- src/video/vid_mga.c | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/src/video/vid_mga.c b/src/video/vid_mga.c index ef7a2b366..56dcf9605 100644 --- a/src/video/vid_mga.c +++ b/src/video/vid_mga.c @@ -848,7 +848,7 @@ mystique_recalctimings(svga_t *svga) mystique_t *mystique = (mystique_t *) svga->p; int clk_sel = (svga->miscout >> 2) & 3; - svga->clock = (cpuclock * (float) (1ull << 32)) / svga->getclock(clk_sel & 2, svga->clock_gen); + svga->clock = (cpuclock * (float) (1ull << 32)) / svga->getclock(clk_sel & 3, svga->clock_gen); if (mystique->crtcext_regs[1] & CRTCX_R1_HTOTAL8) svga->htotal += 0x100; @@ -896,7 +896,9 @@ mystique_recalctimings(svga_t *svga) svga->ma = svga->maback = (svga->maback - (mystique->ma_latch_old << 2)) + (svga->ma_latch << 2); mystique->ma_latch_old = svga->ma_latch; } - + + svga->rowoffset <<= 1; + switch (mystique->xmulctrl & XMULCTRL_DEPTH_MASK) { case XMULCTRL_DEPTH_8: case XMULCTRL_DEPTH_2G8V16: