Fixed vblank start on S3 864/Trio64 - fixes 1280x1024.
This commit is contained in:
parent
92c45591c7
commit
f51d8bead4
2 changed files with 11 additions and 10 deletions
|
|
@ -277,10 +277,11 @@ void s3_recalctimings(svga_t *svga)
|
||||||
svga->hdisp_time += 0x100;
|
svga->hdisp_time += 0x100;
|
||||||
svga->hdisp += 0x100 * ((svga->seqregs[1] & 8) ? 16 : 8);
|
svga->hdisp += 0x100 * ((svga->seqregs[1] & 8) ? 16 : 8);
|
||||||
}
|
}
|
||||||
if (svga->crtc[0x5e] & 0x01) svga->vtotal += 0x400;
|
if (svga->crtc[0x5e] & 0x01) svga->vtotal += 0x400;
|
||||||
if (svga->crtc[0x5e] & 0x02) svga->dispend += 0x400;
|
if (svga->crtc[0x5e] & 0x02) svga->dispend += 0x400;
|
||||||
if (svga->crtc[0x5e] & 0x10) svga->vsyncstart += 0x400;
|
if (svga->crtc[0x5e] & 0x04) svga->vblankstart += 0x400;
|
||||||
if (svga->crtc[0x5e] & 0x40) svga->split += 0x400;
|
if (svga->crtc[0x5e] & 0x10) svga->vsyncstart += 0x400;
|
||||||
|
if (svga->crtc[0x5e] & 0x40) svga->split += 0x400;
|
||||||
if (svga->crtc[0x51] & 0x30) svga->rowoffset += (svga->crtc[0x51] & 0x30) << 4;
|
if (svga->crtc[0x51] & 0x30) svga->rowoffset += (svga->crtc[0x51] & 0x30) << 4;
|
||||||
else if (svga->crtc[0x43] & 0x04) svga->rowoffset += 0x100;
|
else if (svga->crtc[0x43] & 0x04) svga->rowoffset += 0x100;
|
||||||
if (!svga->rowoffset) svga->rowoffset = 256;
|
if (!svga->rowoffset) svga->rowoffset = 256;
|
||||||
|
|
|
||||||
|
|
@ -268,9 +268,6 @@ void svga_recalctimings(svga_t *svga)
|
||||||
if (svga->crtc[9] & 0x20) svga->vblankstart |= 0x200;
|
if (svga->crtc[9] & 0x20) svga->vblankstart |= 0x200;
|
||||||
svga->vblankstart++;
|
svga->vblankstart++;
|
||||||
|
|
||||||
if (svga->vblankstart < svga->dispend)
|
|
||||||
svga->dispend = svga->vblankstart;
|
|
||||||
|
|
||||||
svga->hdisp = svga->crtc[1];
|
svga->hdisp = svga->crtc[1];
|
||||||
svga->hdisp++;
|
svga->hdisp++;
|
||||||
|
|
||||||
|
|
@ -370,6 +367,9 @@ void svga_recalctimings(svga_t *svga)
|
||||||
if (svga->recalctimings_ex)
|
if (svga->recalctimings_ex)
|
||||||
svga->recalctimings_ex(svga);
|
svga->recalctimings_ex(svga);
|
||||||
|
|
||||||
|
if (svga->vblankstart < svga->dispend)
|
||||||
|
svga->dispend = svga->vblankstart;
|
||||||
|
|
||||||
crtcconst = (svga->seqregs[1] & 1) ? (svga->clock * 8.0) : (svga->clock * 9.0);
|
crtcconst = (svga->seqregs[1] & 1) ? (svga->clock * 8.0) : (svga->clock * 9.0);
|
||||||
|
|
||||||
disptime = svga->htotal;
|
disptime = svga->htotal;
|
||||||
|
|
@ -446,7 +446,7 @@ void svga_poll(void *p)
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
// pclog("VC %i ma %05X\n", vc, ma);
|
// pclog("VC %i ma %05X\n", svga->vc, svga->ma);
|
||||||
svga->vidtime += svga->dispontime;
|
svga->vidtime += svga->dispontime;
|
||||||
|
|
||||||
// if (output) printf("Display on %f\n",vidtime);
|
// if (output) printf("Display on %f\n",vidtime);
|
||||||
|
|
@ -515,7 +515,7 @@ void svga_poll(void *p)
|
||||||
if (svga->vc == svga->vsyncstart)
|
if (svga->vc == svga->vsyncstart)
|
||||||
{
|
{
|
||||||
int wx, wy;
|
int wx, wy;
|
||||||
// pclog("VC vsync %i %i\n", firstline_draw, lastline_draw);
|
// pclog("VC vsync %i %i\n", svga->firstline_draw, svga->lastline_draw);
|
||||||
svga->dispon=0;
|
svga->dispon=0;
|
||||||
svga->cgastat |= 8;
|
svga->cgastat |= 8;
|
||||||
x = svga->hdisp;
|
x = svga->hdisp;
|
||||||
|
|
|
||||||
Loading…
Reference in a new issue