Hardware/Serial Interface

From WiiBrew
Jump to: navigation, search
Serial Interface
Access
BroadwayFull
StarletFull[check]
Registers
Base0x0d806400
Length0x100
Access size32 bits
Byte orderBig Endian
IRQs
Broadway3
This box: view  talk  edit

The Serial Interface is used to talk to the 4 GameCube controllers ("joypads").

Registers

SIC0OUTBUF (0xCD006400)
  31 30 29 28 27 26 25 24 23 22 21 20 19 18 17 16
Access U R/W
Field CMD
  15 14 13 12 11 10 9 8 7 6 5 4 3 2 1 0
Access R/W R/W
Field OUTPUT0 OUTPUT1

SIC1OUTBUF (0xCD00640c)
  31 30 29 28 27 26 25 24 23 22 21 20 19 18 17 16
Access U R/W
Field CMD
  15 14 13 12 11 10 9 8 7 6 5 4 3 2 1 0
Access R/W R/W
Field OUTPUT0 OUTPUT1

SIC2OUTBUF (0xCD006418)
  31 30 29 28 27 26 25 24 23 22 21 20 19 18 17 16
Access U R/W
Field CMD
  15 14 13 12 11 10 9 8 7 6 5 4 3 2 1 0
Access R/W R/W
Field OUTPUT0 OUTPUT1

SIC3OUTBUF (0xCD006424)
  31 30 29 28 27 26 25 24 23 22 21 20 19 18 17 16
Access U R/W
Field CMD
  15 14 13 12 11 10 9 8 7 6 5 4 3 2 1 0
Access R/W R/W
Field OUTPUT0 OUTPUT1


These registers are double buffered, so main processor writes to the SICxOUTBUF will not interfere with the serial interface output transfer. Internally, a second buffer is used to hold the output data to be transferred across the serial interface. To check if SICxOUTBUF has been transferred to the second buffer, main processor polls the SISR[WRST0] register. When SICxOUTBUF is transferred, SISR[WRST0] is cleared.

Field Description
CMD This byte is the opcode for the command sent to the controller during each command/response packet. This is the first data byte sent from the SI I/F to the game controller in the command/response packet.
OUTPUT0 This is the first data byte of the command packet. It is the second data byte sent from the SI I/F to the game controller in the command/response packet.
OUTPUT1 This is the second data byte of the command packet. It is the third data byte sent from the SI I/F to the game controller in the command/response packet.