References and links
Home of devkitARM, the toolchain of choice for GBA
development. And NDS and more. Updated regularly and you can find
a libgba and sample code here too.
GBA development hub. Tools, documents, tutorials can all be found
here. A visit to the forum is
highly recommended if you're just starting, whether you have problems
or not. If you do have a problem, chances are you're not the first and
that it has been solved before here. Just remember the
posting before you start a topic.
Martin Korth's site. You can find the immensely complete (though
reference document and the most accurate emulator
here, both of which
are insanely great. Though the freeware version doesn't have any
debug screens, the $15 homebrew version does.
The VisualBoy Advance emulator. Not as accurate as
no$gba when it comes to timings, but still very, very good, and
has a more friendly interface and all kinds of cool viewers for
tiles, maps, IO registers and the like.
Alternative dev environments
Host of HAM. HAM is a full C developer environment for the
GBA, complete with IDE, palette and map editor and, of course,
compiler. There is also an extension library called
HEL with extra (and
optimized) code. Taking a look at that would be a good idea.
If you don't like all the intricacies of C/asm, you might try
this BASIC-like environment. The project is a little, uhm, asleep
right now, though.
Don't know too much about Catapult, but from what I've seen, it seems
to work a little bit like Gamemaker: you create images/sound and
scripts that Catapult ties together into a ROM image. Catapult comes
complete with graphic, map and sound editors, tutorials, samples,
emulator and probably more.
A few sites of (high-ranked) forum-dwellers. These guys have
been around for a while and you can learn a lot from playing their
demos and browsing through their source code.
Darkfader's site, with information, tools, demos, code not only
for GBA development, but many other systems as well.
DekuTree64's site has more than just the sound mixer; there's also
some demos (with source) and tools like quither, a
quantizer / ditherer for 16 color tiles.
Headspin had put together
overview of various items, incluning the different compression
routines and music players available.
Lininger's site with a number of demos, including multiplayer
code, which seems very hard to come by.
Schaut's site, with VisualHam, the HAMlib IDE; HEL, the HAM addon
library; katie, a data-management tool and more.
- www.pineight.com. Site
of gbadev faq maintainer, tepples. There are a number of
interesting things here. Special mentions for Tetanus on
Drugs, a zonked-out version of tetris (can't call it a clone
as it is so much more), and GBFS, a file system for the GBA.
- www.belogic.com. Pretty much
the site on GBA sound programming. Has info on all the
registers, and a set of very complete demos.
- If you're looking for C/C++ tutorials, there seems to
be some good stuff
tutorial. Whereas Belogic shows the basics of sound programming,
this sight guides you through the steps of making a sound/music mixer.
This is the new home of the PERN project, the original
series of tutorials for gba development. PERN was set for a
complete renewal, but that seems to have been deprioritised
in favor of the DS, which you will also find a lot about there.
- jake2431 has been gathering NDS / C / GBA tutorial links on
The comp.lang.c FAQ.
Pretty long, but very useful if you're learning C as well as GBA
A document on C
coding standards, one of many floating around. If you've
based your code on any of the non-tonc tutorials out there
you need to read this. The standard doesn't have to
be followed religiously, but adopting most of them would be a good
idea and would solve a lot of the bad habits the other sites teach.
Mr Lee has a few things to say about
These are simple optimization that cost nothing or little in
forum FAQ. Essential reading, whether you're new or not.
Bookmark it, make a local copy, print it out; I don't care, but
reference document. This is basically the GBA-coders' bible (only
this one is a worthwhile read). The information density is
very high and maybe a little perplexing if you're just starting,
but when you get the hang of it, it's pretty much all you'll
require. Is also part of HAMLib's documentation.
CowBite Spec, a another reference document. At least partially
based on GBATek. Not as rich, but probably more understandable.
GCC documentation in various formats. CHM versions (with
search functions) can be found
These sites have manuals on the GCC toolchains and other things.
Get the files for the assembler (AS), compiler (GCC),
linker (LD) and preferably the maketool (make) as
well. The preprocessor manual (cpp) may be useful as well.
Naturally, the ARM site itself also has useful documents. Note that
most of these are pdfs.
- miscPDF 8031.
The Arm Architecture Procedure Call Standard (AAPCS).
Explains how parameters are passed between functions. Required
reading if you want to do assembly.
- PDF DAI0034A.
Writing efficient C for ARM. Although it's written with ARM's
own compiler in mind, some tips will work for other toolchains as
- PDF DDI0210B
The big one: the complete technical reference manual for the
- Instruction set reference sheets.
- Support faqs on alignment issues:
Source code tools
If you're still using Notepad to write your GBA code, don't. Do
yourself a favor and just … don't, OK? Though I personally use
Visual C for writing code, there are some other very nice tools for
the job, both in terms of general text editors as IDEs.
A while back there was a thread where someone asked for a
replacement editor for Notepad since, and I quote, “Notepad
SUCKS!”. The name ConTEXT popped up a couple of times, and
I find it very nice indeed, and not just for coding purposes.
It allows for custom highlighters, integrated shell commands
(to run makefiles for example) and attachable help files
(PN). Good and versatile text editor. Comes with the devkitPRO
- Eclipse IDE. While
I haven't had time to work with it firsthand, a good number of
gbadev forum-dwellers swear by it. You can read how to set it up for
GBA development in
Dev-C++ is another IDE that comes up often and maybe worth a look.
has info on how to set it up, but it's an old thread so you may have
to do a little extra work.
Just as Notepad sucks for coding (and anything apart from the
simplest text editing), MS-Paint is hell on Earth when it comes to
the kind of graphics you need in GBA games. What you need is a tool
that allows full control over the bitmap's palette, and MS-Paint
fails spectacularly in that respect. So, I might add, does Visual C's
native bitmap editor. And even big and bulky photo-editing tools
like PhotoShop and Paint Shop Pro have difficulty here, or so I'm
told. So here are some tools that do allow the kind of control
that you need. Whatever tool you plan on using: make sure it doesn't
screw up the palette! Some editors are known to throw entries
Command-line converter of graphics with interesting features such as
tile-stripping, palette merging and supports all bitdepths and
BIOS compression routines. Note that there are two converters named
gfx2gba; you'll want the one my Markus. The HAM distribution includes
- The GIMP.
Very complete GNU-based bitmap/photo editor.
- Graphics Gale
is a very complete graphics editor. It has all the tools you
would expect a bitmap editor to have, a proper palette editor
and an animation tool.
- Usenti. This is my
own bitmap editor. It may not be as advanced as Graphics Gale,
but that does make the interface a lot easier. Aside from that
it has some very interesting palette tweaking options like a
palette swapper and sorter, and can export to GBA formats in
binary, ASM and C code.
While the maps that I've used in Tonc were created on the fly, for
any serious work you need a map editor. Here are a few.
- MapEd, by
Nessie. Allows multiple layers, collision tiles and custom
This is a general purpose map editor which can be used for a lot
of different types of maps
- Mirach. This is
my own map editor, but lack of time means that I haven't been
able to get all the tools that I wanted in yet
- excellut. One
thing you do not want in GBA programming is to call mathematical
functions. You want look-up tables to get
the proper values. Excellut sets up MS Excel to enable you to
create any kind of LUT you can think of within seconds (well, OK,
minutes). If you haven't created a LUT builder of your own (and
maybe even if you have)it's definitely worth a look.
- Douglas Adams, “The Hitchhiker's Guide to the
Galaxy”. OK, so this isn't exactly a reference, but
recommended nonetheless. If only to know the significance of
the number 42 and the origin of the Babel Fish.
- Edward Angel, “Interactive Computer Graphics with Open
GL”. Though this is a book on 3D, Lots of the linear
algebra can be applied to 2D as well. Relevant chapters are 4
(matrix transformations) and 5 (perspective (Mode 7 anyone?)).
Make sure you have the 3rd edition, there are too
many embarassing errors in the second.
- George B. Arfken & Hans J. Weber, “Mathematical Methods
for Physicists” If physics were an RPG, this would be
the Monster's Manual. Chapters 1-3 deal with vectors and matrices
in great detail.
- André LaMothe, “Black Art of 3D Game
Programming”. For the DOS-era, so may be hard to find.
Deals with 3D programming under heavy hardware constraints (just
like the GBA). Very nice.
- André LaMothe “Tricks of the Windows Game
Programming Gurus”. Another 1000+ page tome by Mr LaMothe;
one of many), an excellent guide to game programming in general,
and to DirectX in particular.
- David C. Lay, “Linear Algebra and its
Applications”. Nearly everything on my
matrix page comes out of this book.
- O'Reilly pocket references for “CSS” and
“HTML” by Eric Meyer and Jennifer Niederst,
respectively. Absolute lifesavers for something like this site.
- Steve Oualline, “How Not to Program in C++”.
The cover features a computer sticking its tongue out at you;
the first sentence of the introduction is “Pain is a
wonderful learning tool”. You just know this is gonna be
good. This book gives you 111 broken code problems to solve,
ranging from obvious to crafted by the Dark Lord himself. If you
can't recognize yourself in at least half of these problems, you
haven't been coding in C for very long.
Modified Mar 13, 2008
Get all Tonc files here