XT to USB project [OPEN SOURCE]

Manak1n's Open Source Converter (XT)
About a week ago I found an IBM Model F and began to search how I could get it working with my computer. To my disappointment, Soarer's solution didn't work with the Teensy 3.1 that I had on hand. It took several hours of work over the course of three days for me to get the keyboard all up and working, and a few more days to clean up the code.
Porting Soarer's code to the Teensy 3.1 would have saved me quite a bit of time, but unfortunately he hasn't released the source. This is my attempt at creating an open source "branch" from what he started. Theoretically, this is compatible with all Teensy boards other than the Teensy 1.0/1.0++ (need to change the LED pin for Teensy 2.0/2.0++).
Currently, the code is as optimized and documented as I can do without feedback. This branch is limited to XT, but if there is enough demand I may start a separate open source AT branch.

RIGHT NOW ONLY THE FIRST 83 KEYS ARE SUPPORTED. I need volunteers to test with larger keyboards!

Keyboards currently supported:
  • IBM Model F "XT" (83 key) [verified]
  • Other XT-set 1 keyboards
Microcontrollers currently supported:
  • Teensy 3.2
  • Teensy 3.1 [verified]
  • Teensy 3.0
  • Teensy++ 2.0
  • Teensy 2.0
Features:
  • 6 Key rollover minimum (10 max)
  • Dual-layered function keys (toggle with NumLock)
  • Bypassing of keyboard's built-in key repeat
  • Porting to other Arduino boards is not too difficult
Known bugs:
  • If you hold down both shift keys and then release them, shift stays on until you press and release it again.
  • Both shift keys map to left shift.
To do:
Please inform me of any feature requests you may have, or bugs you find.
  • Add generic Arduino code version for wider microcontoller support.
  • Change Teensy from mouse+keyboard+joystick to Keyboard only
  • Add extended XT keyboard support (volunteers needed)

I don't play to implement full NKRO because it isn't worth the pain. 6 keys is fine for mouse+keyboard gaming, and I don't know anyone who presses more than 6 keys simultaneously while typing. Really, it will break more than it will help.

Setup
Choose either the MAIN or ALTERNATE builds. Main is standard key layout, alternate swaps the control and alt keys to better resemble modern keyboards.

Currently, only XT is supported:
Image
Note: DOUBLE CHECK! Bad wiring is baaaad!
Teensy ------ Keyboard
Vin ---------- Vcc +5v
PD2 --------- Clock
PD3 --------- Data
GND -------- GND

Note: I'm trying to keep TX and RX open for development purposes.

Set up Teensyduino so you know how to compile and upload to controller.
Follow these settings in the Arduino IDE:
(Make sure you set the board to YOUR version of Teensy)
Image

Finally, load up the .ino and then simply upload to the board if you have a Teensy 3.1.
If you have a Teensy 2.0 or 2.0++, change LED_Pin in the sketch to 11 or 6, respectively.
You will probably get a warning saying that the Teensy didn't reset. Ignore it, this happens often when you are in USB HID mode.
If everything went smoothly, you should now have it up and running!
Attachments
MOSC_XT_Version_0.1.zip
v0.1 - Initial release.
(21.94 KiB) Downloaded 160 times
Last edited by Manak1n on 11 Feb 2016, 04:03, edited 3 times in total.
Manak1n

Unread post11 Jan 2016, 21:12

X
Manak1n
 
Posts: 6
Joined: 11 Jan 2016, 19:23
Location: California
Main keyboard: IBM Model F XT
Main mouse: Zelotes 3200 DPI
Favorite switch: Buckling Springs
DT Pro Member: -
 
What a nice surprise !!!

Thanks !
idollar
i$

Unread post11 Jan 2016, 22:28

X
idollar
i$
 
Posts: 1317
Joined: 24 Oct 2014, 15:57
Location: Germany (Frankfurt area)
Main keyboard: IBM F or M
Favorite switch: BS
DT Pro Member: -
 
96 MHz??
Spoiler:
Image
Muirium
User avatar
µ

Unread post11 Jan 2016, 23:24

User avatar
X
Muirium
µ
 
Posts: 22976
Joined: 03 Feb 2013, 10:11
Location: Edinburgh, Scotland
Main keyboard: HHKB Type-S with Bluetooth by Hasu
Main mouse: Apple Magic Mouse
Favorite switch: Gotta Try 'Em All
DT Pro Member: -
 
