summaryrefslogtreecommitdiff
path: root/backend.c
diff options
context:
space:
mode:
authorMichael Pavone <pavone@retrodev.com>2019-01-16 09:49:18 -0800
committerMichael Pavone <pavone@retrodev.com>2019-01-16 09:49:18 -0800
commitccf42ac003a47af4ddd242e0afef7f26bddaf5b5 (patch)
tree910f8475111a2da102d4ce5aecd8a80870b78aa9 /backend.c
parent5af8cdc7a21df00bd16a34bde1561bb52e549c9e (diff)
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
Diffstat (limited to 'backend.c')
-rw-r--r--backend.c2
1 files changed, 1 insertions, 1 deletions
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) {