I always wanted to learn about the internals of a video game console and I felt that the best way to learn was to try to emulate one. I chose to emulate the original Nintendo Game Boy because I was familiar with the CPU—a variant of the Zilog Z80—from a college course and because as an early handheld gaming system, it has a relatively simple architecture.
There are several excellent Game Boy emulators out there. My emulator doesn’t come close. It doesn’t support sound, it only accepts keyboard input and the timing and performance are way off. Not to mention that many games fail to run accurately if at all. Again, it was written as a learning exercise, but it kind of works. Take a peek below.
The emulator was written in C# 3.5. Feel free to hack up the source:
As I mentioned above, I got interested in creating an emulator after taking a microprocessor course that covered the Z80. Aside from the Game Boy, the Z80 served as the heart of many classic coin-operated arcade games such as Pac-Man and Galaga. It was later used in ColecoVision, Sega Master System and Sega Game Gear. It was the CPU of the Radio Shack TRS-80 and the ZX Spectrum computers. It can still be found in the Texas Instruments (TI) series of graphing calculators and hundreds of other applications.
They still publish books—like this one here—about this antiquated technology, which was state of the art in 1976. There is plenty of information about the Z80 online. Here’s an introduction to the Z80 instruction set written by James Moxham for his ZINT Z80 Interpreter:
Here’s a page containing links to dozens of Z80 docs:
The CPU of the Game Boy is actually a custom processor created by the Sharp Corporation that falls somewhere in between the Z80 and the Intel 8080. The link below discusses the differences in detail:
That page offers links to 2 other documents that discuss Game Boy architecture in detail:
Click here for a mirror of the Game Boy architecture information in pdf format.
Here are 2 more pdf files about Game Boy internals:
Below are a bunch of links that discuss the topic of writing emulators:
Here’s a free eBook about programming the Nintendo Game Boy Advance:
Unfortunately, you will not find links to Game Boy ROM files on this page. Games are the intellectual property of their respective owners as noted by the copyright messages on their title screens such as those on the screenshots above. Nonetheless, Google might be able to point you in the right direction.
As for console emulation in general, I still prefer to play the original cartridges on the original hardware. It has nothing to do with the illegality of pirating ROM files. Rather, I like to see and hear games the way the game writers intended it. Touching a real controller adds to the fun. Emulators come pretty close, but they can’t beat the true hardware experience.