Reverse engineering an ’80s NeXT keyboard
Working with vintage computer technology can feel a bit like the digital equivalent of archeology. Documentation is often limited or altogether absent today — if it was ever even public in the first place.
So you end up reverse engineering a device’s functionality through meticulous inspection and analysis. Spencer Nelson has a vintage NeXT keyboard from the ’80s and wanted to get it working with modern computers via USB. To make that happen, he reverse engineered the protocol and used an Arduino as an adapter.
NeXT was a computer company founded by Steve Jobs in the ’80s, in the period after he left Apple. A little over ten years later, Apple bought NeXT and Jobs rejoined the company. NeXT only released a few computers, but they are noteworthy and desirable to collectors.
This particular keyboard is from 1988 and worked with the first generation NeXT Computer. Unlike modern keyboards that share the USB protocol, keyboards from this era utilized proprietary protocols. This particular model had an enigmatic protocol that Nelson became obsessed with deciphering.
Nelson started with an Arduino Micro with the intention of using an existing library. But that resulted in unpredictable and jumbled text. After inspecting the keyboard’s output signal with both an oscilloscope and a logic analyzer, Nelson determined that the keyboard protocol worked at an unusual 52.74 microsecond pulse width that the library didn’t account for.
It turns out that that was the result of NeXT using a cheap 455 kHz resonator intended for AM radios. Every 24 ticks of that resonator, it would send a data bit (18,958 hertz equals once pulse every 52.74 microseconds).
With this information in hand, Nelson was able to create his own Arduino sketch to analyze the signal coming from the NeXT keyboard. It can output the text via the serial console, but it is also possible to configure an Arduino as a USB HID to output the text to any modern computer.