stat -> status; improve MDA register decoding; add MDA CRTC, register and mode enums

This commit is contained in:
starfrost013
2025-06-11 17:37:15 +01:00
parent dd6f7746a9
commit 317a5b7ade
16 changed files with 220 additions and 147 deletions

View File

@@ -268,7 +268,7 @@ tandy_vid_in(uint16_t addr, void *priv)
break;
case 0x03da:
ret = vid->stat;
ret = vid->status;
break;
case 0x3db:
@@ -353,7 +353,7 @@ vid_poll(void *priv)
if (!vid->linepos) {
timer_advance_u64(&vid->timer, vid->dispofftime);
vid->stat |= 1;
vid->status |= 1;
vid->linepos = 1;
scanline_old = vid->scanline;
if ((vid->crtc[8] & 3) == 3)
@@ -574,19 +574,19 @@ vid_poll(void *priv)
}
vid->scanline = scanline_old;
if (vid->vc == vid->crtc[7] && !vid->scanline)
vid->stat |= 8;
vid->status |= 8;
vid->displine++;
if (vid->displine >= 360)
vid->displine = 0;
} else {
timer_advance_u64(&vid->timer, vid->dispontime);
if (vid->dispon)
vid->stat &= ~1;
vid->status &= ~1;
vid->linepos = 0;
if (vid->vsynctime) {
vid->vsynctime--;
if (!vid->vsynctime)
vid->stat &= ~8;
vid->status &= ~8;
}
if (vid->scanline == (vid->crtc[11] & 31) || ((vid->crtc[8] & 3) == 3 && vid->scanline == ((vid->crtc[11] & 31) >> 1))) {
vid->cursorvisible = 0;