Apply blanking extensions to more SVGA cards.

* Fix duplicated logic in vid_svga.c
* Voodoo 3/Banshee emulation now has blanking extensions applied
* S3 ViRGE and Matrox video cards as well
* Tseng ET4000-series cards as well
* Fix off-by-one error in vid_cl54xx.c

Trident cards are yet to be investigated. XGA and 8514/A are yet to be made blanking extensions compliant. Mach64, Paradise/WDC and OAK OTI cards remain as-is for now.
This commit is contained in:
Cacodemon345
2024-01-11 01:48:49 +06:00
parent d125caf776
commit 8e9a2e0b79
8 changed files with 44 additions and 9 deletions

View File

@@ -192,6 +192,8 @@
#define CRTCX_R0_OFFSET_MASK (3 << 4)
#define CRTCX_R1_HTOTAL8 (1 << 0)
#define CRTCX_R1_HBLKSTRT8 (1 << 1)
#define CRTCX_R1_HBLKEND6 (1 << 6)
#define CRTCX_R2_VTOTAL10 (1 << 0)
#define CRTCX_R2_VTOTAL11 (1 << 1)
@@ -941,6 +943,8 @@ mystique_recalctimings(svga_t *svga)
if (mystique->crtcext_regs[1] & CRTCX_R1_HTOTAL8)
svga->htotal |= 0x100;
if (mystique->crtcext_regs[1] & CRTCX_R1_HBLKSTRT8)
svga->hblankstart += 0x100;
if (mystique->crtcext_regs[2] & CRTCX_R2_VTOTAL10)
svga->vtotal |= 0x400;
if (mystique->crtcext_regs[2] & CRTCX_R2_VTOTAL11)
@@ -971,6 +975,11 @@ mystique_recalctimings(svga_t *svga)
svga->hdisp_time = svga->hdisp;
svga->rowoffset = svga->crtc[0x13] | ((mystique->crtcext_regs[0] & CRTCX_R0_OFFSET_MASK) << 4);
svga->hblank_end_len = 0x80;
svga->hblank_end_val += mystique->crtcext_regs[1] & CRTCX_R1_HBLKEND6;
svga->hblank_overscan = 0;
if (mystique->type != MGA_2164W && mystique->type != MGA_2064W)
svga->lut_map = !!(mystique->xmiscctrl & XMISCCTRL_RAMCS);