More pies

Wednesday, March 17, 2010

GameBoyAdvance Multiboot Cable

I was looking at arm dev boards and thought they were a bit expensive then noticed that a GameBoyAdvance was arm based, £5 and supported uploading programs over a strange 16 bit serial connection referred to as multiboot (the GBA used this for multiplayer games).

After spending a lot of time trying to find somewhere that either still sells a multiboot cable or good diagrams / documentation on the multiboot protocol or even code for making a multiboot cable which doesn’t require dos / a parallel port to upload data I stumbled across Matt’s Multiboot Serial Cable (http://www.axio.ms/projects/GBA/) which was one of the few sites which wasnt full of dead links.

The MSMC implements a smart serial cable (serial <-> microcontroller <-> GBA) to convert between standard 8 bit serial and the the GBA’s strange 16 bit serial format. The only slight problem being that it was written in asm for the 8051 and I didn’t have anything 8051 based. I did however have an arduino and several bare ATMega168 ICs in my parts box (the microcontroller code is ~ 1.5k so this overkill to a silly extent).

To cut a long story short I ported his microcontroller code (mainly using the comments) to my Arduino prototype board and now have it running on a bare atmega168 using the internal oscillator. I have also made a few tweaks to the upload tool.

Download the microcontroller code and upload tool here

To upload a GBA multiboot image using an arduino

  • wire the GBA pins up to the arduino (instructions at the top of the source in the arduinocable directory)
  • flash the code in the arduinocable directory onto an arduino / atmega168
  • compile the upload tool and run gbl -p/dev/ttyUSB0 -d1 ./image.gba

(Note: I haven’t tried it on anything other than an x86 box running ubuntu 9.10 but it works for me)

I’m thinking about adding a way upload code directly from the microcontroller to the GBA without the PC getting in the way. It should have enough spare flash for at least a 10k gba binary / I could read it from an SD card and is a shedload easier to get hold of than a writable GBA cart.

A big thanks to Matt Evans (http://axio.ms) for writing the original and keeping the source on his website for nearly 8 years.

posted by eaterofpies at 13:46  

3 Comments »

  1. [...] on the Game Boy Advance as a development package. In order to get his code onto the device he build an Arduino-based communications cable. It is necessary to have a microcontroller involved because the GBA uses a peculiar 16-bit serial [...]

    Pingback by Arduino based multiboot cable for Game Boy Advance - Hack a Day — 18/03/2010 @ 11:01

  2. Wow, this is really cool, but there’s is something I don’t understand… With this sketch you can burn GBA’s ram only or you can flash memories like this?
    (http://www.dealextreme.com/details.dx/sku.25752)
    I’m looking for a way to burn this flash card without windows.

    Comment by Aggaz — 19/03/2010 @ 06:32

  3. It only lets you upload your program to the GBAs ram. It wont let you flash a cart.

    Comment by eaterofpies — 19/03/2010 @ 10:46

RSS feed for comments on this post. TrackBack URI

Leave a comment

Powered by WordPress