8. Game Boy Advance

A SNES in your pocket

The Game Boy Advance launched in 2001 and sold over 81 million units. It was Nintendo's bridge between the Game Boy era and the DS — a handheld with a 32-bit ARM processor and a graphics system heavily inspired by the SNES PPU. Ports of SNES games ran natively (and often looked better than the originals), while original titles like Advance Wars, Metroid Fusion, Golden Sun, and the Pokemon Ruby/Sapphire generation pushed the hardware in new directions.

For programmers, the GBA is a fascinating inflection point. It's the first system in this series with a modern CPU architecture — the ARM7TDMI, which is a direct ancestor of the processors in today's smartphones. But it still has a tile-based PPU, hardware sprites, and DMA — the vocabulary of classic console hardware. Programming the GBA feels like the retro era meeting the modern era halfway.

And unlike every other system in this series, the GBA is friendly to C programming. The ARM7TDMI runs compiled C efficiently, with no need for hand- tuned assembly in most cases. You can write assembly, and for performance- critical inner loops you should, but the barrier to entry is much lower than on 8-bit or 16-bit systems.

The System at a Glance

Game Boy Advance Specifications

CPUARM7TDMI @ 16.78 MHz
RAM32 KB internal WRAM (fast) + 256 KB external WRAM (slower)
VRAM96 KB
Display240x160 pixels, 15-bit color (32,768 colors)
BG layersUp to 4 (mode dependent), with rotation/scaling on some
Sprites128 total, 4 sizes, rotation/scaling, 256 or 16 colors
Bitmap modesModes 3-5: direct pixel framebuffer (240x160 or double-buffered)
SoundGame Boy compatible (4ch) + 2 PCM DMA channels (8-bit, mixed in software)
DMA4 DMA channels
Backward compat.Full Game Boy and Game Boy Color compatibility (separate Z80-like CPU on die)

The ARM7TDMI CPU

The ARM7TDMI is the first RISC processor in this series. Where every previous CPU used CISC architectures (variable-length instructions, complex addressing modes, memory-to-memory operations), the ARM is a clean load/store design: all computation happens in registers, and only explicit load/store instructions access memory.

Registers

ARM7TDMI Register Set

R0-R12General purpose (32-bit)13 registers, all interchangeable for most operations
R13 (SP)Stack PointerBy convention, not enforced by hardware
R14 (LR)Link RegisterReturn address saved here by BL (branch-and-link)
R15 (PC)Program CounterReadable and writable as a normal register
CPSRCurrent Program Status RegisterN, Z, C, V flags + mode + Thumb/ARM state + IRQ mask

16 registers, all 32-bit. That's more than the 68000's 16 and incomparably more than the 6502's 3 or the Z80's 8. And unlike the 68000's split between data and address registers, ARM registers are fully general — any register can hold data or addresses.

ARM vs. Thumb

The ARM7TDMI supports two instruction sets:

  • ARM — 32-bit instructions, full access to all registers and features, conditional execution on every instruction
  • Thumb — 16-bit compressed instructions, limited to registers R0-R7 for most operations, no conditional execution

Thumb code is roughly 65% the size of ARM code but runs about 80% as fast on the GBA. The key insight: the GBA's ROM bus is only 16 bits wide. Fetching a 32-bit ARM instruction from ROM takes 2 bus cycles, but fetching a 16-bit Thumb instruction takes only 1. This means Thumb code runs from ROM at nearly the same speed as ARM code but uses half the space.

ARM code is faster when running from 32-bit IWRAM (internal work RAM). The common pattern: write performance-critical routines in ARM and place them in IWRAM, write everything else in Thumb.

