|PS/2 -> ASCII Keyboard Adapter|
The Micro Chroma 68 was roughly contemporary with the Apple I, and both used the same sort of ASCII-encoded keyboard. While original Apple I kits are as rare as hen's teeth, replica kits are available and many people have built them. These Apple I builders have faced the same sort of keyboard problem that I am facing. So what do they do for keyboards?
At least one person solved the issue by using a microcontroller to drive a (somewhat) modern PS/2-style keyboard on one side and the ASCII-encoded interface on the other. Even better, such a kit is available for sale! I bought one and quickly built it. Initial testing even suggested that it was working...
|Close-Up Look At The Dead Bug Hack|
Despite initial impressions of success, I soon discovered a problem -- when pressing a single key multiple times, only the first keystroke was recognized by the Micro Chroma 68! This is at least inconvenient and it could be crippling for entering data into the monitor program. What might be causing this?
The ASCII-encoded interface was at best a 'de facto' standard and at worst it was no standard at all. Such interfaces typically had 7 data signals and one strobe signal that signified when the data was valid. But, the polarity of those signals and the timing of the strobe could vary between implementations. The fact that any keys were being read by at all suggested that the data line polarity of the keyboard adapter matched the expectations of the Micro Chroma 68. But what about the strobe signal?
The documentation for the PS/2 -> ASCII adapter indicated that the strobe signal goes high to signify that the keyboard data is valid. Checking the source code for the Micro Chroma 68's TVBug monitor revealed that it was expecting the strobe signal to go low to indicate valid data. I could not visualize how this might account for the observed loss of repeated keystrokes, but it seemed worthwhile to at least make the interface match the expected behavior.
I found a 74-series inverter chip in my parts stash and added it to the PS/2 -> ASCII adapter circuit using a 'dead bug' style of construction. The hardware functions just as expected, and I verified that all of the connections were correct. Unfortunately, instead of the Micro Chroma 68 only accepting single keystrokes it then didn't see any keystrokes at all...
|Yet Another Hack...|
Obviously, that was unacceptable. But, simply putting things back like before was only marginally better. So, what to do?
When first observing the "no repeated keys" problem, I did some poking around and found that I could get the Micro Chroma 68 to accept a repeated key if I used a probe to drive the strobe line myself. As I indicated above, I have verified the connection between the microcontroller on the keyboard adapter and the strobe line on the Micro Chroma 68 parallel keyboard input. So, I'm at a bit of a loss for why driving the signal manually works...
I can only figure that the Micro Chroma 68 is somehow missing the strobe signal. I may be able to correct that with a one-shot timer, or there may be some other problem that I'm not yet seeing. In the meantime, I have inserted a momentary push-button switch in series with the strobe line. This allows me to manually drive the strobe line when I need to repeat a keystroke, so at least I can get around the problem in the short-run.
Once again I am left with an imperfect solution. In the long-term I hope to have a more polished result, but for now I'm just trying to get each thing working well enough to make the next step possible. I guess that is a bit like life, or parenting, or something... :-)
Anyhow, now I've got a mostly working Micro Chroma 68 board (sans audio cassette storage interface), I've got a way to view its video output (via a hack on a satellite board), and I've got a way to put information into the machine (with an extra step for repeating keystrokes). I may be limping a bit, but I think I can make it across the finish line!
Now I suppose I have to brush-up on 6800 assembly language and figure-out how to write a little program to run for the end of the contest. I've got some big distractions coming this week, so don't expect too much! But until then, please do stay tuned...