summaryrefslogtreecommitdiff
path: root/mapper_0003.c
diff options
context:
space:
mode:
authorPeter Fors <peter.fors@mindkiller.com>2025-04-08 13:42:13 +0200
committerPeter Fors <peter.fors@mindkiller.com>2025-04-08 13:42:13 +0200
commitc9bd7fecdb5d6c8954cf31efef910ed734386c70 (patch)
treeab59d3ca3e256ee7a431d82a6412e9c323f418ed /mapper_0003.c
parent205dc47111125aa2f7458be948cd9cd434d0344c (diff)
2690fps
Diffstat (limited to 'mapper_0003.c')
-rw-r--r--mapper_0003.c5
1 files changed, 1 insertions, 4 deletions
diff --git a/mapper_0003.c b/mapper_0003.c
index 743df51..a4ae56c 100644
--- a/mapper_0003.c
+++ b/mapper_0003.c
@@ -5,10 +5,7 @@ static void mapper_0003_init(struct nes_state *state) {
}
static uint8_t mapper_0003_prg_read(struct nes_state *state, uint32_t addr) {
- if(addr >= 0x8000) {
- return state->prg_rom[addr - 0x8000];
- }
- return 0;
+ return state->prg_rom[addr & 0x7fff];
}
static void mapper_0003_prg_write(struct nes_state *state, uint32_t addr, uint8_t value) {