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

Do you know what the colors would be for the silver tag XT/AT style adapters? I have a few of these and the RJ-45 one was the one that I wanted to try first since it was the only one that didn't have a cut cord. I don't see colors listed on the keyboard babel site sadly.
Trent
User avatar

Unread post10 Aug 2012, 01:45

User avatar
X
Trent
 
Posts: 288
Joined: 17 Feb 2012, 14:29
Location: United States
Main keyboard: IBM Model M
Club member: -
 
I think they vary... at least, the PC/XT colours are different to the 122-key's.

Let me know exactly which keyboards and I'll check my 'boards to see. Pics of the cable inside the keyboard would help to verify that yours matches mine!

Here's a couple of pics I had handy :D

Inside a PC/XT keyboard...

XT_internal.jpg


Label inside a 122-key Model F...

IBM_122F_CableConnectionsLabel.jpg
Soarer
User avatar

Unread post10 Aug 2012, 03:04

User avatar
X
Soarer
 
Posts: 999
Joined: 03 Jul 2011, 01:03
Location: UK
Favorite switch: F
Club member: -
 
Trent wrote:So the order would be:
1. Flash teensy
2. scas example.sc example.scb
2. scwr example.scb
3. scboot
4. hit button on teensy
5. see if QWERTY keys work?
Trent wrote:*Hit teensy button*

*Try a couple different standard letter keys, no response*

Noooooo!

1. Press button on Teensy
2. Flash Teensy
3. scas ...
4. scwr
5. Unplug / plug Teensy just to be sure
6. Test keyboard

The Teensy's button will only make the controller unusable because it's in "bootloader" aka "programming mode". scboot should do pretty much the same, according to the docs:
Code: Select all
Usage:
    scboot

After running this command, the converter should be ready to have new firmware loaded into it. Note that, at this point, the converter will not be working as a keyboard any more! To cancel the bootloader mode, simply disconnect the converter from the computer and reconnect it.


Now get that wiring sorted out and just don't press the Teensy's button, mkay?
JBert

Unread post10 Aug 2012, 08:03

X
JBert
 
Posts: 1089
Joined: 10 Mar 2011, 23:02
Location: Belgium, land of Liberty Wafles and Freedom Fries
Main keyboard: G80-3K with Clears
Favorite switch: Capacitative BS
Club member: 0049
 
Hmm, seems that this board is indeed dead after following your instructions jBert. I'm gonna have to pull out some of the other terminal boards I have and try wiring them up instead. Will post updates when I have completed that task.
Trent
User avatar

Unread post11 Aug 2012, 04:13

User avatar
X
Trent
 
Posts: 288
Joined: 17 Feb 2012, 14:29
Location: United States
Main keyboard: IBM Model M
Club member: -
 
I need some serious help with programming this teensy. If someone could give me the explain it to me like I'm 5 years old I would be forever grateful. Below are the steps I'm taking:

Write the cfg file (in my example I just want to switch the esc key with the F1 key). So my cfg file looks like this:

Code: Select all
# F XT

remapblock
    F1        ESC
    ESC       F1
endblock



I save this cfg file in a folder called tools. The following are also in the tools folder: scas, scboot, scdis, scinfo, scrd, scwr, rawhid.dll.

Step 1: I run scboot to boot the Teensy into programming mode.
Step 2: I click on scas (I think I may be messing this step up...do I just click on scas and let it do its thing or do I have to rename the file, etc.?)
Step 3: I run scwr (I just click on scwr and let it do its thing or do I have to rename the file,etc? When I click scwr and scas respectively nothing happens except a black box pops up on the screen for a split second and then disappears.)
Step 4: I click the "program" button in the teensy application
Step 5: reboot the teensy

I would really like to be able to reprogram my F XT in order to switch some keys around and have been trying on and off unsuccessfully for the past few days. If there is some major step I am missing could someone please let me know. I really do need the explain it to me like I'm 5 treatment here. Thanks in advance.

On a side note, I should mention that the teensy does work and I am able to use the F XT to type...it's just that I cannot figure out how to reprogram key locations on the teensy.
AKIMbO
User avatar

