arduino "theC64" joystick adapter


Back in 2018, after releasing Counterweight Kate, I decided to buy myself a present in the shape of a "The C64" mini. (A small C64 emulator stuck inside a mini plastic replica of the old commodore breadbin 64 case).

It turned out that the joystick for the mini was absolutely terrible and so far the user base had only figured out a couple of 3rd party USB joysticks that could work with it. (I'd like to point out that the C64 Maxi joystick that came later is a lot better, sturdier and it has micro-switches).

Since I was looking for smallish project after finish CK and had always wanted to learn how to program Arduino ICs (which I knew could handle the conversion), I decided to have ago.
I reverse engineered the exact USB report descriptor of the USB joystick and updated the USB device information to match as much as possible using the Arduino environment, but I still couldn't get it to work!
So I gave up on it and ordered a pre-built model a couple of months later when they started showing up.

Come 2020, and it seems my trusty joystick adapter suddenly stopped working. Due to a firmware update or that it broke. Who knows? So I decided to have a new go at creating my own adapter, that I can always make sure will keep on working.

It turns out that it's not enough to just tweak the descriptor values that are directly accessible when writing an Arduino sketch, if you want the device to match identically to a TheC64 joystick. A couple of changes later to the USBCore, USBDesc and boards.txt files and I got it working.

An extra thanks also has to go out to Dan Tootill who mentioned that the C64 emulator used in the TheC64mini actually uses the SDL2 GUIDs to identify the USB joystick. That sent me in the right direction to find which values I had missed back in 2018.

So now I finally have my own joystick adapter created from 3 parts.
A DB9 connection.
An Arduino Pro Micro
and some electric cable.

Compact design isn't it? No PCBs were harmed here ;-)
Here's me trying to play Creatures with the original mess of wires version :-)