PCem
changeset 86:42ac4acbb4c5
Fixed vblank start on S3 864/Trio64 - fixes 1280x1024.
| author | TomW |
|---|---|
| date | Sat Mar 22 15:37:36 2014 +0000 |
| parents | 3b1a61addfa4 |
| children | cf0361af6563 |
| files | src/vid_s3.c src/vid_svga.c |
| diffstat | 2 files changed, 11 insertions(+), 10 deletions(-) [+] |
line diff
1.1 --- a/src/vid_s3.c Thu Mar 20 16:33:31 2014 +0000 1.2 +++ b/src/vid_s3.c Sat Mar 22 15:37:36 2014 +0000 1.3 @@ -277,10 +277,11 @@ 1.4 svga->hdisp_time += 0x100; 1.5 svga->hdisp += 0x100 * ((svga->seqregs[1] & 8) ? 16 : 8); 1.6 } 1.7 - if (svga->crtc[0x5e] & 0x01) svga->vtotal += 0x400; 1.8 - if (svga->crtc[0x5e] & 0x02) svga->dispend += 0x400; 1.9 - if (svga->crtc[0x5e] & 0x10) svga->vsyncstart += 0x400; 1.10 - if (svga->crtc[0x5e] & 0x40) svga->split += 0x400; 1.11 + if (svga->crtc[0x5e] & 0x01) svga->vtotal += 0x400; 1.12 + if (svga->crtc[0x5e] & 0x02) svga->dispend += 0x400; 1.13 + if (svga->crtc[0x5e] & 0x04) svga->vblankstart += 0x400; 1.14 + if (svga->crtc[0x5e] & 0x10) svga->vsyncstart += 0x400; 1.15 + if (svga->crtc[0x5e] & 0x40) svga->split += 0x400; 1.16 if (svga->crtc[0x51] & 0x30) svga->rowoffset += (svga->crtc[0x51] & 0x30) << 4; 1.17 else if (svga->crtc[0x43] & 0x04) svga->rowoffset += 0x100; 1.18 if (!svga->rowoffset) svga->rowoffset = 256;
2.1 --- a/src/vid_svga.c Thu Mar 20 16:33:31 2014 +0000 2.2 +++ b/src/vid_svga.c Sat Mar 22 15:37:36 2014 +0000 2.3 @@ -268,9 +268,6 @@ 2.4 if (svga->crtc[9] & 0x20) svga->vblankstart |= 0x200; 2.5 svga->vblankstart++; 2.6 2.7 - if (svga->vblankstart < svga->dispend) 2.8 - svga->dispend = svga->vblankstart; 2.9 - 2.10 svga->hdisp = svga->crtc[1]; 2.11 svga->hdisp++; 2.12 2.13 @@ -369,7 +366,10 @@ 2.14 svga->rowcount = svga->crtc[9] & 31; 2.15 if (svga->recalctimings_ex) 2.16 svga->recalctimings_ex(svga); 2.17 - 2.18 + 2.19 + if (svga->vblankstart < svga->dispend) 2.20 + svga->dispend = svga->vblankstart; 2.21 + 2.22 crtcconst = (svga->seqregs[1] & 1) ? (svga->clock * 8.0) : (svga->clock * 9.0); 2.23 2.24 disptime = svga->htotal; 2.25 @@ -446,7 +446,7 @@ 2.26 } 2.27 else 2.28 { 2.29 -// pclog("VC %i ma %05X\n", vc, ma); 2.30 +// pclog("VC %i ma %05X\n", svga->vc, svga->ma); 2.31 svga->vidtime += svga->dispontime; 2.32 2.33 // if (output) printf("Display on %f\n",vidtime); 2.34 @@ -515,7 +515,7 @@ 2.35 if (svga->vc == svga->vsyncstart) 2.36 { 2.37 int wx, wy; 2.38 -// pclog("VC vsync %i %i\n", firstline_draw, lastline_draw); 2.39 +// pclog("VC vsync %i %i\n", svga->firstline_draw, svga->lastline_draw); 2.40 svga->dispon=0; 2.41 svga->cgastat |= 8; 2.42 x = svga->hdisp;