Unread post31 Aug 2012, 15:14

User avatar
X
AKIMbO
 
Posts: 124
Joined: 10 May 2012, 14:56
Location: Florida, USA
Main keyboard: HHKB
Favorite switch: Topre
Club member: -
 
Nothing but a couple of misunderstandings here :D

First, you don't want to be in programming mode to load configs; scboot's only use is to allow you load a new .hex file.

Second, the tools are meant to be run from a command line - especially scas, scwr and scrd, which take parameters. But all of them really, since otherwise the window closes before you can read the output!

Precise instructions vary depending on your OS... but in summary for any OS:
1. Open a command prompt.
2. Change directory to the tools folder (it's easiest to save your config files in the same folder as the tools).
3. Run tools by typing commands, adding appropriate parameters.

For Windows XP, assuming that the tools and your config are in 'C:\sctools', and that your config is called 'akimbo.sc':
1. Start - Programs - Accessories - Command Prompt

2. Type two commands at the command prompt to change directory...
Code: Select all
C:
cd \sctools
OR maybe your tools folder is "D:\downloads\soarer converter\tools", then:
Code: Select all
D:
cd "\downloads\soarer converter\tools"
(The quotes are required if the path has any spaces in it).

3. Type two more commands to compile and load your config...
Code: Select all
scas akimbo.sc akimbo.scb
scwr akimbo.scb
Of course, if scas reports any errors you will need to fix them, and re-run scas, before running scwr!
Soarer
User avatar

Unread post31 Aug 2012, 16:24

User avatar
X
Soarer
 
Posts: 999
Joined: 03 Jul 2011, 01:03
Location: UK
Favorite switch: F
Club member: -
 
It worked! Thank you so much Soarer! Is there an easy way to completely go back to default (ie. rewrite the soarer converter so that all the changes I just programmed onto the converter are overwritten so F1 becomes F1 again and esc becomes esc again?)
AKIMbO
User avatar

Unread post31 Aug 2012, 18:02

User avatar
X
AKIMbO
 
Posts: 124
Joined: 10 May 2012, 14:56
Location: Florida, USA
Main keyboard: HHKB
Favorite switch: Topre
Club member: -
 
Sure, just compile an empty text file! Or, in a Windows command prompt, you can simply type:
Code: Select all
scas nul empty.scb
scwr empty.scb
Alternatively, you could just use legacy.sc as the default, since it has correct macros for the XT's and AT's PrtSc etc.
Soarer
User avatar

Unread post31 Aug 2012, 21:25

User avatar
X
Soarer
 
Posts: 999
Joined: 03 Jul 2011, 01:03
Location: UK
Favorite switch: F
Club member: -
 
I see some people have noticed the v1.03 release... it's far from an essential update, but it's good for it to be used in case I've broken anything :D

Also, I just added this to the OP...
Soarer wrote: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.

This was on the converter's GH page at some point, but must've got lost in a rollback :(
And somehow, I forgot to highlight legacy.sc in the docs or here!!
Soarer
User avatar

Unread post07 Sep 2012, 20:38

User avatar
X
Soarer
 
Posts: 999
Joined: 03 Jul 2011, 01:03
Location: UK
Favorite switch: F
Club member: -
 
Soarer, I'm back with a new exciting question: is it possible to use other pins on the Teensy for the data and clock? I think that might help me solve my problem. Maybe.

The LEDs of the keyboards I'm trying all light up for about a quarter of a second when I plug the converter in, so everything seems kind of okay. Only kind of though. The keyboard also does get connected, but something seems a bit wrong. This is the output I'm getting from hid_listen:
wEE remaining: FFFC

Keyboard ID: 0000
Code Set: 1

And no keypresses get registered. Is this bad? :)

(Yes, this is the Teensy++ I said I may have broken, but I just can't give up. :roll: )
fruktstund
User avatar

Unread post23 Sep 2012, 10:58

User avatar
X
fruktstund
 
Posts: 257
Joined: 28 Feb 2012, 15:52
Location: Sweden
Main keyboard: HHKB Pro 2
Main mouse: Logitech g400
Favorite switch: Ergo-Clears (I think - can never decide)
Club member: -
 
Hmm, well I don't really want to start producing and testing a modified version, but it would be possible :lol:

First though, I've come up with a basic test of the teensy pins.
Run hid_listen and plug the converter in with no keyboard connected. Then...
Test 1 - short the clock pin to ground briefly a few times. This should produce R05 and R04 error codes.
Test 2 - connect the data pin to ground, and then short the clock pin to ground briefly a few times (i.e. keep data grounded while doing that). This should produce R05 and R06 error codes.

Unfortunately I can't think of a simple test to tell if the Teensy pins can still output correctly. You could try loading a config that uses the 'force' command to see if that gets it working. (Apart from auto-detecting, output to the keyboard is only used for error recovery and setting LEDs, so it might still mostly work).

What keyboard are you using, is it still the old BTC? What type is it (XT, AT...)?
Soarer
User avatar

Unread post23 Sep 2012, 13:41

User avatar
X
Soarer
 
Posts: 999
Joined: 03 Jul 2011, 01:03
Location: UK
Favorite switch: F
Club member: -
 
Tried your shorting test, and both output the error codes as expected (except that one of them produced all R04, R05 and R06. I think it was ground to clock).

Tried with my old BTC and an old NTC keyboard I found lying around (both XT). Tried forcing all sets on all of them, but still no results. The only thing that happened was that I got some strange codes directly after plugging the keyboards in.
Actually, when I press the lock keys on the NTC board the corresponding LED lights up as it should, but this does not happen on the BTC board.

I checked my wiring two more times, and it's still correct. :) I also tried the shorting test directly in the DIN connector to check that this wasn't the problem, and all error codes were the same as earlier.

I feel this is a bit crazy. :D
fruktstund
User avatar

Unread post23 Sep 2012, 15:26

User avatar
X
fruktstund
 
Posts: 257
Joined: 28 Feb 2012, 15:52
Location: Sweden
Main keyboard: HHKB Pro 2
Main mouse: Logitech g400
Favorite switch: Ergo-Clears (I think - can never decide)
Club member: -
 
Soarer wrote:
XT_internal.jpg


Got mine working but trying to make a USB cable out the original cable.

Looking towards the end of the USB and Micro USB ends with the copper traces facing up. I've got the same colour cables and they are in the order Red, Black, White, Brown.

Using normal USB cable everythings fine. Using my botched one the teensy gets very hot very quick!
dirge
User avatar

Unread post23 Sep 2012, 16:18

User avatar
X
dirge
 
Posts: 2033
Joined: 28 Jan 2012, 19:02
Location: Newcastle Upon Tyne, United Kingdom.
 
fruktstund wrote:I feel this is a bit crazy. :D

So they are both XTs, but they have LEDs?

Sorry, for some reason I thought you were trying a keyboard that wasn't an XT. For XTs, trying the force command doesn't make sense, since XT mode what the converter will default to anyway if it fails to communicate with the keyboard (XT protocol is one-way only, so it doesn't accept commands).

Dunno about crazy, but it's certainly strange! Since the tests seem to say that the inputs are OK, and the keyboards are XT, it's even more puzzling! Are you still getting the R04 and R05 errors when you press keys, that you were originally?

Another thought - did you change the firmware when you rebuilt it? Maybe I broke something!
Soarer
User avatar

Unread post23 Sep 2012, 16:20

User avatar
X
Soarer
 
Posts: 999
Joined: 03 Jul 2011, 01:03
Location: UK
Favorite switch: F
Club member: -
 
dirge wrote:Using normal USB cable everythings fine. Using my botched one the teensy gets very hot very quick!

On your head be it!

Have a camera handy for when the magic smoke gets out :evilgeek:
Soarer
User avatar

Unread post23 Sep 2012, 16:26

User avatar
X
Soarer
 
Posts: 999
Joined: 03 Jul 2011, 01:03
Location: UK
Favorite switch: F
Club member: -
 
well typing on it now so no great damage ;)

But would love to know the correct usb pinning for a standard usb to micro cable. Want to reuse the original. Also my layouts not perfect, but as your files iso uk I'll ignore what's on the caps :)
dirge
User avatar

Unread post23 Sep 2012, 16:36

User avatar
X
dirge
 
Posts: 2033
Joined: 28 Jan 2012, 19:02
Location: Newcastle Upon Tyne, United Kingdom.
 
My files are symbol agnostic, as are scan codes and HID codes ;) Any discrepancy between your keycaps and your OS's layout setting is not my problem! :lol:

