Code Monkey home page Code Monkey logo

rustboyadvance-ng's Introduction

RustBoyAdvance-NG

license Build

Nintendo GameBoy Advance ™ emulator and debugger, written in rust.

WebAssembly Demo: https://michelhe.github.io/rustboyadvance-ng/ Deploy

Project Structure

  • core/ - Main emulator crate that ties everything together
  • arm7tdmi/ - Emulation of the Arm7tdmi processor.
  • platform/ - Constains executables & application built with rustboyadvance-core
    • platform/rustbodyadvance-wasm - Web emulator powered by WebAssembly
    • platform/rustbodyadvance-sdl2 - Desktop application built with sdl2
    • platform/rustbodyadvance-minifb - Desktop application built with minifb, not maintained.
    • platform/rustbodyadvance-jni - Java JNI binidngs for the emulator.
    • platform/android - A PoC Android application.

Progress

Pokemon Emerald

Emulation Todo:

  • CGB audio (4 wave generator channels)

Build and usage (Desktop Application)

To get started, you need to get a stable rust toolchain of version Rust 1.51 or later,

Linux build dependencies

Install SDL2 dependencies

sudo apt-get -y install libsdl2-dev libsdl2-image-dev

Windows build dependencies

SDL2 runtime binaries are included in this repository, no extra setup needed.

Build & Usage

You need to obtain a gba bios binary. An open source GBA bios is also available and supported.

Place the bios file in the repository root and name it gba_bios.bin (or alternatively use the -b command line option)

Build and run in release mode (performance is terrible in the dev profile)

$ cargo run --release -- path/to/rom

You can also drag&drop rom files or any zip files containing .gba files inside into the emulator window and a new rom will be loaded.

Key bindings

Currently the key bindings are not configureable.

GBA key bindings:

Keyboard GBA
Up Up
Down Down
Left Right
Right Right
Z B Button
X A Button
Return Start
Backspace Select
A L
S R

Special key bindings

Key Function
Space (hold) Disable 60fps cap
F1 Custom debugger (requires --features debugger)
F2 Spawn gdbserver (experimetnal, requires --features gdb)
F5 Save snapshot file
F9 Load snapshot file

Android Application

The android project is placed inside platform/android. To build it, open it with Android Studio.

You also need to set up rust to build android targets with NDK.

TODO - instructions

More Screenshots

Kirby - Nightmare in Dreamland Dragon Ball - Legacy of Goku 2

Links and attribution

  • ARM7TDMI Technical Reference Manual Technical Reference Manuals are fun.
  • GBATEK A single webpage written by no$gba developer Martin Korth. This page has pretty much everything. Seriously, it's the best.
  • TONC A comprehensive GBA dev guide that I used a-lot in order to understand the GBA system. Comes with neat demo roms that really helped me during development and debugging.
  • NanoboyAdvance A GameBoy Advance emulator written in C++17 by a nice person called fleroviux. I've used this for debugging.
  • Eggvance gba-suite Incredible test suite for the arm7tdmi interpreter that I'm using, written by Julian Smolka.

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.