Game Boy Advance
![]()

This unique and highly-anticipated book was commissioned by Premier Press (now Course Technology PTR) and completed but not released due to legal issues brought up by Nintendo. As a result, the e-book edition is available here, exclusively, for free. You may download and read the book on your PC (or mobile device) using Acrobat Reader, or you may print it out, complete with the original front and back cover (double-sided printing looks best). Each PDF has been compressed to save bandwidth.
NEW CONTENT!
I have been working on a whole series of GBA games for my Handheld Systems course, and am sharing the code with you here. This will significantly improve the content of the e-book with associated source code files. These games were intentionally written with simple source code, so they are not feature-rich, but are very educational. All of this new content is packaged with the sources so if you are ordering the sources, these new games are included and you don’t need to download them separately.
PONG: This is a simple version of the classic Atari game of Pong for one player. The game was created entirely using vector graphics so there are no game resources needed to run it, just compile the code and go. The A.I. player takes the paddle on the left, while you control the paddle on the right using up/down. The novelty of this game is truly magical, when you consider that this was where video games started!
BREAKOUT: This is a version of the classic ball-and-paddle game of Breakout, which is a logical next step after Pong. Like the Pong game, this Breakout is also completely vector based, meaning there are no bitmaps used, just pixels and lines. This game is very, very simple, meaning it does not have any features beyond the basic mechanics of the game: move the paddle, bounce the ball, test for collisions, keep track of score. It’s up to you to improve the game!
TETRIS: Here is a 90% complete version of Tetris for the GBA, with source code. I put it up here as soon as I had the game code up to a reasonable level of functionality. This was more challenging than I had anticipated, requiring about 10 hours of work. I was truly surprised by that because I expected it to be a 1-2 hour project like the other two games. Turns out there’s a lot of complexity in the way the pieces are handled and how they interact on the game board if you want it to play like the original. For instance, you can move a piece after it hits the floor for a brief second until the next piece comes up. I’ll leave it to you to implement scoring and display of the next piece, as well as fixing a few minor bugs (in a rare case some pieces will not allow you to move them to the far left edge).
SCROLLER: This example demonstrates large-level scrolling with a PowerPoint tutorial on how to create and export a Mappy level to the GBA. You can use this code to build your very own vertical scrolling shooter or side-scrolling platform game! This program doesn’t use the GBA’s built-in hardware scrolling, it just blits the tiles to the screen so it is a software tile engine, but that makes it possible to create huge levels while the GBA’s hardware scroller is very limited.
Binaries and Tools
The real magic behind this book is the awesome GBA
programming environment, HAM, available at http://www.ngine.de/. This dev tool includes the complete GBA compiler toolchain and editor in a sleek package, ready to go with zero configuration issues.
Two support files are available for download. The first contains all of the projects from the book, pre-compiled into .gba binaries, and ready to run using the VisualBoyAdvance emulator. These binaries have been compiled with support for multiboot, so you can run them via mbv2 or flash. The second file contains the software utilities used in the book, such as VisualBoyAdvance.exe, gfx2gba.exe, and so on. These were all originally intended for the book’s CD-ROM. You can use WinRar to extract the files.
Getting The CD-ROM / Source Code
The source code, project files, and all media (images, sounds) have been packaged into a single archive, available for $12 (US). This fee helps pay for bandwidth, and is also compensation for the time I put into writing the book (first of all), and then converting it to PDF, with editing and layout. Overall, I have invested about 600 hours into this book. If you enjoy this book and find it useful, please consider ordering the source files to support the work I put into it, since it never reached the retail market. I have received such a huge response from this e-book that I know it was worth the effort!
The CD-ROM would have come with source code and tools had the book gone to print. Since it’s easy to download the GBA development tool (HAM), I won’t include it here. Included are media files, batch files, headers, sources, HAM project files–really everything you need to quickly start writing GBA code, and it will run on a real GBA using a flash cartridge, or via emulator. You can download the tools and pre-compiled binaries (below) to go along with the sources.
Educators
Are you an educator looking to use the GBA as a learning tool for embedded or handheld systems development? I teach a course in handheld development at the University of Advancing Technology using all of the material from this book and sources.
Each semester, my students create a final game project. Here is one student project called “1942-Point-5″ by Justin Walsh. If you would like to use the GBA in your own course on handheld or embedded systems, I have PowerPoint slides available that cover the GBA material in the book which is updated every time I teach the course (twice per year). Please contact me to let me know you are using the PowerPoints. Although I do not keep track of contacts, I enjoy hearing of how these materials have been helpful to others.
The slides are suitable for a projector. The latest update to the sources–adding a Mappy scroller example–is a result of this course and the provided PowerPoint on exporting Mappy levels to a format the GBA can use. If you use these lectures in your course, I would appreciate receiving credit for it; likewise, if you improve a lecture, please send me an update so it will benefit all! (Should I GPL the lectures?
If you are an educator, you may request the sources for free by contacting me.
DOWNLOAD THE E-BOOK
In the interest of saving bandwidth I am providing compressed chapter files, not the raw PDFs here. You may download WinRar to extract the PDFs from these archives. I thank Kenta Hirota for introducing me to 7-Zip compression, which is 15% more efficient than Rar. Included below is a 7-zip containing all chapters in a single archive.
| Introduction with Foreward by John Romero | RAR 284KB |
Part One : The Zen of Getting Started |
|
| Chapter 1 : Welcome To The Console World | RAR 204KB |
| Chapter 2 : Game Boy Architecture In A Nutshell | RAR 220KB |
| Chapter 3 : Game Boy Development Tools | RAR 1.0MB |
| Chapter 4 : Starting With The Basics | RAR 1.5MB |
Part Two : Being One With The Pixel |
|
| Chapter 5 : Bitmap-Based Video Modes | RAR 2.3MB |
| Chapter 6 : Tile-Based Video Modes | RAR 650KB |
| Chapter 7 : Rounding Up Sprites | RAR 490KB |
Part Three : Meditating On The Hardware |
|
| Chapter 8 : Using Interrupts and Timers | RAR 335KB |
| Chapter 9 : The Sound System | RAR 270KB |
| Chapter 10 : Interfacing With The Buttons | RAR 330KB |
| Chapter 11 : ARM7 Assembly Language Primer | RAR 327KB |
Part Four : The Mother of All Appendices |
RAR 283KB |
| Appendix A : ASCII Chart | |
| Appendix B : Recommended Books and Web Sites | |
| Appendix C : Game Boy Advance Hardware Reference | |
| Appendix D : Answers To The Chapter Quizzes | |
| Appendix E : Using The CD-ROM
Download entire e-book in 7-zip format here. You should be able to open a 7z archive using WinRar. If not, just google for the 7-Zip program and get the latest version. |
GBA SOURCES
You may order the sources for $12.00 using your PayPal account balance or direct debit.
Please note: I do not accept credit card transactions because PayPay charges a fee. I only accept a direct transfer from a PayPal account or via direct debit. When you place your order, you will receive a response via email with a link to the source code files. To proceed, click the link below, which will take you to PayPal to complete the transaction. If you are a teacher, I will send you the sources for free.
Screenshots
Here are some screenshots from the example C and assembly programs developed in the book using Visual HAM, HAM SDK, and VisualBoyAdvance emulator. In addition to drawing pixels and sprites, the book teaches how to draw lines, boxes, and circles using low-level C code, all of which is capable of running directly on your GBA using a flash linker.
I have no desire to update the book, although I promised a 2nd edition last year. I apologize if you were looking forward to a new edition, but time is a luxury and I haven’t any to spare. I also have no plans to do a DS book. Here are two advertisements that were up on Gamedev.net for a while.

