tunozemichanの日記 / tunozemichan's diary

SORD社のコンピューターM68やM68MXの解析についての備忘録です。This blog is a memorandum about the analysis of SORD's computers M68 and M68MX.

Analysis of SORD M68 Keyboard (Part 5)

With an approximate understanding of the circuit configuration and the exchange of signals, I directly observed the waveform using a logic analyzer.

The topmost signal is transmitted from the keyboard to the M68, and the one below it is the signal sent from the M68 to the keyboard. Below that is the CLK signal (1MHz) input into the 74166 and 74164.

The signals are observed intermittently. I will zoom in on one of the clusters.

The signal that appeared as one cluster consists of signals from two frequencies. I will zoom in on the waveform at the very beginning.

The input signal, from rising to falling edge, lasts for 4 microseconds (uSec), while the output signal is delayed by 2 uSec and has a waveform lasting from falling to rising edge for 2 uSec.

When no key on the keyboard is pressed at all, this waveform continues indefinitely.

Presumably, the 4 uSec duration of this input signal serves as a scan command for a certain column on the keyboard, and with a 2 uSec delay, the keyboard sends back the pressed information for that column.

Let's look at the signal when the "P" key is pressed.

As expected, changes are observed in the output waveform. The appearance in two places is thought to be because the M68 is scanning twice consecutively, a total of 2 times. This is inferred from the fact that the code for waiting for key input in the BOOT ROM also scans twice.

I will zoom in on this changed waveform.

The waveform above is the measured value. Below it, the data has been fitted into bits. Although it is supposed to be 8 bits, it turns out to be 10 bits, and with a CLK of 1MHz, I wonder if 200 nanoseconds (nSec) is below the resolution. But, setting that aside, it translates to 08h, which in the keyboard of the M23, if the scan line matches, indeed corresponds to the "P" key.

Even if the interpretation were incorrect, now that the waveform is understood, creating a circuit that can interpret a PS/2 keyboard and emulate this waveform would effectively turn it into an M68 keyboard.