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 > Wireless adapter - how it works

#39046 - denopqrihg - Sun Apr 03, 2005 8:29 pm

I've been playing around with this thing (though I don't have it :D ) for quite a long time now, so I decided to share my investigations:

Initialization:
1) Output SD=low, SO=low
2) Output SD=high, SO=low for about 18500 clocks
3) Output SD=low, SO=low
4) Using Normal mode with external clock, send the following data:
Send Receive
0xgggg494e 0x494egggg
0xb6b1494e 0x494eb6b1
0xb6b1544e 0x544eb6b1
0xabb1544e 0x544eabb1
0xabb14e45 0x4e45abb1
0xb1ba4e45 0x4e45b1ba
0xb1ba4f44 0x4f44b1ba
0xb0bb4f44 0x4f44b0bb
0xb0bb8001 0x8001b0bb
5) Shift to 2Mhz Normal mode with internal clock and send:
Send Receive
0x9966003d 0x80000000
0x80000000 0x996600bd

(gggg = garbage)
Basically, you send the text "NINTENDO/x01/x80" in the lower halfword 2 bytes at a time in little endian form and 1's complement of the higher halfword received last time.

Using the adapter:
The adapter uses 2Mbps Normal mode for communication with the GBA (select internal clock).
You can send various commands to the adapter (the purpose of most of them is unknown).
The format is:
Send Receive
0x9966wwcc 0x80000000
data... 0x80000000
0x80000000 0x9966wwaa
0x80000000 data...

where ww is the number of words (4byte units) following the command, cc is the command, and aa is ackowledged command (cc|0x80).

Also, each transmission (sending of EVERY 4 bytes) is followed by an ackowledge procedure:
Set SO = high, wait until SI = low
Then set SO = low, wait until SI = high
(can be done in normal mode)

The meaning of following commands is known (=I have an interpretation for them):
Command 0x3d and 0x10:
Last step of the initialization procedure. Difference between 0x3d and 0x10 is unknown.
Command 0x16:
Followed by any number of data words (Nintendo games usually use 6 words = 24 bytes).
Send broadcast data. This data will be received by all adapters in range.
Command 0x1d:
Receive broadcast data.
The adapter sends broadcast data from all other adapters to the GBA using the following structure:
1 word: ID of the sending adapter (or maybe just the lower halfword)
n words: data
This structure is repeated for each adpater.
Command 0x1f:
Select which adapter you want to communicate with (identified by its ID).

Partly known commands:
Command 0x17:
Followed by 1 word of data. Most likely some kind of setup (used once at the beginning).

Usage of other commands is completely unknown.
Commands used by Nintendo include: 0x11, 0x13, 0x19, 0x1a, 0x26 and more, some of which I believe are for direct communication between two adapters.

This info should be sufficient for making a simple broadcasting game.

It's in no way complete or confirmed, if you find something that doesn't work or find out some new information, go ahead and post.

This is a copy of the same topic at vbalink http://vbalink.wz.cz/phpbb2/viewtopic.php?t=565

You can download the document here.

#39048 - FluBBa - Sun Apr 03, 2005 8:58 pm

denopqrihg wrote:

Basically, you send the text "NINTENDO/x01/x80" in the lower halfword 2 bytes at a time in little endian form and 1's complement of the higher halfword received last time.


Funny... seems just like how you communicate with the Gameboy Player =)
Didn't someone say something about the DS acting weird when trying to communicate through the coms port?
_________________
I probably suck, my not is a programmer.

#39087 - denopqrihg - Mon Apr 04, 2005 11:50 am

why would they make a new interface when they don't have to? :-)

Do you think that if you plugged in a Gameboy player (what is it anyway?), the games would think it's a wireless adapter?

#39115 - FluBBa - Mon Apr 04, 2005 6:08 pm

The Gameboy Player is an adapter for the Gamecube, it's a GBA in a box so you can play it on a TV, plus you can use the rumble function in the GC joypad.

The GBP sends 0xB0BB8002 instead of 0xB0BB8001.
_________________
I probably suck, my not is a programmer.

#39117 - denopqrihg - Mon Apr 04, 2005 6:16 pm

is there some documentation about the GBA player somewhere?

#39120 - wintermute - Mon Apr 04, 2005 7:33 pm

I was under the impression that the wireless adapter needed no special code in order to work. Certainly the Majesco one doesn't.

I think you may just be REing a particular game's multiplayer code

#39125 - FluBBa - Mon Apr 04, 2005 9:33 pm

denopqrihg wrote:
is there some documentation about the GBA player somewhere?

If you mean anything other than what Nintendo has public, I'm writing it right now.
_________________
I probably suck, my not is a programmer.

#39140 - tepples - Tue Apr 05, 2005 2:54 am

wintermute wrote:
I was under the impression that the wireless adapter needed no special code in order to work. Certainly the Majesco one doesn't.

There are three different wireless adapters:
  • The Majesco GBA wireless adapter tunnels GBA multiplayer link cable signals at the layer 1 level.
  • The Nintendo GBA wireless adapter uses the proprietary protocol you speak of.
  • The Nintendo DS built-in wireless chip uses Wi-Fi (802.11b) up to layer 2. Games use either Ni-Fi or (in future titles) TCP/IP for layers 3 on up.

_________________
-- Where is he?
-- Who?
-- You know, the human.
-- I think he moved to Tilwick.

#39184 - denopqrihg - Tue Apr 05, 2005 7:29 pm

Yes, this is a description of the Nintendo wireless adapter (the one that comes with Pokemon FR/LG)

#40579 - John at J&S - Wed Apr 20, 2005 3:21 pm

I picked up a Majesco adapter at the mall last night. It was only $9.99, so I cut it open for a look.

They are using a Chipcon 2400 transceiver. Don't know about the MCU.

Photos here: http://www.jandssafeguard.com/GBAwireless/
_________________
Thinking is hard work