Giter Site home page Giter Site logo

goomba's Introduction

Goomba

Goomba is a GameBoy emulator written in Rust.

Try it at https://teskje.github.io/goomba!

Usage

Goomba can run natively on desktop platforms and inside the browser.

Desktop

You can run Goomba natively using the cargo run command. It expects you to specify the path to a ROM (.gb) file:

$ cargo run --release -- roms/zelda.gb 

This opens a window showing the GameBoy display.

Goomba desktop UI

Controls are:

Joypad Button Keyboard Key
Up Arrow Up
Down Arrow Down
Left Arrow Left
Right Arrow Right
A x
B z
Start Enter
Select Backspace

Upon quitting the emulator, a dialog opens that allows you to save the current cartridge RAM. Saving the RAM is necessary to be able to continue playing from in-game save points. To do so, specify the .gb-ram file as an additional argument to the cargo run command:

$ cargo run --release -- roms/zelda.gb --ram-path roms/zelda.gb-ram

You can also save a snapshot of the game by pressing ctrl-s. This opens a dialog that lets you save a .gb-save file, which can be used to later load the same game state again:

$ cargo run --release -- roms/zelda.gb-save

Note that .gb-save files are generally not compatible across different code versions.

Browser

To run Goomba in the browser, you need to first install the web bundler trunk. Then run it to serve Goomba locally:

$ trunk serve --release web/index.html
[...]
2023-05-21T14:03:06.846895Z  INFO โœ… success
2023-05-21T14:03:06.847740Z  INFO ๐Ÿ“ก serving static assets at -> /
2023-05-21T14:03:06.847797Z  INFO ๐Ÿ“ก server listening at http://127.0.0.1:8080

At http://127.0.0.1:8080 you are now presented with Goomba's web UI.

Goomba web UI

Use the leftmost menu button to load a ROM to play. The keyboard controls are the same as for desktop. On mobile devices that don't have a keyboard, you can control the game using the joypad instead.

You can save the cartridge RAM using the "save" button in the menu. The resulting .gb-ram file can be provided when you next load the game through the "load" button. Be sure the select both the .gb and the .gb-ram file in the file dialog.

TODOs

  • Audio emulation
  • GameBoy Color support

goomba's People

Contributors

teskje avatar

Watchers

 avatar

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.