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.

C/C++ > Programming a simple I/O serial communication transaction

#9565 - Mr. GBA - Fri Aug 08, 2003 10:21 pm

Has anybody implemented the GBA serial communication registers? if so, please post the code for transmitting data from the master to the slave and vice versa.

Thank u 4 ur time.
_________________
my dev/business site:

http://codebytesdev.afraid.org

#9585 - slip - Sat Aug 09, 2003 2:29 pm

I've tried using various methods, but I could only get transfer to work one way. howevere since then I've found I'm probably losing data because I wasn't allowing a delay between transfers. I'll let you know how it goes when I get around to sorting it out again, that or someone else might be able to help you out. But in the mean time check out the gbatek document and read the part about serial communication, thats what I was working off.
_________________
[url="http://www.ice-d.com"]www.ice-d.com[/url]

#9591 - Mr. GBA - Sat Aug 09, 2003 4:02 pm

Thanks for the useful info slip. I'll investigate this gbatek document
_________________
my dev/business site:

http://codebytesdev.afraid.org

#9759 - Mr. GBA - Sat Aug 16, 2003 3:03 pm

Hi Slip, you said that you was previously working on GBA communications. Since I've had no such luck in finding information since posting this topic, I was wandering if you would be as kind as to email the code you were working on so that I could get a sense of the requirements for GBA communication.

My email address is jasoncampbell122@hotmail.com

Thanks Slip.
_________________
my dev/business site:

http://codebytesdev.afraid.org

#9963 - Mr. GBA - Sat Aug 23, 2003 4:25 pm

After all this time (amongst doing other things), I still haven't had any luck. This is how far I've got for doing Normal Mode communciation.

REG_SCD0 = 0x?????? \\This initializes the data I want sent

REG_SCCNT_L = BIT13; \\Set 32 bit Communication mode

while(REG_SCCNT_L & BIT02) {} //wait for SI to become low

//GBA has detected tje GBA link cable

REG_SCCNT_L = REG_SCCNT_L | BIT07; //Set start flag

while(REG_SCCNT_L & BIT07) {} //wait IRQ to become 0

//Process recieved data


Can someone please help me send information to another GBA without a cartridge so I can run a program on it.

Thanks
_________________
my dev/business site:

http://codebytesdev.afraid.org

#9965 - tepples - Sat Aug 23, 2003 5:27 pm

Basic multiboot source code can be found here.
_________________
-- Where is he?
-- Who?
-- You know, the human.
-- I think he moved to Tilwick.

#9972 - Mr. GBA - Sat Aug 23, 2003 8:20 pm

Thanks Tepples, I've returned to pledge my indebtedness for your help. My month long conquest to send information via GBA's is over. The code I needed was within the "send.h" file at "downtou.cjb.net".

Once again, Thanks
_________________
my dev/business site:

http://codebytesdev.afraid.org

#36432 - Maverick - Sat Feb 19, 2005 9:36 pm

I worked a simple version of this out a while ago.

The information is up on my site: http://downtou.cjb.net

I have worked out a little more since then and have yet to update.

#define PLAYER_CNT *(vu8 *)0x4000134

#define PLAYER1 0x80

This bit gets set to 0x80 if the player one link cable is plugged in, player 2-4 seems to do nothing.

Hope this helps you!

Sorry about the bump

#36723 - Maverick - Mon Feb 28, 2005 8:37 pm

Sorry about this, i didnt realise i hadnt uploaded the linking tutorial. Its there now, but it all needs some serious updating. Will hopefully get round to this soon.

Oh, by the way, ive changed the web address to: http://downtou.whiz.at/, it now has no pop ups.
_________________
http://downtou.ne1.net/

#40534 - Krakken - Wed Apr 20, 2005 12:47 am

It's pretty simple when you get down to it. The way I did it was to buy myself a copy of NO$GBA which allows you to view the serial comms registers as it emulates it.

As slip said, the GBATek document is your best bet.

I may upload the serial communications part of the library soon. It does have a slip area in there somewhere where an error can occasionally get past my error detection which I may fix first or I may just give out as is.