Skip to content

topherCantrell/retro-GameBoy

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

57 Commits
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Nintendo Game Boy

Gameboy/GameboyColor homebrew development is nothing new. There are lots of tutorials on GB/GBC hacking (see the links below). This repo is a journal of my experience and any code I produced along the way.

Journal here: Journal

Building a Development Cartridge

Links

Nice, concise listing of registers and opcode changes: Tech info

Wikipedia

http://www.loirak.com/gameboy/gbprog.php

http://gbdev.gg8.se/wiki/articles/Main_Page

Javascript Emulator and Tutorial

Hardware Overview

The Gameboy hardware line is wonderfully backwards compatible. The Gameboy Advanced (GBA) has two cartridge slots: one for GBA games and one for old Gameboy/GameboyColor games you may own.

The Gameboy (GB) has a special Z80 processor with a few opcode differences. There is a boot ROM in the console that draws a splash screen and transfers control to any cartridge plugged in.

The GameboyColor (GBC) is the GB with additional hardware. The processor and memory layout is the same. GB games play fine on the GBC. The GB uses 4 AA batteries (6V). The GBC uses 2 AA batteries (3V) but has a power boot to crank 3V up to 5 to run the console and cartridge.

The cartridge connector is one-sided, 32 pins. The signals are power, ground, clock, read, write, chip-select, reset, audio, 16 address lines, and 8 data lines.

The Z80's address space is split nicely in half. The lower 32K (A15=0) is ROM space in the cartridge. The upper 32K (A15=1) is for hardware registers, system RAM, and an additional 8K RAM area in the cartridge.

Most cartridges include extra RAM (often battery-backed) and ROMs much larger than 32K. Nintendo used a line of bank-switching chips like MBC5 in each cartridge to select banks of RAM and ROM in the cartridge. I'll discuss the MBC more in the programming section below. The chip generates the upper address lines (A14 and up) from internal latches you twiddle by writing to the ROM address space.

Game Boy Advanced Development

I wrote code for the Game Boy Advanced years ago. See Circuit Cellar Magazine, February 2006. Back then I had a nice XPort cartridge to link my computer to the GBA. There was no hardware work involved -- just C++ and learning the hardware registers on the GBA.

About

Hardware and Software Development on the GBC

Topics

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published