As I mentioned in a previous post, my PS/2 keyboard adapter requires some strobe stretching in order to work with some kinds of early microcomputers, such as some OSI models.
I think I have come up with a convent way to accomplish this, with only a small firmware change.
Here is what I have in mind.
As before, when the CR jumper is inserted, it disables recognition of the CNTRL-RST and CNTRL-CLR keyboard/RS232 sequences, which assert the reset or clear screen outputs, as appropriate. With my new design, in addition to disabling the aformentioned reset and clear sequences, inserting the jumper will change the clear screen output to an input. Now here is the key part of the change; whenever a character is typed and strobe is asserted (high true), if the CR jumper is inserted, strobe will remain asserted until:
minimum of 125 useconds have elapsed AND
the input to the clear I/O port is asserted (also high true)
To maintain current behavior (a 125uSec long pulse), you just need to tie the strobe output directly to the clear input.
In order to stretch strobe out a bit, you have a few options:
Tie strobe output to clear input through an RC timing network in order to slow down the response to the clear input. For example – connect strobe and clear together with a 10K resistor. Then connect the clear input side of the resistor to a 1 uF capacitor and connect ground to the other side of the capacitor. Doing a basic RC timing equation shows that this should yield a delay of approximately 10 milliseconds. Change the values to attain a strobe length that meets your requirements. You do have to be careful to limit current through the resistor, so you don’t blow the strobe transmitter, though.
Use external logic of your choice to assert the clear signal to the PS/2 adapter
Behavior with the CR jumper disconnected is exactly the same as with the previous version of firmware.
The main assumption behind this change is that the clear output, is only required for the Apple 1. I have found little to no need to disable CNTRL-RST and CNTRL-CLR on the Apple 1 (or Apple II) and those features are probably of little value to other platforms. In any case, the PS/2 keyboard sequence of CNTRL-ALT-DEL will still assert reset no matter whether the CR jumper is in place or not. In fact, using the CNTRL-ALT-DEL combination from a PS/2 keyboard will be the only way to assert reset if a system needs both reset AND a stretched strobe output. Said another way, you will not be able to assert reset from a device connected with the RS232 port, if your system also needs a stretched strobe.
I’ll do some trials over the weekend and assuming that it works ok and I get no better input or ideas, I’ll have a new version of the firmware available very soon, possibly as soon as next week.