@ ARM assembly — 32-bit instructions
@ Note: ARM uses @ for comments and # for immediates

    .arm                    @ assemble as ARM
    MOV R0, #42             @ load immediate
    ADD R1, R0, R2          @ R1 = R0 + R2
    LDR R3, [R4, #8]        @ load word from R4 + 8
    STR R0, [R5]            @ store R0 to address in R5
    BL  my_function          @ branch-and-link (call, return addr in LR)
    BX  LR                  @ return (branch to address in LR)
@ Thumb assembly — 16-bit instructions
    .thumb                  @ assemble as Thumb
    MOV R0, #42
    ADD R1, R0, R2
    LDR R3, [R4, #8]
    BL  my_function
    BX  LR

Conditional Execution

Every ARM instruction can be conditionally executed based on the flags — not just branches, but any instruction. This eliminates short branches:

@ ARM: conditional execution — no branches needed
    CMP R0, #10
    MOVGT R1, #1            @ if R0 > 10, R1 = 1
    MOVLE R1, #0            @ if R0 <= 10, R1 = 0

@ Compare: on the 68000 or Z80, this requires a branch:
@   CMP #10        ; compare
@   BLE .else      ; branch if <=
@   MOVE #1, D1    ; then
@   BRA .done
@ .else:
@   MOVE #0, D1    ; else
@ .done:

Barrel Shifter

Every ARM data processing instruction can optionally shift one of its operands as part of the operation — for free, in the same cycle:

@ Multiply by 5: shift left 2 (x4) then add original
    ADD R0, R1, R1, LSL #2  @ R0 = R1 + (R1 << 2) = R1 * 5

@ Array indexing: R0 = base + index*4
    LDR R0, [R1, R2, LSL #2] @ load from R1 + (R2 * 4)

@ On any other CPU, the shift and the add would be separate instructions

Key Instructions

Essential ARM Instructions

Data Movement
MOV Rd, operandMove (register or immediate)
LDR Rd, [Rn, #offset]Load 32-bit word from memory
STR Rd, [Rn, #offset]Store 32-bit word to memory
LDRH / STRHLoad/store 16-bit halfword
LDRB / STRBLoad/store 8-bit byte
LDM / STMLoad/store multiple registers (block transfer)
Arithmetic
ADD / SUBAdd / subtract
MUL Rd, Rm, Rs32-bit multiply (hardware, 2-5 cycles)
MLA Rd, Rm, Rs, RnMultiply-accumulate: Rd = Rm*Rs + Rn
Logic
AND / ORR / EOR / BICBitwise AND, OR, XOR, bit clear
LSL / LSR / ASR / RORShifts (as standalone or inline with other ops)
Compare & Branch
CMP Rn, operandCompare (subtract, set flags, discard result)
TST Rn, operandTest (AND, set flags, discard result)
B labelBranch
BL labelBranch-and-link (function call, saves return addr in LR)
BX RnBranch-exchange (also switches ARM/Thumb based on bit 0)
System
SWI #nSoftware interrupt (BIOS calls)
STMFD SP!, {regs}Push registers to stack (full descending)
LDMFD SP!, {regs}Pop registers from stack

LDM/STM — Block Transfers

Like the 68000's MOVEM, ARM can load or store any combination of registers in a single instruction. STMFD SP!, {R0-R7, LR} pushes 9 registers to the stack. LDMFD SP!, {R0-R7, PC} pops them back and returns from the function (by loading directly into PC). Function prologue and epilogue in one instruction each.

Memory Map

GBA Memory Map

$0FFF FFFF ┌──────────────────────────┐
           │  Game Pak SRAM (64 KB)   │ Battery-backed save RAM
$0E00 0000 ├──────────────────────────┤ 8-bit bus
           │  Game Pak ROM (32 MB)    │
           │  Wait State 2            │
$0C00 0000 ├──────────────────────────┤ 16-bit bus
           │  Game Pak ROM (32 MB)    │
           │  Wait State 1            │
$0A00 0000 ├──────────────────────────┤ 16-bit bus
           │  Game Pak ROM (32 MB)    │
           │  Wait State 0            │ Cartridge ROM (mirrored 3x)
$0800 0000 ├──────────────────────────┤ 16-bit bus
           │  OAM (1 KB)             │ Sprite attributes
$0700 0000 ├──────────────────────────┤ 32-bit bus
           │  VRAM (96 KB)           │ Tile data, tile maps, bitmaps
$0600 0000 ├──────────────────────────┤ 16-bit bus
           │  Palette RAM (1 KB)     │ 256 BG + 256 OBJ colors
$0500 0000 ├──────────────────────────┤ 16-bit bus
           │  I/O Registers          │ Display, sound, DMA, timers, keys
$0400 0000 ├──────────────────────────┤ 32-bit bus
           │  EWRAM (256 KB)         │ External work RAM
$0200 0000 ├──────────────────────────┤ 16-bit bus (2 wait states)
           │  IWRAM (32 KB)          │ Internal work RAM (fast, 32-bit bus)
$0300 0000 ├──────────────────────────┤ 32-bit bus, no wait
           │  BIOS ROM (16 KB)       │ System calls (SWI)
$0000 0000 └──────────────────────────┘ 32-bit bus

Bus Width Matters

The GBA's memory system has different bus widths for different regions:

Region Bus width Wait states Best for
BIOS 32-bit 0 System calls
IWRAM 32-bit 0 ARM code, critical data, DMA sound buffers
EWRAM 16-bit 2 Bulk data, Thumb code
VRAM 16-bit 0 Graphics
ROM 16-bit varies Game code (Thumb preferred)

IWRAM Is Precious

The 32 KB of IWRAM is the only RAM with a 32-bit, zero-wait-state bus. ARM instructions execute at full speed here. Thumb instructions are also fastest here, but the 16-bit bus of ROM means Thumb is nearly as fast from ROM. The strategy: put performance-critical ARM routines and frequently accessed data in IWRAM. Put everything else in EWRAM or run it as Thumb from ROM.

Display Modes

The GBA PPU supports 6 display modes — three tile-based and three bitmap-based. This is a major departure from previous systems that were exclusively tile-based.

GBA Display Modes

ModeTypeBG0BG1BG2BG3Notes
0TileTextTextTextText4 regular tile layers
1TileTextTextAffine—2 regular + 1 rotation/scaling layer
2Tile——AffineAffine2 rotation/scaling layers
3Bitmap240x160, 15-bit direct color (1 framebuffer)Full-color bitmap, no page flip
4Bitmap240x160, 8-bit indexed (2 framebuffers)Double-buffered, 256 colors
5Bitmap160x128, 15-bit direct color (2 framebuffers)Double-buffered, smaller resolution

Tile Modes (0-2) — Text Backgrounds

Text backgrounds work like the SNES and Mega Drive: a tile map references 8x8 tiles stored in VRAM. Each tilemap entry is 16 bits:

Text BG Tilemap Entry (16 bits)

Bits 15-12Palette number (0-15, for 4bpp tiles)
Bit 11Vertical flip
Bit 10Horizontal flip
Bits 9-0Tile number (0-1023)

Tiles can be 4bpp (16 colors from one of 16 palettes) or 8bpp (256 colors). Tile map sizes range from 32x32 to 64x64 tiles.

Affine Backgrounds — Rotation and Scaling

Affine backgrounds (BG2/BG3 in modes 1-2) support the same rotation and scaling as SNES Mode 7, controlled by a 2x2 matrix plus displacement:

@ Set up affine BG2 with 2x zoom
@ Registers: BG2PA, BG2PB, BG2PC, BG2PD (8.8 fixed-point)
@ BG2X, BG2Y (20.8 fixed-point reference point)

@ For 2x zoom, use 0.5 scale: $0080 = 0.5 in 8.8 fixed-point
    LDR R0, =0x04000020     @ REG_BG2PA
    MOV R1, #0x0080          @ A = 0.5 (2x zoom)
    STRH R1, [R0]            @ BG2PA
    MOV R1, #0
    STRH R1, [R0, #2]        @ BG2PB = 0
    STRH R1, [R0, #4]        @ BG2PC = 0
    MOV R1, #0x0080
    STRH R1, [R0, #6]        @ BG2PD = 0.5

Affine BG tile maps use 8-bit entries (tile index only, no flip) and can be 16x16 to 128x128 tiles.

Bitmap Modes (3-5)

Bitmap modes give you direct pixel access — every pixel in VRAM maps to a pixel on screen. No tiles, no tile maps.

@ Mode 3: draw a red pixel at (120, 80)
@ VRAM starts at $06000000, each pixel is 16 bits (15-bit color)
@ Address = VRAM + (y * 240 + x) * 2

    LDR R0, =0x06000000     @ VRAM base
    MOV R1, #80              @ Y
    MOV R2, #240
    MUL R1, R2, R1           @ Y * 240
    ADD R1, R1, #120         @ + X
    ADD R0, R0, R1, LSL #1   @ * 2 (16-bit pixels)

    MOV R1, #0x001F          @ red: %0 00000 00000 11111 (5-bit R)
    STRH R1, [R0]            @ write pixel

@ Mode 4: double-buffered, indexed color
@ Page 0: $06000000, Page 1: $0600A000
@ Each pixel is 1 byte (palette index)
@ Flip pages by toggling bit 4 of DISPCNT ($04000000)

Bitmap vs. Tile Modes

Bitmap modes are simple — just write pixels to VRAM. But they use a lot of VRAM (Mode 3: 75 KB for one frame) and have no hardware scroll, flip, or palette-per-tile. Tile modes are more complex to set up but far more memory-efficient and hardware-accelerated. Most GBA games use tile modes. Bitmap modes are used for 3D rendering (software rasterizers), FMV, and special effects.

Sprites (OBJ)

The GBA supports 128 sprites stored in OAM (1 KB at $07000000). The sprite system is almost identical to the SNES but adds per-sprite affine transformation.

OAM Format

Each sprite uses 8 bytes (3 attribute halfwords + 1 rotation parameter index):

OAM Entry (8 bytes)

Attr 0 (16 bits)Y position (8), affine flag, mode (normal/semi-transparent/window), mosaic, color mode (4bpp/8bpp), shape
Attr 1 (16 bits)X position (9), affine parameter group (or H-flip/V-flip if not affine), size
Attr 2 (16 bits)Tile number (10), priority (2), palette (4, for 4bpp)
Padding2 bytes (used for affine rotation parameters, shared across OAM)

Sprite Sizes

Shape and size bits combine to select from 12 sizes:

Sprite Sizes (shape x size)

          Size 0    Size 1    Size 2    Size 3
Square:   8x8       16x16     32x32     64x64
Wide:     16x8      32x8      32x16     64x32
Tall:     8x16      8x32      16x32     32x64

Affine Sprites

Any sprite can be set to affine mode, which applies a 2x2 rotation/scaling matrix. 32 sets of affine parameters are stored interleaved in OAM (in the padding bytes of every 4th sprite entry). Multiple sprites can share the same affine parameter set.

@ Set affine parameters for rotation group 0
@ Parameters are at OAM bytes: $06, $0E, $16, $1E (every 8 bytes, offset 6)
@ PA, PB, PC, PD — same 8.8 fixed-point matrix as affine BGs

@ 45-degree rotation:
@ PA = cos(45) = 0.707 ≈ $00B5 in 8.8
@ PB = sin(45) = 0.707 ≈ $00B5
@ PC = -sin(45)         ≈ $FF4B
@ PD = cos(45)          ≈ $00B5

    LDR R0, =0x07000006     @ OAM affine param PA (group 0)
    LDR R1, =0x00B5          @ PA = cos(45)
    STRH R1, [R0]
    LDR R1, =0x00B5          @ PB = sin(45)
    STRH R1, [R0, #8]
    LDR R1, =0xFF4B          @ PC = -sin(45)
    STRH R1, [R0, #16]
    LDR R1, =0x00B5          @ PD = cos(45)
    STRH R1, [R0, #24]

The Palette

Palette RAM (1 KB at $05000000) holds two sets of 256 colors:

  • $05000000-$050001FF: BG palette (256 entries)
  • $05000200-$050003FF: OBJ palette (256 entries)

Each entry is a 15-bit color: %0bbbbbgg gggrrrrr (5 bits per channel).

@ Set BG palette color 0 to black, color 1 to white
    LDR R0, =0x05000000     @ palette RAM
    MOV R1, #0x0000
    STRH R1, [R0]            @ color 0 = black
    LDR R1, =0x7FFF
    STRH R1, [R0, #2]        @ color 1 = white ($7FFF = all bits set)

DMA

The GBA has 4 DMA channels, each able to transfer blocks of data between any memory regions. DMA channels 1 and 2 have special support for sound, and DMA channel 3 is general purpose.

DMA Channels

DMA 0Highest priority. Internal only (can't access ROM).
DMA 1Sound FIFO A — auto-refills sound buffer.
DMA 2Sound FIFO B — auto-refills sound buffer.
DMA 3General purpose. Can access ROM. Used for VRAM fills, ROM-to-RAM copies.
@ DMA 3: copy 512 bytes from source to VRAM
@ DMA3SAD = $040000D4 (source address)
@ DMA3DAD = $040000D8 (destination address)
@ DMA3CNT = $040000DC (count + control)

    LDR R0, =0x040000D4
    LDR R1, =source_data
    STR R1, [R0]             @ source address
    LDR R1, =0x06000000
    STR R1, [R0, #4]         @ destination (VRAM)
    LDR R1, =0x80000100      @ enable (bit 31) + 256 halfwords (512 bytes)
    STR R1, [R0, #8]         @ start DMA

DMA is significantly faster than CPU copies — and unlike the SNES, DMA doesn't require VBlank (though VRAM writes should still be timed carefully).

Sound

The GBA sound system has two parts:

Legacy Game Boy Sound (Channels 1-4)

The same 4 channels from the Game Boy — 2 pulse, 1 wave, 1 noise. Controlled through the same registers (mapped at $04000060-$04000084). Used for chiptune music and retro sound effects.

Direct Sound (DMA Channels A and B)

Two 8-bit PCM channels driven by DMA and timed by hardware timers. The CPU (or a music mixing routine) fills a buffer in RAM; DMA channels 1 and 2 automatically feed the buffer contents to the DAC at the timer rate.

@ Set up Direct Sound channel A with Timer 0

@ Configure Timer 0 for ~16 kHz sample rate
@ Timer value = $FFFF - (16780000 / sample_rate)
@ For 16384 Hz: $FFFF - 1024 = $FBFF
    LDR R0, =0x04000100     @ TM0CNT_L
    LDR R1, =0xFBFF
    STRH R1, [R0]            @ timer reload value
    MOV R1, #0x0080          @ enable timer, no prescaler
    STRH R1, [R0, #2]        @ TM0CNT_H

@ Set FIFO A destination as DMA 1 target
    LDR R0, =0x040000BC      @ DMA1SAD
    LDR R1, =sound_buffer
    STR R1, [R0]              @ source: our mixing buffer
    LDR R1, =0x040000A0
    STR R1, [R0, #4]          @ destination: FIFO_A register
    LDR R1, =0xB6400000       @ enable, repeat, 32-bit, FIFO timing, src increment
    STR R1, [R0, #8]          @ DMA1CNT

@ Enable sound
    LDR R0, =0x04000082       @ SOUNDCNT_H
    LDR R1, =0x0B0F           @ DMA sound A full volume, timer 0, left+right, reset FIFO
    STRH R1, [R0]

Most GBA games use a software audio mixer that runs during VBlank, mixing multiple samples into a single buffer that DMA streams to the hardware. This is fundamentally different from the dedicated sound chips of earlier systems — on the GBA, the CPU does the mixing.

Software Mixing

The GBA has no dedicated sound processor — unlike the SNES (SPC700), Mega Drive (Z80 + YM2612), or even the NES (APU). Audio mixing is done in software by the main CPU. Libraries like Maxmod and Krawall handle this, providing tracker playback with 8-16 mixed channels. This costs CPU time every frame but gives complete flexibility over the sound output.

Timers

The GBA has 4 hardware timers ($04000100-$0400010F), each a 16-bit counter that can be clocked at various rates or cascaded (one timer overflows into the next). Timers 0 and 1 are commonly used for sound sample rates. Timer overflows can trigger interrupts or DMA.

Interrupts

Interrupts are managed through the IE (Interrupt Enable) and IF (Interrupt Flags) registers at $04000200 and $04000202:

GBA Interrupt Sources

Bit 0VBlank
Bit 1HBlank
Bit 2VCount (LY match)
Bit 3Timer 0 overflow
Bit 4Timer 1 overflow
Bit 5Timer 2 overflow
Bit 6Timer 3 overflow
Bit 7Serial communication
Bit 8DMA 0 complete
Bit 9DMA 1 complete
Bit 10DMA 2 complete
Bit 11DMA 3 complete
Bit 12Keypad
Bit 13Game Pak (external)
@ Enable VBlank interrupt
    LDR R0, =0x04000200      @ REG_IE
    MOV R1, #0x0001           @ VBlank interrupt
    STRH R1, [R0]

    LDR R0, =0x04000208      @ REG_IME
    MOV R1, #1                @ master interrupt enable
    STR R1, [R0]

@ Also enable VBlank IRQ in DISPSTAT
    LDR R0, =0x04000004      @ REG_DISPSTAT
    LDRH R1, [R0]
    ORR R1, R1, #0x0008       @ VBlank IRQ enable (bit 3)
    STRH R1, [R0]

BIOS Calls

The GBA BIOS provides utility functions accessed via SWI:

SWI Function Description
$00 SoftReset Reset the system
$02 Halt Low-power halt until interrupt
$05 VBlankIntrWait Wait for VBlank (efficient, uses Halt internally)
$06 Div Signed 32-bit division (R0/R1 → R0=quotient, R1=remainder)
$0B CpuSet Memory copy/fill (word or halfword)
$0C CpuFastSet Fast memory copy/fill (32-byte blocks)
$0E BgAffineSet Calculate affine BG parameters
$0F ObjAffineSet Calculate sprite affine parameters
@ Wait for VBlank using BIOS call
    SWI #0x05               @ VBlankIntrWait — halts CPU until VBlank

@ Divide R0 by R1
    MOV R0, #100
    MOV R1, #7
    SWI #0x06               @ R0 = 14 (quotient), R1 = 2 (remainder)

Reading the Keypad

The GBA has a D-pad plus A, B, L, R, Start, Select — read from a single 16-bit register at $04000130:

@ Read keypad — bits are 0 when pressed (active-low)
    LDR R0, =0x04000130      @ REG_KEYINPUT
    LDRH R1, [R0]
    MVN R1, R1                @ invert to active-high
    AND R1, R1, #0x03FF       @ mask to 10 button bits

    @ Bit 0: A        Bit 5: Left
    @ Bit 1: B        Bit 6: Up
    @ Bit 2: Select   Bit 7: Down
    @ Bit 3: Start    Bit 8: R shoulder
    @ Bit 4: Right    Bit 9: L shoulder

    TST R1, #0x0001           @ test A button
    BNE a_pressed

Programming in C

The GBA is the first system in this series where C is a practical primary language. With devkitARM and libgba, a basic GBA program looks like this:

// Minimal GBA program in C
#include <gba.h>

int main(void) {
    // Set display mode 0 with BG0 enabled
    REG_DISPCNT = MODE_0 | BG0_ENABLE;

    // Load tiles and tilemap into VRAM...
    // Set palette...

    while (1) {
        VBlankIntrWait();

        // Read keys
        scanKeys();
        u16 keys = keysDown();

        if (keys & KEY_A) {
            // A button pressed this frame
        }

        // Update game state, sprites, scroll...
    }
}

The toolchain (GCC for ARM) generates efficient Thumb code by default, and the C runtime handles the startup sequence, interrupt dispatching, and memory sections.

GBA vs. Previous Handhelds and Consoles

Game Boy SNES GBA
CPU LR35902 @ 4.19 MHz 65C816 @ 2.68-3.58 MHz ARM7TDMI @ 16.78 MHz
Architecture 8-bit CISC 8/16-bit CISC 32-bit RISC
RAM 8 KB 128 KB 288 KB (32+256)
Display 160x144, 4 shades 256x224, 256 colors 240x160, 32768 colors
BG layers 1 + window Up to 4 Up to 4
Sprites 40 (10/line) 128 (32/line) 128 (no per-line limit listed)
Affine transform None Mode 7 (BG only) BG and sprites
Bitmap mode None None Modes 3-5 (direct pixel access)
Sound 4 channels SPC700 (8ch, echo) 4 legacy + 2 DMA PCM (software mixed)
Language Assembly Assembly C or assembly

Key Takeaways

  • The ARM7TDMI is a 32-bit RISC processor with 16 general-purpose registers, hardware multiply, conditional execution, and an integrated barrel shifter.
  • Thumb mode (16-bit instructions) runs nearly as fast as ARM mode from the 16-bit ROM bus while using half the code space.
  • The PPU supports both tile modes (like the SNES) and bitmap modes (direct pixel framebuffers) — a first for Nintendo hardware.
  • Affine transformation applies to both backgrounds AND sprites — you can rotate and scale individual sprites, which the SNES cannot do.
  • Memory bus width varies by region. IWRAM (32-bit) is fast but small (32 KB). ROM (16-bit) favors Thumb code.
  • Sound is software-mixed — the CPU does the work, but this gives unlimited flexibility in mixing and effects.
  • DMA channels handle bulk memory transfers and sound buffer refills, freeing the CPU.
  • C is a practical primary language thanks to the ARM architecture and GCC toolchain. Assembly is only needed for performance-critical inner loops.
  • The GBA bridges the retro era (tile-based PPU, hardware sprites, OAM) with the modern era (32-bit RISC CPU, compiled C, bitmap framebuffers).

Tools and Emulators

Tool Purpose
mGBA Accurate GBA emulator with excellent debugging: memory viewer, tile viewer, register inspector.
no$gba Fast emulator with powerful debugging features.
NanoBoyAdvance Cycle-accurate GBA emulator.
devkitARM GCC-based ARM cross-compiler toolchain. The standard GBA development environment.
libgba C library providing register definitions, BIOS wrappers, and utility functions.
libtonc Alternative C library with excellent accompanying tutorial (Tonc).
Butano Modern C++ engine for GBA with high-level abstractions.
Tonc The definitive GBA programming tutorial — covers everything from basics to advanced effects.
GBATEK Comprehensive GBA hardware reference by Martin Korth. Covers every register.

The Game Boy Advance closes this series where it began — with a system designed around tiles, sprites, and scanlines, but running on a processor architecture that's still powering devices today. From the C64's 1 MHz 6502 to the GBA's 16 MHz ARM7, from 16 fixed colors to 32,768, from BASIC POKE commands to compiled C — these machines span 20 years of hardware evolution, but the fundamental ideas echo through all of them: memory-mapped I/O, tile-based rendering, DMA, and the constant negotiation between what the hardware gives you and what you can make it do.