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  

Powered by WordPress