I imagine ADDS mode was used by some earlier keyboard as the only mode. I do not have access to one of those, but it might be worth understanding the protocol for anyone who does.
Rather than just replacing the jumpers, I wanted something somewhat switchable. There isn't room on the board for proper DIP switches. And it's too tight vertically for header-style jumpers, especially underneath the right-angle cable connector. So I went with some Dupont style jumpers.
The wiki explains the pinout of J1 and the 6P6C RJ plug on the cable for PC/AT mode:
- 5: Vcc
- 4: ground
- 1: clock
- 6: PE
- 2: data
- 3: reset
- U1 8749, the microcontroller
- U2 7417, an open collector buffer
- U3 74123, a one-shot
- Q1-Q3 2N3904 transistors
- PC data to U2:4A and :5Y, the two open collector directions.
- PC reset to U2:6A.
- JA1/JP1: connects U1:INT to one of U2:2Y (JP1) or U2:3Y (JA1), that is, selects input to the microcontroller.
- JA2/JP1: connects U1:P27 to one of U2:1A (JP2) or R17 associated with Q3 (JA2), that is, selects output from the microcontroller, with the transistor circuit copying the original board I'd guess.
- JA3: grounds U2:5A, thereby constantly holding the PC data line low, and U1:P26, to give the microcontroller a mode sense line.
- JP3: connects U1:RESET to U2:6Y, completing the reset circuit in PC mode.
- JA4/JP4: connects the PC clock line to one of:
- JP4: U2:1Y and U2:2A, that is, the input to INT and the output from P27,
- JA4: R25 and U2:3A, along with the Q3 transistor, the corresponding ADDS inputs.
There are pull-ups inside the keyboard, so the idle state of the signal line is high, but either end can pull it down at any time.
Doing nothing else, a key press results in the keyboard pulling down for 62.5ms (a long time), repeating every 1.25s while anything is held. It does not matter which key. I suppose that this is some kind of wake-up from low-power mode in the terminal.
To get a meaningful signal, the terminal needs to request it. I found that a 100us low pulse every 5ms does the trick. There seems to be some flexibility in the timing and I don't know what the real terminal does.
300us after the rising edge, if the keyboard has data, it sends eight bits, MSB first, encoded as pulses of different width: long 142us for 1, short 28us for 0. The reason I know the polarity and endianness is that the scan codes for printing characters are their unshifted ASCII. So, 41 for A. And, to be clear, this code does not change when SHIFT or CTRL is pressed.
Only four keys send break codes, above the range of regular scan codes, but otherwise unrelated to their make code. In addition to the obvious SHIFT (left and right are indistinguishable) and CTRL, there are ESC and DEL. I'm not sure why.
This is enough to code up a converter, although it's less flexible than PC/AT mode, so not very useful. Given the location of the INS key and that DEL sends key up, but FUNCT does not, I'd be tempted to swap those keycaps if using this keyboard for any length of time, thereby getting an ALT or CMD shift with a somewhat sensible legend.
The only thing still to be figured out is how to control the LOCK LED. I found that sending a 200us square wave causes it to flash briefly every few seconds. Various other frequencies do not do this. Given how output works, it might be that the secret is a shorter sequence of long and short pulses. But I haven't arrived at it yet.