XT/AT/PS2/Terminal to USB Converter with NKRO

This is my Teensy-based project which adapts XT, AT and some 122 key terminal keyboards to USB, also known simply as "Soarer's Converter".

Yes, it's the same old thing that's been on geekhack for the last year, but it's now at v1.0 v1.12 and pretty much feature-complete.

So I'd like to share it here too :evilgeek:

Features...

Keyboard protocols supported:
  • XT (scan code set 1)
  • AT (scan code set 2)
  • PS/2 (MF2) (extended scan code set 2)
  • Terminal e.g. 3179/318x/319x (scan code set 3)
Configurable Features:
  • Remapping
  • Layers
  • Macros
  • On-the-fly Config Selection
Other Features:
  • Full NKRO, if the keyboard supports it (even on Macs!)
  • Boot mode support (even with faulty BIOS!)
  • Auto-detection of the keyboard type
  • XT and AT boards are remapped correctly for PrtSc etc. (see Legacy Note below)
  • 1000Hz polling using Full Speed USB
  • Suspend and resume support
  • Media and Power key support
  • Jump to bootloader function (update firmware without pressing the reset button)
  • Support for 'almost' PC/XT protocol keyboards, e.g. Leading Edge DC-2014
  • Keyboard Reset output (required by some PC/XT keyboards)
  • Five auxiliary key inputs (for extra keys, buttons, or footswitches)
Supported Atmel CPUs:
  • ATmega32U4 (Teensy 2.0, Adafruit '32U4 breakout, etc.)
  • AT90USB1286 (Teensy++ 2.0)
  • AT90USB646 (original Teensy++)
  • ATmega16U4 (???)

Full documentation (well, better than the old project article at least) is included in the zip...

Soarer_Converter_v1.10.zip
(956.19 KiB) Downloaded 724 times

v1.10 full (.hex files, docs, tools, configs):
Added support for 'almost' PC/XT protocol keyboards, e.g. Leading Edge DC-2014.
Added Keyboard Reset output (required by some PC/XT keyboards).
Added five auxiliary key inputs (for extra keys, buttons, or footswitches).
Updated and expanded documentation generally, and added GH and DT Thread Contents pages and History page.
Fixed error LED timeout so it now stays on for 3 seconds after an error instead of flickering.

Soarer_Converter_v1.11_update.zip
(62.04 KiB) Downloaded 179 times

v1.11 update (.hex files only):
Added support for IBM RT keyboard.
Added display of boot mode state by making converter lock LEDs glow dimly.
Added extra error codes to help determine where timeouts occur more precisely.
Prevented debug and rawhid output when keyboard_protocol is not set (i.e. in BIOS mode).

Soarer_Converter_v1.12_update.zip
(61.9 KiB) Downloaded 310 times

v1.12 update (.hex files only)
Added workaround for Linux kernel v3.x bug which causes Delete key not to repeat.

Soarer_Converter_v1.12_docs.zip
(623.79 KiB) Downloaded 464 times

v1.12 updated documentation (docs only)
Various tweaks, added GH and DT thread search, updated GH and DT thread contents.


Important note - the connector diagrams are drawn looking into the front of socket. When you are soldering the pins on the back of the socket, you need to make sure they are correct, since your view is reversed. Especially for the AT and PS/2 sockets, where mirroring the connections will result in power and ground being swapped - and that is VERY BAD!

Please, if you are not certain that your wiring is correct just post a pic in this thread to have it checked before you power it up :)


Legacy Note - in v0.996 and earlier, hard-coded settings were used to support correct remapping of PrtSc etc. for XT and AT keyboards. These settings are now implemented by the legacy.sc config file, which must be compiled (by scas) and loaded (by scwr, after flashing) if you want the v0.997 (or later) converter to act like v0.996.


Older versions attached...

v1.0 full (.hex files, docs, tools, configs)

v1.01 update (.hex files only):
Fixed bug that stopped jump to bootloader functions working on AT90USB1286 (Teensy++ 2.0).

v1.02 update (.hex files only):
Fixed bug which could cause the converter to lock up if a key was pressed at certain times during system boot.

