Shop OBEX P1 Docs P2 Docs Learn Events
Gamecube Controller Serial Data Interface? — Parallax Forums

Gamecube Controller Serial Data Interface?

waferswafers Posts: 2
edited 2009-06-19 04:22 in Propeller 1
Hello, I'm wondering if this project is possible & looking for tips on getting started.

I hope to send digital data serially to my Gamecube through my Gamecube controller, when a particular button is pressed. This is essentially a macro controller, where a button press will send a sequence of button presses to the console. Hoping for the cheapest, easiest option, as I need to complete this project as soon as possible. I'm really not sure where to start, and any links to informational resources or advice would be greatly appreciated.


Thank you,

wafers (:

Comments

  • Oldbitcollector (Jeff)Oldbitcollector (Jeff) Posts: 8,091
    edited 2009-06-14 15:07
    Sounds like some transistors, a propeller, and a button and you'd be all set.
    I'll see if I can fish out my Atari controller based on the same concept.
    It's not Gamecube, but the concept should work the same.

    OBC

    ▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
    New to the Propeller?

    Visit the: The Propeller Pages @ Warranty Void.
  • KyeKye Posts: 2,200
    edited 2009-06-14 15:41
    This would not be so hard.

    First, find the data line on the gamecube controller and attach a transistor to that line in open drain fashion. Most data lines for such things are idle high... but the technology may differ so you need to find out how to interface with the line.

    Then make one pin an input on the propeller chip that is directly atttached to the line through a small resistor and another pin that is an output controlling the transistor. Make sure to use resistors where nessary.

    Basically, just log the data that travels through the line when a button is pressed to see what command needs to be sent through the data line for a particular button.

    Then use some tables and pattern matching (you do that your self - no math or program required) to firgue out the exact stream of commands that need to be sent.

    ▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
    Nyamekye,
  • ericballericball Posts: 774
    edited 2009-06-15 15:52
  • waferswafers Posts: 2
    edited 2009-06-15 19:22
    Serial Data Interface
    The controller uses one bi-directional data line (Pin 2 - Red) to communicate with the console. This is an active high 3.43V logic signal, using a pull-up resistor to hold the line high, and pulling it low with an open-collector transistor when a low needs to be transmitted. Communication is initiated by the console sending a 24-bit string to the controller, after which the controller responds with 64-bits of button state and joystick data.
    Although I first thought that the controller had an internal pull-up resistor (measured 745 ohms), in practice I had to use an external 1K pull-up resistor between the 3.43V rail and the the data line in my prototype interface.
    The transfer speed is rather fast at around 4us per bit. As with the N64 controller, a low bit is signalled by a 3us low followed by 1us high, and a high bit is signalled by 1us low followed by 3us high. Yes, it's just like the N64 controller!


    I think I'm looking for information on sending digital data, and which type(s) of microcontrollers would be best for the job, but I'm not entirely sure that this is what is necessary. Thanks for the replies! Research leads me to believe that a PIC with UART will do the trick ... still researching.

    Post Edited (wafers) : 6/15/2009 8:32:02 PM GMT
  • edited 2009-06-15 20:26
    A gamer friend of mine said the X-box controller would be better for Robotics because it has more buttons and there are two buttons on the side which fit better than other controllers.

    There are other controllers which would be easier to program like the old Atari joysticks but they aren't the most advanced.
  • DogPDogP Posts: 168
    edited 2009-06-19 04:22
    I assume you've seen: http://obex.parallax.com/objects/99/ ... I think you want the opposite of that, right? Rather than reading a GC controller w/ the prop, you want to emulate a GC controller w/ the prop? Reading that code should give you a hint of how to do it, since that shows what data is returned from the controller with which inputs, so instead you need to change it to be the one returning the data. There's something like that to emulate the Playstation 2 controller: http://obex.parallax.com/objects/153/ , and I've written something like that to emulate the old Nintendo protocol (NES/SNES/VB).

    DogP
Sign In or Register to comment.