AT NVR: The ability to lock reading of a register in preparation of the WD7C610 rewrite.

This commit is contained in:
OBattler
2024-02-02 05:30:11 +01:00
parent a8f250b6c9
commit 91ca927618

View File

@@ -692,7 +692,7 @@ nvr_read(uint16_t addr, void *priv)
{
nvr_t *nvr = (nvr_t *) priv;
const local_t *local = (local_t *) nvr->data;
uint8_t ret;
uint8_t ret = 0xff;
uint8_t addr_id = (addr & 0x0e) >> 1;
uint16_t i;
uint16_t checksum = 0x0000;
@@ -810,6 +810,7 @@ nvr_read(uint16_t addr, void *priv)
break;
default:
if (!(local->lock[local->addr[addr_id]] & 0x02))
ret = nvr->regs[local->addr[addr_id]];
break;
}