summaryrefslogtreecommitdiff
path: root/mknes_memory.c
diff options
context:
space:
mode:
authorPeter Fors <peter.fors@mindkiller.com>2025-11-02 13:54:50 +0100
committerPeter Fors <peter.fors@mindkiller.com>2025-11-02 13:54:50 +0100
commit46d0f6aeb1588b85852487e581a8b4c9c2401646 (patch)
treeca93ed439b297fe8f59841b6885ba65ded81f9a3 /mknes_memory.c
parentfc41466fe825eae4e5c2e2f4764482c53c687679 (diff)
Add MMC5, not in a working state, but can start castlevania iii, this is a horrible mapper to implement.
Diffstat (limited to 'mknes_memory.c')
-rw-r--r--mknes_memory.c4
1 files changed, 2 insertions, 2 deletions
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);
}