EGA, MDA, and Sigma: Fix timings.

This commit is contained in:
OBattler
2025-08-14 13:13:32 +02:00
parent 3a8fa196a8
commit 2f7de1d23d
3 changed files with 10 additions and 6 deletions

View File

@@ -234,6 +234,8 @@ sigma_out(uint16_t addr, uint8_t val, void *priv)
case 0x2D8:
sigma->sigmamode = val;
sigma->fullchange = changeframecount;
sigma_recalctimings(sigma);
return;
case 0x2D9:
sigma->sigma_ctl = val;
@@ -392,6 +394,7 @@ sigma_recalctimings(sigma_t *sigma)
double disptime;
double _dispontime;
double _dispofftime;
double crtcconst = (cpuclock / 22440000.0 * (double) (1ULL << 32)) * 8.0;
if (sigma->sigmamode & MODE_80COLS) {
disptime = (sigma->crtc[0] + 1) << 1;
@@ -402,8 +405,8 @@ sigma_recalctimings(sigma_t *sigma)
}
_dispofftime = disptime - _dispontime;
_dispontime *= CGACONST;
_dispofftime *= CGACONST;
_dispontime *= crtcconst;
_dispofftime *= crtcconst;
sigma->dispontime = (uint64_t) (_dispontime);
sigma->dispofftime = (uint64_t) (_dispofftime);
}