Nintendo Gameboy Cribsheet

gb_cribsheet_colour_screenshot.jpg The Gameboy Crib Sheet was put together to fill a very large need. All of the information concerning hardware registers, Z80 op-codes, memory organisation, DMA timings and lots of other details covering the Nintendo Gameboy & Nintendo Gameboy Colour are spread out across hundreds of e-mail messages, three books and many good, but usually incomplete documents found on the Internet.

I wanted a single reference that could jog my failing memory when I didn’t have time to go looking through a large text file for a vague, often inaccurate, piece of information. I also didn’t want a 600 page “black book” about how to program the Gameboy but started off telling me how to open up a file in a text editor or what a hex editor was used for. So the Cribsheet came about, as much information condensed in to as few pages as possible, no explanations, no clarifications, no instructions. If you don’t understand something, look elsewhere. This is information for the hardcore who already knew everything there was to know about the machine and just needed to be reminded every now and again. The Cribsheet also had to be handy. It had to reside on the desk next to the computer, ready to do it’s job. When I needed it. Not when it was convenient for me to take a break and turn away from what I was working on to thumb through a reference. I judge the usefulness of a computer book by the number of coffee or Coca-Cola stains it has on it. Beverages by the computer always end up on whatever you happen to be reading. The Cribsheet had to be that kind of information. I’ve printed it out over a dozen times since it first began — not including testing where I was judging how small I could get the font before it became painful to read — because the pages are used so often they keep wearing out. The Gameboy Cribsheet consists of several pages of densely packed details. Almost everything you need to know about the Colour Gameboy is there. zilog_z80_cpu.jpg

FEATURES

 

  • List of Gameboy Z80 op-codes with timings & sizes
  • Z80 registers & flags
  • Visual description of shift & rotate operations
  • Code for 8-bit unsigned compares
  • Two’s complement table
  • Powers of two table
  • Hex to Decimal/Decimal to Hex conversion table
  • Hex to Binary/Binary to Hex conversion table
  • ASCII character set
  • Gameboy interrupts
  • Complete list of known Gameboy registers
  • Code for handling VRAM
  • Cartridge header information — RAM sizes, ROM sizes up to 64MBit, MBC types & features
  • Video timings
  • Miscellaneous Gameboy timings
  • Memory Map
  • OAM RAM ordering (v0.7)
  • MBC3 registers (v0.8)
  • MBC5/Rumble Pak registers (v0.8)
  • RGB colour format (v0.9)
  • Attribute fields for VRAM tiles (v0.9)
  • Sound tone tables (v0.9)
  • Complete Gameboy Z80 variant op-code list with hex values (v1.0)
  • Built-in colour palette combinations (v1.0)
  • Gameboy unit identification (v1.0)
  • Memory map (v1.0)
  • Now in colour (v1.0)
  • Z80 code for 16-bit unsigned/signed compare operations (v1.1)
  • Clocks per HBL (v1.1)
  • Clocks per VBL (v1.1)
  • Op-code table sorted on op-code hex value (v1.1)
  • Clocks per frame (v1.1)
  • Clocks @ 1x & 2x CPU speed (v1.1)

ADDITIONAL INFO

 

nintendo_gameboy_pocket.gif

THINGS TO ADD

  • Z80 code for 8-bit signed compare operations
  • Meaning of GB/DMG/GBC flags at $143
  • List of all known manufacturers
  • Tile map layout for bank 0 & 1 (showing attributes & indices)
  • Tile data layout for bank 0 & 1 (showing format of bytes and addresses & indices)
  • OAM DMA register explanation
  • HDMA register explanation
  • GDMA register explanation
  • Source code for switching CPU speed
  • Joypad layout
  • Link-port pinouts
  • Gameboy Block Diagram
  • Catridge pinouts

KNOWN BUGS

  • External RAM Size Table is probably incorrect
  • Explanation of $146 is probably incorrect
  • Explanation of $143 needs to be clarified
  • VRAM Memory Map should say “Tiles 00-7F”
  • Source & Destination address should be 16-byte aligned in “DMA precautions”
  • DMA size is given for HDMA’s, make note about the high bit

FIXED BUGS

  • SWAP instruction is not described (v1.1)
  • SCX/SCY register explanation is round the wrong way (v1.1)
  • LD HL,(SP+e8) instruction is listed incorrectly (v1.1)
  • PUSH/POP instructions are only 1 byte (v1.1)
  • $9C00/$9800/$8000 should say “Bank Switched” in the “Memory Map” (v1.1)
  • $FF80 should say “Zero Page RAM” in the “Memory Map” (v1.1)
  • $E000 should say “Echo RAM — Not usable” in the “Memory Map” (v1.1)

DOWNLOAD

 

gb_cribsheet_screenshot.jpg

The Gameboy Cribsheet is designed specifically for printing on high quality laser or inkjet printers. It was never designed to be viewed on-screen.

 

To obtain the best results from printing make sure you use the best quality paper you can obtain that has minimum bleeding. “High Gloss” is a good choice but you must be sure to remove the sheet from the printer the moment it has finished printing and allow it to dry for several minutes to prevent smudging.

 

The Gameboy Cribsheet is only available in Adobe PDF format and most likely never will be converted to HTML, so don’t ask.

 

Download the latest colour version of the Gameboy Cribsheet (v1.1)

 

Download the black & white Gameboy Cribsheet (v1.0)

 

 

— Justin Lloyd

Leave a Reply