Skip to content
This repository has been archived by the owner on Aug 19, 2023. It is now read-only.


Folders and files

Last commit message
Last commit date

Latest commit


Repository files navigation

gba-plusplus has been replaced by gba-hpp!

Go to gba-hpp (


Documentation Status

Code samples and tutorials available on the project Wiki.

Modern drop-in C++ library for the Game Boy Advance. Zlib license.

Feel free to ask for help on the gbadev Discord.

For a CMake GBA development toolchain see our sister project: gba-toolchain.


#include <gba/gba.hpp>

using namespace gba;

using video_memory_type = std::array<std::array<uint16, 240>, 160>;

static auto& video_memory = *reinterpret_cast<video_memory_type *>( 0x06000000 );

struct bgr555_type {
    uint16 red : 5;
    uint16 green : 5;
    uint16 blue : 5;

int main() {
    reg::dispcnt::write( { .mode = 3, .layer_background_2 = true } );
    video_memory[80][120] = uint_cast( bgr555_type { .red = 31 } );
    video_memory[80][136] = uint_cast( bgr555_type { .green = 31 } );
    video_memory[96][120] = uint_cast( bgr555_type { .blue = 31 } );
    while ( true ) {}


gba-plusplus is a light-weight C++ abstraction of the Game Boy Advance hardware.

  • Hardware tested
  • Assembler inspected
  • Optimized for -Og and -O3
  • C++17
  • Both GCC and Clang compatible
  • Compatible with Tonclib and libgba

NOT a game engine

We make close-to-zero assumptions about the type of GBA game you are making.

Zero tools

We do not restrict you to use any particular file formats or force you to use any additional tools.


The API is verbose and hides as little as possible.

Register names match the familiar documentation.

We respect the programmer, the code you write to shoot yourself in the foot will read like code that is shooting you in the foot.


The gba/ext/ headers provide features outside of the core GBA hardware.

Some of these may depend on external libraries, such as agbabi.


We welcome all forms of feedback in the form of GitHub issues. The API will change when necessary, but don't worry all releases will be archived.


C++ library for writing Game Boy Advance apps and games







No packages published