Gameboy emulators in Javascript!

It’s often stated that JavaScript is a special-purpose language, designed for use by web sites to enable dynamic interaction. However, JavaScript is a full object-oriented programming language, and is used in arenas besides the Web: the Widgets available for recent versions of Windows and Apple’s Mac OS are implemented in JavaScript, as is the GUI for the Mozilla application suite.

With the recent introduction of the <canvas> tag to HTML, the question arises as to whether a JavaScript program is capable of emulating a system, much like desktop applications are available to emulate the Commodore 64, GameBoy Advance and other gaming consoles. The simplest way of checking whether this is viable is, of course, to write such an emulator in JavaScript.

This article sets out to implement the basis for a GameBoy emulation, by laying the groundwork for emulating each part of the physical machine. The starting point is the CPU.

This project by Imran Nazar aims to emulate a full Gameboy in Javascript using Canvas, while documenting the process.

The source code is available at his github repository, but for your convenience, there’s also an instance here that you can try out. Try replacing “” with “” for a different demo.

However, the idea isn’t new. The similarly named JSGB by Pedro Ladaria, which existed a year ago. The emulator can be tried out at that URL above. I have yet to extensively compare the two in terms of speed and functionality.

And unless my memory fails me, both of them were preceded by a much more primitive GB emulator/debugger written in Javascript which didn’t emulate graphics and only allowed you to single-step the code, that existed several years ago. Does anyone know what I’m talking about and what happened to it, if it even existed?

Monday, August 9th, 2010 Emulators, Links & info

1 Comment to Gameboy emulators in Javascript!

  1. [...] well documented. With the advent of faster Javascript interpreters and Canvas, it now seems like Gameboy emulators made in Javascript is an emerging [...]

  2. Yet another Gameboy emulator written in Javascript | Gameboy Development on September 15th, 2010

Leave a comment

Powered by WP Hashcash