Mapping fix for RPG Tsukuru 2

This commit is contained in:
byuu 2019-11-01 06:26:24 +09:00
parent 2884cd87d2
commit c717a0e7bd
2 changed files with 4 additions and 1 deletions

View File

@ -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;

View File

@ -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;