Skip to content

Part 11 Memory Bank Controllers

Shane DeSeranno edited this page Nov 4, 2015 · 18 revisions

Go Home

Part 11 - Memory Bank Controllers (MBC)

The entire available memory space the Gameboy can access is limited to a 2-byte address (0xFFFF or 65,535 addresses). When you divide this space up between all the devices, it leaves a pretty limited amount of space to be able to access the cartridge ROM.

0x0000 - 0x7FFF = 32,767 bytes = 32KB

So, what happens when the game is bigger than 32KB? Well, then the cartridge would have a specialized piece of hardware that manages pieces of this memory and allowed the game to swap out sections of this addressable memory space for different chunks. These is called switchable banks.

0x0000 - 0x3FFF: 16KB ROM Bank 00, this is non-switchable
0x4000 - 0x7FFF: 16KB ROM Bank 01..NN (in cartridge, switchable bank number)
0xA000 - 0xBFFF:  8KB External RAM    (in cartridge, switchable bank, if any)

The problem with this magic? Because it was a piece of hardware in the cartridge, it was common for different games to have different types of MBCs. This makes it difficult for emulators because it means that we need to write multiple MBCs. Fortunately, most of them behaved very similar to each other and according to the documentation, there seem to be five core mappers on the Gameboy. The NES had the same feature, but the NES had hundreds of mappers!

Clone this wiki locally