I have been working quite diligently over the last two months to implement a major change from single keyboard & crippled mouse to dual keyboard capability. The chip I am using has additional Interrupt-On-Change (IOC) inputs, and theoretically could handle up to 8 interrupts via this mechanism. This was all fine and good, and held great promise to improve the response of TK-II's 2nd PS/2 port, which would be needed in order to not jumble data and/or drop keys. And over the last several days I really thought I could get this to work via software changes alone, but (and you probably knew that was coming) reliable data handling just wasn't doing it for some odd reason with this new interrupt scheme. So not one to give up easily, I improvised a way to piggyback on top of the existing interrupt that serviced the original PS/2 keyboard port. And although this does require a small hardware mod in the form of a surface mounted diode, it does work well.
Example of diode modification (soldered between same pin numbers on all TK-II board versions)
What this diode does is to allow negative going clock transitions on the 2nd PS/2 port to be 'Y'ed into the 1st PS/2 port's clock input. So any clock action from either port will generate an interrupt and execute code in the GetKey IRQ handler. Once in the handler, a simple check of the 2nd port's clock line verifies who actually caused the interrupt when making the high-to-low clock transition, and then acts accordingly to decipher the PS/2 serial data stream. Since the first port's IRQ is handled by a different and obviously better working (for me) method than the IOC type, this allows for both keyboards to work reliably and not drop any data. And while I was at it, I also spent considerable time to better support a 'hot' plugging aspect, which allows keyboards to be plugged in and unplugged without powering down the Atari that has a TK-II board installed. I won't guarantee that 100% of the time this works, and it can be a bit finicky with the older IBM model M 'built like a tank' keyboards, but when used with newer keyboards it does a pretty good job of it (I think the much older Model M's higher power requirements causes a power spike when first plugged in, sometimes glitching the running code).
So what else has been added or changed?
TK-II now supports both US and a German (T1) keyboards through a simple CTRL+ALT+F3 switching sequence, which has its state saved in non-volatile memory. It also maps in whatever XL/XE international symbols matched up with the German key equivalents (both upper and lowercase). This is a full conversion, so all punctuation and supported graphic characters are properly rendered when the matching key is pressed, and of course the Y and Z keys will work properly in there new positions (QWERTZ instead of QWERTY). And although there are a few symbols not supported (Atari's character set's fault), all in all it does a very good job of emulating the German standard.
CTRL+ALT+F2 will now list all of the TK-II configuration settings on a single screen, so that you can more easily see how everything is setup, and then use the usual CTRL+ALT+Hot Keys to change anything that you desire.
And I think that pretty much covers it. So this new firmware version should release sometime next month, once all the beta testing has been completed.