v1.03 update (.hex files only):
Fixed bug which caused the converter to lose config or reboot after using the scrd tool.
Fixed minor USB errors revealed by using the Command Verifier compliance testing tool.
Attachments
Soarer_Converter_v1.03_update.zip
(60.01 KiB) Downloaded 204 times
Soarer_Converter_v1.02_update.zip
(61.69 KiB) Downloaded 139 times
Soarer_Converter_v1.01_update.zip
(61.4 KiB) Downloaded 86 times
Soarer_Converter_v1.0.zip
(393.95 KiB) Downloaded 378 times
Last edited by Soarer on 31 Jul 2013, 02:11, edited 21 times in total.
Soarer
User avatar

Unread post23 Apr 2012, 00:54

User avatar
X
Soarer
 
Posts: 999
Joined: 03 Jul 2011, 02:03
Location: UK
Favorite switch: F
 
Oh nice work! Now all i need is a teensy :lol:
Maarten
User avatar

Unread post23 Apr 2012, 07:35

User avatar
X
Maarten
 
Posts: 347
Joined: 12 Oct 2011, 22:20
Location: Leiden, the Netherlands
Main keyboard: Mr Unbreakeyble
Main mouse: Kova+
Favorite switch: any MX
 
This is a good opportunity to say thank you! I'm using a XT model F with your converter and it works like a charm. Next on my to-do list is building a converter box that takes all kind of input connectors: DIN 180, DIN 270, 8p8c (RJ45) and RS232.
Kurk
User avatar

Unread post23 Apr 2012, 07:59

User avatar
X
Kurk
 
Posts: 553
Joined: 03 Nov 2011, 22:10
Location: Sauce Hollondaise (=The Netherlands)
Main keyboard: Kinesis Advantage // Filco MJ2 + HID liberation
Main mouse: ITAC Mousetrak Professional
Club member: 0027
 
Congrats on getting 1.0 out, and thank you. This adapter is powering my favorite keyboard (a 122 F), internally installed with double-stick tape.
bhtooefr
User avatar

Unread post23 Apr 2012, 12:10

User avatar
X
bhtooefr
 
Posts: 687
Joined: 09 May 2011, 20:46
Location: Newark, OH, USA
Main keyboard: Matias Tactile Pro 4
Main mouse: ScrollPoint Optical 800dpi
Favorite switch: Matias Click
Club member: 0056
 
Thanks people, you're welcome!

I hope there aren't too many bugs discovered, so I can now play with some other stuff for a bit (not saying this has been full-time, but when I've had time I've felt I had to spend it on this). There are still a few things I want to do to improve it though, so this definitely isn't 'The End' by any means! :-D
Soarer
User avatar

Unread post23 Apr 2012, 14:43

User avatar
X
Soarer
 
Posts: 999
Joined: 03 Jul 2011, 02:03
Location: UK
Favorite switch: F
 
Excellent converter! It is not just for IBM keyboards. It can make all your Filco keyboards do NKRO over PS/2 over USB!. Really cool!
litster
User avatar

Unread post23 Apr 2012, 17:18

User avatar
X
litster
 
Posts: 803
Joined: 23 Jun 2011, 07:28
Location: Washington State, USA
Main keyboard: KMAC2, The Cheat
Favorite switch: Brown, Topre, Red, BS
 
Yup, have to agree, this converter firmware is by far the best. I'm using a teensy atm on my Unicomp 122-Key Emulator, which is my daily driver at home, and it will be featured in my Raspberry M Mod, in which I will make a full computer out of a Model M Terminal board. (once my Raspberry Pi arrives, which will take some time)

Will you spend more time on deskthority in the future? I've seen, that you started to post more regularly here.
RC-1140
User avatar

Unread post23 Apr 2012, 17:31

User avatar
X
RC-1140
 
Posts: 769
Joined: 07 Sep 2011, 21:30
Location: Germany
Main keyboard: Unicomp Terminal Emulator
Main mouse: Razer Mamba
Favorite switch: Buckling Spring
Club member: 0020
 
 
Unicomp 122-Key Terminal Emulator - IBM Model M 1394309 - IBM Model M 1394312 (Terminal) - Cherry G84-4100 - Cherry G80-1800LUMDE-2 - Cherry G80-2551HAD (with a spare NIB)
RC-1140 wrote:Will you spend more time on deskthority in the future? I've seen, that you started to post more regularly here.

