From fbfb6849c4acbf855400bd2369ed8463e98e9318 Mon Sep 17 00:00:00 2001 From: OBattler Date: Wed, 7 Aug 2024 05:08:41 +0200 Subject: [PATCH] Compaq EGA: Implement C&T behavior where reads in mode 0 return 0xFF if bit 2 of GDC register 4 is set, fixes video memory size detection, fixes #4571. --- src/video/vid_ega.c | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/src/video/vid_ega.c b/src/video/vid_ega.c index 8f995117c..9a0ebfc50 100644 --- a/src/video/vid_ega.c +++ b/src/video/vid_ega.c @@ -1278,6 +1278,10 @@ ega_read(uint32_t addr, void *priv) temp4 &= (ega->colournocare & 8) ? 0xff : 0; return ~(temp | temp2 | temp3 | temp4); } + + if ((ega_type == 2) && (ega->gdcreg[4] & 0x04)) + return 0xff; + return ega->vram[addr | readplane]; }