Wednesday, August 31, 2016

The Northgate Omnikey to Tandy 1000 SX & TX Keyboard Adapter

The Tandy 1000 computers, more specifically the early Tandy 1000s, had many good features, graphics, sound, expansion, performance, integrated peripherals.  To save development costs, Tandy imported some of its designs from prior, non-IBM PC compatible computers.  The Tandy 1000 card edge printer port can be traced back to the TRS-80.  The Tandy 1000 joystick ports came straight from the Tandy Color Computer.  And finally, the Tandy 1000 keyboard is the same keyboard used in Tandy's MS-DOS (but not IBM PC) compatible Tandy 2000.

The 90-key Tandy 1000 keyboard is not exactly a pleasure to use.  Its layout is cramped and awkward, its keys are mushy and there is no tactile feedback.  Compared to the IBM PC or IBM PC AT keyboard, it feels cheap.  Typing mistakes are frequent with this keyboard.  It has some odd key omissions.  There is no Scroll Lock, and while there is a separate Home key, there is no separate End, Page Up, Page Down, +, -, or * keys.  The shift keys are too small.  While it does have F11 and F12, software made during the Tandy 1000 (except by Tandy) lifespan rarely used these keys.

Finally, the Tandy 1000 has the dreaded Hold and Print keys.  Both keys are next to important keys like Enter, Alt and Num Lock,  The Hold key acts like a true Pause key, everything is frozen until you hit the Hold key again.  People who do not know or forget how the Hold key works may think their computer has crashed.  However, the really evil key is the Print key.  Press this key twice and, unless you have a printer attached to your computer, your computer will freeze as it vainly tries to print what you are typing on the screen. Your computer will appear to freeze.  IBM avoided this issue by assigning the function to Ctrl+Print Screen.

I have long known that the Northgate Omnikey line of keyboards supported the Tandy 1000s.  The Omnikeys support XT and AT keyboards and even some more exotic machines like the AT&T 6300, the Amstrad computers like the PC-1512 and even the Amiga 2000 & 2500 computers.  Northgate indicated that its keyboard was compatible with the Tandy 1000 SX and Tandy 1000 TX computers.  The computer type is set by a bank of dipswitches on the keyboard.

While the Tandy 1000 and IBM XT keyboard protocols are very similar, they are not the same.  Both protocols transmit a keystroke using a serial data transfer of 9 bits, but IBM has a start bit and Tandy has a stop bit.  The raw keyboard scancodes are almost identical between the common keys of the IBM 83-key XT keyboard and the Tandy 90-key 1000 keyboard, but there are some differences.

Northgates came with special detachable cables for the systems the keyboard was designed to work with.  A computer that accepted an XT or AT keyboard would work with the default cable, which has a 6-pin mini-DIN connector on the keyboard end and a 5-pin DIN connector on the computer end.  However, a Tandy 1000 uses a unique keyboard protocol and does not work with either an XT or an AT keyboard.  It requires a special cable or adapter.  While I once saw that a Northgate Omnikey keyboard was sold with a TX once on ebay, it was highly unlikely that I would ever come across the special adapter.  There is a company,, which seems to have a lot of information about the Northgates, but they could not provide me with any information on the Tandy adapter.

Recently, I have been lent a Northgate Omnikey 101 keyboard in the hopes I can construct an adapter to make it work with a Tandy 1000 SX and TX.  I have long wished to test a theory that the Northgate Tandy cable or adapter is a simple passive cable or adapter that just wires the signals appropriately.

The standard IBM cable uses four wires to connect the keyboard to the computer, data, clock, +5v and GND.  This is the pinout :

IBM 5-pin DIN

1 - Clock
2 - Data
3 - NC
4 - Ground
5 - +5v

IBM 6-pin Mini-DIN

1 - Data
2 - NC
3 - Ground
4 - +5v
5 - Clock
6 - NC

The Tandy 1000 uses the following pinout for its keyboard :

Tandy 1000 8-pin DIN

1 - Data
2 - Busy
3 - Ground
4 - Clock
5 - +5v
6 - Reset
7 - NC
8 - NC

Four of the wires on the IBM and Tandy keyboard connectors serve the same function, so my first thought was to wire a 5-pin female DIN connector to an 8-pin male DIN connector and see what happened.  Here is the cross wiring :

IBM - Tandy
2 - 1 Data
4 - 3 Ground
5 - 5 +5v
1 - 4 Clock

Once I wired the connectors correctly and set the dipswitch to the Tandy 1000SX/TX setting on the Northgate keyboard, the Northgate keyboard worked in both my Tandy 1000 SX and Tandy 1000 TX computers!  I was estatic, and it passed almost every test.  It works with DOS, with King's Quest Tandy Booter and everything else I have tried.  Even the F11 and F12 keys work in Deskmate II.  Both Ctrl and Alt keys register, as do all the keys on the separate cursor key area and all the numberpad keys.  The LEDs for the Num Lock and Caps Lock will turn on, but not the Scroll Lock (see below).

