GeezerVisonThe World Wide Web, restored to 800 pixels of glory. | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| Home|About|Gaming cabinet|Archives|How it works|Starter sites | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
GeezerVison is showing b13rg.icecdn.tech — Exploring the Gameboy Memory Bank Controller B's Website Interesting articles about interesting thingsExploring the Gameboy Memory Bank Controller01 Dec 2020 | 21 minutes to read
Without a game cartridge, a Gameboy is just displays “Gameboy” and freezes. Once slotted in, the bits and bytes contained within a cartridge created countless worlds and memories. How did a Gameboy cartridges store such a wide variety of games, while also enabling things like save files, rumble, and even infrared communication? In this article, we will examine the Memory Bank Controllers (MBC) contained inside the cartridge, and how they enabled the worlds of Pokemon, Zelda, and countless other to become a reality in the hands of children and adults everywhere. To start, we will define what exactly a Memory Bank Controller is, and the different types that were available. We’ll also analyze some usage statistics about how common they were in cartridges, and what types were used the most. Next we’ll look at how the Gameboy determined the cartridge type by examining the game ROM header. Finally, we’ll take a look at some real examples from my own game collection and see how the MBC was applied in practice. Table of Contents
The MBCMemory Bank Controller were a part of many cartridge games developed for the Gameboy and Gameboy color. It allowed the cartridge to not only address larger amounts of RAM and ROM, but to also have additional hardware that the Gameboy could utilize. The MBCs were most commonly paired with larger ROM and additional RAM, but different MBCs also allowed the use of real time clocks, rumble, and even a light sensor. A normal cartridge had 16 address lines, allowing the Gameboy to address a maximum of 64KB of ROM on the cartridge without an MBC. In practice the maximum ROM size of a game without an MBC was 32KB. Games like Tetris and Dr. Mario were 32KB or less in size, so didn’t require a MBC to operate. This allowed for very simple PCB layouts, as the single ROM chip would be directly connected to the cartridge pins. By placing an MBC between the console and the cartridge ROM/RAM, it could translate special reads and writes to facilitate the bank switching. ROM data on a cartridge would be split into 16KB “banks” that could be swapped out at will by the game.
The first bank, RAM banks behaved similarly, though it only mounted 8KB at a time.
That data was mounted at addresses When developing a game, it was and still is important to consider the size of the final product (unless you’re Call of Duty). The size of the game and add-ons like RAM controlled what type of memory bank controller would be required. The following types of memory bank controllers were usually available for use:
A note about the MMM01, it is a “metamapper” that is used in the game collection (Momotarō Collection 2 and Taito Variety Pack). It provides a boot menu that allows the user to select a game before locking itself down into a separate “normal” mapper mode that only exposes certain banks to the game inside the collection. To read more about the specifics, including an interesting VHDL design, check out this wiki page. Gameboy cartridges most commonly used no MBC at all, or MBC type 1,2, and 5. MBC 3, 6 and 7 were usually reserved for special circumstances and didn’t see as much use. The different types enabled developers to use hardware like real time clocks, RAM, batteries for saving, rumble, and even a light sensor. Multiple memory controllers were made to help control the cost of producing the cartridge. While it would be convenient to have a “One size fits all” controller that could dynamically accommodate add-ons and varying amounts of ROM and RAM, it would have been an expensive chip to produce. By producing a variety of types, game developers could select the MBC that would best accommodate their game. Usage StatisticsThe Game Boy hardware database is a community-created database of gameboy cartridges. It contains detailed information and photos of various cartridges and their internal components. There are 316 distinct Gameboy game entries, out of 1,049 DMG + 576 GBC games (1,625 total). There are many games missing, but I figure it should be a good enough sample that we should at least be able to discern some trends from the data. I grabbed a data dump, loaded it into sqlite3 and ran some queries over it to get some more information about what types of bank controllers were used over time. You can view the same dataset I used here, or grab the most up-to-date copy from here. The query I used counted how many distinct game titles used each MBC type by year. It gives a rough view of both the number of games released and the controller types used in those games each year.
Query: For the first 7 years, we really only see the MBC1 and MBC2 used. The MBC2 was used sparingly. In terms of ROM space, it had 1/8th the space of the MBC1 but 8x the space of just a ROM with no MBC. It also had 128 Bytes of RAM that was split into 4-byte chunks. It seems that it was the simplest MBC available to game developers, meant for games that required more storage than just a ROM chip, but didn’t need all the capabilities of MBC1. Between the different revisions of the MBC1, the MBC1B was used the most.
There are a few MBC1A entries, but they were only present in Japanese titles during the first two years of the gameboy.
The MBC1B probably fixed bugs present in the MBC1A, but I haven’t been able to find any concrete evidence describing what those issues might be, I’m just going of the naming scheme.
I think the difference between the MBC1B and MBC1B1 was less severe, possibly something to do with power consumption or speed since it is only a “minor version” improvement.
The MBC1B1 seemed to be used interchangeably with the normal MBC1B, as shown by the mapper type entries for
The MBC3 only started to be used in 1998, the same year the Gameboy Color was released. Before that point, we really only see games use an MBC1, MBC2, or no MBC at all. Once the MBC3 was released, it was used primarily for newer Gameboy Color games, but it also saw some use in games targeted for the Gameboy DMG, like Mary Kate and Ashley’s Pocket Planner. Similar to the MBC1, we can also see hardware lifecycle events for the MBC3 over the years it was used. It seems that the change from MBC3 -> MBC3A -> MBC3B was much more absolute than MBC1A -> MBC1B -> MBC1B1. After 1998, Nintendo seemed to transition fully to the MBC3A, as we don’t see any MBC3 entries; after 2000 we see the same trend with the MBC3A and MBC3B. The fact that we don’t see any use of a previous version in the year following the introduction of newer version leads me reason that the new versions fixed bugs in the hardware, instead of performance improvements like the MBC1B -> MBC1B1 update. When a new console is released, it usually takes a little while for game developers to start using it to it’s fullest potential. We are able to see that practice here with the MBC1 and MBC5 in the two years following each of their releases. In 1990, you can see an increase of use across the available MBC types: “None”, MBC1, and MBC2. Part of the growth in the year following the Gameboy DMG release can be contributed to the release dates of the Gameboy in April (JP), late July (USA), and late September (EU). I assume that by waiting until the year following the release, developers have a bit more time with the hardware and can apply more polish to their games. In 1991, we see a sharp drop off in games with just a ROM, and a large increase of MBC1 type games. From 1992 to 1995, all the games end up using an MBC. with MBC1B and MBC1B1 seeing the bulk of the action. There is a similar trend with the adoption of the MBC5 between 1998 and 2000. Between 1998 and 1999, there was a large drop in MBC1 use, and a humongous increase in MBC5. The MBC5 was a big improvement over the MBC1, and also had support for additional hardware additions to the cartridge. 1998 had about 50% of the games use a MBC1 style controller, with varied use across the other types. In 1999 however, there is a huge drop in MBC1 use and a large jump in MBC5 use. The MBC5 became available with the release of the Gameboy color (1998), and the sharp increase in use in 1999 and 2000 show how valuable the extra capabilities of the controller were. After 1999, we don’t see any more of the MBC1 and just a smattering of use of ROMs without an MBC. In 2001, the Gameboy Advance was released, and with it a completely new cartridge called the GamePak. The new cartridge was incompatible with the old type, primarily because the Gameboy Advance used an ARM processor instead of a Z-80 clone like the Gameboy DMG and CGB. This is the same reason the Nintendo DS is only able to play Advance games, nothing prior. The new cartridge had 24 address lines instead of 16, and the entire cartridge ROM was in the memory map presented to the game, removing the need for bank switching. You can read more about the GamePak cartridge here. With the release of the Gameboy Advance, we see a sharp decline in the number of titles released. Games were still released for the Gameboy Color up until 2003. Surprisingly, the last Gameboy DMG games were released in Japan in 2001, over a decade since the handheld was first released. The Cartridge HeaderWhen a cartridge is inserted into a Gameboy, it needs some way to communicate it’s hardware properties to the boot loader.
This is done through the cartridge header.
When preparing a game to be placed on a cartridge, a header is placed at the start of the ROM.
This header is present on all cartridges at addresses The cartridge header stores information like the first 16 characters of the game’s title ( The cartridge type is stored as a hex code at address
Given a cartridge ROM and this chart, it is very easy to find the cartridge type of a game by grabbing bytes at the right addresses.
If you have ROMs of games, you can peek these values using Cartridge HardwareIn this next section, I took pictures of most of my Gameboy games and recorded the different chips on the cart. They’ve been split into sections based on the MBC type the cartridge uses. For each game, there is a picture of the cartridge and the PCB. For webpage size reasons, there is a link below each image to the full size original. There is also a table below each game that notates the board and chip labels. The cases contain two bits of interesting info: the game ID and a case stamp.
The game ID is in the format The case stamp is a label imprinted on the label of the case consisting of two digits and a letter.
It can be hard to see in some cases, but I’ve done my best to record it here.
I’m not sure what it means, but I suspect it may have something to do with the cartridge manufacturing.
They follow the format Inside the cart, the PCB also has special marking on both the PCB itself and the ROM chip that contains the game code.
PCB board is in the format The ROM chips follow a similar format to the game cartridge, only leaving off the region code.
ROM chips use the format Now on to the pictures! No MBCAlleywayRelease: DMG-AW-USA Case Stamp: 05 Board Type: DMG-AAA-03 ROM Type: DMG-AWA-0
Dr. MarioRelease: DMG-VU-USA Case Stamp: 22 Board Type: DMG-AAA-03 ROM Type: DMG-VUA-0
TetrisCart 1Release: DMG-TR-USA Case Stamp: 23 A Board Type: DMG-AAA-03 ROM Type: DMG-TRA-1
Cart 2Release: DMG-TR-USA Case Stamp: 23 A Board Type: DMG-AAA-03 ROM Type: DMG-TRA-1
YakumanRelease: DMG-MJJ Case Stamp: 22 A Board Type: DMG-AAA-03 ROM Type: DMG-MJJ-1
MBC1BaseballRelease: DMG-BS-USA Case Stamp: 22 Board Type: DMG-BBA-02 ROM Type: DMG-BSA-0
FroggerRelease: DMG-AFGE-USA Case Stamp: 12 Board Type: DMG-BEAN-10 ROM Type: DMG-AFGE-0
Super Mario LandRelease: DMG-ML-USA Case Stamp: 23 A Board Type: DMG-BEAN-01 ROM Type: DMG-MLA-1
MBC3Pokemon Gold VersionRelease: GMD-AAUE-USA Case Stamp: 20 Board Type: DMG-KGDU-10 ROM Type: DMG-AAUE-0
Pokemon Silver Version USARelease: DMG-AAXE-USA Case Stamp: 13 Board Type: DMG-KGDU-10 ROM Type: DMG-AAXE-0
Pokemon Silver Version JPRelease: DMG-AAXJ-JPN Case Stamp: 12 A Board Type: DMG-KFDN-10 ROM Type: DMG-AAXJ-1
MBC5Monster Rancher Battle Card GBRelease: DMG-A6TE-USA Case Stamp: 00
ROM Type: DMG-A6TE-0
Pokemon PinballRelease: DMG-VPHE-USA Case Stamp: 22 Board Type: DMG-A04-01 ROM Type: DMG-VPHE-0
Further Reading
This site is a proud member of the geekring!
Check some other geeky websites here! Previous site -- Ring home -- Random site -- Next site | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| You are visitor 01402503 — GeezerVison does not store the pages you look up. Best viewed with Netscape Navigator 4.7 or Internet Explorer 6 at 800×600. No cookies required. |