gbadev.org forum archive

This is a read-only mirror of the content originally found on forum.gbadev.org (now offline), salvaged from Wayback machine copies. A new forum can be found here.

Coding > Linking with other GBAs

#7296 - Arek the Absolute - Sat Jun 14, 2003 3:39 am

I've been reading all the stuff I can find on the gba's serial communication registers and all that... And I think I'm actually getting the hang of how they work in general. I still have one problem though... I can only see how programs could work if every gba had its own cartridge. My problem in short is that I'd like to know more about how to have one gba controlled by a cartridge in another, like some of the modes in Mario Kart or a few other games.

In more detail, the way it seems to me is that when you send data over a link cable to another GBA, it ends up in one of the REG_SCDx registers corresponding to the ID of the GBA that sent the data. (to use the names in the Cowbite Spec, that is) Now, if that's strictly the case, I can't see how I can send data to, for example, draw a sprite on the screen of the other GBA. It seems to me that if the data just ends up in the REG_SCD register, there's no way I can control what's done with it once it's been sent. Using two cartridges you can easily just have the second cartridge run a program that can handle the data it recieves, but I'm at a bit of a roadblock on how to operate with only one cartridge. Unfortunately, it seems that this is also a very poorly documented subject. Does anyone have any ideas as to what needs to be done?

Much appreciation and much thanks in advance!
_________________
-Arek the Absolute

#7298 - tepples - Sat Jun 14, 2003 3:52 am

Arek the Absolute wrote:
I can only see how programs could work if every gba had its own cartridge. My problem in short is that I'd like to know more about how to have one gba controlled by a cartridge in another, like some of the modes in Mario Kart or a few other games.

That's called "multiboot". The machine with the Game Pak sends a short (128 KB or so) program to all the other machines. An explanation of the multiboot protocol is in GBATEK by Martin Korth; an example of a multiboot server program is in Down To You.
_________________
-- Where is he?
-- Who?
-- You know, the human.
-- I think he moved to Tilwick.

#7517 - Arek the Absolute - Thu Jun 19, 2003 1:05 am

Just wanted to say thanks for the good info. :) Helped a bunch!
_________________
-Arek the Absolute