In January 1991 Nintendo Power explained to its readers why some Game Paks could do things others could not. The newest of Nintendo’s Memory Management Controllers, it said, brought “the latest advances, including an improved battery back up system, better color definition and partial screen scrolling”, along with “a customized mathematics module that frees up the Control Deck’s CPU”. Its example was Castlevania III: Dracula’s Curse, and its illustration showed why the colours looked better: where older games had “one Color Area with four possible colors, the MMC5 allows four Color Areas with 16 possible colors.”
The MMC5 was the most elaborate chip Nintendo put on a cartridge for the NES and Famicom. The MMC3 had given games fine-grained bank switching and a scanline counter. The MMC5 added a kilobyte of RAM of its own, a way to give every background tile its own palette, a split-screen mode, a multiplier, reset detection for safer saved games and, on a Famicom, three more sound channels. Few games needed all of that, and only a handful of publishers used it: NESdev’s cartridge database counts 15 games on its boards.
Fast facts
- Maker: Nintendo.
- First game: Koei’s Nobunaga’s Ambition II, February 1990.
- Boards: Nintendo’s ExROM family (EKROM, ELROM, ETROM, EWROM); iNES mapper 5.
- Package: a 100-pin rectangular flat package.
- Program ROM: up to 1 MB, in 8, 16 or 32 KB banks.
- Character ROM: up to 1 MB, in 1, 2, 4 or 8 KB banks.
- Work RAM: up to 128 KB, which can be battery-backed.
- Internal RAM: 1 KB, usable as an extra nametable, extended attributes, split-screen data or plain RAM.
- Interrupt: a scanline counter that compares against a line number and raises an IRQ.
- Maths: an 8-bit by 8-bit multiplier with a 16-bit result.
- Sound: two pulse channels and an 8-bit sample channel, heard only on a Famicom.
- Games: Castlevania III: Dracula’s Curse (North America and Europe), Koei’s Nobunaga’s Ambition II, Romance of the Three Kingdoms II, Bandit Kings of Ancient China and Uncharted Waters, and Just Breed, Laser Invasion, Metal Slader Glory and Uchū Keibitai SDF.
Memory
Nintendo Power put the MMC5’s capacity in the terms its readers knew: “Memory size for the MMC5 shoots up to 8 Megs”, a Meg being a megabit. The NESdev Wiki gives the figures in bytes: up to 1 MB of program ROM and 1 MB of character ROM, where the MMC3 stopped at 512 KB and 256 KB.
The chip offers four ways to divide the CPU’s cartridge space and four ways to divide the PPU’s pattern tables:
| Mode | Program ROM at $8000-$FFFF |
Character ROM at PPU $0000-$1FFF |
|---|---|---|
| 0 | one 32 KB bank | one 8 KB bank |
| 1 | two 16 KB banks | two 4 KB banks |
| 2 | one 16 KB bank and two 8 KB banks | four 2 KB banks |
| 3 | four 8 KB banks | eight 1 KB banks |
Unlike the MMC3, which always kept the last bank fixed, every window can be switched, and work RAM can be mapped into the ROM area as well as at $6000-$7FFF. The MMC5 also watches which kind of fetch the PPU is making. In 8×16 sprite mode it keeps separate banks for sprites and for the background, even though the PPU asks for both at the same addresses, so a game gets up to 8 KB of sprite patterns without giving up background tiles.
A kilobyte that changes the picture
The MMC5 contains 1,024 bytes of RAM, which a game can use in four ways: as a third nametable, as extended attributes, as the tile map for a split screen, or as ordinary memory.
Extended attributes are what Nintendo Power was drawing. On a standard NES, the PPU’s attribute table assigns one of four palettes to each 16×16-pixel area, a block of four tiles. In extended attribute mode, each byte of the MMC5’s RAM belongs to one 8×8 tile on the screen. Two bits choose that tile’s palette, so neighbouring tiles no longer have to share colours. The other six bits choose a 4 KB bank of character ROM for that tile alone. Since a screen is 32 by 30 tiles, the 960 bytes cover it, and a single screen can draw on 64 banks of 256 tiles, 16,384 in all. David Sheff’s Game Over explains it for a general reader: with the MMC5, “all 960 tiles” on the screen could be different.
The split-screen mode is the “partial screen scrolling” Nintendo Power mentioned. The MMC5 counts the tiles the PPU fetches across each line and, past a chosen column, quietly substitutes its own tile map from internal RAM, with its own vertical scroll. One side of the screen can scroll while the other stays put, like a status panel. NESdev names two games that use it: Uchū Keibitai SDF, for ship statistics during its introduction, and Bandit Kings of Ancient China, in its ending.
A fill mode can cover a nametable with a single tile in a single colour without writing a byte to video memory, which NESdev notes is useful for screen transitions.
Counting lines another way
The MMC5 raises an interrupt on a chosen scanline, as the MMC3 does, but it finds the lines differently. The MMC3 counts rises on one PPU address line and depends on how a game lays out its pattern tables. The MMC5 watches the PPU’s reads. At the end of each line the PPU reads the same nametable byte twice as a dummy fetch, and reads it a third time at the start of the next line. Three identical nametable reads in a row tell the MMC5 a new line has begun.
A game writes a line number to $5203, and when the counter matches it the chip flags an interrupt, which it passes to the CPU if the game has enabled it at $5204. Reading $5204 also tells a program whether the PPU is currently drawing the picture, which the MMC5 works out from whether it has seen any PPU reads in the last few CPU cycles. NESdev notes one practical difference: the MMC5’s interrupt arrives at the very start of a line, where the MMC3’s usually comes near its end.
The multiplier
The 6502 has no multiply instruction; a program multiplies by shifting and adding, a loop of dozens of cycles. The MMC5 does it in hardware. A game writes two 8-bit numbers to $5205 and $5206 and reads the 16-bit product back from the same two addresses. This is the “customized mathematics module” Nintendo Power described, and the strategy games that used the chip had plenty of arithmetic to do.
Safer saves
Battery-backed cartridges of the NES era told players to hold RESET while switching off, because the console could scribble on the save memory as the power fell. The MMC5 detects when the CPU clock stops or the supply drops and blocks the RAM, which NESdev says reduces the need for the RESET ritual. Nintendo Power put it more simply: “with the MMC5 you won’t have to push RESET on your Control Deck while pushing POWER when you want to quit.”
Sound on the Famicom
The MMC5 adds three sound channels: two pulse waves that behave almost exactly like the pulse channels of the APU, without the pitch sweep, and a channel that plays 8-bit samples written by the program. NESdev records that the only game to use the sample channel is Shin 4 Nin Uchi Mahjong: Yakuman Tengoku.
As with every expansion sound chip, only a Famicom hears it. The Famicom’s cartridge slot carries audio through the cartridge; the NES’s does not, and NESdev notes that an American or European NES has to be modified to play cartridge audio, even when the board carries the circuit.
The games
Castlevania III: Dracula’s Curse is the MMC5 game most Western players knew. Nintendo Power previewed it in July 1990 as coming “this fall” and gave it a 21-page feature that November. In Japan the same game, Akumajō Densetsu, had been released on Konami’s own VRC6 chip, with its extra sound channels. The Western cartridge used the MMC5 and plays its music through the NES’s own chip (see the APU entry).
Koei was the chip’s most regular customer. Its historical strategy games, sold in America under its own name, were big, text-heavy and full of numbers: Nobunaga’s Ambition II, the first MMC5 game, then Romance of the Three Kingdoms II, Bandit Kings of Ancient China and Uncharted Waters. Wikipedia’s summary is that only Koei used the chip regularly, and that it was originally the most expensive of Nintendo’s MMCs.
Elsewhere it appeared on only a few games, among them Just Breed, Metal Slader Glory, Laser Invasion and Uchū Keibitai SDF. NESdev records a later revision, the MMC5A, with a few extra registers that no released game relies on.
The MMC6
The MMC6 looks like a sequel and behaves like a variant. NESdev describes it as an MMC3 (specifically the MMC3C revision) with 1 KB of RAM inside the chip. That RAM appears at $7000-$7FFF, repeated through the range, and it has its own controls: the program can enable reading and writing separately for each 512-byte half, through the register the MMC3 uses to protect its work RAM. Everything else, including the bank registers and the scanline counter, works as on the MMC3.
The chip first appeared in December 1990, and only two games used it: StarTropics and its sequel Zoda’s Revenge: StarTropics II. Wikipedia notes that the kilobyte could be kept by a battery, which is how the games saved. Because the MMC6 shares the MMC3’s iNES mapper number, 4, a standard iNES file header cannot say which chip a game expects, and the two are easily confused; the NES 2.0 format later gave the MMC6 its own submapper, 4:1, to tell them apart.
Sources
- Nintendo Power volume 20, January 1991, “Why Your Game Paks Never Forget”, pp. 28-31: “Memory Management Controllers”; the MMC5’s “improved battery back up system, better color definition and partial screen scrolling”; the “customized mathematics module”; “8 Megs”; no need to push RESET; Castlevania III and the Color Area illustration, p. 30.
- Nintendo Power volume 14, July/August 1990: Castlevania III: Dracula’s Curse previewed for the autumn.
- Nintendo Power volume 18, November 1990: the 21-page Castlevania III feature.
- Nintendo Power volume 22, March 1991, and volume 27, August 1991: Koei credited as publisher of Bandit Kings of Ancient China and Romance of the Three Kingdoms II in the magazine’s game listings.
- David Sheff, Game Over (1993; GamePress edition, 1999), chapter 3, “I, Mario”: the MMC5 letting all 960 tiles on screen differ and doing arithmetic for the main processor.
- NESdev Wiki, “MMC5” (community reference, web, secondary): the first game and date; the 15 games; the example game list; the ExROM boards and iNES mapper 5; capacities; the banking modes; the separate 8×16 sprite banks; the four uses of internal RAM; extended attributes and 16,384 tiles; fill mode; the vertical split and the games that use it; scanline detection,
$5203and$5204, and the timing compared with the MMC3; the multiplier at$5205and$5206; reset detection; the MMC5A; the 100-pin package. https://www.nesdev.org/wiki/MMC5 - NESdev Wiki, “MMC5 audio” (community reference, web, secondary): the two pulse channels without sweep, the 8-bit sample channel, and Shin 4 Nin Uchi Mahjong as its only user. https://www.nesdev.org/wiki/MMC5_audio
- NESdev Wiki, “ExROM” (community reference, web, secondary): board capacities and the modification an NES needs to play cartridge audio. https://www.nesdev.org/wiki/ExROM
- NESdev Wiki, “MMC6” (community reference, web, secondary): the MMC3C comparison; the 1 KB of RAM at
$7000-$7FFFand its enable bits; first appearance in December 1990; the two StarTropics games; mapper 4 and submapper 4:1. https://www.nesdev.org/wiki/MMC6 - Wikipedia, “Memory management controller (Nintendo)” (web, secondary): the MMC5 as the most advanced and originally most expensive MMC; only Koei using it regularly; the MMC6’s RAM kept by a battery. https://en.wikipedia.org/wiki/Memory_management_controller_(Nintendo)