MM58167 register index 0x0 and 0x5 are also half-registers

Related to https://github.com/86Box/86Box/issues/3347

0x0 and 0x8 low nibbles are always 0
0x5 and 0xd high nibbles are always 0
This commit is contained in:
640KB
2025-08-04 20:26:31 -04:00
committed by 640-KB
parent da10f19f8c
commit cfd311f0f1

View File

@@ -410,6 +410,7 @@ mm67_read(uint16_t port, void *priv)
break;
case MM67_AL_MSEC:
case MM67_MSEC:
ret = dev->nvr.regs[reg] & 0xf0;
break;
@@ -417,6 +418,10 @@ mm67_read(uint16_t port, void *priv)
ret = dev->nvr.regs[reg] & 0x0f;
break;
case MM67_DOW:
ret = dev->nvr.regs[reg] & 0x07;
break;
default:
ret = dev->nvr.regs[reg];
break;