To use a REAL Dragon 32 keyboard on XRoar
I've probably damaged my broken Dragon 32 too much which leaves me with a nice yellowed case and an idea.
Can I fit a Raspberry PI running XRoar in the case? Yes I can, there is plenty of room.
Next question, can I attach the Dragon keyboard to the PI?
Well that one really is the question and sent me down some rabbit holes over Easter. I could use the Pi GPIO pins to scan they keyboard matrix but then what? It turns out there is a whole modding scene where people are making their own Custom Keyboards and Macro Button Pads. By far the most popular keyboard controller is the Raspberry PI Pico.
With suitable libraries the Pico can present itself as a USB Keyboard to the host computer. It also has libraries for reading a simple keyboard matrix such as the Dragon uses.
These are the resources I have discovered so far;
- Rapidonline.co.uk for Pico
- https://circuitpython.org/downloads Circuit Python download
- https://www.youtube.com/watch?v=BRMFH0LI30A Circuit Python and Thonny
- https://github.com/KMKfw/kmk_firmware KMK Libraries for keyboard
- https://www.youtube.com/watch?v=a0VU5mk ... U-mf3ep81Q Lee Smith's workshop on how to make this for Commodore 64
- https://github.com/midicdj1000/RETRO-PICO-KMK-Keyboards Lee Smith's code.py for reading a specific keyboard. I'll mod the C64 for Dragon.
- Thonny the IDE for Python on the Pico was in the repository on Linux Mint
- https://www.pcbway.com/ PCB Way for accepting the gerber files and returning PCBs.
I got to grips with Thonny and programmed the Pico with the C64 version which I will later modify for the Dragon layout. When I short a ROW pin with a COLUMN pin I get letters from the keyboard matrix appearing on my PC as if I'd just typed them. This shows the Pico is acting like a 2nd keyboard.
Success!
I will leave the keyboard side of things there and concentrate on turning a PI into a Dragon using XRoar.