Skip to content
Branch: master
Find file History
Fetching latest commit…
Cannot retrieve the latest commit at this time.
Type Name Latest commit message Commit time
Failed to load latest commit information.

n360 USB Driver Source

This is the source code for the USB driver for my n360 PCB (See The code is written for the ATmega328PB and communicates with the MAX3421 USB Host Controller IC and is based on the USB Host Shield Library (

The data from the Xbox 360 controllers is then sent via serial to the Low Level N64 Protocol Microcontroller at high speed for final output to the Nintendo 64 console.

Driver Description Author
n360_usb This is the default driver for 4 x Xbox 360 Wireless Controllers with a USB Receiver. This is what is programmed on the n360 PCB from new. Ryzee119
n360_usb_barebone This is a Wireless Xbox 360 Controller Driver with no bells and whistles. Good starting point for development. Ryzee119
n360_usb_xbone Use up to 4x WIRED Xbox One Controllers. If using more than one controller you must use an externally powered USB 2.0 Hub. No LED indications, LB+RB+BACK to enable Goldeneye mode. Ryzee119

Building Code

Download the latest version of the Arduino IDE ( Ensure you install the Arduino Host Shield Library from the Library Manager: alt text Select the Board Type "Arduino Pro or Pro Mini" from the Board selection list, then select the Processor type "ATmega328P (3.3V, 8Mhz)" alt text

Download the .ino file from this repository and open it in the Arduino IDE. Once opened you can compile by clicking the 'tick' in the top left corner in the Arduino IDE to compile. alt text

Programming the n360

Connect a serial programming interface like to the 6 pin programming interface on the n360 PCB. Ensure that it can support up to 500kbaud speeds. You may need to solder a 6 pin header on the n360 PCB, alternatively if you just place the programmer into the holes on the PCB it will generally make contact with all the required points anyway. The 'DTR' pin is used to reset the Atmega328PB automatically to accept serial programming so is required.

In the Arduino IDE, goto Tools>Port and ensure you have selected the COM Port corresponding to your serial programmer. Mine happens to be COM5.
alt text

The programmer will not supply power to the n360 PCB, so you must power on the Nintendo 64 before programming. After programming you may need to power cycle the Nintendo 64 for the n360 PCB to correctly reset and initialise.

Press the 'Upload' button at the top left of the Arduino IDE to program.

This will not impact any existing saved games on the Controller Pak.

alt text

alt text


You can debug through the "Serial Monitor" within the Arduino IDE. Ensure that the correct COM Port has been selected and the baud rate should be changed to 500kbaud. You will probably gets lots of unreadable garbage. This is the binary data being sent to the N64 Protocol Microcontroller. You can actually debug this using an external serial port monitor that can view raw HEX data. I used a program called Termite with the "Hex View" plugin.

Comment out Serial.write((uint8_t *)tx_buf, (int)21); at the end of the code to stop this. This will ofcourse prevent the N64 Protocol Microcontroller from receiving data, but you can then include Serial.print throughout your code to debug the USB Host controller.

Once happy, you will need to comment out all your Serial.Print statements and re-add Serial.write((uint8_t *)tx_buf, (int)21);

You can’t perform that action at this time.
You signed in with another tab or window. Reload to refresh your session. You signed out in another tab or window. Reload to refresh your session.