Classroom Glossary Public page

Week 4: Cartridge Mappers and Bank Switching

A stock NES core only handles plain unbanked ROMs. Real games like Super Mario Bros 3 and Mega Man 6 used cartridge mappers (MMC1, MMC3, MMC5) to switch banks of larger ROMs into the small address window the CPU could see. This week you implement an MMC1-variant.


Reading

Lecture

Roughly three hours across two sessions. Key arc:

  • Why bank switching existed. The 32 KB CPU window versus the 256 KB ROM problem.
  • The MMC1 (Memory Management Controller 1) protocol. Serial loading, control register, PRG and CHR banking.
  • MMC3 versus MMC1 versus MMC5. Why each existed.
  • How a mapper module wires into a core. Bus inspection, address rewriting, latch.
  • Verifying the new mapper. The ROM-loading test pattern.

Lab pack

Lab Pack 4 implements an MMC1-variant and verifies a bank-switched ROM. See Lab Pack 4: MMC1-Variant Mapper.

Classroom tools

  • SPK-101 classroom: NES mapper inspector, already-shipped, drops you into the live mapper state of any loaded ROM.
  • Workbench: HDL drag-drop simulator for the bus-decode-and-latch building block.
  • iverilog plus yosys for the synthesise-and-verify loop on the community NES core.

Architecture comparison sidebar

The MMC1 is a discrete chip on the cartridge that watches the CPU bus and rewires which ROM bank is exposed at each address. The same pattern reappears in every memory-mapped device the curriculum touches, including the SB6141 cable modem you will reverse in RE-101. Memory management was a hardware concern before it was a software concern; the MMC chips are the historical anchor.

Reflection prompts

  1. Why did Nintendo manufacture multiple MMC variants instead of a single universal one?
  2. Compare the MMC1 to the LR35902's MBC1 (you will see it in Module 5). What is shared and what is different?
  3. If you were designing a 1989 cartridge mapper from scratch, what would you simplify out of MMC3 and what would you keep?

What is next

Module 5 changes architectures. The Game Boy LR35902 is famously a Z80 cousin with a 6502-flavoured instruction subset removed.