From: Toni Wilen Date: Thu, 4 Jan 2024 19:28:32 +0000 (+0200) Subject: NCR SVGA extended registers enable check X-Git-Tag: 5200~99 X-Git-Url: https://git.unchartedbackwaters.co.uk/w/?a=commitdiff_plain;h=af19b643a014db766c07fb2e9f6d8e7454e2f058;p=francis%2Fwinuae.git NCR SVGA extended registers enable check --- diff --git a/pcem/vid_ncr.cpp b/pcem/vid_ncr.cpp index 73031aab..c29f5259 100644 --- a/pcem/vid_ncr.cpp +++ b/pcem/vid_ncr.cpp @@ -361,12 +361,23 @@ static const int fontwidths[] = void ncr_recalctimings(svga_t *svga) { ncr_t *ncr = (ncr_t*)svga->p; + bool ext_end = (svga->crtc[0x30] & 0x20) != 0; svga->hdisp = svga->crtc[1] - ((svga->crtc[5] & 0x60) >> 5); - if (svga->crtc[0x30] & 0x02) - svga->hdisp += 0x100; - if (svga->crtc[0x32] & 0x02) - svga->hdisp += 0x200; + if (ext_end) { + if (svga->crtc[0x30] & 0x02) + svga->hdisp += 0x100; + if (svga->crtc[0x32] & 0x02) + svga->hdisp += 0x200; + if (svga->crtc[0x30] & 0x01) + svga->htotal += 0x100; + if (svga->crtc[0x32] & 0x01) + svga->htotal += 0x200; + if (svga->crtc[0x33] & 0x02) + svga->dispend += 0x400; + if (svga->crtc[0x33] & 0x01) + svga->vtotal += 0x400; + } svga->hdisp++; if (svga->seqregs[0x1f] & 0x10) { svga->hdisp *= fontwidths[svga->seqregs[0x1f] & 15]; @@ -374,18 +385,9 @@ void ncr_recalctimings(svga_t *svga) svga->hdisp *= (svga->seqregs[1] & 8) ? 16 : 8; } - if (svga->crtc[0x30] & 0x01) - svga->htotal += 0x100; - if (svga->crtc[0x32] & 0x01) - svga->htotal += 0x200; - - if (svga->crtc[0x33] & 0x02) - svga->dispend += 0x400; if (svga->crtc[0x33] & 0x04) svga->vblankstart += 0x400; - if (svga->crtc[0x33] & 0x01) - svga->vtotal += 0x400; if (svga->crtc[0x33] & 0x10) svga->split += 0x400;