summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorPaul Duncan <pabs@pablotron.org>2018-06-20 13:55:04 -0400
committerPaul Duncan <pabs@pablotron.org>2018-06-20 13:55:04 -0400
commit33a4c7944cfa30b22fb2e79271c359174381ea05 (patch)
tree1102ea83299c96d83c27cf3dd4d8895c321f9bc8
parent1da68742047952880ce8b78b6190cef24f4e411a (diff)
downloadgb-c-33a4c7944cfa30b22fb2e79271c359174381ea05.tar.bz2
gb-c-33a4c7944cfa30b22fb2e79271c359174381ea05.zip
add mbc2 attrs to mmu, fix typos
-rw-r--r--ops.yaml8
1 files changed, 7 insertions, 1 deletions
diff --git a/ops.yaml b/ops.yaml
index 84696e7..d5a4e01 100644
--- a/ops.yaml
+++ b/ops.yaml
@@ -7603,6 +7603,11 @@ templates:
uint8_t ram_bank;
bool rom_ram_mode;
} mbc1;
+
+ struct {
+ uint8_t rom_bank;
+ bool ram_enable;
+ } mbc2;
};
// enable interrupt flags (addr: 0xFFFF)
@@ -7897,7 +7902,7 @@ templates:
// AA AABB BBBB BBBB BBBB
return (
// B: rom_bank (4 bits, low bit set)
- (((ctx->mmu.mbc2.rom_bank & 0xF) << 13) |
+ ((ctx->mmu.mbc2.rom_bank & 0xF) << 13) |
// C: address (14 bits)
((addr - 0x4000) & 0x3FFF)
@@ -7972,6 +7977,7 @@ templates:
const gb_t * const ctx,
const uint16_t addr
) {
+ UNUSED(ctx);
return (addr & 0x1FF);
}