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 > GBA, how do i force a communications circuit reset ?

#45695 - PeaceKeeper2 - Mon Jun 13, 2005 9:35 pm

Hi,

I have a game for 4 players using 4 GBA's and a 4 player cable.

Everything works fine until i rearrange the cables whilst playing the game.

After i've done this, the multiplayer comms will never find any connected machines until the cables are returned to their original order. (The machines are basically keeping their master, slave id's).

I've tried to force a communications circuit reset by changing comms mode after i have detected the interrupted game communications (when you whip the cables out) - but i doesn't appear to help (or is maybe getting optimised away by my compiler).

Does anybody know how to force a communications circuit reset - or is my theory that this is what i need to do actually incorrect ?

Cheers
PK

UPDATE: found my bug! theory is correct - but i'd stupidly used START_BUTTON instead of SIO_START when writing to REG_SIOCNT... too many late nights!

#45843 - Miked0801 - Wed Jun 15, 2005 6:59 pm

Changing cable connections while a game is running huh. That will play havok with multiplayer code on most systems. The machine number is handled by how far it is from the master in the chain. Changing this will cause chaos :)