Teensy has a mini USB socket... wiring. But I should say, even if you get that right I'm not sure how well it will work, because the data wires are intended to be a twisted pair, and they (presumably) won't be in the IBM cable.
Soarer
User avatar

Unread post23 Sep 2012, 19:14

User avatar
X
Soarer
 
Posts: 999
Joined: 03 Jul 2011, 01:03
Location: UK
Favorite switch: F
Club member: -
 
Anyone tested this with Teensy 3.0?
Grond
User avatar

Unread post25 Sep 2012, 11:16

User avatar
X
Grond
 
Posts: 1121
Joined: 13 Mar 2011, 22:54
Location: Milan, Italy
Main keyboard: Filco Majestouch Tenkeyless
Main mouse: Kensington Slimblade
Favorite switch: Cherry MX Blue
Club member: -
 
It's a totally different processor and thus the .hex file will not work.
JBert

Unread post25 Sep 2012, 11:43

X
JBert
 
Posts: 1089
Joined: 10 Mar 2011, 23:02
Location: Belgium, land of Liberty Wafles and Freedom Fries
Main keyboard: G80-3K with Clears
Favorite switch: Capacitative BS
Club member: 0049
 
Soarer wrote:Teensy has a mini USB socket... wiring.

Well that would explain it, who's idea was it to have the end inverted on the mini socket?! So I've had the ground and 5v the swapped and the other two the wrong way around...

