From 5fe9cc76da31fdef1bf598967d7db565ed12d480 Mon Sep 17 00:00:00 2001 From: OBattler Date: Sat, 22 Mar 2025 20:44:56 +0100 Subject: [PATCH] SuperEGA: Increase the GDC and CRTC register arrays to 256 elements to prevent overflows and correctly ignore the upper 3 bits of CRTC register 07h in ega_recalctimings(), fixes #4905. --- src/video/vid_ega.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/src/video/vid_ega.c b/src/video/vid_ega.c index 18a53a127..17fea7b81 100644 --- a/src/video/vid_ega.c +++ b/src/video/vid_ega.c @@ -486,19 +486,19 @@ ega_recalctimings(ega_t *ega) if (ega->crtc[7] & 1) ega->vtotal |= 0x100; - if (ega->crtc[7] & 32) + if ((ega->actual_type != EGA_SUPEREGA) && (ega->crtc[7] & 32)) ega->vtotal |= 0x200; ega->vtotal += 2; if (ega->crtc[7] & 2) ega->dispend |= 0x100; - if (ega->crtc[7] & 64) + if ((ega->actual_type != EGA_SUPEREGA) && (ega->crtc[7] & 64)) ega->dispend |= 0x200; ega->dispend++; if (ega->crtc[7] & 4) ega->vsyncstart |= 0x100; - if (ega->crtc[7] & 128) + if ((ega->actual_type != EGA_SUPEREGA) && (ega->crtc[7] & 128)) ega->vsyncstart |= 0x200; ega->vsyncstart++;