Getting Started with Game Boy Advance Programming
Installing Game Boy Development Tools on a Macintosh
The Game Boy development tools on a Macintosh require Xcode. Xcode is a set of Macintosh programming programs (how’s that for self-reference) and libraries. Your Mac may already have Xcode. To see if it’s already installed, open a Terminal window and type:
gcc
If the response includes “command not found” then Xcode is not installed. If the response is something like “no input files” then Xcode is installed and you can skip step 1.
1. Install Xcode
If you’re using Mac OS X 10.3.x (aka “Jaguar”) you’ll need to install Xcode 1.5. If you’re using OS X 10.4.x (“Tiger”) you’ll want Xcode 2.1 (or later). Copy the correct version of Xcode to your desktop and open it. Inside you’ll find the Xcode installer. Double-click on it and follow the installation instructions.
2. Copy the gba folder
Copy the “gba” folder to your home directory. The home directory is the folder with your login name and contains “Documents”, “Music”, “Pictures”, etc.
3. Get used to using Terminal
The tools we’ll be using for Game Boy development run in Terminal, which is a Unix command line environment. You should spend some time getting used to it. See this page:
http://www.codeandcreativity.org/command%20line.html
For a very brief introduction to using Terminal. We’ll be covering the steps for Game Boy development in class.
4. Build your first Game Boy program!
In Terminal, change to the gba directory.
cd ~/gba
Instruct the computer to make the demo program that I included by typing:
make
If all goes well, you’ll see several lines of output from the compiler, ending with “ROM fixed!” If you look in the directory, you should see a new file named “main.gba”. That’s your first Game Boy program. Run it and be amazed!
Installing Game Boy Development Tools on a PC
1. Install MinGW
MinGW is a Unix–like command line program. Most of the Game Boy development happens in this program. Launch MSYS-1.0.10.exe to install it. Install it into C:/msys (you’ll need to change this in the installer).
2. Configure MinGW
Go into the System control panel and select the advanced tab. Look for “path” in the bottom section, highlight it and click the lower edit button. Add this to the beginning:
C:\msys\bin;C:\devkitPro\devkitARM\bin;
Make sure there’s a ’;’ at the end of what you entered, and before the rest of the existing text. Click OK to save the new path.
Click “New” in the upper box to add these two new environment variables.
Variable Name: DEVKITPRO
Variable Value: /c/devkitPro
And this one:
Variable Name: DEVKITARM
Variable Value: /c/devkitPro/devkitARM
Close the System control panel. You’re finished configuring MinGW.
3. install devkitARM
Launch devkitARM_r15-win32.exe. This installs all of the Game Boy–specific development tools (compiler, etc.). Install it into the path C:\devkitPro.
4. Install Programmer’s Notepad
You’ll use this to do your text editing for your programs. Launch pn20548.exe to install it. You can use a different text editor if you’re already familiar with something else.
5. Copy the gba folder
Copy the “gba” folder to C:\.
6. Get used to using MinGW
MinGW is a command line environment modeled after Unix. The tools we’ll be using for Game Boy development run in this environment. You should spend some time getting used to a command–line environment. See this page:
http://www.codeandcreativity.org/command%20line.html
For a very brief introduction to using a command line (note that because MinGW is a
minimal system many of the examples don’t work). We’ll be covering the steps for Game Boy development in class.
7. Build your first Game Boy program!
Launch MinGW and change to the gba directory.
cd /c/gba
Instruct the computer to make the demo program that I included by typing:
make
If all goes well, you’ll see several lines of output from the compiler, ending with “ROM fixed!” If you look in the directory, you should see a new file named “main.gba”. That’s your first Game Boy program. Run it and be amazed!