Memory bank
In one sentence
The Game Boy CPU can see 32 kilobytes of the cartridge at once. Bigger games cut the ROM into banks and swap which bank is visible. That swap is the memory bank controller's job.
The detail
Bank 0 is the first 16 KB and stays put. The next 16 KB window can be pointed at another slice of the ROM. A game that is only a few kilobytes never needs the swap. A game with several levels usually does.
The chip that performs the swap is the MBC. MBC1 was enough for many early games. MBC5 can address much larger ROMs and is the usual choice once a game outgrows a small bank. Retroable's builds pick a controller that fits the ROM they just compiled.
If a level loads and the graphics from another level appear, the wrong bank was mapped into that window. The pictures did not vanish. They were in a bank the CPU was not looking at.
Worth keeping
- Only 32 KB of ROM is visible at a time, in two 16 KB windows
- Bank 0 stays mapped. The second window is the one that switches
- MBC5 is the controller used once a game no longer fits in a small ROM
Questions
What is an MBC?
The memory bank controller, the chip that swaps which slice of the ROM the CPU can see.
Does every game need one?
A tiny ROM that fits in 32 KB does not. Most games with several levels do.
Is a bank the same as a save file?
No. Banks are slices of the program. A save lives in cartridge RAM, when the game has any.
Related
Game Boy is a trademark of Nintendo. Retroable is independent and is not affiliated with Nintendo.
