From 46d0f6aeb1588b85852487e581a8b4c9c2401646 Mon Sep 17 00:00:00 2001 From: Peter Fors Date: Sun, 2 Nov 2025 13:54:50 +0100 Subject: Add MMC5, not in a working state, but can start castlevania iii, this is a horrible mapper to implement. --- mknes_memory.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'mknes_memory.c') diff --git a/mknes_memory.c b/mknes_memory.c index 20d77e8..cdeed3f 100644 --- a/mknes_memory.c +++ b/mknes_memory.c @@ -27,7 +27,7 @@ static inline uint8_t memory_read(struct nes_state *state, uint32_t offset) { state->ppu.input_bit[index]++; result = value | 0x40; // Bit 6 open bus high, bit 7 low - } else if(offset >= 0x6000 && offset <= 0x7fff) { + } else if(offset >= 0x5000 && offset <= 0x7fff) { result = state->mapper_function.prg_ram_read(state, offset); } @@ -88,7 +88,7 @@ static inline void memory_write(struct nes_state *state, uint32_t offset, uint8_ } else if(offset >= 0x4000 && offset <= 0x4017) { apu_write(state, offset, value); - } else if(offset >= 0x6000 && offset <= 0x7fff) { + } else if(offset >= 0x5000 && offset <= 0x7fff) { state->mapper_function.prg_ram_write(state, offset, value); } -- cgit v1.2.3