Mercurial > repos > blastem
diff backend.c @ 1678:d377d6037dd9
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
author | Michael Pavone <pavone@retrodev.com> |
---|---|
date | Wed, 16 Jan 2019 09:49:18 -0800 |
parents | 1f745318f10a |
children | 956c1cce05e2 49a52c737bf0 |
line wrap: on
line diff
--- a/backend.c Fri Jan 04 19:13:47 2019 -0800 +++ b/backend.c Wed Jan 16 09:49:18 2019 -0800 @@ -99,7 +99,7 @@ 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) {