A286 keyboard

From: Scott Drysdale

"Flemming Steffensen" writes:

J7 Function: Test connector

  FS note: Actualy it's a keyboard input:  1: NC
                                           2: NC
                                           3: KBDATA
                                           4: KBCLK
                                           5: PWRGOOD
                                           6: KEY
                                           7: +5V
                                           8: GND

Hmm, excuse me for stating the obvious, but does this mean I could have an IBM PC-Clown keyboard attached here? (Converting it's DIN plug to the necessary pinouts?) as well as my trusty A2000 keyboard?

NO! you cannot connect a normal keyboard to these pins.

you see, our german friends who designed the ABT/DBT chipset screwed up.the proper handshake sequence for the keyboard and the 8042 processor goes like this (the keyboard is running this little algorithm):

while (8042 not ready)
wait;
shift keyboard data into 8042

unfortunately, the keyboard simulation logic in the ABT/DBT chips gets this procedure backwards. it goes:

shift keyboard data into 8042
while (8042 not ready)
wait;

this works fine until something other than the keyboard is playing with the 8042 (like windows or extended dos apps that play with the A20 gate, or ask the 8042 to reset the 386 cpu, or otherwise make it do something besides listen to the keyboard).

this bug caused something like 60% of keystrokes to be lost while running windows 3.1 in enhanced mode. it HAD to be fixed.

to fix the bug, since we weren't allowed to fix the ABT/DBT chips, i helped john barker (the hardware guy) design a PAL (well, it's really a more expensive altera part) which functions as a second buffer. we also modified the 8042 code (i wrote my own disassembler and assembler!) to work with this new buffer chip so that the 8042 controls the shifting of the data, instead of the "keyboard" (ABT/DBT). we could have fixed it without modifying the 8042 code, but it would have required either a much more complex altera part or two of them. i seem to recall that the altera part cost about $5 (note that the ABT/DBT chipset itself cost only around $5!)

the end result is that the protocol present on those wires no longer even remotely resembles AT keyboard speak. don't try plugging a real keyboard in there.

there are lots of little kludges like this hidden in the pals on the 2386 to fix silly abt/dbt bugs. i really wanted to fix the serial port emulation, but we already had $10 in pals to fix a $5 chipset, and were running out of space on the board without doing a complete re-layout. another feature that would have been cool is olivetti display mode emulation (16 colors in 640x200 or 640x400). we had the RAM for it, windows had drivers for it, we just didn't know exactly how the hardware was supposed to work to emulate it right in pcwindow.

if you want to COMPLETELY replace the emulated keyboard with a real keyboard, you could put an 8042 from the 2286 bridgeboard in there, lift the kbclk and kbdat pins on the altera part, and wire an AT keyboard to the header pins. this should work, but i seem to recall that we did something else to the 8042 while we were in there. no guarantees.

Text based on BBFAQ © Sébastien Boisvert
Last Update: 19.07.2023