Great work, Manak1n! Unfortunately I don't have any XT boards to hand that I can test with or else I'd be all over it. I really appreciate that it's open source too. That's where Soarer's converter fell over, unfortunately. I had a quick scan of the code and it's fairly simple (at least when defining the layout) which is very nice. Can't wait to see how this develops.
scottc
User avatar

Unread post11 Jan 2016, 23:33

User avatar
X
scottc
 
Posts: 5663
Joined: 06 Oct 2013, 21:09
Location: Remote locations in Europe
Main keyboard: GH60-HASRO 62g Nixies, HHKB Pro1 HS, Novatouch
Main mouse: Steelseries Rival 300
Favorite switch: Nixdorf 'Soft Touch' MX Black
DT Pro Member: -
 
Impressive first post, welcome to DT. Great work, keep it up.
seebart
User avatar
Offtopicthority Instigator

Unread post11 Jan 2016, 23:45

User avatar
X
seebart
Offtopicthority Instigator
 
Posts: 11519
Joined: 22 Nov 2013, 20:20
Location: Germany
Main keyboard: Rotation
Main mouse: Steelseries Sensei
Favorite switch: IBM capacitive buckling spring
DT Pro Member: 0061
 
 
Muirium wrote:96 MHz??
Spoiler:
Image

Yeah, doesn't need to be that high. I imagine you can turn it down all the way to 24 Mhz and it would extend the lifespan. I'll update the image later with something more sensible.
Manak1n

Unread post12 Jan 2016, 04:52

X
Manak1n
 
Posts: 6
Joined: 11 Jan 2016, 19:23
Location: California
Main keyboard: IBM Model F XT
Main mouse: Zelotes 3200 DPI
Favorite switch: Buckling Springs
DT Pro Member: -
 
Hey amazing work! Is this compatible with the terminal keyboards like soarer's converter was?
mastermachetier

Unread post12 Jan 2016, 05:53

X
mastermachetier
 
Posts: 54
Joined: 12 Jan 2016, 01:25
Location: Boston
Main keyboard: ducky shine zero
Main mouse: usb
Favorite switch: alps orange
DT Pro Member: -
 
I doubt that, as Soarer's was explicitly an XT + AT + IBM terminal converter. They aren't the same protocol, as I understand.
Muirium
User avatar
µ

Unread post12 Jan 2016, 05:55

User avatar
X
Muirium
µ
 
Posts: 22976
Joined: 03 Feb 2013, 10:11
Location: Edinburgh, Scotland
Main keyboard: HHKB Type-S with Bluetooth by Hasu
Main mouse: Apple Magic Mouse
Favorite switch: Gotta Try 'Em All
DT Pro Member: -
 
 
terminals are scancode set 3 not 1 so no luck with that.

and honestly as expensive as it is i would get an xwhatsit in the thing, nip that nasty old controller in the bud.

This however is an awesome project, we need a nice open source ( GPL i hope :P) converter. The beauty of that is it can be expanded by others.
andrewjoy

Unread post12 Jan 2016, 11:02

X
andrewjoy
 
Posts: 5107
Joined: 11 Apr 2012, 16:27
Location: UK
Main keyboard: Filco ZERO green alps, Model F 122 Terminal
Main mouse: Ducky Secret / Roller Mouse Pro 1
Favorite switch: MX Mount Topre / Model F Buckling
DT Pro Member: 0167
 
mastermachetier wrote:Hey amazing work! Is this compatible with the terminal keyboards like soarer's converter was?

Not yet. I hope to extend this as much as possible, but I only have one keyboard to test with. When I get volunteers I'll start development on features/scan sets/protocols to match most of Soarer's work (minus NKRO, as mentioned before).
andrewjoy wrote:terminals are scancode set 3 not 1 so no luck with that.

and honestly as expensive as it is i would get an xwhatsit in the thing, nip that nasty old controller in the bud.

This however is an awesome project, we need a nice open source ( GPL i hope :P) converter. The beauty of that is it can be expanded by others.

Good call, I'll figure out how to drop a GPL reference in there. I'm new to coding in a public sense, though I've been doing it in school for several years. I decided it's about time to put my coding experience to some tangible use ;)
Manak1n

Unread post12 Jan 2016, 17:01

X
Manak1n
 
