diff --git a/src/video/vid_ati_mach64.c b/src/video/vid_ati_mach64.c index a96184b2b..f838fb2d3 100644 --- a/src/video/vid_ati_mach64.c +++ b/src/video/vid_ati_mach64.c @@ -3303,6 +3303,7 @@ static void *mach64_common_init(const device_t *info) mach64_in, mach64_out, NULL, mach64_overlay_draw); + s3->svga.dac_hwcursor.ysize = 64; if (info->flags & DEVICE_PCI) mem_mapping_disable(&mach64->bios_rom.mapping); diff --git a/src/video/vid_bt48x_ramdac.c b/src/video/vid_bt48x_ramdac.c index 310d72a2e..6f27d9721 100644 --- a/src/video/vid_bt48x_ramdac.c +++ b/src/video/vid_bt48x_ramdac.c @@ -170,7 +170,6 @@ bt48x_ramdac_out(uint16_t addr, int rs2, int rs3, uint8_t val, void *p, svga_t * if (ramdac->type >= BT485A) bt48x_set_bpp(ramdac, svga); svga->dac_hwcursor.xsize = svga->dac_hwcursor.ysize = (val & 4) ? 64 : 32; - svga->dac_hwcursor.yoff = (svga->dac_hwcursor.ysize == 32) ? 32 : 0; svga->dac_hwcursor.x = ramdac->hwc_x - svga->dac_hwcursor.xsize; svga->dac_hwcursor.y = ramdac->hwc_y - svga->dac_hwcursor.ysize; svga->dac_addr = (svga->dac_addr & 0x00ff) | ((val & 0x03) << 8); diff --git a/src/video/vid_cl54xx.c b/src/video/vid_cl54xx.c index 4938f4656..e2ff3f78c 100644 --- a/src/video/vid_cl54xx.c +++ b/src/video/vid_cl54xx.c @@ -382,7 +382,6 @@ gd54xx_out(uint16_t addr, uint8_t val, void *p) ((val & CIRRUS_CURSOR_LARGE) && (svga->crtc[0x27] >= CIRRUS_ID_CLGD5422)) ? 64 : 32; else svga->hwcursor.xsize = 32; - svga->hwcursor.yoff = (svga->hwcursor.ysize == 32) ? 32 : 0; if ((svga->seqregs[0x12] & CIRRUS_CURSOR_LARGE) && (svga->crtc[0x27] >= CIRRUS_ID_CLGD5422)) svga->hwcursor.addr = ((gd54xx->vram_size - 0x4000) + ((svga->seqregs[0x13] & 0x3c) * 256)); @@ -3208,8 +3207,7 @@ static void io_sethandler(0x03c0, 0x0020, gd54xx_in, NULL, NULL, gd54xx_out, NULL, NULL, gd54xx); - svga->hwcursor.yoff = 32; - svga->hwcursor.xoff = 0; + svga->hwcursor.yoff = svga->hwcursor.xoff = 0; if (id >= CIRRUS_ID_CLGD5420) { gd54xx->vclk_n[0] = 0x4a; diff --git a/src/video/vid_et4000w32.c b/src/video/vid_et4000w32.c index 1568eb008..970ff8389 100644 --- a/src/video/vid_et4000w32.c +++ b/src/video/vid_et4000w32.c @@ -1297,6 +1297,7 @@ void *et4000w32p_init(const device_t *info) et4000w32p_in, et4000w32p_out, et4000w32p_hwcursor_draw, NULL); + s3->svga.hwcursor.ysize = 64; et4000->svga.ramdac = device_add(&stg_ramdac_device); diff --git a/src/video/vid_s3.c b/src/video/vid_s3.c index 6c062d30d..0e3234927 100644 --- a/src/video/vid_s3.c +++ b/src/video/vid_s3.c @@ -4336,6 +4336,7 @@ static void *s3_init(const device_t *info) NULL); } } + s3->svga.hwcursor.ysize = 64; if (chip == S3_VISION964) svga->dac_hwcursor_draw = bt48x_hwcursor_draw; diff --git a/src/video/vid_s3_virge.c b/src/video/vid_s3_virge.c index ab9ebc8c5..c941f3a59 100644 --- a/src/video/vid_s3_virge.c +++ b/src/video/vid_s3_virge.c @@ -3668,6 +3668,7 @@ static void *s3_virge_init(const device_t *info) s3_virge_in, s3_virge_out, s3_virge_hwcursor_draw, s3_virge_overlay_draw); + s3->svga.hwcursor.ysize = 64; virge->pci = !!(info->flags & DEVICE_PCI); diff --git a/src/video/vid_svga.c b/src/video/vid_svga.c index 915328c81..ce8ce33a4 100644 --- a/src/video/vid_svga.c +++ b/src/video/vid_svga.c @@ -615,24 +615,24 @@ svga_poll(void *p) if (!svga->linepos) { if (svga->displine == svga->hwcursor_latch.y && svga->hwcursor_latch.ena) { - svga->hwcursor_on = 64 - svga->hwcursor_latch.yoff; + svga->hwcursor_on = svga->hwcursor.ysize - svga->hwcursor_latch.yoff; svga->hwcursor_oddeven = 0; } if (svga->displine == (svga->hwcursor_latch.y + 1) && svga->hwcursor_latch.ena && svga->interlace) { - svga->hwcursor_on = 64 - (svga->hwcursor_latch.yoff + 1); + svga->hwcursor_on = svga->hwcursor.ysize - (svga->hwcursor_latch.yoff + 1); svga->hwcursor_oddeven = 1; } if (svga->displine == svga->dac_hwcursor_latch.y && svga->dac_hwcursor_latch.ena) { - svga->dac_hwcursor_on = 64 - svga->dac_hwcursor_latch.yoff; + svga->dac_hwcursor_on = svga->dac_wcursor.ysize - svga->dac_hwcursor_latch.yoff; svga->dac_hwcursor_oddeven = 0; } if (svga->displine == (svga->dac_hwcursor_latch.y + 1) && svga->dac_hwcursor_latch.ena && svga->interlace) { - svga->dac_hwcursor_on = 64 - (svga->dac_hwcursor_latch.yoff + 1); + svga->dac_hwcursor_on = svga->dac_hwcursor.ysize - (svga->dac_hwcursor_latch.yoff + 1); svga->dac_hwcursor_oddeven = 1; } diff --git a/src/video/vid_tgui9440.c b/src/video/vid_tgui9440.c index badd64476..e3a15db93 100644 --- a/src/video/vid_tgui9440.c +++ b/src/video/vid_tgui9440.c @@ -388,7 +388,7 @@ void tgui_out(uint16_t addr, uint8_t val, void *p) svga->hwcursor.x = (svga->crtc[0x40] | (svga->crtc[0x41] << 8)) & 0x7ff; svga->hwcursor.y = (svga->crtc[0x42] | (svga->crtc[0x43] << 8)) & 0x7ff; svga->hwcursor.xoff = svga->crtc[0x46] & 0x3f; - svga->hwcursor.yoff = (svga->crtc[0x47] & 0x3f) + ((svga->hwcursor.ysize == 32) ? 32 : 0); + svga->hwcursor.yoff = svga->crtc[0x47] & 0x3f; svga->hwcursor.addr = (svga->crtc[0x44] << 10) | ((svga->crtc[0x45] & 0x7) << 18) | (svga->hwcursor.yoff * 8); } break; @@ -399,7 +399,6 @@ void tgui_out(uint16_t addr, uint8_t val, void *p) svga->hwcursor.ena = val & 0x80; svga->hwcursor.xsize = (val & 1) ? 64 : 32; svga->hwcursor.ysize = (val & 1) ? 64 : 32; - svga->hwcursor.yoff = (svga->crtc[0x47] & 0x3f) + ((svga->hwcursor.ysize == 32) ? 32 : 0); } break; }