When it comes to pin assignments, remember that when you look at them, male connectors have pin 1 on the left, female connectors have pin 1 on the right.  Since DIN3, DIN5, DIN7 and DIN8 are upwardly compatible, plugs start numbering with the DIN3 in a V pattern, then DIN5 adds the two pins on the bottom, DIN7 adds the two pins on the top and DIN8 adds the middle pin.  Pin 4 is below pin 1 and pin 6 is above pin 1.  Likewise, pin 5 is below pin 3 and pin 7 is above pin 3.  Pin 2 is below pin 6.  Essentially these are how the pins are numbered when you look at them from the male (left) and female (right) perspectives :

 Male       Female
 6 7         7 6
1 8 3       3 8 1
 4 5         5 4
  2           2

A helpful way to remember this is with the phrase "The wife is always right!" (at least for those of us with wives :)

Beause you don't need more than a 5-pin DIN connector, you can sacrifice a MIDI cable for one half of the adapter.  For the other half I would recommend using a 5-pin female connector.  Keep the cable between the two ends as short as possible.  Use a multimeter in its continuity test mode to figure out which wire is assigned to which pin from the MIDI donor cable.  I used a Radio Shack made MIDI cable, appropriately enough.  However, MIDI cables only need to connect pins 2, 4 & 5, which is one pin short for the adapter.  I have a Roland MIDI cable which does not connect pin 1.  Radio Shack's cable also connects pin 1, perhaps because it was take from a keyboard extension cable.  They are no longer sold at RS's site, but should be easy enough to find on eBay.  Here is a photo of my original proof-of-concept adapter on the right and a more professional version of it on the left :

On the Northgate in Tandy 1000 emulation mode, Print Screen key doubles for the Tandy Print key and the Scroll Lock doubles for the Hold key.  The standard 101 layout means that these keys are well away from the important keys like Enter.

Unfortunately, there is one flaw in the keyboard function.  None of the bootup functions assigned to the F1-F4 keys are recognized as they are on the 90-key keyboard.  This means no Mono Mode, no TV Mode, no Swap Drives or most importantly no Low Speed on either the SX or the TX with a Northgate keyboard attached.

The Tandy 90-key keyboard sends or receives Busy and Reset signals, but my adapter did not connect them.  I assume that the Busy signal was used for the DMA-less Tandys (original 1000, A, HD, EX and HX) to tell the keyboard to stop sending keystrokes while the CPU was processing the data stream off the floppy drive.  Since the SX and TX have DMA, I believe that this signal was not necessary and that is why the Northgate manual mentions only the SX and TX for compatibility.

The Tandy 90-key keyboard appears to use a separate reset signal to reset the keyboard controller.  By comparison, an XT keyboard receives a reset command by manipulating the clock and data lines.  An AT keyboard has a bi-directional interface and reset is one of the many commands it can receive.

According to the schematic for the Northgate Omnikey 101 in the manual, my keyboard should connect one of the two extra pins in its 6-pin Mini-DIN.  On the Northgate schematic pin 6 on the Mini-DIN goes to the keyboard controller and is designated as Aux. Input.  Unfortunately, when I opened up the keyboard to clean it, I discovered that both extra pins went nowhere on the PCB.  On the older Northgate Ultras, pins 2 and 6 are used for the Amstrad mouse buttons.  If the F1-F4 keys require the reset or busy lines, they will never work with a Northgate Omnikey.

Since the Northgate does not have any issues with a software Ctrl+Alt+Del reboot or a hardware red button reboot, it is probable that the keyboard controller is not reset by the reset line but resets like an IBM XT keyboard.  Alternatively, the Northgate can detect a software or hardware reset or a cold boot and reset itself.  In fact, the first version of the Tandy 2000 keyboard did not connect a reset signal to the keyboard.  However, if you set the CPU to the slow mode via DOS and the MODE SLOW command on the SX or the TX, you will reboot to the fast mode with either a software or a hardware reboot.

I have a 286 Express card installed in my Tandy SX.  It has this weird quirk that if you go back to 8088 mode after entering 286 mode, you are set in the slow mode.  It also does this with a hardware reset if you are in 286 mode, but not if you do a software Ctrl+Alt+Del reset.  Unfortunately, when I tried the hardware reset trick with the Northgate, it returns to the fast mode with both the software and hardware reset.

The lack of F3 and F4 causes real issues with booting software.  Not all available booter disk images have a 360KB or 720KB version available.  Thus being able to run one of each type of drive, 5.25" and 3,5" has a great practical benefit.  Some booters, like Super Boulder Dash, require a 4.77MHz CPU to run correctly with a joystick.  Tandy's disk release of Demon Attack did not like my digital joystick adapter at the 7.16MHz default Tandy SX speed.  Because you cannot set the slow mode for these booters, you are stuck with the keyboard (Super Boulder Dash) or fighting the joystick drift (both).  Don't throw your 90-key keyboard away just yet if you have any interest in PC Booters.

Special thanks to Brandon Cobb of Super Fighter Team, for lending me his Northgate Omnikey so I could make the adapter and turn theory into fact.

No comments: