From b3ff305648b1734a2a1f28c4d34d2b47bb0ea93c Mon Sep 17 00:00:00 2001 From: Michael Pavone Date: Thu, 2 Apr 2020 20:32:09 -0700 Subject: Don't lockup on writes to !TIME or !FDC regions regardless of whether anything is mapped there --- genesis.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'genesis.c') diff --git a/genesis.c b/genesis.c index c6dc8c0..be51b40 100644 --- a/genesis.c +++ b/genesis.c @@ -1120,7 +1120,7 @@ static void *unused_write(uint32_t location, void *vcontext, uint16_t value) gen->tmss_lock[location >> 1 & 1] = value; } else if (has_tmss && location == 0xA14100) { //TODO: implement TMSS control register - } else { + } else if (location < 0xA12000 || location >= 0xA13100 || (location >= 0xA12100 && location < 0xA13000)) { fatal_error("Machine freeze due to unmapped write to %X\n", location); } return vcontext; @@ -1142,7 +1142,7 @@ static void *unused_write_b(uint32_t location, void *vcontext, uint8_t value) } } else if (has_tmss && (location == 0xA14100 || location == 0xA14101)) { //TODO: implement TMSS control register - } else { + } else if (location < 0xA12000 || location >= 0xA13100 || (location >= 0xA12100 && location < 0xA13000)) { fatal_error("Machine freeze due to unmapped byte write to %X\n", location); } return vcontext; -- cgit v1.2.3