Releases: borb/amigahid
Halloween 2020 release
No pumpkins and definitely no Halloween easter eggs in this release, just wholesome goodness and updates to the infrastructure around the amigahid firmware.
Starting with this release, firmware binaries will be published automatically to GitHub so you no longer need to install a build toolchain - get the firmware and write it to your AVR/Arduino with avrdude
or whichever tool you favour for writing to your AVR EEPROM. Or download the excellent PlatformIO and build and program it to your board yourself! The choice is yours.
In this update:
- We've switched to PlatformIO. That's the royal "we" since I'm talking about myself. Don't feel you have to reach for the Arduino IDE any longer, this change was in part because I want to move from the model of having a single sketch to multiple files for readability and maintainability, but has the benefit of enabling continuous integration as well.
- Continuous integration! Well, right now, it just checks that the build runs okay; we've not resorted to an AVR simulator yet, and it could be quite difficult, but it's a start.
- Dropped use of the Arduino Serial class: the UART has been setup as stdin/out/err now so
printf
works happily and we can use simpler output on the debug console, also removing amalloc
in the process. This has had a sideeffect of increasing RAM usage in the short term but not by much and hopefully we can optimise out more unused parts of the Arduino core library. - Removal of more Arduino-specific code: the goal is something which does not require the Arduino core library, but we're not there yet. To get there we will likely need to fork the USB Host Shield library and refactor its use of the Arduino library to get there. That's not going to happen quickly.
Known problems:
- Seeing some sporadic board resets at the moment. This has an unpleasant sideeffect - it reboots the Amiga. Some investigation into a permanent fix for this will be forthcoming, but the next minor release should contain instructions for adding a 74LS04D NOT gate to the reset line (as well as a configuration flag in
platformio.ini
to turn use on and off). This should mean that on reboot,/RES
never gets pulled low and the Amiga should not reset. Bear with me, I'm trying to finish a masters degree, raise two children, train a puppy, maintain a full time job and my own sanity. By adding the NOT to/RES
the reset behaviour will need to be inverted, but a board reset will stop the Amiga from rebooting.
In the coming months, the development is going to be steered towards moving to a finite state machine model so the same AVR can be used for mouse conversion as well as keyboard, so your humble AVR can drive more USB input for the Amiga. Stay tuned.
The "yes, you CAN has kickstart ROM switcher" release
Well, it's been a good few weeks since I gave this firmware some love, so how about some updates?
- code tidy up (unix line endings because the Arduino IDE wrote windows line endings, macros for
BIT_SET
andBIT_CLEAR
). XlateHidToAmiga
is gone and replaced with a static array, lookups by offset; it'll improve speed, but not noticeably so.- the old "send half a second of reset only after the three fingered salute has been lifted" behaviour has been gone; the reset line is held low (high is no-reset) for as long as the keys are held down, and brought high after keys lifted; this means that kickstart ROM switchers which attach to the reset pin will work with this firmware!
There you have it! Be merry and go switching kickstart ROMs with glee.
First release
In my mind, this is mature enough to be the first release of this project. After this point, all development will be conducted on branches and master will be the tip of the stable releases.
This is firmware for an Arduino Mega ADK (or Mega 2560 with USB Host Shield/MAX3421E wired to SPI) to adapt a USB keyboard to produce the necessary signals to replace an Amiga 500 keyboard. This was written for my particular use case: I am transplanting one of my Amiga 500 boards into a Checkmate A1500+ case and require an external keyboard, and am not keen on the appearance of the stock keyboard in a shaped metal case. Additionally, I am used to the tactile feedback of a blue-switched keyboard, which is my input device of choice.
Some notes:
- Working caps lock LED (like this is a useful feature!)
- Working reset
- Tested using US keyboard layout, likely to cause issues with other layouts (I know for certain #~ on UK layout is entirely unmapped)
- Supports hotplug of USB keyboard during normal operation
- Maps left meta key ("Windows" key to most) to left Amiga, props key ("menu" key to most) to right Amiga
- None of my keyboards have a right meta key, which I would arguably avoid mapping to right Amiga since props is more prevalent
- Known not to work with Apple keyboards (probably power consumption, thanks a bunch Apple)
- This may be entirely unsolvable but contributions are welcome
My most heartfelt thanks to @arduino, @felis and @t33bu for the Arduino board & libraries, the USB Host Shield library and the wireless-amiga-keyboard projects respectively: Had I not had any or all of these things, I would not have been able to produce this.
Enjoy, and if it fails, read the comments 😄