gb_mbc_decode_write
Decode a ROM-area write to identify the targeted Game Boy MBC banking register, applying documented masking and mode-dependent rules.
Instructions
Identify which banking register a ROM-area write hits.
Turns an opaque ld [$2000], a into "MBC1 ROM Bank Number", with the
documented behaviour (masking, the $00->$01 rule, mode dependence) attached.
Tool call template
Replace each placeholder with a value matching the input schema. Only required parameters are included; add optional parameters as needed.
{
"id": 1,
"jsonrpc": "2.0",
"method": "tools/call",
"params": {
"arguments": {
"mbc": "<mbc>",
"address": "<address>"
},
"name": "gb_mbc_decode_write"
}
}Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| mbc | Yes | Mapper name, e.g. 'MBC1'. Cartridge-type strings work too. | |
| value | No | The byte written, if known. | |
| address | Yes | The address written, e.g. '$2000'. |