Find a file
2020-05-16 13:12:41 +10:00
.github/workflows adjust formatting 2020-05-16 13:07:30 +10:00
bin init commit 2016-05-08 17:20:05 +10:00
documentation added keymap image 2016-09-01 21:04:46 +10:00
exe init commit 2016-05-08 17:20:05 +10:00
lib Merge pull request #6 from eregon/initialize-cpu-ivars 2020-05-12 22:51:08 +10:00
spec fix incorrect behavior being tested on MBC1 read disabled memory 2016-09-26 23:03:50 +10:00
.gitignore init commit 2016-05-08 17:20:05 +10:00
.rspec init commit 2016-05-08 17:20:05 +10:00
.ruby-version Bump Ruby and dependencies versions 2020-05-09 00:50:49 +03:00
CODE_OF_CONDUCT.md init commit 2016-05-08 17:20:05 +10:00
Gemfile Move development dependencies to Gemfile 2020-05-12 14:56:25 +02:00
Guardfile init commit 2016-05-08 17:20:05 +10:00
Rakefile init commit 2016-05-08 17:20:05 +10:00
README.md Bump Ruby and dependencies versions 2020-05-09 00:50:49 +03:00
waterfoul.gemspec Move development dependencies to Gemfile 2020-05-12 14:56:25 +02:00

Waterfoul

Waterfoul is a Gameboy emulator written in Ruby-lang. It is a casual excersize by myself to learn the internals of the device and how it works.

Getting Started

To start the emulator:

bundle exec exe/waterfoul start <path to rom>

Make sure to bundle install first and install required libraries.

By default the emulator will run the boot rom, if you wish to skip it then add --skip-boot as an option.

Try turning on the --jit and --enable-frozen-string-literal to get max fps

RUBYOPT="--enable-frozen-string-literal --jit --jit-max-cache=100000 --jit-min-calls=3" bundle exec exe/waterfoul start <path to rom>

Requirements

The sdl2 library is currenty used to render pixels. Most platforms have packages avaliable, else see here. This library is required and needs to be installed before you can run the emulator.

Can it play roms?

Yes! but the list of roms that i know work is very limited to just Tetris, Super Mario Land and Pokemon Red. But a lot of work is being put into making other games compatable. The device does run the internal boot program succesfully and is passing test programs sucesfully (barggs).

Controls

The following shows the mapped keys to control the game. gameboy key mapping

Testing

If you wish to run the test suite, download the source code (make sure to run bundle install) and run bundle exec rspec