Wednesday, 16 December 2015

Day 16 - Commodore 64 USB keyboard with dual joystick

This is day 16 of the Advent Calendar of USB keyboards. Today, a revision of the Commodore 64 USB keyboard, adding dual USB joysticks.
The Commodore 64 USB keyboard has been revised quite a few times. It started with a board on the back of the keyboard.
When mode switching was added to give a different keyboard mapping for use with Vice Commodore 64 emulator, a new board was designed to fit at the back of the case with USB connector and mode switch poking out the IEC and video ports.
There is also the version which fits inside a working C64 to share it's keyboard when the C64 is switched off.
The latest revision adds support for two 9 way D joysticks, and also provision for a DC-DC converter to be added if fitting a Raspberry Pi etc.
To add the extra ports, I needed more I/O pins. I looked at various options such as sharing the pins with the keyboard (as the C64 does), using an I/O expanders or a 3-8 decoder etc.,but in the end it was easier to just go for a larger microcontroller.
The board has moved again, and now the board fits into the original end plate of the Commodore 64.
It is bolted in place to withstand joysticks being plugged and unplugged. The keyboard is plugged into the board and if the mode switch is being used, the power LED is replaced with a tricolour one and plugged into the board.
When the lid is closed, it all lines up nicely.
You can now plug in some Commodore / Atari compatible joysticks and the USB lead and it's ready to go. The green LED signifies this is in remapped for normal use mode, when the mode switch is pressed, it goes red and is in emulator mode.
This could also be used on a VIC20 or Commodore 16 - at last, a Commodore 16 with 9 way D joystick ports!

Tune in tomorrow to open another window on the Advent Calendar of USB keyboards.

You can now buy a kit of the new version of this board, from my Tindie Store.