diff --git a/bsnes/sfc/cpu/cpu.cpp b/bsnes/sfc/cpu/cpu.cpp index b6fec167..deb58881 100644 --- a/bsnes/sfc/cpu/cpu.cpp +++ b/bsnes/sfc/cpu/cpu.cpp @@ -34,7 +34,9 @@ auto CPU::Enter() -> void { auto CPU::main() -> void { if(r.wai) return instructionWait(); if(r.stp) return instructionStop(); - if(!status.interruptPending) return instruction(); + if(!status.interruptPending) { + return instruction(); + } if(status.nmiPending) { status.nmiPending = 0; diff --git a/bsnes/sfc/memory/memory.cpp b/bsnes/sfc/memory/memory.cpp index 99618f76..4b760096 100644 --- a/bsnes/sfc/memory/memory.cpp +++ b/bsnes/sfc/memory/memory.cpp @@ -61,6 +61,7 @@ auto Bus::map( } uint offset = reduce(bank << 16 | addr, mask); + if(size) base = mirror(base, size); if(size) offset = base + mirror(offset, size - base); lookup[bank << 16 | addr] = id; target[bank << 16 | addr] = offset;