Nintendo Joy Bus Controller Documentation

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.

Electrical General

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.

  • Data (Logic High = 3.3 Volts, Logic Low = Ground)
  • Controller Data line is "Open Collector"
    • Do not pull it high manually, force it low then let go
    • The controller has a pull-up resistor to take care of this.
    • Console Data line is pulled high internally.

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:

N64 Bits / Stop bits diagram

Electrical Details - Bits

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.

Electrical Details - Transactions

A Joybus transaction includes the following:

  1. Console Sends Command Byte
  2. Console Sends Data Byte(s) (Optional depends on the command)
  3. Console Sends Console Stop Bit
  4. Accessory Sends with Data Byte(s) (If command is supported)
  5. Accessory Sends Controller Stop Bit (If command is supported)

If the Accessory does not support the command, there is no response, not even the Controller Stop Bit.

Minimum Commands Required

The JoyBus Protocol requires accessory devices to support the following 2 commands

  • Command 0x00 - Initialization / Query
  • Command 0xFF - Reset / Initialization / Query

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):

  • Nothing Connected = 0xFFFF
  • Unknown = 0x0000
  • Controller = 0x0500
  • Dancepad = 0x0500
  • Voice Recognition Unit = 0x0001
  • Mouse = 0x0200
  • Keyboard = 0x0002
  • Train Controller = 0x0500
  • GBA Handheld = 0x0004

The status byte has the following values for Controllers

  • 0x01 Something is plugged into the port under the standard controller
  • 0x02 Nothing is plugged into the port under the standard controller
  • 0x04 Controller Read/Write CRC had an error.

The status byte has the following values for the Voice Recognition Unit

  • 0x00 Uninitialized
  • 0x01 Initialized and ready for Voice Recognition

There are many other commands implemented by varying pieces of hardware please see their specific sub pages for more details.