TMK IBM PC Keyboard Converter

User avatar
hasu

05 Dec 2019, 01:11

IBM PC Keyboard Converter

The converter translates IBM PC keyboard protocols to plug classic keyboards into modern computer with USB ports. It supports both IBM XT and AT protocols, and all of scan code set 1, 2 and 3 with one firmware.


Also check this corresponding thread at geekhack.org.
https://geekhack.org/index.php?topic=103648.0


REQUEST FOR HELP:
Try prebuilt firmware below and report your result, please.
Post your keyboard model number here, also debug outputs on hid_listen would be helpful.

The converter need to be tested with keyboards below particularly, as of 2020-03-24.

- IBM PC XT 83-key
- IBM PC AT 84-key
- Zenith Z-150 XT black label
- Zenith Z-150 AT beige label




Update

2020-04-28 Add support G80-2551 and possibly other terminal keyboards(whose id is AB86)
2020-04-11 Keymap Editor is available
2020-03-02 firmware update for XT protocol handling and many other fixes



Hardware

Firmware supports ATMega32u4 by default, Teensy2/2++ or ProMicro can be used.
Wire controller pins below to keyboard signals, besides VCC and GND. This is compatible for Soarer's converter.

- Data: PD0
- Clock: PD1
- Reset: PB6 or PB7 (For some of XT keyboards. Not needed for AT, PS/2 and Terminal)

Pull up resistors of 1-4.7K Ohm on both Data and Clock line are recommended, without them it won't work in some cases.

Reset
Old Type-1 IBM XT keyboard and some of XT clones need this to reset its controller on startup. Many of IBM XT keyboards available are Type-2 and don't need the reset pin.

See this for Type-1 vs Type-2:
https://vintagecomputer.ca/ibm-pc-model ... vs-type-2/

As for clones Zenith Z-150 XT and Leading Edge DC-2014 are known to need this.

Connector pinouts
XT
- http://www.kbdbabel.org/conn/kbd_connector_ibmpc.png
- https://allpinouts.org/pinouts/connecto ... -xt-5-pin/

AT
- http://www.kbdbabel.org/conn/kbd_connector_ps2.png
- https://old.pinouts.ru/InputCables/Keyb ... nout.shtml

PS/2
- https://pinouts.ru/InputCables/KeyboardPC6_pinout.shtml

Terminal
- http://www.kbdbabel.org/conn/kbd_connector_ibmterm.png
- http://www.kbdbabel.org/conn/kbd_connec ... x_319x.png



Keymap Editor

You can edit keymap and download firmware here.

http://www.tmk-kbd.com/tmk_keyboard/editor/#ibmpc_usb


Default Prebuilt Firmware

You can usually download fimware from Keymap Edior above.
Use this default firmware when you are in trouble.

https://github.com/tmk/tmk_keyboard/tre ... usb/binary



Build Firmware

Download source code from: https://github.com/tmk/tmk_keyboard/tre ... /ibmpc_usb

$ cd converter/ibmpc_usb
$ make clean
$ make



Debug

Use hid_listen to see debug outputs from the converter.

https://www.pjrc.com/teensy/hid_listen.html

Code: Select all

Waiting for new device:...
Listening:


TMK:95aba6dd/LUFA


USB configured.

Keyboard start.
rAA rBF rBF wF5 rFA wF2 rFA rBF rBF wF4 rFA ID: BFBF
kbd: Terminal
wF8 rFA  
Last edited by hasu on 03 May 2020, 12:34, edited 9 times in total.

User avatar
ZedTheMan

05 Dec 2019, 01:22

This is exciting! I will begin to convert my soarer's converters to this for my F122 and other boards. Just have to break open the orihalcon cable and jerryrig reset pins directly to the 32u4.

User avatar
Muirium
µ

05 Dec 2019, 01:54

Looks promising: TMK has learned all of Soarer’s multi-protocol handling tricks!

I hope this will be Unimap compatible when you’re done! I love defining everything graphically.

User avatar
depletedvespene

05 Dec 2019, 02:02

Okay. I'm in for this.

User avatar
hasu

05 Dec 2019, 02:21

ZedTheMan ,
Yes, reset button would be a must-have when in trouble.
I don't recommend to use converter without reset button like orihalcon's for now at least. To use Teensy or Pro Micro is fine and safe.

If the firmware recognize your keyboard correctly you can put it into bootloader mode by holding 'Left shift + Right shift + Pause'. But if not you won't be able to acccess bootloader without reset button. I have a plan to add emergency rescue method for the situation.

Muirium,
I'll add specific support for this converter to my Keymap Editor some later.
But until then, you can do with trick below.

0. Download prebuilt firmware
1. Open Editor: http://www.tmk-kbd.com/tmk_keyboard/edi ... p/?usb_usb
2. Select the downloaded file on file chooser in 'Base Firmware File:' section
3. Click 'Load keymap from firmware' button
4. Edit your keymap
3. Then, click 'Download' button

John Doe

05 Dec 2019, 02:23

Nice job, ill have a try on my at/122 to see what will happen. Appreciate it.

User avatar
hasu

06 Jan 2020, 03:09

anyone can help?

REQUEST FOR HELP: Try and report your result.
Post your keyboard model number here, also debug outputs on hid_listen would be helpful.

User avatar
hasu

04 Mar 2020, 04:14

anyone?

User avatar
Redmaus
Gotta start somewhere

04 Mar 2020, 04:56

Would it be possible to test a Wyse? I can test some AT boards soon.

User avatar
ZedTheMan

04 Mar 2020, 05:53

Hi Hasu, sorry for not responding. I will flash this to my xt usb converter and try it with various boards I have when I have time, but this may take a bit, sorry.

User avatar
Redmaus
Gotta start somewhere

04 Mar 2020, 06:39

Works like a dream on my DS-2001! Thanks Hasu!

Soarer's kept messing up every time I stopped using it for awhile. DS-2001 uses AT protocol fyi.
IMG_9700.JPG
IMG_9700.JPG (281.43 KiB) Viewed 562 times

User avatar
hasu

04 Mar 2020, 10:53

Redmaus, Thanks for the test!
and good to know it works with the keyobard.
As for Wyse, this doesn't support Wyse proprietary protocol. If the board speaks in AT, XT or Terminal protocol the converter should works.


At this time I'm interested in test results with keyboards below particularly.
It would be helpful to debug firmware if someone with the boards can test the converter with them.

- IBM PC XT 83-key(Model F)
- IBM PC AT 84-key(Model F)

User avatar
snacksthecat
✶✶✶✶

13 Mar 2020, 21:32

I can't promise I'll do it yet (not sure if I have parts on hand) but I own both of those keyboards so I'm going to "half" commit to testing the two Model Fs for you today or tomorrow.

Stuff like this is the least we can do after you've contributed so many great projects to the keyboard world, Hasu :)

User avatar
hasu

03 May 2020, 12:35

Updated first post.

Keymap Editor is avaialable here now.
http://www.tmk-kbd.com/tmk_keyboard/editor/#ibmpc_usb

Post Reply

Return to “Workshop”