From 58ea2b549e4a691b3d25dfd92b257e871f8b795d Mon Sep 17 00:00:00 2001 From: OBattler Date: Fri, 19 Oct 2018 20:37:00 +0200 Subject: [PATCH] The BT-48x RAMDAC now AND's the cursor data index with 0xFF if the cursor is 32x32. --- src/video/vid_bt48x_ramdac.c | 10 +++++++--- 1 file changed, 7 insertions(+), 3 deletions(-) diff --git a/src/video/vid_bt48x_ramdac.c b/src/video/vid_bt48x_ramdac.c index ee3f8085f..e1ff57810 100644 --- a/src/video/vid_bt48x_ramdac.c +++ b/src/video/vid_bt48x_ramdac.c @@ -9,7 +9,7 @@ * Emulation of the Brooktree BT484-485A true colour RAMDAC * family. * - * Version: @(#)vid_bt48x_ramdac.c 1.0.13 2018/10/19 + * Version: @(#)vid_bt48x_ramdac.c 1.0.14 2018/10/19 * * Authors: Miran Grca, * TheCollector1995, @@ -176,8 +176,10 @@ bt48x_ramdac_out(uint16_t addr, int rs2, int rs3, uint8_t val, bt48x_ramdac_t *r index = svga->dac_addr & da_mask; if ((ramdac->type >= BT485) && (svga->hwcursor.xsize == 64)) cd = (uint8_t *) ramdac->cursor64_data; - else + else { + index &= 0xff; cd = (uint8_t *) ramdac->cursor32_data; + } cd[index] = val; @@ -303,8 +305,10 @@ bt48x_ramdac_in(uint16_t addr, int rs2, int rs3, bt48x_ramdac_t *ramdac, svga_t index = (svga->dac_addr - 1) & da_mask; if ((ramdac->type >= BT485) && (svga->hwcursor.xsize == 64)) cd = (uint8_t *) ramdac->cursor64_data; - else + else { + index &= 0xff; cd = (uint8_t *) ramdac->cursor32_data; + } temp = cd[index];