summaryrefslogtreecommitdiff
path: root/ops.yaml
diff options
context:
space:
mode:
Diffstat (limited to 'ops.yaml')
-rw-r--r--ops.yaml29
1 files changed, 9 insertions, 20 deletions
diff --git a/ops.yaml b/ops.yaml
index 5311d96..7b5e77e 100644
--- a/ops.yaml
+++ b/ops.yaml
@@ -9044,6 +9044,10 @@ templates:
// oam memory (160 bytes):
ctx->mmu.oam[addr - 0xFE00] = val;
+ if (ctx->config && ctx->config->on_oam_wb) {
+ ctx->config->on_oam_wb(ctx, addr, val);
+ }
+
// invalidate oam cache
ctx->gpu.oam_dirty = true;
}
@@ -9092,6 +9096,8 @@ templates:
ctx->mmu.ram[addr & 0x1FFF] = val;
break;
}
+
+ break;
default:
// never reached
break;
@@ -9108,27 +9114,10 @@ templates:
ctx->config->on_mmu_wb(ctx, addr, val);
}
- switch (addr & 0xF000) {
- case 0x0000:
- case 0x1000:
- case 0x2000:
- case 0x3000:
- case 0x4000:
- case 0x5000:
- case 0x6000:
- case 0x7000:
- rom_wb(ctx, addr, val);
- break;
- case 0x8000:
- case 0x9000:
- case 0xA000:
- case 0xB000:
- case 0xC000:
- case 0xD000:
- case 0xE000:
- case 0xF000:
+ if (addr & 0xF000) {
ram_wb(ctx, addr, val);
- break;
+ } else {
+ rom_wb(ctx, addr, val);
}
}