From 1556bc7442ed146e48fc8b750afbb613bbe3d0cc Mon Sep 17 00:00:00 2001 From: OBattler Date: Fri, 9 Oct 2020 13:41:20 +0200 Subject: [PATCH] (S)VGA split screen now takes interlace, odd/even line, and skew into account, fixes the E-Ten Traditional Chinese DOS display driver on Trident graphics cards. --- src/video/vid_svga.c | 9 +++++++-- 1 file changed, 7 insertions(+), 2 deletions(-) diff --git a/src/video/vid_svga.c b/src/video/vid_svga.c index 3bec9dd24..915328c81 100644 --- a/src/video/vid_svga.c +++ b/src/video/vid_svga.c @@ -741,7 +741,12 @@ svga_poll(void *p) ret = svga->line_compare(svga); if (ret) { - svga->ma = svga->maback = 0; + if (svga->interlace && svga->oddeven) + svga->ma = svga->maback = (svga->rowoffset << 1) + ((svga->crtc[5] & 0x60) >> 5); + else + svga->ma = svga->maback = ((svga->crtc[5] & 0x60) >> 5); + svga->ma = (svga->ma << 2); + svga->maback = (svga->maback << 2); svga->sc = 0; if (svga->attrregs[0x10] & 0x20) { svga->scrollcache = 0; @@ -805,7 +810,7 @@ svga_poll(void *p) changeframecount = svga->interlace ? 3 : 2; svga->vslines = 0; - if (svga->interlace && svga->oddeven) + if (svga->interlace && svga->oddeven) svga->ma = svga->maback = svga->ma_latch + (svga->rowoffset << 1) + ((svga->crtc[5] & 0x60) >> 5); else svga->ma = svga->maback = svga->ma_latch + ((svga->crtc[5] & 0x60) >> 5);