GameBoy Emulation in JavaScript: Timers
25th Feb 2011
Like most computer and console systems, the GameBoy offers a hardware timer for use by games, if they wish to keep time more accurately than at the rate of vertical blanking refresh. In addition to a controllable timer, the GameBoy provides a facility for directly examining a fixed divisor of the system clock; in this article, both aspects of the timer are investigated, and the use of the timer for generating random numbers is also looked at, using the example of Tetris.
GameBoy Emulation in JavaScript: Memory Banking
3rd Dec 2010
Continuing a series on the implementation of a GameBoy emulator, this part looks at how the basic memory map of the GameBoy can be expanded, to accommodate games that are larger than 32kB. The GameBoy uses a system of virtual memory banking to perform this expansion; the concepts of the banking controller are looked at, and an implementation offered.
GameBoy Emulation in JavaScript: Interrupts
5th Nov 2010
Game consoles, like all computers, offer the facility to break off execution of a program and handle events or triggers. The GameBoy is no exception, and most games utilise the vertical blanking interrupt as one of their primary tools for keeping time and refreshing the screen. In part 8 of the series on emulator development, I look at the concepts behind, and the implementation of interrupts.
GameBoy Emulation in JavaScript: Sprites
10th Oct 2010
The basis of most games is the movement of objects over a background landscape. In this part of the series on emulation development, I take a look at how the GameBoy produces movable objects, and how the process can be emulated in JavaScript.
GameBoy Emulation in JavaScript: Input
19th Sep 2010
Part six of the series examines the issue of how a player interacts with the GameBoy, taking a look at the hardware layout of the keypad, and how the layout can be implemented as part of an emulator. The particular issues thrown up by a JavaScript emulation are looked at, including basic event handling and how events can be passed to the keypad handler.
GameBoy Emulation in JavaScript: Integration
5th Sep 2010
In the fifth part of the series, the graphics subsystem of the GameBoy emulator is tied to the memory handler, and a rudimentary interface provided for the activation of the emulator. This part includes a working demo of the emulator so far, as will subsequent parts.
GameBoy Emulation in JavaScript: Graphics
25th Aug 2010
The exploration of system emulation in JavaScript continues, with a detailed look at the GameBoy graphics system, and how graphics are rendered by the GameBoy hardware; a simulation of the process is then put in place for use by the wider graphics engine.
GameBoy Emulation in JavaScript: GPU Timings
14th Aug 2010
In the third part of a series regarding system emulation in JavaScript, the GameBoy as an example of a raster graphics system is looked at, and the timings established for passing of control between CPU and graphics. Also examined is the issue of where the emulated graphics code will be rendering its output, and the HTML5 canvas is introduced as a solution.
GameBoy Emulation in JavaScript: Memory
2nd Aug 2010
Continuing a series examining system emulation in JavaScript, this article examines how the GameBoy memories are mapped onto the CPU's address bus, and how such a mapping can be emulated. Also covered is the dynamic loading of program ROM images after initialisation, through asynchronous file requests.
GameBoy Emulation in JavaScript: The CPU
22nd Jul 2010
JavaScript is often perceived as a Web scripting language, with a specialist purpose of manipulating HTML pages. JavaScript is, however, a general-purpose Turing-complete language: the best way to illustrate this is to emulate another system through JavaScript. In the first of a series of articles, I'll look at how a CPU can be emulated through JS, and start building an emulation core for the GameBoy console.
Get the RSS feed