ViRGE 256kb wrapping is disabled when enhanced mappings are in use. Fixes ViRGE on XFree86.

This commit is contained in:
SarahW 2018-03-21 21:52:07 +00:00
commit a5bbd87a2d

View file

@ -367,8 +367,6 @@ static void s3_virge_out(uint16_t addr, uint8_t val, void *p)
virge->ma_ext = (virge->ma_ext & 0x1c) | ((val & 0x30) >> 4);
break;
case 0x32:
if ((svga->crtc[0x67] & 0xc) != 0xc)
svga->vram_display_mask = (val & 0x40) ? 0x3ffff : ((virge->memory_size << 20) - 1);
s3_virge_update_irqs(virge);
break;
@ -569,7 +567,7 @@ static void s3_virge_recalctimings(svga_t *svga)
{
svga->rowoffset = (svga->rowoffset * 3) / 4; /*Hack*/
}
svga->vram_display_mask = (svga->crtc[0x32] & 0x40) ? 0x3ffff : ((virge->memory_size << 20) - 1);
svga->vram_display_mask = (!(svga->crtc[0x31] & 0x08) && (svga->crtc[0x32] & 0x40)) ? 0x3ffff : ((virge->memory_size << 20) - 1);
//pclog("VGA mode x_disp=%i dispend=%i vtotal=%i\n", svga->hdisp, svga->dispend, svga->vtotal);
}
else /*Streams mode*/