The Nintendo Gameboy

The Nintendo GameBoy Color The GameBoy is a toy. Or is it?

I will be clear from day one: the GameBoy is a toy. And a pretty good one too. I never played with one until a few weeks ago, when I was at a family gathering. The kids left it for what it was. The moment I picked the damned thing up, I recognized that this machine has a lot more to offer than entertainment for adolescent fingers. So I started to dig something deeper into the world of the GameBoy...

After some websearching it became clear that the GameBoy is a damn fine gameconsole that allowed formidable abuse as a microcontroller. As you can see, the exterior of the GameBoy has:

  1. An attractive handheld case
  2. A crisp colour LCD of 160 x 144 pixels
  3. Full cursor keypad
  4. Two big general purpose push buttons for, say, Enter and Escape
  5. Two auxilliary (smaller) push buttons
  6. An acceptable speaker
  7. A headphone jack for stereo sound
  8. An expansion port
  9. A serial link cable
  10. A bidirectional infrared comm port
Now, this is quite good for any kind of controller you want to use. In fact, the Elektor magazine (see www.elektor-electronics.co.uk) made a fully functional digital storage scope (DSO) out of this small computer. In fact, they didn't make it. They bought the idea from a guy from the UK.


Under the hood.

Gameboy PCB Time to take a look inside. First you need to remove the screws. This looks a bit hard (three-wing screws) but if you take a small instruments screw driver and apply some force, you can turn the screws out quite easily. There are 6 screws; two are inside the battery compartment.

Now you can lift the back cover off to reveal the inside. Not much to see. Half of the inside is a white PCB plane, followed by the 32 pin ROM/expansion port and then the actual computing area. Which is what you see on the left.

From left to right we see the on/off switch, the 32 KB SRAM, CPU and crystal and then the audio volume control plus the datalink socket. Upper middle is the connector for the LCD and upper right is the IR circuitry. And that's just about it. The CPU is a high integration kind with lots of I/O ports on the die. The 256 byte bootstraploader is on this CPU.


The processor

Gameboy Z80 CPU The CPU is a stripped down version of the Zilog Z80A. It lacks a lot of instructions and some registers but it packs a lot of punch in a big (128 pin) package.

For microcontroller applications this reduction is no big deal. We don't need 23 registers. The usual 7 will do perfectly well. On the left we see the main trio again. The LH52256 is the 32 KB SRAM that is mapped to part of the upper 32 KB of the address space via bankswitching. Above it is the LCD controller and to the right we see our beloved Z80 clone.

I took the liberty to borrow some figures from related websites:


Game cartridges

Gameboy game cartridge On the left, you see a game cartridge. This one is from 'V-rally', a quite addictive game, if (or perhaps especially) you don't have a driver's license. It shows what's inside a typical Gameboy game cartridge. I'll be concise: not much. A ROM chip containing the actual game, plus an MBC controller.

The MBC is the Memory Bank Controller. Most ROM's are over 128 KB in size so there must be some kind of paging or bankswitching in order to map the big ROM space into the 16 bit memory map of the Z80 processor. That's where the MBC comes in. In a separate topic, I have traced all the signal lines in the cartridge and put them in tables for easier overview.

The parts we see in this picture are:


Page created December 2005,

Page equipped with googleBuster technology