GBRuby is another Game Boy emulator, written in ruby. No ambitions to become the better emulator ever, it's just a side project made for fun. Despite all it aims to run more games as possible at a decent fps and pass all the common tests.
Ruby is slow and not a good choice for an emulator. The challenge is to write something good enough to play games and check if it is possible to run it at 60 fps (spoiler: yes)
- Cycle accurate CPU
- Scanline accurate PPU
- Resizable window with full screen support
There are no automated tests yet, but GBRuby pass some common tests ROM. I will add more and more.
DMG Acid2 | Blargg‘s CPU Tests |
- Boot sequence
- Add automated testing using Github Actions.
- Support to cartridge type other than MBC1.
- Optimizations to reach constant 60 FPS with every game.
- Command line interface.
- Configuration file.
- Sound support.
- Game Boy Color support.
- Ruby 3
- SDL 2
$ brew install sdl2
$ brew install sdl2_image
$ brew install sdl2_mixer
$ brew install sdl2_ttf
Initialize the Game Boy, choose a cartridge, load it, and play!
$ game_boy = GameBoy.new
$ cartridge = Cartridge.new('roms/tetris.gb')
$ game_boy.load_cartridge(cartridge)
$ game_boy.play(boot: false)