Home

Awesome

Gameboy

Full-featured Cross-platform GameBoy emulator. Forever boys!

sample.gif

You can start a game with the following command. The following example uses the built-in game "SUPER MARIOLAND":

$ cargo run --release -- "./res/sml.gb"

The following options are supported:

-a, --enable-audio    Enable audio, default is false
-x, --scale-factor    Scale the video by a factor of 1, 2, 4, or 8

Gameboy is developed in Rust and has been thoroughly tested on Windows, Ubuntu, and Mac.

Dependencies

This project depends on the following Rust libraries, which have native dependencies:

You may need to install the native dependencies these libraries require before running this emulator.

For Ubuntu Linux, you can run:

sudo apt install libasound2-dev # Install CPAL dependencies
sudo apt install libxkbcommon-dev libwayland-cursor0 libwayland-dev # Install MiniFB dependencies

For Windows, you should install Microsoft C++ Build Tools.

Controls

                _n_________________
                |_|_______________|_|
                |  ,-------------.  |
                | |  .---------.  | |
                | |  |         |  | |
                | |  |         |  | |
                | |  |         |  | |
                | |  |         |  | |
                | |  `---------'  | |
                | `---------------' |
                |   _ GAME BOY      |
   Up           | _| |_         ,-. | ----> Z
Left/Right <--- ||_ O _|   ,-. "._,"|
  Down          |  |_|    "._,"   A | ----> X
                |    _  _    B      |
                |   // //           |
                |  // //    \\\\\\  | ----> Enter/BackSpace
                |  `  `      \\\\\\ ,
                |________...______,"

Tests

Thanks to Blargg's Gameboy hardware test ROMs, I can easily verify my code. Run tests with the command:

$ cargo run --example blargg
Test NameResult
cpu_instrsimg
instr_timingimg

References

Licenses

MIT.