I probably will - I'm a forum whore, I'll open my mouth wherever there are good postings! :lol:
Soarer
User avatar

Unread post23 Apr 2012, 20:19

User avatar
X
Soarer
 
Posts: 999
Joined: 03 Jul 2011, 02:03
Location: UK
Favorite switch: F
 
This is a fantastic converter. Used it for an old BTC (I think it was BTC at least) keyboard I found in my attic. Even NKRO was working, which was a bit of a surprise.

I think I broke something when I tried to put my Teensy and a new 5pin DIN on an experiment PCB board thingy (I have no idea what these are called in English lol). :(
The important part is I'm only getting a lot of "R05"s and "R04"s when debugging the converter with hid_listen now - and nothing works. You wouldn't happen to know what this means Soarer? I've recently discovered I'm quite skilled with breaking electrical components, so I hope this is not the case here. :?
fruktstund
User avatar

Unread post23 Apr 2012, 20:41

User avatar
X
fruktstund
 
Posts: 257
Joined: 28 Feb 2012, 17:52
Location: Sweden
Main keyboard: HHKB Pro 2
Main mouse: Logitech g400
Favorite switch: Ergo-Clears (I think - can never decide)
 
fruktstund wrote:The important part is I'm only getting a lot of "R05"s and "R04"s when debugging the converter with hid_listen now - and nothing works. You wouldn't happen to know what this means Soarer?

It could just be a wiring error when you rebuilt it... is it rebuilt with the same connector type? and using the same keyboard? The most common error is getting the connector pins mirrored, and it can output misleading eror codes in that case.
Soarer
User avatar

Unread post23 Apr 2012, 21:07

User avatar
X
Soarer
 
Posts: 999
Joined: 03 Jul 2011, 02:03
Location: UK
Favorite switch: F
 
Soarer wrote:
fruktstund wrote:The important part is I'm only getting a lot of "R05"s and "R04"s when debugging the converter with hid_listen now - and nothing works. You wouldn't happen to know what this means Soarer?

It could just be a wiring error when you rebuilt it... is it rebuilt with the same connector type? and using the same keyboard? The most common error is getting the connector pins mirrored, and it can output misleading eror codes in that case.

Yeah, it seems the most likely that it's a wiring error, even though that would mean I wired stuff wrong three times in a row. I did it when I was a bit tired so who knows.
And yes, it's rebuilt with the same connector type, using the same keyboard.

I'll have to check as soon as I can, I guess.
fruktstund
User avatar

Unread post23 Apr 2012, 21:13

User avatar
X
fruktstund
 
Posts: 257
Joined: 28 Feb 2012, 17:52
Location: Sweden
Main keyboard: HHKB Pro 2
Main mouse: Logitech g400
Favorite switch: Ergo-Clears (I think - can never decide)
 
fruktstund wrote:Yeah, it seems the most likely that it's a wiring error, even though that would mean I wired stuff wrong three times in a row. I did it when I was a bit tired so who knows.
And yes, it's rebuilt with the same connector type, using the same keyboard.

It's pretty unusual to actually kill anything (but it has been known). Although, it's odd that you'd make an error with parts you were already familiar with, let alone three times! Post a pic if you can, we might spot something.
Soarer
User avatar

Unread post23 Apr 2012, 22:16

User avatar
X
Soarer
 
Posts: 999
Joined: 03 Jul 2011, 02:03
Location: UK
Favorite switch: F
 
Is there any way to build such a converter without soldering?
Grond
User avatar

Unread post24 Apr 2012, 16:34

User avatar
X
Grond
 
Posts: 1022
Joined: 14 Mar 2011, 00:54
Location: Milan, Italy
Main keyboard: Filco Majestouch Tenkeyless
Main mouse: Kensington Slimblade
Favorite switch: Cherry MX Blue
 
Yes, although it'll take having a Teensy with pins, and then having the right jumper wires, and mounting it internally, I think.
bhtooefr
User avatar

Unread post24 Apr 2012, 16:37

User avatar
X
bhtooefr
 
Posts: 687
Joined: 09 May 2011, 20:46
Location: Newark, OH, USA
Main keyboard: Matias Tactile Pro 4
Main mouse: ScrollPoint Optical 800dpi
Favorite switch: Matias Click
Club member: 0056
 
Yes, although it'll take having a Teensy with pins, and then having the right jumper wires, and mounting it internally, I think.

I'd like to make this converter for Model M terminal. Suppose I get a female RJ connector and jumper wires... would this work?
Grond
User avatar

Unread post24 Apr 2012, 16:44

User avatar
X
Grond
 
Posts: 1022
Joined: 14 Mar 2011, 00:54
Location: Milan, Italy
Main keyboard: Filco Majestouch Tenkeyless
Main mouse: Kensington Slimblade
Favorite switch: Cherry MX Blue
 
You'd probably need to solder the RJ connector.

However, 122-key terminal Ms (if it's one of those) have a six-pin connector internally that the cable hooks to.
bhtooefr
User avatar

Unread post24 Apr 2012, 16:50

User avatar
X
bhtooefr
 
Posts: 687
Joined: 09 May 2011, 20:46
Location: Newark, OH, USA
Main keyboard: Matias Tactile Pro 4
Main mouse: ScrollPoint Optical 800dpi
Favorite switch: Matias Click
Club member: 0056
 
Yes it does! So what? Can I get a wire that goes from the six pin connector to the Teensy or what? Sorry for my ignorance!
Grond
User avatar

Unread post24 Apr 2012, 17:03

User avatar
X
Grond
 
Posts: 1022
Joined: 14 Mar 2011, 00:54
Location: Milan, Italy
Main keyboard: Filco Majestouch Tenkeyless
Main mouse: Kensington Slimblade
Favorite switch: Cherry MX Blue
 
You would need female jumper wires to go from the pins on the controller to the pins on the Teensy.
bhtooefr
User avatar

Unread post24 Apr 2012, 17:30

User avatar
X
bhtooefr
 
Posts: 687
Joined: 09 May 2011, 20:46
Location: Newark, OH, USA
Main keyboard: Matias Tactile Pro 4
Main mouse: ScrollPoint Optical 800dpi
Favorite switch: Matias Click
Club member: 0056
 
Grond
User avatar

Unread post24 Apr 2012, 17:36

User avatar
X
Grond
 
Posts: 1022
Joined: 14 Mar 2011, 00:54
Location: Milan, Italy
Main keyboard: Filco Majestouch Tenkeyless
Main mouse: Kensington Slimblade
Favorite switch: Cherry MX Blue
 
That would work, yes.
bhtooefr
User avatar

Unread post24 Apr 2012, 17:46

User avatar
X
bhtooefr
 
Posts: 687
Joined: 09 May 2011, 20:46
Location: Newark, OH, USA
Main keyboard: Matias Tactile Pro 4
Main mouse: ScrollPoint Optical 800dpi
Favorite switch: Matias Click
Club member: 0056
 
Thanks! :D
Grond
User avatar

Unread post24 Apr 2012, 18:40

User avatar
X
Grond
 
Posts: 1022
Joined: 14 Mar 2011, 00:54
Location: Milan, Italy
Main keyboard: Filco Majestouch Tenkeyless
Main mouse: Kensington Slimblade
Favorite switch: Cherry MX Blue
 
Soarer wrote:
fruktstund wrote:Yeah, it seems the most likely that it's a wiring error, even though that would mean I wired stuff wrong three times in a row. I did it when I was a bit tired so who knows.
And yes, it's rebuilt with the same connector type, using the same keyboard.

It's pretty unusual to actually kill anything (but it has been known). Although, it's odd that you'd make an error with parts you were already familiar with, let alone three times! Post a pic if you can, we might spot something.

I've checked the wiring now and I'm confident it's correctly done! I also tried it out with a PS/2 connector, and I'm still getting the same problem.

When I measured the resistance between Vcc and GND I got about 0.420MΩ. I don't know if it's supposed to be that way or not, as I haven't really fiddled with electrical circuits since 7th grade, or something like that. :P
So an opinion about this from someone who's more knowledgeable about this kind of stuff would be greatly appreciated. ;)
fruktstund
User avatar

Unread post27 Apr 2012, 01:29

User avatar
X
fruktstund
 
Posts: 257
Joined: 28 Feb 2012, 17:52
Location: Sweden
Main keyboard: HHKB Pro 2
Main mouse: Logitech g400
Favorite switch: Ergo-Clears (I think - can never decide)
 
fruktstund wrote:I've checked the wiring now and I'm confident it's correctly done! I also tried it out with a PS/2 connector, and I'm still getting the same problem.

When I measured the resistance between Vcc and GND I got about 0.420MΩ. I don't know if it's supposed to be that way or not, as I haven't really fiddled with electrical circuits since 7th grade, or something like that. :P
So an opinion about this from someone who's more knowledgeable about this kind of stuff would be greatly appreciated. ;)

Hmm, I get about 0.6MΩ measured on the Teensy, with no keyboard or USB attached. I'm not sure if the difference is significant. The input pins are perhaps the most vulnerable - without pull-up resistors, I get a few MΩ between the data pin and ground, a bit less between data and Vcc. (And the same for between clock and Vcc or GND). With the converter connected to USB, but no keyboard attached, you should see roughly +5V on the data and clock pins of the connector (actually, those should still be +5V with a keyboard attached).
Soarer
User avatar

Unread post27 Apr 2012, 02:51

User avatar
X
Soarer
 
Posts: 999
Joined: 03 Jul 2011, 02:03
Location: UK
Favorite switch: F
 
I seem to get approximately the same measurements as you Soarer, so this is beginning to get rather weird... I'll check my Teensy under my loupe later, to see if I can spot something strange!
fruktstund
User avatar

Unread post28 Apr 2012, 12:35

User avatar
X
fruktstund
 
Posts: 257
Joined: 28 Feb 2012, 17:52
Location: Sweden
Main keyboard: HHKB Pro 2
Main mouse: Logitech g400
Favorite switch: Ergo-Clears (I think - can never decide)
 
Well, it doesn't mean the Teensy isn't damaged, but it seems to be basically OK.

What does hid_listen show when you connect the converter? (Run hid_listen, connect kb to converter, connect converter to usb).
Soarer
User avatar

Unread post28 Apr 2012, 13:53

User avatar
X
Soarer
 
Posts: 999
Joined: 03 Jul 2011, 02:03
Location: UK
Favorite switch: F
 
fruktstund - did you spot anything?
Soarer
User avatar

Unread post05 May 2012, 15:34

User avatar
X
Soarer
 
Posts: 999
Joined: 03 Jul 2011, 02:03
Location: UK
Favorite switch: F
 
Finally had the opportunity to test it... a masterpiece.
Info research, write phase, testing, debugging, documenting... really valuable work.
nfc

Unread post08 May 2012, 23:05

X
nfc
 
Posts: 51
Joined: 30 Dec 2011, 23:34
Location: Italy
Main keyboard: Cherry G80 / Model M
Main mouse: Generic
Favorite switch: MX Blue / Buckling Spring
 
What are the chances of the wyse boards working? Before I start messing on with mine.
dirge
User avatar

Unread post09 May 2012, 09:14

User avatar
X
dirge
 
Posts: 2033
Joined: 28 Jan 2012, 21:02
Location: Newcastle Upon Tyne, United Kingdom.
Club member: 0033
 
nfc wrote:Finally had the opportunity to test it... a masterpiece.
Info research, write phase, testing, debugging, documenting... really valuable work.

:oops: Thanks! I'm happy enough if it's 'useful' :D
dirge wrote:What are the chances of the wyse boards working? Before I start messing on with mine.

Pretty slim, I'm afraid. I don't know much about them, or how many different types there are. Certainly it looks like the WY85 and WY-PCE boards would not work; they have completely different signalling (ref: kbdbabel).
Soarer
User avatar

Unread post09 May 2012, 13:42

User avatar
X
Soarer
 
Posts: 999
Joined: 03 Jul 2011, 02:03
Location: UK
Favorite switch: F
 
You're much better at this type of thing so would you offer some advice on how I could start getting this http://keyboardporn.com/mx-switch/wyse-wy60-terminal/ converted?

Just need to know how to start, have breadboard, teensy2, female connector for the WYSE. I'll try not to be a massive pain in the arse :)
dirge
User avatar

Unread post09 May 2012, 14:48

User avatar
X
dirge
 
Posts: 2033
Joined: 28 Jan 2012, 21:02
Location: Newcastle Upon Tyne, United Kingdom.
Club member: 0033
 
Next

Who is online

Users browsing this forum: Hypersphere and 21 guests