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 > 16bit multi-player

#177191 - Dekota - Sun Jan 15, 2012 1:41 pm

Hi,

I'm currently trying to get a basic understanding of the multi-player mode. currently I can connect 2 GBA's together (using VBA linker atm) and establish a connection and can send data between them.

The problem I'm having is how to send data x and then send data y so both GBA's could send a position between each other.

From what I've read there is meant to be a delay of 600 ticks + send interval.

so far I'm just sending the data and then waiting for the 7th bit to become 0 of SCCNT_L (REG_SIOCNT in libgba) and then giving the send register a new value and start the communication again.

I'm also not using a interrupt for the communication (mainly because I have no idea how to set it up).

Thanks

#177193 - ScottLininger - Tue Jan 17, 2012 6:45 pm

I put together this example project a while ago. Maybe there'll be something useful in there?

http://www.scottlininger.com/projects/downloads/MultiplayerV1.zip

Cheers,

Scott
_________________
Some of my GBA projects

#177195 - Dekota - Tue Jan 17, 2012 8:56 pm

Thank you very much.

I will have a good read through this and work out where I am going wrong.

I take it multiplayer.c has all multi-player functions and pin8gba.h is your definitions of memory addresses.

and the two agbtty have no relevance to the actual multi-player code

#177197 - ScottLininger - Wed Jan 18, 2012 1:11 am

Dekota wrote:
Thank you very much.

I will have a good read through this and work out where I am going wrong.

I take it multiplayer.c has all multi-player functions and pin8gba.h is your definitions of memory addresses.

and the two agbtty have no relevance to the actual multi-player code


Yeah, that all sounds right. pin8gba.h is an excellent little wrapper by Tepples. The adbtty is just for console-like text display.

-Scott
_________________
Some of my GBA projects

#177199 - Dekota - Wed Jan 18, 2012 4:11 pm

Ok thats awesome

now just need to find the time to try and read through it. sometimes there is not enough hours in the day.