Adapting the Game Boy Advance
Tutorials Trail: << Adapted PC Interfaces | Analysis Methods >>
Summary
Using the right tools, the GameBoy Advance™ (GBA) by Nintendo™, may be adapted for use by children with disabilities without opening the console, modifying the hardware, infringing copyright/patent laws or losing the manufacturer’s warranty. This tutorial explains how adapted interfaces, such as external switches, may be connected to the GBA through the “link port”. These external switches may then be used to play custom games and/or interact with custom applications in the GBA. Similar tools and procedures may also be used to adapt other game consoles. However, this is beyond the scope of the tutorial.
Contents (hide)
1. About the GameBoy Advance™
The GameBoy Advance SP™ (GBA) is a neat piece of technology marketed by Nintendo™ as a portable game console targeted mostly at young children. However, as it is the case with many other electronic devices, the GBA can be adapted for custom applications. For example, the GBA has been used as a movie player, a picture viewer or even in more advanced applications such as a robot controller, a global positioning system (GPS) or an automotive diagnostic system. This is mostly possible thanks to a pair of communication ports available in the GBA that can be used to send and receive information to and from other electronic devices (e.g. external switches, environmental control units, etc.)
1.1 Hardware
- 2.9in screen (240×160 max. resolution)
- 8 input keys
- Screen backlight switch
- Analog volume slider
- 3.7V 600mAH Lithium Ion Battery
- 32bit I/O Cartridge Port
- 4bit Link Port (4 modes including general purpose parallel & UART)
- 32bit ARM7TDMI CPU running on RISC architecture (16.78 MHz)
- 96 KB of video memory, 32KB of internal ram and 256KB of external ram
2. What you need…
2.1 Software Development Kit
Option 1: HAM:
Recommended Platform: Windows | Level: Basic
The Ham Development Kit (HamDK) is one of the friendliest development tools available for the GBA. The HamDK includes a C++ compiler which will allow you to write custom games and applications for the GBA on your PC. It also includes an emulator (VisualBoy Advance) that may be used to test your programs even if you don’t have a GBA. Finally, the kit also contains a copy of the Krawall library that you can use to control the GBA’s sound system. Once you have downloaded the HamDK, you should complete Aaron Roger’s tutorial which will take you through an overview of the basics of GBA development with Ham.
Option 2: devkitPro + the Apex Audio System:
Recommended Platform: Linux | Level: Advanced
devkitPro contains the most popular homebrew game development toolchains for GBA, PSP, GameCube and others. For GBA development you will need the devkitARM and the libgba library. The kit also contains examples that you can use to get started. Check the links section for related documentation
The Apex Audio System (AAS) is an extremely efficient GBA audio mixer and MOD player with sound effect support. Its main features are a low memory footprint and very high performance. It is designed to allow developers to easily make full use of the GBA’s sound hardware with little overhead. It is many times faster than other mixers and was used in the development of the GBA version of Payback. The AAS may be used free-of-charge for non commercial purposes. To get a copy, e-mail Apex Designs directly.

2.2 GBA Programable Cartridge: Flash2Advance Ultra Flash Cartridge
Every game cartridge you buy at the store contains compiled code that determines the behavior of the GBA. In order to run programs on the GBA’s hardware you would typically need to “burn” them permanently into a cartridge. However, you can obtain flash memory cartridges that may be overwritten several times. This is the type of cartridge recommended for GBA development. There are many such cartridges in the market. I recommend the Flash2Advance Ultra (F2A) Flash Cartridge. You can order it online at Linker4U.
2.3 GBA Cartridge Writer: Flash2Advance USB Linker and Power Writer
Finally, in order to transfer your compiled code from your PC to your F2A Cartridge, you will need either the F2A USB Linker or the F2A USB Writer. You can also get these online at Linker4U.
You will also need to install windows drivers and the “F2A Power Writer” which will allow you to upload your compiled programs to the GBA. Click here to obtain the software. For Windows XP, you should use version 2.61 of the F2A Power Writer.
2.4 The ARM Memory Map
Programming the GBA involves programming its embedded microcontroller (MC): the amazing 32bit ARM7TDMI CPU running on RISC architecture @ 16.78 MHz. As you may already know, programming MCs is all about reading and writting bits from and to the MC memory space. These bits will tell the MC and all its peripherials what to do at all times. However, in order to do this properly, you need a map. Luckily for you, Tom Happ has already done a lot of work in putting together a fully documentated memory map of the GBA’s MC.
3. Programming The Link Port
Robert Meerman’s pages will be your first stop for programming the link port: http://www.robmeerman.co.uk/project/gba. In addition to the basic information, these pages also contain full details and code for implementing a USB PC data link. The table below is just a little snippet of Robert’s pages, included here for quick reference.

| Colour | Pin# | Pin Name | UART Role | Voltage (logic 1) |
| 1 | VCC | |||
| Red | 2 | SO SerialOut | Tx | 3.31V |
| Orange | 3 | SI SerialIn | Rx | 3.31V |
| Brown | 4 | SD SerialData | RTS | 3.31V |
| Green | 5 | SC SerialClock | CTS | 3.31V |
| Blue | 6 | GND |
GBA official link cable
4. A Simple Single-Switch Application
4.1 Making/Adapting a Switch
You may also need to make or customize a switch in order to suit your particular needs. In that case, you will find the D.I.Y. guides at oneswitch.org very useful. There is a generic guide on how to make disability standard switches here.
details comming soon…
5. Optional
5.1 Casting and Moulding the GBA’s battery
One of the limitations of the GBA in terms of accessibility, is the fact that it must be turned ON/OFF manually by sliding a tiny side switch back and forth. This requires lots of dexterity and strength. However, it is possible to keep the switch in the ON position and still turn the gameboy ON/OFF by connecting/disconnecting the battery. Of course, doing this manually would be way more difficult than sliding the switch, but the fact that is possible will actually allow us to create an electronic ON/OFF switch that substitutes the mechanical one and that may be adapted to all kinds of controls. In order to do that, we first need to create a dummy battery that will be connected to the real one through our electronic switch.
details comming soon…