Posts: 6
Joined: 11 Jan 2016, 19:23
Location: California
Main keyboard: IBM Model F XT
Main mouse: Zelotes 3200 DPI
Favorite switch: Buckling Springs
DT Pro Member: -
 
Manak1n wrote:
mastermachetier wrote:Hey amazing work! Is this compatible with the terminal keyboards like soarer's converter was?

Not yet. I hope to extend this as much as possible, but I only have one keyboard to test with. When I get volunteers I'll start development on features/scan sets/protocols to match most of Soarer's work (minus NKRO, as mentioned before).
andrewjoy wrote:terminals are scancode set 3 not 1 so no luck with that.

and honestly as expensive as it is i would get an xwhatsit in the thing, nip that nasty old controller in the bud.

This however is an awesome project, we need a nice open source ( GPL i hope :P) converter. The beauty of that is it can be expanded by others.

Good call, I'll figure out how to drop a GPL reference in there. I'm new to coding in a public sense, though I've been doing it in school for several years. I decided it's about time to put my coding experience to some tangible use ;)



So I currently have a terminal 122k model m and an apple standard keyboard if you ever need volunteers with those. I am getting a haul next week from an iseries upgrade an old company I use to work for is doing so maybe I'll have an xt to test as well soon .
mastermachetier

Unread post12 Jan 2016, 18:48

X
mastermachetier
 
Posts: 54
Joined: 12 Jan 2016, 01:25
Location: Boston
Main keyboard: ducky shine zero
Main mouse: usb
Favorite switch: alps orange
DT Pro Member: -
 
Supporting Apple ADB keyboards with the same software is quite a big ask! But it would be awesome. I made this Soarer box ages ago that I've used heavily ever since:

Image

XT/AT/PS2 and IBM Terminal support, all on a single switch. But no love for my AEKs… yet.

Naturally, I could use Hasu's TMK with those. But Soarer's runs without the need to recompile for the specific protocol. I couldn't make a box like that for it.
Muirium
User avatar
µ

Unread post12 Jan 2016, 19:34

User avatar
X
Muirium
µ
 
Posts: 22976
Joined: 03 Feb 2013, 10:11
Location: Edinburgh, Scotland
Main keyboard: HHKB Type-S with Bluetooth by Hasu
Main mouse: Apple Magic Mouse
Favorite switch: Gotta Try 'Em All
DT Pro Member: -
 
Muirium wrote:Supporting Apple ADB keyboards with the same software is quite a big ask! But it would be awesome. I made this Soarer box ages ago that I've used heavily ever since:

Spoiler:
Image


XT/AT/PS2 and IBM Terminal support, all on a single switch. But no love for my AEKs… yet.

Naturally, I could use Hasu's TMK with those. But Soarer's runs without the need to recompile for the specific protocol. I couldn't make a box like that for it.

Yeah, with the fact that ADB doesn't have a 'clock' to follow, it's a little more difficult to read properly. I'll add it to my list of potential directions. I can't say if/when an autodetect feature would be implemented in my own code... Not sure how I would approach that.
Manak1n

Unread post13 Jan 2016, 05:07

X
Manak1n
 
Posts: 6
Joined: 11 Jan 2016, 19:23
Location: California
Main keyboard: IBM Model F XT
Main mouse: Zelotes 3200 DPI
Favorite switch: Buckling Springs
DT Pro Member: -
 
I am typing this on my model F using your converter.
Thank you very much! :D

At first it was not working for me, but then I realised the VCC was still connected to the teensy 3.3vpin from an earlier project.
d33n
User avatar

Unread post13 Jan 2016, 20:37

User avatar
X
d33n
 
Posts: 4
Joined: 13 Mar 2015, 07:19
Location: The Netherlands
Main keyboard: Ducky Mini
Main mouse: Logitech G402
Favorite switch: Brown Cherry
DT Pro Member: -
 
d33n wrote:I am typing this on my model F using your converter.
Thank you very much! :D

At first it was not working for me, but then I realised the VCC was still connected to the teensy 3.3vpin from an earlier project.

Good to hear! Just curious, are you using the main or alternate key layout? Teensy 3.1 or other?
Last edited by Manak1n on 14 Jan 2016, 05:39, edited 1 time in total.
Manak1n

Unread post14 Jan 2016, 00:31

X
Manak1n
 
