From a3e4e7d37a18876a4bbef2dac1031b5aab5c27e5 Mon Sep 17 00:00:00 2001 From: OBattler Date: Thu, 25 Mar 2021 19:33:58 +0100 Subject: [PATCH] RAMDAC and hardware cursor fixes for the Cardex Tseng ET4000/W32p Rev. C. --- src/video/vid_et4000w32.c | 8 ++++---- src/video/vid_sdac_ramdac.c | 2 ++ 2 files changed, 6 insertions(+), 4 deletions(-) diff --git a/src/video/vid_et4000w32.c b/src/video/vid_et4000w32.c index 050e5cbc3..bbddc6ac8 100644 --- a/src/video/vid_et4000w32.c +++ b/src/video/vid_et4000w32.c @@ -210,7 +210,7 @@ et4000w32p_out(uint16_t addr, uint8_t val, void *p) break; case 0x3c6: case 0x3c7: case 0x3c8: case 0x3c9: - if (et4000->type <= ET4000W32I) + if (et4000->type <= ET4000W32P_REVC) sdac_ramdac_out(addr, 0, val, svga->ramdac, svga); else stg_ramdac_out(addr, val, svga->ramdac, svga); @@ -324,7 +324,7 @@ et4000w32p_in(uint16_t addr, void *p) break; case 0x3c6: case 0x3c7: case 0x3c8: case 0x3c9: - if (et4000->type <= ET4000W32I) + if (et4000->type <= ET4000W32P_REVC) return sdac_ramdac_in(addr, 0, svga->ramdac, svga); else return stg_ramdac_in(addr, svga->ramdac, svga); @@ -409,12 +409,12 @@ et4000w32p_recalctimings(svga_t *svga) switch (svga->bpp) { case 15: case 16: svga->hdisp >>= 1; - if (et4000->type <= ET4000W32I) + if (et4000->type <= ET4000W32P_REVC) et4000->adjust_cursor = 1; break; case 24: svga->hdisp /= 3; - if (et4000->type <= ET4000W32I) + if (et4000->type <= ET4000W32P_REVC) et4000->adjust_cursor = 2; break; } diff --git a/src/video/vid_sdac_ramdac.c b/src/video/vid_sdac_ramdac.c index fa6ab4990..a13eb8023 100644 --- a/src/video/vid_sdac_ramdac.c +++ b/src/video/vid_sdac_ramdac.c @@ -117,6 +117,8 @@ sdac_control_write(sdac_ramdac_t *ramdac, svga_t *svga, uint8_t val) } break; } + + svga_recalctimings(svga); }