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.
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'. |