2024-01-15 09:05:47 -07:00
|
|
|
---
|
|
|
|
include_toc: true
|
|
|
|
---
|
|
|
|
|
|
|
|
# Introduction
|
2023-12-31 20:33:29 -07:00
|
|
|
|
|
|
|
Microcontroller Firmware to emulate guitar and drum kit controllers from the
|
|
|
|
Wii version of the Rock Band games.
|
|
|
|
|
2024-01-04 13:20:04 -07:00
|
|
|
![Two small plastic guitars and a cheap toy drum pad](docs/mockband.jpg)
|
|
|
|
|
2023-12-31 20:33:29 -07:00
|
|
|
This is based on the foundational work done by Nicholas Angle on the
|
|
|
|
[Wii Guitar Controller](https://github.com/NianZo/WiiGuitarController)
|
|
|
|
([text article](https://www.niangames.com/articles/reverse-engineering-rockband-guitar-controllers)).
|
2024-01-04 13:15:24 -07:00
|
|
|
Nicholas was also really nice about answering an email question I sent.
|
|
|
|
Thanks, Nicholas!
|
2023-12-31 20:33:29 -07:00
|
|
|
|
|
|
|
|
|
|
|
# Parts Needed
|
|
|
|
|
|
|
|
* A [Sparkfun Pro Micro](https://www.sparkfun.com/products/12640)
|
|
|
|
* A physical controller
|
|
|
|
|
|
|
|
|
2024-01-15 08:59:17 -07:00
|
|
|
# Skills Needed
|
|
|
|
|
|
|
|
This is a research project:
|
|
|
|
it's assumed you already have a skillset that includes:
|
|
|
|
|
|
|
|
* Disassembling consumer electronics
|
|
|
|
* Using a multimeter to perform continuity checks
|
|
|
|
* Building electronics projects using a microcontroller
|
|
|
|
* Soldering
|
|
|
|
* Running the Arduino IDE *or* using `avrdude` to flash a firmware
|
|
|
|
|
|
|
|
If you're not comfortable with the above list,
|
|
|
|
your best option right now (Jan 2024) is to either buy a used kit,
|
|
|
|
or wait for the Polybar project to finish their work
|
|
|
|
producing a beginner-friendly kit with assembly manual.
|
|
|
|
|
|
|
|
|
2024-01-04 13:10:56 -07:00
|
|
|
# Controllers
|
2023-12-31 20:33:29 -07:00
|
|
|
|
2024-01-04 13:10:56 -07:00
|
|
|
## Guitar
|
2023-12-31 20:33:29 -07:00
|
|
|
|
2024-01-04 13:10:56 -07:00
|
|
|
I 3D printed the
|
|
|
|
[MiniCaster](https://www.printables.com/model/479046-minicaster-mini-clone-heromidi-controller)
|
|
|
|
by Vlad the Inhaler.
|
|
|
|
It comes with full build instructions.
|
2023-12-31 20:33:29 -07:00
|
|
|
|
2024-01-04 13:10:56 -07:00
|
|
|
## Drums
|
2023-12-31 20:36:07 -07:00
|
|
|
|
2024-01-04 13:10:56 -07:00
|
|
|
I bought a [Cheap children's drum toy](https://www.amazon.com/Electronic-Sboet-Practice-Headphone-Christmas/dp/B0CHJMYCH9/)
|
|
|
|
from Amazon.
|
|
|
|
There are dozens of copies of this thing,
|
|
|
|
the one I got was on sale for $25.
|
2023-12-31 20:36:07 -07:00
|
|
|
|
2024-01-04 13:10:56 -07:00
|
|
|
I had to unscrew the cover and remove the
|
|
|
|
logic board, battery, and speaker.
|
|
|
|
The pads were connected with
|
|
|
|
a sort of ribbon connector,
|
|
|
|
which I desoldered and removed,
|
|
|
|
then placed in my own perma-proto board.
|
2023-12-31 20:36:07 -07:00
|
|
|
|
2024-01-04 13:10:56 -07:00
|
|
|
I also hooked up a 3.5mm TRS jack for the two pedals,
|
|
|
|
which I could have desoldered from the toy
|
|
|
|
(I already had these).
|
2023-12-31 20:36:07 -07:00
|
|
|
|
2024-01-04 13:10:56 -07:00
|
|
|
I'm sorry I didn't photograph or record any of this,
|
|
|
|
but it was pretty straightforward.
|
2023-12-31 20:36:07 -07:00
|
|
|
|
2024-01-01 12:42:07 -07:00
|
|
|
|
2024-01-15 09:05:47 -07:00
|
|
|
# Building
|
|
|
|
|
|
|
|
This will compile in the Arduino IDE,
|
|
|
|
or on the commandline using `make`.
|
|
|
|
|
|
|
|
## Command Line
|
|
|
|
|
|
|
|
Just run `make` on a Unix system.
|
|
|
|
I set up paths for my Debian install of Arduino 1.8;
|
|
|
|
you may need to adjust them if your setup has different paths.
|
|
|
|
|
|
|
|
There is a `flash-%` target that will upload the built firmware to a Pro Micro.
|
|
|
|
The following targets exist:
|
|
|
|
|
|
|
|
make flash-guitar # Guitar firmware
|
|
|
|
make flash-guitar-wammy # Guitar firmware with wammy bar
|
|
|
|
make flash-drums # Drums firmware
|
|
|
|
|
|
|
|
## Arduino
|
2024-01-04 13:10:56 -07:00
|
|
|
|
2024-01-15 09:05:47 -07:00
|
|
|
Mockband has no library dependencies,
|
|
|
|
and as far as I can tell,
|
|
|
|
will work with the built-in Leonardo profile,
|
|
|
|
even though you're uploading to a Pro Micro.
|
2024-01-04 13:10:56 -07:00
|
|
|
|
|
|
|
You need to make two edits to `boards.txt`.
|
|
|
|
Instructions for this are all over the place.
|
|
|
|
|
|
|
|
Find your board, and edit the `build` lines.
|
|
|
|
Don't edit anything that doesn't say `build` on the line! I can't help you if you do this.
|
|
|
|
|
|
|
|
In my examples, I'm editing the lines for the leonardo build. Yours might be different:
|
|
|
|
it should match the board you're using.
|
|
|
|
|
2024-01-15 09:05:47 -07:00
|
|
|
### Build flags
|
2024-01-04 13:10:56 -07:00
|
|
|
|
|
|
|
This disables serial communications on the board.
|
|
|
|
|
|
|
|
leonardo.build.extra_flags={build.usb_flags} -DCDC_DISABLED
|
|
|
|
|
|
|
|
Hat tip to Nicholas Angle for figuring this out
|
|
|
|
so I didn't have to.
|
|
|
|
|
2024-01-15 09:05:47 -07:00
|
|
|
### VID and PID
|
2024-01-04 13:10:56 -07:00
|
|
|
|
|
|
|
These set the USB identifiers.
|
|
|
|
VID is the Vendor ID,
|
|
|
|
and PID is the Product ID.
|
|
|
|
|
|
|
|
`0x1bad` means "Harmonix Music",
|
|
|
|
at least, it does to the Linux kernel.
|
|
|
|
|
2024-01-15 09:05:47 -07:00
|
|
|
#### For guitar
|
2024-01-01 12:42:07 -07:00
|
|
|
|
2024-01-04 13:10:56 -07:00
|
|
|
PID `0x004` means "Guitar controller".
|
2024-01-01 12:42:07 -07:00
|
|
|
|
2024-01-04 13:10:56 -07:00
|
|
|
leonardo.build.vid=0x1bad
|
|
|
|
leonardo.build.pid=0x0004
|
|
|
|
leonardo.build.usb_product="Mockband Guitar"
|
2024-01-01 12:42:07 -07:00
|
|
|
|
2024-01-04 13:10:56 -07:00
|
|
|
|
2024-01-15 09:05:47 -07:00
|
|
|
#### For drums
|
2024-01-04 13:10:56 -07:00
|
|
|
|
|
|
|
PID `0x3110` means "Rock Band 2 drums".
|
|
|
|
This works better with all versions of Rock Band on my wii,
|
|
|
|
even if you don't use the cymbal inputs.
|
|
|
|
|
|
|
|
leonardo.build.vid=0x1bad
|
|
|
|
leonardo.build.pid=0x3110
|
|
|
|
leonardo.build.usb_product="Mockband Drums"
|
|
|
|
|
|
|
|
|
|
|
|
# Wiring
|
|
|
|
|
|
|
|
Both the guitar and drum kit I used
|
|
|
|
provide simple momentary switches:
|
|
|
|
nothing fancy like a piezo.
|
|
|
|
If you're using fancier types of inputs,
|
|
|
|
you'll need to modify the source code.
|
|
|
|
|
|
|
|
## Guitar
|
|
|
|
|
2024-01-04 13:15:24 -07:00
|
|
|
![guitar wiring](docs/guitar.png)
|
2024-01-04 13:10:56 -07:00
|
|
|
|
|
|
|
| silkscreen pin name | description |
|
|
|
|
| --- | --- |
|
|
|
|
| TX0 | strum up |
|
|
|
|
| RX1 | strum down |
|
|
|
|
| 2 | tilt switch |
|
|
|
|
| 3 | green |
|
|
|
|
| 4 | red |
|
|
|
|
| 5 | yellow |
|
|
|
|
| 6 | blue |
|
|
|
|
| 7 | orange |
|
|
|
|
| 8 | no connection |
|
|
|
|
| 9 | wammy bar (see note) |
|
|
|
|
| 10 | plus |
|
|
|
|
| 16 | minus |
|
|
|
|
| 14 | orange solo |
|
|
|
|
| 15 | blue solo |
|
|
|
|
| 18 | yello solo |
|
|
|
|
| 19 | red solo |
|
|
|
|
| 20 | green solo |
|
|
|
|
| 21 | no connection |
|
|
|
|
|
|
|
|
The solo buttons and wammy bar are optional.
|
|
|
|
I don't use them.
|
|
|
|
|
|
|
|
If you hook up a wammy bar,
|
|
|
|
be sure to uncomment the `#define WAMMY`
|
|
|
|
in the code!
|
|
|
|
|
|
|
|
|
|
|
|
## Drum Kit
|
|
|
|
|
2024-01-04 13:15:24 -07:00
|
|
|
![drum wiring](docs/drums.png)
|
2024-01-04 13:10:56 -07:00
|
|
|
|
|
|
|
| silkscreen pin name | description |
|
|
|
|
| --- | --- |
|
|
|
|
| TX0 | no connection |
|
|
|
|
| RX1 | no connection |
|
2024-01-04 13:51:38 -07:00
|
|
|
| 2 | 2x kick / hat (see below) |
|
2024-01-04 13:10:56 -07:00
|
|
|
| 3 | green |
|
|
|
|
| 4 | red |
|
|
|
|
| 5 | yellow |
|
|
|
|
| 6 | blue |
|
|
|
|
| 7 | kick |
|
|
|
|
| 8 | no connection |
|
|
|
|
| 9 | no connection |
|
|
|
|
| 10 | plus |
|
|
|
|
| 16 | minus |
|
|
|
|
| 14 | no connection |
|
|
|
|
| 15 | blue cymbal |
|
|
|
|
| 18 | yellow cymbal |
|
2024-01-04 13:51:38 -07:00
|
|
|
| 19 | hi hat pedal (see below) |
|
2024-01-04 13:10:56 -07:00
|
|
|
| 20 | green cymbal |
|
|
|
|
| 21 | no connection |
|
2024-01-01 12:42:07 -07:00
|
|
|
|
2024-01-04 13:51:38 -07:00
|
|
|
### Pedals
|
|
|
|
|
|
|
|
If you only have one pedal,
|
|
|
|
wire it to pin 7.
|
|
|
|
|
|
|
|
If you have two pedals,
|
|
|
|
wire them to 7 and 2.
|
|
|
|
|
|
|
|
If you have three pedals,
|
|
|
|
wire them to 7, 2, and 19.
|
|
|
|
|
|
|
|
Wii Rock Band 3
|
|
|
|
only looks at the 2x kick pin:
|
|
|
|
it provides a checkbox to reassign this to the high hat.
|
|
|
|
Clone Hero
|
|
|
|
will use both the 2x kick and the hi hat.
|
|
|
|
Maybe there is some other game that uses this too.
|
|
|
|
|
|
|
|
|
2024-01-15 09:06:30 -07:00
|
|
|
# Related Projects
|
2024-01-15 08:44:43 -07:00
|
|
|
|
|
|
|
Mockband is a research project.
|
|
|
|
You can use it to build a fully working controller,
|
|
|
|
but the main goal of this project is to inform other developers.
|
|
|
|
|
|
|
|
If you're looking for a user-friendly way to get a Rock Band drum controller,
|
|
|
|
consider the following alternatives:
|
|
|
|
|
|
|
|
* Buying a used Harmonix (official Rock Band) drum kit
|
|
|
|
* Mad Catz Rock Band 3 MIDI PRO-Adapter and a MIDI e-drum kit
|
|
|
|
* [Santroller](https://santroller.tangentmc.net/wiring_guides/drum.html)
|
|
|
|
wired to a used Harmonix drum kit
|
2024-01-04 13:51:38 -07:00
|
|
|
|
2024-01-01 14:24:07 -07:00
|
|
|
|
|
|
|
# Bugs / Not Yet Implemented
|
2024-01-01 12:42:07 -07:00
|
|
|
|
2024-01-01 14:23:56 -07:00
|
|
|
I'm tracking things I need to do in the
|
|
|
|
[forgejo issues](https://git.woozle.org/neale/mockband/issues).
|
2024-01-01 14:24:07 -07:00
|
|
|
|
|
|
|
There's a rumor that one day forgejo/gitea will join the fediverse.
|
|
|
|
Until that happens,
|
|
|
|
just
|
|
|
|
[email me](mailto:neale@woozle.org),
|
|
|
|
and I'll open an issue.
|
2024-01-04 13:10:56 -07:00
|
|
|
|
|
|
|
|
2024-01-10 08:49:41 -07:00
|
|
|
# License
|
|
|
|
|
2024-01-10 08:50:12 -07:00
|
|
|
You may use this under the terms of the [MIT License](docs/COPYING.md).
|
2024-01-10 08:49:41 -07:00
|
|
|
|
|
|
|
|
2024-01-04 13:10:56 -07:00
|
|
|
# Need help?
|
|
|
|
|
|
|
|
[Email me](mailto:neale@woozle.org),
|
|
|
|
I'm friendly :)
|