Merge pull request #3226 from iamgreaser/gm/ega-make-crtc-readable

vid_ega: Make the read-write CRTC registers readable
This commit is contained in:
Miran Grča
2023-03-24 23:57:35 +01:00
committed by GitHub

View File

@@ -312,8 +312,25 @@ ega_in(uint16_t addr, void *p)
break; break;
case 0x3d1: case 0x3d1:
case 0x3d5: case 0x3d5:
if (ega_type) switch(ega->crtcreg) {
ret = ega->crtc[ega->crtcreg]; case 0xc:
case 0xd:
case 0xe:
case 0xf:
ret = ega->crtc[ega->crtcreg];
break;
case 0x10:
case 0x11:
// TODO: Return light pen address once implemented
if (ega_type)
ret = ega->crtc[ega->crtcreg];
break;
default:
if (ega_type)
ret = ega->crtc[ega->crtcreg];
}
break; break;
case 0x3da: case 0x3da:
ega->attrff = 0; ega->attrff = 0;