Image
dirge
User avatar

Unread post25 Sep 2012, 12:16

User avatar
X
dirge
 
Posts: 2033
Joined: 28 Jan 2012, 19:02
Location: Newcastle Upon Tyne, United Kingdom.
 
right
I`ve used the included tools and compiled the dvorak bin. I like the fact £ is above 3, but need another keyboard plugged in as i have no \ key! it shows up as #. could someone help please?

taken ten mins to write this! i feel pretty weird! but will stick with it!
dirge
User avatar

Unread post25 Sep 2012, 13:12

User avatar
X
dirge
 
Posts: 2033
Joined: 28 Jan 2012, 19:02
Location: Newcastle Upon Tyne, United Kingdom.
 
Damn UK vs US layout problem! 'Backslash' is a # on a UK layout... think of the difference around Enter on a 102-key vs a 101-key... the backslash key above enter is replaced by a hash key left of enter, and they use the same scan code!

So, to fix you up, you could try adding...
Code: Select all
    BACKSLASH EUROPE_2

but then # needs to be put somewhere. Hmm. It might be easiest just to tell your OS that it has a US keyboard, for now, but it would certainly be possible to add a macro to put # on shift-3 to match the legend (while still having UK layout set in the OS), if that's how you wanted it.
Soarer
User avatar

Unread post25 Sep 2012, 15:19

User avatar
X
Soarer
 
Posts: 999
Joined: 03 Jul 2011, 01:03
Location: UK
Favorite switch: F
Club member: -
 
Changing to US would be bad, I`m logged into UK servers most the time. "`¬" is an option as that's normally where it is anyway. Sorry for being slow on this. My typing is much slower than even me at the moment.

edit! that worked your a star!

now the hash swap is confusing me

I tried using GRAVE HASH and it's erroring :(

# dvorak layout - contributed by Morning Song

remapblock
MINUS LEFT_BRACE
EQUAL RIGHT_BRACE
Q QUOTE
W COMMA
E PERIOD
R P
T Y
Y F
U G
I C
O R
P L
LEFT_BRACE SLASH
RIGHT_BRACE EQUAL
# A A
S O
D E
F U
G I
H D
J H
K T
L N
SEMICOLON S
QUOTE MINUS
GRAVE HASH
BACKSLASH EUROPE_2
Z SEMICOLON
X Q
C J
V K
B X
N B
# M M
COMMA W
PERIOD V
SLASH Z
endblock
dirge
User avatar

