Fixed CRTC register readout on the Hercules, fixes #1656.

This commit is contained in:
OBattler
2021-09-05 19:03:32 +02:00
parent 16c7b632b6
commit b834365f30

View File

@@ -203,11 +203,12 @@ hercules_in(uint16_t addr, void *priv)
case 0x03b3: case 0x03b3:
case 0x03b5: case 0x03b5:
case 0x03b7: case 0x03b7:
ret = dev->crtc[dev->crtcreg]; if (dev->crtcreg == 0x0c)
if (dev->crtcreg == 12)
ret = (dev->ma >> 8) & 0x3f; ret = (dev->ma >> 8) & 0x3f;
else else if (dev->crtcreg == 0x0d)
ret = dev->ma & 0xff; ret = dev->ma & 0xff;
else
ret = dev->crtc[dev->crtcreg];
break; break;
case 0x03ba: case 0x03ba: