Skip to content
sbarrack edited this page Jul 3, 2019 · 10 revisions

Specifications

  • Bi-directional
  • Half-duplex
  • Asynchronous
  • Idle-high
  • Frequency
    • 1 MHz GC/N64
    • 800 kHz Wii

You can poll as fast as you want. Devices with memory (GBA, N64 Transfer Pak) may need more time.

Protocol

Signal Duty cycle
Zero ¯\____3 us____/¯¯¯¯¯
One ¯\1 us/¯¯¯¯¯¯¯¯¯¯¯¯¯
Console Stop ¯\1 us/¯¯¯¯¯¯¯¯¯
Controller Stop ¯\__2 us__/¯¯¯¯¯¯¯¯¯
Period ¯\______4 us______/¯

General commands

Command Signal Resonse
"Reset" 0xFF Status
"Init" 0x00 Status

Devices

Device ID
GBA 0x0004
N64 Controller 0x0500
GC Keyboard 0x0820
DK Bongos 0x0900
GC Controller 0x0900

Sample Structures

typedef union {
    uint8_t raw[3]; // struct is 3 bytes long

    struct {
        union {
            uint16_t device; // bytes will be reversed

            struct {
                uint8_t isDolphin : 1;
                uint8_t : 2;
                uint8_t notUltra64 : 2;
                uint8_t noRumble : 1;
                uint8_t : 2;
            };

            struct {
                uint8_t : 1;
                uint8_t fixedState : 1;
                uint8_t radioFreq : 1;
                uint8_t : 3;
                uint8_t receive : 1;
                uint8_t : 1;

                uint8_t type : 4; // 0x0=normal, 0x4=lite, 0x8=non-controller
                uint8_t notBrokenID : 1;
                uint8_t origin : 1;
                uint8_t : 2;
            } wireless;
        };

        union {
            uint8_t state;

            struct {
                uint8_t : 3;
                uint8_t rumble : 1;
                uint8_t : 4;
            };

            struct {
                uint8_t : 1;
                uint8_t receiving : 1;
                uint8_t : 1;
                uint8_t sending : 1;
                uint8_t general : 2;
                uint8_t : 2;
            } gba;
        };
    };
} Joybus_Status_t;

References

  1. https://sites.google.com/site/consoleprotocols/home/nintendo-joy-bus-documentation
  2. http://hitmen.c02.at/files/yagcd/yagcd/chap9.html#sec9
  3. https://github.com/NicoHood/Nintendo/blob/master/src/Gamecube_N64.h
  4. http://problemkaputt.de/gbatek.htm#sionormalmode
Clone this wiki locally