Skip to the content
PCBKitNew board
2 layers38 × 21 mmCube64, the printed circuit board in 3D

GameCube controllers adaptor for N64

Size
38 × 21 mm
Copper layers
2
Thickness
1.6 mm
Parts
42
Nets
36
Pads
196
Tracks, vias
179, 5
Pours
2
Routed
Yes
KiCad
KiCad 5 (file 20171130)
Created
2 Aug 2015
Updated
26 Jul 2022

Overview

Cube64 is an open-source printed circuit board by darthcloud, from the darthcloud/cube64-dx repository on GitHub, published under the GPL-2.0 licence. It is a 2-layer board of 38 × 21 mm with 42 parts on 36 nets, routed with 179 tracks and 5 vias.

It is built around the PIC18F24Q10-I/SS. Its parts include 28 resistors, 5 capacitors, 4 connectors, 2 ICs and 1 diode. It belongs with the retro computing and games and interfaces and adapters boards and the PIC boards of this library.

Main components

1

README

README.md

See my new project:
BlueRetro - Multiplayer Bluetooth controllers adapter for retro video game consoles
https://hackaday.io/project/170365-blueretro
https://github.com/darthcloud/BlueRetro

Cube64

Introduction

This is a project to build an adaptor for using GameCube controllers with N64 consoles. The motivation behind this is that the N64 has some really great games, but the controller hardware is rather bad- the joysticks wear out quickly, and the layout is odd. The GameCube controllers, however, have a superset of the features and a much better joystick.

A secondary goal of this project is to more thoroughly reverse engineer the protocols involved and create reusable libraries for interfacing PIC microcontrollers to N64 and GameCube devices. The very basics of reverse engineering the two protocols were done before Micah (@scanlime) started this project, but she quickly discovered that there's much more to the protocol. We believe this project may be the first one to completely reverse engineer the protocol used by standard N64 controllers, including peripherals like the Controller and Rumble Paks.

All code here is released under the GPL. This means that if you have basic electronics skills and a way to program the microcontroller, you can build your own cube64 adaptor easily. The hardware is extremely simple, and all the complexity of reverse engineering and writing code is done for you ;)

Discussion

https://github.com/darthcloud/cube64-dx/discussions

Usage

The completed adaptor plugs into an N64 console, and a regular GameCube controller or WaveBird receiver plugs into the adaptor. The default button mapping is as follows:

GameCubeN64

By default the adaptor layout banks are loaded with the first four preset. See wiki for more information on the preset.

Main menu

All the configurable feature of the adaptor can be accessed thought this menu. To access the menu:

  1. Hold down the analog L and R buttons down most of the way, but not enough to push the end-stop buttons, and press Start.

The adaptor LED will be ON as long you are inside the menu.

Once in the menu the N64 will receive blank status packet regardless of buttons pressed on the GameCube controller. An invalid selection in the menu will exit the menu.

Menu options

Axis & Button remapping

The button mapping is stored in non-volatile memory, and may be modified during gameplay. To change the mapping for one button or axis direction:

  1. While in the main menu, press Start again.

  2. If you have the rumble power connected, you should feel a brief rumble.

  3. Press the button you wish to remap. This includes any button or axis direction.

  4. Press the button you want to map it to. This button is always interpreted according to the table below.

  5. If the mapping was successful and you have rumble power connected, you should feel a brief rumble.

GameCubeN64
Special function

It's possible to map a special function to a button instead of a N64 button.

  1. While in the main menu, press Y.

  2. If you have the rumble power connected, you should feel a brief rumble.

  3. Press the button you wish to set the function to.

  4. If you have the rumble power connected, you should feel a brief rumble.

  5. Press the button corresponding to the special function you want. This button is always interpreted according to the defaults below.

  6. If the mapping was successful and you have rumble power connected, you should feel a brief rumble.

Function available:
GameCubeFunction
Temporary overwrite current mapping layout
with layout corresponding to the D-pad
direction until button is released.
A+C-Down two buttons mapping.
B+C-Right two buttons mapping.
Turbo disable (Default).
Faster turbo.
Medium turbo.
Slower turbo.
Mapping analog trigger axes

By default button remapping and special function will only map to the digital trigger buttons. Pressing X before either menu options will allow mapping to the analog trigger axes.

  1. While in the main menu, press X.

  2. If you have the rumble power connected, you should feel a brief rumble.

  3. Press either Start or Y. See Axis & Button remapping or Special function sections for next steps.

Mapping layout reset

To reset the current active mapping layout to the above defaults:

  1. While in the main menu, press Z.

  2. If you have the rumble power connected and the reset was successful, you should feel a brief rumble.

Adaptor accessory mode

