DonCon2040 is a firmware (and by extension a PCB) for DIY Taiko no Tatsujin arcade style drum controllers.
It is pretty much tailored to this specific use case, if you are looking for something universal, ready-to-flash and on-the-fly configurable I'd recommend to have a look at more generic approaches like GP2040-CE. If you however want build something more specialized or custom, feel free to use this project as a base, it is designed to be somewhat modular and should be easy remodel. See DivaCon2040 for an example on how this could look like. If you have any questions about the project in general or need hints how to build this thing, feel free to open a discussion anytime!
- Various controller emulations
- HORI PS4-095 Taiko Drum for Playstation 4 (will work on PS4, see PS4 Authentication for details)
- HORI NSW-079 Taiko Drum for Switch (compatible with Taiko no Tatsujin Rhythm Festival / Drum'n'Fun on Switch)
- Bandai NC-110 Taiko Drum for Wii (needs to be connected to Wii Remote, see Wii Support)
- Namco NPC-107 Taiko Drum for Playstation 2 (needs to be connected to PS2 controller port, see PS2 Support)
- Dualshock 4 (Only for PC/Steam, will not work on an actual PS4!)
- Dualshock 3
- Switch Pro Controller
- XInput
- XInput Analog (Compatible with TaikoArcadeLoader analog input)
- Keyboard (Mapping: 'DFJK' / 'CBN,')
- MIDI
- Debug mode (will output current state via USB serial and allow direct flashing)
- Additional buttons via external i2c GPIO expander
- Basic configuration via on-screen menu on attached OLED screen
- Single WS2812 LED for trigger feedback
- Drumroll counter on display
I highly recommend to build the firmware yourself so you can make adjustments in include/GlobalConfiguration.h to match your specific controller build.
You can still use the binary release which is pre-configured for the DonConIO.
Install VSCode and get the Raspberry Pi Pico extension. From the extension choose 'Import Project' and select the folder where you've checked out this repository, then use 'Compile Project'.
See pico-sdk readme for a list of pre-requisites.
Use the environment variables PICO_SDK_PATH to use a local pico-sdk, and PICO_BOARD to select another target board.
By default the pico-sdk will be fetched from Github and the target board will be "pico".
For DonConIOmini with RP2040:
cmake -B build -DPICO_BOARD="waveshare_rp2040_zero"
cmake --build buildFor DonConIOmini with RP2350:
cmake -B build -DPICO_BOARD="waveshare_rp2350_zero"
cmake --build buildFor legacy DonConIO:
cmake -B build -DPICO_BOARD="seeed_xiao_rp2040"
cmake --build buildFew things which you probably want to change more regularly can be changed using an on-screen menu on the attached OLED display, hold both Start and Select for 2 seconds to enter the menu:
- Controller emulation mode
- LED brightness
- Trigger thresholds
- Hold Time
- Double Trigger Mode and Thresholds
- Enter BOOTSEL mode for firmware flashing
Those settings are persisted to flash memory if you choose 'Save' when exiting the Menu and will survive power cycles.
Defaults and everything else are compiled statically into the firmware. You can find everything in include/GlobalConfiguration.h. This covers default controller emulation mode, i2c pins, external ADC configuration, addresses and speed, default trigger thresholds, scale and debounce delay, button mapping, LED colors and brightness.
The debounce delay also implicitly serves as the hold time of the input after a hit. On some platforms inputs won't be registered properly if this time is too short. For example Taiko no Tatsujin on Switch needs at least 25 milliseconds.
If you notice dropped inputs even if the controller signals a hit on the LED/Display, try to increase this value.
Home versions of Taiko no Tatsujin give higher scores for large notes when both sides are hit simultaneously. In contrast, arcade versions will only need a normal hit (or sometimes a harder hit). To emulate this behavior, the following modes are offered:
- Off: Hit both sides to score large notes.
- Threshold: Automatically trigger both sides if a hit is stronger than the configured double hit threshold.
- Always: A hit on one side will always trigger the other side as well.
The PS4 needs a controller to sign a cryptographic challenge every few seconds, otherwise it will stop working after around 8 minutes after plugging in. For the Taiko no Tatsujin games this is somewhat bearable, since you can re-plug the controller before starting each song to avoid running into the timeout during gameplay. Still, this is annoying.
DonCon2040 can sign those challenges, but you will need to obtain some data from an original DS4 and compile it into the firmware. You will need a serial, signature and private key file. I can't and won't help you how to obtain those, you'll need to figure this out yourself.
To build the firmware run scripts/generateAuthConfig.py in the folder where you placed the required files. Copy the resulting PS4AuthConfiguration.h to the include directory, replacing the existing header. Then build the firmware as described in Building.
Signing the challenge will block the second core of the RP2040 for 2-3 seconds, so the display, external controller and LED will appear stuck from time to time. Input handling of the drum is unaffected. On the RP2350 SHA256 is hardware accelerated, so signing time is reduced to about 1 second.
To use the DonCon2040 with the Wii, it needs to be connected to the Wii Remote's extension port. This is only supported on boards exposing two I²C interfaces (i.e. the Waveshare RP2040/RP2350-Zero on the DonConIOmini).
See the consolemods.org wiki for the pinout of the Wii Remote expansion port. In the default configuration connect SDA to pin 0 and SCL to pin 1 of the RP2040/RP2350-Zero. Bridge Sense and VCC of the Wii Remote.
Since the Wii Remote is battery powered and the DonCon2040 needs to be powered externally because the Wii Remote does not provide enough power on the extension port, I highly recommend to isolate the I²C bus (e.g. using an ISO1540 or ISO1640 I²C isolator). While it does work when connecting the I²C signals directly, there is no guarantee there won't be any damage to the Wii Remote, its batteries or the DonCon2040 in the long run. At least DO NOT connect both VCCs to avoid feeding power to the Wii Remote through the expansion port directly.
There is no dedicated mode for Wii support, it will be active in addition to the USB mode if proprietary_device_config is configured for Wii in include/GlobalConfiguration.h.
To use the DonCon2040 with the PS2, it needs to be connected to the PS2's controller port. This needs five consecutive GPIO pins on the RP2040/RP2350. The DonCon2040 still needs to be powered externally.
See the consolemods.org wiki for the pinout of the PS2 controller port. The order of the signals lines is: Data, Command, Attention, Clock, Acknowledge. In the default configuration, the base GPIO pin is 4, so the connection is as follows:
PS2 Controller Port DonCon2040
----------------------------------
[1] (Data) <-- GPIO4
[2] (Command) --> GPIO5
[3] -
[4] GND --- GND
[5] -
[6] (Attention) --> GPIO6
[7] (Clock) --> GPIO7
[8] -
[9] (Attention) <-- GPIO8There is no dedicated mode for PS2 support, it will be active in addition to the USB mode if proprietary_device_config is configured for PS2 in include/GlobalConfiguration.h.
The DonConIOmini board in the pcb subfolder is designed to be close to the original arcade hardware. It hosts a Waveshare RP2040-Zero and provides signal conditioning for Sensatec GSS-4S* piezo impact sensors. See its README for details.
If you don't want to use this board, the firmware should be usable on most RP2040/RP2350 boards with appropriate configuration. You may also use a more simple trigger solution, it only has to provide an analog trigger level to the ADC inputs to be compatible.
Additional controller buttons and the display are attached to the same (or different if your board has more than one) i2c bus. For the display, use a standard SSD1306 OLED display with 128x64 resolution. The buttons need to be attached to a MCP23017 IO expander.
See DonConPad for a exemplary gamepad pcb.
Mind that currently the display and buttons are mandatory to use the controller.
I'll only give a rough outline of the physical construction since I'm still not completely happy with its performance and I'm still experimenting with some alternatives:
- The pads are made of 12mm thick multiplex boards. The outer diameter is ~42cm, the inner diameter is ~35cm.
- Pads are mounted to another 20mm multiplex board with rubber dampeners. The backplates on the arcade drum seem to be thinner, but since those are sturdily mounted to the arcade machine, I figured some more mass couldn't hurt.
- The rubber dampeners are 15mm of height and 20mm in diameter. The arcade drum seems to use tapered dampeners, but at least the tapered dampeners I could get my hands on felt too soft, so I went with straight ones.
- For the drum skin I tried with a 2mm natural rubber sheet covered by some canvas, which worked reasonably well but is pretty loud and has little rebound. I imported real arcade drum skins now, which work a lot better.
- daschr for the SSD1306 OLED driver
- FeralAI for the inspiration and Dualshock3/XInput driver from the GP2040 Project
- The linux kernel contributors for documenting the game controllers in their drivers