Reverse engineering a 1985 IBM keyboard (and building a USB converter for it)
Vložit
- čas přidán 22. 08. 2024
- In whch yr hmbl svt attempts to use a IBM 6770 System/40 QuietWriter keyboard dating back from 1985 as a daily driver, which is interesting becaue it's very much not XT or PS/2... and it's got an LCD.
The resulting USB adapter almost works, but since making the video I realised that the keymap isn't quite right as I can't type # or |, plus the G key stopped working again. But I did successfully edit the video using the keyboard! And it's lovely.
See github.com/dav... for the resulting code and what I found out about the keyboard specs, plus the output files from the ghidra reverse engineering of the keyboard firmware.
You gave me a big Deja Vu moment. The 8021 keyboard controller died in my Victor 9000 keyboard which led me on a wonderful journey in replacing it with an Arduino Nano. Works a treat but it was very much a personal challenge!
Great video!
Cool project. 🙂
I also managed to get my IMC-2001 keyboard working (roughly 1984). It had some defect ICs and some broken cables. That keyboard has a MCS-48 clone CPU in it (CIC8039E) and the protocol proved to be simple 7-bit ASCII with a stop bit on serial 19200 baud. There is an additional signaling line leading directly to a register on the motherboard (presumably latching in the current value of the key pressed into a memory mapped byte in memory). And it has a active low reset line for the Apple ][ reset key.
Really great reverse engeneering, but take care, those kinds of typewriters are really rare and worth enough to preserve in original condition!
Really cool video!
great watch thanks!
Great use (adaptation) of a typewriter keyboard.
Poking at the code you've shared - I wonder if the original programmer used goto's to keep their switch statement orderly, or if it's a quirk introduced by the compiler.
I'd imagine that the original code would have been hand-written assembly. It's actually all strung together with gotos, written as a big state machine, and makes clever use off the 8051 register banks so a lot of state is kept in registers long term (not that the 8051 really has RAM, as such!). The original source would be interesting to see.
@@hjalfiI'd like to see it too.
There used to be an Atom (depreciated) plugin that would allow scope-aware renaming of {function and variable} names that I found really useful when un-obstuficating code.
I wonder if it has been ported to another editor yet.
*EDIT:* better, there are many more 'refactoring' plugins for other editors now than way back when I last searched.
*Edit 2:* questionable, not all of them claim to be scope aware...
Amazing work!
What is that reverse engineering tool you were using? Thx
That'll be ghidra, courtesy of the NSA.
You used a buck converter? I bet with you that the -5V line is powered by a 7905, the fix would be simpler than you think.
Most likely, yeah, but simply getting access is a pain. I also wonder whether the sensor failure is because something else is relying on the -5V line upstream of my fix, although I can't imagine what.
Can I have your old Unicomp keyboard? And your channel intro reminds me of @backofficeshow
NO IT'S MINE! Although after the 6770 keyboard it does feel disappointingly mushy and imprecise...