When starting this research the focus was on the Nintendo 64 controller protocol and planning to cover the Gamecube later, the hope was to keep it simple. Further research confirmed there was a 3rd console (Gameboy Advance) using the same protocol and that the protocol has an official name "Joy Bus". At that time the scope of these pages expanded somewhat. While the scope increased the understanding of the overall protocol became clearer.
Please see the left sidebar for links to device specific details. Only the details common all devices will be covered below.
All of the known supported consoles and devices use the Joy Bus protocol which is digital using both 0V (LOW) and 3.3V (HIGH). Care should be taken with the Gamecube connector which includes a 5V power pin for accessories. The GameBoy link cable includes a 5V pin as well, this is for GB and GBC compatibility. The GBA itself is 3.3V peak.
If you are implementing a controller be sure to include at least a 1k ohm pull-up resistor, although some implementing the JoyBus protocol found as high as 3.3K to be better. Measuring the resistance across the 3.3V pin and the Data pin shows 760 Ohm in a Nintendo branded Smoke Controller.
Joy Bus Protocol Basics
The basic shapes for each bit are the following:
The Zero, One and Controller Stop Bit are each 4 microseconds long and the Console Stop bit is 3 microseconds long. To clarify one microsecond is 1 / millionth of a second. This results in a maximum bit rate of 250 kbits. The actual data rate is lower because of protocol overhead and response times.
This protocol isn't standard so it's usually implemented "bit-bang" style which means manually toggling the state of the pin, generally in assembly language, to get the desired performance. This can be challenging with some microcontrollers.
In order to produce the maximum bit rate (250,000 Hz) the microcontroller/fpga needs to be able to toggle a pins state 4 times that speed (1,000,000 Hz). When considering a microcontroller review closely the "Instructions per clock cycle". Many PIC models are 1 instruction / 4 clock cycles, which will make the code harder to write. Commonly AVR microcontrollers are closer to 1 instruction / 1 clock cycle. This assumes the use of assembly language, this type of timing accuracy is nearly impossible with C or other high level languages.
A Joybus transaction includes the following:
If the Accessory does not support the command, there is no response, not even the Controller Stop Bit.
The JoyBus Protocol requires accessory devices to support the following 2 commands
The difference is that if the accessory device supports a hardware reset it should do that only on the 0xFF command. Both commands start with the console sending the 1 byte command (0x00 or 0xFF) and expecting a 3 byte response. The Response is a 2 byte identifier and a 1 byte status.
The confirmed identifiers for the N64 (Still more to confirm):
The status byte has the following values for Controllers
The status byte has the following values for the Voice Recognition Unit
There are many other commands implemented by varying pieces of hardware please see their specific sub pages for more details.