summaryrefslogtreecommitdiff
path: root/ops.yaml
diff options
context:
space:
mode:
authorPaul Duncan <pabs@pablotron.org>2018-06-27 23:21:22 -0400
committerPaul Duncan <pabs@pablotron.org>2018-06-27 23:21:22 -0400
commit5362a91b05721940441365c5cf84218e4bdb7549 (patch)
tree8f891f8976c5d7f24c4dafa1ec55c69c525a363f /ops.yaml
parentfa0db0d91035b8ff66bd40608ecf8c835b74799b (diff)
downloadgb-c-master.tar.bz2
gb-c-master.zip
add on_oam_wb()HEADmaster
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);
}
}