N64 Controller Serial Protocol Sniffer

N64 Controller Serial Protocol Sniffer Average ratng: 4,2/5 5721 reviews

2016-10-18  Reading an N64 controller with a microcontroller. But connecting the N64 controller to. The N64 controller uses a serial protocol to send 32 bits of controller. Table II: Nintendo 64 Controller Status Packet. Discovered by reverse engineering via logic analyzer and oscilloscope. Additional protocol information. Since both devices used a bidirectional serial signaling line, the converter needed to. 2018-7-25  N64 Controller. Nonvolatile Nintendo 64 Controller Pak. Half-duplex serial protocol. (Note that the N64 data is MSB first.

  1. Gamecube Controller Arduino
  2. Usb To N64 Adapter

You need more than just HDLC or FLEN for a dedicated sniffer app. You need some way to set the channel, etc. If this capability is going to be built into the NCP (which I plan to do), might as well use that.

For example, you can turn any spinel-based NCP into a sniffer (not considering the framing protocol) by sending it the following commands:

  • CMD_RESET
    • Bytes: 80 01
  • CMD_SET_PROP(PROP_PHY_ENABLED, 1)
    • Bytes: 80 03 20 01
  • CMD_SET_PROP(PROP_PHY_RAW_STREAM_ENABLED, 1)
    • Bytes: 80 03 27 01
  • CMD_SET_PROP(PROP_PHY_PROMISCUOUS_MODE_ENABLED, 1)
    • Bytes: 80 03 28 01
  • CMD_SET_PROP(PROP_PHY_CHAN, <Channel-Number>)
    • Bytes: 80 03 21 XX (where XX is the channel number in hex)

Then you would get raw frames on the given channel via updates to PROP_STREAM_RAW. The frames from the NCP would look like this:

Where:

N64 Controller Serial Protocol Sniffer
  • LL LL is the length of the raw packet (XX ... XX) in bytes, stored as a little-endian uint16.
  • RR ... RR is the bytes of the raw packet.
  • MM ... MM is optional metadata about the raw packet (Channel, RSSI, LQI, etc). Format TBD.

Gamecube Controller Arduino

N64

So, all things considered, it's really not any more complicated to talk to the NCP than it would be to talk to a dedicated sniffer app. Initialization is just sending the NCP a fixed set of frames, setting the last byte of the last frame to the channel. Then you handle any frame you receive starting with 80 06 71 as a received packet, and extract the packet bytes and metadata.

Usb To N64 Adapter

Note that this isn't actually implemented in the NCP yet, but doing so wouldn't be very difficult and is absolutely on my list of capabilities I intend to add.