CGA and Tandy 1000 SX/HX: Implement light pen latch readout with a sane value, fixes #4856.

This commit is contained in:
OBattler
2024-09-25 08:58:40 +02:00
parent 6d84c4d33c
commit 26b7053318
2 changed files with 28 additions and 2 deletions

View File

@@ -864,7 +864,23 @@ vid_in(uint16_t addr, void *priv)
break;
case 0x03d5:
ret = vid->crtc[vid->crtcreg];
switch (vid->crtcreg) {
default:
ret = vid->crtc[vid->crtcreg];
break;
case 0x10:
if (dev->is_sl2)
ret = vid->crtc[vid->crtcreg];
else
ret = 0x0f;
break;
case 0x11:
if (dev->is_sl2)
ret = vid->crtc[vid->crtcreg];
else
ret = 0x78;
break;
}
break;
case 0x03da:

View File

@@ -131,7 +131,17 @@ cga_in(uint16_t addr, void *priv)
ret = cga->crtcreg;
break;
case 0x3D5:
ret = cga->crtc[cga->crtcreg];
switch (cga->crtcreg) {
default:
ret = cga->crtc[cga->crtcreg];
break;
case 0x10:
ret = 0x0f;
break;
case 0x11:
ret = 0x78;
break;
}
break;
case 0x3DA:
ret = cga->cgastat;