Emulating The Core, Part 2: Interrupts and Timing

After having emulated and studied the first part of ‘the core’, we now study in detail the second part of what is found in every computer system emulator.  This happens immediately after executing every instruction: First, we must check if any interrupt has occurred.  Second, we must take into account the duration of the instruction just executed, and update the machine’s status accordingly.  After studying this ubiquitous part of the emulator, we will have a firm understanding of the basics of emulating (via interpretation) a computer system.  Of course, for an emulator to be usable this isn’t enough; many more things, some of them not directly related to emulation (for example the user interface), must be done in order to have a complete and functional emulator.

Continue reading

Emulating The Core, Part 1: The Fetch-Decode-Execute Cycle

In previous posts we have attempted to give an integral overview of the Nintendo Game Boy console.  We have discussed considerably its various subsystems and tried to show how they interact to make the whole Game Boy experience possible[1].  We have, additionally, studied the Game Boy’s bootstrap ROM; a 256 byte program responsible for starting up the console upon power on.  With this background, therefore, we have gained knowledge about the way the Game Boy behaves, and how it get things done.  It is about time to begin with the actual emulation of the Nintendo Game Boy system.

Continue reading

A Look At The Game Boy Bootstrap: Let The Fun Begin!


Let us study the Game Boy’s bootstrap.  Every time the console is turned on, this special, 256-byte program, is mapped to the beginning of the Game Boy’s Address Space, the Program Counter Register (‘PC’) is set to 0x0000 and the ‘real stuff’ begins.

Booting the Game Boy with the RealBoy Emulator

Continue reading

The Nintendo® Game Boy™, Part 3: The Rest of the Hardware


Having reviewed the Game Boy’s hybrid CPU, it’s time to take a look at the rest of the hardware that compose this beautiful console, and that we have to emulate.  The CPU, though arguably the most important part of the whole system, would undoubtedly be plain useless if not played along with the rest of the symphony.

Continue reading

The Nintendo® Game Boy™, Part 2: The Game Boy’s CPU


Having looked at the foundations for the Game Boy’s hybrid CPU, let us see just what did and what didn’t make it from the Intel 8080 and the Zilog Z80 into the SHARP LR35902.

Continue reading

The Nintendo® Game Boy™, Part 1: The Intel 8080 and the Zilog Z80.


The Game Boy’s CPU is a hybrid between the Intel 8080 and the Zilog Z80. In this post we’ll  investigate the foundations of this custom microprocessor.

Continue reading