changeset 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 b1ad6339de4f
children deaf31803b11
files backend.c
diffstat 1 files changed, 1 insertions(+), 1 deletions(-) [+]
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) {