diff --git a/src/video/vid_ati_mach64.c b/src/video/vid_ati_mach64.c
index 0418013a9..cac55a2e8 100644
--- a/src/video/vid_ati_mach64.c
+++ b/src/video/vid_ati_mach64.c
@@ -8,7 +8,7 @@
*
* ATi Mach64 graphics card emulation.
*
- * Version: @(#)vid_ati_mach64.c 1.0.21 2018/04/29
+ * Version: @(#)vid_ati_mach64.c 1.0.22 2018/07/16
*
* Authors: Sarah Walker,
* Miran Grca,
@@ -2780,8 +2780,10 @@ void mach64_hwcursor_draw(svga_t *svga, int displine)
uint8_t dat;
uint32_t col0 = mach64->ramdac.pallook[0];
uint32_t col1 = mach64->ramdac.pallook[1];
- int y_add = (enable_overscan && !suppress_overscan) ? 16 : 0;
- int x_add = (enable_overscan && !suppress_overscan) ? 8 : 0;
+ int y_add, x_add;
+
+ y_add = (enable_overscan && !suppress_overscan) ? (overscan_y >> 1) : 0;
+ x_add = (enable_overscan && !suppress_overscan) ? 8 : 0;
offset = svga->hwcursor_latch.xoff;
for (x = 0; x < 64 - svga->hwcursor_latch.xoff; x += 4)
diff --git a/src/video/vid_cl54xx.c b/src/video/vid_cl54xx.c
index 85c518fdd..6e501e4ae 100644
--- a/src/video/vid_cl54xx.c
+++ b/src/video/vid_cl54xx.c
@@ -9,7 +9,7 @@
* Emulation of select Cirrus Logic cards (CL-GD 5428,
* CL-GD 5429, CL-GD 5430, CL-GD 5434 and CL-GD 5436 are supported).
*
- * Version: @(#)vid_cl_54xx.c 1.0.19 2018/05/08
+ * Version: @(#)vid_cl_54xx.c 1.0.20 2018/07/16
*
* Authors: Sarah Walker,
* Barry Rodewald,
@@ -855,12 +855,14 @@ void gd54xx_hwcursor_draw(svga_t *svga, int displine)
int x, xx, comb, b0, b1;
uint8_t dat[2];
int offset = svga->hwcursor_latch.x - svga->hwcursor_latch.xoff;
- int y_add = (enable_overscan && !suppress_overscan) ? 16 : 0;
- int x_add = (enable_overscan && !suppress_overscan) ? 8 : 0;
+ int y_add, x_add;
int pitch = (svga->hwcursor.xsize == 64) ? 16 : 4;
uint32_t bgcol = gd54xx->extpallook[0x00];
uint32_t fgcol = gd54xx->extpallook[0x0f];
+ y_add = (enable_overscan && !suppress_overscan) ? (overscan_y >> 1) : 0;
+ x_add = (enable_overscan && !suppress_overscan) ? 8 : 0;
+
if (svga->interlace && svga->hwcursor_oddeven)
svga->hwcursor_latch.addr += pitch;
diff --git a/src/video/vid_et4000w32.c b/src/video/vid_et4000w32.c
index 0d9b4ff06..2ed8837bf 100644
--- a/src/video/vid_et4000w32.c
+++ b/src/video/vid_et4000w32.c
@@ -10,7 +10,7 @@
*
* Known bugs: Accelerator doesn't work in planar modes
*
- * Version: @(#)vid_et4000w32.c 1.0.10 2018/04/29
+ * Version: @(#)vid_et4000w32.c 1.0.11 2018/07/16
*
* Authors: Sarah Walker,
* Miran Grca,
@@ -1077,10 +1077,12 @@ void et4000w32p_hwcursor_draw(svga_t *svga, int displine)
{
int x, offset;
uint8_t dat;
- int y_add = (enable_overscan && !suppress_overscan) ? 16 : 0;
- int x_add = (enable_overscan && !suppress_overscan) ? 8 : 0;
+ int y_add, x_add;
offset = svga->hwcursor_latch.xoff;
+ y_add = (enable_overscan && !suppress_overscan) ? (overscan_y >> 1) : 0;
+ x_add = (enable_overscan && !suppress_overscan) ? 8 : 0;
+
for (x = 0; x < 64 - svga->hwcursor_latch.xoff; x += 4)
{
dat = svga->vram[svga->hwcursor_latch.addr + (offset >> 2)];
diff --git a/src/video/vid_s3.c b/src/video/vid_s3.c
index 5e358f0ff..164220c96 100644
--- a/src/video/vid_s3.c
+++ b/src/video/vid_s3.c
@@ -8,7 +8,7 @@
*
* S3 emulation.
*
- * Version: @(#)vid_s3.c 1.0.10 2018/04/26
+ * Version: @(#)vid_s3.c 1.0.11 2018/07/16
*
* Authors: Sarah Walker,
* Miran Grca,
@@ -2461,10 +2461,11 @@ void s3_hwcursor_draw(svga_t *svga, int displine)
uint16_t dat[2];
int xx;
int offset = svga->hwcursor_latch.x - svga->hwcursor_latch.xoff;
- int y_add = (enable_overscan && !suppress_overscan) ? 16 : 0;
- int x_add = (enable_overscan && !suppress_overscan) ? 8 : 0;
-
+ int y_add, x_add;
uint32_t fg = 0, bg = 0;
+
+ y_add = (enable_overscan && !suppress_overscan) ? (overscan_y >> 1) : 0;
+ x_add = (enable_overscan && !suppress_overscan) ? 8 : 0;
switch (svga->bpp)
{
diff --git a/src/video/vid_s3_virge.c b/src/video/vid_s3_virge.c
index 63e26a2a0..59a20b2bf 100644
--- a/src/video/vid_s3_virge.c
+++ b/src/video/vid_s3_virge.c
@@ -8,7 +8,7 @@
*
* S3 ViRGE emulation.
*
- * Version: @(#)vid_s3_virge.c 1.0.11 2018/04/29
+ * Version: @(#)vid_s3_virge.c 1.0.12 2018/07/16
*
* Authors: Sarah Walker,
* Miran Grca,
@@ -3377,9 +3377,11 @@ static void s3_virge_hwcursor_draw(svga_t *svga, int displine)
uint16_t dat[2];
int xx;
int offset = svga->hwcursor_latch.x - svga->hwcursor_latch.xoff;
+ int y_add, x_add;
uint32_t fg, bg;
- int y_add = (enable_overscan && !suppress_overscan) ? 16 : 0;
- int x_add = (enable_overscan && !suppress_overscan) ? 8 : 0;
+
+ y_add = (enable_overscan && !suppress_overscan) ? (overscan_y >> 1) : 0;
+ x_add = (enable_overscan && !suppress_overscan) ? 8 : 0;
if (svga->interlace && svga->hwcursor_oddeven)
svga->hwcursor_latch.addr += 16;
diff --git a/src/video/vid_tgui9440.c b/src/video/vid_tgui9440.c
index 7dfe400dd..9b01d5661 100644
--- a/src/video/vid_tgui9440.c
+++ b/src/video/vid_tgui9440.c
@@ -47,7 +47,7 @@
* access size or host data has any affect, but the Windows 3.1
* driver always reads bytes and write words of 0xffff.
*
- * Version: @(#)vid_tgui9440.c 1.0.6 2018/04/26
+ * Version: @(#)vid_tgui9440.c 1.0.7 2018/07/16
*
* Authors: Sarah Walker,
* Miran Grca,
@@ -686,6 +686,10 @@ void tgui_hwcursor_draw(svga_t *svga, int displine)
uint32_t dat[2];
int xx;
int offset = svga->hwcursor_latch.x - svga->hwcursor_latch.xoff;
+ int y_add, x_add;
+
+ y_add = (enable_overscan && !suppress_overscan) ? (overscan_y >> 1) : 0;
+ x_add = (enable_overscan && !suppress_overscan) ? 8 : 0;
if (svga->interlace && svga->hwcursor_oddeven)
svga->hwcursor_latch.addr += 8;
@@ -697,9 +701,9 @@ void tgui_hwcursor_draw(svga_t *svga, int displine)
if (offset >= svga->hwcursor_latch.x)
{
if (!(dat[0] & 0x80000000))
- ((uint32_t *)buffer32->line[displine])[offset + 32] = (dat[1] & 0x80000000) ? 0xffffff : 0;
+ ((uint32_t *)buffer32->line[displine + y_add])[offset + 32 + x_add] = (dat[1] & 0x80000000) ? 0xffffff : 0;
else if (dat[1] & 0x80000000)
- ((uint32_t *)buffer32->line[displine])[offset + 32] ^= 0xffffff;
+ ((uint32_t *)buffer32->line[displine + y_add])[offset + 32 + x_add] ^= 0xffffff;
}
offset++;