Implement VGA byte panning and cursor skew. Patch from Greatpsycho.
This commit is contained in:
parent
9bdbcc18c0
commit
ed30e17128
3 changed files with 12 additions and 6 deletions
|
|
@ -322,7 +322,7 @@ void svga_recalctimings(svga_t *svga)
|
|||
if (svga->crtc[9] & 0x20) svga->vblankstart |= 0x200;
|
||||
svga->vblankstart++;
|
||||
|
||||
svga->hdisp = svga->crtc[1];
|
||||
svga->hdisp = svga->crtc[1] - ((svga->crtc[5] & 0x60) >> 5);
|
||||
svga->hdisp++;
|
||||
|
||||
svga->htotal = svga->crtc[0];
|
||||
|
|
@ -336,7 +336,8 @@ void svga_recalctimings(svga_t *svga)
|
|||
|
||||
svga->interlace = 0;
|
||||
|
||||
svga->ma_latch = (svga->crtc[0xc] << 8) | svga->crtc[0xd];
|
||||
svga->ma_latch = ((svga->crtc[0xc] << 8) | svga->crtc[0xd]) + ((svga->crtc[8] & 0x60) >> 5);
|
||||
svga->ca_adj = 0;
|
||||
|
||||
svga->hdisp_time = svga->hdisp;
|
||||
svga->render = svga_render_blank;
|
||||
|
|
@ -658,9 +659,9 @@ void svga_poll(void *p)
|
|||
changeframecount = svga->interlace ? 3 : 2;
|
||||
svga->vslines = 0;
|
||||
|
||||
if (svga->interlace && svga->oddeven) svga->ma = svga->maback = svga->ma_latch + (svga->rowoffset << 1);
|
||||
else svga->ma = svga->maback = svga->ma_latch;
|
||||
svga->ca = (svga->crtc[0xe] << 8) | svga->crtc[0xf];
|
||||
if (svga->interlace && svga->oddeven) svga->ma = svga->maback = svga->ma_latch + (svga->rowoffset << 1) + ((svga->crtc[5] & 0x60) >> 5);
|
||||
else svga->ma = svga->maback = svga->ma_latch + ((svga->crtc[5] & 0x60) >> 5);
|
||||
svga->ca = ((svga->crtc[0xe] << 8) | svga->crtc[0xf]) + ((svga->crtc[0xb] & 0x60) >> 5) + svga->ca_adj;
|
||||
|
||||
svga->ma <<= 2;
|
||||
svga->maback <<= 2;
|
||||
|
|
|
|||
Loading…
Reference in a new issue