Unread post25 Sep 2012, 15:30

User avatar
X
dirge
 
Posts: 2033
Joined: 28 Jan 2012, 19:02
Location: Newcastle Upon Tyne, United Kingdom.
 
That's because GRAVE and HASH aren't keys :lol: All the key names are US-centric, so we just have to live with them not saying the right thing sometimes. Check the 'codes' list in the docs, I've tried to add comments where needed.

Try...
BACK_QUOTE BACKSLASH
Soarer
User avatar

Unread post25 Sep 2012, 15:48

User avatar
X
Soarer
 
Posts: 999
Joined: 03 Jul 2011, 01:03
Location: UK
Favorite switch: F
Club member: -
 
Your awesome! I'm going to post some pics now! :)
dirge
User avatar

Unread post25 Sep 2012, 15:55

User avatar
X
dirge
 
Posts: 2033
Joined: 28 Jan 2012, 19:02
Location: Newcastle Upon Tyne, United Kingdom.
 
hi guys,

i just modified my IBM 3487 terminal keyboard with a teensy-board with soarers firmware 8-)

Works like a charm!!

I had to relocate the original board a bit inside the casing to make place for the mini-usb extension.

Big thanks to soarer!

Mike
Attachments
IMAG0370 (Medium).jpg
IMAG0369 (Medium).jpg
IMAG0090_BURST001 (Medium).jpg
IMAG0371 (Medium).jpg
IMAG0089_BURST001 (Medium).jpg
Mikester

Unread post02 Oct 2012, 16:11

X
Mikester
 
Posts: 1
Joined: 02 Oct 2012, 15:59
Main keyboard: IBM 3487 + built in Soarer Converter
Club member: -
 
Very nice! That USB extension fits tidily between the existing posts, I see!

Strictly speaking, you should ground the metal plate, but it's not anything like as vital on an M as it is on an F :)
Soarer
User avatar

Unread post03 Oct 2012, 18:36

User avatar
X
Soarer
 
Posts: 999
Joined: 03 Jul 2011, 01:03
Location: UK
Favorite switch: F
Club member: -
 
Anyone that thinks they might've applied power in reverse - see here for a test and fix of Paranoid's XT.
Soarer
User avatar

Unread post03 Oct 2012, 18:38

User avatar
X
Soarer
 
Posts: 999
Joined: 03 Jul 2011, 01:03
Location: UK
Favorite switch: F
Club member: -
 
Hey Soarer.

Just wanted to thank you for your awesome work. I finally got my baby to work on my new computers. :D