Posts: 6
Joined: 11 Jan 2016, 19:23
Location: California
Main keyboard: IBM Model F XT
Main mouse: Zelotes 3200 DPI
Favorite switch: Buckling Springs
DT Pro Member: -
 
Looking at the Teensy keyboard source I think I found a way to separate the left and right shift keys. However, I don't have my Model F + Teensy right now, so I can't test until Sunday or so.
EDIT: also updated the OP with GPL licensing and a lower microprocessor frequency. If anyone is used to GPL licensing, let me know if I did something wrong. ;)
Manak1n

Unread post14 Jan 2016, 03:17

X
Manak1n
 
Posts: 6
Joined: 11 Jan 2016, 19:23
Location: California
Main keyboard: IBM Model F XT
Main mouse: Zelotes 3200 DPI
Favorite switch: Buckling Springs
DT Pro Member: -
 
Manak1n wrote:
d33n wrote:I am typing this on my model F using your converter.
Thank you very much! :D

At first it was not working for me, but then I realised the VCC was still connected to the teensy 3.3vpin from an earlier project.

Good to hear! Just curious, are you using the main or alternate key layout? Teensy 3.1 or other?

I chose the main layout, because I wanted to start with the default key mapping, to customise it later. Using a teensy 3.1.
The source code is not too hard, to read so I should be able to help out with some improvements later.
d33n
User avatar

Unread post14 Jan 2016, 06:38

User avatar
X
d33n
 
Posts: 4
Joined: 13 Mar 2015, 07:19
Location: The Netherlands
Main keyboard: Ducky Mini
Main mouse: Logitech G402
Favorite switch: Brown Cherry
DT Pro Member: -
 
Great project! I often pressed the 8-10keys simultaneously on music game.
Hope you can manage this case.
Thanks for the nice work!
terrycherry

Unread post22 Jan 2016, 16:29

X
terrycherry
 
Posts: 573
Joined: 13 Jul 2015, 11:38
Location: Hong Kong
Main keyboard: Model M, dodoo dome keyboard, CherryMX numberic
Main mouse: logitech M705 and 2 Logitech mouses
Favorite switch: Brother BS, Hi-tek 725 series, Buckling Spring
DT Pro Member: -
 
Got an IBM 5155 yesterday and tried this out. Worked great man. Thanks manakin. Just need to put this on a box.

20160330_085953.jpg


Found out some use for those fan extensions.
kokokoy
User avatar

Unread post30 Mar 2016, 02:18

User avatar
X
kokokoy
 
Posts: 205
Joined: 23 Jan 2015, 04:22
Location: Singapore
Main keyboard: KIRA EXS
Main mouse: Logitech G304
Favorite switch: Green Alps, Vintage Black
DT Pro Member: 0145
 
Muirium wrote:Supporting Apple ADB keyboards with the same software is quite a big ask! But it would be awesome. I made this Soarer box ages ago that I've used heavily ever since:

Image

XT/AT/PS2 and IBM Terminal support, all on a single switch. But no love for my AEKs… yet.

Naturally, I could use Hasu's TMK with those. But Soarer's runs without the need to recompile for the specific protocol. I couldn't make a box like that for it.

Solution: use two teensy microcontrollers and a secondary switch that moves the USB output from one to the other. Also include a power switch so that you can switch between the two converters OR multiple protocols on Soarer's without any weird transitional artifacts or USB unplugging/plugging.
ohaimark
User avatar
Kingpin

Unread post30 Mar 2016, 05:16

User avatar
X
ohaimark
Kingpin
 
Posts: 2576
Joined: 12 Oct 2015, 19:43
Location: USA
Main keyboard: Siemens G80 Lookalike
Main mouse: Logitech G502
Favorite switch: Blue Alps
DT Pro Member: 1337
 
Has anyone ported the code to atmega32u4?
mac80211

Unread post03 May 2018, 01:59

X
mac80211
 
Posts: 18
Joined: 11 Oct 2016, 02:00
Location:
Favorite switch: Cherry
DT Pro Member: -
 
Nice work!!!
mac80211 wrote:Has anyone ported the code to atmega32u4?

Makes me want to jam converters into an ATtiny85.
zool

Unread post03 May 2018, 04:05

X
zool
 
Posts: 170
Joined: 09 Nov 2016, 06:44
Location: Melbourne
DT Pro Member: -
 

Who is online

Users browsing this forum: DiodeHead, Hypersphere, Jimmy54669, Sangdrax and 55 guests