A cartridge has no disk to write to, so anything a game wants to remember between sessions has to sit in RAM that never loses power. Battery backup does it with a coin cell, two diodes and a couple of resistors soldered beside a small static RAM chip. While the console is on, the RAM runs from the console’s 5 volts. When it is switched off, the cell takes over and the RAM drops into a retention mode that draws only a few microamps, little enough for one cell to last years. Nintendo Power explained it to players in 1991 as the reason “Game Paks never forget”: “By putting a battery in the Game Pak, game data can be stored as long as the life of the battery—about five years.”
The hard part is not keeping the data. It is the fraction of a second while the power falls, when the console’s chips are no longer behaving and a stray write can scribble over a save. Much of the design, on the board and in the memory controller, exists to shut the RAM away before that happens.
Fast facts
- The circuit: a static RAM with a low-power retention mode; a 3-volt lithium coin cell; a diode from each supply so neither can drive the other; a resistor in series with the cell; and a resistor that holds the RAM’s chip-enable off when the console is unpowered.
- The guard: the memory controller decides when the RAM can be written. Nintendo’s MMC1B (1989) added a RAM-enable bit; Game Boy controllers keep their RAM write-protected until the program writes
0Ahto a register. - First on the Famicom: Family BASIC, June 1984, with 2 KB of battery-backed RAM for the user’s programs.
- First game cartridge: Seta’s Morita Shougi, April 1987, on the MMC1 with 8 KB of battery-backed RAM.
- Made famous by: The Legend of Zelda’s gold NES cartridge, 1987, with “a built-in five year battery to save games!”
- Game Boy: the cartridge header names the arrangement: MBC1+RAM+BATTERY, MBC2+BATTERY, MBC3+TIMER+BATTERY.
- Today: a dead cell is replaced with a CR2032, ideally in a holder.
How the circuit works
The NESdev wiki’s page on cartridge RAM sets out the parts. “Most RAMs have a special low-power data retention mode, which decreases current consumption to few microamps,” as long as the supply stays above about 2 volts. One diode makes sure the battery “only powers the RAM, not the whole cartridge when in standby mode”; a second “keeps the 5 V from charging the battery”. A resistor ties the RAM’s chip-enable to its inactive level “when power is cut off”, because the rule for retention mode is strict: the memory “must become deselected before supply voltage drops” and must stay deselected the whole time the battery is feeding it.
Nintendo’s MMC1 boards use the same recipe, with “a resistor in series with the battery as part of UL compliance” and a pull-down resistor on the RAM’s active-high enable line “so that the SRAM is disabled when the MMC1 isn’t powered”. The same board could be built with or without the battery: on the SxROM boards a solder pad marked SL selects whether the 8 KB RAM keeps its data, and the cell, diodes and resistors are left off when it does not.
The controller as gatekeeper
The battery sits on the RAM’s power line, but the mapper still matters, because it decides when the RAM is selected at all. The MMC1 decodes the $6000-$7FFF window where the RAM appears, and Nintendo’s boards add further locks.
On SNROM, the board that carried The Legend of Zelda, the cartridge has only 8 KB of graphics memory, so the MMC1’s top graphics-bank line is spare. Nintendo wired it to the RAM as an extra chip enable. Writing a 1 to bit 4 of the graphics bank register at $A000 disconnects the RAM; writing a 0 brings it back. A program can therefore leave its save locked except during the few frames when it is actually writing.
The MMC1B went further. Nintendo told licensees in a notice of June 1989 that the revised chip had been made to improve RAM data retention, and asked them to use it for new games, starting with those that needed battery backup. It turned bit 4 of the program bank register into a RAM enable: 0 allows access, 1 blocks it. On the earlier MMC1A, NESdev notes, the RAM “is always enabled”. The MMC1 entry covers the register in detail.
The Game Boy built the same idea into every controller. Nintendo’s programming manual describes the MBC1’s first register as “RAMCS gate data (serves as write-protection for RAM)”: the program writes 0Ah to any address from 0000h to 1FFFh to open the RAM, and anything else closes it. For the MBC2 it is blunter: “Backup RAM is write-protected by a power-on reset. To protect backup data, avoid removing write protection unless necessary.”
Firsts
The first Famicom cartridge to keep RAM through a power cycle was not a game. NESdev’s history of cartridges dates Family BASIC to 21 June 1984 and says it “provides 2 KiB of battery-backed PRG RAM”, the first cartridge “for a long while” to have either extra RAM or a battery. It kept the user’s BASIC programs. Nearly three years passed before a game did the same: “Seta’s Morita Shougi appears to be the first game to use the Nintendo MMC1 mapper. It’s also the first game cartridge with 8 KiB of PRG RAM and battery backup” (14 April 1987). Taito’s X1-005 mapper followed that June with a little RAM inside the chip itself, “almost always used for saving”.
In Japan the pressure to put a battery in the cartridge was weaker, because the Famicom Disk System had rewritable disks. Retro Gamer’s account is plain: games on disk saved “without the need for costly battery backup. Titles such as Metroid, which in the West had a complex password system, could incorporate save features in Japan because of this.” The Legend of Zelda was a disk game in Japan in 1986. The cartridge with the battery was the export version.
Zelda’s gold cartridge
That cartridge is what made the technique visible. An Atari magazine, Antic, described it in March 1988: “The Legend of Zelda adventure game is the flagship of the Nintendo line. Packaged in a gold cartridge, it even features a built-in five year battery to save games!” Electronic Gaming Monthly counted the battery games in January 1989 and made Ultima only the third NES cartridge, “right behind blockbusters The Legend of Zelda and its sequel the Adventures of Link”, with “a battery memory back-up that can save a game in progress for up to five years”. By then Zelda was the reference point. ANALOG Computing complained that an Atari game’s high-score names were not “saved in battery-backed cartridge RAM, similar to The Legend of Zelda”, and ACE noted that “arcade adventures are becoming more popular on the consoles, with battery backups now allowing games to be saved for a later date”.
Nintendo Power tied the battery to the controller chips. MMCs, it told readers in 1991, allowed “the use of battery backed up RAM that can save your game progress from one play session to the next”, and “many of the classic games like The Legend of Zelda and Metroid became possible only after the MMC1 was developed”. The five years were Nintendo’s own figure: its specification for licensees guaranteed data retention for more than five years from the lithium cell.
What it was used for
From 1991 Nintendo Power’s game listings marked whether each game used “a battery or password to save game play data”, and its coverage shows three uses. Progress in long games: Crystalis, where “a battery backed memory saves your progress”, and Super Mario World, which saved “when you clear a Castle, Fortress, Ghost House or Switch Palace”. Records: “Since the F-Zero Game Pak has a battery back-up, it records the ten best times for each of the 15 tracks.” And handheld adventures: Metroid II on the Game Boy came with “a battery backup to save game progress”. Sega’s cartridges did the same on the Mega Drive, though memory was still rationed. Computer Gaming World liked Phantasy Star III, whose story passed through several generations of heroes, but noted that “while a battery saves one’s progress, there are only two storage files available”.
The battery cost money on every cartridge, so the cheaper answer stayed in use beside it. Nintendo Power’s 1992 comparison of three Super NES golf games found that “Jack Nicklaus Golf uses a password to save your position and True Golf Classics: Pebble Beach Golf Links employs a battery backup”. The choice was made game by game, and password systems carried on for years after the battery was available.
Game Boy
On the Game Boy the arrangement is written into byte 0147h of the cartridge header: “03h MBC1+RAM+BATTERY”, “06h MBC2+BATTERY”, “0Fh MBC3+TIMER+BATTERY”, “1Bh MBC5+RAM+BATTERY”. Nintendo’s manual lists what each controller offers. The MBC1 can address up to 32 KB of RAM, in 8 KB banks. The MBC2 has its own “built-in backup RAM (512 x 4 bits)”, so it needs only the cell. The MBC3 adds clock counters driven by “an external crystal oscillator (32.768 KHz)”, and “RAM and clock counter data can be backed up by an external lithium battery”. The cell that keeps the save also keeps the clock running, which is how a Game Boy game can know that a day has passed while it was switched off.
Replacing the cell
Nintendo’s guarantee ran out long ago for every cartridge it covered, and old cells do go flat. The NESdev wiki’s repair guide starts from that: “Adding a battery holder to an NES Game Pak PCB with a dead battery lets a player use that Game Pak to save again.” Instead of taping a new cell to the board, as “many tutorials online” do, it fits a CR2032 holder where the original tabbed cell was soldered. The save goes when the old cell comes out, so anyone who wants to keep it copies it off first with a cartridge reader.
Sources
- Nintendo Power volume 20, January 1991, pp. 29–31, “Why Game Paks never forget”: battery-backed RAM and MMCs; Zelda and Metroid; the MMC5; “about five years”.
- NESdev Wiki, “PRG RAM circuit” (web, secondary): retention mode, the retention voltage, the deselection rule, the diodes and the chip-enable resistor. https://www.nesdev.org/wiki/PRG_RAM_circuit
- NESdev Wiki, “MMC1” (web, secondary): the battery components and UL resistor; the pull-down on the RAM’s enable; the MMC1A and MMC1B behaviour of bit 4 and the late-1988 change from the original MMC1 to the MMC1A; SNROM’s use of the graphics bank line as a RAM enable. https://www.nesdev.org/wiki/MMC1
- NESdev Wiki, “SxROM” (web, secondary): the SNROM board and the SL solder pad. https://www.nesdev.org/wiki/SxROM
- Nintendo, MMC Cassette Programming Specification (November 1986, revised March 1987) and its notice on the MMC1B (June 1989), unpublished licensee documents: the five-year retention guarantee and the reason for the MMC1B.
- Nintendo of America, Game Boy Programming Manual, version 1.1 (1999), chapter 8, pp. 216–220: MBC1, MBC2 and MBC3 RAM, write protection and the clock.
- GbdevWiki, “The Cartridge Header” and “Memory Bank Controllers” (web, secondary): cartridge type codes and disabling RAM before power-down. https://gbdev.gg8.se/wiki/articles/The_Cartridge_Header
- NESdev Wiki, “Cartridge and mappers’ history” (web, secondary): Family BASIC, Morita Shougi and the Taito X1-005. https://www.nesdev.org/wiki/Cartridge_and_mappers'_history
- Retro Gamer issue 16, 2005: the Famicom Disk System and saving without a battery.
- Antic vol. 6 no. 11, March 1988: The Legend of Zelda’s gold cartridge and five-year battery.
- Electronic Gaming Monthly issue 1, January 1989, news column: Ultima as the third NES cartridge with battery back-up.
- ANALOG Computing issue 74, July 1989: review of Into the Eagle’s Nest.
- ACE issue 20, May 1989: console reviews on battery saves and arcade adventures.
- Nintendo Power issue 11, March 1990 (Crystalis); issue 21, February 1991 (listing key); issue 28, September 1991 (Super Mario World); issue 29, October 1991 (F-Zero); issue 31, December 1991 (Metroid II); issue 36, May 1992 (golf games).
- Computer Gaming World issue 88, November 1991: Phantasy Star III review.
- NESdev Wiki, “Battery holder” (web, secondary): fitting a CR2032 holder. https://www.nesdev.org/wiki/Battery_holder
See also
- The Legend of Zelda
- Password Systems: the alternative
- MMC1: the mapper on the first battery-backed game cartridges
- Famicom Disk System
- Bank Switching
- Cartridge
- Game Boy