The adaptor can either emulate a Rumble Pak, let all controller slot command bypass to a real N64 controller or display the slot as empty. To switch between the modes:

  1. While in the main menu, press D-pad UP.

  2. If you have the rumble power connected, you should feel a brief rumble.

  3. Press D-pad UP for bypass mode, D-pad LEFT for Rumble Pak mode or D-pad RIGHT for emptied slot controller.

  4. If you have the rumble power connected and the mode change was successful, you should feel a brief rumble.

This setting is volatile. Adaptor always starts with Rumble Pak mode.

Empty mode is useful for some game that report error with a Rumble Pak. For those games, without even invoking the main menu you may simply hold D-pad RIGHT on power on to disable the Rumble Pak mode and avoid the error.

Holding D-pad UP at boot will set bypass mode as well.

Setting bypass mode while no N64 controller is present in the secondary adaptor port will make the adaptor reset.

Mapping layout selection

It is possible to save up to 4 sets of mapping layouts so you can easily use different keys mapping in different games. To change between the layout does the following:

  1. While in the main menu, press D-pad LEFT.

  2. If you have the rumble power connected, you should feel a brief rumble.

  3. Press one of the 4 D-pad directions which correspond to the 4 layout available.

  4. If you have the rumble power connected and the layout change was successful, you should feel a brief rumble.

All layout by default hold the default button configuration. Just select one of 4 layouts and then change the button configuration using the button mapping key combo described above.

When you select a layout, it is saved into the EEPROM so the next time you power up the adaptor the last used will be reloaded automatically.

GameCube joysticks config

By default the joysticks value from the GameCube controller are scale to match the N64 joystick value range. This can be disabled to use the GameCube range instead (< v3.1 behavior). A response curve can also be applied to a GC axis. By default none is applied (Linear). Scale and curve setting are save independently for each axis and each layout.

  1. While in the main menu, press D-pad RIGHT.

  2. If you have the rumble power connected, you should feel a brief rumble.

  3. Press either direction on one of the four GC joystick axes.

  4. If you have the rumble power connected, you should feel a brief rumble.

  5. Press X to enable or Y to disable the scaling function. Or press one of the D-pad directions for enabling a response curve. (UP: Aggressive, LEFT: Relaxed, RIGHT: Wide, DOWN: S-Curve) Or press A for no response curve (Linear).

  6. If you have the rumble power connected and the layout change was successful, you should feel a brief rumble.

This option is saved into the EEPROM so the next time you power up the adaptor the last used setting will be reloaded automatically.

Preconfigured button mapping layout

Eight pre-defined button mapping layout can be loaded in the currently active layout. See wiki for preset detail.

  1. While in the main menu, press D-pad DOWN.

  2. If you have the rumble power connected, you should feel a brief rumble.

  3. Press any direction on GC D-pad or main joystick to choose one preset.

  4. If you have the rumble power connected, you should feel a brief rumble.

Calibration

The adaptor handles calibration in almost the exact same way a GameCube does. If your joystick is drifting or unresponsive during gameplay, you should be able to recalibrate it by performing any of the following actions without touching the joystick, C-stick, L button, or R button:

  1. Hold down X, Y, and Start for a couple seconds during gameplay.

  2. Unplug the controller from the adaptor and plug it back in.

  3. Unplug the adaptor from the N64 and plug it back in.

  4. Turn off the N64 then turn it back on. (The reset button won't recalibrate, since the adaptor doesn't lose power or get reinitialized)

1 player 2 controllers control style

If connected to two ports of the system, the adaptor will answer automatically a limited button status and identity commands on the 2nd port. This allows to play GoldenEye 007 and Perfect Dark using their respective 1 player 2 controller control style.

Analog input map for the 1st controller C Buttons will map to the 2nd controller joystick. Digital input map for the 1st controller R button will map to the 2nd controller Z button.

Hardware

There are currently two versions of the Cube64 hardware:

  • The "Cube64 DIY" uses a PIC18F14K22 microcontroller. Just about any electronics hobbyist should be able to build it easily. 5V can be provided either externally or by using a charge pump in 8-pin SOIC package.

  • The "Cube64 SMD" uses a PIC18F24Q10 microcontroller, and a charge pump in 10-pin DFN package. PCB gerber and KiCad sources are provided.

Both versions of the hardware have the same button remapping features and responsiveness, as the only difference in their firmware is a few lines worth of compile-time configuration. The DIP version of the Q10 could also be used for the DIY version, but the package is bigger.

Status

The protocol used between the N64 and controller, and between the controller and Controller Pak is well understood now. An RS-232 to N64 bridge and several Python programs demonstrate just about all of the protocol.

The necessary subset of the protocol has been implemented in the Cube64 firmware to emulate an official N64 controller with Rumble Pak. If 5V power for the motor can be supplied to the GameCube controller, its rumble motor will be used to emulate the N64 Rumble Pak.

