From 078651d273a305596162a4ab51c5f20e865e0fd5 Mon Sep 17 00:00:00 2001 From: GreaseMonkey Date: Sun, 11 Jun 2023 13:28:13 +1200 Subject: [PATCH] (mostly) Fix EGA split screen - fix done by @cons-cinnabar Closes: #3386 --- src/video/vid_ega.c | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/src/video/vid_ega.c b/src/video/vid_ega.c index d0434fd0e..8cfd51db6 100644 --- a/src/video/vid_ega.c +++ b/src/video/vid_ega.c @@ -582,10 +582,11 @@ ega_poll(void *p) ega->vc++; ega->vc &= 511; if (ega->vc == ega->split) { + // TODO: Implement the hardware bug where the first scanline is drawn twice when the split happens if (ega->interlace && ega->oddeven) - ega->ma = ega->maback = ega->ma_latch + (ega->rowoffset << 1); + ega->ma = ega->maback = ega->rowoffset << 1; else - ega->ma = ega->maback = ega->ma_latch; + ega->ma = ega->maback = 0; ega->ma <<= 2; ega->maback <<= 2; ega->sc = 0;