GameCube Controller on PC...


What I want to do is build an adaptator to connect the GC controller on PC (Linux or Win), using USB port.

If you are interested, write to m_den.mail@free.fr  (DANGER:remove one of the 'm_', it's against web-robotsDANGER:)

This adaptator should be HID to be recognized by any modern OS as a Joystick without any driver.

I have prospected the internet to find some informations about GC Controller, here's what I've found:

here is the N64 controller circuit:
CIRCUIT SHEM

Command from the console : the last bit is the rumble motor (Set=enable/Clear=disable).
Response from the controller :
Byte 0 0 0 0 Start Y X B A
Byte 1 1 L R Z D-Up D-Down D-Right D-Left
Byte 2

  Joystick X Value (8 bit)

Byte 3   Joystick Y Value (8 bit)
Byte 4   C-Stick X Value (8 bit)
Byte 5   C-Stick Y Value (8 bit)
Byte 6   Left Button Value (8 bit) - may be 4-bit mode also?
Byte 7

  Right Button Value (8 bit) - may be 4-bit mode also?

That's all I have for the moment!
I have seen informations about a PIC microcontroller that can handle USB (low speed would be sufficient I think), so maybe it can be built around this component,
There are also serial ready-to-use interfaces : USB <-> RS232 or USB <-> Parallel they are fast (>500kbps), but a bit expensive.
And what about HID?
I think a specific driver must be written.

searched for YAGCD... YACD Project
and found:

9.2  standard Controller

9.2.1  Init

Command Word 0x00400000 - enable polling 0x00000300 - ? 0x00000100 - ? 0x00000001 - enable rumble motor

Commands: 0x00 - get id+status 0x40 - ? 0x41 - get origins 0x42 - calibrate ?

9.2.2  Read Controller Status

first input word
bit(s)   Description
31   ERRSTAT - (assumed 0)
30   ERRLATCH - (assumed 0)
29   unused (?)
28 s Start Button
27 y Y Button
26 x X Button
25 b B Button
24 a A Button
23   unused (?)
22 L L Trigger
21 R R Trigger
20   Z Trigger
19 u D-Pad Up
18 d D-Pad Down
17 r D-Pad Right
16 l D-Pad Left
8-15 x Analog Stick X (8bit unsigned, ~32...128...~224)
0-7 y Analog Stick Y (8bit unsigned, ~32...128...~224)


second input word
bit(s)   Description
24-31 x Analog C Stick X (8bit unsigned, ~32...128...~224)
16-23 y Analog C Stick Y (8bit unsigned, ~32...128...~224)
8-15 l L Trigger Analog (8bit unsigned, ~32...~224)
0-7 r R Trigger Analog (8bit unsigned, ~32...~224)

9.2.3  rumble Motor On

*(volatile unsigned long*)0xCC006400 = 0x00400001; *(volatile unsigned long*)0xCC006438 = 0x80000000; 

9.2.4  rumble Motor Off

*(volatile unsigned long*)0xCC006400 = 0x00400000; *(volatile unsigned long*)0xCC006438 = 0x80000000; YACD Project

Links and references:
http://www.int03.co.uk/crema/hardware/gamecube/gc-control.htm thanks to you!
http://www.zen35383.zen.co.uk/stnield/usbpads.htm
http://ezhid.sourceforge.net/gcpad.html
http://home.t-online.de/home/stephan.hans/n64.htm