From 7b5420571c73c8cc0c8a39b194bda53fe55d8296 Mon Sep 17 00:00:00 2001 From: OBattler Date: Sun, 25 Feb 2018 23:17:25 +0100 Subject: [PATCH] Fixed the ET4000AX, OS/2 now boots with it again. --- src/video/vid_et4000.c | 19 ++++++++++++++++--- 1 file changed, 16 insertions(+), 3 deletions(-) diff --git a/src/video/vid_et4000.c b/src/video/vid_et4000.c index d3aa90572..6e76d2ecb 100644 --- a/src/video/vid_et4000.c +++ b/src/video/vid_et4000.c @@ -8,13 +8,13 @@ * * Emulation of the Tseng Labs ET4000. * - * Version: @(#)vid_et4000.c 1.0.3 2017/11/04 + * Version: @(#)vid_et4000.c 1.0.4 2018/02/25 * * Authors: Sarah Walker, * Miran Grca, * - * Copyright 2008-2017 Sarah Walker. - * Copyright 2016,2017 Miran Grca. + * Copyright 2008-2018 Sarah Walker. + * Copyright 2016-2018 Miran Grca. */ #include #include @@ -45,6 +45,18 @@ typedef struct et4000_t uint8_t banking; } et4000_t; +static uint8_t crtc_mask[0x40] = +{ + 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, + 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, + 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, + 0xff, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0xff, 0xff, 0xff, 0x0f, 0xff, 0xff, 0xff, 0xff, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00 +}; + void et4000_out(uint16_t addr, uint8_t val, void *p) { et4000_t *et4000 = (et4000_t *)p; @@ -75,6 +87,7 @@ void et4000_out(uint16_t addr, uint8_t val, void *p) if ((svga->crtcreg == 7) && (svga->crtc[0x11] & 0x80)) val = (svga->crtc[7] & ~0x10) | (val & 0x10); old = svga->crtc[svga->crtcreg]; + val &= crtc_mask[svga->crtcreg]; svga->crtc[svga->crtcreg] = val; if (old != val) {