This is a collection of notes on GBA/NDS-related homebrew development.

"Slot 2" Hardware

General Information - Compact Flash Adapters

Compact Flash adapters on the GBA cartridge interface all generally work by exposing IDE registers using the top eight address bits coupled with the sixteen-bit data bus, wiring them directly to the relevant IDE connector pins.

In programmer-facing documentation, the two address ranges mentioned (matching PC I/O) are 1F0h-1F7h and 3F0-3F7h. In hardware, the choice is controled by Chip Select (CS) pins, while the specific register is chosen using DA0-DA2.

TODO:

  • Is INTRQ relayed in any way? On which adapters?

Cartridge - Memory Expansion Pak

Identification:

  • 0B4h (device type) == 24h
  • 0BFh - bit 7 clear
  • 1FFFFh - bit 7 clear

Timings:

Official software uses default timings (EXMEMCNT[6:0] = 00h).

Memory map:

  • 240000h - unlock register (32-bit)
    • bit 0 - set if unlocked, clear if locked
    • bit 1-31 - unknown
  • 1000000h - 8 megabytes of memory starts here

TODO:

  • what are the remaining unlock register bits?
    • official software crashes if any bits 16-31 are set on initialization
  • does the unlock register control memory visibility or just writability?

Cartridge - GBA Movie Player

Compact Flash interface:

Address bits Map to
23 "1"
22 Chip Select 0/1
18-16 DA2-DA0