Fixed display start address on S3 pre-ViRGE and ViRGE cards upon recalculation of its timings plus when the banking register is enabled, this also fixes the flickering of Quake while having Commander Keen working without glitches.

This commit is contained in:
TC1995
2021-08-08 13:24:11 +02:00
parent 6f639cd866
commit 74d88ec6bb
2 changed files with 4 additions and 0 deletions

View File

@@ -2423,6 +2423,8 @@ s3_out(uint16_t addr, uint8_t val, void *p)
if ((svga->crtcreg == 0xc) || (svga->crtcreg == 0xd)) {
svga->fullchange = 3;
svga->ma_latch = ((svga->crtc[0xc] << 8) | svga->crtc[0xd]) + ((svga->crtc[8] & 0x60) >> 5);
if ((((svga->crtc[0x67] & 0xc) != 0xc) && (s3->chip >= S3_TRIO64V)) || (s3->chip < S3_TRIO64V))
svga->ma_latch |= (s3->ma_ext << 16);
} else {
svga->fullchange = changeframecount;
svga_recalctimings(svga);

View File

@@ -586,6 +586,8 @@ static void s3_virge_out(uint16_t addr, uint8_t val, void *p)
if ((svga->crtcreg == 0xc) || (svga->crtcreg == 0xd)) {
svga->fullchange = 3;
svga->ma_latch = ((svga->crtc[0xc] << 8) | svga->crtc[0xd]) + ((svga->crtc[8] & 0x60) >> 5);
if ((svga->crtc[0x67] & 0xc) != 0xc)
svga->ma_latch |= (virge->ma_ext << 16);
} else {
svga->fullchange = changeframecount;
svga_recalctimings(svga);