Skip to content

Latest commit

 

History

History
91 lines (67 loc) · 2.92 KB

README.md

File metadata and controls

91 lines (67 loc) · 2.92 KB

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 Name Result
cpu_instrs img
instr_timing img

References

Licenses

MIT.