Just a few questions about key remapping. How would I match up the codes for scan set 3 (http://www.seasip.info/VintagePC/ibm_1390876.html) to your codes listed in the 'codes' section in the download?

I'm trying to find out what I must enter to program the keys that normally correspond to Insert, Delete, Home, etc... and the four keys above the keypad.

Additionally, in a config file that I'm writing up (ok...TRYING to write up...) I am curious as to if I can simply list two keys when remapping something to have it correspond to when I press the shift key. Below is the config file I'm going to use, hopefully it works... probably not... I don't even know if I mapped the extra keys on the left side correctly.

Code: Select all
# sealconf garbage
ifset set3
remapblock
   EXTRA_F1   ESC
   EXTRA_F2   MEDIA_MY_COMPUTER
   EXTRA_F3   MEDIA_WWW_HOME
   EXTRA_F4   MEDIA_CALCULATOR
   EXTRA_F5   MEDIA_MAIL
   EXTRA_F6   PRINTSCREEN
   EXTRA_F7   MEDIA_VOLUME_DOWN
   EXTRA_F8   MEDIA_VOLUME_UP
   EXTRA_F9   MEDIA_PLAY_PAUSE
   UP      UP PAGE_UP
   DOWN      DOWN PAGE_DOWN
   INSERT      COPY PASTE
   DELETE      DELETE UNDO
endblock
   
sealclubber

Unread post04 Oct 2012, 16:48

X
sealclubber
 
Posts: 6
Joined: 04 Oct 2012, 16:40
Main keyboard: IBM Model M 1390876
Main mouse: N/A
Favorite switch: Space!
Club member: -
 
sealclubber wrote:Hey Soarer.

Just wanted to thank you for your awesome work. I finally got my baby to work on my new computers. :D

Just a few questions about key remapping. How would I match up the codes for scan set 3 (http://www.seasip.info/VintagePC/ibm_1390876.html) to your codes listed in the 'codes' section in the download?

Ha! You don't! There's an initial translation from each scan code set into HID codes, that you can't modify. What you're changing with remapping is from one HID code to another.
sealclubber wrote:I'm trying to find out what I must enter to program the keys that normally correspond to Insert, Delete, Home, etc... and the four keys above the keypad.

Run hid_listen, press the key you want to remap, see what code comes up - the one you want starts with '+' - then find it in the codes table.
sealclubber wrote:Additionally, in a config file that I'm writing up (ok...TRYING to write up...) I am curious as to if I can simply list two keys when remapping something to have it correspond to when I press the shift key. Below is the config file I'm going to use, hopefully it works... probably not... I don't even know if I mapped the extra keys on the left side correctly.

Code: Select all
# sealconf garbage
ifset set3
remapblock
   EXTRA_F1   ESC
   EXTRA_F2   MEDIA_MY_COMPUTER
   EXTRA_F3   MEDIA_WWW_HOME
   EXTRA_F4   MEDIA_CALCULATOR
   EXTRA_F5   MEDIA_MAIL
   EXTRA_F6   PRINTSCREEN
   EXTRA_F7   MEDIA_VOLUME_DOWN
   EXTRA_F8   MEDIA_VOLUME_UP
   EXTRA_F9   MEDIA_PLAY_PAUSE
   UP      UP PAGE_UP
   DOWN      DOWN PAGE_DOWN
   INSERT      COPY PASTE
   DELETE      DELETE UNDO
endblock
   

The extra F-keys part looks fine.

scas ought to give an error when there are too many items on a line, but it doesn't because of lazy coding :oops:

Changing the function of a shifted key isn't part of remapping. Ordinarily, mapping of that kind is defined by the keyboard layout in the OS, and the keyboard just tells the OS which keys are down.

But, we have macros! So you can set one to trigger on shift+up which would send a sequence that releases shift, presses pgup, then returns shift to its original state...

Code: Select all
macroblock
 macro UP SHIFT
  PUSH_META CLEAR_META SHIFT
  KEY_PRESS PGUP
  POP_META
 endmacro
endblock

That wouldn't suit me much, because I use shift+up etc. a lot for selecting text!

Another gotcha is that there are codes defined in HID that aren't generally understood by the OS... COPY, PASTE and UNDO being some of them. Again, macros can be used to provide these functions. These examples assume Windows style ctrl-C for Copy etc. (and are untested)...

Code: Select all
macroblock
 macro INSERT SHIFT
  PUSH_META ASSIGN_META LCTRL
  KEY_PRESS V
  POP_META
 endmacro

 macro INSERT
  PUSH_META ASSIGN_META LCTRL
  KEY_PRESS C
  POP_META
 endmacro

 macro DELETE SHIFT
  PUSH_META ASSIGN_META LCTRL
  KEY_PRESS Z
  POP_META
 endmacro
endblock

Note that the more specific INSERT macro (using shift) has to come first, otherwise the converter will find a match on the one without shift first and stop looking.
Last edited by Soarer on 05 Oct 2012, 17:52, edited 2 times in total.
Soarer
User avatar

Unread post04 Oct 2012, 17:55

User avatar
X
Soarer
 
Posts: 999
Joined: 03 Jul 2011, 01:03
Location: UK
Favorite switch: F
Club member: -
 
PreviousNext

Who is online

Users browsing this forum: giokkk, just_add_coffee, khanhj, Norman_, sprintstyle, trebb and 74 guests