Implement configurable hardware cursor size on TGUI9440.
This commit is contained in:
parent
245ad1cd42
commit
1d93b73e3a
2 changed files with 11 additions and 2 deletions
|
|
@ -459,13 +459,17 @@ void svga_poll(void *p)
|
|||
// if (!(vc & 15)) pclog("VC %i %i\n", vc, GetTickCount());
|
||||
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;
|
||||
if (svga->hwcursor_on < 0)
|
||||
svga->hwcursor_on = 0;
|
||||
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;
|
||||
svga->hwcursor_on = svga->hwcursor.ysize - svga->hwcursor_latch.yoff;
|
||||
if (svga->hwcursor_on < 0)
|
||||
svga->hwcursor_on = 0;
|
||||
svga->hwcursor_oddeven = 1;
|
||||
}
|
||||
|
||||
|
|
@ -744,6 +748,7 @@ int svga_init(svga_t *svga, void *p, int memsize,
|
|||
svga->video_out = video_out;
|
||||
svga->hwcursor_draw = hwcursor_draw;
|
||||
svga->overlay_draw = overlay_draw;
|
||||
svga->hwcursor.ysize = 64;
|
||||
// _svga_recalctimings(svga);
|
||||
|
||||
mem_mapping_add(&svga->mapping, 0xa0000, 0x20000, svga_read, svga_readw, svga_readl, svga_write, svga_writew, svga_writel, NULL, MEM_MAPPING_EXTERNAL, svga);
|
||||
|
|
|
|||
|
|
@ -331,7 +331,11 @@ void tgui_out(uint16_t addr, uint8_t val, void *p)
|
|||
|
||||
case 0x50:
|
||||
if (tgui->type >= TGUI_9440)
|
||||
{
|
||||
svga->hwcursor.ena = val & 0x80;
|
||||
svga->hwcursor.xsize = (val & 1) ? 64 : 32;
|
||||
svga->hwcursor.ysize = (val & 1) ? 64 : 32;
|
||||
}
|
||||
break;
|
||||
}
|
||||
return;
|
||||
|
|
|
|||
Loading…
Reference in a new issue