Giter Club home page Giter Club logo

gbruby's Introduction

GBRuby

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.

Why Ruby?

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)

Features

  • Cycle accurate CPU
  • Scanline accurate PPU
  • Resizable window with full screen support

Screenshots from various games

 Tetris  Tetris
 Zelda  Zelda

Tests

There are no automated tests yet, but GBRuby pass some common tests ROM. I will add more and more.

 DMG Acid 2  Blargg‘s CPU Tests
DMG Acid2 Blargg‘s CPU Tests

Roadmap

  • 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.

Requirements

  • Ruby 3
  • SDL 2

Install SDL2 on macos

$ brew install sdl2
$ brew install sdl2_image
$ brew install sdl2_mixer
$ brew install sdl2_ttf

How to use it?

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)

Resources

Similar and inspirational ruby projects

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.