From ccf42ac003a47af4ddd242e0afef7f26bddaf5b5 Mon Sep 17 00:00:00 2001 From: Michael Pavone Date: Wed, 16 Jan 2019 09:49:18 -0800 Subject: Don't subtract chunk start from address in read_word as this is inconsistent with other consumers of memory map definitions. Fixes graphical corruption in NBA Jam TE and possibly other titles that use the Acclaim mapper with a 32Mbit ROM --- backend.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'backend.c') diff --git a/backend.c b/backend.c index acf66d5..400b6d8 100644 --- a/backend.c +++ b/backend.c @@ -99,7 +99,7 @@ uint16_t read_word(uint32_t address, void **mem_pointers, cpu_options *opts, voi if (!chunk) { return 0xFFFF; } - uint32_t offset = (address - chunk->start) & chunk->mask; + uint32_t offset = address & chunk->mask; if (chunk->flags & MMAP_READ) { uint8_t *base; if (chunk->flags & MMAP_PTR_IDX) { -- cgit v1.2.3