Home

Awesome

JBA

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

Demo

You can view a live demo at http://alexcrichton.com/jba/

Development

Prerequisites

You need:

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:

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

<pre>thor jba:gen_z80</pre>

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

<pre>guard</pre>

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

<pre>thor jba:minify</pre>