Go to file
2022-07-25 22:49:18 +01:00
.github Use more generic versions to stop renovate from triggering so often 2022-07-14 22:58:32 +01:00
.vscode move launch.json to parent 2021-05-20 07:25:51 +01:00
agb agb_start_tests can now be doc(hidden) 2022-07-25 22:49:18 +01:00
agb-fixnum Make the num macro work if you don't depend on agb_macros yourself 2022-07-16 18:02:55 +01:00
agb-image-converter align sprite data to 2 byte boundaries 2022-07-16 13:36:33 +01:00
agb-macros Remove the need for a special test implementation 2022-07-25 22:49:17 +01:00
agb-sound-converter Add repository to Cargo.toml files 2022-07-14 21:49:53 +01:00
book Update lockfiles 2022-07-13 06:00:40 +00:00
examples Remove the need for a special test implementation 2022-07-25 22:49:17 +01:00
mgba-test-runner Update lockfiles 2022-07-13 06:00:40 +00:00
template Flesh out the readme a little more 2022-06-19 13:50:34 +01:00
.gitignore Delete library cargo.locks 2022-03-12 23:39:58 +00:00
justfile add build hyperspace 2022-07-25 20:25:56 +01:00
LICENSE add project wide MPLv2 license 2021-05-29 15:22:19 +01:00
logo-original.png Add logo to repo and readme 2021-07-05 23:56:43 +01:00
README.md Flesh out the readme a little more 2022-06-19 13:50:34 +01:00
release.sh Run just ci as a check and replace maybe_git add with commit -am 2022-07-03 18:20:14 +01:00

AGBRS

Rust for the Game Boy Advance

AGB logo

This is a library for making games on the Game Boy Advance using the Rust programming language. It attempts to be a high level abstraction over the internal workings of the Game Boy Advance whilst still being high performance and memory efficient.

AGBRS provides the following features:

  • Simple build process with minimal dependencies
  • Built in importing of sprites, backgrounds, music and sound effects
  • High performance audio mixer
  • Simple sprite and tiled background usage
  • Global allocator allowing for use of both core and alloc

The documentation for the latest release can be found on docs.rs.

Getting started

The best way to get started with agb is to use the template, either within the template directory in this repository or cloning the template repository.

Once you have done this, you will find further instructions within the README in the template.

There is an (in progress) tutorial which you can find on the project website.

Contributing to agb itself

In order to contribute to agb itself, you will need a few extra tools on top of what you would need to just write games for the Game Boy Advance using this library:

  • Recent rustup, see the rust website for instructions for your operating system.
    • You can update rustup with rustup update, or using your package manager if you obtained rustup in this way.
  • arm eabi binutils
    • Debian and derivatives: sudo apt install binutils-arm-none-eabi
    • Arch Linux and derivatives: pacman -S arm-none-eabi-binutils
    • Windows can apparently use the GNU Arm Embedded Toolchain. Make sure to select "Add path to environment variable" during the install.
    • This process has only been tested on Ubuntu and Arch Linux.
  • libelf and cmake
    • Debian and derivatives: sudo apt install libelf-dev cmake
    • Arch Linux and derivatives: pacman -S libelf cmake
  • mgba-test-runner
    • Run cargo install --path mgba-test-runner inside this directory
  • The 'just' build tool
    • Install with cargo install just
  • mdbook
    • Install with cargo install mdbook
  • gbafix
    • Install with cargo install gbafix

With all of this installed, you should be able to run a full build of agbrs using by running

just ci

Note that before you create a PR, please file an issue so we can discuss what you are looking to change.

Structure of the repo

agb-fixnum - a simple fixed point number storage since the GBA doesn't have a floating point unit, so required for performant decimals.

agb-image-converter - a crate which converts images in normal formats to a format supported by the game boy advance

agb-macros - miscellaneous proc-macros which have to be in a different crate

agb-sound-converter - a crate which converts wav files into a format supported by the game boy advance

agb - the main library code

agb/examples - basic examples often targeting 1 feature, you can run these using just run-example <example-name>

book - the source for the tutorial and website

book/games - games made as part of the tutorial

examples - bigger examples of a complete game, made during game jams

mgba-test-runner - a wrapper around the mgba emulator which allows us to write unit tests in rust

template - the source for the template repository

Stability

While in 0.x releases, we are following a semi-semantic versioning. So 0.x.y will be compatible with 0.x.z provided that y > z, but any changes to the minor version will be incompatible with one another.

Once we hit version 1.0, we will maintain stronger semantic versioning.

Acknowledgments

AGBRS would not be possible without the help from the following (non-exhaustive) list of projects:

  • The amazing work of the rust-console for making this all possible in the first place
  • The asefile crate for loading aseprite files
  • agbabi for providing high performance alternatives to common methods
  • mgba for all the useful debugging / developer tools built in to the emulator

Licence

AGBRS and all its subcrates are released under MPL version 2.0. See full licence text in the LICENSE file.

AGBRS contains a subset of the code from agbabi which is released under a zlib style licence, details for which you can find under agb/src/agbabi.

The template is released under CC0 to allow you to make whatever changes you wish.

The AGBRS logo is released under Creative Commons Attribution-ShareAlike 4.0

The music used for the examples is by Josh Woodward and released under Creative Commons Attribution 4.0