Skip to content


Subversion checkout URL

You can clone with
Download ZIP
Javascript Gameboy
JavaScript Ruby
Fetching latest commit...
Cannot retrieve the latest commit at this time.
Failed to load latest commit information.


An emulator for the Gameboy and Gameboy Color written in Javascript.

Nowhere close to working yet and is very much a work in progress. Will keep notes here as necessary


You can view a live demo at



You need:

  • ruby
  • the bundler gem
    • Or the gems listed in the Gemfile
  • a closure command for the google closure compiler
    • If on a mac using homebrew, you can install via brew install closure-compiler
    • This isn't needed if you're not building minified javascript

Then, run bundle in the checked out directory

Running roms

First, make sure the server is running via thor server or ruby test/server.rb. Then visit http://localhost:4567/roms and the roms will be available for playing.

Running Tests

Run the thor server command and then visit http://localhost:4567 in a web browser to run all of the tests

Before you run the tests, make sure that you regenerate generated files (see below).

If you have the livereload extension, you can connect to the livereload server (run through thor) and the page will be automatically refreshed whenever a file changes

Regenerating files

To optimize slightly, the z80 instruction set is a generated javascript file. To change this, modify one of:

  • src/z80/templates/
  • lib/jba/generator.rb

The ruby file has the meat of the generation. After modifying the files, file can be regenerated by running

thor jba:gen_z80

Or, if you would like the file automatically regenerated when the above files are modified, you can run


in the root directory

Generating jba.min.js

To generate the minified form of the javascript (for the main reason of having all of the javascript in one file), run

thor jba:minify
Something went wrong with that request. Please try again.