It should be possible to emulate the N64 Controller Pak using the results of the reverse engineering.

Contents

firmware

Source code for the firmware, in PIC assembly. It was developed using the open source "gputils" package (use latest snapshot). The firmware for the adaptor itself is "cube64.asm", but there are a few additional test programs and libraries.

hardware

This includes schematics and PCB for the adaptor, in KiCad source format.

notes

Utilities and documentation produced while reverse engineering.

Authors

  • Micah Elizabeth Scott - Initial version - scanlime
  • Jacques Gagnon - Newer stuff - DarthCloud

References

External links

Buttons graphic sources

Parts

42
QtyValueFootprintReferences
22DNPcube64:R_0402_1005MetricR1, R2, R10, R11, R12, R17, R18, R19, R20, R21, R22, R23, R24, R25, R26, R27 +6
32.2ucube64:C_0402_1005MetricC1, C2, C4
21Kcube64:R_0402_1005MetricR3, R9
264.9cube64:R_0402_1005MetricR13, R14
10.1ucube64:C_0402_1005MetricC3
1100Kcube64:R_0402_1005MetricR16
14.7ucube64:C_0603_1608MetricC5
1402Kcube64:R_0402_1005MetricR15
1CTRLcube64:PinHeader_2x06_P2.54mm_VerticalJ2
1ICSPcube64:PinHeader_1x05_P2.54mm_VerticalJ1
1LED_Dual_AACCcube64:D_0606_1616MetricD1
1LTC3203B-1cube64:DFN-10-1EP_3x3mm_P0.5mm_EP1.55x2.48mmU2
1PIC18F24Q10cube64:QFN-28-1EP_6x6mm_P0.65mm_EP4.25x4.25mm_ThermalViasU1
1SYScube64:PinHeader_2x06_P2.54mm_VerticalJ4
1UARTcube64:PinHeader_1x05_P2.54mm_VerticalJ3

The 40 most common of 42 parts.

Questions

How big is the Cube64 PCB?

It measures 38 × 21 mm and has 2 copper layers, 1.6 mm thick.

What parts does the Cube64 use?

42 parts, built around the PIC18F24Q10-I/SS. The full list of its parts is on this page, with links to each part's symbol and footprint where PCBKit's library has them.

Where can I download the Cube64 KiCad files?

From the darthcloud/cube64-dx repository on GitHub, at the commit this page was made from: the board is hardware/cube64.kicad_pcb. PCBKit opens the board in the browser, with nothing to install.

Can I use the Cube64 design in my own project?

Its repository publishes it under the GPL-2.0 licence: you may reuse it on that licence's terms (keep the author's notice, and for a copyleft licence share your changes alike).

More from darthcloud/cube64-dx

1
  • 2 layers84 × 86 mmCube64 panel, the printed circuit board in 3D

    Cube64 panel

    darthcloud/cube64-dx

    GameCube controllers adaptor for N64

    340 parts75GPL-2.0

Similar boards

  • 2 layers30 × 50 mmModuleV400, the printed circuit board in 3D

    ModuleV400

    stuartpittaway/diyBMSv4

    Version 4 of the diyBMS

    42 parts1.1k
  • 2 layers139.7 × 64.8 mmSprig console, the printed circuit board in 3D

    Sprig console

    hackclub/sprig

    🍃 Learn to code by making games in a JavaScript web-based game editor.

    42 parts1.1kMIT
  • 2 layers90.5 × 50 mmMain control board, the printed circuit board in 3D

    Main control board

    jamro/tiny-engineer

    A small desktop robot that brings an AI coding assistant to life, physically acting out when it reads files, thinks, writes code, and finishes work.

    42 parts1.1k
  • 2 layers67.6 × 30.5 mmRgb to hdmi, the printed circuit board in 3D

    Rgb to hdmi

    hoglet67/RGBtoHDMI

    Bare-metal Raspberry Pi project that provides pixel-perfect sampling of Retro Computer RGB/YUV video and conversion to HDMI

    42 parts1kGPL-3.0
  • 2 layers190 × 80 mmPcb shield, the printed circuit board in 3D

    Pcb shield

    hackclub/OnBoard

    💡 Join 1,000 teenagers and make your first PCB with a $100 grant!

    42 parts915
  • 2 layers98 × 80 mmMai io, the printed circuit board in 3D

    Mai io

    whowechina/mai_pico

    Pico controller for Maimai

    42 parts475
  • 2 layers50.8 × 90.4 mmOBOGS PANEL, the printed circuit board in 3D

    OBOGS PANEL

    jrsteensen/OpenHornet

    OpenHornet 1:1 F/A-18C Simulator Repository

    42 parts431