Skip to content

LinoBigatti/APIagb

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

69 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

APIagb

A library to manage the GBA hardware, built with C and with compatibility with C, C++ and Assembly.

forthebadge

Getting Started

Follow these instructions to build the library and the various demos.

Prerequisites

Install GNU make:

sudo apt-get install build-essential

Read this guide to install DevkitARM.

Building the library.

First, go to the directory where you downloaded the library:

cd /path/to/lib/

And then build the library:

make APIagb

Or:

make lib

If you see a file named libAPIagb.a, then the build was succesfull.

You can run make to see the list of demos.

Building the demos.

Mode3Demo

This demo shows the line, circle, frame and rectangle drawing algorithms for mode 3. You can build it like this:

make Mode3Demo

Mode3ImageDemo

This demo shows the image copying routine for mode 3. You can build it like this:

make Mode3ImageDemo

Mode4Demo

This demo shows the line, circle, frame and rectangle drawing algorithms for mode 4, and the mode 4 page flip handler. You can build it like this:

make Mode4Demo

Mode4ImageDemo

This demo shows the image and palette copying routines for mode 4, and the mode 4 page flip handler. You can build it like this:

make Mode4ImageDemo

Mode5Demo

This demo shows the line, circle, frame and rectangle drawing algorithms for mode 5, and the mode 5 page flip handler. You can build it like this:

make Mode5Demo

Mode5ImageDemo

This demo shows the image copying routine for mode 5, and the mode 5 page flip handler. You can build it like this:

make Mode5ImageDemo

Mode5Demo

This demo shows the keypad handler routines. You can build it like this:

make InputDemo

SpriteDemo

This demo shows the object handlers and a working sprite:

make SpriteDemo

BgDemo

This demo shows the background handlers and a working BG:

make BgDemo

ExtendedBgDemo

This demo shows an extended BG and a technique I like to call "Map Banking":

make ExtendedBgDemo

AffineSpriteDemo

This demo shows an affine sprite and applies transformations to it:

make AffineSpriteDemo

AffineBgDemo

This demo shows an affine background and applies transformations to it:

make AffineBgDemo

MosaicDemo

This demo shows a background and a sprite, and applies a mosaic on them:

make MosaicDemo

BlendDemo

This demo shows various techniques with the blend features:

make BlendDemo

TimerDemo

This demo shows a changing BG using the GBA timers and mode 4:

make TimerDemo

InterruptDemo

This demo is a remake of AffineSpriteDemo, but using hardware interrupt and various SWIs:

make InterruptDemo

SoundDemo

This demo plays some tunes on the square wave channels:

make SoundDemo

Testing on a real GBA

All the demos were built for cartridges, but you can change this to multiboot by changing the SPECS variable of the demo Makefile to gba_mb.

Built With

  • DevkitPro - The DevkitARM provider.
  • GNU Make - The build system.
  • GBATek - The holy grail of GBA development.
  • TONC - The guide to GBA.

Authors

  • Lino Bigatti - Main library & demo coder.

To appear here, contribute to the library and/or its demos.

Acknowledgments

  • TONC, because some of my functions are based on TONC's ones.
  • Compumax, because he helps me when my code don't works.
  • Kaiser, Idem.

About

A library for managing the GBA hardware.

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published