geekhack

geekhack Projects => Making Stuff Together! => Topic started by: Soarer on Fri, 22 April 2011, 08:00:58

Title: XT/AT/PS2/Terminal to USB Converter with NKRO
Post by: Soarer on Fri, 22 April 2011, 08:00:58
Since v1.0, this mod can also be found on Deskthority (http://deskthority.net/workshop-f7/xt-at-ps2-terminal-to-usb-converter-with-nkro-t2510.html).



Introduction


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".

There are versions for Teensy 2.0 (http://www.pjrc.com/store/teensy.html) and Teensy++ 2.0 (http://www.pjrc.com/store/teensypp.html). I recommend the Teensy 2.0 for this (it's cheaper), but sometimes PJRC (http://www.pjrc.com) don't have any in stock!


Features


Keyboard protocols supported:
Configurable Features: (v0.997+)
Other Features:


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.


Documentation


The latest 'full' zip contains complete documentation covering all aspects of the converter including the tools, config commands, key codes etc.

This post contains the basics, but hasn't been updated much since about v0.996. I'll keep it accurate, but not complete.


Construction


Wiring Info

Code: [Select]
Conn.       Teensy
GND -------- GND
Vcc/+5V ---- Vcc
Data ------- PD0
Clock ------ PD1


Teensy pins

See PJRC for Teensy pinouts (http://www.pjrc.com/teensy/pinout.html).


Connectors

I wired mine to a PS/2 socket, and then use adapters to connect the others.

kbdbabel has masses of connector info (http://www.kbdbabel.org/conn/index.html). So much that it can be hard to find the one you want! I've included here the most common connectors used with this converter:

Terminal keyboards usually have a 5 pin, 270 degree, DIN connector...
(http://www.kbdbabel.org/conn/kbd_connector_ibm3179_318x_319x.png)

...or sometimes this 8P5C connector...
(http://www.kbdbabel.org/conn/kbd_connector_ibmterm.png)

XT and AT keyboards use the same 5 pin, 180 degree, DIN connector and pinout (top), while PS/2 keyboards use a 6 pin mini-DIN connector (bottom)...
(http://www.kbdbabel.org/conn/kbd_connector_ps2.png)

RT keyboards use a 6 pin rectangular connector...
(http://www.kbdbabel.org/conn/kbd_connector_ibmrt.png)

Important note - these 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. 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!


Pull-up resistors

In nearly all cases, these resistors are not needed.

But, if the keyboard has a long cable, I recommend adding two pull-up resistors of 1Kohm - one between Clock and +5V, the other between Data and +5V. These can really help to clean up a dirty signal (see here (http://geekhack.org/index.php?topic=14290&msg=269052#msg296052)).


LEDs

Optionally, lock LEDs can be wired up. Useful if your keyboard doesn't have them!
The outputs are active high (each pin puts out +5V when it wants to light the LED).
A resistor is needed inline with each LED. (The value needed depends on the type of LED, 1Kohm is a good starting point for modern high-brightness types).
The pins used differ between Teensy and Teensy++:

Teensy 2.0 (ATMEGA32U4):
Code: [Select]
CapsLock LED ------ PF5
NumLock LED ------- PF6
ScrollLock LED ---- PF7

Teensy++ 2.0 (AT90USB1286):
Code: [Select]
CapsLock LED ------ PD3
NumLock LED ------- PD4
ScrollLock LED ---- PD5


Installation


There's great instructions (http://www.pjrc.com/teensy/loader.html) on the PJRC site that cover loading a hex file into the Teensy, for any common OS.


Troubleshooting


Diagnostic output

The converter outputs some cryptic diagnostic information when in use, and it's especially useful to see what is happening when it starts up.

The hid_listen (http://www.pjrc.com/teensy/hid_listen.html) program can display this output, which mostly just consists of bytes read from and written to the keyboard when things are working correctly.


Keyboard IDs

This section is mostly only relevant to terminal keyboards. The converter uses the ID to decide between using scan code set 3 for terminal keyboards, or extended scan code set 2 for 'regular' keyboards.

By using hid_listen, you can see what ID your keyboard has by looking at the two bytes read back after the get ID command (wF2 rFA).

As of v0.996, the ID and scan code set selected is also printed in a more readable way:
Quote
Keyboard ID: BFBF
Code Set: 3

Terminal keyboards often have DIP switches on the back panel, or alternatively a pin header on the PCB that you can fit jumpers to, which configure the keyboard's ID code. The ID is a 16-bit number, but commonly fewer than 16 switches/jumpers are fitted meaning it's not possible to select all of the bits. The default value with no jumpers fitted, or with all the DIP switches in the 'open' position, is BFBF.

If your terminal keyboard is not operating correctly, it might be because the wrong ID is set on the switches/jumpers. The first byte should not be AB.


Known Issues


Weirdo Monterey International Corp. FKF456K-104 AT keyboard with 3-way A,X,S switch on the back (http://geekhack.org/index.php?topic=17458.msg362823#msg362823)
-- should be fixed as of v1.10, but hasn't been verified

Dell M6300 (BIOS rev A14) and Dell Inspiron 630m have incompatible/defective BIOS (http://geekhack.org/index.php?topic=17458.msg563473#msg563473)
-- possibly fixed by USB compliance improvements in v1.03, or by preventing debug output in boot mode in v1.11


History


v1.12 - added workaround for Linux bug which causes Delete key not to repeat - details (http://geekhack.org/index.php?topic=17458.msg927471#msg927471).
v1.11 - added RT keyboard support, added boot mode indication, prevented debug output in boot mode - details (http://geekhack.org/index.php?topic=17458.msg844653#msg844653).
v1.10 - improved documentation, added 'almost' PC/XT support, added aux key inputs - details (http://geekhack.org/index.php?topic=17458.msg745533#msg745533).
v1.03 - fixed bug which caused the converter to lose config or reboot after using the scrd tool, and fixed minor USB errors revealed by using the Command Verifier (http://www.usb.org/developers/tools/) compliance testing tool.
v1.02 - fixed bug which could cause the converter to lock up if a key was pressed at certain times during system boot - details (http://geekhack.org/index.php?topic=17458.msg609833#msg609833).
v1.01 - fix bug in jump to bootloader affecting Teensy++ - details (http://geekhack.org/index.php?topic=17458.msg604863#msg604863).
v1.0 - adds jump to bootloader, scboot tool, scinfo tool, documentation, settings protocol improvements, linux and macosx tools, and reduced hex size - details (http://geekhack.org/index.php?topic=17458.msg579614#msg579614).
v0.997 - adds user-definable remaps, macros, layers, selects, media keys, and config tools - details (http://geekhack.org/index.php?topic=17458.msg527414#msg527414).
v0.996 - fix for 'slow' responding keyboards, improved robustness when keys are being pressed before init has completed, alternative layouts for terminal keyboards - details (http://geekhack.org/index.php?topic=17458.msg424335#msg424335).
v0.995 - quick fix for 122-key mapping (top right numpad key is 'pause'), and simplified the code testing which keyboard type is attached.
v0.994 - adds suspend support, with remote wake-up - details (http://geekhack.org/index.php?topic=17458.msg345109#msg345109).
(v0.993 wasn't stable enough to subject you to!)
v0.992 - fixes minor incompatibility with Linux (backslash key not repeating etc.) - details (http://geekhack.org/index.php?topic=17458.msg339706#msg339706).
v0.99 - first public release


Downloads
Title: XT/AT/PS2/Terminal to USB Converter with NKRO
Post by: Mr. Perfect on Fri, 22 April 2011, 08:38:35
Impressive work there. It's tempting to make one of these even for boards that work on USB, just to get the NKRO.

Quote

Optionally, lock LEDs can be wired up.
The outputs are active high (each pin puts out +5V when it wants to light the LED).
A resistor is needed inline with each LED. (The value needed depends on the type of LED, 1Kohm is a good starting point for modern high-brightness types).


Is this for extra LEDs on the converter? I'm assuming the LEDs on the boards themselves are controlled by the boards, or doesn't the lock message get passed to the board?
Title: XT/AT/PS2/Terminal to USB Converter with NKRO
Post by: Soarer on Fri, 22 April 2011, 08:51:12
Some boards don't have LEDs (e.g. XTs and Terminals), and in the case of the XT the protocol doesn't support them. The converter does pass LED state to the keyboard when it can though!

And yes, for a board like a Filco (which has a dual USB/PS2 interface), you could use it in PS2 mode and route it through this converter to get full NKRO (and any other fancy features that have yet to be enabled).
Title: XT/AT/PS2/Terminal to USB Converter with NKRO
Post by: HaveANiceDay on Fri, 22 April 2011, 09:52:48
This looks really interesting. Especially the Filco NKRO USB Mod possibilities.
I don't need NKRO, but somehow I crave it :P
Title: XT/AT/PS2/Terminal to USB Converter with NKRO
Post by: hasu on Fri, 22 April 2011, 20:28:26
Nice work!

I tried your converter with PS/2 keyboard on Mac and confirmed NKRO works fine. Great!
My converter's NKRO feature fails on Mac. It seems I have to check your report descriptor later.

Quote
Full NKRO, if the keyboard supports it (even on Macs!).
Title: XT/AT/PS2/Terminal to USB Converter with NKRO
Post by: Soarer on Sat, 23 April 2011, 04:12:30
Thanks, hasu!

I might need to add in your fix for the SET_IDLE problem on OS-X (http://geekhack.org/showwiki.php?title=Island:14290&p=307392&viewfull=1#post307392). I have made changes to that part of the code, but I have no OS-X machine to test it on. If I am lucky it will work!
Title: XT/AT/PS2/Terminal to USB Converter with NKRO
Post by: Soarer on Sat, 23 April 2011, 10:18:52
Quote from: ripster;336118
If you guys ever fix the OSX bug tell Nopoo and the Ducky G2 engineers (probably the same PLUM Corp. firmware designer).

 
Which one? My firmware was already working better than theirs many weeks ago.
Title: XT/AT/PS2/Terminal to USB Converter with NKRO
Post by: ch_123 on Sat, 23 April 2011, 11:43:14
Quote from: Soarer;336036
Thanks, hasu!

I might need to add in your fix for the SET_IDLE problem on OS-X (http://geekhack.org/showwiki.php?title=Island:14290&p=307392&viewfull=1#post307392). I have made changes to that part of the code, but I have no OS-X machine to test it on. If I am lucky it will work!

 
I'd be willing to check this out whenever I get my Teensy and sufficient free time.
Title: XT/AT/PS2/Terminal to USB Converter with NKRO
Post by: Soarer on Sat, 23 April 2011, 12:37:09
Quote from: ch_123;336196
I'd be willing to check this out whenever I get my Teensy and sufficient free time.

 
That would be great, thanks!

I think the most likely problem (if any) is an occasional dropped keystroke - but it might well only happen when a keypress is made WHILE it's processing the idle AND also receiving updated LED state!! Also, if it's not using the XT protocol, it will simply ask the keyboard to resend the missed byte - the only sign that something has gone wrong will be that the LED on the Teensy lights up for a couple of seconds :-)

Or... it could fail in some way I haven't though of at all yet!
Title: XT/AT/PS2/Terminal to USB Converter with NKRO
Post by: Hak Foo on Sun, 24 April 2011, 00:21:06
Just built, waiting for my terminal F to come tomorrow.
adding the LEDs lets you test for a correct download and basic behaviour tho
Hint:  the Radio Shack 276-0150 breadboard is real nice for this as it has pins in twos and threes pre-shorted so you don't have to wire everything with solder bridges.  It's $2 and readily available, and it's also small unlike a lot of the boards I saw.
Title: XT/AT/PS2/Terminal to USB Converter with NKRO
Post by: Soarer on Sun, 24 April 2011, 04:23:11
Ah, Hak Foo... just spotted your question on IRC about the devices that the converter uses...

It's a composite device with [strike]four parts to it:
1. Boot keyboard
2. NKRO keyboard
3. Media and power keys
4. Debug channel[/strike]

edit: I really shouldn't answer these things from memory! Four was the plan at one point, but it ended up fitting into three:
1. Boot keyboard
2. Debug channel
3. NKRO keyboard, Media keys, and power keys



Spying on the debug channel with HID Listen (http://www.pjrc.com/teensy/hid_listen.html) is another way to check that the code has been loaded properly. It dumps the raw codes read from, and written to, the keyboard. Even if no keyboard is connected (or an XT), it will show 'wEE' when the converter is first plugged in. That's it writing an echo command to see if the keyboard responds.
Title: XT/AT/PS2/Terminal to USB Converter with NKRO
Post by: xwhatsit on Sun, 24 April 2011, 07:38:08
What are you using for a VID/PID?
Title: XT/AT/PS2/Terminal to USB Converter with NKRO
Post by: Soarer on Sun, 24 April 2011, 08:06:33
Quote from: xwhatsit;336486
What are you using for a VID/PID?

I'll check later, but I haven't changed it from the defaults in the PJRC sample code.

edit: VID = 16C0, PID = 047D.
Title: XT/AT/PS2/Terminal to USB Converter with NKRO
Post by: xwhatsit on Sun, 24 April 2011, 08:31:21
Ah right. I'm going to use the standard V-USB HID keyboard VID/PID for my wee project. Seems you can't buy a small block any more -- the resellers have been shut down by the USB-IF -- I bought one a while ago for a project, and don't really want to re-use it.
Title: XT/AT/PS2/Terminal to USB Converter with NKRO
Post by: intealls on Sun, 24 April 2011, 11:10:17
Nice work!

Just wondering what kind of remapping/macro features your firmware supports? Also, when will you release the source? :)
Title: XT/AT/PS2/Terminal to USB Converter with NKRO
Post by: Soarer on Sun, 24 April 2011, 19:15:57
Quote from: xwhatsit;336495
Ah right. I'm going to use the standard V-USB HID keyboard VID/PID for my wee project. Seems you can't buy a small block any more -- the resellers have been shut down by the USB-IF -- I bought one a while ago for a project, and don't really want to re-use it.

 
For personal projects, I guess it doesn't really matter what we use! (I admit I haven't bothered to look into it).

These are the values and comment from the PJRC keyboard sample code:

Code: [Select]
// Mac OS-X and Linux automatically load the correct drivers.  On
// Windows, even though the driver is supplied by Microsoft, an
// INF file is needed to load the driver.  These numbers need to
// match the INF file.
#define VENDOR_ID 0x16C0
#define PRODUCT_ID 0x047D
Title: XT/AT/PS2/Terminal to USB Converter with NKRO
Post by: Soarer on Sun, 24 April 2011, 20:14:17
Quote from: intealls;336575
Nice work!

Just wondering what kind of remapping/macro features your firmware supports? Also, when will you release the source? :)

Remappings are done from HID code to HID code, using a table in RAM, after the native scan codes have been translated to HID codes (using tables in the ROM). The idea is that remappings are applied to the table piecemeal - maybe some that only apply to certain boards, some that are global - in a more dynamic way than editing scan code tables directly. For example:

Code: [Select]
const uint8_t PROGMEM colemak_remaps[] = {
HID_KEY_D, HID_KEY_S,
HID_KEY_E, HID_KEY_F,
HID_KEY_F, HID_KEY_T,
HID_KEY_G, HID_KEY_D,
HID_KEY_I, HID_KEY_U,
HID_KEY_J, HID_KEY_N,
HID_KEY_K, HID_KEY_E,
HID_KEY_L, HID_KEY_I,
HID_KEY_N, HID_KEY_K,
HID_KEY_O, HID_KEY_Y,
HID_KEY_P, HID_KEY_SEMICOLON,
HID_KEY_R, HID_KEY_P,
HID_KEY_S, HID_KEY_R,
HID_KEY_T, HID_KEY_G,
HID_KEY_U, HID_KEY_L,
HID_KEY_Y, HID_KEY_J,
HID_KEY_SEMICOLON, HID_KEY_O,
0, 0
};

That's far smaller than a complete scan table, and could be applied to any keyboard regardless of the scan code set it uses natively.

Macros very quickly get fiendishly complicated to implement! So, for version 1, the converter will only support macros that emit a sequence when a key (or combi) is pressed, and do nothing when the key is released. The sequence can include key presses/releases, saving/restoring modifier state, etc. There may be limitations on which combinations can be used to trigger a macro, e.g. single non-modifier key plus modifiers, but I hope it can be (or become) more flexible than that.

I'd like to release the source code ASAP, even though there's a couple of pieces missing before it gets to v1.0, which are: defining a storage format for macros (including how they're triggered), and defining how the control interface works to allow remappings and macros to be edited on the host PC (preferably in a cross-platform way...).

I haven't decided whether to release it before or after doing either or both of those things :)
Title: XT/AT/PS2/Terminal to USB Converter with NKRO
Post by: Hak Foo on Sun, 24 April 2011, 23:53:54
Stupid question: what's the default mapping for a 122 look like?  I'm thinking I'm going to hook it up and panic when I can't find half the editing keys.

I wonder if you could do an approach of "load the main binary at one address, and the macro pack/mapping pack always exists at another address space" so you only have to rewrite the second space.
Title: XT/AT/PS2/Terminal to USB Converter with NKRO
Post by: Soarer on Mon, 25 April 2011, 04:41:17
Quote from: Hak Foo;336801
Stupid question: what's the default mapping for a 122 look like?  I'm thinking I'm going to hook it up and panic when I can't find half the editing keys.

Roughly speaking, it's done as a regular 102 with extra keys. The block of 10 keys on the left contains stuff like windows keys, PrtSc, etc. It's true though, that the 122s are the ones that need remapping the most - as in, everyone has a different idea about how to make them useful! For the default, I've chosen to have each key send a unique code, so that remapping with e.g. AutoHotkey works well.

Quote from: Hak Foo;336801
I wonder if you could do an approach of "load the main binary at one address, and the macro pack/mapping pack always exists at another address space" so you only have to rewrite the second space.

 
Here's the vague plan - they will be stored in the EEPROM, a control pipe will allow reading and writing it, an OS specific program will talk to the control pipe, and a higher level utility (Java or javascript or ???) will talk to the OS specific part.

Thing is, until all of that is in place, it's probably easier to simply edit the source and recompile!
Title: XT/AT/PS2/Terminal to USB Converter with NKRO
Post by: intealls on Mon, 25 April 2011, 13:10:55
I've got a Teensy++ 2.0 with your firmware hooked up to my MBP Santa Rosa, and I've yet to encounter any multiple/repeated keystrokes! Just ran six speedtests without issue (about 2900 keypresses, ~95 wpm). Seems to work great.

Edit: Hm, just put the computer to sleep and when it woke up W was repeating for some reason. Had to press another key to make it stop.

The problem can be recreated by putting the computer to sleep, banging a couple of keys on the connected keyboard and then waking the computer up.
Title: XT/AT/PS2/Terminal to USB Converter with NKRO
Post by: Soarer on Mon, 25 April 2011, 13:41:58
Excellent news! Thanks for letting me know, that was the last part that was completely unverified - think I'll have a little drink to celebrate :-)

edit: you edited :-(  So, I guess I do need to add something to handle suspend mode - I knew I wasn't handling it, but I didn't realise it would do that. Is it fine as long as you don't press any keys while it's sleeping?
Title: XT/AT/PS2/Terminal to USB Converter with NKRO
Post by: intealls on Mon, 25 April 2011, 13:53:17
Sorry 'bout that. :/ Yup, seems fine when no keys are pressed! Gonna test a couple more times.

When no keys are pressed, it does not repeat. Tried it like 8 times or something. :)

I also tried an old version of hasu's firmware without the SET_IDLE fix, and I can with 100% certainty say that the repeating key issue is non-existant with your firmware. :)
Title: XT/AT/PS2/Terminal to USB Converter with NKRO
Post by: Soarer on Mon, 25 April 2011, 14:09:39
Thinking about it, I can't quite figure out what's going wrong - I guess it must somehow be missing the key up event from the keyboard. Does pressing a key wake it up from sleeping? That might re-initialize the converter, and I could clear the key state at that point, as a quick fix.
Title: XT/AT/PS2/Terminal to USB Converter with NKRO
Post by: intealls on Mon, 25 April 2011, 14:14:26
It does not wake up :( That was what I was testing. I just tried the same thing on Linux on the same computer, and it worked fine (no repetition). Could it be because OS X still powers the USB ports or something when it's suspended (iDevice-charging)? I don't think they are powered when running Linux.

Hm, if I press one key normally during suspend and wake it up, no repeated keypresses. If I hold down the key for a while (and release it before the computer is woken up) and then wake the computer, that keypress is repeated on wakeup.
Title: XT/AT/PS2/Terminal to USB Converter with NKRO
Post by: Soarer on Mon, 25 April 2011, 14:26:07
I think handling wake-up will have to wait until I support suspend mode correctly - it is on the wishlist already though!

For now, I've made a quick change to clear the output state whenever the USB connection is reset. I've no idea if it will work or not, but it shouldn't do any harm :-)

Title: XT/AT/PS2/Terminal to USB Converter with NKRO
Post by: intealls on Mon, 25 April 2011, 14:36:20
It still seems to repeat. :/

Would be great if someone else could try to reproduce it as well, so it's not just my setup. I tried both USB-ports, didn't seem to make any difference though.
Title: XT/AT/PS2/Terminal to USB Converter with NKRO
Post by: kishy on Mon, 25 April 2011, 14:40:16
I am unable to reproduce, or witness any issues at all after waking from standby (just tried - even with keys held while sending it to sleep).

Dell Inspiron 630m, if it matters. 122-key Model M.

Using a rather old version of the code though, and on next flash I'm going back to dfj's...not due to any failure of Soarer's, but because I'm supposed to already be evaluating for dfj lol.
Title: XT/AT/PS2/Terminal to USB Converter with NKRO
Post by: intealls on Mon, 25 April 2011, 14:53:48
I think it's a problem related to OS X, Linux (Ubuntu 10.04 I think) on the same machine worked fine (no repeats). Haven't got Windows on this machine, so can't test that. :/

What OS are you using on the Inspiron?
Title: XT/AT/PS2/Terminal to USB Converter with NKRO
Post by: kishy on Mon, 25 April 2011, 14:59:39
Win7...so yeah...might be OS-related (in fact, there's a good chance it is...standby is a hardware/firmware feature, but how peripherals behave about it is going to relate to drivers I expect)
Title: XT/AT/PS2/Terminal to USB Converter with NKRO
Post by: Soarer on Mon, 25 April 2011, 19:34:17
Quote from: intealls;337070
It still seems to repeat. :/

 
Thanks for trying it. :-)  I'm still hoping that there is a change I can make that will fix it, without having to add a lot of new code. Especially when I can't easily test (on OS-X) what I write, as I go along!
Title: XT/AT/PS2/Terminal to USB Converter with NKRO
Post by: Oqsy on Wed, 27 April 2011, 01:59:09
High five!

122 key terminal Model F up and running!!!  Everything is good so far :)

I can't wait to get some of these added keys mapped with AHK ;)

Thanks for your hard work!
Title: XT/AT/PS2/Terminal to USB Converter with NKRO
Post by: Soarer on Sat, 30 April 2011, 19:09:16
v0.992 is now available, which works around an annoying issue with Linux.

The problem was that the backslash key would not repeat, and if another key was pressed while it was held down, extra backslashes appeared.

My converter's HID report is a bitmap, and each bit represents a specific HID key code.
The codes are all unique in HID land, but not when mapped to Linux scan codes.
The HID codes for backslash and 'Europe 1' are both mapped to the Linux code for backslash (by Linux).
'Europe 1' comes later in the report than backslash.
So, Linux scans the report, sees backslash down and registers it, but then sees 'Europe 1' up and clears the backslash state.
It would register a press and release of backslash every time it received a report from the keyboard while backslash was held down, but otherwise would not repeat it (since most of the time, it thought the key wasn't pressed).

The fix is that the 'Europe 1' code has been removed from the report. (It really wasn't useful anyway, even to Europeans!).

I'd call it a flaw in Linux, not my converter, but still it had to be fixed!
Title: XT/AT/PS2/Terminal to USB Converter with NKRO
Post by: Neit on Sun, 01 May 2011, 15:12:12
Hi Soarer,

I would like to wire your converter with both DIN and PS/2 connectors.
Since I'm pretty noob in electronics, I need some advice here.

Is it OK to wire the teensy and connectors like this ?
(followed your instructions on the article and of course I will use DIN OR PS/2, not both at the same time).
(http://zep.netai.net/xt-at-ps2_converter.jpg)

Hope that I can.
Oh, and thank you for your great work, I may "resurrect" a terminal keyboard that probably use XT protocol.
Title: XT/AT/PS2/Terminal to USB Converter with NKRO
Post by: Soarer on Sun, 01 May 2011, 16:25:17
Nice diagram!

Yes, that should be fine. (In fact, I don't think plugging both in at the same time would cause any harm, but don't blame me if it does!)
Title: XT/AT/PS2/Terminal to USB Converter with NKRO
Post by: Oqsy on Mon, 02 May 2011, 02:12:45
Glad this was brought up, as short-term I will be doing the same with a terminal F, an XT, and a PS/2. I didn't know if a switch was necessary to disable the unused connector(s) for any reason. Long term I will be building a few of these guys for different purposes.
Title: XT/AT/PS2/Terminal to USB Converter with NKRO
Post by: Neit on Mon, 02 May 2011, 13:28:29
Quote from: Soarer;339994
Nice diagram!
Thanks :)
I wanted to make it clear and "readable" for my first electronic build.

Quote from: Soarer;339994
Yes, that should be fine. (In fact, I don't think plugging both in at the same time would cause any harm, but don't blame me if it does!)
Good news!
Anyway, I will not give a try.

I received my teensy today (very fast shipping, ordered the 27th). And, it's very tiny.
I have three more questions about it:

Title: XT/AT/PS2/Terminal to USB Converter with NKRO
Post by: Soarer on Mon, 02 May 2011, 14:15:44
Quote from: Neit;340469
  • Will an old IDE cable will be fine for wiring, or a bigger section is needed?

That is fine. (It's probably about the same thickness as the wires in the cable to the keyboard).

Quote from: Neit;340469
  • In the article, you recommend the use of an 1Kohm pull-up resistor between Clock and +5V and one other between Data and +5V in case of long cable. I'm pretty scared about this (my soldering skills are fresh), for you, which length is becoming "long" and need the add of resistors?

Even at 5 metres it still worked fine without the pull-ups! But it definately tidied the signal up at that point. I would call more than 2 or 3 metres 'long'.

Quote from: Neit;340469
  • Last question, since the teensy is very small. May I do my solders at the back of it? (where there's only printed circuits, not components, and then avoid some damage by overheating).

Yes, either side, as you wish.

Are you putting the sockets in a box? If you are, you might find it easier to wire from the Teensy to the DIN connector, then make the double connections there to also wire to the PS2 socket. DIN connectors usually have large tags, making it fairly easy to solder two wires on.
Title: XT/AT/PS2/Terminal to USB Converter with NKRO
Post by: Neit on Mon, 02 May 2011, 14:48:47
Quote from: Soarer;340492
Even at 5 metres it still worked fine without the pull-ups! But it definately tidied the signal up at that point. I would call more than 2 or 3 metres 'long'.
Okay good. I'll get some resistors just in case.

Quote from: Soarer;340492
Are you putting the sockets in a box? If you are, you might find it easier to wire from the Teensy to the DIN connector, then make the double connections there to also wire to the PS2 socket. DIN connectors usually have large tags, making it fairly easy to solder two wires on.
Yes, I was planning on a (lego) box.
Thanks for the tip, it will surely help my soldering!

Can't wait to build it up.
Thanks again for your advices.
Title: XT/AT/PS2/Terminal to USB Converter with NKRO
Post by: nowsharing on Mon, 02 May 2011, 16:00:07
Wow, awesome work everyone. You've achieved the "impossible."

Could I buy one of these contraptions from anyone?
Title: XT/AT/PS2/Terminal to USB Converter with NKRO
Post by: bhtooefr on Mon, 02 May 2011, 19:15:57
Man, this code works great.

Now I just need the remappable version. :)
Title: XT/AT/PS2/Terminal to USB Converter with NKRO
Post by: slueth on Mon, 02 May 2011, 19:41:07
Quote from: nowsharing;340581
Wow, awesome work everyone. You've achieved the "impossible."

Could I buy one of these contraptions from anyone?

 
Just buy a teensy and request a sample from tyco electronics for the DIN connectors.  Not that hard to wire up.
Title: XT/AT/PS2/Terminal to USB Converter with NKRO
Post by: Hak Foo on Mon, 02 May 2011, 22:52:20
if you don't feel like harassing tyco, the socket costs <4 USD from the big online parts dealers, although shipping is a killer.  what I'd love to see is a pre-routed PCB for neat look.  the diy route looks it.
Title: XT/AT/PS2/Terminal to USB Converter with NKRO
Post by: 8_INCH_FLOPPY on Mon, 02 May 2011, 23:43:10
I want to do this, but why is the teensy so damn expensive?
Title: XT/AT/PS2/Terminal to USB Converter with NKRO
Post by: slueth on Tue, 03 May 2011, 01:47:50
Its because not only can you use it for a keyboard convertor, you can use it for a slew of other projects because it is a USB-based microcontoller.  
Teensy is actually cheap compared to other arduino products.
Basically we are taking a nuke and killing a tick.
Title: XT/AT/PS2/Terminal to USB Converter with NKRO
Post by: Neit on Tue, 03 May 2011, 19:50:55
Hey,

I Updated the diagram before soldering.
I finally chose to add the resistors for more security.
Still good?

(click to enlarge)
(http://zep.netai.net/thumb_xt-at-ps2_usb_p.jpg) (http://zep.netai.net/xt-at-ps2_usb_p.jpg) and (http://zep.netai.net/thumb_xt-at-ps2_usb_s.jpg) (http://zep.netai.net/xt-at-ps2_usb_s.jpg)
Title: XT/AT/PS2/Terminal to USB Converter with NKRO
Post by: Soarer on Wed, 04 May 2011, 06:04:28
Yep, even better! I like that the socket views are labelled as front and back - it removes any confusion.
Title: XT/AT/PS2/Terminal to USB Converter with NKRO
Post by: Soarer on Wed, 04 May 2011, 06:14:20
Quote from: 8_INCH_FLOPPY;340790
I want to do this, but why is the teensy so damn expensive?

 
Is it though? Even used just as a keyboard converter, I don't think it's unreasonable, considering how much it can do. But then, maybe you're one of those who thinks the blue cube is too expensive also, and have wasted money on a small mountain of crappy $3 converters (I don't mean that as aggressively as it may sound, btw, I have quite a collection!).

As an Atmega breakout, the Teensy can't be beaten on quality OR price... it really is the de facto choice for that reason.
Title: XT/AT/PS2/Terminal to USB Converter with NKRO
Post by: Findecanor on Wed, 04 May 2011, 07:58:04
There are lots of unused pins, though.
I wonder if they could be used for something useless ...

But, I think it would be even better if each port was on a separate set of pins ... and all worked at once.
Title: XT/AT/PS2/Terminal to USB Converter with NKRO
Post by: Mr. Perfect on Wed, 04 May 2011, 14:52:52
Very nice diagrams there Neit. Any idea where the lock LEDs would fit into those?
Title: XT/AT/PS2/Terminal to USB Converter with NKRO
Post by: Soarer on Wed, 04 May 2011, 15:28:59
Quote from: Findecanor;341477
There are lots of unused pins, though.
I wonder if they could be used for something useless ...

 
DIP switches!!
Title: XT/AT/PS2/Terminal to USB Converter with NKRO
Post by: Soarer on Wed, 04 May 2011, 15:31:39
Quote from: Mr. Perfect;341710
Very nice diagrams there Neit. Any idea where the lock LEDs would fit into those?

Has anyone wired them up yet? I'm tempted to move them to different pins on the Teensy (non++)...
Title: XT/AT/PS2/Terminal to USB Converter with NKRO
Post by: Hak Foo on Wed, 04 May 2011, 23:24:30
I have.

If one thing is annoying about the laout, it is the lights.  Too close together, so it is hard to wire and all the lights blend together.

also, does one light come on when you shut down for everyone
Title: XT/AT/PS2/Terminal to USB Converter with NKRO
Post by: Neit on Thu, 05 May 2011, 14:05:31
Quote from: Mr. Perfect;341710
Very nice diagrams there Neit. Any idea where the lock LEDs would fit into those?
I'll add them on the diagram as soon as Soarer has chosen the final pins to use (currently PF5, PF6 and PF7) and how to wire them (anode+resistor on pin and cathode on ground?).
If anyone is interested (or for the article), I can do the ++ diagram.
(hope that's what you wanted to hear, my English isn't perfect and I have to admit your question confused me :$)

@Soarer
Something I thought: Since the converter is plugged through USB, can we hotplug the keyboards? (or is it still risky because of the PS2/DIN)
Title: XT/AT/PS2/Terminal to USB Converter with NKRO
Post by: Soarer on Thu, 05 May 2011, 15:46:14
Quote from: Neit;342138
Something I thought: Since the converter is plugged through USB, can we hotplug the keyboards? (or is it still risky because of the PS2/DIN)

Still a bit risky but should be ok (as ok as hot-swapping any PS/2, I guess). The converter won't know if the keyboard type has changed though, so you couldn't unplug an XT then plug in an AT (I might try and improve that at some point, but it's not high on the list). Bottom line - it's safest to unplug the USB side first :)
Title: XT/AT/PS2/Terminal to USB Converter with NKRO
Post by: Mr. Perfect on Thu, 05 May 2011, 20:12:22
Quote from: Neit;342138
I'll add them on the diagram as soon as Soarer has chosen the final pins to use (currently PF5, PF6 and PF7) and how to wire them (anode+resistor on pin and cathode on ground?).
If anyone is interested (or for the article), I can do the ++ diagram.
(hope that's what you wanted to hear, my English isn't perfect and I have to admit your question confused me :$)

 
Yes, that's exactly what I was asking about. Probably best to wait and see if they change pins though.
Title: XT/AT/PS2/Terminal to USB Converter with NKRO
Post by: 8_INCH_FLOPPY on Thu, 05 May 2011, 22:27:25
Quote from: Soarer;341464
Is it though? Even used just as a keyboard converter, I don't think it's unreasonable, considering how much it can do. But then, maybe you're one of those who thinks the blue cube is too expensive also, and have wasted money on a small mountain of crappy $3 converters (I don't mean that as aggressively as it may sound, btw, I have quite a collection!).

As an Atmega breakout, the Teensy can't be beaten on quality OR price... it really is the de facto choice for that reason.

 I'm just a cheapass who doesn't understand who people are willing to use an arduino to do the same thing that you can do with a $5 microcontroller. Don't take this the wrong way.  I'm really very grateful for the contribution. This device will allow me and many other members to finally use all of those awesome terminal and XT keyboards we have sitting around.
Title: XT/AT/PS2/Terminal to USB Converter with NKRO
Post by: hasu on Fri, 06 May 2011, 03:51:11
8_INCH_FLOPPY,

You can do with V-USB at cheap. You just need a crystal, 2 zeners, some R&C and AVR.
To cut cost down more, you might be able to omit crystal and even zeners. (dangerous to PC? :)

I made my PS/2 converter with Atmega168p + V-USB and it works fine. (with crystal and zeners, of course ;)
If you are familiar to PIC, PIC18F14K50 is better candidate. It has a real USB function.
Both chip are just 200 yen in Akihabara. cheap!

I think Teensy's price is reasonable, though shipping cost is a problem for buyers outside USA :(
Title: XT/AT/PS2/Terminal to USB Converter with NKRO
Post by: Soarer on Fri, 06 May 2011, 06:11:14
Quote from: 8_INCH_FLOPPY;342347
I'm just a cheapass who doesn't understand who people are willing to use an arduino to do the same thing that you can do with a $5 microcontroller. Don't take this the wrong way.  I'm really very grateful for the contribution. This device will allow me and many other members to finally use all of those awesome terminal and XT keyboards we have sitting around.

Ah, well, I can explain that quite simply: it's easier!

I chose Atmel AVR mainly because there is a good, free, C compiler. But then their range of devices is frustrating - hardware USB support is only available in a surface mount package, so some kind of breakout board is needed to make it usable by most people (the chip itself only costs a few dollars). I haven't tried V-USB, but as it's a software USB solution it uses a considerable amount of CPU time, and I would be concerned that it would not be easy to acheive the same level of reliability in reading data from the keyboard as I have using the hardware USB (which mostly just does its stuff in the background). Even with the hardware USB, I've had to solve a few tricky timing problems.

It's easier for the end-user as well. Hardware USB means you can load code into the device via USB (and as a bonus, the Teensy loader is well nigh foolproof). Without that, you'd need some other hardware to load the software onto the chip, which most people don't have. At a minimum only four wires need soldering, and that's a benefit too.

In essence, a Teensy does give us useful extra features compared to a $5 micro on its own.

Were I to take offence, it would at your use of the word 'willing', possibly implying that I've been had over by some evil scam to part me of my money! Or that I am a slack engineer who is wasteful! I would of course deny both, having considered V-USB and PIC options, and deciding that the Teensy is the best compromise between economic, efficiency, and ease-of-use factors in order to get the job done :-)
Title: XT/AT/PS2/Terminal to USB Converter with NKRO
Post by: 8_INCH_FLOPPY on Fri, 06 May 2011, 13:14:38
Thanks for the detailed explanation. I didn't mean to suggest that you  are lazy. After all, you are the first person to offer a complete and thorough solution for those of us who want to make use of our XT keyboards.
Title: XT/AT/PS2/Terminal to USB Converter with NKRO
Post by: Soarer on Fri, 06 May 2011, 14:33:07
Quote from: 8_INCH_FLOPPY;342580
I didn't mean to suggest that you are lazy.

 
I didn't really think you had, the last paragraph was very much tongue in cheek :-)

But I am lazy - some say it's a good quality for a programmer to have!
Title: XT/AT/PS2/Terminal to USB Converter with NKRO
Post by: 8_INCH_FLOPPY on Fri, 06 May 2011, 16:33:58
I caved and ordered a couple. Maybe I can recoup the cost of one by selling the other after I get them both working. I think the price of ibm terminal keyboards if about to skyrocket...
Title: XT/AT/PS2/Terminal to USB Converter with NKRO
Post by: Oqsy on Sat, 07 May 2011, 03:09:28
Repeat that enough times in the right places and they will. However, this is still DIY and will scare away many that don't want the hassle or clutter. Prices *should* remain sane.
Title: XT/AT/PS2/Terminal to USB Converter with NKRO
Post by: 8_INCH_FLOPPY on Sat, 07 May 2011, 12:37:29
Not if I build a bunch and sell them. Muahahahaha.
Title: XT/AT/PS2/Terminal to USB Converter with NKRO
Post by: Hak Foo on Sat, 07 May 2011, 23:57:45
To me, the logical endgame of this project is to eventually develop a small-run PCB where you can attach a teensy and your choice of the needed connectors and get a really professional job.  while the hand-soldered one works fine, it hardly looks like a robust professional 'take the 122 to the office and show it off' product.

From there, redesign so the $20 Teensy is replaced with just the surface-mounted atmel chip, send the design to China, and get the retail price down to like USD20.

The gamers will have a stroke-- an NKRO adapter for their old precious PS/2 boards, and their sales will bankroll development.
Title: XT/AT/PS2/Terminal to USB Converter with NKRO
Post by: bhtooefr on Sun, 08 May 2011, 04:49:34
Of course, in my case, I just mounted the Teensy internally. That way, it looks like it was USB from the factory.
Title: XT/AT/PS2/Terminal to USB Converter with NKRO
Post by: Mr. Perfect on Mon, 09 May 2011, 08:59:12
Ok, here's a question that probably hasn't come up before: can USB keyboards be hooked up to this controller to achieve NKRO? I'm thinking of all the Filcos, Leopolds, Decks, etc that achieve NKRO when plugged into a PS/2 port with one of those USB to PS/2 adapters. Clearly the keyboard can handle NKRO, but the traditional USB hookup limits it to 6KRO.

Quote from: Hak Foo;343202
To me, the logical endgame of this project is to eventually develop a small-run PCB where you can attach a teensy and your choice of the needed connectors and get a really professional job..

 
Now that's a good idea. Even a do it yourself soldering kit would be great, people wouldn't have to hunt down all of the individual parts.
Title: XT/AT/PS2/Terminal to USB Converter with NKRO
Post by: Soarer on Mon, 09 May 2011, 09:45:00
Quote from: Mr. Perfect;343753
Ok, here's a question that probably hasn't come up before: can USB keyboards be hooked up to this controller to achieve NKRO? I'm thinking of all the Filcos, Leopolds, Decks, etc that achieve NKRO when plugged into a PS/2 port with one of those USB to PS/2 adapters. Clearly the keyboard can handle NKRO, but the traditional USB hookup limits it to 6KRO.

 
Yes, it should work fine! (I'm sure someone did ask that before, but maybe not in this thread :) ).
Title: XT/AT/PS2/Terminal to USB Converter with NKRO
Post by: Mr. Perfect on Mon, 09 May 2011, 12:36:03
That's great news. So to wire a female USB socket to the controller you just match up power, ground, and the data lines and it's good to go?

The best possible version would have three inputs, a DIN, PS/2 and USB. Then you could plug in any keyboard capable of NKRO and get USB on any OS. :music:
Title: XT/AT/PS2/Terminal to USB Converter with NKRO
Post by: Soarer on Mon, 09 May 2011, 13:03:23
I don't know how the passive USB to PS/2 adapters are wired up though - either probe one or toss a coin ;-)
Title: XT/AT/PS2/Terminal to USB Converter with NKRO
Post by: Soarer on Wed, 11 May 2011, 18:19:52
New version (v0.994) posted which adds suspend and wake-up support!

Many thanks to intealls for his help with testing on OS-X, discussing the problems, and unwittingly providing motivation :-)

Essentially the changes are that the converter now tracks when it has been suspended by the host, or is in the process of waking up, and takes measures to avoid the situations that sometimes resulted in repeating or stuck keys after exiting the suspended state.

Also, it now sends a remote wake-up signal to the host when a key is pressed while it is suspended, to bring the computer out of stand-by/sleep.
Title: XT/AT/PS2/Terminal to USB Converter with NKRO
Post by: slueth on Wed, 11 May 2011, 23:28:58
Soarer, you are amazing!  :)
Title: XT/AT/PS2/Terminal to USB Converter with NKRO
Post by: intealls on Thu, 12 May 2011, 19:26:19
Heh, no problem, just glad I was able to help :) You're the one doing the awesome work, and we should all be grateful for it!
Title: XT/AT/PS2/Terminal to USB Converter with NKRO
Post by: Soarer on Thu, 12 May 2011, 20:16:55
Well this phase is really a shakedown, making sure that reliability is top notch before adding more features... and I can't do that all by myself :)

BTW, the problem when pressing lots of keys to wake-up got fixed too - the debug channel was filling up with stuff it couldn't send.
Title: XT/AT/PS2/Terminal to USB Converter with NKRO
Post by: Voixdelion on Fri, 13 May 2011, 05:30:01
Okay, I just kind of skimmed the discussion because it was all rather technical for me,  I see the "DIY" letters which has me a bit frightened and also the word "expensive" - but I was considering the $100 price tag for the converter that was no longer available, so I guess it's all relative ... How expensive are we talking here?  $20?   The other scary word was "Programming" considering the previous mention of "DIY project" but   I've held on to my F-XT in case some way to make use of it ever came to fruition; has this happened? I could offer my services for a cooperative effort in assembling these on the electrical/soldering side (which I am reasonably confident about being able to do)  if someone else will do the chip programming (which I know nothing about at all)

Can someone do an Inigo Montoya -like encapsulation of the last page and a half for me?  ("Let me explain-- no, there is too much . . . Let me sum up: Buttercup is marry  Humperdink in little less then half an hour so all we have to do is get  in, break up the wedding, steal the princess, make our escape... after I  kill count Rugen.")
Title: XT/AT/PS2/Terminal to USB Converter with NKRO
Post by: bhtooefr on Fri, 13 May 2011, 05:50:03
Soarer is developing the firmware, you buy a Teensy or Teensy++, you can get one without pins and solder wires to it, or get one with pins, stick it in a breadboard with the appropriate connector, and jumper wires to it. Plug the wires into the appropriate pins on the Model F's controller, or plug the Model F's connector into the circuit.

Plug it into USB, run the Teensy loader, push the button, flash the firmware. Then reboot the Teensy. Done.
Title: XT/AT/PS2/Terminal to USB Converter with NKRO
Post by: Soarer on Fri, 13 May 2011, 06:32:34
Basic shopping list:
Optional items, as desired:
To assemble it just needs a few wires soldering. bhtooefr is right, there's lots of ways you could choose to build it and case it, and that's partly why I haven't done a demo build yet - I can't decide which way I want to do it :)

'Programming the chip' in this sense just means installing the hex file onto the Teensy, and that's made easier than burning a CD by the Teensy loader (http://www.pjrc.com/teensy/loader_xp.html).
Title: XT/AT/PS2/Terminal to USB Converter with NKRO
Post by: bhtooefr on Fri, 13 May 2011, 06:40:26
And, my build didn't even use the socket, due to how I installed mine.
Title: XT/AT/PS2/Terminal to USB Converter with NKRO
Post by: intealls on Fri, 13 May 2011, 09:14:55
Here's my highly ghettoish solution (I HATE that movie btw)

[ATTACH=CONFIG]18098[/ATTACH]

[ATTACH=CONFIG]18100[/ATTACH]

I plan to build a proper version sometime by using one of these, can't seem to find PS/2 sockets that can be properly aligned to an experiment board though :/

[ATTACH=CONFIG]18099[/ATTACH]
Title: XT/AT/PS2/Terminal to USB Converter with NKRO
Post by: ch_123 on Fri, 13 May 2011, 17:12:42
Quote from: ripster;345731
Sounds a teensy bit complicated to me.


Things often get more difficult to comprehend as you grow older.
Title: XT/AT/PS2/Terminal to USB Converter with NKRO
Post by: slueth on Fri, 13 May 2011, 23:06:52
Not that hard as long as you can understand the pinouts.  Make sure you are looking at the picture in the right point of view.  Either way, after messing around and sticking things in holes, I got it to work.
Title: XT/AT/PS2/Terminal to USB Converter with NKRO
Post by: 8_INCH_FLOPPY on Sat, 14 May 2011, 00:04:49
Quote from: Neit;339968
Hi Soarer,

I would like to wire your converter with both DIN and PS/2 connectors.
Since I'm pretty noob in electronics, I need some advice here.

Is it OK to wire the teensy and connectors like this ?
(followed your instructions on the article and of course I will use DIN OR PS/2, not both at the same time).
Show Image
(http://zep.netai.net/xt-at-ps2_converter.jpg)


Hope that I can.
Oh, and thank you for your great work, I may "resurrect" a terminal keyboard that probably use XT protocol.

 
Is that the same as the XT pinout? I wired it up to my XT keyboard like that and it is not currently working. The led on the board just lights up whenever I press a key.
Title: XT/AT/PS2/Terminal to USB Converter with NKRO
Post by: slueth on Sat, 14 May 2011, 02:08:19
I used this
(http://www.luzr.net/images/****.png)
with the information from the article:
Conn.       Teensy
GND -------- GND
Vcc/+5V ---- Vcc
Data ------- PD0
Clock ------ PD1
Title: XT/AT/PS2/Terminal to USB Converter with NKRO
Post by: Oqsy on Sat, 14 May 2011, 02:29:04
Voix:  I have this connected to a 122 Terminal F from the acfrazier group buy. Really not hard at all. I got a breadboard from RadioShack for a couple bucks, a teensy++ with pins preinstalled, and a DIN socket with pins for PCB mounting.

The teensy pins are pushed into the breadboard, as well as the DIN socket. Make sure you have the right pinout for the socket that matches your keyboard cable. Wire up the pins on the bottom of the breadboard  to match the diagrams earlier in this thread. Connect the USB cable to the teensy's jack and yr PC, then run the firmware loader, open Soarer's file, click the icon to "download", ie "flash" to the teensy. Click the icon to reboot the teensy. Done. Your board now works via USB, and where available, has full NKRO ;)

There's no need to fear, this is easy and fun!  Join the freenode IRC chat #geekhack and you will surely find a few of us using these that can talk you through it if you hit a snag.

One thing to note, mine is not soldered anywhere, and is currently connected with alligator "test" clips until I decide how to house it permanently. Not recommended since shorting the wrong pins/wires COULD do harm to your hardware, but if small enough clips are used, it IS workable temporarily until you or an electronics savvy buddy are ready to solder it up. ;)
Title: XT/AT/PS2/Terminal to USB Converter with NKRO
Post by: Soarer on Sat, 14 May 2011, 07:04:23
The most common mistake so far is wiring the socket backwards - it's important to note whether a diagram shows the front or back view of the socket. Which is why I prefer something like Neit's revised diagram (http://geekhack.org/showwiki.php?title=Island:17458&p=341287&viewfull=1#post341287) or this one from kbdbabel:

(http://www.kbdbabel.org/conn/kbd_connector_ibmpc.png)

8_INCH_FLOPPY: doing that on an XT connector would swap Vcc and GND, so unlikely to give an output at all. Could it be that you just have clock and data swapped over?
Title: XT/AT/PS2/Terminal to USB Converter with NKRO
Post by: kishy on Sat, 14 May 2011, 10:25:28
[ATTACH=CONFIG]18121[/ATTACH]

Please feel free to pop this into the article if you like...
Title: XT/AT/PS2/Terminal to USB Converter with NKRO
Post by: Voixdelion on Sat, 14 May 2011, 12:21:44
kewl.  will definitely try this...soon
Title: XT/AT/PS2/Terminal to USB Converter with NKRO
Post by: Neit on Sun, 15 May 2011, 13:10:20
Finally done mine, 0.994 working perfectly with my cherry 81-3000 (yes MY switches are a pain).
Unfortunately, couldn't resurrect the 122 keyboard (http://geekhack.org/showthread.php?17468), don't know what to do or think, broken? another protocol?
I'll go back where I found it to try some others KBs.

(http://zep.netai.net/converter/finished_1.jpg)

(http://zep.netai.net/converter/finished_2.jpg)

Didn't make the hole for the PS/2 at the moment, will do when needed.

Quote from: Soarer;343914
I don't know how the passive USB to PS/2 adapters are wired up though - either probe one or toss a coin ;-)

Got one somewhere, can check it if you want.

One question: During my final test after soldering, I tried pushing multiples keys to check how much my KB can handle. At a moment the teensy LED lightened up and turned off just after realising the keys. Did you implemented it or the teensy froze ?
Title: XT/AT/PS2/Terminal to USB Converter with NKRO
Post by: slueth on Sun, 15 May 2011, 16:53:29
It shouldn't light up, if it lights up there was a problem.  Should handle nkro.
Correct me if I am wrong.
Title: XT/AT/PS2/Terminal to USB Converter with NKRO
Post by: bhtooefr on Sun, 15 May 2011, 16:54:55
If the keyboard itself doesn't handle NKRO, though, there's a problem, and it'll light up.
Title: XT/AT/PS2/Terminal to USB Converter with NKRO
Post by: Soarer on Sun, 15 May 2011, 18:00:16
I don't think the lack of NKRO is a factor here - the keyboard is still capable of tracking lots of keypresses as long as they don't trigger the anti-ghosting or whatever, and in most cases that wouldn't light the Teensy's LED.

I think this is the keyboard's buffer filling up, at which point it sends a code saying that it has overflowed. The converter then clears the state of all keys and lights its LED for a 5 seconds. In nearly all cases where the LED lights up, the converter solves the problem so you don't notice anything bad happen :-)

I've noticed this a lot while testing, particularly when releasing many keys, and there's two reasons for that: first, you are more likely to release them all within a very short time than when pressing them, and second, for scan code sets 2 and 3, there are at least two bytes placed into the buffer for each key release, making much more likely to overflow the buffer.

As for that 122, I'm afraid I have no idea :(  It could be a different protocol, or possibly the connector just isn't wired the same as a normal XT/AT board, or both.
Title: XT/AT/PS2/Terminal to USB Converter with NKRO
Post by: 8_INCH_FLOPPY on Sat, 21 May 2011, 19:00:14
I got mine to work for a moment with a PS/2 keyboard, but after I unplugged it and tried it again, it wouldn't work. The light lights up whenever I press a key and that's it. I never got it to work with an XT keyboard.

With the female DIN plug facing me, and the 5 pins numbered clockwise, this is how I wired it up:
1-D1
2-Ground
3-D0
4-VCC
5-nothing

1.2k resistor between D0 and VCC, and 1.2k between VCC and D1.

Is this correct for both AT and XT?
Title: XT/AT/PS2/Terminal to USB Converter with NKRO
Post by: Soarer on Sat, 21 May 2011, 19:22:07
Yup, that's the right order when looking into the socket. AT and XT are the same. Pull-up resistors sound fine.

Perhaps data (D0) isn't properly connected. Could you post a pic or two?

edit: The other thing that might help to get it working is to run the hid_listen (http://www.pjrc.com/teensy/hid_listen.html) program to see what the error is (a cryptic code beginning with a capital 'R', most likely).
Title: XT/AT/PS2/Terminal to USB Converter with NKRO
Post by: 8_INCH_FLOPPY on Sat, 21 May 2011, 19:50:23
Ok, here's the message with one keypress on an AT keyboard:

R06
R06 R06


It doesn't give me any messages with the XT keyboard. However, the lock leds on the keyboard are working.

I doubt the connection is the problem, unless it's my cord or something. I'm not beginner when it comes to soldering.
Title: XT/AT/PS2/Terminal to USB Converter with NKRO
Post by: Soarer on Sat, 21 May 2011, 20:19:51
Not accusing you of sloppy soldering! But something seems to have broken after the first test with the PS/2 keyboard, presumably within the converter and its wiring - have you got a multimeter to check continuity?

R06 is a start bit error, so it's not getting very far with it! It's very strange that with the XT nothing is printed.

When connecting it, what does it say at the beginning?
(Should always say wEE, and then print more for the AT or PS/2).
(The USB side should be disconnected when changing keyboards).

Another thing that might give that error is if data is shorted to ground.
Title: XT/AT/PS2/Terminal to USB Converter with NKRO
Post by: 8_INCH_FLOPPY on Sat, 21 May 2011, 23:19:56
There's continuity between The socket and the board, according to ye olde VTVM. Also, there are no shorts between data and Gnd.

Hmm, it's suddenly working with ps/2 again. Here's the message it gave me when I plugged in:

wEE rEE wF0 w00 rFE wF0 w02 rFE wF0 w03 rFE wF2 rFA rAB r83
It's giving me a unique message for each keypress, and they are all working.

I still can't get the XT keyboards working. It just lights up whenever I press a key down. I had to unplug the USB and plug it in in order to get any message for the XT keyboard. Here it is:
wEE

then, when I press keys on the XT keyboard, the message alternates between
R06
R06
and
R05
R05
Ctl and a couple of other keys give me an occasional R04.


I haven't tested it with any of my 122-key keyboards yet. I'll remember to unplug the usb before keyboard swapping in the future.
Title: XT/AT/PS2/Terminal to USB Converter with NKRO
Post by: 8_INCH_FLOPPY on Sat, 21 May 2011, 23:25:31
Ok, I've switched back to an AT board, and now it's not working again. Here's the message when I plug it in:

wEE rEE wF0 w00 wF0 wF2 rFA
 
It is not receiving any of the key-presses now.
Title: XT/AT/PS2/Terminal to USB Converter with NKRO
Post by: 8_INCH_FLOPPY on Sat, 21 May 2011, 23:39:03
It seems that, out of the 3 AT keyboard that I've tested, the only one that does not work is the one that has a 3-way switch on the back so that it can switch between A, X and S. I've always assumed that this was AT, and XT, since A has worked though a simple AT to ps/2 adapter and X simply has not worked. I have no idea what the S stands for. Anyone know?

Anyway, my other XT keyboards are giving me the same message that this 'board gave me with the switch in the X position, so I'm assuming that it is working.
Title: XT/AT/PS2/Terminal to USB Converter with NKRO
Post by: 8_INCH_FLOPPY on Sat, 21 May 2011, 23:48:31
After much testing, here's what basically happens:

Normal AT keyboard: Works fine, do problemos  

wEE rEE wF0 w00 rFE wF0 w02 rFE wF0 w03 rFE wF2 rFA rAB r83
with unique messages for each key

Weirdo Monterey International Corp. FKF456K-104 AT keyboard with 3-way A,X,S switch on the back:
In the "A" position: wEE rEE wF0 w00 wF0 wF2 rFA
In the "X" position: wEE, alternating between R06 R06 R05 R05 with a few R04s thrown in
In the "S" position: wEE, alternating between R06 R06 R05 R05 with a few R04s thrown in

83-key XT keyboard:
wEE, alternating between R06 R06 R05 R05 with a few R04s thrown in

Any ideas?
Title: XT/AT/PS2/Terminal to USB Converter with NKRO
Post by: Soarer on Sun, 22 May 2011, 07:26:43
Hmm... I used an IBM XT 'board for developing, and then had to tweak my code to get it working with some of my switchable 'boards. It does seem that implementations vary much more on the XT protocol than the others, but I've only got a few 'boards I can test with, and no others that are only XT.

R04 is a clock error - the converter has missed one edge of the clock signal, usually because of a short spike. I haven't seen this one other than when powering up, so I'm not sure why it's happening here.
R05 is a timeout error - the converter started receiving clock from the board, but didn't receive enough for a full code.
R06, the start bit error - the converter read a start bit, but it was incorrect. (Data should be high for XT, low for the rest).

It looks like that AT 'board is being upset by the tests the converter does to try and auto-detect the keyboard type (or the converter is being confused by the response). I've been thinking about simplifying it, which might help with this 'board.

I've got a Cherry with a pair of dip switches, and the choices are 'PC/XT', 'AT 02', and 'MF'. I'll plug it in later and see what it does.
Title: XT/AT/PS2/Terminal to USB Converter with NKRO
Post by: 8_INCH_FLOPPY on Sun, 22 May 2011, 14:29:41
I tested my other XT keyboard, and it responded the same as the first one. I have to make an adapter before I test my 122-key model Ms.
Title: XT/AT/PS2/Terminal to USB Converter with NKRO
Post by: Soarer on Mon, 23 May 2011, 05:29:02
Cherry 'board didn't do anything that might shed light on what the 'S' setting on yours is. 'S' could stand for 'serial', at a guess.

Your XT 'boards - what make are they?

At this point, seeing the signals on a 'scope would probably show us what the problem is within minutes, otherwise it's pretty tricky to diagnose :-/
Title: XT/AT/PS2/Terminal to USB Converter with NKRO
Post by: 8_INCH_FLOPPY on Mon, 23 May 2011, 22:38:59
I'm not sure what make they are. Unfortunately, the last owner peeled the stickers off, and I haven't taken them apart yet  They are both 83-key layout, with black cherries, double-shot keys, and full-key rollover. I can't wait to get them working. I have very little experience with digital, but I'll try to get a 'scope shot soon.
Title: XT/AT/PS2/Terminal to USB Converter with NKRO
Post by: Soarer on Tue, 24 May 2011, 06:14:25
Oh wow, that would really help! Normally the signals very easy to capture on a 'scope, they're 5V and only about 10kHz. Trigger on clock going below about 2.5V.

Here's an IBM XT 'board sending the make code for the comma key (0x33):

[attachimg=1]

The clock (in blue) spends less time low than high - I suspect on your 'boards it might be spending even less time low, so that's the first thing to look at. It would be interesting to see traces for both the unknown and the Monterey (in 'X' mode).
Title: XT/AT/PS2/Terminal to USB Converter with NKRO
Post by: Hak Foo on Sun, 12 June 2011, 18:13:39
Is there any chance we can get the source if we want to compile our own custom mappings?  I know the all-singing all-dancing customizable version is under development, but I'd love to lock down a sensible location for a few keys the registry-based remappers ignore?
Title: XT/AT/PS2/Terminal to USB Converter with NKRO
Post by: 8_INCH_FLOPPY on Tue, 14 June 2011, 13:43:36
These were all captured with me pressing the "accent grave/tilde" key. The "S" setting seemed to be about the same as the "X". It wouldn't work at all on the "A" setting, even though it works fine with my pc.

Unidentified 83-key XT Keyboard:
http://imageshack.us/photo/my-images/804/photo0017v.jpg/

Monterey Keyboard with switch on the "X" position:
http://imageshack.us/photo/my-images/534/photo0018jg.jpg/
http://imageshack.us/photo/my-images/541/photo0019wj.jpg/

Monterey Keyboard with switch on the "S" position:
http://imageshack.us/photo/my-images/194/photo0020e.jpg/
Title: XT/AT/PS2/Terminal to USB Converter with NKRO
Post by: REVENGE on Fri, 17 June 2011, 19:26:45
Soarer, this is an excellent project! My implementation works nicely with a Model F 122 key terminal board. Now, when do you plan on releasing the source code? I am very interested in doing some controller level remapping for media keys and whatnot.
Title: XT/AT/PS2/Terminal to USB Converter with NKRO
Post by: Soarer on Sat, 18 June 2011, 05:39:37
Quote from: Hak Foo;359618
Is there any chance we can get the source if we want to compile our own custom mappings?  I know the all-singing all-dancing customizable version is under development, but I'd love to lock down a sensible location for a few keys the registry-based remappers ignore?

 
Quote from: REVENGE;362636
Soarer, this is an excellent project! My implementation works nicely with a Model F 122 key terminal board. Now, when do you plan on releasing the source code? I am very interested in doing some controller level remapping for media keys and whatnot.

 
It could well well Autumn before I have a chance to implement the fancy bits; looks like other stuff is going to get in the way until then :-(

So, possibly.
Title: XT/AT/PS2/Terminal to USB Converter with NKRO
Post by: Soarer on Sat, 18 June 2011, 06:47:14
Quote from: 8_INCH_FLOPPY;360683
These were all captured with me pressing the "accent grave/tilde" key. The "S" setting seemed to be about the same as the "X". It wouldn't work at all on the "A" setting, even though it works fine with my pc.

Unidentified 83-key XT Keyboard:
http://imageshack.us/photo/my-images/804/photo0017v.jpg/ (http://imageshack.us/photo/my-images/804/photo0017v.jpg/)

Monterey Keyboard with switch on the "X" position:
http://imageshack.us/photo/my-images/534/photo0018jg.jpg/ (http://imageshack.us/photo/my-images/534/photo0018jg.jpg/)
http://imageshack.us/photo/my-images/541/photo0019wj.jpg/ (http://imageshack.us/photo/my-images/541/photo0019wj.jpg/)

Monterey Keyboard with switch on the "S" position:
http://imageshack.us/photo/my-images/194/photo0020e.jpg/ (http://imageshack.us/photo/my-images/194/photo0020e.jpg/)

That Monterey is an odd beast! For starters, it's going more than twice as fast as a standard IBM XT, ~40uS per clock vs ~100uS. Then it only spends a small amount of that time high, ~8uS. Since my software attempts to track both the rising and falling edges of the clock signal, I guess it's failing to do that correctly at that speed. The strange thing is, I'd expect that to cause a lot of R04, with maybe a few other errors mixed in, but anyway the timing is something I can look at.

The 'A' settting is clearly even more enigmatic! But let's assume it's a similar timing problem for now.

The XT board, though, has perfectly fine looking timings. I can't see anything in them that would trip up my converter :-/
So I'm guessing there's something else odd about it, that maybe a trace showing the whole byte would reveal.

edit: Uploaded those pics to GH... 2nd edit: again...

Unidentified 83-key XT Keyboard:
[attachimg=1]
Monterey Keyboard with switch on the "X" position:
[attachimg=2] [attachimg=3]
Monterey Keyboard with switch on the "S" position:
[attachimg=4]
Title: XT/AT/PS2/Terminal to USB Converter with NKRO
Post by: didjamatic on Sat, 18 June 2011, 08:59:24
Nice work, I'm doing this!  Is there a downside to the ++ or is it just larger than necessarily?  Seems the ++ would be more versatile if you were only going to buy one.
Title: XT/AT/PS2/Terminal to USB Converter with NKRO
Post by: Soarer on Sat, 18 June 2011, 09:29:04
No downside apart from cost really! It just has more of everything (which the converter doesn't make any use of currently). Eventually the extra RAM and EEPROM could be used to store more and/or longer macros etc, but that's about it.
Title: XT/AT/PS2/Terminal to USB Converter with NKRO
Post by: REVENGE on Sat, 25 June 2011, 06:28:03
Soarer, one of the keys on my 122 key terminal Model F does not send any key codes through the adapter when I checked in Aqua's key test. It's the top right key in the numpad cluster. Is this a problem with my keyboard or is that key not mapped to any code in your firmware?
Title: XT/AT/PS2/Terminal to USB Converter with NKRO
Post by: Soarer on Sat, 25 June 2011, 07:48:04
Quote from: REVENGE;367634
Soarer, one of the keys on my 122 key terminal Model F does not send any key codes through the adapter when I checked in Aqua's key test. It's the top right key in the numpad cluster. Is this a problem with my keyboard or is that key not mapped to any code in your firmware?

 
My bad! Looks like I did half a change - I took it out of the global remaps, but forgot to put it back in elsewhere. :-(
I'll have a look at it later and see if I can remember what I intended to do!
Title: XT/AT/PS2/Terminal to USB Converter with NKRO
Post by: REVENGE on Sat, 25 June 2011, 08:15:06
Quote from: Soarer;367653
My bad! Looks like I did half a change - I took it out of the global remaps, but forgot to put it back in elsewhere. :-(
I'll have a look at it later and see if I can remember what I intended to do!
Thanks! :) Aside from that key not sending a code, the board is currently missing default key mappings for Pause, Numpad /, and Numpad +.

Another issue I noticed: the keyboard can wake my computer from standby, but stops working afterwards and requires a re-plug. Not sure if this is a known issue or not.
Title: XT/AT/PS2/Terminal to USB Converter with NKRO
Post by: kps on Sun, 26 June 2011, 11:57:23
Quote from: Hak Foo;359618
Is there any chance we can get the source if we want to compile our own custom mappings?

 
Quote from: REVENGE;362636
I am very interested in doing some controller level remapping for media keys and whatnot.


This is what I did for my 122-key F; it might help someone else. No guarantees, and I probably don't have time to hold hands.



[ATTACH=CONFIG]19817[/ATTACH]
Title: XT/AT/PS2/Terminal to USB Converter with NKRO
Post by: Oqsy on Mon, 27 June 2011, 23:25:48
Nice. I need to do an ANSI mod and add my RGB modifiers too. Excellent work and thx for sharing.
Title: XT/AT/PS2/Terminal to USB Converter with NKRO
Post by: Soarer on Sat, 02 July 2011, 10:35:00
Quote from: Soarer;367653
My bad! Looks like I did half a change - I took it out of the global remaps, but forgot to put it back in elsewhere. :-(
I'll have a look at it later and see if I can remember what I intended to do!

New version (0.995) posted that maps the top-right key of the numpad to 'Pause'.

Quote from: REVENGE;367662
Thanks! :) Aside from that key not sending a code, the board is currently missing default key mappings for Pause, Numpad /, and Numpad +.

Another issue I noticed: the keyboard can wake my computer from standby, but stops working afterwards and requires a re-plug. Not sure if this is a known issue or not.

Not known to me, at least! Does resume work fine with another USB keyboard?
Title: XT/AT/PS2/Terminal to USB Converter with NKRO
Post by: mr_a500 on Sun, 03 July 2011, 11:36:52
I'm thinking of trying this thing with an IBM 5155 keyboard. It should be the same as an XT keyboard, right? Theoretically, I'd just need a phone-style plug in and connect the appropriate lines to the teensy. Has anybody tried this?
Title: XT/AT/PS2/Terminal to USB Converter with NKRO
Post by: REVENGE on Sun, 03 July 2011, 20:29:10
Quote from: Soarer;371928
New version (0.995) posted that maps the top-right key of the numpad to 'Pause'.


 
Not known to me, at least! Does resume work fine with another USB keyboard?

Yep, I had my BlackWidow and the Model F both connected. First off, the Teensy stays on even while the computer is suspended, the lock LEDs stay lit. Secondly, if I resume using the Model F, it will not function once the computer boots up. At this point, without resetting the Teensy, if I put the computer back to sleep and use another USB device to wake it up, the Model F will function normally again. Finally, I can always unplug and replug the Teensy to get the keyboard working again.

Thanks for adding Pause by the way, although I would still prefer to compile from source using my own mappings. :P
Title: XT/AT/PS2/Terminal to USB Converter with NKRO
Post by: Soarer on Tue, 05 July 2011, 06:59:07
It has to stay powered for a keypress to be able to trigger the wake-up ;)  I know it's not supposed to stay fully powered, but it's the best that can be done with non-usb keyboards. Depending on OS and settings, the USB port or hub that it is attached to may get switched off (or simply ignored, if it's self-powered) because it's drawing too much current when in sleep mode, but that just means it can't send the wake-up.

Re not working after being used to wake up the computer - I need more clues!! It seems to be working ok on Windows (although I did have to change which power mode the computer was using for suspend), on Linux,  and also on Macs (apparently), so I guess part of this is working out what's different about your setup? OS, power settings (BIOS and OS), whether it's on a powered hub, pr0n cache size...
Title: XT/AT/PS2/Terminal to USB Converter with NKRO
Post by: REVENGE on Tue, 05 July 2011, 08:04:41
Quote from: Soarer;373627
Re not working after being used to wake up the computer - I need more clues!! It seems to be working ok on Windows (although I did have to change which power mode the computer was using for suspend), on Linux,  and also on Macs (apparently), so I guess part of this is working out what's different about your setup? OS, power settings (BIOS and OS), whether it's on a powered hub, pr0n cache size...

Still waiting for Explorer to scan the pr0n cache and total up the file sizes, I'll get back to you on that one. Do you need to know my web history as well?

Windows 7 64-bit, S3, not sure what you can do with power settings in Windows, powered mobo hub.
Title: XT/AT/PS2/Terminal to USB Converter with NKRO
Post by: Soarer on Tue, 05 July 2011, 08:59:05
It's just the size that counts!

I'll check next time I reboot what I set in my BIOS, I might've changed it from S3 to S2, but I forget! Before I changed it, the port was being powered down by the PC, so wake-up didn't work at all.

I'm all XP at the moment. Sometime soon I'll be setting up a Windows 7 PC, it will probably be 32-bit, but that shouldn't make much difference to this problem. I'll look at it then.
Title: XT/AT/PS2/Terminal to USB Converter with NKRO
Post by: REVENGE on Tue, 05 July 2011, 10:19:09
Quote from: Soarer;373666
It's just the size that counts!

I'll check next time I reboot what I set in my BIOS, I might've changed it from S3 to S2, but I forget! Before I changed it, the port was being powered down by the PC, so wake-up didn't work at all.

I'm all XP at the moment. Sometime soon I'll be setting up a Windows 7 PC, it will probably be 32-bit, but that shouldn't make much difference to this problem. I'll look at it then.

Sounds good, mad props again for developing and maintaining this project. :P
Title: XT/AT/PS2/Terminal to USB Converter with NKRO
Post by: mr_a500 on Sun, 10 July 2011, 09:02:02
So nobody has ever tried this with an IBM 5155? (that means I'll be the first... in history!)

(http://img59.imageshack.us/img59/3530/5155.jpg)

(http://img96.imageshack.us/img96/1171/closeupi.jpg)

I'm thinking of getting something like this:
(http://d3d71ba2asa5oz.cloudfront.net/43000333/images/541-1-ab.jpg)

...and put the Teensy inside of it. Connecting the wires should then be no problem. My only problem is that I don't know which pin is what. How can I find out?

Maybe my "Googling skills" aren't great, but I can't find any pinout information for the 5155.
Title: XT/AT/PS2/Terminal to USB Converter with NKRO
Post by: kps on Sun, 10 July 2011, 09:25:25
Quote from: mr_a500;377416
My only problem is that I don't know which pin is what. How can I find out?

 
Open it. Power and ground should be straightforward to identify. Data & clock might take a bit of tracing (though it's more likely the same as the PC), and getting them backwards on the first try won't hurt anything anyway.
Title: XT/AT/PS2/Terminal to USB Converter with NKRO
Post by: mr_a500 on Sun, 10 July 2011, 09:35:05
You mean open the keyboard? That could be tricky. There are no screws. It looks like it was assembled by snapping the front in and it looks difficult to snap it out again. There are small cracks all around the edges. I don't want to break it by trying to pry it apart. Even if I was successful, it would probably be loosened - and the sturdy feel of this keyboard is the main reason I like it.

No, I don't think I'll attempt to open it.
Title: XT/AT/PS2/Terminal to USB Converter with NKRO
Post by: Soarer on Sun, 10 July 2011, 10:07:25
If you have a multimeter, you might be able to work it out without taking it apart.
Measure resistance between the case (obviously, need to find some metal part!) and each pin...
One or more will have 0 resistance, so they're grounds.
Power will have some resistance (about 780 ohms on the 122-key board I just tried).
Data and clock might have the same reading (about 2.8k on this board), or, if it's like the PC-XT, then data will be lower resistance than clock (both would still be higher than from case to power).
Title: XT/AT/PS2/Terminal to USB Converter with NKRO
Post by: Hak Foo on Sun, 10 July 2011, 19:58:31
Revenge:  I think I've had a similar symptom.  Only happened since 0.99.5, but it seems like once it powers off, you have to unplug/replug to make it work again.  Even hard power-off (cut the line power, not software power-off) doesn't help.

Mobo: MA790X-UD4, using an on-board port
OS: Windows 7 64-bit
Board: 6110345 (122-key F, as most of us use)
Title: XT/AT/PS2/Terminal to USB Converter with NKRO
Post by: LETE on Wed, 20 July 2011, 14:51:56
Quote from: kps;368471
This is what I did for my 122-key F; it might help someone else. No guarantees, and I probably don't have time to hold hands.



These files aren't much use without the source code, right? Or did you just inject the resulting hex code into the main hex file?
Title: XT/AT/PS2/Terminal to USB Converter with NKRO
Post by: alaricljs on Wed, 20 July 2011, 15:03:01
You write the teensy firmware with this hex file.  It's a complete firmware.
Title: XT/AT/PS2/Terminal to USB Converter with NKRO
Post by: Soarer on Wed, 20 July 2011, 15:04:46
[strike]I didn't work out what they were for either.... presumably OS side somewhere.[/strike]
Title: XT/AT/PS2/Terminal to USB Converter with NKRO
Post by: LETE on Wed, 20 July 2011, 15:25:11
I'm talking about the files kps posted in the attached zip file "remap.zip" on page 12. They're basically the look-up tables used to generate compatible scancodes.
Title: XT/AT/PS2/Terminal to USB Converter with NKRO
Post by: alaricljs on Wed, 20 July 2011, 15:36:06
Just looked at the contents, it's got a makefile and everything is automatic... it specifies the input:  Soarer_at2usb_v0.994_teensy2.hex  and modifies it to produce patched.hex   which is then a complete replacement firmware itself.

edit:   will not be possible to do this to any other rev of the FW without figuring out the addresses equivalent to start1a/start1b/start2/start3 from the one he patched.
Title: XT/AT/PS2/Terminal to USB Converter with NKRO
Post by: LETE on Wed, 20 July 2011, 15:41:53
Ah, well said. Thank you.
Title: XT/AT/PS2/Terminal to USB Converter with NKRO
Post by: Soarer on Wed, 20 July 2011, 17:34:30
Oh... so that's what it does... outrageous subterfuge!!

I should warn anyone trying this, that my remaps happen after those tables, so you may not get what you intended!
Title: XT/AT/PS2/Terminal to USB Converter with NKRO
Post by: alaricljs on Wed, 20 July 2011, 17:39:59
The people WANT YOUR STUFF... ;)  they just want it their way.
Title: XT/AT/PS2/Terminal to USB Converter with NKRO
Post by: REVENGE on Wed, 20 July 2011, 18:18:08
Quote from: Soarer;384288
Oh... so that's what it does... outrageous subterfuge!!

I should warn anyone trying this, that my remaps happen after those tables, so you may not get what you intended!
Soarer, I understand you're not ready to release your source, but I would be satisfied in the meantime if you could include a proposed layout for the 104 key Terminal Model F. Specifically, Esc and Pause need to be moved the left side function cluster since there's no Numpad area on those boards.
Title: XT/AT/PS2/Terminal to USB Converter with NKRO
Post by: kps on Wed, 20 July 2011, 20:30:18
Quote from: Soarer;384288
Oh... so that's what it does... outrageous subterfuge!!

Thanks!

Quote
I should warn anyone trying this, that my remaps happen after those tables, so you may not get what you intended!

I thought so, from the table contents. It's enough to get my Terminal F layout working, though.
Title: XT/AT/PS2/Terminal to USB Converter with NKRO
Post by: LETE on Thu, 21 July 2011, 21:50:47
I'm going to stick a couple solid state relays in my box and set this thing up to control my lamps. I shouldn't have to stand up to turn those things on and off when I've got so many extra buttons on my keyboard.
Title: XT/AT/PS2/Terminal to USB Converter with NKRO
Post by: LETE on Fri, 29 July 2011, 10:38:44
Here are a few pictures of my teensy mounting solution for a model F terminal board. My four terminal boards have an extra pcb mounting spot so I decided to take advantage of it. I bought some perf board, a screw and some female to female jumper wires and in 8 minutes I was up and running. No soldering makes it completely reversible, the teensy board is held in by friction alone, but it feels solid enough.

[ATTACH=CONFIG]22675[/ATTACH][ATTACH=CONFIG]22676[/ATTACH][ATTACH=CONFIG]22678[/ATTACH]
Title: XT/AT/PS2/Terminal to USB Converter with NKRO
Post by: SmallFry on Wed, 10 August 2011, 23:08:48
Is it possible that I could get the source code? I wanted to recompile/edit a little/etc this to work with my AVR Butterfly (ATmega169)...
Title: XT/AT/PS2/Terminal to USB Converter with NKRO
Post by: Soarer on Thu, 11 August 2011, 09:04:38
Quote from: SmallFry;396808
Is it possible that I could get the source code? I wanted to recompile/edit a little/etc this to work with my AVR Butterfly (ATmega169)...

Sorry, I'm not ready to give it out yet. It might be a while because I'm very busy with other stuff for at least the next month or two.

I think it might anyway take a fair bit of effort to get it working on that chip, since I don't think it has hardware USB support.
Title: XT/AT/PS2/Terminal to USB Converter with NKRO
Post by: SmallFry on Thu, 11 August 2011, 12:30:26
Alright, thanks anyways Soarer
Title: XT/AT/PS2/Terminal to USB Converter with NKRO
Post by: wcass on Fri, 12 August 2011, 09:53:17
Soarer, perhaps the GH community could help with building a front end? something that did nothing more than build an input file ...

=
=
=
 
You can name the format that works.
How can we help you?
Title: XT/AT/PS2/Terminal to USB Converter with NKRO
Post by: Soarer on Thu, 18 August 2011, 08:47:50
Quote from: wcass;397641
Soarer, perhaps the GH community could help with building a front end?
How can we help you?

I'm sorry, I missed this! Thanks for the offer!

I would like some help with the front-end and cross platform stuff (particularly OSX) - the way I envisage it, it breaks down into 3 or 4 components, so it is ideal for sharing the work! Even having alternate front-ends, if that suits people. However, one or two of those I have to write, so I'm still the weak link :(

The layers would be...
The input file to the compiler will be something like you suggest, rather than full tables, since that's how my remapping works on the Teensy. But there can also be multiple sections, each one tagged with enough information to decide when to apply the remappings - e.g. globally, for set3 terminal boards, or perhaps by individual keyboard ID.

So, I need to write the device part (which I can't really test without also writing the driver part for Windows!), and also define the binary format within the EEPROM, in a way that allows for future extensions (macros, etc).
Title: XT/AT/PS2/Terminal to USB Converter with NKRO
Post by: wcass on Sun, 28 August 2011, 00:37:50
so a couple of questions.

input file format should be ... what? default name?
comment character would be what? - i'm using # in this example)
will your code ignore white space and letter case?
Quote
3a=1D # cap lock = left ctrl
  1d = 3A # left ctrl = caps lock
     ... etc
some (mostly terminal) keyboards send key combinations like [shift]+[F1] for a single key-press of [F13]; is your code able to catch [shift]+[F1] and spit out something like ...
     
Quote
2A+3B=e0 30 # F13 = volume up
     2a+3c=e0 2e # F14 = volume down
     ... etc

macros would be written like ....
     
Quote
6b=E0 48+E0 48+E0 4D+E0 4B # F20 = (arrows) up up right left
     ... etc

is this reasonable expectation?
Title: XT/AT/PS2/Terminal to USB Converter with NKRO
Post by: Soarer on Sun, 28 August 2011, 08:15:48
I'm imagining something along the lines of this:
Code: [Select]
# colemak
!remap
!type=global
D=S
E=F
f=t
G=D
# ...
P=SEMICOLON
semicolon = O

# extra keys on a modded AT-F
!remap
!type=set2
FAKE_02 = LEFT_ALT
FAKE_04=RIGHT_ALT
# ...
(Case insensitive and spaces ignored).

The remapping happens using page 7 HID codes (mostly), and I have a spreadsheet with textual names for each of them already, so it would be easy to generate a table for converting the text to binary codes (e.g. SEMICOLON to 0x33). I say mostly, because I've also crammed the system and media keys into the same table (and some fakes as well, to avoid clashes) - this means every key function is coded by a single byte.

Macros are still a big TBD! I have the output side implemented, so punting a series of codes out is not a problem. Each entry in the output queue is a pair of a command byte and a data byte - I've got command bytes for changing modifiers, saving/restoring modifiers, key up, key down, etc. And I've hardcoded the trigger logic to handle the few 'odd' keys on the XT and AT. But there's still a lot of thinking to do to get it data driven, so I don't think user-definable macros will be part of v1.0.

That said, there's three kinds of macro, and for those triggered by a single key, implementation would be quite simple. In increasing order of trickiness:
Single key - can have separate macros for press and release (up to the user to make sure they make sense!)
Combination1 - single macro that is played when a combination is pressed
Combination2 - separate press and release macros (release is very tricky to track!)

What makes these things tricky is the lack of RAM, mainly.

Leaving aside that remapping shift-F1 etc is going to prevent you using that combination for its normal purpose, it sounds like you'd want the second combination type for that volume up/down example, because even the first one would leave you repeatedly pressing the key rather than just holding it down and letting it repeat.
Title: XT/AT/PS2/Terminal to USB Converter with NKRO
Post by: wcass on Sun, 28 August 2011, 14:04:17
would it conserve RAM to only include key mappings for the hardware and configurations  one expects to use? For example, if i don't know Dvorak or Colemak then leave support for these out; if it will only be used with a standard 101 key - don't include code to handle F13-F24.

if you were to go this way, it would be configured in the front end - there would probably need to be a keyboard database with keyboard make, model, all the make/break scan codes that the controller can produce.

i see advantages of making such a thing a web app - one user would supply the scan code map for a "new" keyboard and add it to the database. other users with that model would benefit. notes about specific keys/keyboards would be displayed in the UI when  they are selected such as "this key does not send a break code and  therefore ..." or "this key is equivalent to [shift]+[F1] and therefore ...". a web app could also support the costs to develop and host itself with ads and/or "donate" buttons. A user would go to the web page and ...
Title: XT/AT/PS2/Terminal to USB Converter with NKRO
Post by: Soarer on Sun, 28 August 2011, 16:01:46
Oh, I was just using Colemak as an example, it needn't be included all the time. And for F13 etc, unless mappings were in the config file, they wouldn't take up any EEPROM space. There are some small tables used to remap the FAKE entries to usable codes, but these live in ROM, and there's plenty of that :-)

There's certainly no reason why the compiler couldn't read multiple input files before spitting out the binary EEPROM image, but I don't think there's a need for a keyboard database since the majority fall into one the four types already handled (any keys with special codes in, say, extended set 2, would need modifications to the hardcoded part of the converter anyway).

The web server idea is great, but would need to hande uploads carefully, and need a server that stays up, etc. Another option is to use a web browser for UI, but have it all run locally... the snag with that is that people update browsers, and it might break something (particularly since we'd want to read/write files), so could be a maintenance headache to keep the code compatible. On the other hand, everyone has a web browser already, so there's no scripting runtime to install. Third option would be some scripting language which has reasonable cross-platform UI support (python?). The latter has the advantage that it's no problem to call the driver to upload the compiled binary to the converter.

So far, I've been thinking only of uploading the remaps and macros to EEPROM using this setup (i.e. The main firmware would not be reloaded each time). This means you don't even have to press the button on the Teensy in order to change mappings, and your keyboard stays operational throughout. That's nice, but there's so much ROM space free, that it's tempting to reload with a modified firmware (which is what you were thinking...?).
Title: XT/AT/PS2/Terminal to USB Converter with NKRO
Post by: wcass on Sun, 28 August 2011, 23:19:10
yes, i was thinking to reload firmware when changing key maps and macros. speaking for myself, i would be be changing my computer much more frequently than key mapping.

and as far as web services go, pjrc might offer support as it inherently promotes their product. iMav might help as it is aimed at his target audience. sourceforge might work. and this forum is full of people in information technologies fields - all you need to do is ask.

if - like many programmers - you don't feel comfortable asking, i would be happy to ask for you.
Title: XT/AT/PS2/Terminal to USB Converter with NKRO
Post by: Soarer on Mon, 29 August 2011, 04:43:47
Heh, it's not that - I'd always planned on asking for someone to do the front end when it was time! I'd rather it didn't require a server though, it just seems unnecessary. Especially if browser based, it (or the user) can easily go and fetch definition blocks from all over the place anyway. If Javascript is sufficient, I think that's the way I'd like to go - reading files would be no problem, running them (to load the mappings onto the Teensy) might mean faking a download? Obviously directly running another app is a no-no, but with a file association it could.
Title: XT/AT/PS2/Terminal to USB Converter with NKRO
Post by: Hak Foo on Mon, 29 August 2011, 23:14:37
box an xampp install with the package.

I've pondered doing that with an in-house web-based package-- make it a local site
Title: XT/AT/PS2/Terminal to USB Converter with NKRO
Post by: timofonic on Wed, 07 September 2011, 03:18:55
About macros and remappings... What about showing it as a Mass Storage Device with the files on it? It would save the use of extra software.
Title: XT/AT/PS2/Terminal to USB Converter with NKRO
Post by: Shawn Stanford on Wed, 07 September 2011, 06:57:46
Well, I went ahead and ordered a Teensy 2.0, a breadboard and a set of LEDs. I've never done anything like this before, so...
Title: XT/AT/PS2/Terminal to USB Converter with NKRO
Post by: Oqsy on Wed, 07 September 2011, 10:17:54
Shawn, it's a great project to start with. Pretty straightforward, and great payoff (all those old terminal and xt boards are now usable!)

It's an awesome project, and i'm excited about the next phase as its being discussed here.
Title: XT/AT/PS2/Terminal to USB Converter with NKRO
Post by: itlnstln on Wed, 07 September 2011, 10:37:06
Quote from: ripster;412020
Go Shawn!

I've been waiting for a "Dummy's Guide" including all the physical parts and lots of pics.  Plus I still have some microcontroller USB burner lying around in case anyone ever starts selling PCBs.

So, in other words, you're calling Shawn a dummy.  Way to support our troops.
Title: XT/AT/PS2/Terminal to USB Converter with NKRO
Post by: one_each on Wed, 07 September 2011, 11:19:54
IF THE-KEY-PRESSED-HAS-A-KEYCAP-WITH-A-ON-IT THEN
  SEND-THE-CODE-FOR THE-LETTER-A.
END IF

Its been a long time since I worked in COBOL.  Java/HTML/CSS/JavaScript for my day job, C/C++ and assembly when at home.

Soarer, this is a very cool project so keep up the good work.
Title: XT/AT/PS2/Terminal to USB Converter with NKRO
Post by: itlnstln on Wed, 07 September 2011, 12:40:04
I'm lame.  VB.NET for the win.  I'm a DB guy, not a programmer.
Title: XT/AT/PS2/Terminal to USB Converter with NKRO
Post by: Soarer on Wed, 07 September 2011, 21:04:19
Quote from: Hak Foo;407197
box an xampp install with the package.

I've pondered doing that with an in-house web-based package-- make it a local site
Seems a bit heavyweight for this! I think if JavaScript can't do it, a Python or Java app would be the next choice. (Might be a better choice anyway, for other reasons).

Quote from: timofonic;411919
About macros and remappings... What about showing it as a Mass Storage Device with the files on it? It would save the use of extra software.
The storage is so small that there isn't enough room for the allocation tables and directory entries etc that you need for a file system!

Quote from: Shawn Stanford;411952
Well, I went ahead and ordered a Teensy 2.0, a breadboard and a set of LEDs. I've never done anything like this before, so...
And you have a socket, I hope! Just start with wiring the socket to the teensy, then see if it works, then fix or add more bits. We're here if you get stuck :-)

Quote from: one_each;412052
Soarer, this is a very cool project so keep up the good work.

Quote from: Oqsy;412017
It's an awesome project, and i'm excited about the next phase as its being discussed here.

Thanks guys! I hope the next stage won't disappoint!
Title: XT/AT/PS2/Terminal to USB Converter with NKRO
Post by: kps on Thu, 08 September 2011, 10:55:58
Quote from: one_each;412052
IF THE-KEY-PRESSED-HAS-A-KEYCAP-WITH-A-ON-IT THEN
  SEND-THE-CODE-FOR THE-LETTER-A.
END IF


No, no, no.

During the day, whenever someone presses a key, you simply append the matrix position to a tape. Then at night, after all the typing is done, you take that input tape, plus another tape containing tables of matrix codes and USB key codes, and run the program to generate an output tape. Then you take that tape from the keyboard's output tape drive over to one of the computer's tape drives and read it in.
Title: XT/AT/PS2/Terminal to USB Converter with NKRO
Post by: timofonic on Thu, 08 September 2011, 22:09:24
Quote from: Soarer;412363
The storage is so small that there isn't enough room for the allocation tables and directory entries etc that you need for a file system!

OK, sorry. I did think the structure would be able to be generated in-time. There would be just one or two text files, then regenerate the needed firmware part. Maybe this is just a pipe dream, I'm still too bad at computer programming and too much unrealistic imagination...

What about adding a bluetooth module for the future? I know it's not feasible and out of the scope of this project, but it could be nice to have the Ultimate Keyboard Adapter (TM) :D
Title: XT/AT/PS2/Terminal to USB Converter with NKRO
Post by: Soarer on Fri, 09 September 2011, 04:35:30
Quote from: timofonic;413121
OK, sorry. I did think the structure would be able to be generated in-time. There would be just one or two text files, then regenerate the needed firmware part. Maybe this is just a pipe dream, I'm still too bad at computer programming and too much unrealistic imagination...

Of the four layers (http://geekhack.org/showwiki.php?title=Island:17458&p=400916&viewfull=1#post400916) I was thinking of, the driver is actually the easiest part. The device part isn't horribly complex either, and mainly just allows a single file to be written to (and read from) the Teensy's EEPROM.

Quote from: timofonic;413121
What about adding a bluetooth module for the future? I know it's not feasible and out of the scope of this project, but it could be nice to have the Ultimate Keyboard Adapter (TM) :D

Gonna need a good battery!!
Title: XT/AT/PS2/Terminal to USB Converter with NKRO
Post by: timofonic on Fri, 09 September 2011, 11:37:54
Quote from: Soarer;413226
Of the four layers (http://geekhack.org/showwiki.php?title=Island:17458&p=400916&viewfull=1#post400916) I was thinking of, the driver is actually the easiest part. The device part isn't horribly complex either, and mainly just allows a single file to be written to (and read from) the Teensy's EEPROM.



Gonna need a good battery!!

 
Like this board (http://geekhack.org/showwiki.php?title=Island:19104)? They use a common Broadcom bluetooth controller.
Title: XT/AT/PS2/Terminal to USB Converter with NKRO
Post by: Soarer on Fri, 09 September 2011, 12:06:47
The battery comment wasn't a joke!

Those things work great as controllers for contact switch keyboards - they can go to sleep between keypresses and save a lot of power. That trick doesn't work for capacitive switches at all. And for my converter, it's not feasible to cut power to the keyboard and put the Teensy into a low power state - it would at the least require extra circuitry. Even if it could, what would wake it up! So there's a constant power drain to the Teensy and keyboard, which is many times what the bluetooth module uses even when it's awake.
Title: XT/AT/PS2/Terminal to USB Converter with NKRO
Post by: Oqsy on Fri, 09 September 2011, 14:43:15
Lawn mower batt work? :P
Title: XT/AT/PS2/Terminal to USB Converter with NKRO
Post by: Soarer on Fri, 09 September 2011, 16:53:18
Bettah!

(http://www.jetplanes.co.uk/modelaircraft/sc25_model_plane_engine.jpg)

You could fit one a terminal keyboard's case, no problem. Look a bit daft controlling your HTPC with it though.
Title: XT/AT/PS2/Terminal to USB Converter with NKRO
Post by: Soarer on Fri, 09 September 2011, 22:26:32
Quote from: Soarer;373666
It's just the size that counts!

I'll check next time I reboot what I set in my BIOS, I might've changed it from S3 to S2, but I forget! Before I changed it, the port was being powered down by the PC, so wake-up didn't work at all.

I'm all XP at the moment. Sometime soon I'll be setting up a Windows 7 PC, it will probably be 32-bit, but that shouldn't make much difference to this problem. I'll look at it then.


I had changed the ACPI setting in my BIOS to S1. IIRC, in S3 the wakeup simply didn't wake it up. Might be worth a try - it's safe, and easy to reverse.

Finally installed Windows 7 SP1 64 bit, so I'll try and reproduce that problem tomorrow.
Title: XT/AT/PS2/Terminal to USB Converter with NKRO
Post by: timofonic on Sat, 10 September 2011, 06:31:35
Quote from: Soarer;413351
The battery comment wasn't a joke!

Those things work great as controllers for contact switch keyboards - they can go to sleep between keypresses and save a lot of power. That trick doesn't work for capacitive switches at all. And for my converter, it's not feasible to cut power to the keyboard and put the Teensy into a low power state - it would at the least require extra circuitry. Even if it could, what would wake it up! So there's a constant power drain to the Teensy and keyboard, which is many times what the bluetooth module uses even when it's awake.

Well, the oriiginal battery fromm. The bluetooth keyboard was 1xx mah and lastedd a week, so the 850mah one could last at least a month.

Just imagine the possibilities, it could be the ultimate geekhack tool.

Enviado desde mi STM7UW usando Tapatalk
Title: XT/AT/PS2/Terminal to USB Converter with NKRO
Post by: Soarer on Sat, 10 September 2011, 09:51:22
Quote from: Soarer;413737
Finally installed Windows 7 SP1 64 bit, so I'll try and reproduce that problem tomorrow.


Unable to reproduce :-/

BIOS Power Settings at defaults (S3).
Fresh Window 7 install.
Went into Sleep OK.
Woke up from Sleep by Model M plugged into my converter...
...which still worked fine afterwards.

Not sure what else I can try.

Is anyone else having problems using Win7 Sleep and waking it up with my converter? Or finding it works OK?
Feedback either way please :-)
Title: XT/AT/PS2/Terminal to USB Converter with NKRO
Post by: Hak Foo on Sat, 10 September 2011, 10:35:11
It seems to be alonbg the lines of

suspend
wake via converted board
power down
converted board may be dead
Title: XT/AT/PS2/Terminal to USB Converter with NKRO
Post by: Soarer on Sat, 10 September 2011, 10:39:03
power down?
Title: XT/AT/PS2/Terminal to USB Converter with NKRO
Post by: Hak Foo on Sun, 11 September 2011, 13:43:11
start-> shut down?
Title: XT/AT/PS2/Terminal to USB Converter with NKRO
Post by: Soarer on Sun, 11 September 2011, 14:22:28
Quote from: Hak Foo;414495
start-> shut down?

I dunno, you said it! :-p

I'm confused as to how power down is part of a problem with suspend and wake-up!

This was the original problem description I was responding to...

Quote from: REVENGE;372784
Yep, I had my BlackWidow and the Model F both connected. First off, the Teensy stays on even while the computer is suspended, the lock LEDs stay lit. Secondly, if I resume using the Model F, it will not function once the computer boots up. At this point, without resetting the Teensy, if I put the computer back to sleep and use another USB device to wake it up, the Model F will function normally again. Finally, I can always unplug and replug the Teensy to get the keyboard working again.
Title: XT/AT/PS2/Terminal to USB Converter with NKRO
Post by: fohat.digs on Tue, 27 September 2011, 16:38:23
OK guys, I am totally stoked.

I received an IBM Model F 122-key terminal keyboard from ebay today, and it is INCREDIBLE !

To call it an awesome behemoth is an understatement, this thing is the Mother Ship.

It was filthy, inside and out, so I completely dismantled it and cleaned everything. Even that was easy, I have dismantled both XT and AT Model Fs (no fun at all with the spacebar thing .... ) and this was smooth and simple in comparison. Bigger is certainly better, and if Ripster's theory about weight=good then this has got to be the best keyboard ever made.

So now it is immaculate, but I have to wait until my Teensy gets here (and I got the plain base model, it did not look like there was any advantage to the ++ model), and I want to go all-internal.

I will surely need to ask you gurus some questions, but it looks like my quest for the ultimate keyboard may be nearing its conclusion.

Thank you all so much for guiding me along.

Later, Harry

PS - I will scavenge keycaps from multiple keyboards to suit my final mapping scenario, but do any of you guys have an "Enter" key, which I presume is UK/Euro style, for sale or trade? thanks
Title: XT/AT/PS2/Terminal to USB Converter with NKRO
Post by: theferenc on Wed, 28 September 2011, 20:59:46
Harry, did you snag yours from OceanTechPrecision on ebay? Does it have dip switches on the bottom? Also, it comes with the Euro style tall enter key. Do you want the wide ANSI style one, instead?

I have 2 (from 2 different sellers) that have no switches, and for whatever reason, this adapter behaves...strangely. I disassembled, swapped some keys around to make it ANSI/UNIX, and reassembled one of them. When I connected this adapted (using a teensy++), I just get endless repeats of a key until I press another key, which then endlessly repeats, etc.

I thought maybe I screwed up, so I connected my other 122 key F, that hadn't even been cleaned yet, and it behaved exactly the same way.

What's weird, is that neither of these have the dip switches. One of which from 4 Aug 1984, the other some April 85, I think (it's not here at the moment). Inside, on the controller, are exposed pins next to where the cable plugs in, and on the PCB itself it says KBD ID A over one set, and KBD ID B over the others. Do I need to jumper these somehow, to replicate having the dip switches all up or all down?

Anyway else getting weirdness at all?
Title: XT/AT/PS2/Terminal to USB Converter with NKRO
Post by: kishy on Wed, 28 September 2011, 21:23:48
It can misbehave quite severely if you attempt to press any keys BEFORE the auto-detect-what-type-of-keyboard-is-connected process has finished...that can take upwards of 5 seconds in an extreme case. Plug in, ensure OS recognizes the device (makes its little noise if applicable), count to 5 slowly, then try.

Took some getting used to since I normally just hammer on caps lock when I plug in a keyboard so I can see when the system has begun recognizing it, but if you press any keys before the auto-detect process Soarer's code does is complete, it screws it up and will either play dead or simply misbehave. I haven't seen that exact symptom myself, theferenc, but it wouldn't surprise me if it's related.
Title: XT/AT/PS2/Terminal to USB Converter with NKRO
Post by: Soarer on Wed, 28 September 2011, 21:32:37
Sounds like the adapter is somehow thinking it's a scan code set 2 board, so not trying (or not being able) to tell it to send release codes.

One way it decides is by the keyboard ID, so perhaps changing that will make it work. Those pins will do that the same as the DIP switches on other models. Are there any jumpers on them at the moment?

To be sure what going on, can you run the hid_listen (http://www.pjrc.com/teensy/hid_listen.html) program to capture the auto-detect sequence?

For a normal 101 key board, it should read wEE rEE wF2 rFA rAB r83. For a terminal board, there should be a few more bytes and a different ID (the rAB r83 part).

edit: And yes, don't be as impatient as kishy, bashing keys just after it's plugged in!!
Title: XT/AT/PS2/Terminal to USB Converter with NKRO
Post by: fohat.digs on Wed, 28 September 2011, 21:59:08
Thanks, but I am not there yet. It will be sometime next week before my Teensy gets here, so all I can do is look at the inert mechanism wistfully.

These comments may well save me some time and heartache when I put it together, so I am very interested.

Yes, I did get the board from Ocean Tech, and it was made June 13, 1985. There are no DIP switches, I am pretty sure, although I will look again very closely.

The key that should be the "Enter" key says "Field Exit" and the actual "Enter" is at the bottom right where Control is normally found. I am hoping to change this to a layout that is something as close to a standard Model M as possible, with an extra set of function keys on the left, old style.

I really hope this will work.
Title: XT/AT/PS2/Terminal to USB Converter with NKRO
Post by: theferenc on Wed, 28 September 2011, 22:08:05
Thanks, kishy. I'll give that a try and see if it fixes the issue. I would really love to make these beasts function, as they are just so nice. And I could finally decide if I prefer the M or the F.
Title: XT/AT/PS2/Terminal to USB Converter with NKRO
Post by: Hak Foo on Wed, 28 September 2011, 22:12:21
The Enter labelling is just for decoration- the converter ighnores it.  I have a 122M with a Field Exit enter key.  And the numpad Enter is Field +.
Title: XT/AT/PS2/Terminal to USB Converter with NKRO
Post by: theferenc on Thu, 29 September 2011, 09:01:03
Running hid_listen, I get the following:

rAA rBF rBF
wEE R101wF2 rEE wED R100!!00wED rFE !!FEwED R100!!00rFE

I waited for that to appear, then typed all of the above, and then I tried the keyboard. I got

asdfllll;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;dddddddddddddddddddddddddddddddddddddddddd

The funny thing is, according to hid_listen, it looks as if it should be doing better than it is. For each key I press, I get the down code of that key. But no up code, for whatever reason.
Title: XT/AT/PS2/Terminal to USB Converter with NKRO
Post by: Soarer on Thu, 29 September 2011, 09:58:19
It looks like it's just unusually slow to reply to commands - like world record holder slow! Otherwise, it seems to be reading and writing bytes just fine, and its ID is BFBF, which is typical and won't cause any confusion. PM on its way.
Title: XT/AT/PS2/Terminal to USB Converter with NKRO
Post by: theferenc on Thu, 29 September 2011, 12:51:41
Soarer is the man! Hopefully it continues to work as well as it does right now -- though I may have some spring/hammer issues to work out.

Thanks a ton!
Title: XT/AT/PS2/Terminal to USB Converter with NKRO
Post by: Oqsy on Thu, 29 September 2011, 18:28:24
Great news!
Title: XT/AT/PS2/Terminal to USB Converter with NKRO
Post by: theferenc on Thu, 29 September 2011, 19:17:53
So one last question about this. The key on the keypad, directly above 9. What is its default mapping in the converter? Does anyone know?

When I try to get its keycode in X, xev just pukes out

Code: [Select]
FocusOut event, serial 8008, synthetic NO, window 0x3800001,
    mode NotifyGrab, detail NotifyAncestor                  

FocusIn event, serial 8008, synthetic NO, window 0x3800001,
    mode NotifyUngrab, detail NotifyAncestor              

KeymapNotify event, serial 8008, synthetic NO, window 0x0,
    keys:  0   0   0   0   0   0   0   0   0   0   0   0   0   0   0   0  
           0   0   0   0   0   0   0   0   0   0   0   0   0   0   0   0

showkey gives me keycode 70. But terminal keycodes don't map to X keycodes, unfortunately, so I can't make use of that. At least I know the kernel recognizes it just fine.

Any help is appreciated!

On a happier note, the kernel recognizes every single one of the 122 key on this beast. That's after I converted it to my beloved UNIX layout, meaning I'm using pads that aren't used in the default layout, and not using pads that are. So kudos for that!
Title: XT/AT/PS2/Terminal to USB Converter with NKRO
Post by: Soarer on Thu, 29 September 2011, 19:43:01
It's scroll lock... what does that do in X?
Title: XT/AT/PS2/Terminal to USB Converter with NKRO
Post by: N8N on Thu, 29 September 2011, 21:08:19
nothing at all, really... but I just tried it on my machine and scroll lock comes up as keycode 78 (Model M through Belkin converter, just fired up xev and hit the scroll lock key, if that makes any difference)

KeyPress event, serial 33, synthetic NO, window 0x5200001,
    root 0xa1, subw 0x0, time 4878851, (319,159), root:(337,290),
    state 0x10, keycode 78 (keysym 0xff14, Scroll_Lock), same_screen YES,
    XLookupString gives 0 bytes:
    XmbLookupString gives 0 bytes:
    XFilterEvent returns: False

KeyRelease event, serial 33, synthetic NO, window 0x5200001,
    root 0xa1, subw 0x0, time 4879011, (319,159), root:(337,290),
    state 0x10, keycode 78 (keysym 0xff14, Scroll_Lock), same_screen YES,
    XLookupString gives 0 bytes:
    XFilterEvent returns: False
Title: XT/AT/PS2/Terminal to USB Converter with NKRO
Post by: theferenc on Thu, 29 September 2011, 21:25:30
Yeah, I thought it should be scroll lock, but it doesn't match scroll lock on my other keyboard, at all. At least, it doesn't generate the same xev codes.

I'll try remapping it anyway, to be something more appropriate for me (*, in this case). I can find it in my xmodmap and just go ahead and change it. I have every other key in there already mapped appropriately.

Thanks!
Title: XT/AT/PS2/Terminal to USB Converter with NKRO
Post by: Soarer on Fri, 30 September 2011, 18:41:42
Just posted a new version (v0.996) with fixes for some reported problems, and a couple of alternative remappings for terminal keyboards.

The alternative mappings are enabled by setting the keyboard ID (http://geekhack.org/showwiki.php?title=Island:17458&redirect=no#Keyboard+IDs) to one of the following:

9FBF
key in centre of cursors -> cursor down
right alt -> left gui
europe 2 -> left gui
F13 -> play / pause
F14 -> prev track
F15 -> next track
F16 -> volume up
F17 -> volume down

AFBF
LF1 -> Escape
LF2 -> Pause
LF3 -> NumLock
LF4 -> ScrollLock
Keys around numpad, clockwise from top-left -> NumLock, Slash, Asterix, Minus, Plus, Equals

(LFx are the function keys on the left hand side).

I've also been tidying up the main article over the past couple of days, it was overdue :-)
Title: XT/AT/PS2/Terminal to USB Converter with NKRO
Post by: theferenc on Fri, 30 September 2011, 19:54:35
That second one is almost exactly how I have mine laid out at the moment. Too bad I don't have dip switches to set the ID with.

But that's what xmodmap is for, right?

And by the way, I was able to fix that mapping. I still couldn't get it to be recognized as scroll lock, but I remapped what SHOULD have been scroll lock, and now it's working fine. I have no idea. Probably something weird with how our particular RHEL setup is configured.
Title: XT/AT/PS2/Terminal to USB Converter with NKRO
Post by: Soarer on Fri, 30 September 2011, 20:09:11
Ah, but instead you have the jumper block inside! I've chosen the IDs so they only require one jumper to be fitted. But if it's not exactly what you want, it's better to use the default map anyway because it has unique codes for each key :-)

Glad you could sort out the scroll lock somehow - that was odd!
Title: XT/AT/PS2/Terminal to USB Converter with NKRO
Post by: SmallFry on Fri, 30 September 2011, 23:36:28
Just a thought... not really necessary but it'd be cool to add support for the SD reader. (http://"http://pjrc.com/teensy/sd_adaptor.html) Then, instead of plugging in my flash drive, I could buy myself an SD card to use for my flash drive. Would that be possible? Also, I think there's a way to make AHK run portably, then we (with odd layouts/122s<---me) could add custom keymaps directly to the SD card as a AHK script. Just for convenience sake:)
Thanks for any input Soarer
Title: XT/AT/PS2/Terminal to USB Converter with NKRO
Post by: theferenc on Sat, 01 October 2011, 00:01:00
AHK runs portably, for certain sure. It's just a download directly from their website.

I gotta tell you though, these beasts are NOT portable. I leave mine connected to the same linux workstation all day, every day. It's just too damn big and heavy to move around much. In that regard, I would say just run it on the machine you're connected to, rather than the SD card in your keyboard.

Though, just from a novelty perspective, that would really amuse me.
Title: XT/AT/PS2/Terminal to USB Converter with NKRO
Post by: SmallFry on Sat, 01 October 2011, 00:11:23
My school would have a hacker alert stroke if I wired in like at home. Therefore, I would need to move my board with me as well as keep my "hacker" stuff hidden. Heh.
Title: XT/AT/PS2/Terminal to USB Converter with NKRO
Post by: Oqsy on Sat, 01 October 2011, 01:12:57
The perfboard and alligator clip rig I'm using for this would surely get a bomb squad called on me if I tried to use it at a uni or library.
Title: XT/AT/PS2/Terminal to USB Converter with NKRO
Post by: kishy on Mon, 03 October 2011, 21:49:06
Here's what I've been working on for the last little while... (http://kishy.dyndns.org/kbconverters/soarer/)

Complete with externally-accessible reset button and lock LEDs, built-to-order for a fellow Geekhacker.

At this time I am not taking further orders for my assembly service, but it's something I'm considering since I did get Soarer's blessing for it.

[ATTACH=CONFIG]27864[/ATTACH]
Title: XT/AT/PS2/Terminal to USB Converter with NKRO
Post by: timofonic on Tue, 04 October 2011, 03:28:40
Quote from: kishy;425809
Here's what I've been working on for the last little while... (http://kishy.dyndns.org/kbconverters/soarer/)

Complete with externally-accessible reset button and lock LEDs, built-to-order for a fellow Geekhacker.

At this time I am not taking further orders for my assembly service, but it's something I'm considering since I did get Soarer's blessing for it.

(Attachment) 27864[/ATTACH]

 
Hello.

Very nice! I would consider ordering one too...

What about adding a SD card interface? Would be possible to use it both for configuration files (mapping, macros, etc) and an optional LCD for showing the current keymap (plus two buttons for switching)?
Title: XT/AT/PS2/Terminal to USB Converter with NKRO
Post by: kishy on Tue, 04 October 2011, 06:44:09
Quote from: timofonic;425879
Hello.

Very nice! I would consider ordering one too...

What about adding a SD card interface? Would be possible to use it both for configuration files (mapping, macros, etc) and an optional LCD for showing the current keymap (plus two buttons for switching)?

What I did is essentially just 'packaging' the adapter...I did not make any design changes, so to speak. I would not know how to implement that, but I suspect it can be done with some amount of work...would be best to wait for Soarer to weigh in on that to see if it might ever happen. I do agree it would be nice, but I believe he's working on other ways to simplify end-user keymapping as it is.
Title: XT/AT/PS2/Terminal to USB Converter with NKRO
Post by: alaricljs on Tue, 04 October 2011, 08:19:56
7 pins for the LCD... 2 pins for up/down buttons... 5 pins for the SD card slot... 2 pins for the keyboard...

At first look there are no collisions between the pins necessary.  It would be minimum features on the LCD tho, no contrast changing, but functional.  It's then a question of whether the teensy has enough space for programming all the devices.  I also know nothing of multiple end-point USB in order to support the SD and KB interface at the same time.  You could do a boot-loader deal where you hold down one/both of the LCD control buttons on startup and it makes SD the end-point for USB...
Title: XT/AT/PS2/Terminal to USB Converter with NKRO
Post by: one_each on Tue, 04 October 2011, 11:08:05
@Soarer  Have you considered using something like code.google.com to host the code as it is in development?  You can limit it to just you making commits but others could help out and send you patches for fixes.  You can even track things you want to change and others may step up to do the actual work.
Title: XT/AT/PS2/Terminal to USB Converter with NKRO
Post by: timofonic on Tue, 04 October 2011, 12:34:39
@Soarer

In terms of available pinout, memory and such...

How's the Teensy2 or Tenensy2++ used? I mean if you and others can add features to your project in the future, the possibilities of free resources from it.
Title: XT/AT/PS2/Terminal to USB Converter with NKRO
Post by: alaricljs on Tue, 04 October 2011, 12:58:49
I'm not exactly sure what it is you're asking timo, but if you scroll to the top of the page and click 'Article' you can read the wiki on this project if you haven't already.

The converter only uses 2 data pins on the teensy.  There are an additional 3 pins for lock LEDs (caps/num/scroll)  It's really whether the particular features requested can be integrated without conflicting with each other, and whether those features inhibit the proper behavior of the converter for the primary purpose.  The pins for the converter itself can easily be reassigned, since none of the assigned pins are being used for their alternate or special features.

As mentioned in the info on pjrc for the LCD display I looked at, there are 2 methods of interfacing to it, one requiring more 'horsepower' from the teensy the other requiring an additional pin.  Considering that pins appear to be in abundance I pointed out the 7 pin, less CPU option.  It doesn't look like the LCD uses any special functions pins.

The SD card interface uses special functions of specific pins to function, so those are hard assigned.  

Then there is the programming of these features.  If the teensy does not have sufficient ROM space, then the teensy++ does have more space and as an added bonus it has more IO pins.

All in all it looks like it could be done.  Whether or not those features can coexist at the same time without resetting the teensy is not one I'm familiar with.  Having the teensy present itself as both a HID device for the KB and as a mass storage device for the SD card at the same time is not something I've dealt with.
Title: XT/AT/PS2/Terminal to USB Converter with NKRO
Post by: fohat.digs on Tue, 04 October 2011, 15:01:50
Help !

Getting very close, I think, but I am way over my head here, and I am not a programmer by any means.

I received my Teensy, wired it up, flashed it, and followed the instructions that I could find. I downloaded and used the manufacturer's files and instructions. I have downloaded Soarer's USB v0.996 file but perhaps I did not use it correctly.

Windows XP told me that the new USB Human Interface Device was found and was ready to use. Most everything seems to be OK, but the keyboard does not register anything realistic.

When I press any key, the LED on the Teensy comes on for about 2 seconds, then goes off. Running hid_listen.exe registers R05 when I press any key, and I understand that this is a clock error, but I don't really know what that implies.

There are vague mentions of jumpers being set. I have a 122-key Model F terminal keyboard and the Teensy 2.0 (not plus plus). I have only plugged in 4 wires, I cut off the original cable and connected black to VCC, white to Ground, yellow to PD0, and red to PD1, (the cable was shielded but the shield is not connected to anything, should I?) and plugged in to the controller the same way it was originally.

So what do I do now? And if you can, in plain English, and please assume that I am really stupid and incompetent.
Title: XT/AT/PS2/Terminal to USB Converter with NKRO
Post by: Oqsy on Tue, 04 October 2011, 16:14:22
Have you checked yr pinout from the keyboard?  I have no idea what colors mean what in these terminal boards, so others might be of some help. Most of us use the connector on the cable as-is and put a jack/outlet for the DIN between the keyboard and the teensy. The pinouts are known and don't vary like the colors of leads.
Title: XT/AT/PS2/Terminal to USB Converter with NKRO
Post by: Soarer on Tue, 04 October 2011, 16:19:20
Quote from: kishy;425809
Here's what I've been working on for the last little while... (http://kishy.dyndns.org/kbconverters/soarer/)
Thanks for showing your build!
 
Quote from: timofonic;425879
What about adding a SD card interface? Would be possible to use it both for configuration files (mapping, macros, etc) and an optional LCD for showing the current keymap (plus two buttons for switching)?
SD card is almost definitely a 'no'. There's no shortage of space (in EEPROM) on a Teensy++ for those things, and even the regular Teensy has a reasonable amount (that would be enough for most people). And also, it would be a lot of work to make the card appear as a drive over USB.

I don't know how selecting keymaps on-the-fly will be done yet, but it will be a goal to do it with as little hardware as possible!
 
Quote from: one_each;425957
@Soarer  Have you considered using something like code.google.com to host the code as it is in development?  You can limit it to just you making commits but others could help out and send you patches for fixes.  You can even track things you want to change and others may step up to do the actual work.
Yes... I think I would use github, when and if I release the source.

Quote from: timofonic;425988
In terms of available pinout, memory and such...

How's the Teensy2 or Tenensy2++ used? I mean if you and others can add features to your project in the future, the possibilities of free resources from it.

It's using about 33% of the ROM and most of the RAM (or will be) on a Teensy.

Quote from: alaricljs;425994
All in all it looks like it could be done.  Whether or not those features can coexist at the same time without resetting the teensy is not one I'm familiar with.  Having the teensy present itself as both a HID device for the KB and as a mass storage device for the SD card at the same time is not something I've dealt with.
I've no idea... I already have uses for 4 of the endpoints available, plus the control endpoint, so there might be one left! One thing I've spent a fair bit of time on is stopping the USB code from getting in the way of receiving input from the keyboard - looking after more peripherals would surely exacerbate that problem :-)
Title: XT/AT/PS2/Terminal to USB Converter with NKRO
Post by: Soarer on Tue, 04 October 2011, 16:23:46
Quote from: harrymoss;426052
So what do I do now?


[strike]Have you tried swapping the yellow and red wires?[/strike] Hang on, not sure that's right at all.
Title: XT/AT/PS2/Terminal to USB Converter with NKRO
Post by: fohat.digs on Tue, 04 October 2011, 16:47:58
Thanks for the reply. I think/hope I did something kind of like what you described. My situation looks to be the same as Sleuth in #85.

The original cable has a berg-like connector at the keyboard and a DIN-like plug at the computer. I cut it off with the intention of re-using the original connector and a few inches of wires to the Teensy, and discarding the bulk of original long coiled cord and plug.

I hope I didn't screw up.

How can I tell what is connected to what in the original?

Looking at the connector on the controller, what I am calling a berg-like connector from the cable has 6 connections - 2 rows and 3 columns connected at the outer end of the bank of pins on the controller. Obviously, I do not know the proper names of these technical components!

From outside-in, the top row has 1. black, 2. (no pin or wire), 3. (pin but no wire)

The bottom row has 1. red, 2. white, 3. yellow.

I have connected them to the Teensy (in the above order) at VCC, PD1, GND, and PD0 based on what Sleuth #85 showed which seemed to be exactly what I have.

And I have not connected the shield to anything, and not made any jumper connections.

Please excuse my ignorance, I am not a programmer or an electrician, I just love the feel of capacitive keyswitches and want this keyboard to work.

You guys are great to put up with silly people like me.

If I am able to give back in some way, I will try to do it.

[ATTACH=CONFIG]27904[/ATTACH]
Title: XT/AT/PS2/Terminal to USB Converter with NKRO
Post by: Soarer on Tue, 04 October 2011, 16:51:30
Found a label inside my 122F so decided to just photograph it :-)

[ATTACH=CONFIG]27906[/ATTACH]
Title: XT/AT/PS2/Terminal to USB Converter with NKRO
Post by: fohat.digs on Tue, 04 October 2011, 16:54:12
Thank you so much. I think that is exactly how I connected mine.

Is there anything else, such as connecting the shield to the chassis of the backplate, or jumpering anything?
Title: XT/AT/PS2/Terminal to USB Converter with NKRO
Post by: Soarer on Tue, 04 October 2011, 16:59:43
Is it? Yellow/Clock should go to PD1, and Red/Data should go to PD0.
Title: XT/AT/PS2/Terminal to USB Converter with NKRO
Post by: fohat.digs on Tue, 04 October 2011, 17:25:43
RIGHT YOU ARE !

Stupid me with that whole upside-down-and-backwards thing! (And my reading glasses barely do it anyway.)

Now it is registering, so I have a whole new realm to go through.

Thank you so much! You truly are da man.
Title: XT/AT/PS2/Terminal to USB Converter with NKRO
Post by: Soarer on Tue, 04 October 2011, 18:38:23
Excellent! Glad to hear it's working :-)
Title: XT/AT/PS2/Terminal to USB Converter with NKRO
Post by: fohat.digs on Tue, 04 October 2011, 19:07:36
Sorry for the double post, but,

Soarer - WOW! Man, thank you!

for doing the majority of my re-mapping for me!

I was assuming that I would have to go key-by-key, but you have re-created much of what I wanted without me even asking! Incredible! Thank You!

My goal is to make this as much like the "classic" Model M as possible, with as many of the "deviations" as close to the classic Model F as possible. To that end:

Naturally, I still want to change stuff. I want to make the left bank of keys F1-F10, redundant, of course, and make the number pad exactly like a Model M except trading NumLock (pointless now, with dedicated keys for all the non-numlock stuff) for "Escape" a la the IBM AT layout, and getting  the "+", "/", "-", and "*" right.

That pretty much leaves the top row for me to play with, with "Escape" at the top left (my single biggest frustration, along with arrow keys, since I do not want to saw out or fill the case .... ). I know that drilling small holes for LEDs is easy, but, I don't really care.

But - Wow, Man, Wow.

Thank you so very much. Really.
Title: XT/AT/PS2/Terminal to USB Converter with NKRO
Post by: theferenc on Tue, 04 October 2011, 21:26:44
Yeah, I briefly considered wiring up the lock LEDs. Then I realized, wait a sec, I don't care about those in the slightest.

The way I have mine mapped is HHKB like on the main block, the navigation block is standard, and the numpad goes ESC (redundant) =, *, /, +, -, Enter (clockwise from top left). The left block has all of the lock keys (top 4 are num_lock, scroll_lock, caps_lock, and print_screen), pause, and then the other 5 keys are mapped to macros. I put "Cmd" keys on those, 1-5. I'm thinking about changing it though, so that the left column are the lock keys, and the right column are the command keys, but I haven't settled on that yet.
Title: XT/AT/PS2/Terminal to USB Converter with NKRO
Post by: fohat.digs on Wed, 05 October 2011, 13:23:34
Now this beauty is together and working great. I could not be more pleased - it is fantastic - although the wife and kids are not going to like the additional racket!

The problems I encountered earlier were all due to careless wiring, etc. I have not made "permanent" connections yet, but I know that it works.

Not being a programmer, at all, I would love to know an easy way to remap some of these keys. Since this is such an odd and ancient setup, I am a little afraid to mess with anything, for fear of breaking it!

Do I dare run a program that I find and download, or will that mess up Soarer's lovely work?

I went back through this thread, thinking that I had seen mention of a program to do it, but couldn't see it.

Thanks again, everybody!
Title: XT/AT/PS2/Terminal to USB Converter with NKRO
Post by: theferenc on Wed, 05 October 2011, 16:21:19
If you're running windows, AHK is a decent option, as is KeyTweak. The former is an active, user level remapping solution, and so doesn't work at login. The latter is a system level option, as it stores it in the registry.

If you're running linux, I can help you out with an xmodmap file that you can use, though it might not map directly on your system. It didn't even map directly between RHEL 5 and RHEL 6, for whatever reason.
Title: XT/AT/PS2/Terminal to USB Converter with NKRO
Post by: fohat.digs on Wed, 05 October 2011, 16:31:51
I usually work in Windows, but I dual-boot to Ubuntu fairly often. I would use it a lot more if certain things didn't pull me back to Windows, but I am no programmer.

I barely scratch the surface, and don't really know what I am doing without step-by-step instructions, although I am - sometimes - pretty good at figuring things out in my own way.

Since I don't really understand the minutiae of where and how the signal gets intercepted and re-routed, I am fearful of screwing it up. If I use either of the programs that you mentioned above, could it interfere or disrupt what Soarer wrote? His work is beautiful and I want most of it to stay intact.
Title: XT/AT/PS2/Terminal to USB Converter with NKRO
Post by: Soarer on Wed, 05 October 2011, 16:40:21
Quote from: harrymoss;426427
I went back through this thread, thinking that I had seen mention of a program to do it, but couldn't see it.

There was a hack somewhere, which should work, but some remappings done that way might not work because of the way I do remapping after the translation from native scan code set to USB HID codes.

If you set your keyboard ID to AFBF, that might be closer to what you want, leaving just a small number of keys for AutoHotkey (or whatever) to take care of.

To set that ID: if you have DIP switches, just set them all to 'open' (or 'off') except for number 2. Or if you have a jumper block, only fit one, to the second position in (not sure from which end!).
Title: XT/AT/PS2/Terminal to USB Converter with NKRO
Post by: theferenc on Wed, 05 October 2011, 17:30:41
I use KeyTweak and xmodmap both, without issues whatsoever. I prefer these over the AHK setup, simply due to using synergy. AHK and synergy are completely ignorant of one another, so it just fundamentally doesn't work how I need it to.

But xmodmap and keytweak both operate on the computer itself, interpreting and modifying the signal AFTER it arrives from the adapter. So no worries at all.
Title: XT/AT/PS2/Terminal to USB Converter with NKRO
Post by: fohat.digs on Wed, 05 October 2011, 18:59:14
You guys are simply the greatest!

But I am a pest. Hopefully, when you answer my questions, some other poor neophyte will find the answers and not bother you again. Or not, but how to know? I actually comb through threads before posting questions, at least a bit, out of respect for your time.

theferenc, I used KeyTweak and it works great. I was able to do just what I wanted, with 2 exceptions. 1 of them, the upper right button on the Number Pad, is permanently set to "Pause" as I understand it, so I can accept that (although I wanted to get as close to "standard" 101 Model M as possible and make it a "minus").

But when I tried to remap the second from the left key at the top of the Number Pad, NumLock I suppose it was originally, to be "/" (slash/divide Model M style) and it stubbornly stays set on "-" for whatever reason.

My reason for needing this is that while I use the number pad fairly often, and rely on it for numbers, I seldom actually use things like minus there. But what I do use it for, very often, is entering dates, usually in the 08/25/2011 format. I would prefer to not have to move off the number pad to get the "/'" symbol.

Is there some reason that the minus symbol is locked to that key, or am I doing something wrong?

Thanking you in advance, Padawan Harry
Title: XT/AT/PS2/Terminal to USB Converter with NKRO
Post by: theferenc on Wed, 05 October 2011, 19:31:24
That's weird, I was able to remap them just fine. Did you use "teach mode" in keytweak, or select from the list?

As I mentioned above, I have the numpad mapped as ESC (redundant) =, *, /, +, -, Enter (clockwise from top left), as that's how my 1397000 maps them (ish), and I found that I really liked it.
Title: XT/AT/PS2/Terminal to USB Converter with NKRO
Post by: fohat.digs on Wed, 05 October 2011, 20:03:43
No luck with that.

I went through the routines in both "Half Teach Mode" and "Full Teach Mode" and neither took. It is just those 2 keys, all the rest worked properly.

I am looking for [ Esc, /, *, -, +, Enter ] - just like the Model M except for Escape replacing NumLock.

My situation is that I use 2 desktops and a laptop myself, and help/manage/maintain half a dozen others for co-workers and family. So it is disorienting, to say the least, to put my hands on multiple keyboard layouts every day. The closer I can stay to the "standard" layout, the easier it is on my poor brain and fingers.

Obviously, this behemoth keyboard is hooked up to "MY" computer, a massive full tower with more drives than I can count on one hand and all its slots full, so I want it to be "just right" but also I want to stay as consistent as I can with the "real world" I interact with.

This is truly minor. I am so deliriously happy with this exquisite keyboard that I will accept these trivial complaints.

But if you do have something else for me to try, I will do it.

Thanks again.
Title: XT/AT/PS2/Terminal to USB Converter with NKRO
Post by: Soarer on Wed, 05 October 2011, 21:02:30
I reckon KeyTweak has got confused trying to remap Pause... try reverting both NumLock and Pause, and then setting NumLock to '/'.

If that doesn't work, Clear All might do it. If even that doesn't work, it's time for a rummage in the registry!

For remapping the top-right key (Pause), you'd need to set the keyboard ID to AFBF to get the alternate layout (http://geekhack.org/showwiki.php?title=Island:17458&p=424335&viewfull=1#post424335).
Title: XT/AT/PS2/Terminal to USB Converter with NKRO
Post by: fohat.digs on Fri, 07 October 2011, 08:44:10
Boy-oh-boy! a missed day of geekhack down had me worried!

Thanks for all your help, guys, I am getting much closer.

Soarer, I used a jumper to set my board to AFBF (I think) by a little trial and error. Below is a photo of the connector, and a drawing of the markings that I had to use a magnifying glass to see.


[ATTACH=CONFIG]27976[/ATTACH]


[ATTACH=CONFIG]27977[/ATTACH]


The first 3 pairs of pins, from the left, are where the cable connects. You suggested jumpering the second position, and these are numbered starting with "2" so I jumpered "3" in the KBID "A" bank. This appeared to work properly and gave me the configuration you described in your previous post. I am pleased to get /, *, -, + around the numpad just like I want.

But, like before, some of the other changes would not "take" and I have tried multiple times.

Most important, I want the top left numpad (NumLock in your scenario) to be another "Escape" but it stubbornly becomes F2, and stays that way.

On the left bank, which I want to be an additional bank of F1-F10, F2 insists on being "Pause" and F3 insists on being F2.

I am using KeyTweak per theferenc suggestion, and it worked perfectly for everything else.

Now it must be time to delve into the registry, which I have done in the past, but only timidly, and based on step-by-step instructions. I have a set of scan codes and would be willing to do this.

Is there a set of clear and simple-minded instructions for doing this that I can find somewhere to guide me?

Otherwise this project has been great and I am delighted with the results. These minor problems are ones that I can easily live with, if I have to.

PS - now I read that people have done bolt-mods to these big F-122 boards to solidify them. Where is there room for the bolts? As I remember, once you insert the barrels, they are pretty much shoulder-to-shoulder throughout the main area, certainly everywhere the letters are.
Title: XT/AT/PS2/Terminal to USB Converter with NKRO
Post by: Soarer on Fri, 07 October 2011, 09:42:25
Sorry, but you won't be able to remap some of the keys in that left hand F-key block, with the AFBF layout. (In fact, I'm not even sure if KeyTweak can remap the Windows key, which is on left F9 or something in all the layouts).

As a side note, the AFBF is primarily intended for the 104-key terminal 'unsaver' keyboards. The rejigging of the numpad was an afterthought. That's left it with two keys for num-lock - remapping one will also remap the other.

For a full clear out of anything Keytweak might've done to the registry, run regedit and navigate to 'HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Control\Keyboard Layout', then delete the 'Scancode Map' key. Also, check that 'HKEY_CURRENT_USER\Keyboard Layout' doesn't have a 'Scancode Map' key.

Then you can reboot and go back into KeyTweak to try again - but don't try remapping the pause key!!
Title: XT/AT/PS2/Terminal to USB Converter with NKRO
Post by: fohat.digs on Sat, 08 October 2011, 21:40:19
Hi, it's me, harrymoss, I just felt like I needed to change my ID to something less mundane than my actual name.

Still a pesky question-asker, of course.

So this thing is working well, but these 3 keys continue to bother me. Of all the keys to be out of whack, "Escape" and "F2" (edit cell, etc) are two of my favorite "go to" keys that I use pretty often.

I guess I am trying/hoping to misunderstand Soarer telling me that I cannot fix the fact that the top left of the numpad, once NumLock, now F2, cannot be my second Escape.

And that the top right of the left function keys is permanently stuck as "Pause" instead of F2.

I really like having those important keys in the main body of keys without having to reach up for them.

Maybe I will get another shot, I got a couple of ugly trashed Model F-122s from rawko (5 minutes from my office) that I think may build into a good chassis or maybe even two, without the top half of the case. More trial and error, I will move my Teensy around and see if I can get closer to the layout that I want.

ps - none of them have the DIP switches, are those rare?

thanks again, Harry
Title: XT/AT/PS2/Terminal to USB Converter with NKRO
Post by: Soarer on Sun, 09 October 2011, 04:23:24
As it stands, I'm afraid you'll have to accept that you can't get all of the layout that you want. Pause being the main key that gets in the way. You can either:
1) start with the default layout, and accept that Pause will be Pause on the numpad, or
2) start with the AFBF layout, and accept that you can't have F1-F10 on the left.

I'm positive that attempting to remap Pause is what's causing the problem with remapping NumLock.

I've just started work on the user remapping stuff, but it will take at least a few weeks before even a basic version is available.
Title: XT/AT/PS2/Terminal to USB Converter with NKRO
Post by: theferenc on Thu, 13 October 2011, 09:35:23
That's really weird, honestly. I remapped nearly everything in Linux with no issues whatsoever. But then, it's a different mapping system entirely, so that might be the difference.

Have you tried AHK to do it?
Title: XT/AT/PS2/Terminal to USB Converter with NKRO
Post by: fohat.digs on Fri, 14 October 2011, 16:22:50
So, my amateurish trial and error fumblings continue. I post this stuff, not in a narcissistic way, but to contribute to the greater knowledge, since I have found many answers I needed in ground previously plowed by others. If I should stop, tell me.

I have disassembled 2 Model F 122-key terminals today, 1 from 1984 and 1 from 1985. Below are pictures of the circuit board/metal backplate assemblies, which I do not wish to take apart. They are surprisingly different. The 1984 (August) model is the one that looks all green, as if there is a much thicker layer of fiberglass over the printed contacts. It was in much better condition, and the metal back plate is quite shiny.

The 1985 (January), which is much like the 1985 (June) that I re-habbed and have been discussing for the past month, has the coppery-looking contacts.

My question is which of these boards should I use for my next project? I like the idea of the stronger coating over the circuit, since I have seen a Model F board (an XT 83-key) in which the copper looked like it was more than half eroded (or otherwise erased) away.

The 1984 looks very clean and nice otherwise, and unless there is a compelling reason for the actuation to be harder, such as the electrons have to work harder to get through the extra thickness of fiberglass, then I will use this one.


[ATTACH=CONFIG]28633[/ATTACH]


[ATTACH=CONFIG]28634[/ATTACH]


I am an Industrial Designer, not an Electrical Engineer, so my intuition is not so deep in this realm. All else being equal, I will chose physical strength, but not at the expense of free flow of energy. Many of you must understand the subtleties and/or minutiae of this process better than I, but you know, miniscule differences matter to me.

Lastly, the rubber mats were in "bad" condition. I was spoiled because the June 1985 in my previous project had a very nice mat, not only was the rubbery surface quite nice, but the foam side was also mostly intact, shedding some 10%-20% but hanging together pretty well.

The mat of the 1985 was terrible, the foam was completely gone, transformed into a very ugly and hard-to-clean rubbery grit, and the thin remainder tore in more than a couple of places. It might possibly be almost "useable" but probably not.

The 1984 was considerably better, although still pathetic, in that the foam was pretty well gone, but the rubbery side was intact and workable. I can probably make it function properly, with some careful jiggling. I am careful and pretty good at making marginal situations viable.

Am I correct in assuming that it would be insanely optimistic of me to imagine that there is any way of getting replacement rubber mats, besides buying Model F 122-key keyboards and taking them apart to see what is inside? Please don't think I am smoking crack or living in La-La Land to even ask.

Probably Monday, I will re-assemble this thing and see what I can make happen. This has been a very difficult week for me (death in the family), and it would be nice if something worked out nicely.

So what was my question(s)? Is the green board better than the copper one, and how do I utilize/improve the rubber mats?

thanks a lot, folks
Title: XT/AT/PS2/Terminal to USB Converter with NKRO
Post by: LETE on Sat, 15 October 2011, 16:55:26
You don't need to worry about the thicker coating affecting performance. When the keyboard was designed they would have balanced the gain to account for the distance between the conductors, and capacitive sensors aren't especially sensitive to obstructions anyway. My iphone still works with 9 layers of painter's tape on it.

I'd like to figure out a solution to the decomposed mats as well. I'm sure you can't buy them ready made or anything, but there should be a way to make your own. It's worth looking into.
Title: XT/AT/PS2/Terminal to USB Converter with NKRO
Post by: fohat.digs on Sat, 15 October 2011, 21:42:20
It might not be all that hard to make one, provided that you had a hole punch of just the right size.

A fresh firm mat might even improve the feel, my daughter has foam art supplies that are probably a very good thickness for this, slightly deeper and firmer than the original.

Exactly what I need, another tedious time-consuming project!
Title: XT/AT/PS2/Terminal to USB Converter with NKRO
Post by: LETE on Sat, 15 October 2011, 22:11:28
Let's both give it a shot and compare notes. Of course, if we get a proof of concept laid out, it wouldn't be too hard to make a CAD file of the design and send it in to get laser cut for a group buy.
Title: XT/AT/PS2/Terminal to USB Converter with NKRO
Post by: fohat.digs on Mon, 17 October 2011, 08:54:12
May be getting far enough off-topic to warrant a new thread.

Since I am really fond of the Model F terminal, in spite of my mapping problems, and since I have an extra used board to experiment on, I am considering a bolt mod to tighten this thing up.

This will require drilling the circuit board and the metal, and I don't figure to use too many bolts. In fact, I can't put any where I really want them, scattered among the letter keys, since the barrels are in the way.

Please look at the diagram below, and let me know if this might be a good layout, and/or if the benefit is work wasting a couple of hours on, at all.

Thanks, Harry

[ATTACH=CONFIG]28821[/ATTACH]
Title: XT/AT/PS2/Terminal to USB Converter with NKRO
Post by: LETE on Mon, 17 October 2011, 14:25:01
Yeah, I made us a thread of our own (http://geekhack.org/showwiki.php?title=Island:23007&do=comments&page=1).
Title: XT/AT/PS2/Terminal to USB Converter with NKRO
Post by: fohat.digs on Wed, 19 October 2011, 15:49:20
Soarer -

I have put together a 2nd keyboard, and left all the jumpers open to default. It works great and I have all but 2 keys set the way I want them.

For whatever reasons, NumLock refuses to be re-mapped to "/" Slash as I would like, and I did not even try to change "Pause" to "-" minus even though I would like that.

That is a lesser price to pay than losing the Escape on the top left of the Numpad and keeping the left function keys proper.

I want to bolt-mod and floss this Model F and see what that is like. I am excited about the next phase of the project, even though I have pretty well given up on getting those last 2 keys like they are on the Model M.

I really appreciate your generous work and help on this. Thanks again.
Title: XT/AT/PS2/Terminal to USB Converter with NKRO
Post by: Soarer on Thu, 20 October 2011, 15:09:02
I wish I knew why that numlock won't remap! Does it just stay as numlock then?

True, it's not wise to hold your breath waiting for me to implement the remapping stuff, but it will happen :-)
Title: XT/AT/PS2/Terminal to USB Converter with NKRO
Post by: fohat.digs on Thu, 20 October 2011, 17:08:55
Yes, it just stays NumLock regardless of what I tell it to be. I was using KeyTweak and everything else obeyed my commands just fine.

If you are taking requests, I would like to make it as close to a Model M as possible, for the alphabet and numpad, with the exception that I will not need NumLock at all anymore, so I would want the top left of numpad to be Escape, a la the Model F AT.

Also like the Model F AT, I would like the left side to be a second F1-F10 pad.

At the top, I am happy with the bottom row being F1-F12 as usual.

The uppermost row, I would probably use for music controls and program and internet hot buttons.

But I would want the uppermost left button to be another Escape, a la Model M.

This would allow me to hop around between my Model Ms, Model F AT, and other "standard" keyboards with as little disorientation as possible.

Thanks again.
Title: XT/AT/PS2/Terminal to USB Converter with NKRO
Post by: Soarer on Sat, 22 October 2011, 09:44:04
No requests, sorry! The two alternative mappings came about for specific reasons - the first one was for someone who was helping out a lot during early testing, and the second is so that escape is available on the 104-key terminal 'unsaver' keyboards (and thus helps a whole group of people).

A little progress on the remapping utilies - I've compiled the sample rawhid code (http://www.pjrc.com/teensy/rawhid.html) into a DLL, and added the rawhid interface and endpoints to the converter, with a simple test that echos back whatever it receives. That works, but it remains to be seen if it interferes with normal keypresses in any way while stuff is being sent over the rawhid channel. So, now to decide what language to use for the next bit (that calls the DLL), and how it will transfer to other OS.
Title: XT/AT/PS2/Terminal to USB Converter with NKRO
Post by: theferenc on Sun, 23 October 2011, 09:49:40
I would recommend something like C++/Qt combination, or possibly python using wx or similar. Those 2 combinations are the best I've seen at providing actual cross platform support, and the former is used quite extensively, actually, including products like Picasa, google earth, VLC, photoshop elements, and Skype.

You can do most of the processing in straight C even, if you prefer, and just use C++ for the GUI aspect. Qt really excels at the MVC model of programming, and provides some really slick scripting support for generating dynamic GUIs.

Now, if you're going CLI rather than GUI, just write it in C or C++, and let people compile it themselves, I suppose.
Title: XT/AT/PS2/Terminal to USB Converter with NKRO
Post by: Soarer on Sun, 23 October 2011, 20:23:55
C++/Qt would suit me - I'd only need to learn the Qt bit!

I think I'll just go with CLI for the first version, so I can concentrate on getting the protocol and formats right. All it needs to do is talk to the DLL I've made, and deal with files. Might as well be C or C++ since that will be easiest (for me).

Beyond that, it could certainly use some nice UI. I guess there's two main criteria for that - only requiring that users install a minimal amount of other stuff, and that the toolkit has a stable interface. The latter so that these tools aren't too fussy about which version of the toolkit they are built with.
Title: XT/AT/PS2/Terminal to USB Converter with NKRO
Post by: HaaTa on Mon, 24 October 2011, 16:07:05
Heh, I know Qt :D
Title: XT/AT/PS2/Terminal to USB Converter with NKRO
Post by: RPro on Sat, 29 October 2011, 17:35:59
Hi - dumb question,but I couldn't find it with search:

Does this Teensy PS2 adapter work with the Dell AT101W (alps) keyboard? Thanks!
Title: XT/AT/PS2/Terminal to USB Converter with NKRO
Post by: Soarer on Sat, 29 October 2011, 18:08:32
It should - it certainly works with my Dell AT102W and SGI Granite :)
Title: XT/AT/PS2/Terminal to USB Converter with NKRO
Post by: RPro on Sat, 29 October 2011, 18:21:32
Quote from: Soarer;441968
It should - it certainly works with my Dell AT102W and SGI Granite :)


That's great! Gonna order a teensy board soon then. :)
Title: XT/AT/PS2/Terminal to USB Converter with NKRO
Post by: fohat.digs on Sun, 30 October 2011, 18:28:44
A couple of things:

First, do you want the Teensy for the Dell AT-101 for gaming? Because my son and I both use the AT-101 and it plugs in almost anywhere and works great (although, I must admit, that since I have been obsessed with buckling springs and my current Model F 122-key terminal conversion projects for a few months ..... ) I am not a gamer so maybe the Teensy does some kind of rollover thing that I don't understand ??

Second, I have finally completed my second Model F 122-key conversion, and it is "BAD-ASS" to say the least! I tore it down and bolt-modded it using about half a dozen bolts in the Imperial/American 4-40x1/2" or 4-40x3/4" sizes (don't know comparable metrics), painted the metal back plate several coats including rubber paint on the rubber side, flossed the springs, and stuffed the case with old pillow stuffing.

This is a clean mean machine. It clicks without undue resonance, and will probably last for years being stabbed at with full force. Now I just need to find a good paint/stain system, and repair procedure, for the case and I will be all set.
Title: XT/AT/PS2/Terminal to USB Converter with NKRO
Post by: kishy on Sun, 30 October 2011, 23:31:54
And that really does sum up a lot of why so many of us love these things...the Fs, especially a terminal Model F (122 or 104, there are others though) are just so machine-like.

(even terminal Ms are beast-like compared to all sorts of things, but an F really goes above and beyond)
Title: XT/AT/PS2/Terminal to USB Converter with NKRO
Post by: fohat.digs on Mon, 31 October 2011, 17:34:32
You have to take the Model F apart to really appreciate its construction. It seems monumental even by 1980s standards, not 1 but 2 large hunks of metal in the thing.

As the Model M is alleged to have the rivet weakness that can be fixed by bolt-modding, I have found 2 weaknesses with my Model Fs. The big one, and I did not realize this immediately, is the deterioration of the rubber mat that sits between the barrels and the metal inner plate. My first one had a wonderful mat with nice pliable black rubber and even the foam layer on the plate side was in good condition.

Since then, I have realized that a good mat is hard to come by and can be a "deal-killer"

One day I will try to make my own replacement mat, but I need to get a 1/2" hole punch.

The other problem is that the cases seem very prone to crack or break, particularly at the front (spacebar) edge. I have 3 F-122 cases that are broken diagonally from the lower corner of the key openings to the corner of the case. Even JB Weld epoxy has only proven up to the task once, and it is dark gray.

Can these cases be dyed, or must they be dye/painted?
Title: XT/AT/PS2/Terminal to USB Converter with NKRO
Post by: theferenc on Fri, 04 November 2011, 16:26:52
I know the M cases can be dyed, but it's a challenge due to the size. Some folks have suggested an automotive vynal based dye/spray paint stuff, if I remember correctly. Krylon also makes a substance that works, from results that have been posted here, as well.

I'm actually going to be looking into this in the next few weeks, since I would prefer a cleaner looking keyboard, and the case on my F is pretty stained and dirty. I'll let you know what I come up with.
Title: XT/AT/PS2/Terminal to USB Converter with NKRO
Post by: fohat.digs on Sat, 05 November 2011, 16:11:53
I decided that the advice was mostly against dyeing the Model F case, so I went to the automotive store and bought Dupli-Color Dye/Paint and used a half-dozen very light coats.

Came out pretty nice, if I do say so myself, and covered up the "JB Weld" repair job I had to do at the lower left (these cases are not the battleship quality that everything else is). Besides seeming brittle, the surface texture layer comes off leaving a very glossy under substrate.


[ATTACH=CONFIG]30964[/ATTACH]

[ATTACH=CONFIG]30965[/ATTACH]

[ATTACH=CONFIG]30966[/ATTACH]


And yes, I did paint the metal back plate red !

Dyeing the keys will be a future project.

And, whenever I can find a gray cord, it will go on, too.

Thanks, everyone !
Title: XT/AT/PS2/Terminal to USB Converter with NKRO
Post by: RPro on Sat, 05 November 2011, 20:05:03
Quote from: fohat.digs;442398
A couple of things:

First, do you want the Teensy for the Dell AT-101 for gaming? Because my son and I both use the AT-101 and it plugs in almost anywhere and works great (although, I must admit, that since I have been obsessed with buckling springs and my current Model F 122-key terminal conversion projects for a few months ..... ) I am not a gamer so maybe the Teensy does some kind of rollover thing that I don't understand ??


Actually, my new Sandy Bridge Asus P8Z68V-Pro motherboard does not have any PS/2 ports. The PS2->USB converter I have does NOT work with the AT101W --- is one of the models I got from monoprice - according to the wiki here on geekhack it should work on most but definitely NOT the Dell - it frequently resets but even worse - I can't use Control-C properly! So hey, I might as well get a Teensy for a little more than the price of a belkin converter. And it'd be a fun little project to try anyways.

I would like to use the Dell for gaming. But it is impossible to crouch and move in Left4Dead with my current converter haha!
Title: XT/AT/PS2/Terminal to USB Converter with NKRO
Post by: Soarer on Sat, 05 November 2011, 21:20:29
Quote from: fohat.digs;446313
And yes, I did paint the metal back plate red !

Looks great, I like it!

Quote from: RPro;446412
Actually, my new Sandy Bridge Asus P8Z68V-Pro motherboard does not have any PS/2 ports. The PS2->USB converter I have does NOT work with the AT101W --- is one of the models I got from monoprice - according to the wiki here on geekhack it should work on most but definitely NOT the Dell - it frequently resets but even worse - I can't use Control-C properly! So hey, I might as well get a Teensy for a little more than the price of a belkin converter. And it'd be a fun little project to try anyways.

I would like to use the Dell for gaming. But it is impossible to crouch and move in Left4Dead with my current converter haha!

This code can't add NKRO to a non-NKRO keyboard of course, but it should work as well as if it were plugged into a PS/2 port :-)
Title: XT/AT/PS2/Terminal to USB Converter with NKRO
Post by: kishy on Tue, 08 November 2011, 16:08:33
Quote from: fohat.digs;446313
I decided that the advice was mostly against dyeing the Model F case, so I went to the automotive store and bought Dupli-Color Dye/Paint and used a half-dozen very light coats.

Came out pretty nice, if I do say so myself, and covered up the "JB Weld" repair job I had to do at the lower left (these cases are not the battleship quality that everything else is). Besides seeming brittle, the surface texture layer comes off leaving a very glossy under substrate.


(Attachment) 30964[/ATTACH]

(Attachment) 30965[/ATTACH]

(Attachment) 30966[/ATTACH]


And yes, I did paint the metal back plate red !

Dyeing the keys will be a future project.

And, whenever I can find a gray cord, it will go on, too.

Thanks, everyone !

That's GORGEOUS!

Very well done.
Title: XT/AT/PS2/Terminal to USB Converter with NKRO
Post by: RPro on Thu, 10 November 2011, 19:10:46
I got the teensy converter programmed and the connector soldered (stole it from an old broken motherboard). Works great with the Dell AT101W! Looks like the Dell only has like 3KRO (or more depending). But way better than the POS monoprice Ez-PU21 converter - ugh, it can't even do Control-C correctly! Which is odd because I think the converter wiki said it should've been ok.

Whatever - if I upgrade to those NKRO gaming keyboards with the PS/2 connector it will be even more awesome! Thanks Soarer!
Title: XT/AT/PS2/Terminal to USB Converter with NKRO
Post by: RPro on Fri, 11 November 2011, 15:01:07
Whoops - guess the Dell AT101W is a 2KRO. Oh well.
Title: XT/AT/PS2/Terminal to USB Converter with NKRO
Post by: Soarer on Fri, 11 November 2011, 15:48:33
Ah cool, you got it working ok!

You never know exactly what you're going to get with a cheap converter; they'll change the chips they use if it makes it cheaper!

And yup, it's 2KRO or NKRO, there isn't really anything in between unless it's NKRO that's limited in some way :-)
Title: XT/AT/PS2/Terminal to USB Converter with NKRO
Post by: RC-1140 on Fri, 11 November 2011, 16:07:46
Hey,
Currently I'm using this adapter for a 1990's 122-Key Terminal Model M, and in general it works great. But when I tried to remap the keys in the same way as my Unicomp Terminal Emulator, I encountered a problem. I wanted to assign different keycodes to the scancodes using the ”setkeycodes“ utility, and used the evtest utility to read the scancodes. This is what it showed to me:

Event: time 1321047872.908643, type 4 (EV_MSC), code 4 (MSC_SCAN), value 70088
Event: time 1321047872.908648, type 1 (EV_KEY), code 93 (KEY_KATAKANAHIRAGANA), value 0

So it says the scancode of LF1 would be ”70088“. Interestingly enough all Scancodes look this way, like an ordinary hexadecimal scancode, prefixed by ”700“. LF2 shows up as ”7008a“ e.g.. When trying to remap it to Escape using ”setkeycodes 7008a 1“ I get: ”failed to set scancode 6210a to keycode 1“. But if I try to remap only the suffix, without the 700 it doesn't give any error message, it just won't change anything.

I'm really confused by this behaviour. Until now evtest has never failed on me...
Title: XT/AT/PS2/Terminal to USB Converter with NKRO
Post by: Soarer on Fri, 11 November 2011, 17:00:16
Hmm, I dunno!

Although...

7 is the HID usage page for keyboard keys, and 88 is the HID code for 'International 2' (katakana/hiragana), which is assigned to LF1.

So what's 93? (or 5D?)
Title: XT/AT/PS2/Terminal to USB Converter with NKRO
Post by: RC-1140 on Fri, 11 November 2011, 17:17:30
well, 93 is the X keycode for the Hiragana_Katakana Symbol. I don't know why, but one always has to add 8 to the keycode the kernel sends to get the keycode X sees. I really don't know, what causes this behavior.
Title: XT/AT/PS2/Terminal to USB Converter with NKRO
Post by: Soarer on Fri, 11 November 2011, 18:12:03
Oh, ok. I don't really know anything about remapping USB keyboards in X, but something's surely wrong since it refers to 6210a when you try to set 7008a!!

Where are the beardy types when you need them?!
Title: XT/AT/PS2/Terminal to USB Converter with NKRO
Post by: RC-1140 on Fri, 11 November 2011, 19:50:09
d'oh!

when in doubt, read manpages…


Quote
USB keyboards have standardized keycodes and setkeycodes doesn't affect them at all.


m(

Well. Looks like I have to do it by editing all my xmodmap files…

At least it wasn't your fault.
Title: XT/AT/PS2/Terminal to USB Converter with NKRO
Post by: RPro on Sat, 12 November 2011, 00:07:56
Hmm, I seem to be having an issue - it seems when I let the PC idle for a while (it does not go into sleep, only the display goes into power savings), the LED lights up for a couple of seconds on the Teensy board whenever I type. Also, spaces seem to be inserted (like if I had notepad open) out of the blue. Another time, it seems that the down arrow key is permanently pushed down.

I have to unplug the converted from the USB port and plug it back in to get it to work normally again, without the LED lighting up. Any ideas?

I will try plugging it into the backport of the motherboard instead of using the PC case front panel USB ports (Antec 1200 case).
Title: XT/AT/PS2/Terminal to USB Converter with NKRO
Post by: Soarer on Sat, 12 November 2011, 08:49:05
That sounds odd, I'm gonna hope it works ok on a rear port!

Power saving can be an issue because the converter can't reduce its power consumption, and it depends a lot on the hardware/bios/drivers whether that causes any issues. For example, on this machine I had to set the standby mode to S1 instead of S3, but on another machine S3 works fine. That said, the converter is clearly getting into a weird state, which shouldn't be happening.

Which OS are you using? Does it do the same thing if you put the computer to sleep?
Title: XT/AT/PS2/Terminal to USB Converter with NKRO
Post by: RPro on Sat, 12 November 2011, 16:58:59
I have an Asus P8Z68-V Pro motherboard. Windows 7 64 bit. It is set to S3. It BSODed last night after putting it to sleep, but I don't know if that was a coincidence (needed a couple of BIOS updates to stop more frequent crashing). This time, I'll plug the converter into a powered USB hub. Before, I was using a 3 meter PS2 extension cable with the converted plugged into the back of the motherboard. Yes, the converter has 1 K pullup resistors on the data and clock to VCC.

*fingers crossed*
Title: XT/AT/PS2/Terminal to USB Converter with NKRO
Post by: Soarer on Sat, 12 November 2011, 19:18:57
I doubt the converter caused a BSOD! Wish I knew what to suggest for that, getting a PC to sleep without problems can be a real pain :-(

For the original problem, disabling USB selective suspend might help:

(http://kishy.dyndns.org/misc/usb_selective_suspend.jpg)
Title: XT/AT/PS2/Terminal to USB Converter with NKRO
Post by: RPro on Sun, 13 November 2011, 00:52:47
Yeah I don't think it was the converter. If I have more issues with the keyboard itself acting funny I'll try out your setting - thanks for that! USB and power management has always been voodoo for every motherboard I've tried! I remember the "good old days" when the manual would actually say, "Use only THIS USB port if you want the USB device to turn on the PC or wake the PC."

Maybe the PS/2 extension cable I used is not properly shielded or has a bad connection that caused the previous problems, which is why I switched to using a USB hub and use a longer run USB cable that has been working fine for a year with 3 other devices on it. :)
Title: XT/AT/PS2/Terminal to USB Converter with NKRO
Post by: dorkvader on Wed, 07 December 2011, 10:50:52
Hmm, Can I use something like this to decode a normal ascii keyboard?
Title: XT/AT/PS2/Terminal to USB Converter with NKRO
Post by: Soarer on Wed, 07 December 2011, 15:26:59
Dunno... I'm not sure what you mean...?
Title: XT/AT/PS2/Terminal to USB Converter with NKRO
Post by: Soarer on Wed, 07 December 2011, 17:08:34
General Status Update...


What are the Settings then?!


Remaps
Are not whole translation tables! As a silly example, if you wanted to swap the '1' key with the '2' key, you might write:
1=2
2=1
(with some additional bumph around that to define a block).

Macros
Can trigger for any single key with any of the standard modifiers.
Separate macros can be defined on make and break (although, on make only is the most useful and reliable).
Macros are sequences of comands which can currently be: key events, modifier manipulation, and delays.

Layers
Up to 8 keys can be defined to act as a 'Fn' key to access further layers.
Any key can be used in this way - the keys are defined using the remap mechanism, so remapping a key to, say, 'FN1' defines it.
A layer is defined as any combination of those keys - so theoretically up to 256 layers! However, since each layer takes up a fair bit of memory, roughly 3 is the max on a Teensy 2.0, and maybe 25 on a Teensy++.
Each remap block is tagged with the layer it applies to (if not the base layer).

Selects
Up to 7 keys can be defined to toggle configurations of settings.
As with layers, these can be defined as remaps (to SELECT1 etc). But they can also be put in a macro, so that you can define a combination of keys to select a configuration.
All of the blocks for remaps, macros and layers can be tagged with a Select ID (1 to 7). But it is not required. In fact, base settings would usually not be marked as a Select.
Triggering a Select toggles that group of settings, but leaves the others alone.

So, basically... enough Settings to shoot yourselves in the foot with! :-)

Back to the todo - does anyone have experience with Boost::Spirit?
It looks interesting for the compiler part...
Title: XT/AT/PS2/Terminal to USB Converter with NKRO
Post by: hasu on Wed, 07 December 2011, 18:50:35
mmm, nice features!
and can't wait for trying new your firmware!

If the syntax is simple enough, hand written LL parser must be fun too :)
Title: XT/AT/PS2/Terminal to USB Converter with NKRO
Post by: alaricljs on Wed, 07 December 2011, 19:02:06
I want.  I am not patient... but I haven't succeeded in getting anywhere with my own firmware.  Being a dad, and a land lord  and having a full time job just doesn't give me the time to learn electronic design and how to program an MC.  *sigh*  So you will still beat me to it ;)
Title: XT/AT/PS2/Terminal to USB Converter with NKRO
Post by: fohat.digs on Wed, 07 December 2011, 19:36:07
Soarer -

Have you come up with a way to remap those 2 pesky numpad keys on the F-122?

"Num Lock" -to- "/"

and

"Pause" -to- "*" ?

If I could get those, I would be delighted !

Thanks ever so much, Harry
Title: XT/AT/PS2/Terminal to USB Converter with NKRO
Post by: Soarer on Wed, 07 December 2011, 21:30:00
Quote from: hasu;466149
mmm, nice features!
and can't wait for trying new your firmware!

If the syntax is simple enough, hand written LL parser must be fun too :)


Thanks! I'm looking for the quickest way to get something usable - a better syntax, or even a GUI, would be nice, but can be written later. The first version will probably be some very dirty code!

Quote from: alaricljs;466159
I want.  I am not patient... but I haven't succeeded in getting anywhere with my own firmware.  Being a dad, and a land lord  and having a full time job just doesn't give me the time to learn electronic design and how to program an MC.  *sigh*  So you will still beat me to it ;)

I wish I had some more time available to spend on this as well :(

Quote from: fohat.digs;466187
Have you come up with a way to remap those 2 pesky numpad keys on the F-122?

Yes - all these settings are completely un-pesky!

At least, they will be once I don't have to manually hex-edit the settings file by hand...

If anyone really wants to have a play with doing it that way, I guess I could upload a new version and my notes on the binary format - I wouldn't be able to help much though!
Title: XT/AT/PS2/Terminal to USB Converter with NKRO
Post by: LukStarkiller on Sat, 17 December 2011, 18:06:19
I have one question in mind, which is the slower response time (latency) that we can expect to happen between pressing a key and the signal output via USB on the Tensy board

It may be a negligible time, but I would be interested to know what could be the delay caused by the Tensy board and if it exceeds the millisecond (I doubt it, but for asking I don't lose anything ^^)
Title: XT/AT/PS2/Terminal to USB Converter with NKRO
Post by: Soarer on Sat, 17 December 2011, 19:46:02
Hmm, good question! I haven't tested it, but I think the worst case should be just under 2mS, with the average being 1mS.

Since the converter uses Full Speed USB, it has no problems reporting at 1000Hz. Even so, that could mean a delay of up to 1mS before a report is sent.

I also queue events inside the converter, and since that queue is also (asynchronously) processed at 1000Hz that means another up to 1mS delay.

Even the worst case is negligible compared to the delay (http://geekhack.org/showwiki.php?title=Keyboard+scan+rates&viewfull=1&page=8&do=comments#post409032) between pressing a key and the converter receiving it - which could be 10 times that!
Title: XT/AT/PS2/Terminal to USB Converter with NKRO
Post by: LukStarkiller on Sat, 17 December 2011, 21:26:33
:eek:
Surprising information
I never thought that the delay caused by the keyboard's controller boards were so ""extreme"", I guess that manufacturers give more importance to the proper functioning and estabilidady that latency.

It may seem silly but for a gamer these milliseconds can mean a lot in terms of playability.

I guess at this point the Aikon controller is better for this (don't know), but the Teensy is almost solderless and easy to understand.
I supose it's posible to do a direct controller with the Teensy board (or Teensy+ if you need more conections) that work with less latency. Well that's another crazy idea XD

If all of us are used to standard keyboards with this latency, then this doesn't needs to be changed, but I have to take a look at the Teensy documentation.
Title: XT/AT/PS2/Terminal to USB Converter with NKRO
Post by: dorkvader on Sun, 18 December 2011, 00:14:21
Quote from: dorkvader;465833
Hmm, Can I use something like this to decode a normal ascii keyboard?
I had to do some research, to know what I meant by that (I had to look up and double check everything). The keyboard in question is a WYSE 840013 (that came with a WYSE 30 terminal in 1993) It is one-way (no LED's) and has a 4-pin RJ10-like (4P4C) connector.
http://www.kbdbabel.org/conn/kbd_connector_wyse.png

I wasn't able to find any information either way, but I assume that it's not a normal XT interface keyboard, either. I did find a IBM guide on connecting an "ascii" keyboard to their old computers, but I'm still not really sure what that means.

Since it's just one-way, I assume it shouldn't be too hard to get it working: I mean, it should send a scancode for each individual key press, right?

So, what are my options? I'm sure I'll build one of these either way, as I can certainly use it for PS2 -> USB on at least two of my keyboards, but can I use it for this?
Title: XT/AT/PS2/Terminal to USB Converter with NKRO
Post by: Mikelittoris on Mon, 19 December 2011, 13:59:15
Okey, so i've got my terminal 122 key model f (6110347), my teensy with a female 5 pol din attached. I've programmed the teensy with the firmware. I've rebooted it and my keyboard is inserted in the female din connector. Nothing happends. Everytime I reboot the teensy it says "press button to activate" I do it and then nothing happends again. When I say nothing happends I mean that the keyboard doesn't work at all. Am I doing it all wrong somehow? The soldering looks ok. If I look straight in to the female din connector and counting clockwise i've got it connected like this: 1-D1, 2-GND, 3-D0, 4-VCC and 5 is not connected. Please help me im clueless about waht to do.
Title: XT/AT/PS2/Terminal to USB Converter with NKRO
Post by: DaemonRaccoon on Mon, 19 December 2011, 14:06:48
Quote from: Mikelittoris;473902
Okey, so i've got my terminal 122 key model f (6110347), my teensy with a female 5 pol din attached. I've programmed the teensy with the firmware. I've rebooted it and my keyboard is inserted in the female din connector. Nothing happends. Everytime I reboot the teensy it says "press button to activate" I do it and then nothing happends again. When I say nothing happends I mean that the keyboard doesn't work at all. Am I doing it all wrong somehow? The soldering looks ok. If I look straight in to the female din connector and counting clockwise i've got it connected like this: 1-D1, 2-GND, 3-D0, 4-VCC and 5 is not connected. Please help me im clueless about waht to do.

Assuming counting from the bottom left (facing the connector).
That's AT (and PS/2), you want the 3179 pinout: 1 - VCC, 2 - GND, 3 - NC, 4 - D0, 5 - D1.
Title: XT/AT/PS2/Terminal to USB Converter with NKRO
Post by: Mikelittoris on Mon, 19 December 2011, 14:13:00
Oh crapper! Thanks alot DeamonRaccoon yo're the best, I shall get back to the soldering iron right a way. BRB :)
Title: XT/AT/PS2/Terminal to USB Converter with NKRO
Post by: Mikelittoris on Mon, 19 December 2011, 15:50:28
Well I've connected the cables as you said DaemonRaccoon. Still nothing is happening. I'm not even sure how I'm suppose to start of with this. Shall I have the keyboard connected to the adapter at all times or should i first program and reboot the Teensy and then connect the board? I've tried all of this a few times now and I'm starting to worry that i might have fried the teensy somehow, it says it should have a blinking led, I saw it the first time i started the teensy but not anymore. I can still reprogram the teensy and reboot, and then it says "press button to activate" again. I'm not even sure what the teensy is suposed to say when it's on and working.

Sorry for being a complete airhead.
Title: XT/AT/PS2/Terminal to USB Converter with NKRO
Post by: DaemonRaccoon on Mon, 19 December 2011, 16:15:12
Start with flashing the Teensy without the keyboard connected, make sure you have the right firmware file there is a difference. The blinking LED is the default program that is flashed to the Teensy.

The "Press Button to Activate" is to drop the Teensy into the boot loader for flashing.

Make sure you're following the official guide for flashing (http://www.pjrc.com/teensy/loader.html).
Title: XT/AT/PS2/Terminal to USB Converter with NKRO
Post by: Soarer on Mon, 19 December 2011, 16:26:46
Don't panic just yet - it's not easy to kill a Teensy with this mod! I think about the only way it might happen is if there's a short of +5V to one of the input pins - which won't happen by getting the wires to the socket mixed up.

Have you got hid_listen (http://www.pjrc.com/teensy/hid_listen.html) yet? That will give you some output that will help to figure out what's wrong. (The blinky LED is gone once you program my code into it, and the LED is used to indicate errors).

edit: The keyboard needs to be connected to the Teensy when the Teensy starts up (either when rebooting after programming, or when plugging the USB side of the Teensy in).
Title: XT/AT/PS2/Terminal to USB Converter with NKRO
Post by: Mikelittoris on Mon, 19 December 2011, 16:31:23
Ok thanks I will have to try that tomorrow, been up for 32h straight now and I thoguth I'd just open the case to se what it looks like IRL before I went to bed, you can't guess what i found, the keyboard cable is detached from the controller inside the keyboard :P haha. Therefenc you bastard ^^. So hopefully it will all work like a charm tomorrow when I connect it.

btw i'm using v0.996 for teensy 2, since I don't got the ++. Should be the right one if i'm not completly lost.
Title: XT/AT/PS2/Terminal to USB Converter with NKRO
Post by: Soarer on Mon, 19 December 2011, 16:35:35
LOL! Yeah, helps if everything is plugged in!
Title: XT/AT/PS2/Terminal to USB Converter with NKRO
Post by: Soarer on Mon, 19 December 2011, 17:22:10
Quote from: dorkvader;473077
I had to do some research, to know what I meant by that (I had to look up and double check everything). The keyboard in question is a WYSE 840013 (that came with a WYSE 30 terminal in 1993) It is one-way (no LED's) and has a 4-pin RJ10-like (4P4C) connector.
http://www.kbdbabel.org/conn/kbd_connector_wyse.png

I wasn't able to find any information either way, but I assume that it's not a normal XT interface keyboard, either. I did find a IBM guide on connecting an "ascii" keyboard to their old computers, but I'm still not really sure what that means.

Since it's just one-way, I assume it shouldn't be too hard to get it working: I mean, it should send a scancode for each individual key press, right?

I've no idea! There is another Wyse that kbdbabel has signalling info for, and it is quite different even though still only using 4 wires - the clock line needs to be driven by the host, and the keyboard only drives the data line in response to that clock. Keyboards like that are a pain to work out, if you only have the keyboard!

Quote from: dorkvader;473077
So, what are my options? I'm sure I'll build one of these either way, as I can certainly use it for PS2 -> USB on at least two of my keyboards, but can I use it for this?

Probably not, unless it happens to use XT or AT protocol. There comes a point where it's often simpler to replace the controller, rather than try to convert the external protocol - at least then you know you're simply dealing with switches! (although, capacitive boards present a extra challenge... not sure what switches this thing has).
Title: XT/AT/PS2/Terminal to USB Converter with NKRO
Post by: Mikelittoris on Tue, 20 December 2011, 10:11:49
There we go, connected the cable to the controller and it works! I've done it, YEY! :D I really like the feel of it, it's like the model m but lighter, i'd imagine that the difference betwen the m and f is somewhat like the difference betwen black and red cherrys, i've never tryed reds so this is only me imagening stuff.

Now i've got to get it clean, it is terribly dirty atm. I'll post some pics later. :)

Thanks for helping me with the pinout/teensy problem DeamonRaccoon, and Soarer you're the MAN! :)
Title: XT/AT/PS2/Terminal to USB Converter with NKRO
Post by: thebum on Fri, 30 December 2011, 21:52:21
Wow. Soarer thanks so much for putting your time into this.

Just got my teensy today. Spent about twenty minutes prepping some wires, soldering, and flashing the teensy.

And now here I am, happily typing away on my XT Model F.

Everything seems to be working amazingly well (much better then I even expected it possibly could).

Will continue to use your firmware and if I encounter any problems or think of anything I could do to help, I will be sure to let you know.
Title: XT/AT/PS2/Terminal to USB Converter with NKRO
Post by: Soarer on Tue, 03 January 2012, 20:43:02
You're welcome - thanks for posting :-)  The XT support was actually one of the easier bits, apart from the fiddly moving around of PrtSc etc. So the mappings should be 100% correct - let me know if you find any that aren't, I haven't tested an XT in a while!

And... Welcome to geekhack!
Title: XT/AT/PS2/Terminal to USB Converter with NKRO
Post by: litster on Tue, 03 January 2012, 21:10:40
Soarer, is your mapping without recompiling part ready yet?  I am wondering if I could use your code on the Phantom Teensy 2.0 controller.  Thanks.
Title: XT/AT/PS2/Terminal to USB Converter with NKRO
Post by: Soarer on Tue, 03 January 2012, 21:37:15
Afraid not - I haven't had time to do any more since the last status update (http://geekhack.org/showwiki.php?title=Island:17458&p=466081&viewfull=1#post466081) :-(

The other part you would need is for me to make a 'controller' version. That's planned (because I want it for my own 'board :-) ) but I really want to get the settings compiler done first!
Title: XT/AT/PS2/Terminal to USB Converter with NKRO
Post by: litster on Tue, 03 January 2012, 23:13:12
That's cool, Soarer.  We can wait.  Thanks.
Title: XT/AT/PS2/Terminal to USB Converter with NKRO
Post by: thebum on Wed, 04 January 2012, 18:00:20
Quote from: Soarer;482787
You're welcome - thanks for posting :-)  The XT support was actually one of the easier bits, apart from the fiddly moving around of PrtSc etc. So the mappings should be 100% correct - let me know if you find any that aren't, I haven't tested an XT in a while!

And... Welcome to geekhack!

Thanks for the welcome.  I've spent quite a bit of time on the board and have encountered zero mapping issues on it, so from my experience  I believe you are correct about the key maps being perfect.

I've also been testing an AT NTC kb-6251 with it, which seems to be working quite well.  With the exception of two keys, but it seems likely that is a problem with the keyboard itself, once determined if not I'll report it to you and see if it is anything which could benefit your code.
Title: XT/AT/PS2/Terminal to USB Converter with NKRO
Post by: Soarer on Sun, 26 February 2012, 14:41:20
New version (http://geekhack.org/showwiki.php?title=Island:17458&redirect=no#History) posted. For the brave!
Title: XT/AT/PS2/Terminal to USB Converter with NKRO
Post by: timofonic on Sun, 26 February 2012, 14:57:18
Quote from: Soarer;527014
New version (http://geekhack.org/showwiki.php?title=Island:17458&redirect=no#History) posted. For the brave!


Features list? Please? :)
Title: XT/AT/PS2/Terminal to USB Converter with NKRO
Post by: Soarer on Sun, 26 February 2012, 15:10:35
Quote from: timofonic;527041
Features list? Please? :)
Not brave enough - you're barred! :-p

There is some (scant) documentation in the tools archive.
Title: XT/AT/PS2/Terminal to USB Converter with NKRO
Post by: Soarer on Sun, 26 February 2012, 19:38:18
Ok, so what's new is all the stuff outlined in this post (http://geekhack.org/showwiki.php?title=Island:17458&p=466081&viewfull=1#post466081), and media key support.

You can now define a bunch of settings in a text file, compile it, and upload it to the converter. There's a few example config files in the tools zip.

The tools are Windows only, but should be very easy to build for Linux and Mac.

You probably want to get all three zip files anyway - there's a list of HID codes in the src archive which might come in handy.

The HID codes are mostly the same as the standard, but I've used up a lot of the unused codes to add the  functionality I needed while still keeping the code to a single byte. These are the FAKE, FN, SELECT, and MEDIA codes.

The converter now outputs the HID codes that come from the first (fixed) stage of translation to the debug output (hid_listen), preceded by + or -. This should help a bit if you're not sure which code you need to remap for a key.

I've removed previously hard-coded settings. They are now in the legacy.sc config file. If you want the v0.997 converter to act exactly like v0.996:


There's two versions of the hex file for each Teensy. The _temp versions will reset all settings each time they boot up. Hopefully they won't be needed, but if I've screwed up, or writing the config to the Teensy is interrupted, they can be used to clean things up.
Title: XT/AT/PS2/Terminal to USB Converter with NKRO
Post by: REVENGE on Tue, 28 February 2012, 13:49:01
HOOOOOOOOOORAAAAAAAAAYYYYY!
Title: XT/AT/PS2/Terminal to USB Converter with NKRO
Post by: alaricljs on Tue, 28 February 2012, 13:54:24
Can you explain a 'SELECT'?  It sounds as tho it can be used to set a layer/keymap via a keypress/combo.  So for instance I have a qwerty and a colemak map I could use Fn-1 to select qwerty and Fn-2 to select Colemak and the map changes "permanently" to that map.
Title: XT/AT/PS2/Terminal to USB Converter with NKRO
Post by: litster on Tue, 28 February 2012, 13:57:09
This new update sounds very awesome.  We need someone to help port it over to use on Phantom  :-)
Title: XT/AT/PS2/Terminal to USB Converter with NKRO
Post by: Soarer on Tue, 28 February 2012, 14:34:08
Quote from: REVENGE;529599
HOOOOOOOOOORAAAAAAAAAYYYYY!

Pretty much what I thought when I finally found some time to work on it again!!

Quote from: alaricljs;529605
Can you explain a 'SELECT'?  It sounds as tho it can be used to set a layer/keymap via a keypress/combo.  So for instance I have a qwerty and a colemak map I could use Fn-1 to select qwerty and Fn-2 to select Colemak and the map changes "permanently" to that map.

FN and SELECT are two different things here - I'm not sure if you mean FN keys as I understand them...? I use FN for a key that will act something like a shift, to access keys on a different layer, and it's effect is temporary while you hold it down. SELECT is permanent, until you output that SELECT again. There's an example in the tools zip that does pretty much what you want: colemak_select1.sc. It uses lctrl+lshift+lalt+1 to toggle between the two layouts.

Perhaps the easiest way to explain it is to explain how it works - when a SELECT code gets to the output stage of the converter, it toggles the state of that select and then _all_ the settings are reloaded from the eeprom. If you've tagged blocks with ifselect, and the state of that select has changed, you'll get different settings loaded up.

Since SELECT's toggle, you could end up running with more than one select enabled - maybe SELECT1 gets you colemak, SELECT3 gets you some fancy Java programming macros, and SELECT7 gets you media controls on your numpad. (I dunno, it's entirely up to you!).
Title: XT/AT/PS2/Terminal to USB Converter with NKRO
Post by: alaricljs on Tue, 28 February 2012, 14:44:28
Quote from: Soarer;529636
It uses lctrl+lshift+lalt+1 to toggle between the two layouts.

Where you use crazy chords, I would use Fn.  I'm also not a fan of toggles, hence using 1 and 2 instead.  So given that a SELECT is what I thought (except toggling seems to be required), is it not possible to assign arbitrary commands to key combinations, such that Fn+1 would execute a select?

To be more clear on the whole Fn thing.  I expect anything typed with standard modifiers to make it to the computer intact, therefor I want to be able to have anything that doesn't make it to the computer to be activated via non-keys, that being Fn, Fn(n), ... So given an arbitrary set of keyboard management functions, Fn+1 through Fn+5 could be 5 different keymaps: qwerty, colemak, dvorak, and so on.  Then Fn-win could be enable/disable the Win key (outside of the Fn layer of course).  Fn-?? combos for media keys, Fn-?? combos for moving/disabling CapsLock...   stuff like that.  

I use crazy chord combos to manage least-common computer settings changes, like ctrl-alt-shift-L is turn on both monitors and set the left to primary.  Following that notion, your ctrl-alt-shift-1 would be turn on all monitors and set #1 to primary ;)
Title: XT/AT/PS2/Terminal to USB Converter with NKRO
Post by: Soarer on Tue, 28 February 2012, 15:11:28
Quote from: alaricljs;529642
Where you use crazy chords, I would use Fn.  I'm also not a fan of toggles, hence using 1 and 2 instead.  So given that a SELECT is what I thought (except toggling seems to be required), is it not possible to assign arbitrary commands to key combinations, such that Fn+1 would execute a select?


The crazy chord was just an example :) There must be millions of ways you could put these pieces together... but one thing you can't do currently is get my FN codes to do anything other than I've described above.

Don't forget the toggle can toggle the very key that does the toggling! So if qwerty was your base mode you might have a layer with FN1 + 1 assigned to SELECT1, to get you to colemak. In your colemak mode FN1 + 2 could be assigned to SELECT1 to take you back to qwerty. Settings later in the file override earlier settings (if they're trying to set the same thing), so maybe something like this would work for you...

Code: [Select]
remapblock
    LCTRL FN1 # whatever key you want, obviously!
endblock

layerblock
    FN1 1
endblock

remapblock
layer 1
    1 SELECT1
    2 FAKE_01 # do nothing
endblock

ifselect 1

include colemak.sc

remapblock
layer 1
    1 FAKE_01 # do nothing
    2 SELECT1
endblock


Course, if you've got enough spare keys to remap, you could do it without the layer stuff.
Title: XT/AT/PS2/Terminal to USB Converter with NKRO
Post by: Soarer on Tue, 28 February 2012, 18:31:15
Oh yeah, forgot to mention - SELECT_0 can be used to reset all toggles to off.

So you could do it as macros I guess. Remap Fn+1 to something unused (e.g. FAKE_01), then have a macro that triggers on that, and executes:
PRESS SELECT_0
PRESS SELECT_1

Maybe one day I'll put in a specific macro command to do that in one step, but don't hold your breath!
Title: XT/AT/PS2/Terminal to USB Converter with NKRO
Post by: Soarer on Tue, 28 February 2012, 20:32:10
Quote from: litster;529611
This new update sounds very awesome.  We need someone to help port it over to use on Phantom  :-)

Currently got about a dozen items on my to-do list, and making this sort of thing possible, somehow, is quite high on the list. I really can't say at the moment how quickly I'll be able get to it though.
Title: XT/AT/PS2/Terminal to USB Converter with NKRO
Post by: alaricljs on Tue, 28 February 2012, 20:51:56
Well, there's people willing to help if you want to share the load  ;)
Title: XT/AT/PS2/Terminal to USB Converter with NKRO
Post by: Soarer on Wed, 29 February 2012, 07:43:06
Has anyone had a go at compiling the tools for Linux or MacOSX?

(Linux I could try sometime, but not Mac).
Title: XT/AT/PS2/Terminal to USB Converter with NKRO
Post by: theferenc on Wed, 29 February 2012, 15:12:00
I can try it on Mac later today or tomorrow, if you want. I'll be trying Linux, as well, since that's where my Model F is currently connected, and I'd prefer to just do it there.

Just to check, before I flash, are the "slow" fixes still in the latest version?
Title: XT/AT/PS2/Terminal to USB Converter with NKRO
Post by: Soarer on Wed, 29 February 2012, 16:41:14
Quote from: theferenc;531133
I can try it on Mac later today or tomorrow, if you want. I'll be trying Linux, as well, since that's where my Model F is currently connected, and I'd prefer to just do it there.
Either would be great! Linux is probably the one I'm more worried about, in case different distros need different runes to get the rawhid stuff working.

Quote from: theferenc;531133
Just to check, before I flash, are the "slow" fixes still in the latest version?
Yup.
Title: XT/AT/PS2/Terminal to USB Converter with NKRO
Post by: Soarer on Thu, 01 March 2012, 15:23:14
Lego!

[attachimg=1]
Title: XT/AT/PS2/Terminal to USB Converter with NKRO
Post by: Soarer on Thu, 01 March 2012, 15:34:56
I call the bastardized version of usage page 7 HID codes that the converter uses internally HIDX. It's an amalgamation of page 7 codes, plus MEDIA (page 12), SYSTEM (page 1), FN, SELECT and FAKE. I'm not happy with FAKE, now that it's visible to users. I'm thinking of changing it so there's a set of names that are better suited to making readable remappings for - for example, the ten keys on the lhs of a 122-key 'board could be called LF1 to LF10 (Left Function).

So... just a heads up that some things are likely to change in the config files before I call it version 1.0!
Title: XT/AT/PS2/Terminal to USB Converter with NKRO
Post by: litster on Thu, 01 March 2012, 19:50:43
Quote from: litster;529611
This new update sounds very awesome.  We need someone to help port it over to use on Phantom  :-)


Quote from: Soarer;530048
Currently got about a dozen items on my to-do list, and making this sort of thing possible, somehow, is quite high on the list. I really can't say at the moment how quickly I'll be able get to it though.


Good to hear that this is on your to-do list!
Title: XT/AT/PS2/Terminal to USB Converter with NKRO
Post by: mkawa on Fri, 02 March 2012, 00:24:50
i can port this to phantom, i just need some pointers on how to get simulavr running for teensy code (using the package in the ubuntu oneiric repos). basically, it looks impossible as the man page doesn't list atmega32 as a supported arch at all. so, either this is true and i need to order a teensy to play with before my phantom kits come, or it's not true and i need the incantation to get it to work.

i also have a mac i can work on if there's a newer/better simulavr i can work with on that.
Title: XT/AT/PS2/Terminal to USB Converter with NKRO
Post by: Soarer on Fri, 02 March 2012, 05:22:07
I haven't used the simulator at all, just a combination of debug print output, extra LEDs, test signal outputs, and an oscilloscope. If it supports AT90USB162 (Teensy 1.0) or AT90USB1286 (Teensy++), they're close enough for you to be able to familiarise yourself with the tools and the CPU architecture (reading/writing ports and pins etc).

I'll probably give you libraries that include everything except the except the left hand block in the diagram a couple of posts ago. So you'll feed it key up and key down events, ask it for LED status, call its task function... and that's about it. It's almost a drop-in replacement for the PJRC sample usb_keyboard code. My code uses Timer 0, but that's about it as far as resources goes I think. Amongst other things, I use that to maintain a 32-bit millisecond tick counter, which is probably useful to you.

You'll need to scan the matrix, debounce, and translate matrix codes into HIDX codes.
Title: XT/AT/PS2/Terminal to USB Converter with NKRO
Post by: Soarer on Sat, 03 March 2012, 12:57:13
Built myself a neat converter today :-)

A while back I spotted some console hack dongles on sale (http://www.easymg.com/avr-micro-sd-development-board-atmega32u4.html) for only $10, that have ATmega32U4 chips in them. I bought two, but unfortunately one was DOA. Oh well. The other one works fine. There's a schematic (http://www.tiaowiki.com/w/TIAO_AVR_/_Micro_SD_Development_Board_%28ATMEGA32U4%29) for it.

[attachimg=1]

It started off looking like this inside...

[attachimg=2]

Then I...
Removed the card socket.
Removed the 3.3V regulator and replaced it with a bit of wire, so that everything was running at 5V.
Soldered some thin single core wire to two pins on the chip for data and clock, and two SD card socket pads for power and ground.
Used hot glue to (hopefully) keep them from coming loose.
Cut the trailing socket from a PS/2-USB adapter (a crappy Belkin that kept reconnecting).
Put some heatshrink on near the end of it to stop it pulling out of the case.
Joined it up to the single core wires, with heatshrink on each connection.
Filed a hole in the case for the cable exit.

[attachimg=3]

[attachimg=4]

[attachimg=5]

[attachimg=6]

And ended up with this...

[attachimg=7]

:-)
Title: XT/AT/PS2/Terminal to USB Converter with NKRO
Post by: SmallFry on Sat, 03 March 2012, 13:04:45
SWEET! Nice package to keep your converter in!
Since it uses Atmel's stuff to program it, is it compatible with the Teensy programming utility if you reflash the Bootloader?
Title: XT/AT/PS2/Terminal to USB Converter with NKRO
Post by: Soarer on Sat, 03 March 2012, 13:23:01
Thanks! Still one thing left to do... drill a hole in the case so I can reset it for flashing without taking it apart. Just pondering on exactly how I'll do it - thinking about gluing a flat piece of plastic onto the reset switch, so that it fills the gap between the switch and the case. Hmm. Anyway, the spot to drill is neatly marked by the cross of the 'T' in 'portable' :-D
Title: XT/AT/PS2/Terminal to USB Converter with NKRO
Post by: alaricljs on Sat, 03 March 2012, 13:30:55
How much does the case flex in that spot?  You might not need a hole, just fill the gap with a chunk of plastic and squeeze it to actuate the button.
Title: XT/AT/PS2/Terminal to USB Converter with NKRO
Post by: Soarer on Sat, 03 March 2012, 13:31:59
Quote from: SmallFry;534039
Since it uses Atmel's stuff to program it, is it compatible with the Teensy programming utility if you reflash the Bootloader?

Sorry, missed your edit... No, it's not compatible with the Teensy utility, and you can't load the Teensy bootloader onto it (or anything else for that matter, since you can't get the Teensy bootloader off a Teensy!). Atmel Flip works fine though, the 'problem' is just that the bootloader takes up more space than the Teensy one.
Title: XT/AT/PS2/Terminal to USB Converter with NKRO
Post by: mkawa on Sat, 03 March 2012, 13:35:18
Quote from: Soarer;532999
I haven't used the simulator at all, just a combination of debug print output, extra LEDs, test signal outputs, and an oscilloscope. If it supports AT90USB162 (Teensy 1.0) or AT90USB1286 (Teensy++), they're close enough for you to be able to familiarise yourself with the tools and the CPU architecture (reading/writing ports and pins etc).

I'll probably give you libraries that include everything except the except the left hand block in the diagram a couple of posts ago. So you'll feed it key up and key down events, ask it for LED status, call its task function... and that's about it. It's almost a drop-in replacement for the PJRC sample usb_keyboard code. My code uses Timer 0, but that's about it as far as resources goes I think. Amongst other things, I use that to maintain a 32-bit millisecond tick counter, which is probably useful to you.

You'll need to scan the matrix, debounce, and translate matrix codes into HIDX codes.
ok message received -- it sounds like simulators are pretty hopeless. this will have to wait until i have a teensy in hand.
Title: XT/AT/PS2/Terminal to USB Converter with NKRO
Post by: Soarer on Sat, 03 March 2012, 13:39:26
Quote from: alaricljs;534047
How much does the case flex in that spot?  You might not need a hole, just fill the gap with a chunk of plastic and squeeze it to actuate the button.

Hardly any flex, surprisingly, but it might _just_ work... with a very firm squeeze!

The other alternative is to figure out how to reboot to the loader from firmware, and then trigger it from a key combo, or by sending it some rawhid on the config interface.
Title: XT/AT/PS2/Terminal to USB Converter with NKRO
Post by: Soarer on Sat, 03 March 2012, 13:52:32
Quote from: mkawa;534050
ok message received -- it sounds like simulators are pretty hopeless. this will have to wait until i have a teensy in hand.

Dunno about hopeless, but I always find using them a mixed bag. It's nice to be able to step through code and check that it's doing what you intended, but on the other hand, you end up spending a fair bit of time working out how to simulate the external inputs. For example, for a keyboard controller, it would be fine to simulate the matrix scan code, but not so good at the debouncing code - you'd need to record some bouncing signals and replay them to the simulator, at the simulator's speed, and take into account how the matrix scanning interacts with it.
Title: XT/AT/PS2/Terminal to USB Converter with NKRO
Post by: mkawa on Sat, 03 March 2012, 13:58:12
agreed. i was hoping there was a nice debugging toolkit that would let me do these things, but it sounds like most people working on teensy and duino projects just end up firing the actual boards up on their builds. (it's a good thing the code is all rather simple!)

i'll check back in in a bit when we have phantom boards and teensies in hand
Title: XT/AT/PS2/Terminal to USB Converter with NKRO
Post by: Soarer on Sat, 03 March 2012, 17:29:31
Quote from: Soarer;534057
The other alternative is to figure out how to reboot to the loader from firmware, and then trigger it from a key combo, or by sending it some rawhid on the config interface.

Hmm. This looks quite easy, actually, but which address to jump to depends on the bootloader.

Jumping To The Bootloader (http://www.pjrc.com/teensy/jump_to_bootloader.html) - PJRC
USB DFU Bootloader Datasheet (http://www.atmel.com/Images/doc7618.pdf) (pdf) - Atmel Corporation

It would be nice to determine which bottyloader is present in code, rather than having specific builds. Hmm.
Title: XT/AT/PS2/Terminal to USB Converter with NKRO
Post by: drteming on Sun, 04 March 2012, 21:56:08
Newbie here.  Just got a terminal 1390572 last week.  Cleaned it up and did a full bolt mod and built a converter per Soarer's instructions.  I am typing this on the behemoth.  What a hoot.  Here's some pics of the converter.

In the box.
(http://farm8.staticflickr.com/7180/6808489832_f74f1208cb_b_d.jpg)

In action.
(http://farm8.staticflickr.com/7195/6954598029_8cf1957693_b_d.jpg)

Thank you, Soarer!
Title: XT/AT/PS2/Terminal to USB Converter with NKRO
Post by: Soarer on Mon, 05 March 2012, 17:00:05
Thank you for posting pics - I love seeing a nice tidy build!
Title: XT/AT/PS2/Terminal to USB Converter with NKRO
Post by: fohat.digs on Mon, 05 March 2012, 20:47:29
Oh that is beautiful. I am doing something similar when I have some spare time, and you just raised the bar on my expectations.

Very nice box.
Title: XT/AT/PS2/Terminal to USB Converter with NKRO
Post by: theferenc on Tue, 06 March 2012, 13:10:15
Soarer, do you want compilation feedback via PM or in the thread?
Title: XT/AT/PS2/Terminal to USB Converter with NKRO
Post by: Soarer on Tue, 06 March 2012, 13:45:29
Aha, cool! Probably here, in case others might want to try as well.

Unless it's embarassing...
Title: XT/AT/PS2/Terminal to USB Converter with NKRO
Post by: theferenc on Tue, 06 March 2012, 18:43:45
I don't think it's embarrassing, no. This is all on Linux (RHEL 6).

I was able to get 2 of the tools (scas and scdis) to compile, after futzing around with them for a while. I'll PM you with the exact fixes I had to make. I can't get the other two (scwr and scrd) to compile. I'm pretty sure it's due to a missing usb.h file on RHEL. I'm going to keep trying to make them work, though.

To make these completely cross platform, there will need to be some conditional compilation, depending on platform. I've added the necessary code to the two files I was able to make compile, but not in a cross platform fashion. Everything is just hard coded. I'll add the macros to make it work on at least windows and linux, and I'll try and get mac done this weekend, then send everything back to you.

Anyone else able to get it to work?
Title: XT/AT/PS2/Terminal to USB Converter with NKRO
Post by: Soarer on Tue, 06 March 2012, 18:46:14
Quote from: Soarer;534197
Hmm. This looks quite easy, actually, but which address to jump to depends on the bootloader.

Jumping To The Bootloader (http://www.pjrc.com/teensy/jump_to_bootloader.html) - PJRC
USB DFU Bootloader Datasheet (http://www.atmel.com/Images/doc7618.pdf) (pdf) - Atmel Corporation

It would be nice to determine which bottyloader is present in code, rather than having specific builds. Hmm.

Knocked together some code that should work for nearly all Atmel AVR chips (except xmega), and with any bootloader :-)

Not tested it much yet... would be a good use of a simulator!
Title: XT/AT/PS2/Terminal to USB Converter with NKRO
Post by: Soarer on Tue, 06 March 2012, 19:06:01
Quote from: theferenc;537280
I don't think it's embarrassing, no. This is all on Linux (RHEL 6).

I was able to get 2 of the tools (scas and scdis) to compile, after futzing around with them for a while. I'll PM you with the exact fixes I had to make. I can't get the other two (scwr and scrd) to compile. I'm pretty sure it's due to a missing usb.h file on RHEL. I'm going to keep trying to make them work, though.

To make these completely cross platform, there will need to be some conditional compilation, depending on platform. I've added the necessary code to the two files I was able to make compile, but not in a cross platform fashion. Everything is just hard coded. I'll add the macros to make it work on at least windows and linux, and I'll try and get mac done this weekend, then send everything back to you.

Thanks for putting the time in! I'll plug my Linux (Mint, Debian) box back in so I can have a look see if it's got a usb.h on it.
Title: XT/AT/PS2/Terminal to USB Converter with NKRO
Post by: Soarer on Tue, 06 March 2012, 22:10:08
Quote from: Soarer;537299
I'll plug my Linux (Mint, Debian) box back in so I can have a look see if it's got a usb.h on it.

Got scrd and scwr working on Mint! Needed libusb-0.1-4 and libusb-dev installing to get the required files. To keep it simple I used the PJRC Makefile, and changed my source files from C++ to C (to avoid any g++ vs gcc complications), which then only needed a few minor follow-up changes.
Title: XT/AT/PS2/Terminal to USB Converter with NKRO
Post by: RC-1140 on Wed, 07 March 2012, 08:54:01
Hey Soarer,
at first: thank you very much for creating such a fantastic converter software. I use it all the time, for multiple keyboards. But now I was thinking about using it in an embedded project. And since I'm a cheapskate I don't want to order 6 more teensy's from pjrc. Would your precompiled hex file work on an ATMega 32U4 connected in the same way as a teensy, or does the bootloader do anything crazy, so teensy code doesn't run on ATMegas? Too sad that your code is too big to fit an ATMega 16U4...

RC-1140
Title: XT/AT/PS2/Terminal to USB Converter with NKRO
Post by: Soarer on Wed, 07 March 2012, 10:13:47
It should work fine on any 32U4, as long as you can get it in there! The dongle I adapted has the Atmel bootloader on it, and that works OK.

I might be able to trim my code down to 16KB, but I'm not sure if I could get it down to 12KB to leave room for the bigass Atmel bootloader :-(
And of course, I'm not sure I can keep it under 16KB as I add new features.

The other issue is RAM - the 16U4 might only have enough for basic functionality (i.e. no layers or macros).
Title: XT/AT/PS2/Terminal to USB Converter with NKRO
Post by: RC-1140 on Thu, 08 March 2012, 06:08:39
Actually even this would be great, as I'm currently using 0.996 anyway. This might be an interesting idea: having some kind of a "light" version. Maybe this would be interesting for anybody wanting to use it in some kind of an embedded project. (Noncommercial of course)

But I don't think RAM would be an issue on the Atmega16U4, if I read the datasheet right, the only difference between the 32U4 and the 16U4 is the Flash. Both have 2,5kB SRAM and 1kB EEPROM, and the same layout of Ports/Pins.

I would really appreciate if you did this one day.

RC-1140
Title: XT/AT/PS2/Terminal to USB Converter with NKRO
Post by: Soarer on Thu, 08 March 2012, 07:25:34
The trouble is, I'm not sure why it helps much - the '32U4 chip is about 5EUR, and the '16U4 is about 4EUR - so there's not much reason on the basis of price. The other 16KB chip with USB, the AT90USB162 used in the original Teensy, is getting more expensive (relatively). There are a number of Teensy-like boards out there using the '162, but they aren't generally much cheaper than the Teensy 2.0, if at all.

The '16U4 has 1.25KB SRAM and 512 bytes EEPROM. The current build uses 1174 bytes of SRAM, and that's without counting stack space. More than half of that is related to layers and macros though.

How about the '32U2? It doesn't have enough SRAM or USB endpoints for the latest version, but 0.996 should run fine on it already, I think. It's about the same price as the '16U4.
Title: XT/AT/PS2/Terminal to USB Converter with NKRO
Post by: Soarer on Thu, 08 March 2012, 07:45:42
In other news, I just added Jump to Bootloader (http://geekhack.org/showwiki.php?title=Island:17458&p=537283&viewfull=1#post537283) support for the next release, with two ways of triggering it - a macro command so it can be done from the keyboard, and a utility so it can be done from the host PC.
Title: XT/AT/PS2/Terminal to USB Converter with NKRO
Post by: RC-1140 on Thu, 08 March 2012, 13:58:59
Yeah, of course that little price difference doesn't justify the extra work you would have with it. It was just a small idea I had,because I will have access to many dev boards with an 16U4 soon, and I thought I could use them, so I don't have to buy Teensy's from the US anymore. Apparently the easiest will be to get the dev boards, get some 32U4s and solder them in.

Thanks anyway!
RC-1140
Title: XT/AT/PS2/Terminal to USB Converter with NKRO
Post by: Soarer on Thu, 08 March 2012, 14:34:34
I will have a look in case there's some easy memory saving that can be done, but otherwise I should pander to the masses... get the converter and tools up to v1.0 standard, make a library of my USB stuff, make a controller version, make a model F controller version, ... :-)

(OK, the last one is just because _I_ want to!)
Title: XT/AT/PS2/Terminal to USB Converter with NKRO
Post by: Soarer on Thu, 08 March 2012, 16:24:34
Well, I managed to reduce the size by about 2KB. (Stupid makefile forcing inclusion of vfprintf and vfscanf!)
So down to about 14.25KB for the latest (unreleased) build.
There's still about 0.5KB used by malloc and free that I could get rid of, but I'm pretty sure that wasn't there in 0.996 anyway.

So I think it might fit, but not with the default Atmel bootloader in place. Perhaps LUFA has one that's 2KB or less? Or, you could use one of your dev boards to ISP the others, and do away with the bootloader altogether.

I'm not sure yet, but I think I'd rather make it a cut down version of the latest code (cut down to fit in 1.25KB SRAM, and get under 14KB FLASH). That means you could still have the config stuff for basic remaps and macros. But not have layers, or macros that trigger on key release.
Title: XT/AT/PS2/Terminal to USB Converter with NKRO
Post by: SmallFry on Thu, 08 March 2012, 22:23:48
Will you ever open source your code? I know I've asked before, but can't recall off hand.
Title: XT/AT/PS2/Terminal to USB Converter with NKRO
Post by: Soarer on Fri, 09 March 2012, 07:20:01
Quote from: SmallFry;539786
Will you ever open source your code? I know I've asked before, but can't recall off hand.

I really don't know if or when. Once done it cannot be undone - last time I started thinking about it I got bogged down in trying to decide what license to use (and I still don't really like any of them). All I can honestly say is that it might happen eventually, but it's not at all high up on my to-do list.
Title: XT/AT/PS2/Terminal to USB Converter with NKRO
Post by: litster on Fri, 09 March 2012, 14:31:50
Which IBM keyboard would be best to use for this project if I want to keep it small and have NKRO?
Title: XT/AT/PS2/Terminal to USB Converter with NKRO
Post by: Soarer on Fri, 09 March 2012, 14:44:11
The AT (84-key). It's not 'small', but there's only about an extra inch on the RHS compared to a TKL, so you can still have your mouse close.
Title: XT/AT/PS2/Terminal to USB Converter with NKRO
Post by: litster on Fri, 09 March 2012, 14:50:41
Right, the AT.  But it would be hard to get one now.  Could I do this on a Phantom, without changing your source code, by rewiring the Phantom rows and columns to what your teensy firmware expects?
Title: XT/AT/PS2/Terminal to USB Converter with NKRO
Post by: Soarer on Fri, 09 March 2012, 15:51:22
Hard, but far from impossible. You just have to keep looking, and be prepared to pay whatever the going rate is.

Errr, no. This is a converter, not a controller. Until I make it a controller too. Or more likely, make it so that you can make it a controller. Who is the software bod for the Phantom?

I've brutally reduced my to-do list for v1.0, so that I can move on to other things like controllers. Anything not directly related to making a stable version for config files etc. has been postponed. But still, it will happen when it happens.
Title: XT/AT/PS2/Terminal to USB Converter with NKRO
Post by: litster on Fri, 09 March 2012, 15:55:40
Ah, I get it now.  The Phantom firmware we have now came from PrinsValium.  His code is based on the Teensy's keyboard sample code.  It has 6KRO over USB.

Another question.  Could your converter work in this way?

Filco in PS/2 mode -> Soarer's Converter -> PC USB port == NKRO over USB?
Title: XT/AT/PS2/Terminal to USB Converter with NKRO
Post by: Soarer on Fri, 09 March 2012, 16:12:24
OK. I'll talk to him when I'm ready to make plans for controller stuff.
Title: XT/AT/PS2/Terminal to USB Converter with NKRO
Post by: Soarer on Mon, 12 March 2012, 16:07:01
Quote from: litster;540413
Another question.  Could your converter work in this way?

Filco in PS/2 mode -> Soarer's Converter -> PC USB port == NKRO over USB?

Yes.

(I missed seeing the edit again!)
Title: XT/AT/PS2/Terminal to USB Converter with NKRO
Post by: drteming on Mon, 12 March 2012, 22:05:59
Well, I worked up the courage to delve into Soarer's 0.997 firmware.  My last foray into any sort of programming was in 1988 during high school using Pascal so I'm a bit behind the times.  Interestingly, we used IBM PS/2's with model M keyboards.  Anyway, I wasn't happy with the default mapping of the keys on my terminal 1390572.  With a little patience and persistence, I figured how to use hid_listen and found the key syntax in the hid_tokens.cpp file (opens with notepad) located in the source code of Soarer's sctools "common" subfolder.  

I use the number pad a lot in my work so I remapped the terminal pad to be exactly like a standard model M, and for the heck of it, I remapped Cmd13-Cmd24 to media keys.  The code is as follows.

Code: [Select]
[FONT=Courier New]ifset set3
remapblock
EUROPE_1 BACKSLASH # the key to the lower left of Field Exit/Enter

ESC NUM_LOCK # This block remaps the number pad
NUM_LOCK PAD_SLASH # to be identical to a regular model M
SCROLL_LOCK PAD_ASTERIX #
PAD_ASTERIX PAD_PLUS # Field - to + key
PAD_MINUS PAD_PLUS # Blank to + key
FAKE_19 PAD_MINUS # The top right key of the number pad
PAD_PLUS PAD_ENTER

FAKE_08 ESC # This block remaps the function keys
FAKE_09 DELETE # on the left side of the keyboard
FAKE_10 PRINTSCREEN
FAKE_11 SCROLL_LOCK
FAKE_12 PAUSE
FAKE_13 F1 # Help
FAKE_14 UNASSIGNED
FAKE_15 UNASSIGNED
FAKE_16 LGUI # Windows key
FAKE_17 APP # Menu Key

F13 MEDIA_WWW_HOME # Function/Cmd keys 13-24, my preference
F14 MEDIA_WWW_SEARCH
F15 MEDIA_MAIL
F16 MEDIA_MY_COMPUTER
F17 MEDIA_CALCULATOR
F18 MEDIA_PLAY_PAUSE
F19 MEDIA_STOP
F20 MEDIA_PREV_TRACK
F21 MEDIA_NEXT_TRACK
F22 MEDIA_VOLUME_UP
F23 MEDIA_VOLUME_DOWN
F24 MEDIA_MUTE

EUROPE_2 LSHIFT # The < > key to the right of left shift
LANG_4 UNASSIGNED # The key in the middle of the arrow keys
endblock
[/FONT]

Copy and paste the above code into notepad and save it as a .cs file.  Then use Soarer's sctools to convert and load it into the Teensy converter.  Of course, feel free to change the mapping to your liking.

This is only for the default 122 key model M terminal keyboard.  YMMV.  Hope this helps a fellow newbie.
Title: XT/AT/PS2/Terminal to USB Converter with NKRO
Post by: wcass on Mon, 12 March 2012, 22:34:30
Quote from: Soarer;539358
..., make a model F controller version, ... :-)

(OK, the last one is just because _I_ want to!)
if you are serious about this, i'ld like to talk to you about a project i'm working on. some discussion is here:
http://geekhack.org/showthread.php?28021-a-modern-Model-F
Title: XT/AT/PS2/Terminal to USB Converter with NKRO
Post by: Soarer on Mon, 12 March 2012, 23:14:27
Quote from: drteming;544056
Well, I worked up the courage to delve into Soarer's 0.997 firmware.

Hail to the Brave!

Thanks for posting up what you've done, and how. Sorry about the lack of documentation, one day I'll get round to putting some reference material together for the codes and default layouts etc. I'll probably be annoying and change some stuff around before then though - I certainly want to rename those FAKE_ codes - but I'll make it easy to update any config files.
Title: XT/AT/PS2/Terminal to USB Converter with NKRO
Post by: Soarer on Mon, 12 March 2012, 23:16:30
Quote from: wcass;544074
if you are serious about this, i'ld like to talk to you about a project i'm working on. some discussion is here:
http://geekhack.org/showthread.php?28021-a-modern-Model-F

I'm serious, but it's possibly not quite what you're after - my plan is to replace just the CPU on the Model F (or beam spring) controller board, and drive their square silver capacitive sensing chip from the Teensy.
Title: XT/AT/PS2/Terminal to USB Converter with NKRO
Post by: Parak on Thu, 15 March 2012, 22:44:42
Quote from: Soarer;544119
I'm serious, but it's possibly not quite what you're after - my plan is to replace just the CPU on the Model F (or beam spring) controller board, and drive their square silver capacitive sensing chip from the Teensy.

I'm entirely too lazy to check this at the moment, but isn't the teensy++ and the main micro on model F the same DIP dimensions? That'd make for quite the convenient drop in replacement.
Title: XT/AT/PS2/Terminal to USB Converter with NKRO
Post by: Soarer on Thu, 15 March 2012, 23:29:45
Quote from: Parak;547334
I'm entirely too lazy to check this at the moment, but isn't the teensy++ and the main micro on model F the same DIP dimensions? That'd make for quite the convenient drop in replacement.

Yup, same size, but the ++ has GND and AREF in the middle of one side, which aligns with some signals that would be needed! (at least, on the particular controller board I'm looking at doing first that's the case).

So I was thinking of using the regular Teensy mounted so it matches up with as many needed signals as possible, and then linking the rest with (solid core) wire. It would only need a couple of these messy wires, and they need to go to space that isn't blocked by the Teensy.

The first step in this is to remove the CPU and replace it with a socket (so the original CPU could be replaced to revert the mod). The Teensy would have little pins soldered into it (the usual header pins are too large) for about 3/4 of it's pins, then the 2 or 3 wires added.

Many of the Model F controllers have some form of multiplexing, so they don't need lots of pins on the CPU - which is nice!
Title: XT/AT/PS2/Terminal to USB Converter with NKRO
Post by: Parak on Thu, 15 March 2012, 23:57:01
They would align in every one of the four possible orientations of a teensy++? Still, that's awesome work that you're doing :D
Title: XT/AT/PS2/Terminal to USB Converter with NKRO
Post by: Soarer on Fri, 16 March 2012, 07:57:41
Quote from: Parak;547433
They would align in every one of the four possible orientations of a teensy++? Still, that's awesome work that you're doing :D

Well, there's also that +5V and GND are on diagonally opposite corners of the CPU, vs opposite corners at one end of the Teensies. That means only two orientations are really worth thinking of - either lining up +5V or GND - and both put those other two pins somewhere in the Port 1 set of pins (P10 to P17).

Here's the CPU, with the 29 pins that might be used marked...

[ATTACH=CONFIG]44416[/ATTACH]

It varies quite a lot between the various Fs which pins are actually used for scanning, on some it's not many at all! And of course all of them use some pins for the interface to the host, which can be ignored.

edit: BTW, the main reason for doing this is to be able to use keyboards that can't possibly work with a converter because they don't send break codes for most keys, like the beam spring and bizarro F 'boards. But there's no reason why it couldn't be used for XT, AT and 122-key F 'boards too.
Title: XT/AT/PS2/Terminal to USB Converter with NKRO
Post by: Parak on Fri, 16 March 2012, 10:18:19
Quote from: Soarer;547732
Well, there's also that +5V and GND are on diagonally opposite corners of the CPU, vs opposite corners at one end of the Teensies. That means only two orientations are really worth thinking of - either lining up +5V or GND - and both put those other two pins somewhere in the Port 1 set of pins (P10 to P17).

Hmm, I see. Does T0 have to be used for something? If not then using teensy++ with +5V oriented to Vcc, GND and C7 could be left without the machine pins, with just one wire going from GND to Vss. Regardless, I'd be able to deal with the problem in whichever way you decide on; I'm just excited about the possibility to be able to use it "natively" on my F 122 key at some point :p
Title: XT/AT/PS2/Terminal to USB Converter with NKRO
Post by: Soarer on Fri, 16 March 2012, 13:12:10
Quote from: Parak;547815
Does T0 have to be used for something?

Depends on the 'board - the XT, AT and DisplayWriter use it for signalling to the host, so we don't need to use it in those cases. The 3104 uses it as part of the scannning, so yes in that case. I think the 122-key is most similar to the AT (from memory).

Another idea for mounting it would be to match the good side of the ++ with the busy side of the CPU (pins 21 to 39), and hang the ++ off to that side (if there's room). Then use wires to reach over to the other side. Not quite as stable, but easier to work with.
Title: XT/AT/PS2/Terminal to USB Converter with NKRO
Post by: wcass on Mon, 19 March 2012, 00:05:55
thanks Soarer.

i used this in my IBM AT project here:
http://geekhack.org/showwiki.php?title=Island:25919

and my TSSK project here:
http://geekhack.org/showwiki.php?title=Island:29086
Title: XT/AT/PS2/Terminal to USB Converter with NKRO
Post by: ed_avis on Sun, 01 April 2012, 10:58:36
With a Dell M6300 (BIOS rev A14) and Windows XP x64 SP2, and the converter driving a Model F terminal keyboard, you have to plug in the converter when the machine has already booted.  It does not work for hitting F2 to enter BIOS setup, for example.  Background thread

http://geekhack.org/showthread.php?29425

This is using the latest stable version of the converter code.
Title: XT/AT/PS2/Terminal to USB Converter with NKRO
Post by: kishy on Sun, 01 April 2012, 11:36:41
Quote from: ed_avis;563473
With a Dell M6300 (BIOS rev A14) and Windows XP x64 SP2, and the converter driving a Model F terminal keyboard, you have to plug in the converter when the machine has already booted.  It does not work for hitting F2 to enter BIOS setup, for example.  Background thread

http://geekhack.org/showthread.php?29425

This is using the latest stable version of the converter code.

Yeah, I've had troubles with a Dell Inspiron 630m doing the same thing. Presuming BIOS defect.
Title: XT/AT/PS2/Terminal to USB Converter with NKRO
Post by: ed_avis on Sun, 01 April 2012, 15:19:15
Strangely, although the M6300 does not recognize the Soarer-adapted keyboard for hitting F2 to enter Setup, it does work fine once you're in Setup.  But then once booted into Windows you have to disconnect and reconnect - which suggests it's not purely a BIOS issue?  (I imagine Windows talks to USB keyboards directly rather than via the BIOS.)

The Ziotek PS/2-to-USB adaptor on the same system had a different problem, where it would work if booting from cold but would require unplug and replug if resuming from suspend.
Title: XT/AT/PS2/Terminal to USB Converter with NKRO
Post by: Soarer on Sun, 01 April 2012, 15:29:16
There must be something peculiar that these machines have in common. I mean, they work with a regular USB keyboard, right?

Baffles me, because I am sending a basic, boot-compatible report, at all times!

The PS/2 to USB adapter is interesting, because it too will be a composite device. Perhaps the BIOS deals badly with all composite devices in some way, and has only been tested with the most basic of keyboards? It doesn't seem likely, but...

When Windows boots, it should be completely resetting all of the USB devices. I am at a loss to imagine what the BIOS can be doing to prevent this. Same presumably applies to any other OS these days.

I'm hoping that if this problem becomes more common a pattern will emerge that makes clear what is going on. It would certainly be useful to test as many composite devices as possible, to help in that.
Title: XT/AT/PS2/Terminal to USB Converter with NKRO
Post by: ed_avis on Mon, 02 April 2012, 04:05:47
Soarer I see that you are in the same country as me.  If you are near London and you want to borrow the laptop to investigate I could lend it for a week or two.  In the meantime I will also test it with a blue cube.
Title: XT/AT/PS2/Terminal to USB Converter with NKRO
Post by: Soarer on Mon, 02 April 2012, 17:54:56
Quote from: ed_avis;564466
Soarer I see that you are in the same country as me.  If you are near London and you want to borrow the laptop to investigate I could lend it for a week or two.  In the meantime I will also test it with a blue cube.

Many thanks for the offer! For me, that wouldn't be feasible for a month or two though, so plenty of time to think of other things to try on it in the meantime.

TBH, I was hoping that kishy's machine was a one-off, so I haven't put any effort in to try and sort this problem out at all yet :-) That you have the same problem makes it a higher priority... once I've released v1.0 I'll probably knock up some test versions for you and/or kishy to try out, if we haven't spotted anything before that.
Title: XT/AT/PS2/Terminal to USB Converter with NKRO
Post by: litster on Mon, 02 April 2012, 19:26:12
Quote from: litster;540413
Another question.  Could your converter work in this way?

Filco in PS/2 mode -> Soarer's Converter -> PC USB port == NKRO over USB?


Quote from: Soarer;543629
Yes.



Sweet!  I am going to get a few parts to build this.  I have Teensys at home ready to go.
Title: XT/AT/PS2/Terminal to USB Converter with NKRO
Post by: Morning Song on Sat, 07 April 2012, 17:44:59
Just a little report/question: I'm using one of the earliest teensy adapters, made by DFJ, and it seems mostly, but not all compatible--my un-jumpered 6011668 seems to be reporting this through hid_listen, with the 0.997 test:

Keyboard ID: AB83
Code set: 2 (extended)

wED rFE !!FEwED rFE !!FEwED rFE !!FE



Does this mean I'm out of luck with your firmware? (dfj's still works mostly, but has a couple pokeys that i hoped yours might fix.)
Title: XT/AT/PS2/Terminal to USB Converter with NKRO
Post by: Soarer on Sat, 07 April 2012, 18:30:03
Hey, that's an odd one! What's a 6011668? I'm guessing it's a 122-key terminal board that we'd expect to use code set 3...

In which case, I wonder why it's reporting its ID as AB83... and if we could change that, without any jumpers to swap around...

Or... there's an undocumented command that you could put in a config file, which would force it to use set 3... I haven't had anything like this to test it on yet though, so I can't guarantee it will work!!

Code: [Select]
force set3
Title: XT/AT/PS2/Terminal to USB Converter with NKRO
Post by: Morning Song on Sat, 07 April 2012, 19:04:12
Quote from: Soarer;570157
Hey, that's an odd one! What's a 6011668? I'm guessing it's a 122-key terminal board that we'd expect to use code set 3...

In which case, I wonder why it's reporting its ID as AB83... and if we could change that, without any jumpers to swap around...

Or... there's an undocumented command that you could put in a config file, which would force it to use set 3... I haven't had anything like this to test it on yet though, so I can't guarantee it will work!!

Code: [Select]
force set3

Er, whoops! It's a 6110668, not 6011668. (Same as, i believe, Sethstorm's).


 Force Set3+slightly modded legacy.sc for sane mapping did the trick, though. Additionally, that did change the keyboard ID to 0000, according to hid_listen.


and now that i actually took a look with a flashlight, there are some jumpers on the pins. Whoops! (I donated the dipswitch block to Kishy, and i thought he hadn't put any jumpers on the pins)

Sorry for the derpiness on my part.
Title: XT/AT/PS2/Terminal to USB Converter with NKRO
Post by: Soarer on Sat, 07 April 2012, 19:14:28
Quote from: Morning Song;570182
Er, whoops! It's a 6110668, not 6011668. (Same as, i believe, Sethstorm's).


 Force Set3+slightly modded legacy.sc for sane mapping did the trick, though. Additionally, that did change the keyboard ID to 0000, according to hid_listen.

Cool, 'force' works! Using it stops the converter querying the board at all, so it's no surprise that the ID is no longer reported correctly. (I should fix that. It hardly matters, but it's confusing).

Quote from: Morning Song;570182
and now that i actually took a look with a flashlight, there are some jumpers on the pins. Whoops! (I donated the dipswitch block to Kishy, and i thought he hadn't put any jumpers on the pins)

Sorry for the derpiness on my part.

Ahhh... so had you or kishy tried kishy's driver mods etc with that board before? IIRC that required the ID to be set to AB83, to fool Windows into thinking it was a normal 101-key 'board... fooled my converter too!
Title: XT/AT/PS2/Terminal to USB Converter with NKRO
Post by: Morning Song on Sat, 07 April 2012, 19:44:07
Exactly! Back in the Dark Times before you guys came out with these adapters, Kishy helped me with (read: Did all the real work because my cabling skills aren't worth crap) a cable mod, and i ended up trading dfj for one of his Teensy adapters several months later; his firmware didn't bother with supporting multiple keyboards, so it happily ignored the ID.

Incidentally, would it help at all for someone(i.e. me) to draw up a chart of the default mappings' symbolic names? I'm futzing with re-creating my wonky layout, and half put one together for my own reference. I could clean it up and toss it your way.
Title: XT/AT/PS2/Terminal to USB Converter with NKRO
Post by: Soarer on Sat, 07 April 2012, 20:51:13
Heh, I finally started to try and get some better documentation sorted out today! A diagram would be great! I should warn you that I've renamed all the FAKE codes (in v1.0, which is pretty much ready apart from the docs). They will have recognisable names - EXTRA_F1 to EXTRA_F10 for the Terminal board's left hand function keys, for example - all listed in the attached html. Actually, I had a go at a diagram a while back, based on one of John Elliot's SVGs, but it didn't work very well (long names vs. small boxes!) and never got finished :-(

[ATTACH=CONFIG]47751[/ATTACH]
Title: XT/AT/PS2/Terminal to USB Converter with NKRO
Post by: wcass on Sat, 07 April 2012, 21:16:44
i was thinking i would like to help with an .hta GUI wrapper for your code. it would work in Windows only, but once programed the keyboard would work with any OS.

if you are not familiar with .hta - it is like classic .asp, but requires no server. easy to read code, nothing to compile, can use css.
Title: XT/AT/PS2/Terminal to USB Converter with NKRO
Post by: Soarer on Sat, 07 April 2012, 22:23:18
Quote from: wcass;570268
i was thinking i would like to help with an .hta GUI wrapper for your code. it would work in Windows only, but once programed the keyboard would work with any OS.

if you are not familiar with .hta - it is like classic .asp, but requires no server. easy to read code, nothing to compile, can use css.

The more the merrier! I've managed to get the command line tools compiling on all platforms, so there would be that fall-back available for when a Windows box isn't handy. I'm no fan of IE though; I haven't touched it for years! :-)

One idea I had for making a cross-platform GUI was to make a minimal web server (accepting connections from localhost only, of course) that contained the command line tools' code. It wouldn't need to support much, just a form post or equivalent. That end of it I could write fairly easily. What I'm not experienced with is the browser side of it - javascript, dynamic web pages, etc.
Title: XT/AT/PS2/Terminal to USB Converter with NKRO
Post by: Morning Song on Sat, 07 April 2012, 23:35:24
My thoughts on the matter is that if there's a nice simple one-file way of including a windows GUI, there's less of a need for cross-platforming. On Linux, the command line is a little more easily available and comfortable.

Incidentally, here's a couple INCLUDE-able .sc files--the only bits of my layout that might be of wider interest.

Standard US Dvorak keyboard layout:
http://dl.dropbox.com/u/187059/dvorak.sc

Macintosh style layout for the Tenkey pad:
http://dl.dropbox.com/u/187059/macnumpad.sc

Sun Type 6 mappings for L1-L10 (Not compatible with Windows):
http://dl.dropbox.com/u/187059/sunkeys.sc
Title: XT/AT/PS2/Terminal to USB Converter with NKRO
Post by: alaricljs on Sun, 08 April 2012, 08:08:46
A gui could probably be built across the command line tools with AutoHotKey.
Title: XT/AT/PS2/Terminal to USB Converter with NKRO
Post by: Soarer on Sun, 08 April 2012, 17:55:04
It partly depends on what you all think a GUI should do! I know it wouldn't start off all singing and dancing, but it would be nice to make a roadmap for how it could get there.

There is one potential feature that might not work nicely just by running other programs: it would be very nice for the GUI to be able to grab a key-press, or a combination, from the converter. That would want to be the 'raw' internal code(s), rather than what is sent to the host already (i.e. before remapping for a key, and before macro expansion for a combination).

So, what do you all think a GUI should do, and look like?


MorningSong - thanks very much for sharing your config includes!
Title: XT/AT/PS2/Terminal to USB Converter with NKRO
Post by: SmallFry on Sun, 08 April 2012, 18:34:03
The gui should include a verbose just for debugging stuff:) Other than that, and being red (just because I like red) I have no real suggestions! Good Luck Soarer!
Title: XT/AT/PS2/Terminal to USB Converter with NKRO
Post by: Parak on Mon, 09 April 2012, 01:09:39
I think the GUI could basically just be a front end to the tools. One would select from a list the physical layout that they are using, and remap keys by pressing on them physically or in the GUI, and reassigning their raw codes to something else via a dropdown or similar. Applying the changes would save it in the .sc format and upload it to the converter. Conversely, it could be also made to open the .sc files for editing via the GUI.
Title: XT/AT/PS2/Terminal to USB Converter with NKRO
Post by: Soarer on Mon, 09 April 2012, 07:35:07
Heh, a minimal front-end could just be a text editor with a 'send to keyboard' button.

As in, _just_ enough to remove the need to open a command prompt  :-p

I started thinking about Java, and went looking to see what rawhid code there is around already. I found a project called waxbee (http://code.google.com/p/waxbee/), which has a Java config app that talks to a Teensy using JNI wrappers around the PJRC rawhid routines (http://code.google.com/p/waxbee/source/browse/WaxBeeConfig/rawhidlib/jni_stubs.c?r=12&spec=svn70). I think it might only support Windows currently, but could easily be made cross-platform. And most people have Java installed, I guess.
Title: XT/AT/PS2/Terminal to USB Converter with NKRO
Post by: fruktstund on Mon, 16 April 2012, 16:04:41
I'm a bit tired right now, and this might therefore be somewhat a stupid question, but I'll ask it anyway: would it be possible to use this converter for a USB keyboard (without using a USB -> PS/2 adapter)? I think it could've been nice to have all your keyboards remapped the same way, with the same function layers and so on.

Thanks for a great converter anyway. I used it a couple of weeks ago for an old XT keyboard I found, and it worked really well!
Title: XT/AT/PS2/Terminal to USB Converter with NKRO
Post by: Soarer on Mon, 16 April 2012, 18:04:09
Glad you find it useful!

USB-to-USB might happen at some point in the future - there is suitable hardware out there (the Vinculum 2 etc. - the Teensies just can't do it).

But I'll be honest... although I'd like to see such an adapter exist, I don't have much use for it personally. Or rather, there are a few other projects I'd like to play wiith first :-)
Title: XT/AT/PS2/Terminal to USB Converter with NKRO
Post by: litster on Mon, 16 April 2012, 21:37:57
Quote from: litster;540413
Another question.  Could your converter work in this way?

Filco in PS/2 mode -> Soarer's Converter -> PC USB port == NKRO over USB?


Quote from: Soarer;543629
Yes.



Quote from: litster;565097
Sweet!  I am going to get a few parts to build this.  I have Teensys at home ready to go.


Hi.  I just built a Soarer converter.  But I am running into some problem.  Here is the setup:

Teensy 2.0
V0.997 Soarer firmware
mini 6-pin DIN
Windows 7 64-bit

I got it to work when I connected an old Cherry G80 or G81 keyboard and set to PC (instead of AT) on the DIP switch.  All keys work.  But if I plug in a regular IBM Model M or a Filco over PS/2 connector, I only get "R06" as I type in the HID_LISTEN debug app.  

I will re-read the thread from the beginning to see if I missed anything.  Any hint would be much appreciated.  Thanks.

Edit: looks like I am having the same problem that 8_Inch_Floppy had (http://geekhack.org/showwiki.php?title=Island:17458&viewfull=1&page=10&do=comments#post349632), but there was no update on whether he fixed it or not.
Title: XT/AT/PS2/Terminal to USB Converter with NKRO
Post by: kishy on Tue, 17 April 2012, 06:09:16
Silly question, but are you unplugging the USB connector before changing keyboards?

Even on a converter, those interfaces are not supposed to be hotplugged.
Title: XT/AT/PS2/Terminal to USB Converter with NKRO
Post by: Soarer on Tue, 17 April 2012, 06:16:54
Aha, I hope it is just that!

It's the only thing I can think of that makes sense of the evidence.
Title: XT/AT/PS2/Terminal to USB Converter with NKRO
Post by: litster on Tue, 17 April 2012, 09:52:35
Hi.  I tried cold plugging different keyboards.  The result is the same.  On the old Cherry keyboards with DIP switch, the converter should be able to detect and work with the keyboard set to either PC mode or AT mode, correct?  Thanks.

Edit: I assume if I swapped wires and pins, it wouldn't work at all in either mode.  Since it works with at least one mode, that means wiring is correct, right?
Title: XT/AT/PS2/Terminal to USB Converter with NKRO
Post by: Soarer on Tue, 17 April 2012, 10:18:36
So you're plugging the keyboard into the converter, and then the converter into the PC, right?

Otherwise, yeah, the wiring must be sound for the XT mode to work.

Model M is known to work without problems (normally), so that's distinctly odd.

It's not the same as 8_inch_floppy's problem, that's a very specific issue relating to certain keyboards.

If you have hid_listen open and then plug in the converter with the M attached, is anything printed up?
Title: XT/AT/PS2/Terminal to USB Converter with NKRO
Post by: litster on Tue, 17 April 2012, 11:23:12
Quote from: Soarer;576976
If you have hid_listen open and then plug in the converter with the M attached, is anything printed up?

Thank you!  That was it!  I always connected the Teensy to the PC first, and then plug in a keyboard.  That is not the correct order.  The correct order should always be disconnect Teensy from PC, plug in keyboard through PS/2 connector, then connect Teensy to PC.  It is working now!  

Thank you!
Title: XT/AT/PS2/Terminal to USB Converter with NKRO
Post by: kishy on Tue, 17 April 2012, 11:55:29
Good to hear - and yes, hotplugging XT, AT or PS/2 interfaces is not really the best thing for them.
Title: XT/AT/PS2/Terminal to USB Converter with NKRO
Post by: Soarer on Tue, 17 April 2012, 11:55:56
Quote from: litster;577034
It is working now!

Phew!
Title: XT/AT/PS2/Terminal to USB Converter with NKRO
Post by: litster on Tue, 17 April 2012, 12:48:26
Soarer, is it possible to detect a disconnect of the PS/2 connection, and reset the Teensy when PS/2 connector is plugged back in?  That would stop noobs like me from screwing it up.
Title: XT/AT/PS2/Terminal to USB Converter with NKRO
Post by: Soarer on Tue, 17 April 2012, 13:14:13
Quote from: litster;577098
Soarer, is it possible to detect a disconnect of the PS/2 connection, and reset the Teensy when PS/2 connector is plugged back in?  That would stop noobs like me from screwing it up.

Hmm. Probably, with some work, but I'm not sure I want to encourage it! (There is a risk of damaging the Teensy).
Title: XT/AT/PS2/Terminal to USB Converter with NKRO
Post by: bhtooefr on Wed, 18 April 2012, 05:41:43
What about detecting the unplug, and then blinking an error condition? Or even having the Teensy spew out "DO NOT HOTPLUG KEYBOARDS, UNPLUG THE TEENSY FIRST" into the connected PC?
Title: XT/AT/PS2/Terminal to USB Converter with NKRO
Post by: litster on Wed, 18 April 2012, 15:52:19
Hehe, I thought more people need to know how cool Soarer's converter is, so I posted a new thread on the keyboard forum.  :D

Thanks Soarer for your awesome firmware!

http://geekhack.org/showthread.php?30466-Filco-NKRO-over-USB-for-REALZ!&p=578220#post578220
Title: XT/AT/PS2/Terminal to USB Converter with NKRO
Post by: Soarer on Wed, 18 April 2012, 22:08:28
Thanks for that! Hope you enjoy it, and find a use for some of the other features as well!

Was bound to attract at least one OCN-style know-it-all though... let's find out just how little he knows about USB :-)
Title: XT/AT/PS2/Terminal to USB Converter with NKRO
Post by: Soarer on Wed, 18 April 2012, 22:39:42
Been working on the docs a bit - any comments and/or tips would be welcome!

[ATTACH=CONFIG]48570[/ATTACH]
Title: XT/AT/PS2/Terminal to USB Converter with NKRO
Post by: REVENGE on Thu, 19 April 2012, 14:19:40
Quote from: Soarer;578542
Been working on the docs a bit - any comments and/or tips would be welcome!

(Attachment) 48570[/ATTACH]
Oh man, this looks great! I'll do a read through, let you know if I have any suggestions.
Title: XT/AT/PS2/Terminal to USB Converter with NKRO
Post by: Gawkbasher on Thu, 19 April 2012, 14:23:16
Very cool documentation.  Thanks!
Title: XT/AT/PS2/Terminal to USB Converter with NKRO
Post by: Soarer on Thu, 19 April 2012, 14:56:53
It's pretty much the first time I've messed with CSS, so, um, don't look at that!

The FAQ section will get some content... once I've skimmed through all 400 posts in this thread again :-D
Title: XT/AT/PS2/Terminal to USB Converter with NKRO
Post by: bhtooefr on Thu, 19 April 2012, 20:44:16
FWIW, you can do the navbar stuff in CSS, too - no need to do it in JavaScript.

Typo on the firmware page:

"Teensy++ (no longer vailable)"

Looks quite nice, though.
Title: XT/AT/PS2/Terminal to USB Converter with NKRO
Post by: Soarer on Thu, 19 April 2012, 21:27:43
Quote from: bhtooefr;579331
FWIW, you can do the navbar stuff in CSS, too - no need to do it in JavaScript.
The navbar is done in CSS, but effectively it's a client-side include I really wanted... just happened to find a .js solution and moved on to something else... it would be great if there's a neater way :-)

Quote from: bhtooefr;579331
Typo on the firmware page:

"Teensy++ (no longer vailable)"

Looks quite nice, though.

Thanks! Going for a simple and clean look, mainly because I can't be bothered too much with two sets of styles for print and screen! Also, content is key, at this stage.
Title: XT/AT/PS2/Terminal to USB Converter with NKRO
Post by: Soarer on Mon, 23 April 2012, 07:33:12
(I posted this yesterday, then a database rollback killed it...)

Happy Birthday to my Converter!!!

One year old today!!!


To celebrate, I present v1.0, with these new and improved features...



(Be warned: I've rushed this out, and haven't fully tested it all yet!)
Title: XT/AT/PS2/Terminal to USB Converter with NKRO
Post by: Zorael on Mon, 23 April 2012, 12:03:36
Quote from: Soarer;579614
Happy Birthday to my Converter!!!

One year old today!!!

Congratulations!

Pre-built linux tools sounds awesome! Excuse me if I'm sobbing; I've just spent the better part of yesterday putting together a patch (http://pastie.org/3815490) to fix compilation on linux (including a Makefile) which is all suddenly hopelessly irrelevant! ;'3


I'm preparing to solder my new Teensy2 onto the controller board of an old Model M keyboard (the 8P5C terminal connector kind), but I'm still at the point where I need to drill holes for bolts. I had to take it apart to clean it out properly and replace some springs. Besides finding a proper config to flash, still remaining is to figure out which controller board surfaces and joints to solder to! D: (any help/pointers/links appreciated)

Quote from: Soarer;539989
Quote from: SmallFry;539786
Will you ever open source your code? I know I've asked before, but can't recall off hand.

I really don't know if or when. Once done it cannot be undone - last time I started thinking about it I got bogged down in trying to decide what license to use (and I still don't really like any of them). All I can honestly say is that it might happen eventually, but it's not at all high up on my to-do list.

Do I understand it correctly then that the tools are open source, but the firmware itself is not? If so, that's a bummer. :( You're certainly free to do with your software as you wish! I had just hoped to learn from it.
Title: XT/AT/PS2/Terminal to USB Converter with NKRO
Post by: Soarer on Mon, 23 April 2012, 12:54:40
Quote from: Zorael;579916
Congratulations!
Thanks! And welcome to geekhack!

Quote from: Zorael;579916
Pre-built linux tools sounds awesome! Excuse me if I'm sobbing; I've just spent the better part of yesterday putting together a patch (http://pastie.org/3815490) to fix compilation on linux (including a Makefile) which is all suddenly hopelessly irrelevant! ;'3
Oh man, I'm really sorry :-(  There were a few posts about porting a while back (but they might've been lost in one of the rollbacks).

Your patch looks pretty interesting - my build is lame by comparison, I fear!

Quote from: Zorael;579916
I'm preparing to solder my new Teensy2 onto the controller board of an old Model M keyboard (the 8P5C terminal connector kind), but I'm still at the point where I need to drill holes for bolts. I had to take it apart to clean it out properly and replace some springs. Besides finding a proper config to flash, still remaining is to figure out which controller board surfaces and joints to solder to! D: (any help/pointers/links appreciated)
Hmm, I guess you might be able to trim an IDC connector to fit where the cable plugs onto the controller. Maybe from a USB header, if 2x5 pins would cover the ones you need.

Quote from: Zorael;579916
Do I understand it correctly then that the tools are open source, but the firmware itself is not?
That's right, yes. The tools need to be open IMO because you shouldn't run exes from anonymous people without being able to check them somehow! :-)
Title: XT/AT/PS2/Terminal to USB Converter with NKRO
Post by: andrewjoy on Wed, 25 April 2012, 06:00:40
will this work on the rubber dome wise boards also ? i got one off ebay quite cheap i was expecting plate mounted blacks but this is one of the best rubber domes i have typed on what to convert it and use it at work ( i cannot have a loud keyboard :(
Title: XT/AT/PS2/Terminal to USB Converter with NKRO
Post by: Soarer on Wed, 25 April 2012, 06:10:30
I don't know the keyboard - any idea what protocol it uses? What connector?
Title: XT/AT/PS2/Terminal to USB Converter with NKRO
Post by: andrewjoy on Wed, 25 April 2012, 08:24:34
it uses a phone type connector similar to other terminal boards

i am amusing it uses the terminal scan codes but i cannot be sure i will get a modelf number when i get home
Title: XT/AT/PS2/Terminal to USB Converter with NKRO
Post by: John Boone on Wed, 25 April 2012, 11:38:31
Quote from: Soarer;579614

Reduced hex size (now fits in 16KB, just)


Congrats and happy birthday for your Converter !

I would like to know if it is possible to run the code on an ATmega16U4, which has less ram (only 16kB) ?

Thx
Title: XT/AT/PS2/Terminal to USB Converter with NKRO
Post by: Soarer on Wed, 25 April 2012, 13:45:16
Quote from: John Boone;581868
Congrats and happy birthday for your Converter !
Thanks!

Quote from: John Boone;581868
I would like to know if it is possible to run the code on an ATmega16U4, which has less ram (only 16kB) ?
Yes, it can, with some caveats...

First, it won't fit with the standard Atmel DFU bootloader (which is 4KB), so some other means of loading the firmware has to be used.

Second, the 16U4 has less RAM, so that limits how complex you can make your config (re. layers and onbreak macros).

Third, it's completely untested, since I don't have a 16U4. I'm pretty sure that it will work fine, but I had to admit that!

That said, there is a 16U4 hex file in the v1.0 zip :-)
Title: XT/AT/PS2/Terminal to USB Converter with NKRO
Post by: John Boone on Mon, 30 April 2012, 18:40:15
Thanks for the answer, well I will stick with the 32k version as for now, since i am not very experienced and don't know yet what will be my future needs.

Another little question, i saw that there is a "RC" version of the ATmega32U4, but could your code run on a RC clocked MCU ? It would be clocked at only 8mhz instead of the 16mhz of the cystal quartz "powered" teensy v2.0.
Title: XT/AT/PS2/Terminal to USB Converter with NKRO
Post by: Soarer on Tue, 01 May 2012, 05:37:09
Quote from: John Boone;586774
Thanks for the answer, well I will stick with the 32k version as for now, since i am not very experienced and don't know yet what will be my future needs.
Unless you already have some 16k chips, then it's definitely worth going for the 32k. It's not hugely complicated to program them another way, but it does mean buying a programmer, or adapting another USB dev board to be a programmer.

Quote from: John Boone;586774
Another little question, i saw that there is a "RC" version of the ATmega32U4, but could your code run on a RC clocked MCU ? It would be clocked at only 8mhz instead of the 16mhz of the cystal quartz "powered" teensy v2.0.
No, it needs the 16MHz crystal. The RC oscillator isn't good enough for full-speed USB.
Title: XT/AT/PS2/Terminal to USB Converter with NKRO
Post by: REVENGE on Sun, 27 May 2012, 02:09:57
Woo, busted out the Unsaver tonight. Converter works great, and now I finally have the layout I've always wanted!

One note: it might be handy if you could include PS/2 set 1 make codes in your manual side by side with the HID codes. I use Aqua's key test which prints out the PS/2 make codes, so I had to go grab the Translate.pdf from Microsoft to do a lookup.
Or: you could also make a note that LANG_4 is the center key in the arrow cluster for 122s. :D
Title: XT/AT/PS2/Terminal to USB Converter with NKRO
Post by: Soarer on Sun, 27 May 2012, 05:24:48
BTW: LANG_4 is the center key in the arrow cluster for 122s. :-p

There is an easier way to find that out - HID codes are printed to the hid_listen output as +XX / -XX, and the HID code list in the docs is in numeric order ;-)

Actually, that's the best way because then you know the code that needs to be remapped, rather than seeing the code after any remappings you might already have. (Of course, if you haven't loaded any remaps, it's the same thing!)
Title: XT/AT/PS2/Terminal to USB Converter with NKRO
Post by: REVENGE on Sun, 27 May 2012, 14:19:13
Quote from: Soarer;601190
BTW: LANG_4 is the center key in the arrow cluster for 122s. :-p

There is an easier way to find that out - HID codes are printed to the hid_listen output as +XX / -XX, and the HID code list in the docs is in numeric order ;-)

Actually, that's the best way because then you know the code that needs to be remapped, rather than seeing the code after any remappings you might already have. (Of course, if you haven't loaded any remaps, it's the same thing!)
Good tip, thanks!
Title: XT/AT/PS2/Terminal to USB Converter with NKRO
Post by: Soarer on Thu, 31 May 2012, 15:23:26
New version which fixes a bug that stopped jump to bootloader functions working on AT90USB1286 (Teensy++ 2.0). Not quite sure why the ATmega32U4 (Teensy 2.0) wasn't affected - it would've been jumping into the middle of the bootloader instead of the beginning!!

Just the .hex files in this zip, you still need the v1.0 zip for the tools and docs.

[ATTACH=CONFIG]51924[/ATTACH]
Title: XT/AT/PS2/Terminal to USB Converter with NKRO
Post by: Soarer on Tue, 05 June 2012, 17:20:31
Quote from: ed_avis;563473
With a Dell M6300 (BIOS rev A14) and Windows XP x64 SP2, and the converter driving a Model F terminal keyboard, you have to plug in the converter when the machine has already booted.  It does not work for hitting F2 to enter BIOS setup, for example.  Background thread

http://geekhack.org/showthread.php?29425

This is using the latest stable version of the converter code.


Quote from: kishy;563521
Yeah, I've had troubles with a Dell Inspiron 630m doing the same thing. Presuming BIOS defect.


We can add Dell Latitude D800 to that list :-(

At least I have one to play with, so if I could just think of some things to test... :-D
Title: Linux/Ubuntu 12.04 problem with Teensy
Post by: fohat.digs on Tue, 05 June 2012, 21:43:23
I have installed 12.04 as a dual-boot with Windows 7, and the OS does not seem to recognize the Model F-122 keyboard anymore.

Can you suggest some way to wake it up? Do I need to download some sort of driver for the Teensy?

All was OK in 10.04

Thanks!
Title: XT/AT/PS2/Terminal to USB Converter with NKRO
Post by: Soarer on Wed, 06 June 2012, 07:18:31
Oh crap - what have they gone and done! :-(

No driver needed, it should be all there already, it's just HID. Apart from plugging it in after booting I can't think of any other way to wake it up.

One thing I noticed on the Dell is that some of it is still active - two devices show up in device manager. I haven't checked which yet, but it appeared to be the dummy keyboard and the hid_listen output (it connects, but no debug print gets to it). The lock LEDs still toggle. So maybe I've got something slightly out-of-spec which is upsetting both the Dell and Ubuntu 12.04.

So it would be helpful if you could try some tests...
1. see if hid_listen still connects
2. connect a keyboard with lock LEDs to the converter and see if they toggle (using another keyboard to press caps lock etc, obviously!)
3. see if v0.996 works, since that's the last one before the config interfaces were added
Title: XT/AT/PS2/Terminal to USB Converter with NKRO
Post by: alaricljs on Wed, 06 June 2012, 07:37:10
Also check if the USB on the other side of the Dell works.  I haven't been able to find references to it but I would have swore that one side provided less power, it might be enough to upset the teensy.
Title: XT/AT/PS2/Terminal to USB Converter with NKRO
Post by: kishy on Wed, 06 June 2012, 08:07:16
Quote from: alaricljs;608452
Also check if the USB on the other side of the Dell works.  I haven't been able to find references to it but I would have swore that one side provided less power, it might be enough to upset the teensy.


FWIW, all of my tests on the 630m involved all 4 ports (which are on the same "side", right hand, two on the side and two on the back).

Not seeing any issues yet, again FWIW, with my Lenovo ThinkPad W520 via the dock or built in ports. Win7 Pro 64 bit.

The Dell Vostro 3750 that I owned for a brief time also had boot-up issues with Soarer's adapter - but only AFTER a BIOS update. The version that was on mine when it shipped worked fine, after an update it started killing the adapter on boot.
Title: XT/AT/PS2/Terminal to USB Converter with NKRO
Post by: alaricljs on Wed, 06 June 2012, 08:10:56
My D820 and e6410 both have opposite side USB ports, I was under the impression that 6xx series were quite similar to the 8xx.
Title: XT/AT/PS2/Terminal to USB Converter with NKRO
Post by: Soarer on Wed, 06 June 2012, 08:40:25
Actually, on the D800 (A11 BIOS) it seems to work OK from a cold boot, but not on restart :-/

Doesn't seem like a power issue, but I could try an external powered hub to be sure.
Title: XT/AT/PS2/Terminal to USB Converter with NKRO
Post by: Soarer on Wed, 06 June 2012, 11:12:04
Hmm... so on this Dell actually all devices are showing up. Strangely, the scinfo command manages to get info so the config pipes are (sort of*) working, and as I said, LED output seems fine too. But there is no input to hid_listen, even though it connects.

* USBlyzer reports the scinfo output request as successful, but not the input response. Even though scinfo gets and displays a response!
Title: XT/AT/PS2/Terminal to USB Converter with NKRO
Post by: Soarer on Fri, 08 June 2012, 13:38:48
I not sure that this D800 has the quite same problem as those other Dells. On this one, my converter only stopped working if I pressed F2 (or any key) before the BIOS had turned on the USB, or after it had turned it off and before Windows had turned it back on. (I think!). There is an A13 BIOS I could upgrade to and test.

I have managed to fix that bug though - the converter was getting stuck trying to wake up the PC when it was already awake. There's a couple of USB commands that I wasn't handling which enable and disable remote wakeup, so I've added handlers for them which fixed it. I've also reset a couple of internal state tracking flags when the USB connection is reset, as a precaution, since if they are wrong it could prevent any output from the converter.

Here's a new version with those fixes. I doubt it, but there is a slim chance it might fix the Dells and Ubuntu 12.

[ATTACH=CONFIG]52483[/ATTACH]
Title: XT/AT/PS2/Terminal to USB Converter with NKRO
Post by: fohat.digs on Fri, 08 June 2012, 15:32:59
I don't know about anybody else's Ubuntu 12.04 problem, but mine was fixed immediately after I booted up using a (Dell) PS2 keyboard and then plugging in the F/Teensy "hot" to the USB port.

I had read about that from other people, but I never had to do it before, it had always worked for me right away.
Title: XT/AT/PS2/Terminal to USB Converter with NKRO
Post by: Soarer on Fri, 08 June 2012, 15:48:33
Quote from: fohat.digs;609928
I don't know about anybody else's Ubuntu 12.04 problem, but mine was fixed immediately after I booted up using a (Dell) PS2 keyboard and then plugging in the F/Teensy "hot" to the USB port.

I had read about that from other people, but I never had to do it before, it had always worked for me right away.

Interesting... that actually makes it more similar to the Dell laptops' problem, in that something's going wrong during boot that can be worked-around by connecting the Teensy later. Or do you mean it now works through bootup, now that you've done that once?
Title: XT/AT/PS2/Terminal to USB Converter with NKRO
Post by: fohat.digs on Fri, 08 June 2012, 17:33:19
Yes, I think that it just had to recognize the USB device once, smooth sailing after that.
Title: XT/AT/PS2/Terminal to USB Converter with NKRO
Post by: Soarer on Fri, 08 June 2012, 17:40:09
Ah good. Just these pesky Dells to deal with now then! :-D
Title: XT/AT/PS2/Terminal to USB Converter with NKRO
Post by: AKIMbO on Mon, 18 June 2012, 19:07:28
Hey guys I need a little help with my teensy install.  I'm converting an XT to usb.  I want to wire the AT cable directly to the teensy and keep everything internally within the XT chasis.

I know I wire these 4 cables to GND, VCC, PF0 (clock), and PF1 (data).  But which wire colors correspond to those pins?
This is what I'm looking at when I open my XT.

(http://i50.tinypic.com/rh1gt3.jpg)
Title: XT/AT/PS2/Terminal to USB Converter with NKRO
Post by: Soarer on Mon, 18 June 2012, 20:01:44
Brown = Vcc
Red = Ground
White = Data
Black = Clock

:-)
Title: XT/AT/PS2/Terminal to USB Converter with NKRO
Post by: AKIMbO on Mon, 18 June 2012, 21:31:17
Quote from: Soarer;616598
Brown = Vcc
Red = Ground
White = Data
Black = Clock

:-)

Thank you so much Soarer.  I was pulling my hair out and second guessing myself with these wire colors.  I would have soldered them all wrong.  I`m typing this up right now on my XT.  Thanks for the guide, your help, and the awesome coding!
Title: XT/AT/PS2/Terminal to USB Converter with NKRO
Post by: Soarer on Tue, 19 June 2012, 06:53:56
Quote from: AKIMbO;616661
Thank you so much Soarer.  I was pulling my hair out and second guessing myself with these wire colors.  I would have soldered them all wrong.  I`m typing this up right now on my XT.  Thanks for the guide, your help, and the awesome coding!

Haha, yeah, IBM (and Cherry) sure did pick some unintuitive colours! Good to hear of another success :-)
Title: XT/AT/PS2/Terminal to USB Converter with NKRO
Post by: Paranoid on Tue, 19 June 2012, 13:13:59
Hi everyone. I'm also trying to convert XT to USB (IBM model F), but when I wire it like mentioned above I don't get any result (doesn't seem to connect at all) and the teensy gets really hot! Any idea's why this is happening? I've tried v0.996 and v1.0.
Title: XT/AT/PS2/Terminal to USB Converter with NKRO
Post by: Soarer on Tue, 19 June 2012, 14:36:57
Quote from: Paranoid;617116
Hi everyone. I'm also trying to convert XT to USB (IBM model F), but when I wire it like mentioned above I don't get any result (doesn't seem to connect at all) and the teensy gets really hot! Any idea's why this is happening? I've tried v0.996 and v1.0.

Ouch, that doesn't sound good at all - the Teensy shouldn't even be warm :-(

Where the wire colours on the same pins as in akimbo's pic?
Might you have (or had) a short circuit between any wires?
If you disconnect the teensy from the keyboard, does it still get hot?
Title: XT/AT/PS2/Terminal to USB Converter with NKRO
Post by: Paranoid on Tue, 19 June 2012, 14:46:55
The wire colours are in the same order as in the picture (brown-red-white-black) with the tip of the connector facing upwards.
Could be that when I was testing it at first some wire pins might have touched, but now I soldered the wires so a short circuit now shouldn't exist.
If I connect only the teensy it doesn't get hot and I can still program it.

Does it matter where you connect the VCC and GRND? Because there are connections at the USB port and on the other side of the teensy board.. (I've tried both btw after the teensy wouldn't do anything)
Title: XT/AT/PS2/Terminal to USB Converter with NKRO
Post by: Soarer on Tue, 19 June 2012, 16:21:46
Either Vcc and GND are fine. Hate to say it, but I think somehow the Teensy has died :-( There was someone else who had a short happen, a bit more dramatic... thread (http://geekhack.org/showthread.php?27401-Need-help-with-my-Teensy-Model-F).
Title: XT/AT/PS2/Terminal to USB Converter with NKRO
Post by: Paranoid on Wed, 20 June 2012, 02:36:12
Damn that would suck! I also can connect it to my computer and run and load the LED blinking program like the guy in your link. But I did do something before, that you mentioned in that post, when I was trying to find the correct wires (and apparantly measured it wrong the first time):
"I don't know what dies (if anything) if you apply +5V and GND swapped over - and I'm not about to try it! " - So I did actually switch GRND and VCC..
Stupid that I can't test something else to see if it works! Is there any way PJRC has a return policy or would it mean that I have to buy another one? I can't seem to find anything on their website.
Title: XT/AT/PS2/Terminal to USB Converter with NKRO
Post by: Soarer on Wed, 20 June 2012, 07:44:09
Reversing Vcc and GND is more likely to damage the keyboard than the Teensy, and I'm not sure if it would explain why the Teensy gets hot. (The power comes straight from the USB port, so it doesn't pass through the chip).

You said measure... does that mean you have a multimeter?

A basic test for the Teensy would be to load my firmware (any version), and measure the voltage on the clock and data pins (with no keyboard connected) - they should show 5V, if not, the chip is damaged. Then connect both clock and data to ground - it shouldn't get hot, if it does the chip is damaged.

A basic test for the XT keyboard is similar, but first I'd measure the current the keyboard is taking when connected (just to power; leave the clock and data lines disconnected). It should be between 100mA and 125mA. Then measure the clock and data line voltages - clock should show 5V, and data should show 0V. Then I'd go back to measuring the current the keyboard is taking, and short the clock and data lines to GND - the current should increase, but only by a few mA. (If you can't read the current or aren't comfortable with that, then it's still worth testing the voltages on the clock and data lines).
Title: XT/AT/PS2/Terminal to USB Converter with NKRO
Post by: Paranoid on Wed, 20 June 2012, 13:16:45
Yes, I do have a multimeter :)

I did the test that you asked. Let me sum it up:
Basic test for teensy:
 - voltage on clock and data pins with no keyboard connected: both 5V
 - clock and data to ground: the teensy (or usb cable for that matter) does not get hot

Basic test for the keyboard:
 - Current of the keyboard (only with power): 0,024A = 24mA
 - Data and clock voltage: both 0V, power dropped to 0,8V
 - Current of the keyboard (clock and data to grnd): 0,097 - 0,1A = 100mA
 - Data and clock voltage: both 0,02V, power also 0,8V
In all these cases the teensy and cable get hot.

I would say that there is something wrong with the keyboard then?
Title: XT/AT/PS2/Terminal to USB Converter with NKRO
Post by: Soarer on Wed, 20 June 2012, 14:26:21
I dunno... something doesn't quite add up :-)

I don't see how the Teensy would get hot when just power and ground are connected to the keyboard, and the keyboard is only drawing 24mA!

And not sure how enough current is flowing (somewhere) that the cable can get hot, without the computer just switching off the port and giving a warning.

I'm reluctant to ask you to do too many tests, since it getting hot could damage something more!

So, I'll have to think for a while :-)

Just to check - I'm imagining measuring the current goes something like this:

[attachimg=1]
Title: XT/AT/PS2/Terminal to USB Converter with NKRO
Post by: Paranoid on Wed, 20 June 2012, 15:16:15
yes that's exactly how I did the current measurement. Maybe there's something wrong with the circuit board on the keyboard.
I'll see tomorrow evening if I can connect the teensy to another keyboard (with XT or AT) that doesn't work through a passive converter. If that works I'll probably know more.
Thanks for the help so far!
Title: XT/AT/PS2/Terminal to USB Converter with NKRO
Post by: REVENGE on Thu, 21 June 2012, 01:03:30
You could double check the wire config by using a multimeter and testing for continuity between the known XT pin-outs and the contacts on the internal connector.
Title: XT/AT/PS2/Terminal to USB Converter with NKRO
Post by: Paranoid on Thu, 21 June 2012, 02:07:02
Hi Revenge,
I checked that in the beginning. The VCC, ground and data were correct, only the clock was on pin 3 instead of pin 1. Don't really know if that's a bad thing.
But I connected the teensy either directly on the circuit board pins or through the cut wires of the connector.
Title: XT/AT/PS2/Terminal to USB Converter with NKRO
Post by: Soarer on Thu, 21 June 2012, 06:30:15
Quote from: Paranoid;618482
The VCC, ground and data were correct, only the clock was on pin 3 instead of pin 1. Don't really know if that's a bad thing.

I think that means you were reading the pinout diagram backwards - it's drawn looking looking into a socket, so you need to mirror it when looking into a plug.
Title: XT/AT/PS2/Terminal to USB Converter with NKRO
Post by: Paranoid on Thu, 21 June 2012, 07:15:04
hehe, that would explain why I got the grnd and vcc wrong the first try ^^ the pins and wires are correct then.

*update: so I hooked up my Cherry G80-0779H (that doesn't work through a passive converter) to the teensy and it works! With v0.996 it wouldn't work (just tried it real quick), but with v1.0 it does work :)
So the teensy isn't broken hooray!

Less hooray is that there is something wrong with the model F.. any clues as what could cause this?
There doesn't seem to be anything slighty burned on the circuit board. Although that doesn't really tell us anything. (the white stuff is from the sticky thing that's covering the board)
[ATTACH=CONFIG]53572[/ATTACH][ATTACH=CONFIG]53573[/ATTACH][ATTACH=CONFIG]53574[/ATTACH][ATTACH=CONFIG]53575[/ATTACH][ATTACH=CONFIG]53576[/ATTACH][ATTACH=CONFIG]53577[/ATTACH]
Title: XT/AT/PS2/Terminal to USB Converter with NKRO
Post by: Soarer on Fri, 22 June 2012, 15:34:06
Sorry, I missed the update :-)

I'm still puzzled why the teensy and cable get hot, with the keyboard apparently only taking 24mA of current... that doesn't make any sense!

If it wasn't for that, I would agree that the keyboard has been damaged.
Title: XT/AT/PS2/Terminal to USB Converter with NKRO
Post by: Parak on Sat, 23 June 2012, 22:26:54
For my second F122 refurbishment, I took some of these (http://www.ebay.com/itm/130682956953) that I had lying around and four pin headers with the posts removed bent slightly at the end:

[ATTACH=CONFIG]53798[/ATTACH]

Apply shrinkwrap:

[ATTACH=CONFIG]53799[/ATTACH]

Now that I think about it, this would have been better if I soldered the pins from the back instead. Oh well.
Title: XT/AT/PS2/Terminal to USB Converter with NKRO
Post by: Soarer on Sat, 23 June 2012, 23:06:59
That's pretty neat :-)

Put the pins on the back you mean? But then you'd have bits sticking out on both sides!
Title: XT/AT/PS2/Terminal to USB Converter with NKRO
Post by: Parak on Sun, 24 June 2012, 00:47:44
It would have looked a bit neater as the d0/d1 pins could have been flush, but then I guess there also would have been a slight worry with the teensy being all covered up by the heatshrink and the button being possibly permapressed..
Title: Re: XT/AT/PS2/Terminal to USB Converter with NKRO
Post by: fohat.digs on Thu, 23 August 2012, 14:45:16
I am probably just dense or incompetent, but here are 2 questions:

1. How to I get to the original article and instructions? I can get this thread, but not the article itself. I want to re-read the instructions from the beginning.

2. Can multiple Teensies be run simultaneously?

I have an F-122 with internal Teensy that I cut, wired, and installed last year, and have been running flawlessly since, including surviving a format and upgrade from XP to 7 with no additional work on my part (Wow!).

Now I have a new keyboard Teensy which I want to install in an outboard box with a socket to accept original cables. I would also like to upgrade to the latest firmware/software "just because" it seems to make sense.

First, if 2 Teensies are plugged in via USB, will my computer be confused? Should I use a conventional keyboard while setting up the new Teensy?

Second, what is involved in upgrading from 0.997 or whatever to 1.02?

Thanks!
Title: Re: XT/AT/PS2/Terminal to USB Converter with NKRO
Post by: Soarer on Thu, 23 August 2012, 15:36:55
1. The article has moved to the first post in this thread ;)

2. Depends...
Day-to-day regular use - yes.
Loading new .hex file with PJRC utility - yes (as long as only one Teensy is reset at a time).
Using hid_listen, scinfo, scboot, scwr, or scrd - no (they will only talk to the first one they find).

So, don't worry about having two plugged in, until you want to debug it or load a config! You should be able to get the new keyboard (running through the new adapter) basically working, at which point you should unplug the old one to allow any config to be loaded. If it doesn't all go smoothly, it might be easier to connect some other keyboard while trying to get the new one working, or to get its config sorted to your satisfaction :D

Upgrading might be as simple as just loading the new hex file. I can't remember if the config would need to be recompiled and reloaded as well, but I'm pretty sure the config text would not need to be modified at all.
Title: Re: XT/AT/PS2/Terminal to USB Converter with NKRO
Post by: neocalm on Sun, 26 August 2012, 11:46:34
Hello Soarer!

What a fantastic project, with my beginner skills I never thought I would be able to do anything with a 122-key Unicomp UB40856 keyboard, a $9 castaway from eBay. 

But a Teensy later.. it's been great so far!  Thank you very much!!

My only question is that I find very little about this UB40856 model and the keyboard doesn't quite work as I expect.  It's Keyboard Identifier is "0xAB 0x86".

More ominously, in the instructions you post:

Quote
If your terminal keyboard is not operating correctly, it might be because the wrong ID is set on the switches/jumpers. The first byte should not be AB.

When I look up "0xAB 0x86" I see there are several references to that Keyboard Identifier as:

1. The IBM 1397000 Terminal Emulator Keyboard "IBM Personal System/2 Host Connected Keyboard"

http://www.seasip.info/VintagePC/ibm_1397000.html (http://www.seasip.info/VintagePC/ibm_1397000.html)

2. The Affirmative 1227T keyboard (Unicomp)

http://www.seasip.info/Misc/1227T.html (http://www.seasip.info/Misc/1227T.html)

So why is "AB" so bad?  It looks like a complicated scancode map so I'm first going to see if this Unicomp has the JP3 "fix" that simplifies things (like the UB40T56)

http://geekhack.org/index.php?topic=10985.60 (http://geekhack.org/index.php?topic=10985.60)

Later on I'd love to see if I can extend this to Bluetooth HID!  But: first things first.

Thanks again!

neocalm
Title: Re: XT/AT/PS2/Terminal to USB Converter with NKRO
Post by: Soarer on Sun, 26 August 2012, 13:16:58
Well, AB1 is only 'bad' because it is used to identify the regular 101/102-key keyboards, and when the converter sees that code it uses set 2 to talk to the keyboard. The full terminal boards use set 3, and also need a command sent to them to get them to send release codes. Usually the only time they end up with an AB code is when someone has been playing with the jumpers!

However, some of the terminal emulator keyboards use set 2 by default - if you are not getting keys stuck down, could this be what you have? AFAIK, these keyboards have a normal PS/2 connector. Does pressing F13 output Shift+F1, for example? In that case, the JP3 fix would be useful indeed!


1 Actually, AB85 is an exception, and the converter uses set 3 for it.
Title: Re: XT/AT/PS2/Terminal to USB Converter with NKRO
Post by: neocalm on Mon, 27 August 2012, 23:43:09
Thanks, that makes sense on why "AB" is bad. 

Turns out that the board has no "JP3" populated - however, when I remove a "JP2" the Keyboard ID goes to "BFBF" which the Converter recognizes as Set 3.

Yes, the keyboard does have a normal PS/2 connector and it was shift-F1 for F13.

With Set 3 / JP2 removed, (or I suppose - with the Converter forced to Set 3) the scan codes look exactly like:

http://www.seasip.info/VintagePC/ibm_1397000.html

under "Set 3".

The only discrepancy is that the "7E" (numlock *) actually produces a Scroll Lock LED On on top of the Star - but I think that's coming from the Converter, not the keyboard itself.

To confuse me further I figured out that the Left Alt key didn't work with this particular keyboard, so it's off to repair that buckling spring. 

Anyway to summarize: With Set 3 forced I can map this whole "AB86" keyboard and enjoy the other keys!

Thanks again!

neocalm

Title: Re: XT/AT/PS2/Terminal to USB Converter with NKRO
Post by: Soarer on Tue, 28 August 2012, 05:48:04
Excellent!

Actually, the 'force' command only forces the converter to listen for set 3, it doesn't try to put the keyboard into a set 3 mode. That might be a feature I'll add at some point, but I would probably still use the jumper method for these keyboards.

There are always some discrepancies on those keys around the numpad, just because there's a variety of different legends used on different 122-key keyboards! Getting keys setup how you like them will probably mean doing a bit of remapping in the config file, and probably swapping some keycaps around as well!

Shame about the Left Alt - have you tried refitting the keycap a few times? That's sometimes all that's needed if a spring gets dislodged during shipping.
Title: Re: XT/AT/PS2/Terminal to USB Converter with NKRO
Post by: neocalm on Thu, 30 August 2012, 23:41:25
That's great to know the Converter doesn't set the Set.  So I did do something!  :)

Editing the config file and swapping keycaps has been a cinch.  You've really got a quality product here!

One dumb question: Is it possible to "remapblock" using actual HID Codes (e.g. "0x43") instead of <from_hid> names (e.g. "F9")?

Unfortunately, the left Ctrl key is acting up so I think there's definitely an issue there.  Off to the "bolt mod". 

And after that - I just purchased a Bluetooth HID module to see if I can get the Teensy/Converter to speak Bluetooth HID as well as USB HID. 

Thanks again Soarer - fantastic Converter!

neocalm
Title: Re: XT/AT/PS2/Terminal to USB Converter with NKRO
Post by: Soarer on Fri, 31 August 2012, 16:23:09
One dumb question: Is it possible to "remapblock" using actual HID Codes (e.g. "0x43") instead of <from_hid> names (e.g. "F9")?
It isn't. I thought about it, but never got round to adding it, because it didn't really seem worth it! (After all, most key names are fairly obvious, so it would only help on the few oddball ones that you need to look up in the list otherwise).

And after that - I just purchased a Bluetooth HID module to see if I can get the Teensy/Converter to speak Bluetooth HID as well as USB HID.
Hmm, I'm not sure how that fits in, but carry on! :D
Title: Re: XT/AT/PS2/Terminal to USB Converter with NKRO
Post by: neocalm on Sat, 01 September 2012, 12:47:28
... well that ended pretty quick :(

(http://i49.tinypic.com/34g99ns.jpg)

I was all set for the "bolt-mod" with all the required bolts and nuts.  But!

Turns out that it wasn't the buckling spring or anything else.  This is my naked keyboard - three plastic sheets.  No matter how hard I press "Left-ALT" there's nothing.  I tried to sand down the contact, clean the contact - nothing.  Looks dead.  (The Converter is a great debug tool with the "naked" keyboard, by the way - thanks! :) )

And with 121 other functional keys, Left-ALT is a hard one to live without!!!

Well... looks like I paid $20 for a bunch of key caps and buckling springs... :(  (And a backup keyboard controller)

Off to find a fully functional (but cheap) keyboard!

neocalm

Title: Re: XT/AT/PS2/Terminal to USB Converter with NKRO
Post by: Soarer on Sat, 01 September 2012, 14:14:05
How frustrating :(

I guess that means that one of those traces on the plastic sheets has a break in it somewhere. If you can locate the break, then maybe some conductive paint would fix it, I dunno. Not sure if it's worth it unless you happen to have such paint already though. Alternatively, Unicomp might sell you just the membrane!
Title: Re: XT/AT/PS2/Terminal to USB Converter with NKRO
Post by: N8N on Sat, 01 September 2012, 16:59:29
Rear defogger repair kit?
Title: Re: XT/AT/PS2/Terminal to USB Converter with NKRO
Post by: Soarer on Sat, 01 September 2012, 17:46:29
Rear defogger repair kit?
Yeah. Or from electronics suppliers (example (http://www.rapidonline.com/Tools-Equipment/Conductive-Silver-Leitsilber-L100-3g-87-0781)).

I should say I've no idea how well or even if it would work, but in theory it might!

My reservation in this case is that I suspect a new membrane might not cost much more, so that's definitely worth enquiring about.
Title: Re: XT/AT/PS2/Terminal to USB Converter with NKRO
Post by: Halvar on Sun, 09 September 2012, 10:38:49
Hi,

thank you Soarer for this great piece of software.

Another report of a successful little project here ... :-)

I recently found a Terminal Model M (No 1394312, 122 keys, German, cable with RJ45 connector) on eBay, and got it to work with almost no problems with the converter. In fact, I´m typing on it right now. I built the Teensy directly into the keyboard -- at the spot where the cable used to come out, now there´s a nice USB Type B connector where I can plug in an old USB printer cable. Since the original keyboard had no LEDs, I also drilled holes for those.

Looks and feels great so far, I am happyly clicking away ...  Thanks once again for all the work you put in this during the last year to make it as easy as possible for beginners like me.

I have one little problem left hoping for help ...

The EUROPE_1 (HID code 0x32) key, which has the sharp sign and the single quote sign on a German keyboard, doesn´t do anything in Windows 7 (nor in UBUNTU). The key press (and key release)  just isn´t registered at all. I used a few key testing programs in Windows to check this, as well as a normal text editor in Win7 and UBUNTU.

The strange thing is that in hid_listen.exe, the keystroke does register:

r53 +32 d32
rF0 r53 -32 u32

I first suspected the Windows HID driver, but since Linux had the same problem I don´t know where to search at the moment.

When I remap the key to "A" in my converter config file, the A works ok. So it´s not the physical key.
When I remap some other key to EUROPE_1, that other key has the same problem and doesn´t register when pressed either.

Is the HID output above right?
Does anyone else have this problem?

Halvar
Title: Re: XT/AT/PS2/Terminal to USB Converter with NKRO
Post by: Soarer on Sun, 09 September 2012, 11:22:32
You're welcome! And good job building it in with LEDs, many people don't bother with them :-)

EUROPE_1 was a pain I thought I'd dealt with back in v0.992!! But, when I added the loadable configs, I moved the fix to legacy.sc. And I forgot to say anything in the docs about it :(  But anyway, the fix is easy - simply remap it to BACKSLASH. Linux had problems when both BACKSLASH and EUROPE_1 could be sent, so I had to hide EUROPE_1 (details (http://geekhack.org/index.php?topic=17458.msg339706#msg339706)).
Title: Re: XT/AT/PS2/Terminal to USB Converter with NKRO
Post by: Halvar on Sun, 09 September 2012, 15:12:24
*danceandsing*

Thanks a lot Soarer, that did it!

I even did read the post that you linked to, but didn't  (<-- "didn't" now with a real ['] instead of [´]  :-) ) understand the consequences... Oh well...

Here's my current mappings in case someone has a similar board and doesn't know where to start ...

Code: [Select]
ifset set3
remapblock
# left hand side function keys
EXTRA_F1 MEDIA_MY_COMPUTER
EXTRA_F2 MEDIA_MEDIA_SELECT
EXTRA_F3 MEDIA_MAIL
EXTRA_F4 MEDIA_CALCULATOR
EXTRA_F5 MEDIA_WWW_HOME
EXTRA_F6 MEDIA_WWW_SEARCH
EXTRA_F7 MEDIA_WWW_BACK
EXTRA_F8 MEDIA_WWW_FORWARD
EXTRA_F9 LGUI
EXTRA_F10 APP
# function keys upper row
# block 1
F13 ESC
F14 MEDIA_VOLUME_DOWN
F15 MEDIA_VOLUME_UP
F16 MEDIA_MUTE
# block 2
F17 MEDIA_PLAY_PAUSE
F18 MEDIA_PREV_TRACK
F19 MEDIA_NEXT_TRACK
F20 MEDIA_STOP
# block 3
F21 SYSTEM_SLEEP
F22 SYSTEM_WAKE
F23 PRINTSCREEN
F24 PAUSE
# cursor block
# (central key)
LANG_4 DOWN
# Numpad
# first row left to right
ESC NUM_LOCK
NUM_LOCK SCROLL_LOCK
SCROLL_LOCK PAD_SLASH
EXTRA_SYSRQ PAD_ASTERIX
# right column 2nd to last row
PAD_ASTERIX PAD_MINUS
PAD_MINUS PAD_ENTER
# PAD_PLUS (lower right corner) not remapped
# #-key (European keyboards only)
EUROPE_1 BACKSLASH
endblock

Title: Re: XT/AT/PS2/Terminal to USB Converter with NKRO
Post by: Soarer on Sun, 09 September 2012, 16:55:31
Excellent! LOL, I hadn't even noticed the [´] in your post!

Thanks for posting the config, that looks like a layout quite a few people would like :)

Title: Re: XT/AT/PS2/Terminal to USB Converter with NKRO
Post by: __red__ on Sun, 09 September 2012, 20:43:21
Another satisfied customer here - IBM Model F 122 key, 6110344 5 August 1986. :)
Title: Re: XT/AT/PS2/Terminal to USB Converter with NKRO
Post by: Krogenar on Tue, 18 September 2012, 13:16:51
I've got two broke-down Model M 122's headed my way -- looking forward to giving this converter a try. No soldering experience of any kind, however, so I hope I can manage this. I'm not entirely sure which kind of DIN socket I will need until I get the keyboards. Where did the rest of you guys find these parts? I found the PRJC site with the Teensy board, but finding DIN sockets (receptacles?) hasn't been easy.

The model number I'm getting is 1397980, which should be scan set 3. From what I can tell from the eBay photos it's going to be a 5-pin DIN 453222 connector (as seen in Soarer's documentation). But I can't find that connector. Can anyone with more knowledge provide a link to the connector I need? I can find a 5-pin, female (?) connector, but the angle of the pins doesn't seem right in the photos I'm finding.

[attachimg=1]

The bottom four pins seem to describe a rectangle, and the connectors I'm finding are ... well, not the same.

Sorry to be such a bother. I promise that if I can pull this off I will deliver a well-photographed 'Soarer's Teensy Converter for Noobs' writeup!

Title: Re: XT/AT/PS2/Terminal to USB Converter with NKRO
Post by: fohat.digs on Tue, 18 September 2012, 14:55:16
Something is escaping me here.

I am back where I was a month ago at post 451 trying to get a Model F-122 terminal to work.

Last winter I had it going, with v0.97 or whatever, this is my spare.

I got a new Teensy and I have downloaded v1.03. The Teensy seems to work fine, and I have used the instructions to program it (eg Open Hex File, Blink-Fast, etc) but the keyboard itself is not recognized. I have been through several iterations including reboots.

At first, I had my other board/Teensy (still running v0.997), and they may have been interfering with each other, so I disconnected it and am typing this from a PS2 keyboard.

How do I find an up-to-date config file, and compile it and run it, I am not a programmer. I remember doing it last year, but I can't seem to find the instructions any more.

I plan to update my first Teensy, too, but I want to make sure that this will work for me. I am running Windows 7 and Ubuntu 12.04

Thank you!
Title: Re: XT/AT/PS2/Terminal to USB Converter with NKRO
Post by: Soarer on Tue, 18 September 2012, 16:00:33
Can anyone with more knowledge provide a link to the connector I need? I can find a 5-pin, female (?) connector, but the angle of the pins doesn't seem right in the photos I'm finding.

It's usually described as a 270 degree 5 pin DIN (or sometimes 240 degree), whereas the more common ones you're probably seeing are 180 degree (which would be right for the XT or AT). Another tip for searching is to look for '5 way' as well as '5 pin'.

A 6 pin DIN is also fine for the socket, and might be easier to find. Would you like a trailing socket (http://www.ebay.com/itm/DIN-female-jack-Cable-Connector-6-Pin-Plastic-Handle-/270792631490?pt=US_Audio_Cables_Adapters&hash=item3f0c7fa4c2) or panel mounted (http://www.ebay.com/itm/DIN-Female-Jack-Cable-Connector-adapter-6-Pin-plug-panel-mount-solder-type-/270837493107?pt=US_Audio_Cables_Adapters&hash=item3f0f2c2d73)? (Those are just the first ones I found on ebay, there are probably nicer looking panel mount ones somewhere...).
Title: Re: XT/AT/PS2/Terminal to USB Converter with NKRO
Post by: Soarer on Tue, 18 September 2012, 16:43:33
Something is escaping me here.

I am back where I was a month ago at post 451 trying to get a Model F-122 terminal to work.

Last winter I had it going, with v0.97 or whatever, this is my spare.

I got a new Teensy and I have downloaded v1.03. The Teensy seems to work fine, and I have used the instructions to program it (eg Open Hex File, Blink-Fast, etc) but the keyboard itself is not recognized. I have been through several iterations including reboots.

Does it recognize the keyboard if you program it with v0.997? There isn't any real difference in the core converter code between that and v1.03 though.

(Don't program it with Blink-Fast.hex though - that's where you'd choose one of the converter hex files instead).

At first, I had my other board/Teensy (still running v0.997), and they may have been interfering with each other, so I disconnected it and am typing this from a PS2 keyboard.

How do I find an up-to-date config file, and compile it and run it, I am not a programmer. I remember doing it last year, but I can't seem to find the instructions any more.

I plan to update my first Teensy, too, but I want to make sure that this will work for me. I am running Windows 7 and Ubuntu 12.04

Thank you!


Have you also downloaded the v1.0 zip, which has the latest documentation, configs and tools etc?

I've stopped fully updating the OP/article, preferring downloaded docs, but I haven't removed anything from it.

Improving the docs is the next thing on my to-do list, so highlighting any gaps to me is very useful! One big sub-task will be going through this thread again, making sure that useful stuff is put in the docs.

Let's get the keyboard recognized first, and then worry about the config :D

Title: Re: XT/AT/PS2/Terminal to USB Converter with NKRO
Post by: fohat.digs on Tue, 18 September 2012, 17:11:27
Thank you.

I did this last year with an F-122 in which I installed the Teensy internally and used v0.997 (I think, and I don't know how to find out?) which worked great after some initial jiggling. When I upgraded from Windows XP to 7 a few months ago, it still worked perfectly and automatically without my having to do anything. It is my daily driver and I have not messed with it at all.

I have a second F-122 which I want to leave with a stock cable and an outboard box. As of now, it is the ghetto alligator clip route until I get it running dependably, then I intend to have a female PS2 socket on a pigtail to the box for use with other boards. (these are 6110345 and 6110347 part numbers without DIP switches, in case that matters)

The Teensy seems to be recognized and take its programming, but when I actually plug the keyboard into it, the keystrokes don't register. I am using v1.03 and whatever prjc has on its site right now, to try to have the latest versions of everything.

And, next time I try to boot up with the old board, I get a keyboard error and have to hot plug it later to get it running, if that tells you anything.

There is a real possibility that my wiring is not good enough. I also have an F XT so I plan to make a female socket and run it into the Teensy, to see if it gets recognized.

There is no need to re-do the config, for now, since the old one is working?

Thanks for your help.

Title: Re: XT/AT/PS2/Terminal to USB Converter with NKRO
Post by: Soarer on Tue, 18 September 2012, 17:59:18
I think the old config will be fine, and anyway we won't need one yet, to get the keyboard basically working.

The keyboard error is a bit odd, but I'm not sure it tells me anything. The most likely explanation is that Windows is somehow confused by the two versions having the same IDs, but different USB descriptors.

When you plug the keyboard in, is that with the USB still plugged in? The keyboard needs to be plugged into the converter before the USB side is connected.
Title: Re: XT/AT/PS2/Terminal to USB Converter with NKRO
Post by: fohat.digs on Tue, 18 September 2012, 19:54:18
I think that I have done it several ways.

My assumption is that the preferable method is to boot using a standard PS2 keyboard, then plug in the USB connector.

I think that I programmed the Teensy, initially, without anything connected to it. Clearly, I will need to start over and re-program the Teensy.

Once it is working, will I have to change anything in order to switch between an F XT and an F-122? Does it matter which is connected when I do the programming?

Title: Re: XT/AT/PS2/Terminal to USB Converter with NKRO
Post by: Soarer on Tue, 18 September 2012, 20:48:42
I think that I have done it several ways.
I was just checking, since with the Teensy built-in to your other keyboard, the question of which order to connect things doesn't arise :)

My assumption is that the preferable method is to boot using a standard PS2 keyboard, then plug in the USB connector.
Once it's all programmed and working, it should work fine during boot as well.

I think that I programmed the Teensy, initially, without anything connected to it. Clearly, I will need to start over and re-program the Teensy.
No... I don't mean when programming the Teensy. For that, it doesn't matter if the keyboard is connected or not. Once it is programmed and you want to use it as a converter though, the keyboard has to be connected first, so that the Teensy can query it and decide which mode to use when it powers up. If no keyboard is connected, then the converter decides it is an XT keyboard.

Once it is working, will I have to change anything in order to switch between an F XT and an F-122? Does it matter which is connected when I do the programming?
It will auto-detect.

Have you got the hid_listen (http://www.pjrc.com/teensy/hid_listen.html) program? There might be some debug output that would help us figure out what's wrong.
Title: Re: XT/AT/PS2/Terminal to USB Converter with NKRO
Post by: fohat.digs on Tue, 18 September 2012, 21:23:31
I do have hid_listen but there is nothing for it to listen to ......

Are the pins on the XT plug the same as the AT style? I am plugging the XT in to an AT-to-PS2 adapter, and have a female PS2 connected to the Teensy.

I can't find an XT pin diagram.
Title: Re: XT/AT/PS2/Terminal to USB Converter with NKRO
Post by: Soarer on Wed, 19 September 2012, 04:56:02
Odd. Once the Teensy is programmed with the converter code, hid_listen should at least connect. If hid_listen is started before the teensy is plugged in (or before hitting the 'Run' button in the Teensy loader), it should show some info even if no keyboard is connected.

Does the LED light up at all, either when the Teensy is plugged in or when you press keys?

Yes, the XT plug pinout is the same as the AT.

Please don't plug in lots of precious keyboards unless you are absolutely sure that power and ground are not reversed... from the article...

Important note - these 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. 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!

If in any doubt, post pics of the wiring :)
Title: Re: XT/AT/PS2/Terminal to USB Converter with NKRO
Post by: Krogenar on Wed, 19 September 2012, 07:03:55
It's usually described as a 270 degree 5 pin DIN (or sometimes 240 degree), whereas the more common ones you're probably seeing are 180 degree (which would be right for the XT or AT). Another tip for searching is to look for '5 way' as well as '5 pin'.

A 6 pin DIN is also fine for the socket, and might be easier to find. Would you like a trailing socket (http://www.ebay.com/itm/DIN-female-jack-Cable-Connector-6-Pin-Plastic-Handle-/270792631490?pt=US_Audio_Cables_Adapters&hash=item3f0c7fa4c2) or panel mounted (http://www.ebay.com/itm/DIN-Female-Jack-Cable-Connector-adapter-6-Pin-plug-panel-mount-solder-type-/270837493107?pt=US_Audio_Cables_Adapters&hash=item3f0f2c2d73)? (Those are just the first ones I found on ebay, there are probably nicer looking panel mount ones somewhere...).

Thank you Soarer! I think I'm going to try a panel mount because I'd rather not alter the keyboard itself until I'm more confident in my soldering/electronics skill. Back on page 10 of this thread someone posted a really great adapter build that I'm going to try to duplicate. Someone should offer this converter as a kit somewhere. Thanks for those links -- the 6 pin looks like it will fit.
Title: Re: XT/AT/PS2/Terminal to USB Converter with NKRO
Post by: Soarer on Wed, 19 September 2012, 07:54:01
It's usually described as a 270 degree 5 pin DIN (or sometimes 240 degree), whereas the more common ones you're probably seeing are 180 degree (which would be right for the XT or AT). Another tip for searching is to look for '5 way' as well as '5 pin'.

A 6 pin DIN is also fine for the socket, and might be easier to find. Would you like a trailing socket (http://www.ebay.com/itm/DIN-female-jack-Cable-Connector-6-Pin-Plastic-Handle-/270792631490?pt=US_Audio_Cables_Adapters&hash=item3f0c7fa4c2) or panel mounted (http://www.ebay.com/itm/DIN-Female-Jack-Cable-Connector-adapter-6-Pin-plug-panel-mount-solder-type-/270837493107?pt=US_Audio_Cables_Adapters&hash=item3f0f2c2d73)? (Those are just the first ones I found on ebay, there are probably nicer looking panel mount ones somewhere...).

Thank you Soarer! I think I'm going to try a panel mount because I'd rather not alter the keyboard itself until I'm more confident in my soldering/electronics skill. Back on page 10 of this thread someone posted a really great adapter build that I'm going to try to duplicate. Someone should offer this converter as a kit somewhere. Thanks for those links -- the 6 pin looks like it will fit.

Ah, the trailing socket wouldn't mean modifying the keyboard, it would be for making an adapter that looks something like this (although this isn't a Teensy, it has a trailing socket):

[attachimg=1]

I like this approach because it allows a smaller box to be used, the hole for the cable is easy to make, and a cable tie is sufficient to stop the cable being pulled out. But a panel mount socket in a slightly bigger box is also good!
Title: Re: XT/AT/PS2/Terminal to USB Converter with NKRO
Post by: fohat.digs on Wed, 19 September 2012, 09:07:21
Allow me to clarify the situation and reduce misunderstanding.

I have my "old" rig which is a Model F 122-key terminal in which I installed a Teensy 2.0 internally last winter using, I think, v0.997 under XP. After the initial process and adjustments, it has worked perfectly ever since. Upon boot-up, hid_listen.exe sees and hears it just fine.

My "new" rig is a fresh Teensy 2.0 that I have programmed with v1.03 and the latest software set that I downloaded from pjrc.com this week. I have an F-122 terminal board and an F XT to get up and running, along with various cables and adapters. I have referred to the same pinouts that I have used before, and checked the wiring for continuity.

Booting up with a Dell PS2 keyboard works fine, but hid_listen.exe does not see it. It does nothing, just a blank screen.

When I plug in the Teensy, hot, I get a fast blink until I press the button on the Teensy. Running hid_listen.exe returns a "Waiting for Device" message and an endless string of dots marching across the screen, but no response to pressing a key. I am doing this with the XT now, let me shut down everything and try it again with the 122-key terminal.


PS - not to gloat, but I hit the jackpot a few months ago and got an actual beige IBM female 270 degree DIN cable connector! it was in a big bin of dusty cables in a salvage store. the aluminum is a little tarnished on the knurled ring, but it even screws into the standard 6110347 cable end! there was something that looked like an odd serial connector on the other end.
Title: Re: XT/AT/PS2/Terminal to USB Converter with NKRO
Post by: Soarer on Wed, 19 September 2012, 10:01:14
When I plug in the Teensy, hot, I get a fast blink until I press the button on the Teensy.

That's exactly what would happen if you programmed it with blinkfast instead of programming it with the v1.03 converter hex file... you should follow the instructions on the PJRC site except where it says to open blink-fast.hex - at that point you should open Soarer_at2usb_v1.03_atmega32u4.hex instead.

As a side note, hid_listen is more specific than its name implies - it can only listen to something that has a USB endpoint setup in the right way. Generally this means a Teensy running code derived from the USB libraries that PJRC provide, such as my converter.

PS - not to gloat, but I hit the jackpot a few months ago and got an actual beige IBM female 270 degree DIN cable connector! it was in a big bin of dusty cables in a salvage store. the aluminum is a little tarnished on the knurled ring, but it even screws into the standard 6110347 cable end! there was something that looked like an odd serial connector on the other end.

That sounds a bit like the keyboard adapter cable from a 3270 PC (http://www.seasip.info/VintagePC/5271.html#dongle), but that has a 180 degree 5 pin plug attached to the D connector as well. I've got one of those, but I haven't used it for anything yet :)
Title: Re: XT/AT/PS2/Terminal to USB Converter with NKRO
Post by: fohat.digs on Wed, 19 September 2012, 18:57:06
Thank you. Do I need to somehow de-program ore re-format the Teensy from Fast-Blink?

I used the Teensy.exe program and selected "Open Hex File" to the "Soarer_at2usb_v1.03_atmega32u4.hex" file and selected "Reboot"

I also did it selecting "Program" and whatever other choices it offered, but it never seemed to "take" and always looked like fast-blinking after every re-boot.

Thanks for continuing to work with me. I don't remember it being this hard last winter.

PS - my plug must have been vaguely similar to what you showed, but the housing is mostly beige rubber except for the aluminum ferrule
Title: Re: XT/AT/PS2/Terminal to USB Converter with NKRO
Post by: Soarer on Wed, 19 September 2012, 20:03:37
Hmm, strange. Programming it with the converter hex ought to remove the blinking.

Just to confirm, here's an example of the sequence...
1. Run the loader (teensy.exe)
2. "Open Hex File", select Soarer_at2usb_v1.03_atmega32u4.hex, click OK.
3. Press the reset button on the Teensy.
4. "Program" (should show a progress bar for about 2 seconds)
5. "Reboot"

After that, the LED should not be blinking, and hid_listen should be able to connect and not just show a string of dots. Also, the keyboard devices should show up in Device Manager.

For Teensy 2.0, the correct file to use is Soarer_at2usb_v1.03_atmega32u4.hex
For Teensy++ 2.0, the correct file to use is Soarer_at2usb_v1.03_at90usb1286.hex

It doesn't matter for programming (or for hid_listen, or for the devices appearing) whether you have a keyboard connected or not.

Pressing the reset button could be done earlier instead, either before opening the hex file, or before running teensy.exe, it doesn't matter.

The teensy loader remembers the last file used, so if you repeat the sequence you won't need to open the hex file again, as long as it shows the correct file name in the status bar at the bottom of the window...

[attachimg=1]

If the blinking has gone away, you should have a working converter. If you didn't have a keyboard connected while programming, you'll need to unplug the USB, connect the keyboard, then reconnect the USB.
Title: Re: XT/AT/PS2/Terminal to USB Converter with NKRO
Post by: fohat.digs on Thu, 20 September 2012, 07:19:56
"Something" happened.

I went through your steps again. After opening the hex file, progress bar did not show, and the "Press Button to Activate" keeps coming on. I have unplugged and hot plugged the USB connector a few times.

hid_listen.exe does make a response, however, and I get


Device disconnected.
Waiting for new device: ............................
Listening:
wEE

remaining: FFFC

Keyboard ID 0000
Code Set: 1

then, nothing
Title: Re: XT/AT/PS2/Terminal to USB Converter with NKRO
Post by: fohat.digs on Thu, 20 September 2012, 09:34:41
Now I am getting a little worried. I plugged an ordinary PS2 keyboard into the Teensy, and hid_listen.exe responded to key presses. I got the same response to any key I pressed, but it was happening and the Teensy is alive.

I am sure that I did not reverse the wiring itself, but it may be possible that some of my alligator clips touched and shorted each other.

These keyboards I bought off ebay as "working" but that might have meant that the keys moved when you pressed them.

Now I have a few specific questions:

1. How can I test a keyboard to see whether it is dead? I have a soldering iron and am good with my hands, but have little real electrical wiring experience.

2. I understand that the XT and AT are incompatible even though the plugs look the same. When I use a straight DIN-to-PS2 adapter, can I be sure that the pinouts are the same on the XT cable?

3. Where can I find the layout of the long rectangular block of pins on the F-122 board? I was testing continuity on the actual cord from the keyboard, and it seems like the layout pattern and colors (I know to never trust color, but these are all IBM parts ..... ) are different between male and female cords.

When I was monkeying around last winter, the pin connections on the circuit board seemed to make a difference.

I could have sworn all this was in the wikis. Oh why oh why did I not download them and save them?
Title: Re: XT/AT/PS2/Terminal to USB Converter with NKRO
Post by: Soarer on Thu, 20 September 2012, 10:43:04
OK, progress, it seems to be programmed now :-)

Since you're getting some response when pressing keys, at least the power and ground are not reversed! Getting the same code for any key sounds like it's an error code - errors begin with an uppercase R or W, while successful reads and writes use lowercase. The most likely is that clock and data are swapped over, or that data is not connected.

1. Let's come back to this later. A good way to test them is to have a working Soarer converter!

2. A DIN-to-PS2 that works for AT will work for XT as well (with my converter, of course).

3. Never trust the colours; IBM wasn't even consistent with itself (http://deskthority.net/workshop-f7/xt-at-ps2-terminal-to-usb-converter-with-nkro-t2510-90.html)!!

Wikis... indeed :(

None of my converter stuff was in the wiki, thankfully it's all still here in this thread. Most pictures and all attachments have been lost though. There was an IBM wiki, although I believe that its content was also all in Deskthority's wiki (http://deskthority.net/wiki/Category:IBM_keyboards), and it may well have more now.
Title: Re: XT/AT/PS2/Terminal to USB Converter with NKRO
Post by: fohat.digs on Thu, 20 September 2012, 11:02:09
I keep working on this instead of my "real" work.

My working converter is hard-wired to the old F-122, I am a bit reluctant to dismantle it but I probably have no choice.

Thank you so much.
Title: Re: XT/AT/PS2/Terminal to USB Converter with NKRO
Post by: Soarer on Thu, 20 September 2012, 11:10:16
Don't dismantle your working one! I meant we should be able to get this new one working :)

What was the code that was being printed to hid_listen when you pressed keys?
Title: Re: XT/AT/PS2/Terminal to USB Converter with NKRO
Post by: fohat.digs on Thu, 20 September 2012, 12:38:59
Using a 10-year-old Compaq rubber dome board with PS2 connector, with each key press I get about 15-25 copies of

R05
and R06
with a rare R04

randomly dispersed but not in the same order or the same pattern
Title: Re: XT/AT/PS2/Terminal to USB Converter with NKRO
Post by: Soarer on Thu, 20 September 2012, 13:28:35
That's a mix of Timeout and Start Bit errors, with a rare Internal error. One possible cause of that is clock and data being swapped over. It's safe to swap them, to see if that is the problem.
Title: Re: XT/AT/PS2/Terminal to USB Converter with NKRO
Post by: fohat.digs on Thu, 20 September 2012, 16:47:40
Thanks, but going by your diagram at the beginning of the thread, I think I have it wired right.

Is the converter supposed to work on pretty much any standard keyboard, as-is?
Title: Re: XT/AT/PS2/Terminal to USB Converter with NKRO
Post by: Soarer on Thu, 20 September 2012, 17:03:03
I know you do, but there must be something wrong somewhere! :D

Pretty much any standard keyboard, yes.

The error codes you're getting are the same as the wierdo Monterey (http://geekhack.org/index.php?topic=17458.msg349707#msg349707) that is known not to be handled, but it's unlikely to be the same issue. Other problems can give the same codes. However, it is possible - I don't think the converter has seen much testing with rubber domes!!

Going by your previous questions, do you already have an XT keyboard and a standard 5-pin DIN to PS/2 adapter? If so, I think it would be safe to try that now, since the rubber dome hasn't gone up in smoke :)
Title: Re: XT/AT/PS2/Terminal to USB Converter with NKRO
Post by: fohat.digs on Thu, 20 September 2012, 20:50:25
Yes, the XT is what I have been working with. I gave up the alligator clips and have been twisting and taping wires to switch back and forth between rigs.

I have a female 240 degree DIN socket and a female mini-DIN, both on pigtails, that I connect to the Teensy.

I started off with the F-122, then tried the XT. I have hooked both up several times. The screenshot below is what I get with the XT and adapter.

I checked the wiring in the standard F-122 cable, and it is as shown in your diagram at the beginning of this thread and in the diagram below. I hooked up the wiring from my female DIN 240 cable pigtail to the Teensy accordingly.

My dream is that the Teensy would sacrifice itself and the keyboard be undamaged, but I feel sure that the opposite is true.

I have an F-122 in pieces in the garage, waiting for a full mod. I did not test it before taking it apart, assuming that it would be functional. When I get it back together, I can use it to see whether I managed to cook this new stock one.

Title: Re: XT/AT/PS2/Terminal to USB Converter with NKRO
Post by: Soarer on Fri, 21 September 2012, 06:12:05
I think the only way to fully cook the keyboard is to connect power and ground in reverse.

Other permutations of mis-wiring it may damage either the keyboard's output buffer or the Teensy, but, while I haven't analyzed all possibilities, many permutations do not seem to cause damage.

Similarly, quite a few possible shorts don't cause damage either, e.g. clock/data/ground in any combination.

Shorting power to clock or data could damage the keyboard's output buffer or the Teensy.

Shorting power to ground shouldn't damage either keyboard or Teensy. It will at least trip the fuse in the USB port of the PC, and quite possibly reboot the PC.

For any random error, the odds are good for the keyboard surviving.

However, if swapping from the PS/2 rubber dome (which gives the errors on hid_listen) to the XT with adapter is just a case of plugging it in (not rewiring), and if the XT gives nothing on hid_listen when pressing keys, then that's not looking good for the XT.

(The XT is expected to report an ID of 0000 by the way. The converter is unable to distinguish it from having nothing connected, since the XT doesn't support two-way communication).

Forgive me if I keep on questioning your wiring, but logically either...
1. there is something wrong with it which is stopping this working, or
2. there was something wrong with it that killed something, or
3. the 122 and XT were both dead already (unlikely).

A sanity check on the power and ground wiring is worth doing, I think, to put our minds at rest. Continuity tests all the way from the Teensy pins to the pins on the CPU (with the converter unpowered, of course!). The CPU has power on pin 40 and ground on pin 20...

[attachimg=1]
Title: Re: XT/AT/PS2/Terminal to USB Converter with NKRO
Post by: fohat.digs on Fri, 21 September 2012, 07:07:42
This is indeed disappointing, if I have carelessly wrecked 2 Model Fs.

Is there a relatively simple way to test, and, hopefully, to fix, some of the more minor forms of damage that you described?

Thanks again for all your help.
Title: Re: XT/AT/PS2/Terminal to USB Converter with NKRO
Post by: Soarer on Fri, 21 September 2012, 09:00:31
Well I'm not sure that you have totally wrecked them, unless you think you might have applied power backwards at some point.

The keyboard's output buffer chip is available, cheap, and only 14 pins so relatively easy to desolder. Testing it is tricky without either removing it or using an oscilloscope though, so we should try to eliminate other possibilities first.

Measuring the current (http://geekhack.org/index.php?topic=17458.msg617942#msg617942) seems to be a reliable way to tell if the board is wrecked from backwards power being applied. Normally the keyboard would draw a little over 100mA, but significantly less when dead.

(I say seems to be, because it's only been measured once on a dead board, and there were other factors perplexing me about that situation, as you'll see in the conversation there with Paranoid. However, reduced current draw is logical for a dead board).

Of course, it's still worth doing the sanity check on power and ground first, which will confirm that they are correct all the way through the chain of connections.
Title: Re: XT/AT/PS2/Terminal to USB Converter with NKRO
Post by: fohat.digs on Sat, 22 September 2012, 08:19:33
This is going to have to get shelved for a few days.

- IF - I did apply the power backwards, is the situation hopeless, or is there a particular piece (relatively easily identified and accessed) that I could replace?
Title: Re: XT/AT/PS2/Terminal to USB Converter with NKRO
Post by: Soarer on Sat, 22 September 2012, 08:43:40
OK. I'm sorry that this hasn't gone as smoothly for you as it did last time.

Trouble is, we don't know how much gets damaged by reverse power. Almost certainly the CPU - they are available, but would need programming, and it's quite a task to desolder. If I get round to writing the code, replacing the CPU with a Teensy could be an option.

The big worry is that it damages the square silver capacitive sensing chip, which isn't available (except in old IBM keyboards). I'd like to get hold of a damaged controller to be able to find out whether it dies or not.

Title: Re: XT/AT/PS2/Terminal to USB Converter with NKRO
Post by: fohat.digs on Sat, 22 September 2012, 08:54:18
Depending on how this all plays out, I can send you some dead parts that have no more use to me, for science, man!
Title: Re: XT/AT/PS2/Terminal to USB Converter with NKRO
Post by: Soarer on Sat, 22 September 2012, 09:06:32
Thanks! I'm still hopeful that it's not that much of a disaster though :)
Title: Re: XT/AT/PS2/Terminal to USB Converter with NKRO
Post by: kishy on Mon, 24 September 2012, 08:59:10
If the controller is toast, let's not forget that dfj was making a full replacement...

I really must hop back on IRC and check on that one of these days.
Title: Re: XT/AT/PS2/Terminal to USB Converter with NKRO
Post by: Soarer on Mon, 24 September 2012, 10:44:11
True, I'm not forgetting it, but dfj would need quite some prodding to release code or hex, schematics, and diagrams!

He did write an article (http://geekhack.org/index.php?topic=21459.0) last year, but of course, there's no pics in it now :(
Title: Re: XT/AT/PS2/Terminal to USB Converter with NKRO
Post by: Krogenar on Tue, 25 September 2012, 08:32:55
Fohat, just a heads up -- I got two 122-key Terminal Model M's from eBay. One has a cracked case, and one is in much better condition. I'm using the cracked one for exploratory purposes (extra keys, mistakes, practicing bolt-modding, etc.) -- so if you needed the controller or some other part of it for your project just send me a PM. I don't fully know the condition of the 'good' keyboard, but if I end up not needing the controller it's all yours.

My plan is to get the nicer 122 up and working, and trying to get it closer to the classic Model M layout (T-arrows keys, and replacing the Enter key to a wide version). Taking detailed pics and will post a full writeup. Thanks Soarer for the links to the DIN connectors on eBay; they're on the way. Now I just have to learn how to solder.  :D
Title: Re: XT/AT/PS2/Terminal to USB Converter with NKRO
Post by: Soarer on Tue, 25 September 2012, 09:25:16
Unfortunately, Model M controllers don't have the special capacitive sensing chip that the Fs do... we don't really need a pic to describe that! :)

In other news, I've bought Paranoid's dead XT to have a closer look at (but it could be a while before I have time to).
Title: Re: XT/AT/PS2/Terminal to USB Converter with NKRO
Post by: oTurtlez on Tue, 25 September 2012, 21:06:16
I've got a Leading Edge DC-2014 and the internal connector has six wires coming out. Grey, Black, Red, Yellow, Brown, and a thick black with a ring terminal going to the steel switch plate. Can I assume the grey is white and to ignore the yellow and thick black one?

EDIT: So I guess I'm going to need to test with a multimeter for which is which unless anyone happens to know which wire is which for this board. Anyone who would like to help me, here's what the cable looks like. http://i.imgur.com/hfAE0.jpg
Title: Re: XT/AT/PS2/Terminal to USB Converter with NKRO
Post by: Soarer on Tue, 25 September 2012, 22:17:32
Yeah, I'm afraid they need to be properly identified. Either by using a multimeter, or by following traces on the PCB, if you can see them well enough.

It's important to identify power and signal ground - nearly all logic chips have power on these corners with one end identified by a cut-out, like this:

[attachimg=1]

Referring to your picture (which is looking at the bottom of the PCB and shows a 40-pin chip), ground will be on the top-right and power on the bottom-left pins of that chip.

My guesses are... the trace from the ground pin looks like it might go to the brown wire, but I can't tell for sure from the pic. The red wire goes to pin 4 of the chip, so is probably one of clock or data, and it also has a resistor on the trace - I would expect the other end of that resistor to be +5V, and it goes to the yellow wire. The other traces go off the pic :)

But don't take my guesswork as fact!! For one thing, there's an extra wire. It won't need to be used, but you need to figure out which one is the extra one!

Finally, clock and data can be determined by trial and error, since no damage will occur if they are swapped over.

That said, 5 minutes with a multimeter testing the cable would be quickest!
Title: Re: XT/AT/PS2/Terminal to USB Converter with NKRO
Post by: oTurtlez on Wed, 26 September 2012, 13:57:28
Heres another pic focusing more on the traces. (http://i418.photobucket.com/albums/pp265/hi1405/2012-09-26_14-48-14_400.jpg?t=1348685566)

It seems the Yellow is definitely the +5V, Brown is ground, Red is clock / data. Now I've just got to find out what red is exactly, and which the other wire is. Here's also a pic of the top of the pcb showing the actual 40-pin and resistors, etc.

(http://i418.photobucket.com/albums/pp265/hi1405/2012-09-26_14-54-39_307.jpg?t=1348685775)

Thanks a bunch for all of the help by the way
Title: Re: XT/AT/PS2/Terminal to USB Converter with NKRO
Post by: Soarer on Wed, 26 September 2012, 14:19:13
LOL, I said DON'T take my guesswork as fact!!  :p

Still need a pic that shows the traces around that 14 pin chip.

If that's a buffer, and if the other two wires go to / come from it, then they are more likely to be data and clock than the red wire.

Actually, if that's an 8048 CPU, pin 4 is the reset pin, and we can ignore the red wire.

What markings are there on that 14 pin chip? We're looking for something like 7407, perhaps with some letters in the middle.
Title: Re: XT/AT/PS2/Terminal to USB Converter with NKRO
Post by: oTurtlez on Wed, 26 September 2012, 14:45:47
Traces of the 14 pin ---> (http://i418.photobucket.com/albums/pp265/hi1405/2012-09-26_15-42-36_358.jpg)

The 40-pin is an 8048 and the 14 pin reads 6A1 8(New line)HD74LS125AP
Title: Re: XT/AT/PS2/Terminal to USB Converter with NKRO
Post by: Soarer on Wed, 26 September 2012, 15:40:26
Cool.

74LS125 is a tri-state buffer chip. Black and grey wires both go there, so they're data and clock. We can't tell which is which though, the circuitry is the same for both.

That chip also gives us confirmation that the yellow is +5v, since that fat trace that runs along the edge of the PCB goes to pin 14.

So I guess it's reasonably safe now to try hooking it up...
yellow ... +5V
brown ... ground
black ... clock?
grey ... data?

If that doesn't work, just swap the black and grey :)
Title: Re: XT/AT/PS2/Terminal to USB Converter with NKRO
Post by: oTurtlez on Wed, 26 September 2012, 15:50:00
Cool.

74LS125 is a tri-state buffer chip. Black and grey wires both go there, so they're data and clock. We can't tell which is which though, the circuitry is the same for both.

That chip also gives us confirmation that the yellow is +5v, since that fat trace that runs along the edge of the PCB goes to pin 14.

So I guess it's reasonably safe now to try hooking it up...
yellow ... +5V
brown ... ground
black ... clock?
grey ... data?

If that doesn't work, just swap the black and grey :)

Trying that now, Teensy just came in the mail so I'm getting to the soldering :) Thanks.

edit: fixed, I think.  alaricljs
Title: Re: XT/AT/PS2/Terminal to USB Converter with NKRO
Post by: oTurtlez on Wed, 26 September 2012, 16:33:43
Well my Teensy just arrived so I tried it out and got everything soldered up. Loaded the ATMega32u4 firmware, that's what the HTML files said to do at least, rebooted, and nothing. No key responses from the KB. I swapped black and grey and nothing as well. Dead in the water atm. Any ideas?
Title: Re: XT/AT/PS2/Terminal to USB Converter with NKRO
Post by: Soarer on Wed, 26 September 2012, 17:04:11
Bah :(

Is it giving any output to hid_listen (http://www.pjrc.com/teensy/hid_listen.html) when you press keys?

Also, with hid_listen running, what gets printed when you connect the converter to USB?
Title: Re: XT/AT/PS2/Terminal to USB Converter with NKRO
Post by: oTurtlez on Wed, 26 September 2012, 17:53:40
It gave no output when keys were pressed, I hadnt used it with the black and grey swapped the other way so im trying that now. It says
Listening:
wEE

remaining: FFFC


Keyboard ID: 0000
Code Set: 1

EDIT: Same thing with swapped wires. Either the board is dead or I just suck. I also managed to **** up the copper trace ring on the top side of the teensy so I had to solder to the bottom side for PD1. I should learn from the past and get a better Iron, a wick / pump, and good solder. There goes $20.
Title: Re: XT/AT/PS2/Terminal to USB Converter with NKRO
Post by: fohat.digs on Wed, 26 September 2012, 18:14:25
Sounds like what is happening to me.

Could there be a bad batch of Teensys shipping recently?
Title: Re: XT/AT/PS2/Terminal to USB Converter with NKRO
Post by: oTurtlez on Wed, 26 September 2012, 19:06:08
Sounds like what is happening to me.

Could there be a bad batch of Teensys shipping recently?

As much as I'd like that to be the case so I could get a replacement, All software detects it properly so unless it has problems with pinouts / ins and whatnot, it seems to be a problem on my / our end.
Title: Re: XT/AT/PS2/Terminal to USB Converter with NKRO
Post by: Halvar on Wed, 26 September 2012, 19:08:40
Hi,

from my experience this error means that there's a problem with the connection between keyboarsd controller and Teensy. I can't say much more though.

While you are solving those problems I'd like to maybe motivate everyone by posting a few pictures of my Terminal Model M 122-key (German layout). As all the old attachments  from this forum seem to have been lost, I think we maybe need new ones.

The keycaps were partly taken from a Standard PC 102-key Model M that also came with several transparent keycaps.

Halvar

[attachimg=1]
[attachimg=2]
[attachimg=3]
[attachimg=4]
[attachimg=5]
[attachimg=6]


Title: Re: XT/AT/PS2/Terminal to USB Converter with NKRO
Post by: Soarer on Wed, 26 September 2012, 19:28:47
I also managed to **** up the copper trace ring on the top side of the teensy so I had to solder to the bottom side for PD1. I should learn from the past and get a better Iron, a wick / pump, and good solder. There goes $20.

Oh man, that really sucks... I think the track away from the PD1 pad is on the top side of the teensy :(
Title: Re: XT/AT/PS2/Terminal to USB Converter with NKRO
Post by: oTurtlez on Wed, 26 September 2012, 19:37:17
I really need a better iron. This 25w POS has been with me for far too long. I need something that's actually decent. Now I'm pissed.
Title: Re: XT/AT/PS2/Terminal to USB Converter with NKRO
Post by: oTurtlez on Wed, 26 September 2012, 19:46:28
I also managed to **** up the copper trace ring on the top side of the teensy so I had to solder to the bottom side for PD1. I should learn from the past and get a better Iron, a wick / pump, and good solder. There goes $20.

Oh man, that really sucks... I think the track away from the PD1 pad is on the top side of the teensy :(


Do you know if there's any way to reprogram the code to look to PD2 instead of PD1? Or even if it is, can the Teensy not read / support a KB that way?
Title: Re: XT/AT/PS2/Terminal to USB Converter with NKRO
Post by: Soarer on Thu, 27 September 2012, 05:32:42
It would be possible, but the problem is I don't want to add such a build to the release, because it would need documenting, maintaining, testing, etc, etc!!
Title: Re: XT/AT/PS2/Terminal to USB Converter with NKRO
Post by: oTurtlez on Thu, 27 September 2012, 06:12:21
It would be possible, but the problem is I don't want to add such a build to the release, because it would need documenting, maintaining, testing, etc, etc!!

I'm guessing it's not as simple as going into the code and changing all PD1 to PD2? (I've never dealth with or looked at hex. I'm a Java / C person.)
Title: Re: XT/AT/PS2/Terminal to USB Converter with NKRO
Post by: Krogenar on Thu, 27 September 2012, 13:08:12
How would you know if a keyboards controller were faulty, broken?
Title: Re: XT/AT/PS2/Terminal to USB Converter with NKRO
Post by: Soarer on Thu, 27 September 2012, 18:26:51
It would be possible, but the problem is I don't want to add such a build to the release, because it would need documenting, maintaining, testing, etc, etc!!

I'm guessing it's not as simple as going into the code and changing all PD1 to PD2? (I've never dealth with or looked at hex. I'm a Java / C person.)

It's written in C :-)

The point is, it would be fairly easy for me to mod it, but I don't want the ongoing work of keeping a modded version updated. As for modding the hex directly, that's probably not viable.

Now, about that red wire... I've looked again at the PCB pics, and I can't see any decent sized capacitor hanging off that line. (Normally, reset is handled inside the keyboard with a resistor and capacitor set up to hold reset low while power stabilizes). There's a 47pF, but that's too small, and there's also one of those on each of the clock and data lines, so I think that's just noise prevention. Sooo... I should probably make an output on the Teensy to drive it, to make sure the CPU gets reset properly.
Title: Re: XT/AT/PS2/Terminal to USB Converter with NKRO
Post by: Soarer on Thu, 27 September 2012, 18:52:25
While you are solving those problems I'd like to maybe motivate everyone by posting a few pictures of my Terminal Model M 122-key (German layout). As all the old attachments  from this forum seem to have been lost, I think we maybe need new ones.

The keycaps were partly taken from a Standard PC 105-key Model M that also came with several transparent keycaps.

That is a properly sorted 122-key! The LEDs and relegendable keys really make it splendid :-)
Title: Re: XT/AT/PS2/Terminal to USB Converter with NKRO
Post by: Soarer on Thu, 27 September 2012, 22:17:09
Now, about that red wire... I've looked again at the PCB pics, and I can't see any decent sized capacitor hanging off that line. (Normally, reset is handled inside the keyboard with a resistor and capacitor set up to hold reset low while power stabilizes). There's a 47pF, but that's too small, and there's also one of those on each of the clock and data lines, so I think that's just noise prevention. Sooo... I should probably make an output on the Teensy to drive it, to make sure the CPU gets reset properly.

From the IBM PC Technical Reference...

[attachimg=1]

So although the IBM keyboards didn't use the Reset output, it was there for keyboards to use if they wanted to. It was certainly there on the PC and XT, and presumably possibly on the AT (even though it says 'spare' in the reference), but then dropped on the PS/2.

From the IBM PC AT Technical Reference...

[attachimg=3]

From the IBM PS/2 Technical Reference...

[attachimg=2]
Title: Re: XT/AT/PS2/Terminal to USB Converter with NKRO
Post by: Krogenar on Wed, 03 October 2012, 09:51:05
Soarer, just wanted to give you a huge thanks! Got your converter working late last night. There's still a lot of work to be done, but it works. Will post details later. Thanks again Soarer -- awesome to get one of these old keyboards working again!  :D
Title: Re: XT/AT/PS2/Terminal to USB Converter with NKRO
Post by: Soarer on Wed, 03 October 2012, 10:50:12
That's good to hear! Let's have some pics :D
Title: Re: XT/AT/PS2/Terminal to USB Converter with NKRO
Post by: Soarer on Wed, 03 October 2012, 11:21:31
Paranoid's dead XT arrived, and I started examining it. Testing revealed a complete short circuit between power and ground, caused by this capacitor...

[attachimg=1]

It didn't occur to me before that a capacitor might've died; I expected the chips to die first. Pehaps the age of the capacitor made it weaker. A new one can withstand reverse voltage for quite a while - I tried to kill one with 5V and got bored!

Of course, since it was shorted, it triggered the over-current protection on the USB socket. That meant that the current readings were misleading, and I should've paid more attention to the voltages that Paranoid reported at the same time.

There's no markings on the old one to tell what value or voltage rating it is, but since it's just for power smoothing it's not important to get it exactly right. I chose a 47uF 16V, but 100uF would also be fine, as would a 10V rating. This kind with leads at each end is known as axial. I presume the original was an electrolytic, it certainly had polarity markings, and anyway that's a suitable type to use as a replacement.

So, here is the replacement 47uF 16V axial-leaded electrolytic in situ...

[attachimg=2]

It lives again! :D

So this might be good news for anyone else unfortunate enough to apply power in reverse. It's easy to test for, at least. But I think it's unlikely that this humble capacitor (or the other one smoothing power near the capactive sense chip) will always take one for the team and protect the chips.
Title: Re: XT/AT/PS2/Terminal to USB Converter with NKRO
Post by: __red__ on Thu, 04 October 2012, 08:14:57
Any sign of bulging or other physical defecT?
Title: Re: XT/AT/PS2/Terminal to USB Converter with NKRO
Post by: Soarer on Thu, 04 October 2012, 08:33:18
Not that I can tell. I'm sure it would've been more dramatic without the USB port's over-current protection!!
Title: Re: XT/AT/PS2/Terminal to USB Converter with NKRO
Post by: page2pagepro on Fri, 05 October 2012, 13:54:31
Terminal keyboards usually have a 5 pin, 270 degree, DIN connector...
Show Image
(http://www.kbdbabel.org/conn/kbd_connector_ibm3179_318x_319x.png)


Please note, for IBM Model M 1390572, the image above is for female socket, not male plug - they are mirrored (as Soarer stated). I used the link http://www.seasip.info/VintagePC/ibm_1390876.html (http://www.seasip.info/VintagePC/ibm_1390876.html)

Here's the pin-out I used (using original cable and Teensy 2.0)
(http://s15.postimage.org/7qpunexih/1390572.jpg)

PS: Is there 1.03 source code (C) available? I found some info similar @ https://github.com/tmk/tmk_keyboard/tree/master/converter/adb_usb (https://github.com/tmk/tmk_keyboard/tree/master/converter/adb_usb), but I am trying to map the keyboard to be more ANSI compliant. thx!
Title: Re: XT/AT/PS2/Terminal to USB Converter with NKRO
Post by: Soarer on Sat, 06 October 2012, 10:46:57
Is there 1.03 source code (C) available? I found some info similar @ https://github.com/tmk/tmk_keyboard/tree/master/converter/adb_usb (https://github.com/tmk/tmk_keyboard/tree/master/converter/adb_usb), but I am trying to map the keyboard to be more ANSI compliant. thx!

That on github is hasu's great repo :)

There's no source code available for my converter (apart from for the tools). However, there is full configuration available using the tools in the v1.0 zip - you should be able to get it ANSI compliant easily. I just recently made a post on DT (http://deskthority.net/workshop-f7/xt-at-ps2-terminal-to-usb-converter-with-nkro-t2510-90.html#p78403) helping out another new user, which might be helpful to you as well.
Title: Re: XT/AT/PS2/Terminal to USB Converter with NKRO
Post by: Soarer on Sat, 06 October 2012, 11:06:19
Recently I've been working with oTurtlez trying to figure out his Leading Edge DC-2014.

The main problem is that it runs very fast, with the clock only low for 5 microseconds...

[attachimg=1]

That's even faster than 8_INCH_FLOPPY's weirdo Monterey (http://geekhack.org/index.php?topic=17458.msg362823#msg362823)!

Here's an IBM PC keyboard for comparison, where clock is low for about 30 microseconds...

[attachimg=2]

Those traces are produced by running a small test program that prints a hex code every time the clock line changes state, giving an output like this for each key press or release:
Code: [Select]
D907 D95F DD67 DDBF E0A7 E0FF E3F7 E44F E737 E78F EA87 EADF EDC3 EE1B F113 F16B
F453 F4AB

The first 3 digits of each sample are a timecode (in microseconds), and the last digit is the state of pins PD0 to PD3. Passed through a Perl script to make a CSV, it's then plotted as an XY graph in excel.

Since it only samples when the clock line changes state, any changes in the data line have actually happened before they are shown on the graph.
Title: Re: XT/AT/PS2/Terminal to USB Converter with NKRO
Post by: page2pagepro on Sat, 13 October 2012, 18:02:06
Anti-Ghosting with Teensy?

Using tool, http://www.microsoft.com/appliedsciences/antighostingexplained.mspx (http://www.microsoft.com/appliedsciences/antighostingexplained.mspx), I am coming to a sad conclusion that my IBM Model M 1390572 122 keyboard has short comings.

(http://www.microsoft.com/appliedsciences/images/MultiKeyDisplay/KeyboardDefault.gif)

My results are here: http://www.mmo-champion.com/threads/1185198-Keyboard-anti-ghosting-%28NKRO%29-thread?p=18740921&viewfull=1#post18740921 (http://www.mmo-champion.com/threads/1185198-Keyboard-anti-ghosting-%28NKRO%29-thread?p=18740921&viewfull=1#post18740921)

Any thoughts or options to avoid the ghosting?

thx!
Title: Re: XT/AT/PS2/Terminal to USB Converter with NKRO
Post by: Soarer on Sat, 13 October 2012, 18:25:33
I'm sorry to disappoint you, but the Model M isn't NKRO and the converter can't change that :(
Title: Re: Re: XT/AT/PS2/Terminal to USB Converter with NKRO
Post by: __red__ on Sun, 14 October 2012, 09:01:34
Those traces are produced by running a small test program that prints a hex code...

I think we as a community need to buy soarer a logic analyzer.  Given what he's given to the community it kills me to see him messing around with stuff like this when for fifty dollars or so we can give him something to make his life easier.
Title: Re: XT/AT/PS2/Terminal to USB Converter with NKRO
Post by: Soarer on Sun, 14 October 2012, 10:55:49
Thanks red!

Actually, I've already got this one (http://dangerousprototypes.com/open-logic-sniffer/) with a wing (http://dangerousprototypes.com/2012/05/18/logic-sniffer-16-bit-input-buffer-wing-back-in-stock-2-2/)... here's some sniffing (http://deskthority.net/workshop-f7/replacing-an-8048-cpu-with-a-teensy-t4019.html#p78662)! ;D

But mostly for converter stuff I just use (http://geekhack.org/index.php?topic=14290.msg296052#msg296052) a two channel 'scope (http://www.picotech.com/entry-level-oscilloscopes.html). Its software has the really useful feature of storing loads of previous sweeps - so flicking through multiple codes to/from a keyboard is a doddle.

However... neither is much use if the oddball keyboard is 5000 miles away!! sctrace is something I can send out to get info, and just swaps in place of my converter code using the same pins - no probes, no extra wiring :D

Title: Re: XT/AT/PS2/Terminal to USB Converter with NKRO
Post by: Krogenar on Sun, 14 October 2012, 19:34:00
Is my converter weird or something? It's working -- if press keys on my 122 Terminal keyboard and they come out (I'm using it now, in fact) -- but the configuring of remaps is eluding me. In the docs, it references what scan set my keyboard could be, but I can't seem to determine whether I'm using 1, 2 or 3. Running hid_listen opens a command window (running Win 7) and I see:

Code: [Select]
Waiting for device:
Listening:

Keypresses register and are listed as:
Code: [Select]
r1c    +04
rF0     r1C   -04
r32    +05
rF0    r32    -05
r21    +06
rF0     r21   -06

The above corresponds to pressing a, b, and c.

But nowhere do I see a code that represents what scan code my keyboard is using. I tried to remap some keys (my 122 keyboard does not have an ESC key) and tried to use the 'scas' to compile the 'legacy.sc' config file, loaded it using 'scrd' and it apparently remapped the NUMLOCK key to ESC. So, a little confusion here on how to remap.

According to the docs, I can remap based on the name of the key itself, but I'm trying to remap to the lefthand cluster of ten command keys, the upperleft most, to become my new ESC key, but I don't for the life of me know what that key was called.

Help please? I'm thisclose to having a completely kickass keyboard!




Title: Re: XT/AT/PS2/Terminal to USB Converter with NKRO
Post by: Halvar on Mon, 15 October 2012, 00:12:11
@Krogenar:

To see the scan set, you'll have to have the hid_listen.exe window open while you plug the converter with attached keyboard into the usb port of your computer.  The detected scan set is displayed during the converter's startup phase.

For the names of the 122-key function keys: I posted the commented full config file of my Terminal Model M some weeks ago here:

http://geekhack.org/index.php?topic=17458.msg658161#msg658161

Here's some pictures of my keyboard with corresponding keycaps (German though):

http://geekhack.org/index.php?topic=17458.msg671233#msg671233

Maybe that helps you to get started, IMHO it's a better starting point than using legacy.sc for a 122 key Model M.

In Soarer's default setup (if you don't use any mappings), ESC is actually the upper lefthand key of the numeric keypad (!), at the place where you'd expect NumLock on a PC keyboard. NumLock is the key to the right of it. That corresponds more or less to what IBM used on some keybords (see Model 1397003 here: http://www.9999hp.net/keyboard/temp/ )

Escape on the upper lefthand key of the left function key block would be:

    EXTRA_F1   ESC


Soarer will hopefully correct me if I posted any rubbish, but I just got my own "kickass" 122key MM finished, so I went through all of this not too long ago...

Halvar

Title: Re: XT/AT/PS2/Terminal to USB Converter with NKRO
Post by: Soarer on Mon, 15 October 2012, 06:05:51
Thanks Halvar, that's all great!

Krogenar, you don't really need to know which scan set! The remapping is done from HID code to HID code. These are printed in hid_listen prefixed by '+' and '-', and correspond to the codes table.
Title: Re: XT/AT/PS2/Terminal to USB Converter with NKRO
Post by: urbanus on Mon, 15 October 2012, 06:38:08
Works with my 83-key Model F XT -- typing on it right now!  :)

Thank you very much Soarer.  I really appreciate your efforts.
Title: Re: XT/AT/PS2/Terminal to USB Converter with NKRO
Post by: Krogenar on Mon, 15 October 2012, 08:51:19
@Krogenar:

To see the scan set, you'll have to have the hid_listen.exe window open while you plug the converter with attached keyboard into the usb port of your computer.  The detected scan set is displayed during the converter's startup phase.


Yes, I discovered that when I remove the keyboard cable and reinsert, that there's more information there. I see 'BF' represented in the identifying codes. I will post them tonight when I get home. I finally got the converter tucked into a project box, and it is horrifically ugly as I have no experience with electronics. I actually went to Maker Faire 2012 in New York just to buy some hobby kits to slaughter as I marched along the learning curve. I built a 'mousebot' that races in a very tight circle as a result, but can now solder to a limited degree.

I was inspired by an earlier posting of a converter build -- here's the image:
[attach=1]

That was posted on page 11 of this thread. I will post my own converter tonight. Then I will open the box of horrors inside it. It works, but I consider unplugging it to avoid a fire hazard.  ^-^

I opted out of the LEDs because I wasn't really sure how to wire up the resistors.

Oh, and when I disconnect the keyboard from the converter and reattach I get some weird behavior -- I get R06 errors sometimes (clock timing error from docs IIRC) and it registers keypresses but then repeats then ad infinitum, until I disconnect the converter as well. Not sure if that's usual or not. I will post some pics this evening.

For the names of the 122-key function keys: I posted the commented full config file of my Terminal Model M some weeks ago here:

http://geekhack.org/index.php?topic=17458.msg658161#msg658161

Here's some pictures of my keyboard with corresponding keycaps (German though):

http://geekhack.org/index.php?topic=17458.msg671233#msg671233

Maybe that helps you to get started, IMHO it's a better starting point than using legacy.sc for a 122 key Model M.

Halvar, thanks so much for that -- I will give it a shot. I commented out some lines from the legacy.sc, assembled that file into 'test-122.sca' and then imported that file. When the behavior didn't seem quite right (ESC key in odd place) I assembled and write an empty file, and that really didn't work. How would I 'undo' that original 'test-122' file that I read into the converter?

Eventually I'm going to go for a bolt mod and replace the vertical enter key and give it a full size left shift. Then it will more like a conventional Model M. Thanks again Soarer, for this great solution!
Title: Re: XT/AT/PS2/Terminal to USB Converter with NKRO
Post by: alaricljs on Mon, 15 October 2012, 08:58:24
If I recall from my reading of this thread.... you're not supposed to detach/attach the keyboard while the converter is live.  Any hot plugging is purely on the USB side.
Title: Re: XT/AT/PS2/Terminal to USB Converter with NKRO
Post by: Krogenar on Mon, 15 October 2012, 17:18:54
Ok, here we go. Keep in mind I have no experience building electronics. My goal was the photo from my previous post. The final result brings to mind this woman's attempt at artwork restoration:

http://www.huffingtonpost.co.uk/2012/08/23/before-and-after-pictures-woman-restores-christ-fresco-in-spanish-church_n_1824036.html (http://www.huffingtonpost.co.uk/2012/08/23/before-and-after-pictures-woman-restores-christ-fresco-in-spanish-church_n_1824036.html)
[attach=3]

 ;D

And now my version:
[attach=1][attach=2]

Notice the gigantic single screw holding down the perfboard. There were no copper pads on this board, so I just used wire leads. I have no idea how to properly do this, but it works. Am I going to burn my house down? Any and all tips would be greatly appreciated. I'm going to this of this as my first attempt. I have another Teensy, and enough spare parts to build another. What I wasn't sure about was how to properly finish the whole thing. If I were to try to stick it inside the keyboard case what would I do? Just tape it to the inside? Or wrap it up in electrical tape? Been reading electronics textbooks to learn more.

It makes me laugh to look at my goal and the end result, but for my first (well, second) project I'm fairly pleased.
Title: Re: XT/AT/PS2/Terminal to USB Converter with NKRO
Post by: Soarer on Mon, 15 October 2012, 17:41:22
I commented out some lines from the legacy.sc, assembled that file into 'test-122.sca' and then imported that file. When the behavior didn't seem quite right (ESC key in odd place) I assembled and write an empty file, and that really didn't work. How would I 'undo' that original 'test-122' file that I read into the converter?

Hmm, that should work to clear things back to the defaults. You can check by running scinfo - if it reports that EEPROM Free is 8 bytes less than EEPROM size then there is no config loaded. You'll probably need to map ESC somewhere yourself in a new config.
Title: Re: XT/AT/PS2/Terminal to USB Converter with NKRO
Post by: Krogenar on Mon, 15 October 2012, 19:06:14
I tried using Halvar's config file -- worked beautifully. I'm trying to find some nice symbols for the keycap legends. Thanks so much!
Title: Re: XT/AT/PS2/Terminal to USB Converter with NKRO
Post by: Halvar on Tue, 16 October 2012, 11:31:10
The painting restoration story is hilarious.  :D

Some symbol fonts I found and partly used:

http://www.dafont.com/stmedia.font
http://www.dafont.com/heydings-icons.font
http://www.dafont.com/heydings-controls.font
http://blog.guifx.com/2009/04/02/guifx-v2-transport-font/

(Sorry if this is becoming slightly offtopic...)

Title: Re: XT/AT/PS2/Terminal to USB Converter with NKRO
Post by: Krogenar on Tue, 16 October 2012, 14:20:49
The painting restoration story is hilarious.  :D

Yeah, she started out trying to restore Jesus, and wound up making him look like Mr. Bill.

Quote from: Halvar
Some symbol fonts I found and partly used:

http://www.dafont.com/stmedia.font
http://www.dafont.com/heydings-icons.font
http://www.dafont.com/heydings-controls.font
http://blog.guifx.com/2009/04/02/guifx-v2-transport-font/

Ah yes, I was fooling around with the labels last night, will check these out! Thanks again Halvar, I salute you!
Oh, I noticed right before collapsing that there's a keypress function called 'APP' -- anyone know what it does, offhand? I'll just plug it in tonight and find out, but, was curious.
Title: Re: XT/AT/PS2/Terminal to USB Converter with NKRO
Post by: Soarer on Tue, 16 October 2012, 15:06:45
Nothing exciting... it's just the Window's menu key.
Title: Re: XT/AT/PS2/Terminal to USB Converter with NKRO
Post by: Halvar on Tue, 16 October 2012, 16:12:15
http://www.clker.com/clipart-15445.html
Title: Re: XT/AT/PS2/Terminal to USB Converter with NKRO
Post by: Soarer on Wed, 31 October 2012, 20:58:20
Since it only samples when the clock line changes state, any changes in the data line have actually happened before they are shown on the graph.

New improved version (sorry __red__!) now samples whenever any of PD0 to PD3 change, and at higher time resolution. Plus a hacked together MFC app to parse and draw them nicely without messing about.

All traces are from the release code for 'Z'...

IBM PC/XT:
[attachimg=1]

Leading Edge:
[attachimg=2]

IBM PC/XT:
[attachimg=3]

Leading Edge:
[attachimg=4]
Title: Re: XT/AT/PS2/Terminal to USB Converter with NKRO
Post by: Arbiter343GS on Wed, 07 November 2012, 22:39:45
I actually did this project about a month ago after I bought a 122 key model M off of ebay and it went perfectly. I honestly just have no clue how to remap it so I can make use of the extra keys. Could someone point me in the right direction?
Title: Re: XT/AT/PS2/Terminal to USB Converter with NKRO
Post by: fohat.digs on Thu, 08 November 2012, 06:55:19
I have used Key Tweak, but most people seem to prefer Auto Hot Key.

I plan to try AHK when I rework my rig.
Title: Re: XT/AT/PS2/Terminal to USB Converter with NKRO
Post by: Arbiter343GS on Thu, 08 November 2012, 09:58:03
Ive been trying auto hotkey but I have no idea how to go about programming the extra keys as another key press like a windows key.
Title: Re: XT/AT/PS2/Terminal to USB Converter with NKRO
Post by: Soarer on Thu, 08 November 2012, 10:24:54
Remappings are best done in the converter because then there's no restrictions (like autohotkey) or rebooting (like keytweak). (But I also use autohotkey for some things).

First things first... have you got the v1.0 zip as well the latest? (since it contains the docs and tools etc).

There's a few samples in the configs folder, and there's also a few in this thread (best to scan through backwards to find them).
Title: Re: XT/AT/PS2/Terminal to USB Converter with NKRO
Post by: fohat.digs on Thu, 08 November 2012, 16:02:07
Do you remember that I went through hours/days of anguish trying to get a Teensy to work, once about a month ago and once about a month before that? I ran out of time each time and gave up for a while. I also ordered a new Teensy which I never took out of the envelope until today.

So, after lunch, I got out the old Teensy and wired it up every which way to my 2 Model F-122s - absolutely nothing.

Then, I cracked open the new Teensy, did the standard setup, and it worked right away on both boards!

Clearly, I have a bad Teensy on my hands. Whether it came that way or not, I don't know. I might have screwed it up myself, because at one point I did solder wires to 4 of the leads, as well as putzing around in several other ways.

Has anybody else gotten a defective Teensy, and should I, in all fairness, ask for a replacement?

I have bought a total of 4 units, and the people out there are so very nice I would not want to take advantage of them, but I really do think that this one was probably defective.

You said that if I wired it up improperly, it was likely to cook the controller on the keyboard and not the Teensy, and clearly I did not kill the boards, whatever I did, right or wrong.

So what do you think I should do?

Title: Re: XT/AT/PS2/Terminal to USB Converter with NKRO
Post by: Soarer on Thu, 08 November 2012, 18:01:48
That's a tough one to call!

I think the only likely way to electrically damage a Teensy when making this converter would be to connect +5V to one of the input pins (data or clock), or to connect ground directly to one of the LED driving pins. But there could be other ways, perhaps more indirect, to cause damage.

It's also possible to physically damage PCB pads and traces. That damage would usually be visible, although perhaps only with magnification.

They say that "all Teensy boards come fully assembled and tested", so I doubt they'll take one back.

I could put together some sort of 'self-test' program for a Teensy fairly easily, but it would require making a few connections on the Teensy. Nothing complicated, just joining PD0 and PD1 to a couple of other pins so input and output functions can be tested.
Title: Re: XT/AT/PS2/Terminal to USB Converter with NKRO
Post by: fohat.digs on Thu, 08 November 2012, 19:50:56
I emailed "Paul" and he was nice but I am not going to push for a replacement. He is going to look up my order first.

I am pretty sure that all my wiring was correct, but the one boo-boo I might have made was when I had alligator clips on some of my leads.

It is possible that they might have flopped around and touched each other .....

My HUGE relief is knowing that I did not wreck the circuit boards on either of the keyboards.

$23 will put a new Teensy in my mailbox in 72 hours, but it takes months to find a Model F and almost the price of the Teensy in shipping alone. And that is domestic US.
Title: Re: XT/AT/PS2/Terminal to USB Converter with NKRO
Post by: Soarer on Thu, 08 November 2012, 21:03:11
Yes, that is a relief. I've used about half a dozen Teensies, and had no bad ones. I haven't killed one yet either, but it's bound to happen at some point! :D

I made a few one-off versions that use the PD2 and PD3 pins instead, as part of improving the XT mode to handle oTurtlez Leading Edge. (The XT mode changes will only benefit those who have XT 'boards that don't currently work with the converter, and there will be a proper release soon that includes them, using the normal pins). I don't plan on making alternate-pin versions available regularly, but it might mean you can use that Teensy for something...  [attachurl=1].
Title: Re: XT/AT/PS2/Terminal to USB Converter with NKRO
Post by: wcass on Thu, 08 November 2012, 21:14:56
I actually did this project about a month ago after I bought a 122 key model M off of ebay and it went perfectly. I honestly just have no clue how to remap it so I can make use of the extra keys. Could someone point me in the right direction?
it is actually quite easy. first, go to the DOCS folder and double-click on index.html. since you only need help re-mapping keys, go to the Config section and read the Command Reference. if you are starting with a 122 then you probably will only need to study/learn remapblock. you will also need to learn (or keep a cheat sheet handy) what the program expects you to name any keys you will be working with. you will find these in the Codes section. then open one or more of the .sc files in notepad and look at these as examples.

create your own sc file with a text editor. start with a comment line (line begins with #) that identifies what you are trying to do. add a line remapblock to start the remap block. list the keys you want to change and what you want to change each to. then close the remap block with the endblock command. save this file with a .sc extension.

Code: [Select]
# Billy's TSSK layout

remapblock
        F7     DELETE
        F8     END
        F9     PAGE_DOWN
        F10    LEFT
        F11    DOWN
        F12    RIGHT
        F13    F7
        F14    F8
        F15    F9
        F16    F10
        F17    F11
        F18    F12
        F19    INSERT
        F20    HOME
        F21    PAGE_UP
        F22    SCROLL_LOCK
        F23    UP
        F24    PAUSE
    FAKE_06    BACKSLASH
    FAKE_08    ESC
    FAKE_09    PRINTSCREEN
    FAKE_10    MEDIA_MEDIA_SELECT
    FAKE_11    MEDIA_PLAY_PAUSE
    FAKE_12    MEDIA_PREV_TRACK
    FAKE_13    MEDIA_NEXT_TRACK
    FAKE_14    MEDIA_VOLUME_DOWN
    FAKE_15    MEDIA_VOLUME_UP
    FAKE_16    APP
    FAKE_17    LGUI
endblock

open a dos prompt. navigate to your tools folder and drag&drop scas.exe to the command prompt, but don't run it yet. add a space to the end and then drag&drop your custom .sc file to the end of the command line - don't run it yet. add a space and then drag&drop the same .sc file - and then add a B to the end. now hit enter to run the command. this "compiles" your code. you will find it in the same folder as your SC file but with SCB as the file extension.

now that your custom file is compiled, you need to send that to the teensy. drag&drop scwr.exe into the command window, add a space, and then drag&drop your .SCB file to the end of the command line. hit enter to program.

test your newly remapped keys to verify that they are remapped.
Title: Re: XT/AT/PS2/Terminal to USB Converter with NKRO
Post by: fohat.digs on Fri, 09 November 2012, 12:04:04
The last leg of this trip has been surprisingly difficult, but I now have my working outboard converter box.

It is set up to use my genuine IBM female DIN plug to fit the Model F 122-key terminal connection.

Soarer, thank you so much for making this possible!

Title: Re: XT/AT/PS2/Terminal to USB Converter with NKRO
Post by: Krogenar on Fri, 09 November 2012, 14:03:25
Nice build fohat!
Title: Re: XT/AT/PS2/Terminal to USB Converter with NKRO
Post by: fohat.digs on Fri, 09 November 2012, 14:27:00
Arrgh! I spoke too soon about my ecstasy.

My old build, F-122 with internal Teensy and Soarer's Converter v0.997 (I think it was) and KeyTweak to remap my keys, has performed admirably for a year.

So, in my happiness, and desire to have a clean update, I downloaded the latest version of KeyTweak and tried to remap my mostly "stock" F-122 running through the new converter box on v1.03.

I had forgotten the grief I had with the numpad. I would really love to have an ANSI-standard numpad (except with a 2nd "Escape" in place of "NumLock")

For whatever reason, the top row is "stuck" and will not let me change it. The left 2 keys act like they are remapping, but don't, and the upper right ("Pause", which I want to be "Numpad -") does not even seem to exist with KeyTweak.

Also, KeyTweak does not seem to recognize the left set of function keys, staying grayed-out altogether when I try to remap them.

hid_listen.exe returns a response to all these keys, but I cannot get the response you show in the OP to see what ID I have. When I run hid_listen, it just starts "listening" without returning any information first.

This board is a 6110347 and does not have DIP switches. Like my other one, there is only one way the controller will plug in.

I remember that last year I fooled around trying to find another way to plug in the connectors, looking for a type 1 or type 2 or something, but there was not other viable option.

Eventually, everything worked except "Pause" so I decided to tolerate it.

Thanks in advance if you can steer me towards a solution.
Title: Re: XT/AT/PS2/Terminal to USB Converter with NKRO
Post by: Halvar on Fri, 09 November 2012, 15:13:42
hid_listen only shows the ID when the teensy is started. So to see it, unplug your keyboard, start hid_listen, and plug in the keyboard again.

Did you use a remap/confiig file for Soarer's converter at all?

If you didn't, you could start by writing one and try how far you can get without using KeyTweak at all.

I use my M-122 with a config file for Soarer's converter only. I posted the config file here http://geekhack.org/index.php?topic=17458.msg658161#msg658161
You'll probably want other mappings, but it's easier to start with a config file that already has all the relevant key names for your keyboard.

Halvar
Title: Re: XT/AT/PS2/Terminal to USB Converter with NKRO
Post by: Soarer on Fri, 09 November 2012, 15:55:14
Yes, the solution is to use a config file and do the remapping on the Teensy - wcass' guide above covers it pretty well (thanks Billy!), and of course we'll help if you get stuck!

Halvar is right, the ID is only printed when the converter is first connected to the computer. You might be thinking of the hacked in alternate mappings I provided before that were enabled by changing the ID - those are now obsolete (although they can be emulated by a config, e.g. legacy.sc, that's not ideal).
Title: Re: XT/AT/PS2/Terminal to USB Converter with NKRO
Post by: fohat.digs on Fri, 09 November 2012, 16:32:03
Thank you.

When I hot plug the Teensy, I get:

wED rFE !!FEwED rFE !!FEwED rFE !!FE


The keys on the left (which I DO still want as an extra F1-F10, they are very handy there) return:

r05  "F1"
r06  "F2" etc
r04 
r0C
r03
r0B
r83  why is "F7" different?
r0A
r01
r09

I understand that I have to give up on remapping "Pause" to "NumPad -" but I had the other 2 remapped before.
This was touched on in post #112 and #114 but whatever happened?

I am working my way through the thread again to see if I can find out how to jumper my controller, if need be.
Title: Re: XT/AT/PS2/Terminal to USB Converter with NKRO
Post by: Soarer on Fri, 09 November 2012, 17:05:30
You don't have to give up on remapping Pause if you do the remapping in the converter!

The codes prefixed by 'r' are as received from the keyboard, and are mapped once or twice before reaching the computer. First, the set 3 code is mapped to a USB HID code, which is printed with a '+' or '-' prefix. That mapping is fixed and can't be modified. Second, remappings from the config are applied, and the result is printed with a 'd' or 'u' prefix.

When looking for a code to remap, the one to look for is the one beginning with '+'. For the left-hand F1, you'll see +B7 in hid_listen. In the Code list in the docs, you'll see I've called that EXTRA_F1. So a line in a remapblock to remap that to a second 'normal' F1 would be:
    EXTRA_F1  F1

Similarly, remapping Pause to 'NumPad -' would be done by:
    PAUSE  PAD_MINUS

Really, so much changed when the config stuff was introduced with v0.997 that a lot of this thread is outdated (v0.997 was at post 294). TBH I can't remember much about the exact issue with Pause at posts 112/114, except that it got fixed :D
Title: Re: XT/AT/PS2/Terminal to USB Converter with NKRO
Post by: Halvar on Fri, 09 November 2012, 17:29:17
I don't know if there's a difference between the default mapping of an M-122 and an F-122. Probably not.

On my M-122, there is no "Pause" button any more in the default mapping (with version 1.03).

The upmost row of the numpad on my M-122 had these default mappings from left to right:

ESC
NUM_LOCK
SCROLL_LOCK
EXTRA_SYSRQ






Title: Re: XT/AT/PS2/Terminal to USB Converter with NKRO
Post by: fohat.digs on Fri, 09 November 2012, 17:40:32
Finding the picture (not easy) that went along with my own post at #223 allowed me to place a jumper and set my keyboard ID to AFBF, but that does not seem to have helped anything much.

I am an old man with very little programming experience. I have 4 Model F-122s that I hope will satisfy my keyboard needs for life - which for me is a couple of decades, 3 if I am very lucky. I am not saying this to be funny or flip, I am quite serious.

2 of them have internal Teensy's and work great (although they are running something like version 0.996 at the moment, and I want to update them, if I dare), and 2 are "stock" to go with my clean little outboard converter. I want to build another outboard converter to mess around with XTs and the like, but this one is the "real deal" that I am serious about.

My dream would be to upgrade and program them all to behave exactly the same, and to last through my next several OS's. Dream on, Harry!

I would love to do everything "in the converter" but I don't even know how to open it. Unless I have step-by-step instructions I am just not "there" and my "there" is pretty embarrassing. For example, I have downloaded and extracted a bunch of files, but what exactly do I do with a *.sc file? I feel like an infant. But I am intelligent and can learn.

So, can you point me in the direction of where to learn how to set these things "in the converter"? I know where the Registry is and how to diddle with things there, although I do it seldom and with trepidation.

Thank you again.

Title: Re: XT/AT/PS2/Terminal to USB Converter with NKRO
Post by: Soarer on Fri, 09 November 2012, 18:06:28
Halvar, that's true... since v0.997 that Pause mapping moved to legacy.sc. It never was in the first stage mapping though (it was in a kind of built-in config), and I can't remember why now!

101-key 'boards use set 2 by default. But they can be told to use set 3 instead - so that gives a defined mapping between between set 3 and set 2 for all the keys on a 101- or 102- key 'board. But the 122- and the 101- both use 84 for the top-right key on the numpad, so there must've been some other reason why I didn't make set 3 code 84 map to 'NumPad -' directly. There were a number of other constraints I had to consider as well, and for sure, when something had to give it was always going to be in the 122-key mappings rather than the others.
Title: Re: XT/AT/PS2/Terminal to USB Converter with NKRO
Post by: Soarer on Fri, 09 November 2012, 18:27:39
fohat, to give a quick idea of the process of getting config 'in the converter', the steps are to:
1. edit a text file,
2. run a command line program (scas) to turn that text file into a binary file, and then
3. run another program (scwr) to transfer the binary file to the converter.
No registry danger involved!

To me, wcass' quick guide (http://geekhack.org/index.php?topic=17458.msg708153#msg708153) seems pretty complete, but I'm aware that I already know (far too much) about what he's describing to judge how useful it is to others!! If you can highlight the parts that fox you, I'll try to unfox :D
Title: Re: XT/AT/PS2/Terminal to USB Converter with NKRO
Post by: Arbiter343GS on Fri, 09 November 2012, 22:33:12
I pretty much understand how the entire process works now, but Im stumped on how to get SCAS to assemble the SC file into a SCB file. Because I cant drag and drop items in my command prompt, it just shows a cancel sign as my cursor when i try to do it. Ive also tried opening scas in command prompt but I just dont get how to get scas to see my sc file(I guess is what Im trying to say), because I cant drag the sc file over the exe because the command prompt pops up for a split second and then disappears. Ive had a lot of experience with DOS but for some reason, Im just stumped.
Title: Re: XT/AT/PS2/Terminal to USB Converter with NKRO
Post by: Soarer on Sat, 10 November 2012, 04:51:16
On Windows, the simplest way to do it without the drag-drop into the command prompt window is to extract the tools zip to C:\sctools, save your config (e.g. Arbiter343GS.sc) in the same directory as the tools, and then open a command prompt and type the following commands:
Code: [Select]
cd \sctools
scas Arbiter343GS.sc Arbiter343GS.scb
scwr Arbiter343GS.scb
Title: Re: XT/AT/PS2/Terminal to USB Converter with NKRO
Post by: zz on Sat, 10 November 2012, 09:04:17
hi!

and thank you so much for making this awesome project!
i can confirm that it works right out of the box with my model f.
brilliant documentation too, just wow.

since it worked so well from the start, i got cocky and resoldered the connection cable so that the teensy can be mounted inside.
well, bad idea it seems, because now it doesn't work anymore. even though the soldered contacts look better than what i had on the first try.

here are the symptoms:
- converter is found, scwr and scinfo work
- the orange teensy led flashes on keypress, but no keystrokes are sent
- hid_listen gets just "rFF" signals from every key

whats the problem here, is it just bad contacts or did i switch some pins?

regards,
zz
Title: Re: XT/AT/PS2/Terminal to USB Converter with NKRO
Post by: Soarer on Sat, 10 November 2012, 09:14:31
Data line is stuck high - hopefully just a bad connection :)
Title: Re: XT/AT/PS2/Terminal to USB Converter with NKRO
Post by: zz on Sat, 10 November 2012, 09:49:46
aw man and a support reaction time of ten minutes!
there is no hid manufacturer that can compete with any of this  :D
thank you sir, i'm heating up the soldering iron.
Title: Re: XT/AT/PS2/Terminal to USB Converter with NKRO
Post by: Arbiter343GS on Sat, 10 November 2012, 11:18:37
That worked, thank you for all the help!
And wow. I am definitely blind, I was scouring over the entire html file and I conveniently just now saw the (filename).scb part. Sorry, for any inconveniences.
Title: Re: XT/AT/PS2/Terminal to USB Converter with NKRO
Post by: Soarer on Sat, 10 November 2012, 12:00:41
Yeah, scas takes two arguments, so dropping a file onto it in the GUI doesn't work.

How about - a batch file that runs both scas and scwr, using a default filename for the binary file so it can work by simply dropping a config file onto it...

[attachurl=1]

Put it in the same folder as the tools. If you like, you can make a shortcut to it (on your desktop or wherever) and that can accept dropped config files as well.

Also, it doesn't matter where you save your config then :D

Same thing as text in case attachments get screwed... or you are suspicious of .bat files  :))
Code: [Select]
@echo off
rem scaswr.bat - a drop target for config files

rem Change directory to the location of the batch script file (%0)...
cd /d "%~dp0"

rem Run scas with a default target filename...
echo Assembling %1...
scas %1 %1.scb
if errorlevel 1 goto end

rem Run scwr with that default filename...
echo:
echo Writing %1.scb...
scwr %1.scb

:end
rem Wait for a keypress so the output can be read...
echo:
pause
Title: Re: XT/AT/PS2/Terminal to USB Converter with NKRO
Post by: fohat.digs on Sat, 10 November 2012, 13:10:15
Thank you again, you always come through.

I was having a similar problem to Arbiter, not quite the same. And, it all worked, saying that it wrote HCMF-122.scb from HCMF-122.sc but there was no evidence of the second file with the "b" on the end existing in the directory (or anywhere, according to Search!).

Pause, still, stubbornly, will not allow itself to budge. That has always been my one sticking point but I suppose that I have no choice but to live with it.

Last, for some silly reason, F24 does not want to become "Mute" like I like it, but maybe KeyTweak will fix that after all.

Thanks again, I am hoping that this will be a long-term solution to my needs. I plan to use this one, as it is, for at least a week before I update my other boards and Teensy's.
Title: Re: XT/AT/PS2/Terminal to USB Converter with NKRO
Post by: Soarer on Sat, 10 November 2012, 13:38:42
We can most definitely get it much better than having to live with any annoyances, but you have managed to pack quite a few baffling points into that post :))

So scas said it wrote HCMF-122.scb... did scwr then say it loaded it ok to the converter?
(BTW, the tools don't delete any files as they do stuff, in case you were wondering).

As Halvar reminded me earlier, Pause isn't there in the default mapping in v1.03. So I'm not quite sure what's happening with that in your case!

I will check later that F24 can be mapped to Mute, but I'm pretty sure it can.

I'm wondering if your previous KeyTweaking is now getting in the way of the converter's mapping - have you tried clearing things in KeyTweak?

Oh, and grab that batch file from my previous post - it's really quite nice being able to just drag-drop a config onto it, I'm liking it more than I thought I would :D
Title: Re: XT/AT/PS2/Terminal to USB Converter with NKRO
Post by: fohat.digs on Sat, 10 November 2012, 14:36:10
Sorry to make life difficult.

First, I had already reset everything in KeyTweak back to default, and I almost uninstalled it altogether, but I decided to keep it after all. But currently, nothing is KeyTweaked at all.

Clearly, the .scb file must exist somewhere, since it is working, but it just does not show in any of the directories where I have been working.

F24-to-Mute must have been a problem on the Mute side, so I set F24 back to F24 and it seems happy. I may try KeyTweak for that.
 
When I say "Pause" I am talking about the button at the top right of the NumPad. My F-122s came with a keycap that says "Pause" in that location, so I was going with that concept. Actually the key does not seem to do anything at all, in any case.

With the jumper I added last night, this keyboard is now an AFBF, so is that key really something else? Maybe I am trying to remap a non-existent key!

I use keyboardtest.exe and it has been very good. There are about 3 keys that it chokes on, such as Tab, but it shows pretty much everything on the 122 layout, unlike programs such as aquakey.

However, 2 keys that it does not identify are the center arrow key and the "Pause" or whatever that key really is. Pressing them does not produce any response at all. What else could they be?
Title: Re: XT/AT/PS2/Terminal to USB Converter with NKRO
Post by: Soarer on Sat, 10 November 2012, 14:45:49
For the top-right numpad key, you need to remap EXTRA_SYSRQ, and the centre key in the cursors is LANG_4, I think.

IFF you started from legacy.sc, and left most of it there, then the ID might still be having an effect. Otherwise not.

The best way to see what codes you need to remap is to use hid_listen, spot the code starting with '+', and find it in the Codes list in the docs.

I'll check on MUTE in a short while, but first I need to go buy food and booze!!!

If you have known file extensions hidden in explorer, and .scb is something already, then the .scb would look like it's the .sc... could that be it? (Still don't know why it wouldn't find it with a search though).
Title: Re: XT/AT/PS2/Terminal to USB Converter with NKRO
Post by: fohat.digs on Sat, 10 November 2012, 15:54:38
My hat is off to you once again.

And please, never let questions about keyboards get in the way of important things like food and drink!

I had been torturing myself over "Pause" when it was not really Pause at all. How foolish of me to think that what was written on a keycap was what was actually underneath ......

Now I am down to a final KeyTweak, re-creating a "Windows" key. It is not 0x76 "Menu" by any chance, is it?

So, is this "permanently" programmed into the Teensy, until I do something to re-set or re-program the unit?

And if I plug in another keyboard (similar but not identical) to this outboard box, should I expect the Teensy to remain happy or will I need to do it again?

Thank you again.
Title: Re: XT/AT/PS2/Terminal to USB Converter with NKRO
Post by: Soarer on Sat, 10 November 2012, 16:54:26
All stocked up now  :cool:

If Pause hadn't been EXTRA_SYSRQ, it would've been PAD_MINUS... which wouldn't have helped much either  :)) Various 122-key 'boards have different legends anyway.

I think I've figured out the MUTE problem without even trying it... thanks to you mentioning MENU. There's a group of codes there, from EXECUTE to MUTE, that are defined in the standard but don't work with Windows (or at least don't do anything useful without extra software). I will clearly mark them somehow in the next docs update.

So, the MUTE you want is MEDIA_MUTE :)

And the three Windows keys are LGUI, RGUI and APP.

All of the names that aren't in italics are pretty much straight from HID documentation, so don't go blaming me for the quirks! (Not that you would :) )

Settings stay in the converter. In fact, that's usually true even if you load an updated hex, unless the settings become incompatible with the update. Obviously, I'll try to keep incompatibilities to a minimum, but it's bound to be necessary sometimes. Anyway, all you would usually need do in that case is recompile and reload your config.

Other keyboards should remain happy... or at least, we can make it so they are happy. This is where some of the 'if' commands could come in handy. Let's say you wanted to use it with the 122-key and also an 83-key PC/XT. Then you'd simply put:
  ifset set3
above the 122-key stuff, and:
  ifset set1
above the 83-key stuff, and:
  ifset any
above stuff you wanted to affect both keyboards.
Title: Re: XT/AT/PS2/Terminal to USB Converter with NKRO
Post by: fohat.digs on Sat, 10 November 2012, 17:35:51
Sweet! Even better than I thought.

I guess that in England you don't have "blue laws" ie no alcohol on Sundays except in restaurants that also serve food. So, if you don't make it to the liquor store by closing time Saturday night - horrors - no drinking at home until Monday morning. And who would argue that Monday morning is a good time to drink ...... ?

Having the upper right key in the numpad as PAD_MINUS would be fine with me, that is what I want. I use the numpad and am happy with an ANSI layout, even more so replacing the now-useless NumLock with a very useful "Escape".

Now that I understand how easy and straightforward your technique is (now that it is sufficiently dumbed-down to a recipe) I have no use for KeyTweak anymore anyway. I will ditch it.

I always favor the simplest and most direct route, once I find what that actually is ....
Title: Re: XT/AT/PS2/Terminal to USB Converter with NKRO
Post by: Soarer on Sat, 10 November 2012, 18:05:58
No, nothing like 'blue laws', but big shops are limited to I think 6 hours opening on Sundays. So I'll have to get there before 4PM tomorrow instead of the rush round before 10PM I did tonight!

It can be a hurdle to get started with the config stuff, but now you know a little you can learn the rest as and when  you need it, one thing at a time. I get disappointingly few questions about macros - I guess either because people who get that far are simply fine with it, or because nobody gets that far :))
Title: Re: XT/AT/PS2/Terminal to USB Converter with NKRO
Post by: AKIMbO on Sat, 10 November 2012, 19:26:10
A big shout out to Soarer...I just want to say thank you again for this awesome converter code.  I just successfully converted my F-122. This makes two successful conversions now (an XT and this  F-122).
Title: Re: XT/AT/PS2/Terminal to USB Converter with NKRO
Post by: fohat.digs on Sat, 10 November 2012, 19:42:38
Good Luck! What was that one dated, April 1984?

The oldest one I have is a 6110344 dated August 1984.

Was the foam mat in decent condition?
Title: Re: XT/AT/PS2/Terminal to USB Converter with NKRO
Post by: AKIMbO on Sat, 10 November 2012, 19:47:30
Good Luck! What was that one dated, April 1984?

The oldest one I have is a 6110344 dated August 1984.

Was the foam mat in decent condition?


April 1984....Part # 6110344.  Foam mat appeared to be in decent condition and the metal barrel plate seems to be in good condition too (no visible rusting).  With that being said, I didn't really tear it down yet...I only cut, stripped, & soldered the cable onto the Teensy and programmed the Teensy.  Plugged it in and typed on it just fine.  I'm waiting for an extended time off work/school before I really get into the tear down and modification. 
Title: Re: XT/AT/PS2/Terminal to USB Converter with NKRO
Post by: zz on Sat, 10 November 2012, 20:50:48
damn. why did i touch it. it was running perfectly  :'(
after very carefully resoldering the wires both my keyboards seem to be dead!
hid_info only registers keyboard id 0000 and no keystrokes at all..
cable contacts are ok, and programming/restarting the teensy as well as executing the sc tools works fine.
hmmm.. any ideas?
Title: Re: XT/AT/PS2/Terminal to USB Converter with NKRO
Post by: fohat.digs on Sat, 10 November 2012, 21:05:17
What wires?

As much as I have tinkered with other stuff, I have not touched any "internal" wires in my Model Fs.

The 2 internal Teensy's I installed were attached to the controller board with original connections by cutting the cable and soldering directly to the legs of the Teensy. That is nice, because it appears to be a sturdy, permanently attached USB cable.

Even that makes me a bit nervous, so my current project was to build an outboard box to keep the entire keyboard intact, including DIN plug.

PS - AKIMbO, you should consider yourself fortunate to get a super-early F-122 with decent foam mat and non-rusted plate. I have gotten a couple of "OK" mats but never a plate that wasn't at least a little rusted.
Title: Re: XT/AT/PS2/Terminal to USB Converter with NKRO
Post by: zz on Sat, 10 November 2012, 22:10:18
i meant the cable.. i just wanted to make it shorter to fit inside.
Title: Re: XT/AT/PS2/Terminal to USB Converter with NKRO
Post by: Soarer on Sun, 11 November 2012, 06:36:48
So it's worse than before? Not even the rFF codes now? :(

Most of the ways to damage things have been talked about recently, so you should be able to find those fairly quickly if you scan backwards through this thread.

At a guess though, it's possible that the Teensy PCB has been damaged as you removed wires - if the solder isn't totally melted, it can pull the pad on the top clean off, which breaks the connection to the trace. The pad on the bottom would likely still be fine, so resoldering would look fine too, but the traces for both PD0 and PD1 are on the top side :(
Title: Re: XT/AT/PS2/Terminal to USB Converter with NKRO
Post by: zz on Sun, 11 November 2012, 11:03:56
phew!
got it back to work on pd3 and pd4 with the alternate firmware a few pages back.
seems like i really damaged some teensy connectors..
i'm just glad i got my "BsDef"-button back  :D
thanks again.
Title: Re: XT/AT/PS2/Terminal to USB Converter with NKRO
Post by: Soarer on Sun, 11 November 2012, 15:19:46
Shame about the damage, but at least it's working now :)
Title: Re: XT/AT/PS2/Terminal to USB Converter with NKRO
Post by: AKIMbO on Sat, 24 November 2012, 13:45:41
Mmmmm.....success.  ANSI layout.  Thanks again Soarer!


(http://i48.tinypic.com/25gxw74.jpg)
(http://i49.tinypic.com/hvcdo0.jpg)
(http://i47.tinypic.com/2eppzpc.jpg)
Title: Re: XT/AT/PS2/Terminal to USB Converter with NKRO
Post by: Soarer on Sat, 24 November 2012, 13:53:18
Nicely done... and very clean!
Title: Re: XT/AT/PS2/Terminal to USB Converter with NKRO
Post by: AKIMbO on Sat, 24 November 2012, 15:34:39
I'm having a bit of an issue with the converter.  When I run the command (scwr akimbo.scb) the command prompt spits out:

scwr: looking for Soarer's Converter: found
scwr: reading file failed
too short

I'm kind of stumped here. 

Forgot to mention, my notepad file with the config is akimbo.cfg.
Title: Re: XT/AT/PS2/Terminal to USB Converter with NKRO
Post by: Soarer on Sat, 24 November 2012, 15:50:12
That's odd. No errors from 'scas akimbo.cfg akimbo.scb', presumably?
Title: Re: XT/AT/PS2/Terminal to USB Converter with NKRO
Post by: AKIMbO on Sat, 24 November 2012, 15:56:26
^You know what I did wrong.  I didn't use type .cfg when i ran 'scas akimbo.cfg akimbo.scb'
 It worked perfect just now when I added. .cfg.   Man I'm embarassed. :-(

Yup, everything is working now.  Tenkey is reprogrammed perfectly along with F22-F24.
Title: Re: XT/AT/PS2/Terminal to USB Converter with NKRO
Post by: Soarer on Sat, 24 November 2012, 16:03:53
Ahahahahahaha... haaaa.... :p
Title: Re: XT/AT/PS2/Terminal to USB Converter with NKRO
Post by: AKIMbO on Sat, 24 November 2012, 16:05:49
 :-[ Hehehehe
Title: Re: XT/AT/PS2/Terminal to USB Converter with NKRO
Post by: Soarer on Sat, 24 November 2012, 16:22:39
 :-*

(there is no bro-hug smiley, so...)
Title: Re: XT/AT/PS2/Terminal to USB Converter with NKRO
Post by: fohat.digs on Sat, 24 November 2012, 21:03:11
Great job, AKIMbO.

I have been working on my instructions for a project similar to this, and have put it up here.

http://geekhack.org/index.php?topic=37753.0 (http://geekhack.org/index.php?topic=37753.0)
Title: Re: XT/AT/PS2/Terminal to USB Converter with NKRO
Post by: fohat.digs on Tue, 27 November 2012, 11:46:30
Just when I thought it was safe to go in the water again .....

I lost my numpad. The keyboard is acting like "NumLock" is OFF, but I don't even HAVE a NumLock anymore.
I remapped an unused key to "NumLock" and it fixed the problem - but only temporarily - until I restart.

This is the Model F-122 running through an outboard Teensy. Everything else works fine, and all my remapped keys have kept their remappings, even the top row and right column of the numpad, it is just that the number cluster has reverted to the "NumLock OFF" configuration.

First I looked at software - all OK. And besides, according to the "Modified HID Code Set" there is no differentiation between "PAD_8" and "up" as far as I can tell.

Next, I went to Setup in the Boot Menu and it is set to boot up to "NumLock ON".

So I go to regedit and look under Keyboard to see that "InitialKeyboardIndicators" should be set to "2" but instead it is set to "0"

Whenever I change it and reboot, it resets back to "0" for some reason.

Edit: I solved the problem, in case it happens to any of you others:

There are 2 keyboard entries in the Registry.

Above, I referred to: HKEY_CURRENT_USER\Control Panel\Keyboard

But besides that one, there is also:

HKEY_USERS\.DEFAULT\Control Panel\Keyboard

In both cases, the setting should be "2" but in my Registry the second one must have gotten corrupted because there was a number that was at least 6-8 digits long (starting with 2)

Title: Re: XT/AT/PS2/Terminal to USB Converter with NKRO
Post by: Soarer on Tue, 27 November 2012, 15:06:07
What an odd problem, since the CURRENT_USER setting should override the .DEFAULT!!

BTW, that's a very nice writeup you've done on your mods :D
Title: Re: XT/AT/PS2/Terminal to USB Converter with NKRO
Post by: fohat.digs on Tue, 27 November 2012, 17:24:27
I think that .DEFAULT must have blown everybody's minds.

The choices were 0, 1, or 2, and it was holding a value of something like 2186573 (just making that up) so maybe they all said "Whoa! screw that, let's all just reset to 0 to be safe"

Otherwise, I was logged in as Administrator and changed the setting from 0 to 2. There is no "Save", but, as I understand it, regedit simply keeps the last value it had.
Title: Re: XT/AT/PS2/Terminal to USB Converter with NKRO
Post by: Soarer on Fri, 07 December 2012, 15:12:16
PLEASE VOTE for my converter in the Deskthority Awards 2012: Best input device mod 2012 (http://deskthority.net/deskthority-awards-2012-f34/best-input-device-mod-2012-t4543.html).

The contenders are very strong indeed, so I hope we can at least make it a close race :D

Cheerleading is allowed... hint, hint!!! Sod the hint - post praise in the voting thread (http://deskthority.net/deskthority-awards-2012-f34/best-input-device-mod-2012-t4543.html)!!!


I'm also nominated in the Best deskthority forum contributor 2012 (http://deskthority.net/deskthority-awards-2012-f34/best-deskthority-forum-contributor-2012-t4547.html) category, but since I constantly troll 7bit I don't stand a chance :P So vote for bpiphany! :D
Title: Re: XT/AT/PS2/Terminal to USB Converter with NKRO
Post by: fohat.digs on Fri, 07 December 2012, 17:13:23
Everybody vote for Soarer.

Without him, I would never have known the joy I have experienced every day for a year on my wonderful Model F.

Title: Re: XT/AT/PS2/Terminal to USB Converter with NKRO
Post by: Soarer on Fri, 07 December 2012, 17:32:27
At least I can't lose to thin ABS keycaps (http://deskthority.net/deskthority-awards-f28/best-input-device-mod-2011-t1633.html) again this year!!

That made me sad, but my converter wasn't anything like as complete then as it is now (with all the config stuff).
Title: Re: XT/AT/PS2/Terminal to USB Converter with NKRO
Post by: Krogenar on Fri, 07 December 2012, 19:41:00
Voted. Possibly twice.  ;)
Title: Re: XT/AT/PS2/Terminal to USB Converter with NKRO
Post by: Soarer on Sat, 08 December 2012, 09:43:39
New improved version (sorry __red__!) now samples whenever any of PD0 to PD3 change, and at higher time resolution. Plus a hacked together MFC app to parse and draw them nicely without messing about.

IBM PC/XT:
Show Image
(http://geekhack.org/index.php?action=dlattach;topic=17458.0;attach=7102;image)


Leading Edge:
Show Image
(http://geekhack.org/index.php?action=dlattach;topic=17458.0;attach=7104;image)


Full source and binaries for the logic analyzer now posted on DT (http://deskthority.net/workshop-f7/simple-logic-analyzer-for-teensy-t4567.html) :D

(Sorry GH, but I don't want to maintain two threads, and this is more their cup of tea!)
Title: Re: XT/AT/PS2/Terminal to USB Converter with NKRO
Post by: jwaz on Sat, 08 December 2012, 18:15:31
http://learn.adafruit.com/usb-next-keyboard-with-arduino-micro/overview

How cute, they thought they were doing something new.
Title: Re: XT/AT/PS2/Terminal to USB Converter with NKRO
Post by: Soarer on Sat, 08 December 2012, 18:34:11
http://learn.adafruit.com/usb-next-keyboard-with-arduino-micro/overview

How cute, they thought they were doing something new.

Well maybe they are - it's a different protocol, after all!

Pains me to see bit-banging though, with interrupts disabled for at least a millisecond at a time by the looks of it. :(
Title: Re: XT/AT/PS2/Terminal to USB Converter with NKRO
Post by: precarious on Mon, 10 December 2012, 19:28:59
(http://i.imgur.com/aZLeo.jpg)

(http://i.imgur.com/5E1vV.jpg)

http://deskthority.net/wiki/File:G80-0777.pdf

I purchased a Teensy the other day to try and get an older terminal board up and running, but now I'm wondering if I may have to use it for this Amiga keyboard I just received, too.  The PDF I linked suggests that the model number (G80-0777) can switch between PC/AT, but I've been unable to get it working with my Windows 7 system using a simple Dolch-style converter to adapt the cabling to PS/2.  The PDF also lists the pinout for the keyboard so I don't think wiring should be an issue.  I'm wondering if despite having the ability to switch between AT/PC, I'll still need to use a Teensy-based converter?  Or is the keyboard just dead?

One thing I'm wondering:  there's an Amiga controller on the keyboard that isn't pictured on the PCBs in the PDF, though you can see the empty space for it -- think this is getting in the way?

First time doing this, so I figured this may be an appropriate place to ask. :)
Title: Re: XT/AT/PS2/Terminal to USB Converter with NKRO
Post by: Soarer on Mon, 10 December 2012, 20:13:57
Difficult to say what that extra ROM chip changes - it could be an entirely different protocol!

When you get the Teensy, you could load my simple logic analyzer (http://deskthority.net/workshop-f7/simple-logic-analyzer-for-teensy-t4567.html) onto it to see what the clock and data signals are doing... assuming it doesn't need input from the host to make it talk.
Title: Re: XT/AT/PS2/Terminal to USB Converter with NKRO
Post by: Halvar on Tue, 11 December 2012, 02:15:37
Quite remarkable -- I have never seen an Amiga keyboard like that.

AFAIK, the Amiga 1000 was the only model with that kind of connector, but its standard keyboard looks quite different.

http://eab.abime.net/showpost.php?p=354888&postcount=4

The Amiga 2000 had a totally different layout and a DIN connector.

What kind of switches does this have, if I may ask?

Anyway, I don't think that Soarer's converter can presently be used for any Amiga keyboards, as they use their own different protocol. Here is some info:

http://www.kbdbabel.org/signaling/index.html

Title: Re: XT/AT/PS2/Terminal to USB Converter with NKRO
Post by: precarious on Tue, 11 December 2012, 07:47:55
The seller of the keyboard said it was for an Amiga 1000, so I suppose that makes sense.  Thanks for the links and info, this should be easier to play around with and figure out once I have the hardware in hand.  I'll be sure to report back with my results, or more likely, difficulties.  :)

Oh, the keyboard has MX Blacks.  Some of the keys, notably the windowed ones, are lasered with infill, not pad printed.  The rest are DS of course.

Edit:  Is this the best way to get a Dolch keyboard working over USB, too?  Or is there an easier way to go about that, such as replacing the controller on the board with a more recent Cherry edition?
Title: Re: XT/AT/PS2/Terminal to USB Converter with NKRO
Post by: Soarer on Tue, 11 December 2012, 19:57:36
Sure, this would be a great way to convert a Dolch! I don't know if there are any controllers that would swap in... probably not, since the USB controller from a recent G80-1800 would likely expect a different matrix layout (at least Windows keys...). Other commercial converters like the blue cube would probably also work well... but without any fancy config options :D

Title: Re: XT/AT/PS2/Terminal to USB Converter with NKRO
Post by: metalliqaz on Tue, 11 December 2012, 21:48:57
Well this was an easy project.  Zero to typing with my Model-M with surprisingly little work, thanks to Soarer.
[attachimg=1]
Thanks man!
Title: Re: XT/AT/PS2/Terminal to USB Converter with NKRO
Post by: Soarer on Sat, 15 December 2012, 07:58:44
Many thanks to everyone who voted for my converter :D

[attachimg=1]

Deskthority Awards - Best input device mod 2012 (http://deskthority.net/deskthority-awards-2012-f34/best-input-device-mod-2012-t4632.html)
Title: Re: XT/AT/PS2/Terminal to USB Converter with NKRO
Post by: precarious on Sat, 15 December 2012, 08:58:55
the competition didn't stand a chance, congratulations :)
Title: Re: XT/AT/PS2/Terminal to USB Converter with NKRO
Post by: fohat.digs on Sat, 15 December 2012, 15:29:54
Great work, Soarer!

I guess that you have been working on this for the better part of 2 years, just goes to should how far ahead of the curve you are!

Thanks again!
Title: Re: XT/AT/PS2/Terminal to USB Converter with NKRO
Post by: Krogenar on Sat, 15 December 2012, 21:34:13
Congrats Soarer!
Title: Re: XT/AT/PS2/Terminal to USB Converter with NKRO
Post by: precarious on Tue, 18 December 2012, 03:44:01
Received my Teensy and PS2 connector today, managed to get the Dolch working over USB with relative ease.  However, my old terminal board (some kind of rebranded WYSE) doesn't seem to be doing anything.  After running some of the tests mentioned, data appears to be dead.  I confirmed everything looked good in the test suite with the Dolch, so I'm assuming it has to be something with the terminal keyboard.  I saw elsewhere in the thread mention of terminal keyboards whose data was in relation to the clock signal of the original system, think that may be the case here?  Wiring should be fine, GND and VCC are both marked on the PCB and I swapped the clock/data wires around enough, plus, it was working with the Dolch.

Otherwise, what are my options for replacing the controller for an older WYSE keyboard?  I've seen various ones mentioned around the forum but I'm not really sure what the most suitable or compatible one would be here.  That Select button is looking pretty good for multiple layers, though, if everything can be made to work at some point.

I'll still have to see what I can do with the Amiga, not even touching that one for now. :)

edit: for the terminal keyboard, hid_listen only reports anything when i press numpad 7 -- only key on the keyboard that displays anything in the listen window ;0
Title: Re: XT/AT/PS2/Terminal to USB Converter with NKRO
Post by: Soarer on Tue, 18 December 2012, 07:22:01
Certainly some (most?) WYSE keyboards aren't handled by the converter, since they have very different protocols to the IBMs. If it doesn't have an AT or PS/2 connector it's very likely to be one of those. You could try out my analyzer (http://deskthority.net/workshop-f7/simple-logic-analyzer-for-teensy-t4567.html) hex to see what's actually happening on the wires, but it won't be much if the host is supposed to supply the clock. But then, why would numpad '7' output anything?!
Title: Re: XT/AT/PS2/Terminal to USB Converter with NKRO
Post by: Soarer on Thu, 20 December 2012, 11:45:49
v1.10 is now available in the OP (http://geekhack.org/index.php?topic=17458.0)!


Nothing essential for most people, but it does have a lot of documentation updates which are worth having :D
Title: Re: XT/AT/PS2/Terminal to USB Converter with NKRO
Post by: samwisekoi on Wed, 02 January 2013, 13:38:41
Congratulations on the win!  Excellent work!

I am making a 60% "Model M", but since I can't imagine actually hacking on a real Model M, it will be made by slicing a Unicomp Classic 104 and exposing some of the secret keys on the main area.

Can I use your box and a PS2 Unicomp to output remapped scan codes via USB?  (The remapping is the important bit for me.)

Thanks in advance,

 - Ron | samwisekoi
Title: Re: XT/AT/PS2/Terminal to USB Converter with NKRO
Post by: Soarer on Wed, 02 January 2013, 15:41:23
Thanks!

Yes you can - that was actually the first goal of the converter, to handle the extra codes of secret keys :)
Title: Re: XT/AT/PS2/Terminal to USB Converter with NKRO
Post by: samwisekoi on Wed, 02 January 2013, 15:47:38
Thanks!

Yes you can - that was actually the first goal of the converter, to handle the extra codes of secret keys :)

Awesome!  I shall now go read all 21 pages of this thread and order Soarer parts and a Unicomp Classic 104 to mangle.

(I assume you are with me in not wanting to mangle an actual IBM keyboard!)

Thanks very much indeed,

 - Ron | samwisekoi
Title: Re: XT/AT/PS2/Terminal to USB Converter with NKRO
Post by: esoomenona on Wed, 02 January 2013, 15:52:25
I want to mangle an actual IBM keyboard. They're cheap and plentiful!
Title: Re: XT/AT/PS2/Terminal to USB Converter with NKRO
Post by: Soarer on Wed, 02 January 2013, 16:53:46
Thanks!

Yes you can - that was actually the first goal of the converter, to handle the extra codes of secret keys :)

Awesome!  I shall now go read all 21 pages of this thread and order Soarer parts and a Unicomp Classic 104 to mangle.

(I assume you are with me in not wanting to mangle an actual IBM keyboard!)

Thanks very much indeed,

 - Ron | samwisekoi

Oh I don't care if you mangle a dozen Model Ms... just leave the Model Fs be!

And definitely don't worry about reading all of this thread!! At least use the thread contents pages that I added to the docs in the latest zip :D
Title: Re: XT/AT/PS2/Terminal to USB Converter with NKRO
Post by: Halvar on Thu, 03 January 2013, 18:38:36
Just downloaded the new version. Your documentation is even more insanely great than it was before!  :eek:
Title: Re: XT/AT/PS2/Terminal to USB Converter with NKRO
Post by: Soarer on Fri, 04 January 2013, 19:40:07
Thanks! But really, I just add a bit here, a bit there, and still wonder what I've forgotten to add :-\
Title: Re: XT/AT/PS2/Terminal to USB Converter with NKRO
Post by: fohat.digs on Wed, 09 January 2013, 18:57:37
I see that the Teensy 3.0 is out, and looks like a significantly more robust board than the 2.0 for just $3 more.

I don't know anything about programming, or electrical engineering for that matter, I just follow recipes in the cookbook, but is it a trivial matter to revise the code for the 3.0, or a major chore?


PS - the folks at pjrc.com are just awesome!
Title: Re: XT/AT/PS2/Terminal to USB Converter with NKRO
Post by: alaricljs on Wed, 09 January 2013, 20:15:21
It's like the difference between PowerPC Macs and Intel Macs.  Which is to say, you can make it look the same on the outside, but the inside is completely different.
Title: Re: XT/AT/PS2/Terminal to USB Converter with NKRO
Post by: Soarer on Wed, 09 January 2013, 20:25:44
It would be a chore to convert the code. But the real problem isn't the code, it's that the new chip runs at 3.3V. From a cursory glance at the datasheet it doesn't look like it has 5V tolerant inputs, so some external circuitry would be needed to adjust the voltages, even if it might be fairly simple.

The 3.0 certainly has more oomph, but it would be rather wasted on a keyboard converter :) The ATmega32U4 is far from the end of its life (as proved by the increasing number of breakout boards available) so I'm sticking with it - it's nice that code also works on a Teensy++ 2.0 for those cases that need a bit more EEPROM or RAM. Teensy 3.0 has disappointingly small EEPROM compared to its RAM, and only half that of the ++ (ref (http://www.pjrc.com/teensy/index.html)).

Title: Re: XT/AT/PS2/Terminal to USB Converter with NKRO
Post by: larsolav on Fri, 11 January 2013, 05:36:18
Hey. Great work on this converter. I'm using this for my 122 IBM Model M.

I have a couple of things I need help with. First, I want to know how you have counted the 10 keys on the left. Is it like this?
(http://dl.dropbox.com/u/11294170/1.jpg)

I'm also having problems with the key to the left of the enter key. I need it to output an apostrophe/asterisk, but it doesn't, and I don't know the hid-code for it so I can't remap it. :/
(http://dl.dropbox.com/u/11294170/3.jpg)
The key outputs this in hid_listen, so it's not the key that's broken:
r53 +32 d32
rF0 r53 -32 u32

The keyboard has a dipswitch on the back with all the switches in 0-position, if that makes any difference.

Thanks for any help :)
Title: Re: XT/AT/PS2/Terminal to USB Converter with NKRO
Post by: fohat.digs on Fri, 11 January 2013, 07:23:29
I use the method wcass described in post 562. it works great. Soarer gave you the complete list in his docs, but I never use that particular key, it gets covered up by the new ANSI-style "Enter" key that I install.

Would you really want the left F keys to go up and down rather than side-to-side? I use those F keys on the left more than the ones on top.
Title: Re: XT/AT/PS2/Terminal to USB Converter with NKRO
Post by: larsolav on Fri, 11 January 2013, 09:22:05
Use the method wcass described in post 562

That works great. Soarer gave you the complete list in his docs.

Oh, thanks. Now it works  :)
The only thing is that I can't find the windows key in the list. Do I have to make a macro for ctrl + esc or something?

Do you really want the left F keys to go up/down rather than left/right?
Maybe I should have tried it out before asking about that :P

Edit:
I tried using the key called EUROPE_1 and remapped it to BACKSLASH. It worked perfectly :)
Title: Re: XT/AT/PS2/Terminal to USB Converter with NKRO
Post by: fohat.digs on Fri, 11 January 2013, 10:09:16
LGUI  &  RGUI  are the Windows keys.

Anybody would have guessed that, wouldn't they?

edit - forgot to turn on the "irony" notice
Title: Re: XT/AT/PS2/Terminal to USB Converter with NKRO
Post by: larsolav on Fri, 11 January 2013, 10:32:29
LGUI  &  RGUI  are the Windows keys.

Anybody would have guessed that, wouldn't they?
Apparently not me :P

Thanks for the help anyways  :D
Title: Re: XT/AT/PS2/Terminal to USB Converter with NKRO
Post by: Soarer on Fri, 11 January 2013, 10:34:39
I suppose if you know it's a modifier you could guess by process of elimination, but people don't necessarily know that!

Next time I update the docs I'll add 'Windows' into the description field for LGUI, RGUI and APP, so that Ctrl-F will find them :D
Title: Re: XT/AT/PS2/Terminal to USB Converter with NKRO
Post by: poxeclipse on Sat, 12 January 2013, 07:44:18
Well this was an easy project.  Zero to typing with my Model-M with surprisingly little work, thanks to Soarer.
(Attachment Link)
Thanks man!
It looks great. Can you list he material you used ?
Title: Re: XT/AT/PS2/Terminal to USB Converter with NKRO
Post by: metalliqaz on Sat, 12 January 2013, 12:52:20
It looks great. Can you list he material you used ?

Hmmm... I can try.  I bought the parts at a local electronics shop so I don't have a record of names or model numbers or anything like that.  Lets see...

1. A USB cable, I use one by MiMic
2. A teensy 2.0 from pjrc.com
3. A project board
4. A project case
5. A 6-pin DIN "PS/2" Socket
6. Wire.  I used a multi-strand wire that really isn't quite appropriate, but it's what I had.
7. Screws.  I used 1/4" #4.  Something that can bite plastic.

The project board and the case were from some brands that I don't remember.  The important thing is just to find a few that fit together so you don't have to drill it and cut it to fit.  The other important thing is to make sure that the connections on the project board are made in the correct direction.  The one I wanted to buy was not appropriate because the board would have shorted the pins on the teensy.

If I had to do it again, I'd get proper connections for the PS/2 jack because trying to solder to those pins by hand is impossible to do in a good way.  I was so embarrassed by my hack job I lined up the camera so it wouldn't show up in the photo I posted.

The holes were drilled in the case using a wireless drill and a 1/2 inch wood bit.

Sorry I can't be more help.
Title: Re: XT/AT/PS2/Terminal to USB Converter with NKRO
Post by: poxeclipse on Mon, 14 January 2013, 16:24:54
I just received a 6110668 today. Does somebody have a config file for it ? Thanks.
Title: Re: XT/AT/PS2/Terminal to USB Converter with NKRO
Post by: fohat.digs on Mon, 14 January 2013, 16:34:18
Flash the Teensy according to the OP, and use wcass's technique in post 562 to assign keys.

Look in the Soarer_Converter_v1.10.zip file.

The documentation is now superb and will tell you everything you need to do.
Title: Re: XT/AT/PS2/Terminal to USB Converter with NKRO
Post by: Soarer on Mon, 14 January 2013, 17:30:26
Halvar posted (http://geekhack.org/index.php?topic=17458.msg658161#msg658161) a 122-key config that might be a good starting point. It's also in the v1.10 zip as configs\Halvar.sc.
Title: Re: XT/AT/PS2/Terminal to USB Converter with NKRO
Post by: poxeclipse on Mon, 14 January 2013, 19:24:15
Question about wiring. In your document it shows Clock connected to PD1 and Data to PD0. The pin assignment says SCL PDO and SDA PD1.  And AKIMb0 said he connected Clock to PF0 and Data to PF1 for the XT keyboard. Which one is corect ? Or it doesn't matter ?
tks
Title: Re: XT/AT/PS2/Terminal to USB Converter with NKRO
Post by: Soarer on Mon, 14 January 2013, 19:31:37
The document is correct :D
Title: Re: XT/AT/PS2/Terminal to USB Converter with NKRO
Post by: Krogenar on Tue, 15 January 2013, 07:10:58
Halvar posted (http://geekhack.org/index.php?topic=17458.msg658161#msg658161) a 122-key config that might be a good starting point. It's also in the v1.10 zip as configs\Halvar.sc.

Yes, Halvar's config file got me in the right direction for my 122-key project. Glad it was included in the new documentation!
Title: Re: XT/AT/PS2/Terminal to USB Converter with NKRO
Post by: poxeclipse on Tue, 15 January 2013, 18:21:02
Thank you Soarer. I'm typing on it now. I used Halvar's configuration file. 
As typing experience, it is identical to the F AT 84-key I have.
This 122-key 6110668 is in very good condition, and I got it for $25. I like it.
Title: Re: XT/AT/PS2/Terminal to USB Converter with NKRO
Post by: poxeclipse on Tue, 15 January 2013, 19:01:38
I do have another terminal keyboard, a Model M. I kept it as a donor, but it is in such a good shape, almost new, that I might try to mod it with your converter. But, I don't like model m so much. Will see.
The effort of Sourer & co. is great, for so many high quality keyboards can now be used again. So many have been lost, but still lots of them will survive.
Title: Re: XT/AT/PS2/Terminal to USB Converter with NKRO
Post by: fohat.digs on Tue, 15 January 2013, 19:17:16
After you are spoiled by the Model F, even a Model M is unsatisfying.

I don't understand the appeal of the M-122, though, the only real reason I did the F-122 mod was to get close to the ANSI (Model M) standard layout.

If I could get a capacitive switch Model M, I would look no further.

But, having said that, after a year I have to admit that I have really gotten used to the function keys on the left and 2 Escapes!
Title: Re: XT/AT/PS2/Terminal to USB Converter with NKRO
Post by: poxeclipse on Tue, 15 January 2013, 19:42:16
If only was a way to make the switches lighter on Model M ! I like the layout and the construction, but they are too heavy for me. I'm still keeping my Model Ms, hoping that will be a way to mod those switches in the near future. 70-80 g is heavy.
When I touched an F AT, I was hooked, for this was exactly what I wanted a Model M to be. And I got it for only $5.
I have now two  F  PC AT and one F terminal.
Title: Re: XT/AT/PS2/Terminal to USB Converter with NKRO
Post by: Krogenar on Wed, 16 January 2013, 09:17:57
After you are spoiled by the Model F, even a Model M is unsatisfying.

Gah! Stop saying this sort of stuff! My addiction is already too far gone as it is! LOL!

Quote
I don't understand the appeal of the M-122, though, the only real reason I did the F-122 mod was to get close to the ANSI (Model M) standard layout.

I love having a lot of keys. Makes me feel important. Also, the thing looks like a tank. Still questing for a Cherry G80-2100 HDU, because I love the layout.

That said, the constant talk of how awesome the Model F is, compared to the Model M is eventually going to make me get one. I just don't really like the vertical Enter. But maybe someone will eventually offer up a modded one.
Title: Re: XT/AT/PS2/Terminal to USB Converter with NKRO
Post by: Soarer on Wed, 16 January 2013, 09:23:33
Model Fs are far easier to modify than Model Ms... so there's really no excuse not to acquire one... or several! :cool:
Title: Re: XT/AT/PS2/Terminal to USB Converter with NKRO
Post by: poxeclipse on Wed, 16 January 2013, 09:48:02
Quote
I just don't really like the vertical Enter. But maybe someone will eventually offer up a modded one.
I had the same preconceived idea about the vertical Enter. Now I'm typing on this 122-key model f and the vertical Enter doesn't bother me at all.
I feel no difference from the ANSI Enter. You should try first.
Model Fs have the identical exterior as the corresponding Model Ms, but they shine at the key switch level.
And it feels good, indeed, with so many keys. But an SSK Model F would be nice too. I don't know if somebody tried to cut a Model F board to a smaller size.
Title: Re: XT/AT/PS2/Terminal to USB Converter with NKRO
Post by: metalliqaz on Wed, 16 January 2013, 15:48:29
They definitely did.  I'm too lazy to look it up...
Title: Re: XT/AT/PS2/Terminal to USB Converter with NKRO
Post by: fohat.digs on Wed, 16 January 2013, 16:07:58
I seem to remember an unsaver F, but I wouldn't want to try it.

The ISO-style Enter does not bother me at all - what I cannot abide is the small Backspace. I must make a lot of mistakes, and apparently I always go for the left side of Backspace to fix them.

The plethora of keys is nice, but I still have about a half-dozen that I have not assigned (F15-F19). I really like the function keys on the left.

Also, the incredible weight makes for an amazing keystroke experience, it is only about the keys - the board moving around on the desk is simply not part of the scenario (I do employ a rubber mat, too, of course). And I don't think the effect would be the same with a 1 kg keyboard, even if you glued it down to the desk.

PS - Krogenar - I took your advice and changed out the switches in my Joy mouse knock-off, and it made a big difference! I was pretty nervous, but it went well. I am sure that you can mod an F-122 if you can get your hands on one.
Title: Re: XT/AT/PS2/Terminal to USB Converter with NKRO
Post by: poxeclipse on Sat, 19 January 2013, 07:23:35
Question for Soarer.
Does your converter work with an IBM 6052101 display writer for 3187 ? The real question is what protocol is used.
Thank you
Title: Re: XT/AT/PS2/Terminal to USB Converter with NKRO
Post by: Soarer on Sat, 19 January 2013, 08:43:21
No :( The problem is that they don't send release codes for all but a couple of keys. I started on a project to replace the CPU with a Teensy (http://deskthority.net/workshop-f7/replacing-an-8048-cpu-with-a-teensy-t4019.html) (but it's stalled with what could be noise problems causing KRO to be poor). I guess the most surefire approach would be to use a reprogrammed 8048 CPU, but that's not trivial and it would still need a converter to USB as well.
Title: Re: XT/AT/PS2/Terminal to USB Converter with NKRO
Post by: Hubbert on Fri, 25 January 2013, 05:51:25
Is it possible to connect one keyboard to two computers using two Converters?  If so, then what's a good way to disable one converter at a time from sending keystrokes: it only needs to maintain the USB connection.  My quick thought is to use diodes on the power connection and maybe something on the grounds (just hope they're the same since the computers are connected to the same AC outlet?), but the clock & data connections are potential problems.

I have tried USB KVM switches, but the handshaking takes too long, and usually after about 5 swaps my Windows box would stop recognizing the keyboard.  I found a manufacturer of ultra high performance KVM switches for professional audio/visual media uses, but they either didn't list a price or I got the impression that they cost $5000 or so.  I don't need to switch monitors, and I don't really need to switch pointing devices (in a pinch, an extra Marble Mouse trackball doesn't take up too much space).
Title: Re: XT/AT/PS2/Terminal to USB Converter with NKRO
Post by: kishy on Wed, 30 January 2013, 12:48:24
For information's sake:
My previously reported success with the converter 'surviving' from cold boot all the way through to the Windows 7 desktop on my ThinkPad W520 is no longer the case - one or two firmware updates ago (for the W520 - UEFI/BIOS), it started killing the converter during boot.

This seems to be intermittent/inconsistent though as it sometimes works, but seemingly does not work during POST to enter setup. I haven't done any comprehensive testing, and it could well differ from docking station 2.0 ports to built in 2.0 ports to 3.0 ports...
Title: Re: XT/AT/PS2/Terminal to USB Converter with NKRO
Post by: Soarer on Fri, 01 February 2013, 09:55:14
Is it possible to connect one keyboard to two computers using two Converters?  If so, then what's a good way to disable one converter at a time from sending keystrokes: it only needs to maintain the USB connection.  My quick thought is to use diodes on the power connection and maybe something on the grounds (just hope they're the same since the computers are connected to the same AC outlet?), but the clock & data connections are potential problems.

I have tried USB KVM switches, but the handshaking takes too long, and usually after about 5 swaps my Windows box would stop recognizing the keyboard.  I found a manufacturer of ultra high performance KVM switches for professional audio/visual media uses, but they either didn't list a price or I got the impression that they cost $5000 or so.  I don't need to switch monitors, and I don't really need to switch pointing devices (in a pinch, an extra Marble Mouse trackball doesn't take up too much space).

That's an interesting idea, and I think it could work. Connecting grounds ought to be fine, and as you say, diodes should be enough to prevent problems on the power line and allow it to be powered from either converter. Switching just clock might be sufficient, but since DPDT switches are just as cheap, you may well switch both data and clock.

The main thing is that each converter will need to talk to the keyboard when it (the converter) powers up, so it knows what kind of keyboard it is. You'll just have to remember to switch it accordingly when powering things up!

That said, it would be an experiment, and I can't say for sure that it will all work :)

I use an Aten CS1784 4 port KVM that works very well, but of course in its normal mode it can't deal with NKRO or any of the extra interfaces on my converter. It can be set to switch the keyboard as a general USB device, but then that means a delay as the OS processes the new device(s) it sees when switching. It was about $200, so if you don't need to switch monitors, it would be overkill!
Title: Re: XT/AT/PS2/Terminal to USB Converter with NKRO
Post by: Soarer on Fri, 01 February 2013, 10:03:24
For information's sake:
My previously reported success with the converter 'surviving' from cold boot all the way through to the Windows 7 desktop on my ThinkPad W520 is no longer the case - one or two firmware updates ago (for the W520 - UEFI/BIOS), it started killing the converter during boot.

This seems to be intermittent/inconsistent though as it sometimes works, but seemingly does not work during POST to enter setup. I haven't done any comprehensive testing, and it could well differ from docking station 2.0 ports to built in 2.0 ports to 3.0 ports...

Hmm, not much to go on, and more difficult if it sometimes works, sometimes doesn't :(

Is that using my latest firmware, or at least the one that has the USB compliance fixes (v1.03)?
(I didn't fix anything that seemed likely to cause such problems though).
Title: Re: XT/AT/PS2/Terminal to USB Converter with NKRO
Post by: poxeclipse on Fri, 01 February 2013, 18:03:06
Soarer, kishi already pointed out problems with the converter at boot phase, but I still want to ask. It is possible to make the keyboard available at boot time ? This would be desirable for Linux, for instance, when you have to select the image you want to load. I played with it and it did not work. The keyboard is recognised only after the boot.
Title: Re: XT/AT/PS2/Terminal to USB Converter with NKRO
Post by: Soarer on Fri, 01 February 2013, 18:52:16
It should already work in BIOS and during boot, on pretty much everything. As long as any perfectly standard USB keyboard would, of course. Kishy is just adept at finding problem machines!

I'm not sure exactly what the Linux bootloader does for USB keyboards... I guess it might use a simlar mechanism to BIOS. But if it's a problem with my converter, I'm surprised that nobody has mentioned it before. (On the other hand, if more people have a problem, it will probably make it easier to fix!)

What Linux bootloader and version are you using?
Does the converter work to get into, and in, your BIOS? If not, what's your machine, and what BIOS does it use?
Title: Re: XT/AT/PS2/Terminal to USB Converter with NKRO
Post by: Soarer on Sat, 02 February 2013, 12:08:31
Just noting a report of a kernel panic in OpenBSD on a Samsung n130 netbook.
Title: Re: XT/AT/PS2/Terminal to USB Converter with NKRO
Post by: fohat.digs on Fri, 08 February 2013, 12:45:43
I think I have mentioned this before, but, again, this morning, I wired up my "universal" Teensy outboard converter, and it does not recognize a PS2 keyboard.

Having done the Teensy thing half a dozen times, I am pretty good at it. But, with my final Teensy, I want an outboard box with female PS2 connector, so I can use it for "everything" with various adapter plugs.

It is built, continuity checked properly on all 4 leads (the mini-DIN-6 has 6 total - 2 "extras" that I ignored), and programmed using teensy.exe.

The computer acknowledges that the USB device is connected, and the programming routine seemed to complete successfully.

However, when I plug in a PS2 keyboard (I have tried it with a Dell AT101 and an Alps brand board, both of which work properly, otherwise) I get nothing. I have tried rebooting in a couple of different ways, and hot-plugging the USB from the Teensy before and after, all the usual combinations. Also, I learned this before, there is no other Teensy connected, I am doing this after a reboot with a PS2 keyboard in the PS2 connector to the motherboard.

Is there some other trick to this, or what?

I know that it is pointless to use the Teensy when an ordinary adapter would work, but am I missing something here?

At the moment, the 2 XTs (for which I actually want to use this thing) are dismantled, so are not available for alternate testing.

Thanks!
Title: Re: XT/AT/PS2/Terminal to USB Converter with NKRO
Post by: Soarer on Sat, 09 February 2013, 13:47:11
I can't remember if you have mentioned this problem before! I remember the other outboard, with the real IBM terminal connector, which I think worked in the end...?

The order of connection should always be keyboard to Teensy, then Teensy to computer, so that the Teensy can talk to the keyboard as soon as they are powered up.

Do the LEDs on the keyboards flash just after the Teensy is connected to the computer? That would at least indicate that they were getting power OK.

Does hid_listen say anything when the Teensy is connected to the computer? Or when you press keys?
Title: Re: XT/AT/PS2/Terminal to USB Converter with NKRO
Post by: fohat.digs on Sun, 10 February 2013, 16:51:57
Thank you for your reply.

I never had a problem with the official Model F terminal connector, it worked great as soon as I got it all hooked up properly.

This is about my 3rd or 4th attempt at this one, I try it, give up, set it aside for a month or 2, and come back.

Going through your steps, I realize that it is completely dead - no LEDs, no hid_listen.

Twice, in recent months, I have had problems with switches and cables, formerly never an issue. Although the continuity checks out, I have a sewing needle soldered to one of my probes, and I am starting to wonder if my female PS2 plug is the problem. Perhaps I can stick the needle farther back into the socket and find a connection, but one or more of the pins on my keyboard cable can't hit it?

Tomorrow, or sometime, I will replace the receptacle pigtail and see if that is it. Otherwise, I am stumped.

The computer sees the Teensy and reports it as operating properly, continuity checks out all around, and the keyboards are OK, so the socket is about the only thing I can't verify.
Title: Re: XT/AT/PS2/Terminal to USB Converter with NKRO
Post by: Soarer on Sun, 10 February 2013, 18:02:03
Yes, it does sound like a problem with the connector. You'll hate me for saying it, but could it be wired wrongly, with the connections mirrored? It would explain the symptoms.

Do you get some output to hid_listen when plugging the converter in without having any keyboard connected to it?
Title: Re: XT/AT/PS2/Terminal to USB Converter with NKRO
Post by: fohat.digs on Sun, 10 February 2013, 18:19:35
Can't mess with it until tomorrow, but if I wired it wrong I will feel like a monumental dolt! :'(
Title: Re: XT/AT/PS2/Terminal to USB Converter with NKRO
Post by: Soarer on Sun, 10 February 2013, 18:29:26
I can't think of anything else that would explain zero output to hid_listen (since you already know to only have one Teensy connected)... but only if hid_listen output is working when no keyboard is attached. The logic being that the keyboard gets reverse power, tries to draw too much current, and the USB port shuts down in response. I could be wrong of course!
Title: Re: XT/AT/PS2/Terminal to USB Converter with NKRO
Post by: fohat.digs on Mon, 11 February 2013, 11:16:04
I re-worked all my wiring, and the keyboard LEDs do flash when the USB is plugged in, so I know that power is getting through, but that is all.

The computer chimes and reports that the device is connected or disconnected, and is working properly.

hid_listen also reports the device being connected or disconnected, and "listens" for the device for a minute or so with a string of dots marching across the screen.

But it never "hears" any keystrokes from the keyboard.

I have re-programmed and rebooted the Teensy a couple of times, and also rebooted the computer.

And, hid_listen gives the same response without the keyboard plugged into the Teensy as with it.

Got any more ideas?
Title: Re: XT/AT/PS2/Terminal to USB Converter with NKRO
Post by: Soarer on Mon, 11 February 2013, 15:13:25
I re-worked all my wiring, and the keyboard LEDs do flash when the USB is plugged in, so I know that power is getting through, but that is all.

The computer chimes and reports that the device is connected or disconnected, and is working properly.

hid_listen also reports the device being connected or disconnected, and "listens" for the device for a minute or so with a string of dots marching across the screen.

But it never "hears" any keystrokes from the keyboard.

I have re-programmed and rebooted the Teensy a couple of times, and also rebooted the computer.

And, hid_listen gives the same response without the keyboard plugged into the Teensy as with it.

Got any more ideas?

OK, power is good.

Does hid_listen ever actually say 'Listening:', which comes after the dots have stopped?

Without a keyboard connected, we'd be hoping to see something like this (although without any config loaded it would be slightly different)...

Code: [Select]
Waiting for device:..........................
Listening:
wEE

remaining: 0041
41@0008 remaps !set
layerdefs: 00
max_layer: 00
total_macros: 00
alloc ok.


Keyboard ID: 0000
Code Set: 1

I can't think what would prevent that, if the Teensy was programmed with the converter code correctly (and only that one converter was connected).

Getting it programmed shouldn't need lots of reconnecting, or reboots of the computer. You can run hid_listen, run the Teensy loader, and connect the Teensy (without keyboard attached) - in no particular order. Then just use the reset button and the Teensy loader controls to get it programmed and talking to hid_listen. If it doesn't work, pressing the reset button is usually enough to be able to try again.
Title: Re: XT/AT/PS2/Terminal to USB Converter with NKRO
Post by: fohat.digs on Mon, 18 February 2013, 20:39:26
Thank you for your patience.

I gave up on that problem, maybe I will revisit it in another month (as I have, multiple times, already). But, to answer that question, after waiting for device, and listening, nothing further happens. If I unplug it, and hot plug it, it waits, and listens, again, to no avail.

Here is my new problem with my F-122 and Teensy. For no reason, (well, the only thing I did was to):

hot plug a iMate ADB-to-USB converter and working AEK2 to the USB port on the front of the computer, for testing, with the F-122/Teensy  running as usual. The Apple tested good and that was that. I unplugged it.

Now, I have lost my numpad, just as if I had pressed the "Numlock" button, which has not even existed for a year. I rebooted and went into BIOS, in expectation of setting "Numlock on at Boot" but apparently there is no such option on recent Gigabyte motherboards. The other keys I remapped around the perimeter of the Numpad still operate properly (obviously, since there is no Numlock any more!) but numpad 7 is "Home" no matter what I try to do.

For the time being, I suppose that I will try to re-map an unused key to Numlock so that I can press it if I need to. What is going on?

Finally, is there any advantage to remapping the Numpad, for instance, there seems to be a subtle difference between "3" and "numpad 3" ?

Thank you.
Title: Re: XT/AT/PS2/Terminal to USB Converter with NKRO
Post by: alaricljs on Mon, 18 February 2013, 20:46:39
Are you running Windows 7?  The on screen keyboard (Control Panel -> Ease of Access) has an options button that toggles num lock.

The 3 and the numpad 3 are 2 distinctly different keycodes.  You can only do extended Alt-codes with the numpad.  You can only get symbols via the number line.  Num Lock doesn't interact with the number line in any way.  Any advantage would be for you to determine based on your usage.
Title: Re: XT/AT/PS2/Terminal to USB Converter with NKRO
Post by: Soarer on Mon, 18 February 2013, 22:25:26
I have no further ideas on standalone converter problem; there's just not enough clues :(

Apparently num-lock on Win7 ends up 'off' at boot if various registry settings get non-matching (or wrong) values set in them, see the answer here... http://answers.microsoft.com/en-us/windows/forum/windows_7-hardware/want-to-set-num-lock-to-be-on-and-active-at/7b48ae6f-fa9c-4bc2-8359-81e0c5e5d6a2 (http://answers.microsoft.com/en-us/windows/forum/windows_7-hardware/want-to-set-num-lock-to-be-on-and-active-at/7b48ae6f-fa9c-4bc2-8359-81e0c5e5d6a2).

I don't know why that would get shot by plugging in an iMate! I must admit my first thought was that you'd simply pressed 'clear' on the AEK when testing it, which (I think) gets mapped to num-lock by the iMate... but I don't think that would still affect anything after a reboot.

On-screen keyboard sounds like a good solution if it's only rare cases when you need to toggle num-lock.

Although I don't tend to use num-lock much, I do keep it mapped somewhere. You could put it in a macro if you don't have any single keys left you could use.

If you really only ever use the numpad for numbers, and never with any modifiers pressed, then I suppose it shouldn't really make any difference which codes are produced by it.
Title: Re: XT/AT/PS2/Terminal to USB Converter with NKRO
Post by: fohat.digs on Tue, 19 February 2013, 09:30:01
Good answers, both.

After sleeping on it, I realized that I am an idiot.

I use keyboardtest.exe for testing, (I like it better than any of the others and it finds all the keys on the 122) and clearly I had tested Numlock on the AEK2.

BIOS was simply remembering that, so I rebooted with a standard PS2 keyboard and pressed the Numlock a couple of times and now I am back in business.

Still, Gigabyte should allow a "Numlock on at Bootup" selection in BIOS, I know a lot of people don't use it, but a lot of us do.

Thank you.
Title: Re: XT/AT/PS2/Terminal to USB Converter with NKRO
Post by: Soarer on Tue, 19 February 2013, 11:39:48
Interesting... it must be Windows 7 remembering the num-lock state. I don't know if Vista did that as well, but XP certainly doesn't. So we learnt that from this :)
Title: Re: XT/AT/PS2/Terminal to USB Converter with NKRO
Post by: rknize on Tue, 05 March 2013, 18:15:20
I finally got off my butt and got the layouts on this F122 and my AT the way I want.  Thanks to the documentation, it was fairly straight-forward.  LANG_4 was the only tricky bit on the F122.  Perhaps an alias or at least a hint in the doc would be helpful.  :)  The AT is from wcass, so that one is mainly some tweaks to his.

FWIW, they are attached.
Title: Re: XT/AT/PS2/Terminal to USB Converter with NKRO
Post by: metalliqaz on Tue, 05 March 2013, 18:25:53
Where do you get that keyboardtest.exe?  I googled it but there seem to be many different "shareware" tools that go by the same name.
Title: Re: XT/AT/PS2/Terminal to USB Converter with NKRO
Post by: Soarer on Tue, 05 March 2013, 18:30:27
rknize - Thanks for posting configs :) Is it OK if I include them in the next release zip?

Re. LANG_4, I won't add a specific hint, but I will try to make clearer the method for finding out what the codes are... it has been mentioned before (http://geekhack.org/index.php?topic=17458.msg601130;topicseen#msg601130), but since hid_listen output is detailed on the Trouble page, it's not obvious that it has 'regular' uses as well!
Title: Re: XT/AT/PS2/Terminal to USB Converter with NKRO
Post by: fohat.digs on Tue, 05 March 2013, 18:31:21
keyboardtest.exe

is a horrible thing to Google, you would think that it would turn up exactly as you typed it, but no .....

I did not know that anything except photos could be posted here directly.

This is the one I like to use:

PS -

I forgot to mention, the program has a few odd quirks (who doesn't?)

It ignores "Tab", it locks up after "F10", and it respects "CapLock"

If it goes funny during or after "F10", "Alt" or "Spacebar" you should use your mouse to highlight whatever is in the dialog box, then when you press a key it will go back to normal.

These are not bugs, they are "idiosyncrasies" - HAHA
Title: Re: XT/AT/PS2/Terminal to USB Converter with NKRO
Post by: rknize on Tue, 05 March 2013, 18:53:42
rknize - Thanks for posting configs :) Is it OK if I include them in the next release zip?

Re. LANG_4, I won't add a specific hint, but I will try to make clearer the method for finding out what the codes are... it has been mentioned before (http://geekhack.org/index.php?topic=17458.msg601130;topicseen#msg601130), but since hid_listen output is detailed on the Trouble page, it's not obvious that it has 'regular' uses as well!

That would be great.  Even dropping a hint in the comment column of the codes page would help.  It's a common enough scenario, I think.  Perhaps some "cook books" for common projects would be helpful as well.  It would have saved me multiple look ups in multiple keycode tables on the Internet if I just knew which switch translated to which soarerese HID code for the mapping table.  :)

Feel free to include them.  I left some comments in the remapblocks.
Title: Re: XT/AT/PS2/Terminal to USB Converter with NKRO
Post by: Halvar on Wed, 06 March 2013, 03:50:58
I posted my M-122 configuration in this earlier post, and it's also in the newest distribution from Soarer in a file named halvar.sc

http://geekhack.org/index.php?topic=17458.msg658161#msg658161

I put a lot of comments in it, also about LANG_4, numpad and the other keys on terminal keyboards, so I'm sorry that you had to find it all out for yourself again.   :'(

Halvar

Title: Re: XT/AT/PS2/Terminal to USB Converter with NKRO
Post by: Krogenar on Wed, 06 March 2013, 07:21:38
I finally got off my butt and got the layouts on this F122 and my AT the way I want.  Thanks to the documentation, it was fairly straight-forward.  LANG_4 was the only tricky bit on the F122.  Perhaps an alias or at least a hint in the doc would be helpful.  :)  The AT is from wcass, so that one is mainly some tweaks to his.

FWIW, they are attached.

Rknize, how would you describe typing on a F-122 (makes it sound like a fighter jet, LOL) -- awesome?
Title: Re: XT/AT/PS2/Terminal to USB Converter with NKRO
Post by: fohat.digs on Wed, 06 March 2013, 07:34:06
The large Model Fs are perhaps not quite as loud as the small ones, just because of greater mass of the entire assembly.

The 122s and XTs have the metal back plate, while the ATs are plastic all around. The sound is as different as the feel, in comparison to the M.

Sound is not my big thing, it is feel. I have flossed almost all of my buckling springs, and it is a big help in the "annoyance" department.

While the Model Ms are already less resonant than Fs, with the one-piece plastic barrel (aka chimney) assembly vs the heavy F front plate, the metallic resonance of the Fs is smoothed out very nicely by the floss, without being unnecessarily deadened.

The 122 and XT have 3 different steel plates (front barrel plate, the back plate of the switch board, and the case back) so there is a lot of mass and deep resonance working for you already.

The single metal back plate of the M is isolated from the rest of the assembly by the rubber mat, and buried in the interior of the case.

For me, the deep underlying resonance remaining, with the upper register attenuated by the floss, is the perfect combination for sound.
Title: Re: XT/AT/PS2/Terminal to USB Converter with NKRO
Post by: Soarer on Wed, 06 March 2013, 08:04:04
rknize - Thanks for posting configs :) Is it OK if I include them in the next release zip?

Re. LANG_4, I won't add a specific hint, but I will try to make clearer the method for finding out what the codes are... it has been mentioned before (http://geekhack.org/index.php?topic=17458.msg601130;topicseen#msg601130), but since hid_listen output is detailed on the Trouble page, it's not obvious that it has 'regular' uses as well!

That would be great.  Even dropping a hint in the comment column of the codes page would help.  It's a common enough scenario, I think.

For single oddities like that key, I'm not sure that's the best way to do it - perplexed user would still have to scour the list. I'm thinking of replacing the single line "See the HID code list for HID and META values." at the end of the Config page into a section (perhaps called 'Finding Codes') which would mostly be a rewrite of this post (http://geekhack.org/index.php?topic=17458.msg708672;topicseen#msg708672).

Perhaps some "cook books" for common projects would be helpful as well.  It would have saved me multiple look ups in multiple keycode tables on the Internet if I just knew which switch translated to which soarerese HID code for the mapping table.  :)

An index to the example configs would be useful, even if it says little more than which are examples for 122-key etc. I'd love to have time to produce some keymap diagrams like John Elliot's (http://www.seasip.info/VintagePC/ibm_1390876.html), but when I have any time to work on this there always seems to be something more important/interesting to do!

Feel free to include them.  I left some comments in the remapblocks.

Thanks :)
Title: Re: XT/AT/PS2/Terminal to USB Converter with NKRO
Post by: Soarer on Wed, 06 March 2013, 09:20:46
Here's a draft of the new section, which will go just after the Overview section on the Config page.

Quote
Initial Translation

For most keys it's fairly obvious which codes are produced after the fixed initial translation. However, for some keys on a 122-key keyboard, and the normally unused extra keys on various keyboards, the codes don't follow an obvious pattern.

To find out which code a key is producing after the fixed initial translation, you can use hid_listen (http://) to examine the Diagnostic Output (http://).

When you press a key, a set of codes is sent by the converter to hid_listen. For example, pressing the centre key in the 122-key's cursor block results in:

Code: [Select]
r62 +93 d93 rE2 -93 u93
Note the code prefixed by '+', then look it up in the HID code list (http://). For the example, looking up 93 reveals that the identifier to use for remapping or triggering a macro would be LANG_4.
Title: Re: XT/AT/PS2/Terminal to USB Converter with NKRO
Post by: rknize on Wed, 06 March 2013, 10:47:06
Rknize, how would you describe typing on a F-122 (makes it sound like a fighter jet, LOL) -- awesome?

As a long-time Model M user (bought my first one new in 1994), the Model F is the ultimate typing feel of you like tactile switches.  Nothing I have experienced so far compares.  I have tried a few...see my sig.

Stock, they are extremely annoying to listen to.  The spring ring combined with the steel plates makes the whole keyboard sing.  It starts bugging me almost immediately, to say nothing about those around me.  Model M's ring too, but you mainly only hear the spring because the steel plate is damped.

The first thing I did to my AT when I got it was a floss mod.  I don't care for the floss mod on Model Ms...I feel it swamps the feel of the switch too much and adds more weight to a switch that borders on being a bit too heavy for me.  However, on the F it works wonderfully.  The F already has a lighter feel and extremely sharp snap on actuation (no plastic membranes or rubber mats).  The floss mod, when done just right, stops the ring without affecting the feel enough to matter.  It's still plenty loud.  I can't use it at work.  But it's quiet enough that my wife doesn't complain too much.  At work I use a grease-modded Model M (the one I bought in '94 in fact) and an SSK on occasion.
Title: Re: XT/AT/PS2/Terminal to USB Converter with NKRO
Post by: rknize on Wed, 06 March 2013, 10:51:25
Here's a draft of the new section, which will go just after the Overview section on the Config page.

Quote
Initial Translation

For most keys it's fairly obvious which codes are produced after the fixed initial translation. However, for some keys on a 122-key keyboard, and the normally unused extra keys on various keyboards, the codes don't follow an obvious pattern.

To find out which code a key is producing after the fixed initial translation, you can use hid_listen (http://) to examine the Diagnostic Output (http://).

When you press a key, a set of codes is sent by the converter to hid_listen. For example, pressing the centre key in the 122-key's cursor block results in:

Code: [Select]
r62 +93 d93 rE2 -93 u93
Note the code prefixed by '+', then look it up in the HID code list (http://). For the example, looking up 93 reveals that the identifier to use for remapping or triggering a macro would be LANG_4.


Awesome.  What really threw me was that the codes at the HID level for set 3 were actually the translated "PC" values and not the original key codes.  I suppose this is just a legacy thing.
Title: Re: XT/AT/PS2/Terminal to USB Converter with NKRO
Post by: rknize on Wed, 06 March 2013, 10:54:56
I posted my M-122 configuration in this earlier post, and it's also in the newest distribution from Soarer in a file named halvar.sc

http://geekhack.org/index.php?topic=17458.msg658161#msg658161

I put a lot of comments in it, also about LANG_4, numpad and the other keys on terminal keyboards, so I'm sorry that you had to find it all out for yourself again.   :'(

Halvar

Ah yes, I see it now.  I guess I didn't look because the file name didn't give any hints about what keyboard it was for.  Oh well...it was a learning experience, at any rate.  Sorry, I haven't followed this thread as closely as I probably should have.

Perhaps a naming convention or a README index to all the configs would be helpful in that regard.
Title: Re: XT/AT/PS2/Terminal to USB Converter with NKRO
Post by: Soarer on Wed, 06 March 2013, 11:27:44
Awesome.  What really threw me was that the codes at the HID level for set 3 were actually the translated "PC" values and not the original key codes.  I suppose this is just a legacy thing.

The initial translation to HID tries to make a common ground ready for configs. That means a lot of configs can be written without caring what kind of keyboard is plugged in and therefore without caring what kind of scan codes the keyboard is actually producing (e..g. Colemak remappings).

Ah yes, I see it now.  I guess I didn't look because the file name didn't give any hints about what keyboard it was for.  Oh well...it was a learning experience, at any rate.  Sorry, I haven't followed this thread as closely as I probably should have.

Heh, no-one is saying you should have known, just (annoyingly) that you could! But in this case, what would you search for? Even I'm having trouble finding the posts where I've covered looking with hid_listen to find codes, and I'm cheating by using words from the answer, not the question!
Title: Re: XT/AT/PS2/Terminal to USB Converter with NKRO
Post by: Krogenar on Wed, 06 March 2013, 11:52:14
rkinize, fohat, thanks for your feedback on the Model F -- I've got a Model F in the mail and I'm looking forward to trying it out. As far as sound goes, I usually don't care about the sound on a Model M, so I'm hoping flossing won't be necessary, I actually like them loud -- but maybe the *pInG* sound will annoy me. Thanks also to Halvar and rkinize for the Soarer codes for 122-Model M's and F's.
Title: Re: XT/AT/PS2/Terminal to USB Converter with NKRO
Post by: AKIMbO on Wed, 06 March 2013, 12:34:11
F122's have a sharper, more shrill ping sound when compared to AT F and XT boards.  For me, I can't stand the sound of a F122 without floss mod.  The stock sound of an AT F is just right imo.
Title: Re: XT/AT/PS2/Terminal to USB Converter with NKRO
Post by: rknize on Wed, 06 March 2013, 12:41:33
It's a very personal choice.  If you like loud keyboards, the F won't disappoint.
Title: Re: XT/AT/PS2/Terminal to USB Converter with NKRO
Post by: rknize on Wed, 06 March 2013, 12:51:26
Heh, no-one is saying you should have known, just (annoyingly) that you could! But in this case, what would you search for? Even I'm having trouble finding the posts where I've covered looking with hid_listen to find codes, and I'm cheating by using words from the answer, not the question!

Yeah, I know what you mean.  The docs are a great reference once you know what questions to ask.  People learn things differently.  I learn the most quickly by working backwards from an example.  Unfortunately, I missed Halver's.  Most folks are going to have a specific project in mind when using this.  I imagine that IBM XT and terminal keyboard owners are probably some of your biggest users.  It may be worthwhile to provide walk-throughs for those and provide boilerplate configs for those projects' FAQs?
Title: Re: XT/AT/PS2/Terminal to USB Converter with NKRO
Post by: Soarer on Wed, 06 March 2013, 15:23:56
Yeah, I know what you mean.  The docs are a great reference once you know what questions to ask.  People learn things differently.  I learn the most quickly by working backwards from an example.  Unfortunately, I missed Halver's.  Most folks are going to have a specific project in mind when using this.  I imagine that IBM XT and terminal keyboard owners are probably some of your biggest users.  It may be worthwhile to provide walk-throughs for those and provide boilerplate configs for those projects' FAQs?

Hmm, I dunno, each person's project has different goals! I think it's a better approach for me to fill in the gaps in the documentation, since there's really very little that's unique to any keyboard type. Or at least to do that first, otherwise the answer to someone's AT-related question might be hiding in the 122-key tutorial, for example, and they could easily not find it.

Also, I think making an index of the example configs will help, since I'll try to highlight the notable features of each rather than just say "Halvar's config for 122-key".
Title: Re: XT/AT/PS2/Terminal to USB Converter with NKRO
Post by: wcass on Wed, 06 March 2013, 16:12:08
...
I forgot to mention, the program has a few odd quirks (who doesn't?)

It ignores "Tab", it locks up after "F10", and it respects "CapLock"

If it goes funny during or after "F10", "Alt" or "Spacebar" you should use your mouse to highlight whatever is in the dialog box, then when you press a key it will go back to normal.

These are not bugs, they are "idiosyncrasies" - HAHA


ROTFL
i recomend "Aqua Key Test" - much easier to search for. download from OTD or GH links to make sure you get the right one.
http://geekhack.org/index.php?topic=34670.0 (http://geekhack.org/index.php?topic=34670.0)
 
Title: Re: XT/AT/PS2/Terminal to USB Converter with NKRO
Post by: fohat.digs on Wed, 06 March 2013, 16:56:06
...
I forgot to mention, the program has a few odd quirks (who doesn't?)

It ignores "Tab", it locks up after "F10", and it respects "CapLock"

If it goes funny during or after "F10", "Alt" or "Spacebar" you should use your mouse to highlight whatever is in the dialog box, then when you press a key it will go back to normal.

These are not bugs, they are "idiosyncrasies" - HAHA


ROTFL
i recomend "Aqua Key Test" - much easier to search for. download from OTD or GH links to make sure you get the right one.
http://geekhack.org/index.php?topic=34670.0 (http://geekhack.org/index.php?topic=34670.0)
 

I don't get it.

Aqua Key Test would seem to be OK if you are testing an ANSI keyboard to see whether the keys are working, but since I am accustomed to keyboardtest.exe, all the others are just annoying. I don't remember what I used before, since I am happy now.

I really want the ability to identify keys not standard to an ANSI board. How do I use it to find out which key is F22? What about "Media Pause" or "Numpad *"? Aqua does show the keycode in tiny print at the bottom, but without identifying the key for a simpleton like me.

keyboardtest.exe works great for all this, too, and seems more user-friendly. I can easily live with a few known glitches if it solves my problems.


Title: Re: XT/AT/PS2/Terminal to USB Converter with NKRO
Post by: Soarer on Wed, 06 March 2013, 17:04:38
Aqua's is great if you want bypass autohotkey etc., but I also (most of the time, actually) like to use a tester that doesn't hook so deeply and just listens to Windows messages. OTOH, one that doesn't go funny after F10, Alt or Space is good!
Title: Re: XT/AT/PS2/Terminal to USB Converter with NKRO
Post by: metalliqaz on Wed, 06 March 2013, 17:25:00
So which do you use, Soarer?  ;D
Title: Re: XT/AT/PS2/Terminal to USB Converter with NKRO
Post by: Krogenar on Wed, 06 March 2013, 17:46:45
Also, I think making an index of the example configs will help, since I'll try to highlight the notable features of each rather than just say "Halvar's config for 122-key".

If you're going to be updating the documentation anyway, I think it would be a great idea to give a list of some places to find the materials necessary -- it was a big help to me when I made my converter having someone point out what the right connector was, and where it could be found. You couldn't post a link itself, but listing some electronics companies might help others.
Title: Re: XT/AT/PS2/Terminal to USB Converter with NKRO
Post by: Soarer on Wed, 06 March 2013, 17:50:49
So which do you use, Soarer?  ;D

Well my own, of course! :D

I started writing it before I knew of Aqua's (perhaps before Aqua's was available, I dunno). I might release it at some point, but it's only ever as good as I need at any given time, as a tool for programming.

(http://geekhack.org/index.php?action=dlattach;topic=39833.0;attach=13573;image)
Title: Re: XT/AT/PS2/Terminal to USB Converter with NKRO
Post by: wcass on Wed, 06 March 2013, 22:02:09
at one time, i dreamt of writing a GUI for Soarer's that would be as easy to use as the Aikon UI. the app use hid_listen to identify what key you just hit and you use the mouse to select what to assign that key to from 4 tables (non-printed characters, common printed characters, uncommon printed characters, predefined macros). alas, i have not the time or skill.

someone might find this useful. it is a big table of HID id's and PS2 make/break codes. iirc i got if from Microsoft.
[attachurl=1]


Title: Re: XT/AT/PS2/Terminal to USB Converter with NKRO
Post by: sleepy916 on Sat, 09 March 2013, 18:01:33
I haven't posted in here yet but I certainly have read this thread more than a few times. I would have been lost without it, thank you Soarer.

AKIMbO mentioned to put this here so I will.

I made this little picture looking at my post it notes. Not sure if it is useful for anybody but I'll post it here anyways. My paint skills leave a lot of room for improvement. This is specifically for my AT Model F.

(╯°□°)╯︵ ┻━┻)

(http://i.imgur.com/zr9vlT6.png)

Fixed...
Title: Re: XT/AT/PS2/Terminal to USB Converter with NKRO
Post by: Soarer on Sat, 09 March 2013, 19:07:21
Oh, that's cool  :cool:

But something's wrong somewhere because it should have clock -> pd1 and data -> pd0 in both cases  :)
Title: Re: XT/AT/PS2/Terminal to USB Converter with NKRO
Post by: sleepy916 on Sat, 09 March 2013, 19:49:04
Oh, that's cool  :cool:

But something's wrong somewhere because it should have clock -> pd1 and data -> pd0 in both cases  :)

Ahh...my copy and paste skills..  :(
Title: Re: XT/AT/PS2/Terminal to USB Converter with NKRO
Post by: Krogenar on Mon, 11 March 2013, 13:28:34
I juuuuust unpacked a Model F 122-key (my first Model F) and I notice it has the same 240-degree DIN plug as my Model M 122-keyboard. Is it safe for me to plug this thing into my existing Soarer converter? Any thoughts? My first reactions are:

1. Frickin' HEAVY. This is the keyboard that will survive the apocalypse, for sure. It's just so solidly built. You could use it to work your upper body, like that guy who used his typewriter in Misery.
2. Yeah... it's damnably *pingy* -- "This is the machine that goes *PiNg!*" <--- Monty Python reference. It may grow on me. The sound somehow makes it sound ... cheaper? Though I know that's not the case. I'll consider floss modding eventually.
3. The feet. How do the feet engage? Just pushing on them with fingers doesn't work. The circles on the edges of the keyboard don't have any kind of fingerhold that would allow me to rotate them into position. See potato pics below.

[attach=1]
[attach=2]
[attach=3]
[attach=4]

Yes! Press the buttons on the edge, and the flippers (they're pinball-sized flipper feet) slide down. The angle at which the keyboard is set when the feet are engaged is... feels steep! Anyway, thought I'd share the unwrapping.

Title: Re: XT/AT/PS2/Terminal to USB Converter with NKRO
Post by: rknize on Mon, 11 March 2013, 13:36:48
There are two sets of feet.  The inner ones are a bit tricky to coax out of the outer ones, but it gives a more typical angle.
Title: Re: XT/AT/PS2/Terminal to USB Converter with NKRO
Post by: fohat.digs on Mon, 11 March 2013, 13:38:37
Those double feet area trick if you want to take the case apart - pay VERY close attention to how they are assembled. I never use them.

The sound is really too much without the floss mod. Somebody said that the board "sings" and I think that is a good description.

As to the weight, people keep talking about "6 pounds" I don't know where that comes from. All mine weight 8 and a quarter.
Title: Re: XT/AT/PS2/Terminal to USB Converter with NKRO
Post by: Krogenar on Mon, 11 March 2013, 13:49:34
There are two sets of feet.  The inner ones are a bit tricky to coax out of the outer ones, but it gives a more typical angle.

Really? Gotta give those a try. Do you guys think my Soarer converter will work with this Model F? The one I made for my Model M 122-key has the exact same connector... is it safe to just plug this guy into it same as the Model M?
Title: Re: XT/AT/PS2/Terminal to USB Converter with NKRO
Post by: Krogenar on Mon, 11 March 2013, 13:54:15
As to the weight, people keep talking about "6 pounds" I don't know where that comes from. All mine weight 8 and a quarter.

Yeah, this is way more than 6 pounds.
Title: Re: XT/AT/PS2/Terminal to USB Converter with NKRO
Post by: rknize on Mon, 11 March 2013, 13:57:01
There are two sets of feet.  The inner ones are a bit tricky to coax out of the outer ones, but it gives a more typical angle.

Really? Gotta give those a try. Do you guys think my Soarer converter will work with this Model F? The one I made for my Model M 122-key has the exact same connector... is it safe to just plug this guy into it same as the Model M?

If it's the same connector and the converter is setup for the terminal key map, it should "just work".
Title: Re: XT/AT/PS2/Terminal to USB Converter with NKRO
Post by: Soarer on Mon, 11 March 2013, 15:06:03
Model M 122-key (square label and hat key vintage): 6lbs 3.5oz / 2.8kg  :)

Model F 122-key: 8lbs 12.75oz / 4kg :D

Filco TKL: ~0.9kg (from memory)  :))
Title: Re: XT/AT/PS2/Terminal to USB Converter with NKRO
Post by: Krogenar on Mon, 11 March 2013, 17:25:38
Well, it "just works" -- except one key won't work. Just ONE, lol. So far I've tried removing both parts of the keycap, and when the spring itself is brushed even slightly it will register on AquaKeytest as having been pressed, but once the two pieces are replaced over the spring, nothing. Any idea what could cause that behavior? Here's hoping I don't have to take it apart.
Title: Re: XT/AT/PS2/Terminal to USB Converter with NKRO
Post by: rknize on Mon, 11 March 2013, 17:48:57
Sounds like the spring is bent or not seating in the key cap correctly. If its the latter, leaning the board back while inserting the cap sometimes helps
Title: Re: XT/AT/PS2/Terminal to USB Converter with NKRO
Post by: poxeclipse on Mon, 11 March 2013, 20:06:45
rknize is right, it happens during shipping, some hammers move and the spring doesn't sit properly in the key cap.
The key cap has, sometimes, a small nib, which should sit inside the spring; if not, then the spring doesn't bent and doesn't move the hammer, so there is no change in capacitance and no signal sent. The sound is different, with no 'ping'.
Title: Re: XT/AT/PS2/Terminal to USB Converter with NKRO
Post by: sleepy916 on Mon, 11 March 2013, 21:34:34
I noticed that the Model Fs were harder to get the keycap on correctly than the Model Ms.
Title: Re: XT/AT/PS2/Terminal to USB Converter with NKRO
Post by: Krogenar on Tue, 12 March 2013, 06:51:14
rknize is right, it happens during shipping, some hammers move and the spring doesn't sit properly in the key cap.
The key cap has, sometimes, a small nib, which should sit inside the spring; if not, then the spring doesn't bent and doesn't move the hammer, so there is no change in capacitance and no signal sent. The sound is different, with no 'ping'.

I'm going to give that a try tonight. Pregnant Mrs. Krogenar was very needy last night, so I didn't have a chance to test this. The fact that the spring registered any kind of keypress at all made me feel that there's got to be a way to fix it. The keyboard itself arrived very well-packed by the sender. The spring did not appear or feel as though it was bent. It had the same 'springiness' as a neighboring, working spring.
Title: Re: XT/AT/PS2/Terminal to USB Converter with NKRO
Post by: simkev on Tue, 12 March 2013, 07:20:00
If you have a USB keboard that has NKRO over a usb to PS2 adapter could you make that board NKRO via the teensy without the PS2 adapter?Solder the ubs cables to the teensy?
Title: Re: XT/AT/PS2/Terminal to USB Converter with NKRO
Post by: alaricljs on Tue, 12 March 2013, 07:27:39
If the teensy is configured with a firmware that interfaces to a PS/2 board and supports NKRO then yes, it should work.  You'd need to attach the keyboard via PS/2 protocol pinout.  If for you that means cutting the cable and soldering it direct instead of using an adapter or some other method, then yes it will work if you get the pinout correct.
Title: Re: XT/AT/PS2/Terminal to USB Converter with NKRO
Post by: Soarer on Tue, 12 March 2013, 18:57:45
If it's a keyboard with a captive cable (i.e. no USB socket on the keyboard) it might be easier to remove the cable and wire the Teensy inside the keyboard, since the cable is quite likely to have a connector where it joins the PCB. Of course, you'd still have to work out the pinout.
Title: Re: XT/AT/PS2/Terminal to USB Converter with NKRO
Post by: Krogenar on Tue, 12 March 2013, 19:08:32
rkinize, fohat, I recognize your expertise with the Model F. I leaned the 'board backwards, and inserted the keycap sections, and all is well. It took a few tries, but now it's working! Thanks so much for your help guys, it is greatly appreciated. (tips hat)
Title: Re: XT/AT/PS2/Terminal to USB Converter with NKRO
Post by: fohat.digs on Tue, 12 March 2013, 19:11:20
It can take several attempts to get it to seat properly. Sometimes they are just stubborn. Making the spring flop forward is usually helpful.
Title: Re: XT/AT/PS2/Terminal to USB Converter with NKRO
Post by: rknize on Tue, 12 March 2013, 22:01:19
rkinize, fohat, I recognize your expertise with the Model F. I leaned the 'board backwards, and inserted the keycap sections, and all is well. It took a few tries, but now it's working! Thanks so much for your help guys, it is greatly appreciated. (tips hat)

Great!  The same trick works on the M, too.  If you look under the key cap, there is a little nub where the spring is supposed to seat.  Gravity makes the springs lean towards you when you insert the cap, so it has to ride the ramp and then hopefully pop over that nub.  Sometimes it just won't, so you have to guide the spring yourself.
Title: Re: XT/AT/PS2/Terminal to USB Converter with NKRO
Post by: Soarer on Sat, 06 April 2013, 13:15:33
I just added a v1.11 update to the first post:


The last change, to prevent debug output when in BIOS mode, is another attempt at fixing the long-standing incompatibility with certain Dell machines (M6300 (BIOS rev A14) and Inspiron 630m). If anyone has one of those, please test!
Title: Re: XT/AT/PS2/Terminal to USB Converter with NKRO
Post by: Halvar on Mon, 08 April 2013, 16:56:26
Thanks Soarer for constantly pushing this forward!  :cool:
Title: Re: XT/AT/PS2/Terminal to USB Converter with NKRO
Post by: jpeart on Thu, 11 April 2013, 23:02:10
Soarer, thank you for all your efforts in developing this firmware.  I spent the last few weeks buying different adapters/converters trying to get an older keyboard working to no avail.  I found your converter while googling and decided to give it a try.  I ordered a Teensy 2.0 last weekend and I was very excited to see it had arrived today.  Took me just a few minutes to hook it all up for a test run and it works perfectly!  With the other products I had purchased I was getting a lot of key repeats, but I have not seen a single problem using your firmware.

If anyone is interested I'm tracking the progress of my little project here http://geekhack.org/index.php?topic=42150.0 (http://geekhack.org/index.php?topic=42150.0)
Basically I'm trying to put a Raspberry Pi inside a Keycat keyboard and make my own kind of Commodore 64.
Title: Re: XT/AT/PS2/Terminal to USB Converter with NKRO
Post by: fohat.digs on Fri, 12 April 2013, 09:14:43
Oh, no! It's that pesky fohat.digs again!

A couple of months ago I had a big problem after upgrading a motherboard from Asus to Gigabyte. I keep a powered USB hub at the back of the desk, and my keyboards and mice plug into it. I have done this for a long time, but the Gigabyte motherboard refused to boot (not even a peep or POST) with the powered USB 2.0 hub connected. When I went to a non-powered hub, the problem disappeared.

There are USB 2.0 and 3.0 sockets on the back, and since I have a 3.0 external hard drive, I wanted to upgrade the USB hub. I bought a nice SIIG 4-port powered USB 3.0 hub, and plugged it into the (previously vacant) 3.0 port.

Now, the computer boots fine and recognizes both of my mice, but will not recognize my F-122/Teensy (Teensy 2.0 with v1.10 Soarer's Converter) until I unplug it and hot-plug it. I have been through several power-up/power-down cycles and it is still happening.

I know that motherboards are funny about these things, sometimes, and the stock answer is: "plug the keyboard directly into the motherboard" but I would prefer to make the hub work if I could.

Are there any new answers since last time?

Thanks! Harry
Title: Re: XT/AT/PS2/Terminal to USB Converter with NKRO
Post by: rknize on Fri, 12 April 2013, 09:31:40
Look for a BIOS upgrade?  This weird boot behavior with keyboards usually has to do with legacy keyboard emulation that the BIOS tries to do with USB keyboards.  Look in your BIOS options and try disabling legacy keyboard emulation if such an option exists.
Title: Re: XT/AT/PS2/Terminal to USB Converter with NKRO
Post by: vipjun on Mon, 15 April 2013, 20:04:53
Just wanted to show my appreciation for this project. thanks soarer!
Title: Re: XT/AT/PS2/Terminal to USB Converter with NKRO
Post by: AKIMbO on Tue, 23 April 2013, 15:42:57
Successfully modded one of my AT F's to a traditional ANSI layout (using a function block where Fn + 1 is F1, Fn + 2 is F2, etc). 

Thanks again Soarer!

(http://i35.tinypic.com/2mhew48.jpg)
Title: Re: XT/AT/PS2/Terminal to USB Converter with NKRO
Post by: Halvar on Tue, 23 April 2013, 15:54:52
That's beautiful.

I wish Unicomp's European resellers had those media keycaps to use it with my M-122.

And that there were any Model Fs to be found here in Europe...

What key do you use for the Fn key?
Title: Re: XT/AT/PS2/Terminal to USB Converter with NKRO
Post by: AKIMbO on Tue, 23 April 2013, 17:33:13
That's beautiful.

I wish Unicomp's European resellers had those media keycaps to use it with my M-122.

And that there were any Model Fs to be found here in Europe...

What key do you use for the Fn key?

Capslock + 1= F1...all the way through Caplock + = which is F12
Title: Re: XT/AT/PS2/Terminal to USB Converter with NKRO
Post by: sleepy916 on Tue, 23 April 2013, 18:15:11
Successfully modded one of my AT F's to a traditional ANSI layout (using a function block where Fn + 1 is F1, Fn + 2 is F2, etc). 

Thanks again Soarer!

Show Image
(http://i35.tinypic.com/2mhew48.jpg)


That looks to be in pristine condition! Now just send it to my house, I'll pm you my address shortly. ;]
Title: Re: Re: XT/AT/PS2/Terminal to USB Converter with NKRO
Post by: AKIMbO on Tue, 23 April 2013, 18:21:21
Successfully modded one of my AT F's to a traditional ANSI layout (using a function block where Fn + 1 is F1, Fn + 2 is F2, etc). 

Thanks again Soarer!

Show Image
(http://i35.tinypic.com/2mhew48.jpg)


That looks to be in pristine condition! Now just send it to my house, I'll pm you my address shortly. ;]

It is...I actually struggled with whether I wanted to mod it or keep it in stock condition for quite some months.  Today I said fugg it and modded it.
Title: Re: XT/AT/PS2/Terminal to USB Converter with NKRO
Post by: Halvar on Tue, 23 April 2013, 18:36:43
After looking at other Model F pictures: wow, how much did you have to mod here?  :eek:

Did it look like this one with the big-ass return key, small backspace and all?
http://www.clickykeyboards.com/index.cfm/fa/items.main/parentcat/9934/subcatid/0/id/529210

That's no small feat then ... I feel dumb for even talking about keycaps first...






Title: Re: XT/AT/PS2/Terminal to USB Converter with NKRO
Post by: Krogenar on Wed, 24 April 2013, 06:55:56
Akimbo, I'd love to do what you did (more ANSI-like layout) with my Model F-122, but frankly I don't want to risk ruining my 'board. Looks awesome. Do those additional keys feel particularly different from the original keys? I mean the actuation, sound, etc.?
Title: Re: XT/AT/PS2/Terminal to USB Converter with NKRO
Post by: fohat.digs on Wed, 24 April 2013, 07:02:22
The mod is totally easy, assuming that you can take the board apart and put it back together.

It is a great opportunity to tidy everything up, and swapping 2 spring locations is utterly trivial.

Of course, putting it back together is the hardest and most challenging part.
Title: Re: XT/AT/PS2/Terminal to USB Converter with NKRO
Post by: AKIMbO on Thu, 25 April 2013, 00:51:26
After looking at other Model F pictures: wow, how much did you have to mod here?  :eek:

Did it look like this one with the big-ass return key, small backspace and all?
http://www.clickykeyboards.com/index.cfm/fa/items.main/parentcat/9934/subcatid/0/id/529210

That's no small feat then ... I feel dumb for even talking about keycaps first...
Yup, it sure did look like that (small backspace and all).  Like fohat said, it isn't a hard mod....open up the board and move a few springs around, add a couple white barrel inserts from an old Model M, and close her back up.  The hardest part is stripping and soldering the AT cable to the Teensy.


Akimbo, I'd love to do what you did (more ANSI-like layout) with my Model F-122, but frankly I don't want to risk ruining my 'board. Looks awesome. Do those additional keys feel particularly different from the original keys? I mean the actuation, sound, etc.?

Nope...the additional keys feel and sound exactly like the original keys.
Title: Re: XT/AT/PS2/Terminal to USB Converter with NKRO
Post by: Retrete on Sat, 27 April 2013, 07:31:24
Nice post! I have a pseudoterminal  kevex ray 7000CM, and I want to adapt the keyboard in order to use it with a modern computer, the keyboard terminal use this port;
http://www.flickr.com/photos/95230480@N02/8683117351/in/set-72157633342730175

As I don't have a clue about this, I also took photos of the terminal w/o tape;
http://www.flickr.com/photos/95230480@N02/sets/72157633342730175/

The keyboard looks great  :p
(http://oi41.tinypic.com/2rmo55v.jpg)

Thanks in advance!
Title: Re: XT/AT/PS2/Terminal to USB Converter with NKRO
Post by: Soarer on Sat, 27 April 2013, 08:05:43
Beautiful! A bit crazy in construction, with a PCB and wire-wrapping!

Not something this converter can convert though. Do you know what switches it uses? If they are simple contact switches, then the easiest way to get it working would be to remove the chips and wire in a new controller. I'm currently working on one aimed at non-programmers, or there's hasu's code (https://github.com/tmk/tmk_keyboard) which is pretty easy to configure and build.
Title: Re: XT/AT/PS2/Terminal to USB Converter with NKRO
Post by: Retrete on Sat, 27 April 2013, 11:11:12
Beautiful! A bit crazy in construction, with a PCB and wire-wrapping!

Not something this converter can convert though. Do you know what switches it uses? If they are simple contact switches, then the easiest way to get it working would be to remove the chips and wire in a new controller. I'm currently working on one aimed at non-programmers, or there's hasu's code (https://github.com/tmk/tmk_keyboard) which is pretty easy to configure and build.

I don't know exactly what type of switches are, non clicky and the loudest I've seen ;
http://www.flickr.com/photos/95230480@N02/sets/72157633364166384/

Thanks again!
Title: Re: XT/AT/PS2/Terminal to USB Converter with NKRO
Post by: Soarer on Sat, 27 April 2013, 14:20:31
They look rather like Cherry M7 (or M6?) with the 'T' mount stem... Catalogue 1982, pp22,23 (http://deskthority.net/wiki/File:Catalogue_1982.pdf). There's even a couple of keyboards in there with a similar layout to the main alpha block of yours.

So most likely to be simple contact switches. You could check with a multimeter easily, if you have one...?

The first task in replacing the controller would be to identify the rows and columns. I did that by tracing the PCB tracks on an Ortek MCK-84 (http://geekhack.org/index.php?topic=13826.msg270915#msg270915). It's quite tedious :( It's not really necessary to go to such detail; simply knowing which are rows and which are columns would suffice, and the rest can be worked out after the controller is wired up.

Some straight-on pictures of the PCB would help, if you get to taking it apart that far. It looks like those supports could be unscrewed from underneath, leaving them attached to the PCB. Not sure if they'll block the view of anything important though!
Title: Re: XT/AT/PS2/Terminal to USB Converter with NKRO
Post by: Retrete on Sat, 27 April 2013, 17:04:31
I've already disassemble the keyboard cover and I took a couple of photos, It isn't linear ;
http://www.flickr.com/photos/95230480@N02/sets/72157633350772239/

Title: Re: XT/AT/PS2/Terminal to USB Converter with NKRO
Post by: Soarer on Sat, 27 April 2013, 18:51:45
Hah! I wasn't expecting it to be a double-sided PCB... at least it makes one side very easy to trace out! There's clearly 8 traces there for the rows, plus one trace for the shifts which seems to go to ground. On the other side there are probably 11 (or more) traces for the columns. All the lines presumably go to these sockets:

[attachimg=1]

I'd guess that the rows all go to the one on the left, which looks like it has a resistor pack in it (acting as pull-ups or pull-downs). Testing with a multimeter - or even a cheap continuity tester - would confirm the connections.

The 'controller', such as it is, consists of all the chips (12?). None of them look big enough to be a CPU, but 12 is more than would be needed for a completely 'dumb' keyboard. So that's kind of interesting, but probably not very useful! (There's what looks to be a voltage regulator near where that ribbon cable connects, so some of the chips will simply buffer voltages).

So as controller swaps go, it looks fairly straightforward - remove all the chips, wire a Teensy or Teensy++ to some of the connections on the the sockets I marked, customise and load some code, and it should work! Of course, I don't know how comfortable you'd be doing that kind of thing... :)
Title: Re: XT/AT/PS2/Terminal to USB Converter with NKRO
Post by: Retrete on Sat, 27 April 2013, 20:06:19
I will try to get a multimeter and verify that.
Quote
So as controller swaps go, it looks fairly straightforward - remove all the chips
I don't want to break everything xD,but If wiring a teensy would make it operative, I'll make you a statue hahahah.

Offtopic, do you know if theres any shop who sells your teensy in Europe? 86 dollars for shipping tracked  :eek:
Title: Re: XT/AT/PS2/Terminal to USB Converter with NKRO
Post by: Soarer on Sat, 27 April 2013, 20:30:50
If the chips are removed carefully, nothing will break and it could all be put back how it was - if you remember where they all went ;)

The untracked shipping from PJRC has been reliable to me (in the UK), and if you're buying more than one that works out to be the cheapest option overall. Otherwise, there's Floris.CC (http://www.pieterfloris.nl/shop/category.php?id_category=45). Also, there are alternatives (http://deskthority.net/workshop-f7/teensy-2-0-alternatives-atmega32u4-t4253.html) that use the same CPU as the Teensy 2.0 (warning: that page needs a clean up, some have posted non-compatible boards there).

I think a Teensy 2.0 would be enough for this - it probably has enough pins available. But it might be easier with Teensy++ 2.0, just because of being able to make a more logical set of connections, and less cramped. It's not like you'll be short of space to put it in that casing!
Title: Re: XT/AT/PS2/Terminal to USB Converter with NKRO
Post by: Retrete on Sun, 28 April 2013, 04:45:31
Quote
Today I spotted a breakout titled "Leonardo Nano Pro Mini ATmega32U4 ..."
Still a good choice?On ebay for ~13€ with free shipping.
Title: Re: XT/AT/PS2/Terminal to USB Converter with NKRO
Post by: Soarer on Sun, 28 April 2013, 06:14:37
Probably! However, two points...

The Teensy loader (as in, what gets code onto the chip) is by far the easiest to use.

You still need to check how many columns there are on that keyboard; it might be too many for the ATmega32U4 chip. There's 25 usable pins in all, but some may already be used by LEDs (one LED on Teensy). Plus, you might want to add the 3 lock LEDs. We've already spotted 8 rows, but then there's the shift keys which might need a pin each (since one side looks like it's joined to ground permanently). So 25 - 1 - 3 - 8 - 2 = 11 pins left for columns. It ought to be enough for 86 keys, but only just!
Title: Re: XT/AT/PS2/Terminal to USB Converter with NKRO
Post by: Retrete on Sun, 28 April 2013, 09:47:47
So teensy loader will only work with a teensy board correct?
Analyze the front part of the PCB is nearly impossible, I've made a really awful looking scheme,
(http://oi44.tinypic.com/30mbb13.jpg)

Sorry for my totally retarded questions  :-[
Title: Re: XT/AT/PS2/Terminal to USB Converter with NKRO
Post by: Soarer on Sun, 28 April 2013, 14:18:13
So teensy loader will only work with a teensy board correct?

Yes, essentially that's correct.

There's two other common ones... Atmel's FLIP works with the default Atmel bootloader on many dev boards, and dfu-programmer (or the Arduino environment) works with Arduino compatible dev boards.

Analyze the front part of the PCB is nearly impossible, I've made a really awful looking scheme,

Sorry for my totally retarded questions  :-[

No problem!

Scheme looks about right... the blue wires can stay, since removing the chips means the wires won't connect to anything. It loks like the chips are in sockets, so they should come out with a bit of careful prizing with a screwdriver (a little twist at one end of the chip, a little at the other, ...). Analyzing all of the front of the PCB shouldn't be necessary - it's clearly 8 lines going to the socket at the end, and a group of 11 lines going to that other one - as predicted :D It looks like the shift keys (and maybe one other?) conect to the last three pins of that socket too.

Of course, I'm making some guesses, so this should be checked with a multimeter (not every single key's connection, but enough to know that I've guessed correctly).
Title: Re: XT/AT/PS2/Terminal to USB Converter with NKRO
Post by: neocalm on Sun, 28 April 2013, 20:57:05
Sorry - misposted.
Title: Re: XT/AT/PS2/Terminal to USB Converter with NKRO
Post by: neocalm on Sun, 28 April 2013, 20:57:25
Well Soarer - it only took nine months but after experimenting with conductive paint, and later on copper conductive tape - both didn't appear to be long-term solutions as they might wear down too much.  One bolt-mod is enough.

I took your advice and Unicomp does indeed sell the membrane.

Bolt-modded back together using 78 of:

(Amazon amongst other carries these) and there was absolutely no issue.  Soarer's Converter is absolutely everything I could have dreamed, for 122-keys of mechanical switching goodness.

Thanks again!!

Rear defogger repair kit?
Yeah. Or from electronics suppliers (example (http://www.rapidonline.com/Tools-Equipment/Conductive-Silver-Leitsilber-L100-3g-87-0781)).

I should say I've no idea how well or even if it would work, but in theory it might!

My reservation in this case is that I suspect a new membrane might not cost much more, so that's definitely worth enquiring about.
Title: Re: XT/AT/PS2/Terminal to USB Converter with NKRO
Post by: Retrete on Mon, 29 April 2013, 14:06:54
I managed to get a multimeter, I don't know If is not working correctly or I am def stupid  :p;
As you said a few posts back, So most likely to be simple contact switches. You could check with a multimeter easily,
I take the multimeter, both wires on it, test it with a 9v batterie and one of the resistances of the kb,the multimeter seems to work.
But, when I test the switches, voltage, resistance, amp all 0, I've tried it with all the precision positions available, which type of result I've to find?

Thanks again!


Title: Re: XT/AT/PS2/Terminal to USB Converter with NKRO
Post by: Soarer on Mon, 29 April 2013, 14:40:04
Right... on a resistance setting, you should find the meter reads "OL" or goes blank or something, then if you touch the probes together it should read 0 (or close to 0). You might find it has a continuity test setting, which will beep when you touch the probes together...

[attachimg=1]

So to check the switch, hold a probe each on the contacts marked red and black - we're expecting it to read 'OL' without the switch pressed, and close to 0 with it pressed. (Yes, you might run out of hands!)

[attachimg=2]

Then you could try to confirm the connections from that switch to the sockets... my guess is that the red one connects to one of the pins on the purple socket, and the black connects to a pin on the blue socket.
Title: Re: XT/AT/PS2/Terminal to USB Converter with NKRO
Post by: Retrete on Mon, 29 April 2013, 15:37:00
Multimeter doesn't work well, in "AUDIBLE CONTINUITY TEST" never beeps, In the manual says that if the resistance is lower then 1k ohm buzzer will sound, so putting both probes together must return into a beep as the screen value goes near to 0 (default 1, not OL)
But it doesn't, and when I make the contact with those marked,return this;

Only a few switches return that value, the rest stay at the 1 deafult.
Title: Re: XT/AT/PS2/Terminal to USB Converter with NKRO
Post by: Soarer on Mon, 29 April 2013, 16:07:24
Shame about the buzzer, that does make it easier :(

Some relatively high resistance instead of OL (I'll say OL instead of 1, so it's clear what I mean) is quite possible, and 1811 is high enough. (The resistance is elsewhere in the circuit, not in the switch itself).

Does it go close to 0 if you press the switch?
Title: Re: XT/AT/PS2/Terminal to USB Converter with NKRO
Post by: metalliqaz on Mon, 29 April 2013, 16:18:03
Get a proper meter dude.  It is a worthwhile investment.
Title: Re: XT/AT/PS2/Terminal to USB Converter with NKRO
Post by: Retrete on Mon, 29 April 2013, 16:33:15
Get a proper meter dude.  It is a worthwhile investment.
Yep, I don't learn the lesson, months ago I bought a (welder?) for 3€ in a chinese shop instead of paying 10€ for the local one. The welder exploded, comical scene(and also scary...)
Multimeters can explode?  :D
Tomorrow I will try to return it.

Shame about the buzzer, that does make it easier :(

Some relatively high resistance instead of OL (I'll say OL instead of 1, so it's clear what I mean) is quite possible, and 1811 is high enough. (The resistance is elsewhere in the circuit, not in the switch itself).

Does it go close to 0 if you press the switch?

Yes! It goes closer to 0 when pressed
Title: Re: XT/AT/PS2/Terminal to USB Converter with NKRO
Post by: Soarer on Mon, 29 April 2013, 16:43:02
Yes! It goes closer to 0 when pressed

Cool, the switches are simple contact switches then :cool:

How about finding a connection between red and a pin on the purple socket? The switch doesn't need to be pressed for that test, just hold one probe on red and try the other probe on each pin of the purple socket, to see if it goes close to 0 on any of them.

Then the same between black and the pins on the blue socket :D

And then return the meter!!  :))
Title: Re: XT/AT/PS2/Terminal to USB Converter with NKRO
Post by: Retrete on Mon, 29 April 2013, 16:54:32
Found! I will record a video , it's a little bit weird
The video;
Title: Re: XT/AT/PS2/Terminal to USB Converter with NKRO
Post by: Soarer on Mon, 29 April 2013, 19:04:32
Not weird at all, it's just how I'd expect it! Pressing the switch joins one connection on the purple socket to one connection of the blue socket. All the other switches will join a different combination, forming the matrix.

Here's a switch matrix from a pinball machine :D

(http://techniek.flipperwinkel.nl/wms11/sm1sys11.gif)

Anyway, I think that testing confirms that rows are on the purple socket, and columns are on the blue socket. The controller would scan the matrix by setting the columns active, one at a time, and each time reading the rows.

Apart from three keys - Left Shift, Right Shift and Reset - which look like they have separate connections...

[attachimg=1]

The trace from the Reset key (black) is mostly visible. But can you check that you get a low reading between the green circle and the end pin on the socket, and also from the cyan circle to the next pin?

Then we have almost all of the information we need. The last question is which of the pins on the purple socket are actually connections to rows. We already know pin 2 is. (well, the second pin on that side - I think it might actually be pin 10 going by the marking on the top of the resistor pack). The rest I can see in this picture, but not quite clearly enough to tell for sure...

[attachimg=2]
Title: Re: XT/AT/PS2/Terminal to USB Converter with NKRO
Post by: Retrete on Mon, 29 April 2013, 19:20:16
Quote
can you check that you get a low reading between the green circle and the end pin on the socket, and also from the cyan circle to the next pin?
Both goes to ~0
Quote
The last question is which of the pins on the purple socket are actually connections to rows
Im now getting which pins makes nearly zero, I will post now the scheme, I also took a new photo of the board;
(http://oi43.tinypic.com/14blq9l.jpg)

The scheme;
http://www.flickr.com/photos/95230480@N02/8694766662
Title: Re: XT/AT/PS2/Terminal to USB Converter with NKRO
Post by: Soarer on Mon, 29 April 2013, 19:47:22
That pic's nice and clear :D

So these are all of the 22 places that a new controller would have to connect to on the keyboard...

[attachimg=1]

Then maybe the controller also needs a few pins for LEDs (onboard and locks).

edit:

Scheme is cool  :cool:

I think the line to the left shift should go to the key next to it though ;)

The line you've drawn to the right shift is just a ground... you would need to make a connection from it to the new controller, but it won't use up an IO pin.
Title: Re: XT/AT/PS2/Terminal to USB Converter with NKRO
Post by: Retrete on Mon, 29 April 2013, 20:36:30
Trying to understand the left&right shift issues I've found this;
(http://oi40.tinypic.com/11j6dtg.jpg)

Tomorrow I'll make the Teensy order, the mini-usb cable used its a special one? Or I could use any other?
Teensy 2.0 or ++ 2.0? 6€ more, worth it?
Title: Re: XT/AT/PS2/Terminal to USB Converter with NKRO
Post by: Soarer on Mon, 29 April 2013, 21:00:35
There will be lots of ground connections around... and one side of each of Left Shift, Right Shift and Reset is connected to ground also, by this trace on the right:

[attachimg=1]

The other sides of those switches we already know use three pins on the blue socket. In a sense, they are wired separately from the matrix. It would be possible to modify the PCB to make them part of the matrix, but there's no need.

I think Teensy 2.0 doesn't have quite enough pins - only 24 are available, and one of those is awkwardly in the middle of the board. But it depends if you want to connect LEDs for caps lock etc, and how many. I'd go for the Teensy++ 2.0, if it were me. The mini-usb cable is just a standard one.
Title: Re: XT/AT/PS2/Terminal to USB Converter with NKRO
Post by: Retrete on Tue, 30 April 2013, 08:06:10
I didn't metioned yet,I also have a (space saver?) Teletype M43 keyboard, the clickiest I've ever heard.
I think that It's also teensy capable, but I am frightened with this;
(http://oi39.tinypic.com/33pbrid.jpg)

Little gallery (It looks like all this new space saver mini mechanical keyboards  :p)
http://www.flickr.com/photos/95230480@N02/sets/72157633371311121/

Im doing the scheme of the pcb, I will post it now.

So, 2 teensy's?  :D

Title: Re: XT/AT/PS2/Terminal to USB Converter with NKRO
Post by: Soarer on Tue, 30 April 2013, 09:17:32
Sure, why not! Maybe get one of each - since that has less keys a Teensy 2.0 might be enough. As long as the switches measure ~0 resistance when pressed, it should be possible.

You should be fine working on it if you touch something which is grounded (like an unpainted radiator pipe) before touching it, to get rid of any static charge you might have. It's usually only an issue when removing chips, and then you can try not to touch the pins.

Removing the chips looks like it would be difficult, so you would have to hope that the new controler can work OK without removing them (but fairly good chance of that).
Title: Re: XT/AT/PS2/Terminal to USB Converter with NKRO
Post by: rknize on Tue, 30 April 2013, 10:25:21
If anyone is old enough to remember the 4000-series CMOS logic gates, they were/are very sensitive to ESD.  People accustomed to TTL circuitry got a nasty surprise when they handled early CMOS stuff without a static strap.  Wear appropriate protection if you dig into this device.

Modern gate logic is pretty much all CMOS, but they have many layers of protection diodes on each leg of the part to prevent most ESD problems.
Title: Re: XT/AT/PS2/Terminal to USB Converter with NKRO
Post by: Retrete on Tue, 30 April 2013, 11:36:39
Sure, why not! Maybe get one of each - since that has less keys a Teensy 2.0 might be enough. As long as the switches measure ~0 resistance when pressed, it should be possible.

You should be fine working on it if you touch something which is grounded (like an unpainted radiator pipe) before touching it, to get rid of any static charge you might have. It's usually only an issue when removing chips, and then you can try not to touch the pins.

Removing the chips looks like it would be difficult, so you would have to hope that the new controler can work OK without removing them (but fairly good chance of that).

W/o pressed ~0 , and when pressed default 1 value, the scheme;
(http://oi40.tinypic.com/191g8j.jpg)

Edit: Teensy-with his cable and Teensy++ incoming  , 56$  :confused:
Hope it works  :p
Title: Re: XT/AT/PS2/Terminal to USB Converter with NKRO
Post by: Soarer on Tue, 30 April 2013, 14:02:57
I'm confident that the first one can be made to work.

The M43 though, after seeing that diagram, may take some effort... it doesn't look like a matrix, and I'm guessing that all the other pins of the switches (the left-hand pin of each switch, in that pic) connect together. The best approach might be to work out how to use it via the cable connector instead. The first step would be to try and find a Technical Reference or a Repair Manual for it.
Title: Re: XT/AT/PS2/Terminal to USB Converter with NKRO
Post by: Retrete on Tue, 07 May 2013, 05:39:25
The package arrived today! Only 1 week  :eek:
It's extremely necessary to remove all the chips which do nothing? Or I could let them stay?
Title: Re: XT/AT/PS2/Terminal to USB Converter with NKRO
Post by: Soarer on Wed, 08 May 2013, 17:38:07
1 week is good!

Technically you might get away with not removing the chips, but there is a risk that they could get damaged, or that they could obstruct the operation of the Teensy controller. They're really not all that difficult to remove (just do it carefully, and record what went where). What you might not have is something good to store them in - either anti-static foam or an IC tube is best...
Title: Re: XT/AT/PS2/Terminal to USB Converter with NKRO
Post by: Retrete on Thu, 09 May 2013, 10:36:56
Chips removed, but I don't know If I also need to remove the resistances or&and the " special chip";
(http://oi43.tinypic.com/5p55lk.jpg)

Now, how I should wire the teensy?
(http://oi39.tinypic.com/6gj48j.jpg)

Thanks a lot for your help,w/o your knowledge this would still taking dust in the lab  :confused:
Title: Re: XT/AT/PS2/Terminal to USB Converter with NKRO
Post by: Soarer on Thu, 09 May 2013, 15:16:15
The other resistors etc can stay. Most will now be disconnected from the switch matrix, after removing the chips.

As for wiring, there is some flexibilty... let's start by labelling the pins on the keyboard:

[attachimg=1]

We still need to find a convenient point to connect GND to ground, as well.

On the Teensy++, it could go something like this:

[attachimg=2]

I wonder, would the Teensy mount on the pins 0 to 10? (tilted at an angle to avoid touching the pins behind them). That would save a lot of wiring! (It would be harder to remove though).
Title: Re: XT/AT/PS2/Terminal to USB Converter with NKRO
Post by: Retrete on Thu, 09 May 2013, 16:26:42
Like this ? :p
(http://oi39.tinypic.com/2irag4m.jpg)
Now I'll try to see how the rest pins could be connected w/o soldering.

Any advice with the type of wire?
Title: Re: XT/AT/PS2/Terminal to USB Converter with NKRO
Post by: Soarer on Thu, 09 May 2013, 17:13:42
Unfortunately (?), you will most likely need to do some soldering to get this done!

I was thinking of putting it this way round (and tilted so it doesn't touch the next row of pins along):

[attachimg=1]

Another option would be to flip it over - still connecting to the same pins. But then the reset button would be hard to get to, since it would be a) underneath, and b) under the metal plate.

The main problem with the way you've shown it is that there are the GND and AREF pins in the middle of that side, which we can't use for the matrix connections.

You might be able to use some breadboard wires to avoid some soldering, at least on the keyboard side. Something like these female to male (http://www.ebay.co.uk/itm/130807140502) or these female to female (http://www.ebay.co.uk/itm/130782463007) (which are probably available more locally to you). You could solder them at the Teensy end, or solder pins to the Teensy and then plug them on.
Title: Re: XT/AT/PS2/Terminal to USB Converter with NKRO
Post by: Retrete on Thu, 09 May 2013, 19:02:46
With patience and bending slowly a little bit the front pins I finally managed to connect it with that position;
(http://oi43.tinypic.com/c5oas.jpg)
I bought a good amount of female-male arduino connectors, kb-female---------male-arduino, and I would probably solder these (theres always the possibility just with pression)
With that position the GND and AREF problems dissapear?

Thanks again!


Title: Re: XT/AT/PS2/Terminal to USB Converter with NKRO
Post by: Soarer on Thu, 09 May 2013, 19:58:15
That way round, but moved along 3 positions - so the X,Y,Z pins are not connected into the Teensy. The GND and AREF are not a problem along this side, but PD6 is, since it has the LED on the Teensy connected to it already. Pins PD7 along to PC7 gives the most pins together  in a row that can be used. Something to insulate the Teensy from the next row of pins would be wise - a few layers of electrical tape on the bottom of the Teensy should be enough.

A warning here: if you solder the Teensy directly to those pins on the keyboard, it will be quite hard to remove! I can't make the choice for you - you can either fit it there with less individual wires to do, or elsewhere with more wires but far easier to remove. Friction fit on those pins might be OK for testing, but I wouldn't trust it long-term.

My controller code is progressing, the main part of it has been tested and works fine. What I'm busy with now is allowing the connections and key mappings to be defined using a config file, and most parts of that are written but not yet tested. Maybe ready for a try-out in a few more days!
Title: Re: XT/AT/PS2/Terminal to USB Converter with NKRO
Post by: Retrete on Fri, 10 May 2013, 02:31:15
I bought enough pin-adapter, so I'll probably connect all the pins to the teensy using them
Quote
not a problem along this side, but PD6 is, since it has the LED on the Teensy connected to it already.
I didn't get that , I won't put any leds, at least for now, don't want to complicate it even more  :confused:

Title: Re: XT/AT/PS2/Terminal to USB Converter with NKRO
Post by: Soarer on Fri, 10 May 2013, 05:09:44
Just that there is already an LED on the Teensy, which uses PD6 :)
Title: Re: XT/AT/PS2/Terminal to USB Converter with NKRO
Post by: Retrete on Tue, 14 May 2013, 05:09:12
Solderless cables arrived, I will edit now with some photos
If the position are the definitive I'll solder them now
--------
Soldered and plugged;
(http://oi40.tinypic.com/686908.jpg)
Title: Re: XT/AT/PS2/Terminal to USB Converter with NKRO
Post by: mkawa on Tue, 14 May 2013, 17:55:50
this post is to for force alaric to post the bom and howto for this awesome soarer he made for me

(http://geekhack.org/index.php?action=dlattach;topic=17458.0;attach=22069;image)
(http://geekhack.org/index.php?action=dlattach;topic=17458.0;attach=22071;image)
Title: Re: XT/AT/PS2/Terminal to USB Converter with NKRO
Post by: Soarer on Tue, 14 May 2013, 18:26:36
Solderless cables arrived, I will edit now with some photos
If the position are the definitive I'll solder them now
--------
Soldered and plugged;
Show Image
(http://oi40.tinypic.com/686908.jpg)


Dang... stuff happened!

My code basically seems to work now, at least on Teensy 2.0. It should work on Teensy++ with a recompile, I'll build it if you wanna try it out!
Title: Re: XT/AT/PS2/Terminal to USB Converter with NKRO
Post by: Retrete on Tue, 14 May 2013, 18:42:37
Quote
My code basically seems to work now, at least on Teensy 2.0. It should work on Teensy++ with a recompile, I'll build it if you wanna try it out!

Of course! It will be a pleasure testing it  ;D
I'm also making a video-resume of the whole steps, im building your statue  :p
Title: Re: XT/AT/PS2/Terminal to USB Converter with NKRO
Post by: Soarer on Tue, 14 May 2013, 19:14:46
OK, I'll try and put it together tomorrow evening. Are you running Windows?
Title: Re: XT/AT/PS2/Terminal to USB Converter with NKRO
Post by: Retrete on Tue, 14 May 2013, 19:17:39
yes, Windows 7.
Title: Re: XT/AT/PS2/Terminal to USB Converter with NKRO
Post by: Soarer on Tue, 14 May 2013, 19:58:29
Cool, I won't need to build the Linux or Mac tools then :D
Title: Re: XT/AT/PS2/Terminal to USB Converter with NKRO
Post by: Soarer on Wed, 15 May 2013, 19:30:22
this post is to for force alaric to post the bom and howto for this awesome soarer he made for me

Show Image
(http://geekhack.org/index.php?action=dlattach;topic=17458.0;attach=22069;image)

Show Image
(http://geekhack.org/index.php?action=dlattach;topic=17458.0;attach=22071;image)


That is a really nice little case!
Title: Re: XT/AT/PS2/Terminal to USB Converter with NKRO
Post by: Soarer on Wed, 15 May 2013, 19:50:51
Quote
My code basically seems to work now, at least on Teensy 2.0. It should work on Teensy++ with a recompile, I'll build it if you wanna try it out!

Of course! It will be a pleasure testing it  ;D
I'm also making a video-resume of the whole steps, im building your statue  :p

Right, here's a zip of controller stuff, which should be all you need for the moment. You'll also want to get the latest converter zip, for the docs, since the method of loading a config is the same. Then you'll need to load Soarer_Controller_1.2_at90usb1286.hex onto the Teensy++, and then compile (scas) and load (scwr) the kevex.sc config file.

That will set it up to scan the matrix, but it won't be outputting any keys (it would get messy if it happened to spew out random keys!). It will be printing stuff out that can be viewed using hid_listen - if it's basically working you'll see nothing much until you press a key, and a hex code prefixed by either \ (key down) or / (key up). The hex code corresponds to the matrix position of the key - the strobe number first, and the sense number second.

If that all looks good, you can start editing a new config file, replacing all the UNASSIGNED entries with useful HID codes (such as A or SPACE, see the Codes page of the docs). So you press Q, see what the code is, plug Q into the config at the right place. Rinse and repeat!

Oh, the three lines near the end beginning with 'unstrobed' are left shift, right shift and that reset key... but I'm not sure what order. They will have matrix codes of B0, B1 and B2, in that order.
Title: Re: XT/AT/PS2/Terminal to USB Converter with NKRO
Post by: alaricljs on Wed, 15 May 2013, 21:45:38
Show Image
(http://geekhack.org/index.php?action=dlattach;topic=17458.0;attach=22069;image)

Show Image
(http://geekhack.org/index.php?action=dlattach;topic=17458.0;attach=22071;image)


Case:  Mouser - 789-S3A-301210
Connector: Mouser - 568-NYS325  -PS/2 alt: 161-381/6-E
3 LED resistors: 1kohm Mouser - 603-CFR-25JR-521K
3 LEDs: 3mm flat top orange, 2.9v nominal from ebay
USB connector:  "Mini USB Female 5Pin Socket Connector 180Degree" http://cgi.ebay.com/ws/eBayISAPI.dll?ViewItem&item=170588741155 (http://cgi.ebay.com/ws/eBayISAPI.dll?ViewItem&item=170588741155)
spare mini USB cable to destroy
Teensy
loose wire, used old PC case mobo leads (power switch and the like) ~22ga?
JB weld epoxy to hold the USB connector in
2 spare PC screws for AT connector.

The 1k resistors make the orange LEDs a nice indicator brightness.  Yes, I made a sacrificial USB lead to connect to the teensy.
Title: Re: XT/AT/PS2/Terminal to USB Converter with NKRO
Post by: Retrete on Thu, 16 May 2013, 04:16:00

Right, here's a zip of controller stuff, which should be all you need for the moment. You'll also want to get the latest converter zip, for the docs, since the method of loading a config is the same. Then you'll need to load Soarer_Controller_1.2_at90usb1286.hex onto the Teensy++, and then compile (scas) and load (scwr) the kevex.sc config file.

That will set it up to scan the matrix, but it won't be outputting any keys (it would get messy if it happened to spew out random keys!). It will be printing stuff out that can be viewed using hid_listen - if it's basically working you'll see nothing much until you press a key, and a hex code prefixed by either \ (key down) or / (key up). The hex code corresponds to the matrix position of the key - the strobe number first, and the sense number second.

If that all looks good, you can start editing a new config file, replacing all the UNASSIGNED entries with useful HID codes (such as A or SPACE, see the Codes page of the docs). So you press Q, see what the code is, plug Q into the config at the right place. Rinse and repeat!

Oh, the three lines near the end beginning with 'unstrobed' are left shift, right shift and that reset key... but I'm not sure what order. They will have matrix codes of B0, B1 and B2, in that order.

After loading the Hex onto the teensy, opening scar or scwr result in a pop up of less than 1/10 sec. I think that's normal without dropping the sc file, but,dropping it still the same pop up.
If I drop the sc file onto the scaswr I get this message;
(http://oi43.tinypic.com/3165ixw.jpg)
The program also automatically creates a new file, "kevex.sc.scb",is this normal?

Title: Re: XT/AT/PS2/Terminal to USB Converter with NKRO
Post by: Soarer on Thu, 16 May 2013, 05:54:14
Apart from the not found message, that's all as expected. The tools are command line programs. For now, dropping kevex.sc onto scaswr.bat is all you need. The file it creates is the output from scas, and that's good.

For my tools to find the Teensy it should be running my hex. Once the hex is loaded, click the Reboot button (if you're not using the Auto mode) but don't press the reset button again. Then scwr should be able to find it.
Title: Re: XT/AT/PS2/Terminal to USB Converter with NKRO
Post by: Retrete on Thu, 16 May 2013, 15:03:59
No more error! It ends w/o problems;
(http://oi43.tinypic.com/34eaqmw.jpg)
BUT, hid_listen doesn't work, I have touched all the keys and no one respond;
(http://oi41.tinypic.com/3178dxc.jpg)
Title: Re: XT/AT/PS2/Terminal to USB Converter with NKRO
Post by: Soarer on Thu, 16 May 2013, 16:27:51
Hmm, that'a puzzle. It seems that hid_listen has connected OK, just nothing is being printed... which probably means the matrix scanning isn't working. Just to check, have hid_listen open when you drop onto scaswr.bat - stuff should be printed about the config being loaded.

Did you make a ground connection? It probably won't help with most of the matrix scanning, but it's essential for the 3 unstrobed keys.

The only thought on the matrix scanning is that maybe the resistor pack on the sense lines is pulling down instead of up (I expected it to pull up). Could try again after removing it... I mean the whitish thing that looks rather like an IC.
Title: Re: XT/AT/PS2/Terminal to USB Converter with NKRO
Post by: Retrete on Thu, 16 May 2013, 17:30:22
(http://oi44.tinypic.com/2z4yfps.jpg)
I didn't do any ground connection  :confused: , also I have no idea who to ground it, If I remember well you mentioned something about american tape, like this ? http://www.amesasuministros.com/productos/1533971379.jpg

Title: Re: XT/AT/PS2/Terminal to USB Converter with NKRO
Post by: Soarer on Thu, 16 May 2013, 17:43:28
I know it doesn't look like much, but I think that gives me something to go and investigate! It's an error that's preventing the config from being activated on the Teensy. (So maybe leave the resistor pack for now, but I think it will have to be removed eventually).

Making a ground connection can just be with another wire - from one of the GND pins on the Teensy to a ground pin on the keyboard. To find a suitable pin, you'll need to find a pin that is joined to the large area I marked on a previous picture - each of the chips will have at least one, on one of the corner pins of the chip. I think the one with a double circle, most likely...

[attachimg=1]
Title: Re: XT/AT/PS2/Terminal to USB Converter with NKRO
Post by: Soarer on Thu, 16 May 2013, 18:26:10
OK, this .hex should fix that problem. Let's see what the next one is  :))

Title: Re: XT/AT/PS2/Terminal to USB Converter with NKRO
Post by: Retrete on Thu, 16 May 2013, 20:11:46
Now it seems to recognize the keys, but not all.
(http://oi41.tinypic.com/2w35q14.jpg)
(cross ones not working, maybe a soldering issue)
Title: Re: XT/AT/PS2/Terminal to USB Converter with NKRO
Post by: Soarer on Thu, 16 May 2013, 20:24:21
The two shifts and the top-right one won't work until ground is connected.

I'd guess that the other 8 are all on the same strobe line, so yes, quite possibly a soldering/conenction issue there, or maybe a config issue (but I think there's something in the config for every pin you've connected). The first question is, which strobe is it? Looking at the first digit of the codes being printed, which one of 0,1,2,...,8,9,A is missing?
Title: Re: XT/AT/PS2/Terminal to USB Converter with NKRO
Post by: Retrete on Thu, 16 May 2013, 20:40:38
This weekend I will resold the whole teensy, It doesn't deserve his actual look  :p
Title: Re: XT/AT/PS2/Terminal to USB Converter with NKRO
Post by: Soarer on Thu, 16 May 2013, 20:57:23
Be very careful if you do that! It's easy to lift a pad from the Teensy PCB when desoldering :(

The missing code will tell us exactly which wire it is, so really only one needs a little attention. It could be the solder, or maybe the socket at the other end.

But anyway, it's a promising start :D
Title: Re: XT/AT/PS2/Terminal to USB Converter with NKRO
Post by: Retrete on Sat, 18 May 2013, 05:46:57
It was the socket at the end, now all the keys except shifts are working.
I solder the ground pin and tried with the 4 pins marked, no one works. But not only those 3 keys doesn't work, all the rest also fail  :confused:

How I must edit the rawhid.dll?

Thanks!
Title: Re: XT/AT/PS2/Terminal to USB Converter with NKRO
Post by: Soarer on Sat, 18 May 2013, 06:14:06
Fail only when the wire is connected, or still failed with it removed?

Sorry, I meant that you should test with a multimeter to see where is ground! Or if you can see that there is a connection from that ground area to any pin (perhaps not one of the ones I marked).

rawhid.dll?
Title: Re: XT/AT/PS2/Terminal to USB Converter with NKRO
Post by: Retrete on Sat, 18 May 2013, 06:43:38
Fail only with the wire connected. I'll test it with the multimeter.
Quote
If that all looks good, you can start editing a new config file, replacing all the UNASSIGNED entries with useful HID codes (such as A or SPACE, see the Codes page of the docs). So you press Q, see what the code is, plug Q into the config at the right place. Rinse and repeat!
Thats the reason why I mentioned the rawhid.dll, I don't know which file is  :))

One thing I dont understand, this what the hid_listen capture;
(http://oi39.tinypic.com/308gld1.jpg)

Each key must have an individual code? 
Title: Re: XT/AT/PS2/Terminal to USB Converter with NKRO
Post by: Soarer on Sat, 18 May 2013, 06:51:50
Oh, the Soarer Config file... is kevex.sc. It's just a text file.

I think that resistor pack I mentioned needs to come out. It seems to be effectively shorting all the sense lines together, because you should only get one \ and one / per key.
Title: Re: XT/AT/PS2/Terminal to USB Converter with NKRO
Post by: Retrete on Sat, 18 May 2013, 07:18:57
Resistor pack = (http://oi43.tinypic.com/2w6xle8.jpg) ?

Only remove the cilindric ones? Should I cut them?
Title: Re: XT/AT/PS2/Terminal to USB Converter with NKRO
Post by: Soarer on Sat, 18 May 2013, 07:27:35
Nono... only the greeny-white one at the end. It looks like it's in a socket, so remove it like the chips.

[attachimg=1]
Title: Re: XT/AT/PS2/Terminal to USB Converter with NKRO
Post by: Retrete on Sat, 18 May 2013, 10:28:06
Done, now it only show 2 digits  :cool: Now Im trying to find the ground pin
Title: Re: XT/AT/PS2/Terminal to USB Converter with NKRO
Post by: Soarer on Sat, 18 May 2013, 11:03:59
Done, now it only show 2 digits  :cool: Now Im trying to find the ground pin

Cool! The ground might still turn out to be where I thought, since that resistor pack was getting in the way.

Now that the matrix is working, you could add a line to the matrix section of the .sc file to activate the blocking function, because the matrix doesn't have diodes. It can go anywhere, but near the beginning is logical...

Code: [Select]
matrix
    scanrate 1
    debounce 5
    blocking

    sense           PB0         PB1     PB2         PB3     PB4     PB5         PB6         PB7
Title: Re: XT/AT/PS2/Terminal to USB Converter with NKRO
Post by: Retrete on Sat, 18 May 2013, 11:07:50
With the pin connected to the double circle on(top right), the hid listen detect the keys , but shifts and reset still unnoticeable.
I've tested it with the multimeter and the double circle pin with the shift goes to ~0.
Title: Re: XT/AT/PS2/Terminal to USB Converter with NKRO
Post by: Soarer on Sat, 18 May 2013, 12:49:52
Hmm, 'unstrobed' isn't working for me either - I must've broken something in the code :(
Title: Re: XT/AT/PS2/Terminal to USB Converter with NKRO
Post by: Soarer on Sat, 18 May 2013, 13:22:52
And indeed I had - simply hadn't joined up two bits of code...

Title: Re: XT/AT/PS2/Terminal to USB Converter with NKRO
Post by: Retrete on Sat, 18 May 2013, 13:27:25
YES! Shifts and reset keys now working!!!  :p
Later I'll try to map the keys, hope it works

Thanks again! W/o you this wouldn't be possible
Title: Re: XT/AT/PS2/Terminal to USB Converter with NKRO
Post by: Soarer on Sat, 18 May 2013, 13:36:18
Excellent! I'm not sure if you're lucky or unlucky to be the first... anyone else can use all these posts as a guide :D
Title: Re: XT/AT/PS2/Terminal to USB Converter with NKRO
Post by: Retrete on Sat, 18 May 2013, 16:36:35
Hmm, I don't understand pretty well how to config the kevex.sc, for e.g I press the "a" key, hid_listen shows;
\01
/01

Now I go to the kevex.sc, open with the notepad, and see this;
Quote
# Matrix config for kevex ray 7000CM

matrix
   scanrate 1
   debounce 5

   sense         PB0         PB1      PB2         PB3      PB4      PB5         PB6         PB7
   strobe   PD7      UNASSIGNED   UNASSIGNED   UNASSIGNED   UNASSIGNED   UNASSIGNED   UNASSIGNED   UNASSIGNED   UNASSIGNED
   strobe   PE0      UNASSIGNED   UNASSIGNED   UNASSIGNED   UNASSIGNED   UNASSIGNED   UNASSIGNED   UNASSIGNED   UNASSIGNED
   strobe   PE1      UNASSIGNED   UNASSIGNED   UNASSIGNED   UNASSIGNED   UNASSIGNED   UNASSIGNED   UNASSIGNED   UNASSIGNED
   strobe   PC0      UNASSIGNED   UNASSIGNED   UNASSIGNED   UNASSIGNED   UNASSIGNED   UNASSIGNED   UNASSIGNED   UNASSIGNED
   strobe   PC1      UNASSIGNED   UNASSIGNED   UNASSIGNED   UNASSIGNED   UNASSIGNED   UNASSIGNED   UNASSIGNED   UNASSIGNED
   strobe   PC2      UNASSIGNED   UNASSIGNED   UNASSIGNED   UNASSIGNED   UNASSIGNED   UNASSIGNED   UNASSIGNED   UNASSIGNED
   strobe   PC3      UNASSIGNED   UNASSIGNED   UNASSIGNED   UNASSIGNED   UNASSIGNED   UNASSIGNED   UNASSIGNED   UNASSIGNED
   strobe   PC4      UNASSIGNED   UNASSIGNED   UNASSIGNED   UNASSIGNED   UNASSIGNED   UNASSIGNED   UNASSIGNED   UNASSIGNED
   strobe   PC5      UNASSIGNED   UNASSIGNED   UNASSIGNED   UNASSIGNED   UNASSIGNED   UNASSIGNED   UNASSIGNED   UNASSIGNED
   strobe   PC6      UNASSIGNED   UNASSIGNED   UNASSIGNED   UNASSIGNED   UNASSIGNED   UNASSIGNED   UNASSIGNED   UNASSIGNED
   strobe   PC7      UNASSIGNED   UNASSIGNED   UNASSIGNED   UNASSIGNED   UNASSIGNED   UNASSIGNED   UNASSIGNED   UNASSIGNED

   unstrobed -PD0   UNASSIGNED
   unstrobed -PD1   UNASSIGNED
   unstrobed -PD2   UNASSIGNED
end
[/spoiler]

Strobes and PB define the matrix(?) Where I have to put the 01? in which form? 01 A , 0x01 A, 0x04 = 0x01 ?
For e.g;

 
Quote
       unstrobed -PD0   0x058 Reset
   unstrobed -PD1   0x059 LShift
   unstrobed -PD2   0x05A Rshift
?

Title: Re: XT/AT/PS2/Terminal to USB Converter with NKRO
Post by: Soarer on Sat, 18 May 2013, 16:48:05
The thing to enter is a 'Name' from the Codes page of the docs, so for the shifts...

Code: [Select]
    unstrobed -PD1 LSHIFT
    unstrobed -PD2 RSHIFT

The matrix position is worked out from the code such that 00 is top-left, increasing along the first row until 07. Then the second row is from 08 to 0F. Then the 3rd and fourth rows are codes beginning with 1, and so on.

Again, just put a name in each position of the matrix. Many are obvious, so you won't even need to look them up in the Codes list, e.g. A, B, C,... 1, 2, 3, ... F1, F2, F3, ... :D

So if you found that 00=A, 01=B, 02=C, ..., 07=H, then you would enter them in like this:

Code: [Select]
   sense         PB0         PB1      PB2         PB3      PB4      PB5         PB6         PB7
   strobe   PD7  A           B        C           D        E        F           G           H

To give another example, this is the config I made for my mini keyboard:

Code: [Select]
led caps -PC6
led scroll -PC7

matrix
    scanrate 1
    debounce 5

    sense           PB0         PB1 PB2         PB3 PD0 PD1         PD2         PD3
    strobe  PF0     ESC         2   4           5   7   9           MINUS       LCTRL
    strobe  PF1     1           3   UNASSIGNED  6   8   0           BACKSPACE   LGUI
    strobe  PF4     TAB         W   R           T   U   O           LEFT_BRACE  LALT
    strobe  PF5     Q           E   BACKSPACE   Y   I   P           RIGHT_BRACE UNASSIGNED
    strobe  PF6     CAPS_LOCK   S   F           G   J   L           ENTER       RALT
    strobe  PF7     A           D   SPACE       H   K   SEMICOLON   UNASSIGNED  MENU
    strobe  PB6     LSHIFT      Z   C           V   N   COMMA       FN2         RCTRL
    strobe  PB7     FN1         X   UNASSIGNED  B   M   PERIOD      RSHIFT      UNASSIGNED
end
Title: Re: XT/AT/PS2/Terminal to USB Converter with NKRO
Post by: Retrete on Sat, 18 May 2013, 18:32:42
YESSSSSSS! I'll post the good video when finished  :cool: .
Title: Re: XT/AT/PS2/Terminal to USB Converter with NKRO
Post by: Soarer on Sat, 18 May 2013, 19:17:56
Haha, that's fantastic! You're welcome!
Title: Re: XT/AT/PS2/Terminal to USB Converter with NKRO
Post by: poxeclipse on Sat, 18 May 2013, 21:35:08
That's great. I watched it from the beginning, and looks very nice. We can try those Chinese/Japanese IBM keyboards now. Thanks to Soarer & Retrete.
Title: Re: XT/AT/PS2/Terminal to USB Converter with NKRO
Post by: Retrete on Wed, 22 May 2013, 15:23:41
GOOD video  :p
feature=youtu.be
Title: Re: XT/AT/PS2/Terminal to USB Converter with NKRO
Post by: Soarer on Thu, 23 May 2013, 16:00:28
I didn't realise you were going to do that with a screen, and keeping the whole casing... it's very cool indeed!  :cool:
Title: Re: XT/AT/PS2/Terminal to USB Converter with NKRO
Post by: Soarer on Thu, 23 May 2013, 16:18:30
We can try those Chinese/Japanese IBM keyboards now.

Indeed, I should be taking mine apart to see what's what soon.

I'm currently mulling over what options to make available for the first proper controller release - a tricky balance between putting in as much as possible, but nothing that I might want to change later (legacy support is painful)!
Title: Re: XT/AT/PS2/Terminal to USB Converter with NKRO
Post by: Retrete on Tue, 28 May 2013, 06:43:34
Soarer, If I press some keys together(general more than 3) some unpressed keys activate, is this normal ?

Title: Re: XT/AT/PS2/Terminal to USB Converter with NKRO
Post by: Soarer on Tue, 28 May 2013, 07:33:55
Soarer, If I press some keys together(general more than 3) some unpressed keys activate, is this normal ?

Did you forget to add this line to the config file?  ;)

Now that the matrix is working, you could add a line to the matrix section of the .sc file to activate the blocking function, because the matrix doesn't have diodes. It can go anywhere, but near the beginning is logical...

Code: [Select]
matrix
    scanrate 1
    debounce 5
    blocking

    sense           PB0         PB1     PB2         PB3     PB4     PB5         PB6         PB7

Or did I break it? :-[  I did test it once, but probably before the beta3 version.
Title: Re: XT/AT/PS2/Terminal to USB Converter with NKRO
Post by: Retrete on Tue, 28 May 2013, 09:55:45
If I put the "blocking" ;
error at line 6, invalid arguments

Do the "blocking"need to be together something? Or it just go like you wrote it?
Title: Re: XT/AT/PS2/Terminal to USB Converter with NKRO
Post by: Soarer on Tue, 28 May 2013, 10:59:34
Oops, sorry, it needs a 1 after it... blocking 1 :-[
Title: Re: XT/AT/PS2/Terminal to USB Converter with NKRO
Post by: Retrete on Tue, 28 May 2013, 11:08:59
Now compiles w/o problems, but still the same "issue"
Title: Re: XT/AT/PS2/Terminal to USB Converter with NKRO
Post by: tufty on Tue, 28 May 2013, 13:52:57
Soarer - I've not been watching this closely, but if I gather correctly, this is "hardwiring a keyboard matrix to soarer's code", right?

If that's the case, how many keys do you reckon I could handle on a Teensy 2.0 (not a teensy++)?  I'm thinking the ADB circuitry in the M0116 might just go the way of the dodo
Title: Re: XT/AT/PS2/Terminal to USB Converter with NKRO
Post by: Soarer on Tue, 28 May 2013, 14:46:00
Now compiles w/o problems, but still the same "issue"

Found the problem, it was in scas...
Title: Re: XT/AT/PS2/Terminal to USB Converter with NKRO
Post by: Soarer on Tue, 28 May 2013, 14:56:20
Soarer - I've not been watching this closely, but if I gather correctly, this is "hardwiring a keyboard matrix to soarer's code", right?

If that's the case, how many keys do you reckon I could handle on a Teensy 2.0 (not a teensy++)?  I'm thinking the ADB circuitry in the M0116 might just go the way of the dodo

That's right, this will be 'SoarTroller' or whatever  ;D

Number of keys depends on the size of the matrix - especially for a non-NKRO matrix it's quite common to have a few gaps, e.g. so that modifiers don't ghost with anything else. Teensy 2.0 might be enough for the M0116, but perhaps only just - a quick count of lines here (http://deskthority.net/w/images/b/b1/Apple_M0116_circuit_board.jpg) gives maybe 24 (8x16?), which is pushing it and leaves no room for LEDs.
Title: Re: XT/AT/PS2/Terminal to USB Converter with NKRO
Post by: Fawksie on Tue, 28 May 2013, 17:43:06
Another satisfied customer, thanks Soarer :)

This is a 1986 Model M 122-Key Typewriter Keyboard. A few months older than me.

[attach=2]

Wiring isn't particularly well thought out. I could have made it much neater looking with some more effort and willpower. No-one can see it in a box anyway! Spare pins on the 10 pin connector are for lock LEDs.

[attach=1]

More photos (http://imgur.com/a/n65rf)
Title: Re: XT/AT/PS2/Terminal to USB Converter with NKRO
Post by: Retrete on Tue, 28 May 2013, 20:03:53
Now compiles w/o problems, but still the same "issue"

Found the problem, it was in scas...

Now it detect even less keys  :( , muuuuuch slower when I press more than 2, but I think Im making some part of the process wrong, steps I did;

- Open teensy.exe , load hex and reboot
- Drop kex.sc (already mapped config) to new scas.exe
- kex.sc.scb created , load into scwr.exe
- Open keyboard tester

The problem now is the first part, I need to press the reset button and opening again the case its like a nightmare, is there a way to avoid pressing the key?
Dropping kex.sc now result in the 1/10 sec screen and no kex.sc.scb created.

Does the scaswr.bat depends of the actual scas.exe and scwr.exe on the folder?
Also observed,  If I remove the blocking 1, while having the same issue Im able to press much more keys.
Title: Re: XT/AT/PS2/Terminal to USB Converter with NKRO
Post by: Soarer on Tue, 28 May 2013, 20:54:02
Now compiles w/o problems, but still the same "issue"

Found the problem, it was in scas...

Now it detect even less keys  :( , muuuuuch slower when I press more than 2, but I think Im making some part of the process wrong, steps I did;

- Open teensy.exe , load hex and reboot
- Drop kex.sc (already mapped config) to new scas.exe
- kex.sc.scb created , load into scwr.exe
- Open keyboard tester

The problem now is the first part, I need to press the reset button and opening again the case its like a nightmare, is there a way to avoid pressing the key?
Dropping kex.sc now result in the 1/10 sec screen and no kex.sc.scb created.

Does the scaswr.bat depends of the actual scas.exe and scwr.exe on the folder?
Also observed,  If I remove the blocking 1, while having the same issue Im able to press much more keys.

This will annoy you... you didn't need to reset the Teensy :(
It only needs to be reset to load a new firmware (.hex).
And double-clicking scboot.exe will reset it, if my firmware is running. (It can sometimes take a while for the Teensy loader to find the Teensy after that, but only some seconds).

scaswr.bat simply runs scas.exe and then scwr.exe - those exes need to be in the same folder as it.

Droppping a .sc file onto scas.exe will just print an error message and disappear in a split second.

Dropping a .scb onto scwr.exe should work, but again it will disappear in a split second so you won't see if it has worked.

Both of those are command line utilities, so use scaswr.bat if you want to just drop the .sc file.

I admit that the blocking function is a bit severe - perhaps it could pass a few more keys in certain circumstances. I'll probably work on that once I've hooked up a non-NKRO matrix myself.

The slowness sounds like a problem - what sort of slow are we talking about?
Title: Re: XT/AT/PS2/Terminal to USB Converter with NKRO
Post by: Soarer on Tue, 28 May 2013, 20:58:50
Another satisfied customer, thanks Soarer :)

Very nice build! The wiring looks pretty neat to me :D
Title: Re: XT/AT/PS2/Terminal to USB Converter with NKRO
Post by: Retrete on Wed, 29 May 2013, 05:22:53
Blocking 1 doesn't activate non pressed keys,but If I try pressing near keys of the already pressed it doesn't work.
Blocking 1: no pression error and works well with non near keys
No blocking: pression error but all keys working.

Title: Re: XT/AT/PS2/Terminal to USB Converter with NKRO
Post by: Soarer on Wed, 29 May 2013, 06:54:43
Unfortunately, those are the options when the matrix doesn't use diodes to prevent the erroneous key presses :(

I might be able to improve it, but only slightly - are there combinations that you want to use that are prevented with blocking 1, but work fine without it and with no erroneous key presses?
Title: Re: XT/AT/PS2/Terminal to USB Converter with NKRO
Post by: Retrete on Wed, 29 May 2013, 07:12:05
No no, It doesn't matter, it works fine now. I don't press more than 2 or 3 keys at the same time, and the normal 3 or 4 keys combos on shooters works fine.
No more fail clicks  :p
Thanks a lot for your help!
Title: Re: XT/AT/PS2/Terminal to USB Converter with NKRO
Post by: Soarer on Wed, 29 May 2013, 07:40:11
OK, cool! Any combination of two keys should work, but there will be cases where a third key gets blocked. The shift keys are never blocked because they have their own connections, but whatever you've mapped for controls and alts count towards blocking, since they are part of the matrix. Worst case, something like ctrl-alt-del might not work!
Title: Re: XT/AT/PS2/Terminal to USB Converter with NKRO
Post by: tufty on Wed, 29 May 2013, 11:06:09
Soarer - I've not been watching this closely, but if I gather correctly, this is "hardwiring a keyboard matrix to soarer's code", right?

If that's the case, how many keys do you reckon I could handle on a Teensy 2.0 (not a teensy++)?  I'm thinking the ADB circuitry in the M0116 might just go the way of the dodo

That's right, this will be 'SoarTroller' or whatever  ;D

Number of keys depends on the size of the matrix - especially for a non-NKRO matrix it's quite common to have a few gaps, e.g. so that modifiers don't ghost with anything else. Teensy 2.0 might be enough for the M0116, but perhaps only just - a quick count of lines here (http://deskthority.net/w/images/b/b1/Apple_M0116_circuit_board.jpg) gives maybe 24 (8x16?), which is pushing it and leaves no room for LEDs.
Well, LEDs I can live without.  There's no LEDs on the board right now, after all :)

And if I were to bin the circuit board and hardwire my own NKRO matrix with diodes and all the works? Yes, that would really make it a custom keyboard in a retro case.  I think I could probably get away with doing so; the switches are plate-mounted, so the PCB isn't doing much structurally, right?

Alternatively, I suppose I could get back to hacking on Hasu's code to improve the ADB side of things.
Title: Re: XT/AT/PS2/Terminal to USB Converter with NKRO
Post by: Soarer on Wed, 29 May 2013, 12:02:15
Some plates are pretty flimsy, and/or don't hold the switches firmly, so you'd need to check. You could still use the PCB as structure, just cut lots of tracks - you might be able to leave all the column (or row) tracks as they are, and just isolate the other side of each switch so you can add in a diode and rewire just the rows (or columns).
Title: Re: XT/AT/PS2/Terminal to USB Converter with NKRO
Post by: Retrete on Sun, 02 June 2013, 19:35:53
I have accidentaly broke one of the pin sockets of the teensy, this one;
(http://oi40.tinypic.com/e5iuch.jpg)
Is it possible to reconect it to another free-socket of the teensy? maybe D6?

Title: Re: XT/AT/PS2/Terminal to USB Converter with NKRO
Post by: Soarer on Sun, 02 June 2013, 19:52:49
:(

Yep, just rewire it to another pin. But not PD6, since it has the onboard LED attached to it already. PD5 would be fine, for example.

Then reconnect the USB, change the config file to match the new pin, drop it on scaswr... and it should work!

The only reason I picked out the current set of pins was to keep the wiring simple :)
Title: Re: XT/AT/PS2/Terminal to USB Converter with NKRO
Post by: Retrete on Mon, 03 June 2013, 03:28:28
PD5,PD4 or PD3 also doesn't work, but PD7 (already asigned to a column) works, could it be the hex loaded onto the teensy?
Title: Re: XT/AT/PS2/Terminal to USB Converter with NKRO
Post by: Soarer on Mon, 03 June 2013, 03:40:20
Did you edit your .sc to change the relevant strobe line, and load it back on?

I used those 3 pins for LEDs on the converter, so maybe there is a bug and they're not fully disabled. Any of the PF pins wouldn't be affected by such a bug, so you could try one of those. Otherwise I'm pretty sure the .hex is OK.
Title: Re: XT/AT/PS2/Terminal to USB Converter with NKRO
Post by: Retrete on Mon, 03 June 2013, 03:53:21
Im testing it with original kevex.sc (nothing mapped) and the HID listen, and it reports nothing  :confused:
Title: Re: XT/AT/PS2/Terminal to USB Converter with NKRO
Post by: Soarer on Mon, 03 June 2013, 06:38:48
You'll need to change the line that starts 'strobe PC7' to start 'strobe PF7', or whichever pin you use.
Title: Re: XT/AT/PS2/Terminal to USB Converter with NKRO
Post by: Retrete on Mon, 03 June 2013, 12:14:16
Oh, I feel 100% retard  :D

Thanks!Working again
Title: Re: XT/AT/PS2/Terminal to USB Converter with NKRO
Post by: Soarer on Mon, 03 June 2013, 13:52:40
Good!

(Not the retard part, the working again part)!
Title: Re: XT/AT/PS2/Terminal to USB Converter with NKRO
Post by: Retrete on Mon, 03 June 2013, 19:40:05
Soarer, do you know If the Model M 122 key which uses an (rj45?) connector could be  teensied?
Some pics;
(http://oi41.tinypic.com/2rf3afl.jpg)
(http://oi43.tinypic.com/majp12.jpg)

Also, If you want one, its yours  :cool: .

 BUT,you have to pay the shipment, or come to Madrid  :p
Title: Re: XT/AT/PS2/Terminal to USB Converter with NKRO
Post by: Soarer on Tue, 04 June 2013, 07:42:35
Thanks :D But actually I already have one! It works fine through my converter - the signals and codes are the same as for the 122-key with the 240 degree DIN connector. The pinout details are in the OP and the docs - you could make an adapter, replace the connector, or just wire it direct to the Teensy :cool:
Title: Re: XT/AT/PS2/Terminal to USB Converter with NKRO
Post by: Retrete on Tue, 11 June 2013, 21:41:48
I will "waste" the teensy with a 1986 Ibm model F 122key.
The strange thing is that I don't find anything related to his code number,
(http://oi39.tinypic.com/m8lmc4.jpg)

And the other part that no one mention;
(http://oi40.tinypic.com/2cx832c.jpg)

It uses this type of connection;
(http://www.kbdbabel.org/conn/kbd_connector_ibm3179_318x_319x.png)

Any ideas?
Thanks in adavance!
Title: Re: XT/AT/PS2/Terminal to USB Converter with NKRO
Post by: Soarer on Wed, 12 June 2013, 15:40:27
Hmm... looks like an M to me, since it has a white underside. The last couple of digits of the model number are usually what varies depending on the key legends for different countries - try searching for 1390401 instead.

DIP switches, or jumpers on some, are only used to set the keyboard ID, and don't affect the function at all.

Everything I've seen with that connector speaks scan code set 3, and sends a unique code for each key :D
Title: Re: XT/AT/PS2/Terminal to USB Converter with NKRO
Post by: connection on Wed, 12 June 2013, 18:00:03
Hello,
Thanks for this great piece of software! I have 15 old terminal Model M:s, and I've now converted most of them into USB by gluing Teensies inside the keyboards, and placing the mini USB connector directly at the back of the keyboard.

However, I have encountered a problem using the full USB HID mode in Linux, where everything works great, except for the delete key, that doesn't repeat when being held down. In hid_listen everything looks as it should, but somewhere along the way the key repeat doesn't work. I'm not sure if it's a bug in the converter software, in the Teensy hardware, or in the Linux kernel. Everything works fine using the USB boot mode, but as the default is to use the HID mode when available, it would be nice to get some hint on where the fault lies.

When running
Code: [Select]
/lib64/udev/keymap -i /dev/input/event2 on a Gentoo machine with 3.9.4 vanilla Linux kernel, hidraw/hid-generic driver and udev-204, i get this message when pressing delete:
Code: [Select]
driver did not send SYN event in between key events; previous event:
scan code: 0x7004C   key code: delete

All other keys work fine, without any error output, and everything works fine in the USB boot mode in Linux, and also in Windows and OSX. For Windows and OSX, I'm however a bit unsure whether they use the boot mode, or the full HID mode. The other USB keyboards that I tried in Linux seemed to use the boot mode.
Title: Re: XT/AT/PS2/Terminal to USB Converter with NKRO
Post by: Soarer on Wed, 12 June 2013, 18:43:49
Oh yeah... I'm seeing that on Linux Mint 14 MATE 32-bit as well. Maybe it is another Linux bug! :p

Generally BIOSs use boot mode and OSs use full mode, which holds true for Windows, Linux and OS-X.
PS3 just pretends to have a HID stack :'(

The last Linux bug I had to workaround (http://geekhack.org/index.php?topic=17458.msg339706#msg339706) was its handling of the backslash and europe_1 codes. This seems somewhat similiar, since whenever I press some key while delete is held, I also get a delete!

But which other code is it confused with this time? There's no obvious candidate, is there?
Title: Re: XT/AT/PS2/Terminal to USB Converter with NKRO
Post by: Retrete on Wed, 12 June 2013, 20:07:43
Hmm... looks like an M to me, since it has a white underside. The last couple of digits of the model number are usually what varies depending on the key legends for different countries - try searching for 1390401 instead.

DIP switches, or jumpers on some, are only used to set the keyboard ID, and don't affect the function at all.

Everything I've seen with that connector speaks scan code set 3, and sends a unique code for each key :D

Today I opened it and this is what I've found, no model F?  :eek:
http://imgur.com/a/jtYz1

The rarest model M is mine  :p
Title: Re: XT/AT/PS2/Terminal to USB Converter with NKRO
Post by: Soarer on Wed, 12 June 2013, 20:47:42
Definitely an M - you can see the membrane! IBM made two versions of the early 122-keys (with square label and 'hat' keys in alt and ctrl positions) -  some F, some M. The easiest way to tell them apart is the colour underneath - black metal for F, white plastic for M. They look identical from above :-\
Title: Re: XT/AT/PS2/Terminal to USB Converter with NKRO
Post by: Soarer on Wed, 12 June 2013, 22:09:20
But which other code is it confused with this time? There's no obvious candidate, is there?

Ah-ha! Someone (https://github.com/torvalds/linux/commit/437f3b199c437e2a9ac01b9ab733c78e5fc7c720) has made exactly the same mistake again :'(

The boot mode (http://lxr.free-electrons.com/source/drivers/hid/usbhid/usbkbd.c) handling is fine for Delete - there's only one entry in that table with the code 111, at position 0x4C (the HID code for Delete).

Since v3.0, the full mode (http://lxr.free-electrons.com/source/drivers/hid/hid-input.c?v=3.0) has two entries with code 111, the other is 'Clear' (HID code 0x9C). v2.6.39 (http://lxr.free-electrons.com/source/drivers/hid/hid-input.c?v=2.6.39) didn't have that entry.

Not sure how Linux should be fixed, but certainly the current method of combining two input codes to one event code is insufficient. It could either pass unique event codes to the next stage, or handle the combination with specific code at the driver level - it just needs to be an 'or' of the keys, I think, but in the driver doesn't seem to be the right place to do it!

I guess I'll just have to work round it again, by removing the 'Clear' entry from my NKRO report :mad:
Title: Re: XT/AT/PS2/Terminal to USB Converter with NKRO
Post by: connection on Thu, 13 June 2013, 14:21:24
Yes, that actually seems to be a bug in the kernel. If a keyboard has a Clear key, it should give a separate keycode from Delete all the way to the userland. If a buggy keyboard sends Clear instead of Delete, it's that keyboard that should be fixed, and not replacing the standard code in the kernel to make it work. To me, this sounds like it might be worth sending in a kernel bug report, although those always take a long time to get fixed in cases like this.

I looked into the rest of the kernel translation table, and compared to Microsoft's Microsoft's HID code list (http://download.microsoft.com/download/1/6/1/161ba512-40e2-4cc9-843a-923143f3456c/translate.pdf), and I found out that the kernel even has three HID codes that translates to 111: 4C (Delete), 9C (Clear), and D8 (Reserved). There's also some other duplicates, that translate reserved keycodes to standard ones, like 7E/F4 -> 136, 7F/EF -> 113, 80/ED -> 115, and 81/EE -> 114. There's also the 31/32 -> 43 (\ / Europe 1), that you mentioned that you've fixed before, where the kernel behavior however might be correct, as they had the same keycodes in PS/2.

On the other hand; even though it seems wrong to do translations like this in the kernel for standard keyboards, a really large keyboard, with more than 255(?) keys, could in theory have two keys that would translate to the same keycode with the standard driver, and where the users then could add a custom kernel driver to get the full functionality. For these cases, this kind of behavior from the kernel driver might come up in more cases in the future. I don't know how you send your keypresses and then clear them, when they're not pushed down any longer, but it might be worth checking if you could change your code to assume that the host is "buggy" like this for all the keys.
Title: Re: XT/AT/PS2/Terminal to USB Converter with NKRO
Post by: Soarer on Thu, 13 June 2013, 16:06:24
My converter's NKRO report just has a bit for each HID code, in numeric order. So as the driver scans through it, it first finds the pressed 'Delete' code and sends an event, then finds the unpressed 'Clear' code and sends another event. Clearly this is unexpected to some other bit of code, which complains about the lack of SYN! (Whatever that is...).

So the only way to work around it is to make my converter only send one of the codes that have duplicated event codes :(  It's no great loss, but key codes that are otherwise ignored by OSs can be handy if you want to trigger some macro software with them.

The reserved codes don't cause a problem, because my converter doesn't try to send them anyway. No idea what device those mappings were put in for... the change was so long ago that it predates a big code reorg in 2006 (https://github.com/torvalds/linux/commit/dde5845a529ff753364a6d1aea61180946270bfa)!

Fixing it within the driver level would at least keep the fix fairly self-contained, with less chance of unintended consequences. Browsing around the code, I can't figure out why it is sending an event for the Clear code, since it hasn't changed... surely an event should only be generated when the state of something changes?! hid_input_field (http://lxr.free-electrons.com/source/drivers/hid/hid-core.c#L1057) seems to be where state changes are turned into events, calling hid_process_event and then hid_input_event. I dunno though!
Title: Re: XT/AT/PS2/Terminal to USB Converter with NKRO
Post by: Soarer on Thu, 13 June 2013, 18:29:16
v1.12 added to the first post, which should make Delete work correctly again on v3.x Linux kernels :D
Title: Re: XT/AT/PS2/Terminal to USB Converter with NKRO
Post by: connection on Fri, 14 June 2013, 08:53:52
I've upgraded to v1.12 now, and now the delete repeating works as supposed to, and I haven't noticed any weird side effects. Thanks!

What would happen with your code now if the kernel developers suddenly decides to create even more duplicated event codes of some other key (like adding an extra Enter key code as A0/Out)?

The missing SYN error might have come from the driver, and not from your the data that the converter transfers. The keymap tool is an extra feature in udev for parsing the kernel driver output. A comment about the SYN parsing from the code (http://cgit.freedesktop.org/systemd/systemd/plain/src/udev/keymap/keymap.c):
Code: [Select]
/* Drivers usually send the scan code first, then the key code,
 * then a SYN. Some drivers (like thinkpad_acpi) send the key
 * code first, and some drivers might not send SYN events, so
 * keep a robust state machine which can deal with any of those
 */
Title: Re: XT/AT/PS2/Terminal to USB Converter with NKRO
Post by: fohat.digs on Fri, 14 June 2013, 09:45:40
v1.12 added to the first post, which should make Delete work correctly again on v3.x Linux kernels :D

I think I am running v1.1 from several months ago, are there important changes recently?
Title: Re: XT/AT/PS2/Terminal to USB Converter with NKRO
Post by: Soarer on Fri, 14 June 2013, 09:48:44
I've upgraded to v1.12 now, and now the delete repeating works as supposed to, and I haven't noticed any weird side effects. Thanks!
Great!

What would happen with your code now if the kernel developers suddenly decides to create even more duplicated event codes of some other key (like adding an extra Enter key code as A0/Out)?
I'd have to remove Out from the report as well :( It's a pain because each one of these grows the descriptor by 22 bytes, which might cause its own problem at some point. I'll just have to keep an eye on that table for now, until I can think of a good way to phrase a bug report such that it gets some action (if they see it as just one DIY project that's acting up, it won't get fixed!).

The missing SYN error might have come from the driver, and not from your the data that the converter transfers. The keymap tool is an extra feature in udev for parsing the kernel driver output. A comment about the SYN parsing from the code (http://cgit.freedesktop.org/systemd/systemd/plain/src/udev/keymap/keymap.c):
Code: [Select]
/* Drivers usually send the scan code first, then the key code,
 * then a SYN. Some drivers (like thinkpad_acpi) send the key
 * code first, and some drivers might not send SYN events, so
 * keep a robust state machine which can deal with any of those
 */
I see, so the SYN error is clearly secondary. It's still a useful flag that things have gone wrong though, since the HID keyboard driver normally sends it. Tracking down the 'if' that stops it being sent might give another clue!

Hmm. There might be multiple ways to fix the problem... I'm still not sure exactly what the problem is though, apart from being related to those duplicated codes. I think I might have been wrong about where state changes are converted to events - the bits of my report are flagged as 'variable', which appears to be handled differently (with no obvious comparison to previous state in hid_input_field). Maybe it's even after the lookup table is used, which would make sense given the observed behaviour.
Title: Re: XT/AT/PS2/Terminal to USB Converter with NKRO
Post by: Soarer on Fri, 14 June 2013, 09:52:13
v1.12 added to the first post, which should make Delete work correctly again on v3.x Linux kernels :D

I think I am running v1.1 from several months ago, are there important changes recently?


Since you're not running Linux, not using an RT keyboard, and don't have any problems with your BIOS - I'd say stick with v1.1 :D
Title: Re: XT/AT/PS2/Terminal to USB Converter with NKRO
Post by: poxeclipse on Sun, 16 June 2013, 09:16:26
Question:
Is it possible to transplant the electronics part of a Model F which has a known protocol to a Model F with an old protocol ?
For instance, to transplant from an F-122, or XT, to a 3178 Model F.
Title: Re: XT/AT/PS2/Terminal to USB Converter with NKRO
Post by: Soarer on Sun, 16 June 2013, 14:54:02
I really don't know!

The XT controller is built onto the main PCB, so you'd have to saw it off!

A 122-key F controller might be a better bet, BUT...

The replacement would have to have at least as many strobes (columns) AND at least as many senses (rows) as the original.

There's at least two kinds of capacitive sensing chip - one with 4 channels and one with 8. The 122 has the 8-channel version, I've no idea what the 3178 has. The ones that use the 4-channel sense have twice as many strobes.

The ROM on the replacement would need to output a code for each key. (The 122-key can output a code for all (or all but one?) of its key positions, so unlikely to be a problem with that one).

Most IBM controller ROMs have a table that adjusts the sensitivity of the sensing for each key - these wouldn't necessarily be the same for different keyboards, in fact most likely different. So it might be unreliable.
Title: Re: XT/AT/PS2/Terminal to USB Converter with NKRO
Post by: fohat.digs on Fri, 05 July 2013, 09:51:56
I'm back. I have been worrying with this problem off and on for at least 6 months. I have a couple of XTs that I want to test and sell, but they won't perform for me.

I have an outboard Teensy with a variety of plugs and adapters XT-to-AT then AT-to-PS2, PS2 hard-wired to the Teensy.

The keyboards act dead and do not register anything, except when I plug everything up, start hid_listen, and hot-plug the USB I get this:

then nothing else.

What is the 05 error, and is it a wiring mix-up? Thanks!
Title: Re: XT/AT/PS2/Terminal to USB Converter with NKRO
Post by: Soarer on Fri, 05 July 2013, 10:18:10
XT-to-AT? They're the same!

Normally I'd say clock and data swapped for R05, but then you'd get errors with each key press too.

Does the converter work OK with a PS/2 keyboard?
Title: Re: XT/AT/PS2/Terminal to USB Converter with NKRO
Post by: fohat.digs on Fri, 05 July 2013, 14:26:38
Soarer, as always, you da man.

Even when you don't solve my problems directly, you set me on the path to finding and fixing them myself.

There was one problem in my wiring, as I had added pull-up resistors after the fact, and one of those legs was wrong.

But the real underlying problem was a bad PS2 socket! My female pigtail to the Teensy was the end of a male-female PS2 extension cord which I had chopped off and attached to the Teensy. Apparently, at least one of the contacts inside was bad and was hardly, if ever, making contact with the pin from the male plug on the keyboard cable. I have soldered a straight (sewing) pin onto one probe of my tester, so it was probably going in deep enough, while the proper pin was not.

I found a female AT socket and pigtail from an old AT-to-PS2 connector (you were right of course, I listed too many connections in my earlier post - looking at the snakepit on my desk is confusing) and took that to the Teensy.

That worked and so did both of the XTs. Since I will probably not need a female PS2 pigtail to the Teensy anyway, I will leave it with the female AT socket. I have enough adapters to get by, although I have not yet built a female-RJ45-to-male-AT yet.

Thank you, sincerely, as always! Harry
Title: Re: XT/AT/PS2/Terminal to USB Converter with NKRO
Post by: Soarer on Fri, 05 July 2013, 17:11:33
Ah, good! That's just bad luck with that connector... would've been tough for me to figure that one out remotely, so I'm glad you did!
Title: Re: XT/AT/PS2/Terminal to USB Converter with NKRO
Post by: finaltheorem on Sat, 13 July 2013, 23:51:18
Hi Soarer, and everyone.  Just wanted to say thank you for putting this out for everyone to use :)  Very useful, and much easier than someone lacking experience with such things might assume.  I just finished putting together a "quick and dirty" implementation of Soarer's tool and I'm really a complete newb when it comes to wiring/soldering.  It worked first try  :D  I've got my inexpensive terminal keyboard hooked up to the Teensy 2.0 now and it's working great!
[attach=1]
Title: Re: XT/AT/PS2/Terminal to USB Converter with NKRO
Post by: Soarer on Mon, 15 July 2013, 06:51:51
Excellent... heatshrink is a nice touch! :D

One thing: the blue wire you've got going to PB7 should go to ground instead, it's the shield for the cable. (Actually, it needn't be connected at all usually, the other ground is used to to ground the metal parts inside the case).
Title: Re: XT/AT/PS2/Terminal to USB Converter with NKRO
Post by: finaltheorem on Mon, 15 July 2013, 08:09:45
Excellent... heatshrink is a nice touch! :D

One thing: the blue wire you've got going to PB7 should go to ground instead, it's the shield for the cable. (Actually, it needn't be connected at all usually, the other ground is used to to ground the metal parts inside the case).

Ahh, thanks for information!  I was confused about that one since the wire was about twice as thick as the rest.  At least I didn't burn up the teensy by incorrectly guessing where it should go. 

I've got a nicer copy of this board (with all the keycaps) and I don't want to lop the connector off that one.  I'm going to use a keystone jack to convert RJ-45 to PS/2 male, so I'll make sure I splice those two (the white ground and black ground) together to the ground. 

Thanks again  ;D
Title: Re: XT/AT/PS2/Terminal to USB Converter with NKRO
Post by: Retrete on Mon, 15 July 2013, 08:38:59
Hi! A few questions before I teensy the 122 M;
(http://oi43.tinypic.com/70evlj.jpg)
Is the red circle a ground connection?

I'm planning to install the teensy inside the case (plastic) , could I just glue it?
Thanks in advance!

Title: Re: XT/AT/PS2/Terminal to USB Converter with NKRO
Post by: Soarer on Mon, 15 July 2013, 09:44:24
Yup, that's a ground connection. There's clearly a PCB trace between that and the ground on the connector though, so there's no need to connect both!

Hot glue might work OK and still be removable without damaging the Teensy. Or double-sided sticky foam tape. Or maybe there's somewhere you could cable-tie the Teensy to?
Title: Re: XT/AT/PS2/Terminal to USB Converter with NKRO
Post by: Retrete on Mon, 15 July 2013, 12:15:37
Before trying to install it, where should I connect each? (http://oi44.tinypic.com/dc818w.jpg)

Thanks again soarer
Title: Re: XT/AT/PS2/Terminal to USB Converter with NKRO
Post by: Soarer on Mon, 15 July 2013, 14:53:47
From fohat's crib sheet...

[attachimg=1]

So like this...

[attachimg=2]
Title: Re: XT/AT/PS2/Terminal to USB Converter with NKRO
Post by: fohat.digs on Mon, 15 July 2013, 16:20:30
From fohat's crib sheet...

What! I thought that I had gotten that from you!
Title: Re: XT/AT/PS2/Terminal to USB Converter with NKRO
Post by: Soarer on Mon, 15 July 2013, 16:27:26
From fohat's crib sheet...

What! I thought that I had gotten that from you!


The pic of the label could well be mine, but not the other - easier to understand - diagram :D
Title: Re: XT/AT/PS2/Terminal to USB Converter with NKRO
Post by: Glod on Mon, 15 July 2013, 19:25:36
another satisfied customer!, this is extremely easy to assemble, especially considering i am just doing ps/2


here is my sad attempt at making a minimalist converter for ps/2. used the female end of a ps/2 extension cable.
(http://farm6.staticflickr.com/5350/9294663103_2ca844fb36_n.jpg) (http://www.flickr.com/photos/panicfx/9294663103/)

(http://farm6.staticflickr.com/5458/9297438640_9f424024b0_n.jpg) (http://www.flickr.com/photos/panicfx/9297438640/)

(http://farm6.staticflickr.com/5537/9294665921_b8886d89f0_n.jpg) (http://www.flickr.com/photos/panicfx/9294665921/)


it is ugly but eh it works so i am not complaining

Title: Re: XT/AT/PS2/Terminal to USB Converter with NKRO
Post by: finaltheorem on Thu, 18 July 2013, 11:28:15
I’m afraid I may have done something a bit stupid while trying to restore a badly corroded IBM 5150 XT board.  I separated the front and rear plates that sandwich the PCB, cleaned the corrosion off with sandpaper, then spray painted both the front and back plates (including the side of the rear plate that contacts the PCB).  I used silver paint which presumably has metal flakes in it, in case that’s relevant. The piece of foam between the front plate and the switch barrels was badly degraded, and when I washed it (to get rid of a musty odor) I believe it may have lost some of its density/thickness. 

Now when I plug it into the converter I get no output from typing on AquaKeyTest.  HID_listen shows no output when pressing most keys, but does give error codes (r00 or r80) when pressing some keys on the bottom row.  When I pick up the PCB housing I get a continuous stream of error codes, with occasional (seemingly valid) key codes mixed in.  Despite these valid codes being mixed in with the error codes, no key presses register while this is happening.

I know the board worked before I attempted this “restoration” because I tested every key beforehand.  Also, I have a second identical board that I haven’t taken apart yet which still works fine with the converter.  Now, I’m stuck wondering what I’ve done to screw this up.  Does anyone know whether these symptoms could be caused by the foam layer being too thin, or is it more likely I shouldn’t have painted the back plate?  I know it’s not related to Soarer’s converter, but for some reason I thought this might be a good place to ask.
Title: Re: XT/AT/PS2/Terminal to USB Converter with NKRO
Post by: fohat.digs on Thu, 18 July 2013, 12:28:51
I am sorry, I guess that I did not answer your previous question quickly enough.

The "foam mat" has a foam side and a rubber "skin" side I would call it. The foam deteriorates and falls off, leaving a very thin skin.

I have re-used partially deteriorated thin ones which worked OK, but, unlike the M, that foam mat is an actual "bedding" material that helps hold the barrels (aka chimneys) in place in both directions. However, I doubt that is enough to keep it from working at all. You may be right about the paint making some sort of electrical interference.

My recommendation is to cut a new foam pad, you will need that for sure. If that doesn't fix it, strip the paint from the inside of the plate.
Title: Re: XT/AT/PS2/Terminal to USB Converter with NKRO
Post by: Retrete on Thu, 18 July 2013, 16:13:52
122 M works nice! I'll post some pics in a few days, right now I'm using a standar mini usb cable and this keyboard deserves a better one  :p

Thanks again Soarer! Remember that If you want an extra 122 M I have one here with your name  :cool:


 
Title: Re: XT/AT/PS2/Terminal to USB Converter with NKRO
Post by: finaltheorem on Thu, 18 July 2013, 17:31:38
Thanks fohat, and no need to apologize, of course.  I always tend to venture off and make expensive mistakes – it’s how I learn  :))

In this case everything turned out well though. I figured I would try the simplest solution first and added a sheet of paper between the PCB and the rear plate that I painted and everything was working again.  I can’t say for sure whether this is a result of the paper or just some other little thing that was fixed by disassembly/reassembly, but in the future I’ll avoid painting the metal behind the PCB.  I'm saving the foam mat replacement for another day - I've had enough of disassembling and reassembling Model F's for a while.
Thanks for your help :)
Title: Re: XT/AT/PS2/Terminal to USB Converter with NKRO
Post by: fohat.digs on Thu, 18 July 2013, 19:58:27
Thanks fohat, and no need to apologize, of course.  I always tend to venture off and make expensive mistakes – it’s how I learn  :))

In this case everything turned out well though. I figured I would try the simplest solution first and added a sheet of paper between the PCB and the rear plate that I painted and everything was working again.  I can’t say for sure whether this is a result of the paper or just some other little thing that was fixed by disassembly/reassembly, but in the future I’ll avoid painting the metal behind the PCB.  I'm saving the foam mat replacement for another day - I've had enough of disassembling and reassembling Model F's for a while.
Thanks for your help :)


The small ones are much easier to get back together than the big boys, but those clamps that I show in my guide make it A LOT easier.

A sheet of mylar or sturdy plastic would probably be preferable to paper as a separator.
Title: Re: XT/AT/PS2/Terminal to USB Converter with NKRO
Post by: fohat.digs on Sun, 21 July 2013, 19:11:43
I need a female connector for a terminal keyboard. I have built the outboard Teensy converter, and I have various adapters for different plugs, except for the terminal connection.

It seems to be the same configuration as an ethernet plug, I have an old Intel 10/100 socket on its pigtail that the plug from an M-122 seems to fit snugly. (I don't have an actual M-122 any more, but I have the cord, and I am just testing for continuity.) I can get a signal through for 5V and ground, but clock and data do not seem to be touching anything.

I know that the specific plug is 8P5C. Does that mean I need a specific female 8P5C? I was assuming that I could connect whichever of the 8 I needed and ignore the rest of them. Is that not true?

If not, what female connector do I need? I would prefer a beige or gray one on a pigtail, but, whatever.

Thanks!

edit   - the keyboard cord tested OK. I think that the 10/100 socket may be bad. some wires seem dead. more later
edit 2 - I had a similar socket (branded IBM) and the same thing happened - signal on 5V and ground but not data or clock

Are these connections prone to failure? Perhaps this is what I get for diving into the junk drawer.

edit 3 - this seems ludicrous, but I think I have a female-RJ45-to-USB-male connector. I could go from the back of the USB to a PS2 couldn't I? That would really be going around Robin Hood's barn, but might it work? Are 5V, ground, data, and clock always in the same place? Otherwise I could cut a USB cable and cross it over wherever I needed.

Title: Re: XT/AT/PS2/Terminal to USB Converter with NKRO
Post by: Soarer on Sun, 21 July 2013, 19:48:46
Does it have 8 wires?

Quote
10BASE-T and 100BASE-TX only require two pairs to operate, located on pins 1 plus 2 and pins 3 plus 6.

Unfortunately, not the ones we want!

So, if it only has those four, you'd have to open it up and see if you can rewire it - it possibly has a fairly generic breakout PCB insde. If it can't be opened, buying an ethernet extension cable might be the easiest way to get a pigtail.
Title: Re: XT/AT/PS2/Terminal to USB Converter with NKRO
Post by: fohat.digs on Sun, 21 July 2013, 19:58:44
Does it have 8 wires?

Quote
10BASE-T and 100BASE-TX only require two pairs to operate, located on pins 1 plus 2 and pins 3 plus 6.

Unfortunately, not the ones we want!

So, if it only has those four, you'd have to open it up and see if you can rewire it - it possibly has a fairly generic breakout PCB insde. If it can't be opened, buying an ethernet extension cable might be the easiest way to get a pigtail.

OK, that is borne out by my experiment. Even though it looks like I have 8 copper tracks in the socket, and 8 wires, not all seem "live" when tested.

The diagram makes it look like I need the innermost 4 connections, which must be numbered 3-4-5-6 regardless of which side you are counting from.

That probably means that those RJ45-to-USB connectors I have will not work, either, because they are tracking different connections.

So is there an 8P8C socket that I can buy where everything is actually connected?
Title: Re: XT/AT/PS2/Terminal to USB Converter with NKRO
Post by: Soarer on Sun, 21 July 2013, 20:12:57
Any CAT5e extension cable will have all 8 pins wired, so that's the safest bet if buying something.

The RJ45-to-USB thingies, who knows! They might have wired all 8, even if they weren't going to use them.
Title: Re: XT/AT/PS2/Terminal to USB Converter with NKRO
Post by: fohat.digs on Sun, 21 July 2013, 20:58:54
Any CAT5e extension cable will have all 8 pins wired, so that's the safest bet if buying something.

The RJ45-to-USB thingies, who knows! They might have wired all 8, even if they weren't going to use them.

I will look for a CAT5 extension cable.

How could the RJ45-to-USB adapter wire all 8? Doesn't USB have only 4 slots? You can't "double up" can you?
Title: Re: XT/AT/PS2/Terminal to USB Converter with NKRO
Post by: Soarer on Sun, 21 July 2013, 21:11:54
Oh... are they just wiring adapters to use ethernet cable as USB? Or are they active devices to give you proper ethernet?

If the former, then yeah, I guess they'd use the same 4 pins as 10 and 100 Mbit.

I was thinking you meant the latter... which might wire all 8 pins, even if they only use 4, if it makes the assembly easier.
Title: Re: XT/AT/PS2/Terminal to USB Converter with NKRO
Post by: fohat.digs on Mon, 22 July 2013, 09:46:40
Gee, thanks, guys, for putting a big gob of white something (incredibly tough) all over the area where I need to work!

It will really test the limits of my skill (clumsy at best) and equipment (cheap junk) to solder to those TINY spots around the back.

Not hard to identify what I need to do, but not easy to do it.

I will keep you posted.

edit - out of my skill range. I ordered an 8P8C ethernet cable and straight-through coupler from ebay. if it works, I can easily handle the wiring, but will have either 6 or 7 "pieces" between the keyboard and the computer!
Title: Re: XT/AT/PS2/Terminal to USB Converter with NKRO
Post by: Soarer on Tue, 30 July 2013, 21:02:46
Minor doc update (v1.12) posted to the OP covering changes since v1.10, some polishing, updated thread contents pages, and search boxes for searching this thread and the DT thread.
Title: Re: XT/AT/PS2/Terminal to USB Converter with NKRO
Post by: Soarer on Tue, 30 July 2013, 21:09:04
Gee, thanks, guys, for putting a big gob of white something (incredibly tough) all over the area where I need to work!

Almost as though they did it on purpose!  :p

How about hacking one of these (http://www.adafruit.com/products/909) apart?

(http://www.adafruit.com/images/large/ID909_LRG.jpg)
Title: Re: XT/AT/PS2/Terminal to USB Converter with NKRO
Post by: fohat.digs on Wed, 31 July 2013, 08:12:47
Sorry, I forgot to report back.

I bought an ethernet connector on ebay for under $3 which included a double female coupling and a short double-ended cable.

I cut the cable and spliced it to an AT plug from an old keyboard.

Untested in "real life" since I do not currently own a terminal keyboard, but continuity checks out.

Title: Re: XT/AT/PS2/Terminal to USB Converter with NKRO
Post by: YakMN on Wed, 28 August 2013, 00:15:30
Can I get some help with macros? I looked through all the examples in the download, and through the docs. I have a couple issues I can't seem to solve:

1: If I include these macros, the .sc compiles, and appears to load, but after unplugging and replugging the usb, the keyboard will just have some kind of default map. (This is an AT model F).
# Shift-SysReq = control-alt-delete
  macro EXTRA_SYSRQ SHIFT
    PUSH_META CLEAR_META all
    SET_META LCTRL
    SET_META ALT
    PRESS DELETE
    POP_ALL_META
  endmacro

# SysReq = force quit app on mac (Command-Option-esc)
  macro EXTRA_SYSRQ
    PUSH_META CLEAR_META all
    SET_META LGUI
    SET_META ALT
    PRESS ESC
    POP_ALL_META
  endmacro

---
I don't know if it matters, but I have mapped EXTRA_SYSRQ to PRINTSCREEN, and SCROLL_LOCK to EXTRA_SYSRQ in the default layer, prior to this point in the .sc.

Problem 2: These macros, if included, don't kill the load. They just don't work, as far as I can tell. Neither one works to replicate the mac key combo in question. In a text editor, if I hit them, I don't see any characters get inserted, but in the terminal, "5~" shows up if no shift is used (nothing shows if shift is down). This appears to happen regardless of whether the macros are pointd at PRINTSCREEN or not, so maybe this is some kind of "normal" behavior in a mac?

----
macroblock

# Shift-PrintScreen = screen capture of entire screen on mac (cmd-shift-3)
  macro PRINTSCREEN SHIFT
    PUSH_META CLEAR_META all
    SET_META LGUI LSHIFT
    PRESS 3
    POP_META
  endmacro

# PrintScreen = screen capture part of screen on mac (cmd-shift-4)
  macro PRINTSCREEN
    PUSH_META CLEAR_META all
    SET_META GUI SHIFT
    PRESS 4
    POP_META
  endmacro
 
endblock

----

I'm sure it's something dumb I'm doing, so any advice would be appreciated.

--


Title: Re: XT/AT/PS2/Terminal to USB Converter with NKRO
Post by: Soarer on Wed, 28 August 2013, 05:54:35
The only thing I can spot right now is that using the non-handed codes with set_meta will set both, for example 'set_meta shift' will set left and right shifts together. But, I'm not sure if that matters to the mac, and you've got only handed modifiers in the cmd-shift-3 macro already. (In the trigger, non-handed means 'either', so that part is fine as well).

Can you post your whole config, as an attachment or in a [code] block, please? I'll try and take a better look later :)
Title: Re: XT/AT/PS2/Terminal to USB Converter with NKRO
Post by: YakMN on Wed, 28 August 2013, 07:58:21
Yeah, I was trying all kinds of things to se if it worked one way or the other.

Thanks for taking a look!

I have a couple things commented out, because I haven't actually done the full ANSI mod yet.

[attachimg=3]

[attachimg=2]
Title: Re: XT/AT/PS2/Terminal to USB Converter with NKRO
Post by: Soarer on Wed, 28 August 2013, 17:57:41
I just changed the set_meta commands to use handed modifiers and tried it out... the last three work on the mac, and ctrl-alt-del works on windows... so, I'm puzzled why it's not working for you :confused: (The screenshot functions work with multiple modifiers pressed, so I don't think the handed vs non-handed modifiers made any difference).

What else could it be... are you using a KVM? Or a low-speed hub? Some remapping software?
Title: Re: XT/AT/PS2/Terminal to USB Converter with NKRO
Post by: YakMN on Wed, 28 August 2013, 20:55:07
Hmm. I am not using a KVM. I did have it going into a dell monitor as the USB hub, but I tried it just now going right into the mac mini, and it did the same behavior. I tried something new just now, and found out it's not so much the content of the 2 macros I said couldn't be there, but the fact there are 3 or more macros, period. Not that it actually does the force-quit command on the mac if it happens to be one of the macros left in. (oh wow, force quit dialog just opened. now. about 5 mins after I pressed the key. weird. )

Before that weird thing just now with the force-quit, I was thinking it is maybe a memory issue on the teensy? Here is the report when loading the config:
---
scwr v1.10
scwr: looking for Soarer's Converter: found
scwr: reading file: 160 bytes: ok
scwr: sending info request: ok
device: ok
protocol version check: converter=1.00, scwr=1.00: ok
settings version check: converter=1.01, file=1.01: ok
settings length check: max=506, file=158 bytes: ok
scwr: sending write request for 158 bytes: ok
device: ok
device: ready
scwr: sending 60 bytes: ok
device: ok
device: ready
scwr: sending 60 bytes: ok
device: ok
device: ready
scwr: sending 38 bytes: ok
device: ok
device: complete
----

Title: Re: XT/AT/PS2/Terminal to USB Converter with NKRO
Post by: YakMN on Wed, 28 August 2013, 21:22:30
So something is definitely wonky here. I think some key presses are going missing, and now, every once in a while, the force quit dialog is coming up, AND the cursor is turning into the take screenshot cursor. at same time. I thought it was maybe time related, so I timed it. But it's irregular. Now I'm thinking maybe it's related to the number of keypresses after pushing the macro-key.

There doesn't seem to be a certain number of strokes that cause the macro to fire either. ???

Title: Re: XT/AT/PS2/Terminal to USB Converter with NKRO
Post by: Soarer on Wed, 28 August 2013, 21:48:34
Ahhh. Yeah, that looks like a board with an AT90USB162 chip on it - 512 bytes EEPROM, and only 512 bytes RAM. I'm afraid that's not enough for either the layer or the macros :( Probably also explains the default map after reconnecting it, and the other odd behaviours. Most people are using the Teensy 2.0 with the ATMEGA32U4 chip (and 2.5KB RAM), and don't even come close to filling it up, so there are probably some bugs when the RAM is full.

Layers in particular take more space in RAM than in EEPROM - you can monitor it with the 'scinfo' command. Also, if you have hid_listen running while you 'scwr' a config, you'll see messages about whether allocation was OK or not.

The only real solution though, is to get a bigger chip.
Title: Re: XT/AT/PS2/Terminal to USB Converter with NKRO
Post by: YakMN on Wed, 28 August 2013, 22:16:30
I'm having a hard time reading what's on the chip, but it does look like ATMEGA32x4. (I can't read what's in the x position).

I have had this for a while, and it was a testbed for some other projects. I'll order a new one and see if that works better. as long as it's not my precious AT F!

Thanks for help Soarer, and, if I forgot to mention it before, for the AWESOME mod. !!
Title: Re: XT/AT/PS2/Terminal to USB Converter with NKRO
Post by: YakMN on Wed, 28 August 2013, 22:23:52
oh for the love of... I had picked the wrong .hex file when I started out: I loaded "Soarer_at2usb_v1.12_atmega16u4.hex", but should have loaded "Soarer_at2usb_v1.12_atmega32u4.hex". sheesh. can't fix stoopid...

works perfectly now. Just going to see if I can wipe off this shame. oh, the humanity... <looks at bright object> Ooh, pretty! now where was I...

Title: Re: XT/AT/PS2/Terminal to USB Converter with NKRO
Post by: Soarer on Thu, 29 August 2013, 06:41:15
It was late, but damit, I should've realised... a) I don't provide a hex for a '162, and, b) few people have the kit required to load the almost 16K hex onto the 16K chip (i.e. without the help of a bootloader). Glad you figured it out regardless of my poor advice!
Title: Re: XT/AT/PS2/Terminal to USB Converter with NKRO
Post by: fohat.digs on Thu, 29 August 2013, 07:01:36
Just going to see if I can wipe off this shame. oh, the humanity...

I have made mistakes much more stupid than that.
Title: Re: XT/AT/PS2/Terminal to USB Converter with NKRO
Post by: YakMN on Sun, 08 September 2013, 16:09:12
Is there anyway to wire up the 3 LEDs on my AT F so that I cause one to light up if one of my Fn keys is held down? As is it, I can't use numlock or scroll lock lights (neither does anything on a mac). I don't even like wasting a key on caps lock, I only keep it there because I like to see the light turn on. But it would actually be useful if I could make the other 3 light up when you had a Fn key held down.

Title: Re: XT/AT/PS2/Terminal to USB Converter with NKRO
Post by: Soarer on Sun, 08 September 2013, 18:55:11
There isn't, sorry.
Title: Re: XT/AT/PS2/Terminal to USB Converter with NKRO
Post by: YakMN on Sun, 08 September 2013, 20:44:45
np, thanks for quick reply. Maybe I just need to do a blinkenlights mod on top of this one ;)
Title: Re: XT/AT/PS2/Terminal to USB Converter with NKRO
Post by: nightspirit on Tue, 17 September 2013, 14:47:54
I just made one of these converters for my 122-Key Terminal IBM Model M (8P8C Connector), and I seem to have run into a couple problems. The first is that I don't seem to have NKRO. I'm not sure if I did something wrong, but I try the "hold both shift keys and type quick brown fox" test and I get "THEQUIKROWFOJUPSOERTHELAYDOG". And there are some of my keys (11 of them) that don't register with xev, specifically all 10 keys on the left hand side of the keyboard and top-right button on the number pad. Have I done something wrong, or is this all normal? Sorry if this any of this has been discussed, this is an awful long thread to sift through.
EDIT: Noticed that there's another key that doesn't seem to work. It's the one labelled "{ }" that exists between Field Exit and quotation.
Title: Re: XT/AT/PS2/Terminal to USB Converter with NKRO
Post by: Soarer on Tue, 17 September 2013, 15:25:05
Model Ms aren't NKRO, and the converter can't change that.

You'll need to load a config with some remaps  to get all the keys working - there's a couple in the configs folder that work with the 122-key 'boards (legacy.sc, halvar.sc). Check the docs for how to compile (scas) and load (scwr) configs, then tweak one of those to suit your needs. Finding out which codes you need to remap is described in Initial Translation on the Config page, but most are pretty obvious if you start with halvar.sc!
Title: Re: XT/AT/PS2/Terminal to USB Converter with NKRO
Post by: nightspirit on Tue, 17 September 2013, 15:26:55
Okay, thanks for the clarification, I'll look into that.
Title: Re: XT/AT/PS2/Terminal to USB Converter with NKRO
Post by: JBert on Wed, 18 September 2013, 12:11:33
The first is that I don't seem to have NKRO. I'm not sure if I did something wrong, but I try the "hold both shift keys and type quick brown fox" test and I get "THEQUIKROWFOJUPSOERTHELAYDOG".

That's not an NKRO test, it's just some random test for your controller. How often do you press both shift keys? It's only good as a "newbie test".

You have to press 3 key combinations, then see which ones don't work. If literally any 3-key combination works, try with 4 keys, and so on.

Not that it will help you much as the model M is 2KRO if I recall correctly.
Title: Re: XT/AT/PS2/Terminal to USB Converter with NKRO
Post by: xwhatsit on Mon, 23 September 2013, 00:24:26
I'd have to remove Out from the report as well :( It's a pain because each one of these grows the descriptor by 22 bytes, which might cause its own problem at some point. I'll just have to keep an eye on that table for now, until I can think of a good way to phrase a bug report such that it gets some action (if they see it as just one DIY project that's acting up, it won't get fixed!).

This has, predictably, bitten my USB beam-spring converter, now that I've implemented NKRO.

I'm surprised it took me a few days to notice too, being a Linux guy who uses the backslash/pipe key frequently!

I have solved it in the same manner you have, by putting padding bits into the descriptor where the problematic keycodes would normally be.

I'd suggest reporting it; looking around the internet (I had no idea what was causing it at first! I even stripped down my beamspring to see if there was any dust on the backslash sense pad :P), I see many others with weird backslash issues under Linux, some from keyboards that seem to be gaming keyboards or otherwise a bit `special' and thus probably implement a bitmapped keyboard report for NKRO. If you don't report it I'll have to get motivated to do so but it appears you have a bit more of a handle on the underpinnings within usb-core and usb-input (well that's my excuse anyway :P).

Here's an example: http://forum.corsair.com/v3/showthread.php?t=119654
Title: Re: XT/AT/PS2/Terminal to USB Converter with NKRO
Post by: killmaster on Tue, 24 September 2013, 15:43:14
Any idea if this works with a Teensy 3.0?
Title: Re: XT/AT/PS2/Terminal to USB Converter with NKRO
Post by: Soarer on Tue, 24 September 2013, 16:29:19
It won't. Teensy 3.0 has a totally different CPU architecture for a start. But the real killer is that it runs at 3.3 volts, and can't interface directly to our 5 volt keyboards.
Title: Re: XT/AT/PS2/Terminal to USB Converter with NKRO
Post by: killmaster on Tue, 24 September 2013, 16:32:57
Okay, thank you!
Title: Re: XT/AT/PS2/Terminal to USB Converter with NKRO
Post by: Soarer on Tue, 24 September 2013, 16:41:56
I'd have to remove Out from the report as well :( It's a pain because each one of these grows the descriptor by 22 bytes, which might cause its own problem at some point. I'll just have to keep an eye on that table for now, until I can think of a good way to phrase a bug report such that it gets some action (if they see it as just one DIY project that's acting up, it won't get fixed!).

This has, predictably, bitten my USB beam-spring converter, now that I've implemented NKRO.

I'm surprised it took me a few days to notice too, being a Linux guy who uses the backslash/pipe key frequently!

I have solved it in the same manner you have, by putting padding bits into the descriptor where the problematic keycodes would normally be.

I'd suggest reporting it; looking around the internet (I had no idea what was causing it at first! I even stripped down my beamspring to see if there was any dust on the backslash sense pad :P), I see many others with weird backslash issues under Linux, some from keyboards that seem to be gaming keyboards or otherwise a bit `special' and thus probably implement a bitmapped keyboard report for NKRO. If you don't report it I'll have to get motivated to do so but it appears you have a bit more of a handle on the underpinnings within usb-core and usb-input (well that's my excuse anyway :P).

Here's an example: http://forum.corsair.com/v3/showthread.php?t=119654

Yeah, one of us really ought to get round to reporting it :p

I think It helps a lot that other keyboards are falling prey to it - even if they don't claim to support Linux (which in most cases is probably just laziness / lack of testing).

I got horribly lost looking at that code :( I kept thinking I had a handle on it, but then I'd see something that proved my notions wrong. It must be tracking scan code state somewhere, after that table is used, but I don't think I found it.
Title: Re: XT/AT/PS2/Terminal to USB Converter with NKRO
Post by: fohat.digs on Mon, 07 October 2013, 17:16:46
I have gotten a question that I cannot answer.

Are any or all of these contacts available to reassign and use?

It seems that I have heard that some are not, such as the left side of numpad "0" and the bottom of numpad "Enter"

Can anybody say for sure which of these 5 could be activated, and where to find them in the table?

Thanks!
Title: Re: XT/AT/PS2/Terminal to USB Converter with NKRO
Post by: Halvar on Mon, 07 October 2013, 17:30:31
Have you tried hid_listen? If something shows up there when you short-circuit the contact, then you know for sure that the contact works, and you also get the code it sends, which you can look up in the table.
Title: Re: XT/AT/PS2/Terminal to USB Converter with NKRO
Post by: fohat.digs on Mon, 07 October 2013, 20:11:11
Thank you for the reply, but I was hoping to get a definitive answer from someone who knows, rather than learning for myself by trial and error.

For one thing, I do not currently have a keyboard disassembled, and would prefer to avoid the time and pain of experimentation.

If I knew what I was facing in advance, it would make the process smoother.
Title: Re: XT/AT/PS2/Terminal to USB Converter with NKRO
Post by: Soarer on Mon, 07 October 2013, 21:01:49
All of those should work fine, although I haven't tried them myself. Well, apart from 03 and 05 which are standard on 122s!

01 = EXTRA_INSERT
02 = EXTRA_PAD_PLUS
03 = PAD_MINUS
04 = INTERNATIONAL_1
05 = EUROPE_1

The other two normally hidden pads that are wired are:
top half of ISO enter = BACKSLASH
left half of backspace = INTERNATIONAL_3
Title: Re: XT/AT/PS2/Terminal to USB Converter with NKRO
Post by: winged mantis on Sat, 12 October 2013, 20:52:43
Im having trouble getting the firmware to work with my keyboard. I have a Dell AT101W connected to it. The hex file installs on the teensy just fine, but after the 3 led's blink and windows installs the drivers, no characters appear when I type.
Title: Re: XT/AT/PS2/Terminal to USB Converter with NKRO
Post by: Soarer on Sat, 12 October 2013, 21:09:46
See the 'Trouble' page ;)

Probably a problem with your wiring, and maybe hid_listen can give you a clue whether something is not connecting well, or if you have data and clock swapped over.
Title: Re: XT/AT/PS2/Terminal to USB Converter with NKRO
Post by: winged mantis on Sat, 12 October 2013, 22:04:47
Edit: Nevermind, wired the data and clock wires to the wrong places
Title: Re: XT/AT/PS2/Terminal to USB Converter with NKRO
Post by: vivalarevolución on Tue, 15 October 2013, 15:34:05
Sooooooo........

I'm looking into making a converter, and I am somewhat unsure of what parts I need.  I need this for a 122-key Model F.   I read through the first 17 pages of this thread, downloaded the documents, and finally got tired of all the reading.  Here is what I think I need:

1.  breadboard
2.  Teensy w/ pins
3.  5-pin socket
4.  Mini USB cord to connect to computer

Will I need anything else to make this work?  With the breadboard, is necessary for me to solder anything?

I probably will have more questions as I go along, because I am neither a programmer nor electronics fiend.  I also need step-by-step instructions and lots of diagrams and pictures to help me learn, along with the deep, reassuring voice of a guru behind my shoulder.

Title: Re: XT/AT/PS2/Terminal to USB Converter with NKRO
Post by: fohat.digs on Tue, 15 October 2013, 16:59:06
I'm looking into making a converter, and I am somewhat unsure of what parts I need.  I need this for a 122-key Model F.   I read through the first 17 pages of this thread, downloaded the documents, and finally got tired of all the reading.  Here is what I think I need:

1.  breadboard
2.  Teensy w/ pins
3.  5-pin socket
4.  Mini USB cord to connect to computer

Will I need anything else to make this work?  With the breadboard, is necessary for me to solder anything?

I probably will have more questions as I go along, because I am neither a programmer nor electronics fiend.  I also need step-by-step instructions and lots of diagrams and pictures to help me learn, along with the deep, reassuring voice of a guru behind my shoulder.

You won't need a socket unless you don't want to do individual wires or cut the original cord. If you cut the original cord, you will need to solder the cut ends at the Teensy.

These will take care of you since you will have pins on both ends that you need to connect. Color-coded, too.

http://www.ebay.com/itm/181165458233

Otherwise, you should be good except that you will want to fasten the Teensy somehow, but even a cable tie would do that.
Title: Re: XT/AT/PS2/Terminal to USB Converter with NKRO
Post by: Soarer on Tue, 15 October 2013, 19:48:20
Yes, I would suggest those wires as well; breadboards aren't ideal for the long-term. With them, fitting the Teensy inside the case, and getting a suitable length USB cable for your needs, you can have a reasonably permanent (but reversible) conversion up and running pretty quickly, and without soldering. An external converter is obviously more flexible if you have multiple keyboards you want to use with it, but usually requires at least some soldering and making mechanically sound (i.e. a box etc).

This thread is best read backwards these days, or via the index and search in the docs!
Title: Re: XT/AT/PS2/Terminal to USB Converter with NKRO
Post by: vivalarevolución on Tue, 15 October 2013, 20:23:01
Ooooffff.   I'll see what I can do.  So many of the terms thrown around for this converter are so foreign to me that I spend half the time looking up the meaning of the term.
Title: Re: XT/AT/PS2/Terminal to USB Converter with NKRO
Post by: fohat.digs on Tue, 15 October 2013, 20:43:32
This thread is best read backwards these days, or via the index and search in the docs!

Soarer's documents are really very thorough.

Wcass's programming is post #560 (I have memorized that one).

You know the saying "RFM" you will save some grief if it is part of planning rather than troubleshooting.

Title: Re: XT/AT/PS2/Terminal to USB Converter with NKRO
Post by: vivalarevolución on Wed, 16 October 2013, 17:44:44
This thread is best read backwards these days, or via the index and search in the docs!

Soarer's documents are really very thorough.

Wcass's programming is post #560 (I have memorized that one).

You know the saying "RFM" you will save some grief if it is part of planning rather than troubleshooting.

RFM?  Recency, frequency, monetary value?
Title: Re: XT/AT/PS2/Terminal to USB Converter with NKRO
Post by: fohat.digs on Thu, 17 October 2013, 06:44:09
RFM?  Recency, frequency, monetary value?

"Read the frakking manual."
Title: Re: XT/AT/PS2/Terminal to USB Converter with NKRO
Post by: IonutZ on Sun, 20 October 2013, 18:42:07
Could I upload the binary to a Teensy 3.0?
Title: Re: XT/AT/PS2/Terminal to USB Converter with NKRO
Post by: fohat.digs on Sun, 20 October 2013, 19:11:42
Could I upload the binary to a Teensy 3.0?

Post # 922
Title: Re: XT/AT/PS2/Terminal to USB Converter with NKRO
Post by: fohat.digs on Wed, 23 October 2013, 18:33:58
here is the problem:

After completely disassembling and putting an F-122 back together, I get a screen full of random garbage. I get dozens of "Calculator" (which is F14 remapped) and those are mostly full of "5s" with a few other numbers mixed in.

When I could get it all to hold still for a few seconds, Aqua key test reported a few hits and a lot of misses.

I will take it apart again, of course, but this is clearly an electrical problem.

[SOLVED] - NOT

After completely disassembling it, there appeared to be a  VERY  few  TINY  specks of dust on the mylar sheet that goes between the metal back plate and the capacitive PCB. I wiped all 3 pieces with alcohol and put it back together. Everything worked properly - for a while.

[UNSOLVED]

After hooking it back up to the original cable and outboard Teensy, it happened again. After some experimentation, I realized that the problem might be the cable. I can't tell whether it is not making good contact at the PCB, or the male end of the 240 DIN plug, or in the wiring, but when I did a direct connection to a loose Teensy with loose wires, it worked.

So I use it for an hour or 2 with no problem, then it starts spitting out spurious keystrokes. Sometimes there is a pattern, for example pressing "W" produces "2W" or "W22" and I am getting a lot of "5s" and sometimes I suddenly get a dialog box or something that would normally indicate that I had pressed something special.

Once it starts, it gets rapidly worse, as if it were heating up or something. A reboot usually fixes it temporarily.

I like this board and it seems nice and clean otherwise. I would like to make this a daily driver.

Is there an electrical component that may be failing? Would a bad connection produce extra keystrokes?

Thanks for your help.
Title: Re: XT/AT/PS2/Terminal to USB Converter with NKRO
Post by: Soarer on Fri, 25 October 2013, 17:21:07
How very strange! Was it working OK before you took it apart? Or didn't you use it for long enough before to reveal the problem?

The prime suspect from an aging perspective is the power smoothing capacitors - if they aren't effective (particularly the one near the capsense chip) then the capacitive sensing could well become unreliable.

To get keypresses requires a decent clock signal; I don't think a bad connection could cause extra keypresses.
Title: Re: XT/AT/PS2/Terminal to USB Converter with NKRO
Post by: fohat.digs on Sat, 26 October 2013, 16:37:25
How very strange! Was it working OK before you took it apart? Or didn't you use it for long enough before to reveal the problem?

The prime suspect from an aging perspective is the power smoothing capacitors - if they aren't effective (particularly the one near the capsense chip) then the capacitive sensing could well become unreliable.

To get keypresses requires a decent clock signal; I don't think a bad connection could cause extra keypresses.

I had tested it in the beginning with Aqua Key Test and it turned out good. I probably did not use it for an extended period. Also, I tend to ignore occasional isolated spurious keystrokes because my typing is sometimes sloppy when I am going fast.

Now I hooked it up with different wires and different Teensy applications (external box with cable and adapter, and loose Teensy wired direct) and got the same result, so clearly (heartbreakingly) the problem is in the keyboard somewhere. I get a variety of different characters, so that indicates that there is not an isolated problem "out in the field" somewhere.

Both Teensies are set up with pull-up resistors (1K ohm, 1/4 watt), could I be "pulling up" too much juice into the clock or data circuit?

How would I find and check the capacitors? Should I be looking for a short circuit somewhere else?

I actually have another controller board, but that long line of connections off the flat gray cable is very intimidating.

Title: Re: XT/AT/PS2/Terminal to USB Converter with NKRO
Post by: Soarer on Sat, 26 October 2013, 19:58:49
It would definitely be easier to replace the capacitors than swap the controller! I haven't got an open F 122 handy to point them out, but they'll be the same as in the XT I guess, silver, lead at each end (axial), little under an inch long... ahh, here, scroll right down... http://www.seasip.info/VintagePC/ibm_6110344_cswap.html. There's two of them worth replacing - one near the square silver capsense chip, and one near the cable connector. (I'm pretty sure the third one next to the two yellow capacitors is just for providing the reset signal to the CPU, and that seems fine).

Gotta admit I'm just guessing! But, I'm also thinking of what's the easiest thing to try first, when you haven't got lots of test equipment to hand.

Unfortunately they're not easy to test, so replacing them is the best bet. TBH, anyone into Model Fs should have a stock of them... they're 47uF, 16V, axial, electrolytics, e.g. http://www.ebay.com/itm/300351410410 (actually, I think the originals are tantalum, but electrolytics work fine).

They need to go in the right way round: the -ve side is marked, and goes to ground, which is on the end away from the cable connector for both of those caps (if your controller board looks like the one in those pics).
Title: Re: XT/AT/PS2/Terminal to USB Converter with NKRO
Post by: fohat.digs on Sun, 27 October 2013, 10:08:09
Thanks!

We are talking about these 2, right? What about the 2 black upright ones, are they questionable?

Title: Re: XT/AT/PS2/Terminal to USB Converter with NKRO
Post by: Soarer on Sun, 27 October 2013, 11:57:16
The black ones will be fine. It's only the ones that smooth power that have even a remotely hard life.

Nope... these two...
Title: Re: XT/AT/PS2/Terminal to USB Converter with NKRO
Post by: fohat.digs on Sun, 27 October 2013, 13:29:10
Nope... these two...

Great, thanks!

I ordered those capacitors that you linked. Hopefully, from Canada, they won't take too long.

Maybe I will get lucky. Maybe I already am - I have worked and used several Model Fs without capacitor issues. It will be nice to have some spares on hand, just in case.

Are my symptoms, spurious key strokes, typical for a failing capacitor? What should I look for in one starting to go bad, and/or a completely dead one?

Title: Re: XT/AT/PS2/Terminal to USB Converter with NKRO
Post by: Soarer on Sun, 27 October 2013, 14:42:08
I don't know if it would be 'typical', or have any statistics for failures of capacitors of this type (don't even know exactly what type they are!), but it's certainly a reasonable assumption that if either of the capacitors fails to an open circuit then the Model F's capacitive sensing could have trouble, and cause those symptoms.

It might be worth measuring resistance between +5V and GND to see if it seems off, or if it takes a different time to settle to a steady reading... you have a few to compare with :D
Title: Re: XT/AT/PS2/Terminal to USB Converter with NKRO
Post by: fohat.digs on Mon, 28 October 2013, 16:21:32
All hail King Harry, perpetrator of the most bizarre and improbable problems imaginable (or not).

I think that I have found and fixed the most recent problem, and you are not going to believe this:

After painting several plates in different colors, including flat black and glossy black, I was not happy enough with the results to let them show as a bare "stealth" board. Looking at my options at the paint store, I decided on "hammered" black in a spray can. I was extremely pleased with the results - a nice light subtle textured finish that was "just right"

After reassembling the keyboard, I gave the front plate a couple of light taps with a hammer to seat the tabs fully. Since this left a couple of small marks on the end of the plate, I masked the keys and gave the end a light touch-up spray of paint. Since ordinary paint is not a conductor, I did not think about a bit of overspray on the PCB behind. But wait - the "hammered" paint must have some metallic dust or flakes in it to produce the desired effect, and, of course, that makes the paint conductive!

There are a few small parallel traces running down the side of the board, and there was a cloud of black about 5mm x 2cm that must have been partially shorting them together. I very gently rubbed the area with alcohol on a paper towel to remove the overspray. It seems to be working properly, it has been about 20 minutes now and I am typing this on it with no spurious key strokes.

Not one of the top 5 most obvious possibilities to troubleshoot, eh?
Title: Re: XT/AT/PS2/Terminal to USB Converter with NKRO
Post by: Soarer on Mon, 28 October 2013, 17:06:46
Good theory, but I'm not convinced! There's a solder resist layer, so it shouldn't have directly shorted anything, and lines in parallel have some capacitance between them anyway.

But we shall see in about an hour I guess!
Title: Re: XT/AT/PS2/Terminal to USB Converter with NKRO
Post by: fohat.digs on Tue, 29 October 2013, 07:38:29
There's a solder resist layer, so it shouldn't have directly shorted anything, and lines in parallel have some capacitance between them anyway.

Several hours on, and 2 reboots with no problem.

The solder resist layer looks to be intact, and clearly the problem could have been something else altogether.

As always, I appreciate your help and advice.
Title: Re: XT/AT/PS2/Terminal to USB Converter with NKRO
Post by: Soarer on Tue, 29 October 2013, 19:25:42
Well that's good news! I wouldn't have thought it was that sensitive... next time I have one apart I'll try putting a hammer or two on some of those traces to see if it affects it.
Title: Re: XT/AT/PS2/Terminal to USB Converter with NKRO
Post by: Hellmark on Mon, 04 November 2013, 03:43:39
Trying to rig up an external one, this is the most I get. Nothing happens if I hit a key, and only get R05 if I unplug or plug into the adapter.

Trollbogey:configs hellmark$ ~/Downloads/hid_listen.mac
Waiting for device:...
Listening:
wEE

remaining: 0051
2C@0008 remaps
05@0034 layers
20@0039 remaps
layerdefs: 01
max_layer: 01
total_macros: 00
alloc ok.


Keyboard ID: 0000
Code Set: 1
Mode: PC/XT

R05
Title: Re: XT/AT/PS2/Terminal to USB Converter with NKRO
Post by: Soarer on Mon, 04 November 2013, 06:33:08
I think that's what you'd get if the clock line was permanently low, and always being read as 0. A few things could cause that (roughly in order of likelihood): either +5V isn't connected to the keyboard, or clock is shorted to ground, or there's an internal fault in the keyboard, or possibly the Teensy pin has been damaged by shorting it with +5V at some point (actually, I'm not sure exactly how a failure affects it in that case; it might always read as '1'). A multimeter would help a lot in checking the first two!
Title: Re: XT/AT/PS2/Terminal to USB Converter with NKRO
Post by: Hellmark on Mon, 04 November 2013, 11:03:56
I soldered ground to the VCC and Ground near the reset switch. I do notice that most people tend to connect to the one up near the USB jack. Is there a difference that would be causing this?
Title: Re: XT/AT/PS2/Terminal to USB Converter with NKRO
Post by: Soarer on Mon, 04 November 2013, 14:51:26
No, no difference between the two GND pads (or between the two VCC pads).

So, any chance that one of the possibilities above might be the problem? Could you post a pic in case there's some problem we might spot?
Title: Re: XT/AT/PS2/Terminal to USB Converter with NKRO
Post by: Hellmark on Mon, 04 November 2013, 14:58:19
I am at work right now. Last night after I made the post, I unsoldered everything and soldered on pins before going to bed. When I get home, I'll attempt again, and double checking everything with my multimeter.
Title: Re: XT/AT/PS2/Terminal to USB Converter with NKRO
Post by: Hellmark on Tue, 05 November 2013, 07:12:25
Taking a look at it now. 4.94V reading at the pins. Not seeing any sign of a short for the clock. Tried with another keyboard I know works, and still get the same thing for ID 0000, and R05.

Just to double check, the pinout that you have on the first post is for the female connector, right? That's how I read it as.
Title: Re: XT/AT/PS2/Terminal to USB Converter with NKRO
Post by: Soarer on Tue, 05 November 2013, 07:49:39
The front of the female connector, yup. The docs have a diagram from the IBM techref that makes it clearer.
Title: Re: XT/AT/PS2/Terminal to USB Converter with NKRO
Post by: Hellmark on Tue, 05 November 2013, 07:53:21
Damn, I was hoping that I misread it and wired it up backwards.

Would you say that it seems likely then that the teensy is damaged? What would I need to do to get it going with other pins for clock and data? I know your source isn't available, and often that sorta thing is hard coded.
Title: Re: XT/AT/PS2/Terminal to USB Converter with NKRO
Post by: Soarer on Tue, 05 November 2013, 08:05:12
With no keyboard attached, does it still do the single R05 thing, but the PD1 pin is at roughly 5V?

edit: I just tried shorting clock to ground, and it does give this behaviour as I thought. There could be other ways, of course!

edit2a: Last time this problem came up (http://geekhack.org/index.php?topic=17458.msg951788#msg951788) was when Harry incorrectly wired a pull-up resistor (so it was pulling down, presumably).

edit2b: In case the Teensy is damaged, there is an alternate hex for atmega32u4 (http://deskthority.net/post120098.html#p120098) which uses different pins.
Title: Re: XT/AT/PS2/Terminal to USB Converter with NKRO
Post by: Hellmark on Tue, 05 November 2013, 08:31:51
no keyboard attached, no R05. I am running without pull up resistors, could lack of pull ups cause this?

Using the alternate pins and firmware, same result.
Title: Re: XT/AT/PS2/Terminal to USB Converter with NKRO
Post by: Soarer on Tue, 05 November 2013, 09:09:10
Pull-ups are usually not required, and if they were it wouldn't give this kind of error.

So it doesn't seem like a damaged Teensy then,  the keyboard must be pulling it down. Still might be possible that wiring is wrong on your socket, but the next thing to test is resistance between pins on the keyboard (with it unplugged)...

ground to 5V - should a few kohm
data to 5v - should be 1 or 2 kohm (for a PC/XT, maybe higher for others)
clock to 5v - should be 1 or 2 kohm (for a PC/XT, maybe higher for others)
ground to clock - should be higher than ground to 5V, by 1 or 2 kohm
ground to data - should be higher than ground to 5V, by 1 or 2 kohm
might as well test data to clock as well!

What keyboard is it?
Title: Re: XT/AT/PS2/Terminal to USB Converter with NKRO
Post by: Hellmark on Tue, 05 November 2013, 12:18:48
I have a XT model F (what I primarily want it for), and also tried with a AT NMB keyboard. Same results on both. I'll try do some more probing tonight.
Title: Re: XT/AT/PS2/Terminal to USB Converter with NKRO
Post by: Soarer on Tue, 05 November 2013, 14:52:49
Actually, same on both would indicate something wrong with the wiring of the socket. Please quadruple check that it's not mirrored! If the 5V to the keyboard is actually GND, it will pull both clock and data low, and give that single R05 symptom. If, at the same time, the GND to the keyboard is actually 5V, that can easily damage the power smoothing capacitors (on the XT at least. Easy enough to replace though).
Title: Re: XT/AT/PS2/Terminal to USB Converter with NKRO
Post by: Hellmark on Tue, 05 November 2013, 16:29:40
I'll check again tonight. I cut the female end of an AT adapter off, and out of that was 5 wires. Brown, Red, Black, and Orange, with the final one being bare. The bare one is what I've been treating as ground, because when I tested things initially it is what thought was ground, plus usually when ever I see bare in a bundle like that, it is the ground. When I tested things, I had been up for about 24 hours straight, so possible I poked the wrong spot with something.
Title: Re: XT/AT/PS2/Terminal to USB Converter with NKRO
Post by: Soarer on Tue, 05 November 2013, 16:38:00
Ah, the bare one will be the case ground. One of the others needs to be connected to ground for it to operate (as well as the case ground if you like, but the case ground is optional). BUT I'm not sure whether that error alone would produce the same symptom, so check 'em all!
Title: Re: XT/AT/PS2/Terminal to USB Converter with NKRO
Post by: vivalarevolución on Tue, 05 November 2013, 20:16:33
Great news!  After weeks of reading up on this thread, Soarer's documentation and such, I finally decided to take the dive and see if I could get my F122 to work with the converter using the materials that I have on hand.

So I stripped one end of the female-to-female breadboard wires and attached those to a socket.
Then I attached the intact female end of the breadboard wire to the Teensy.
I loaded the files onto the Teensy.
I then plugged the keyboard into the socket, restarted the computer, and everything seems to work alright. 

Typing on the F122 right now!  Was not nearly as difficult as I built it up in my head.

It looks pretty ugly and is an admittedly awful, temporary build, but I just wanted to see if I could get this thing to work.  And it does.

However, I still have some issues with getting the computer to consistently read the keyboard on restart or re-insertion of the converter.  I will describe those in more detail if they persist with a more solid build.
Title: Re: XT/AT/PS2/Terminal to USB Converter with NKRO
Post by: Hellmark on Wed, 06 November 2013, 00:35:28
Ok, I went through and double checked things. One wire I did have off. I before thought it was reset, but apparently there isnt' a wire to the reset, and instead is ground. I have both the bare wire ground ground and the pin ground now connected to the teensy's ground. The other ones seem to be correct though. Female plug facing me. from left to right, I have clock, ground, data, VCC, and what should be 3 but is no wire. That should match up with what the diagram shows.
Title: Re: XT/AT/PS2/Terminal to USB Converter with NKRO
Post by: vivalarevolución on Wed, 06 November 2013, 05:53:49
Ok, I connected the breadboard female-to-female wires to the controller and I plan to directly contact those to the Teensy.  I am wondering if there is a way to determine the connection of each wire without using a multimeter, which seems to be the preferred method in this thread.  I know that others have documented this before, but I also know we cannot rely on the color of connection wires being consistent between models.

FYI, I have an F122, model #6110347.

EDIT:  Nevermind folks.  I searched the thread and found fohat's earlier fumbles with an F122 from two years ago, and I have this thing working fine with a direct connection to the controller without any soldering.

My only question is how permanent of a solution is the solderless converter?  I plan to keep the teensy in the case, but I have some concerns about the pins on the pre-soldered Teensy getting bent.
Title: Re: XT/AT/PS2/Terminal to USB Converter with NKRO
Post by: Hellmark on Wed, 06 November 2013, 06:28:34
Without a multimeter, may be a bit tricky. Luckily multimeters are cheap. Harbor Freight is in most areas and has them for $5. Quite a few different tool stores should have cheap no frills ones. Amazon also has a number of cheap ones in the $5 range.

Title: Re: XT/AT/PS2/Terminal to USB Converter with NKRO
Post by: vivalarevolución on Wed, 06 November 2013, 06:37:02
Without a multimeter, may be a bit tricky. Luckily multimeters are cheap. Harbor Freight is in most areas and has them for $5. Quite a few different tool stores should have cheap no frills ones. Amazon also has a number of cheap ones in the $5 range.

Thanks.  I was able to figure things out looking at some older posts.  Now my only concern is the permanency of my current solution without soldering.
Title: Re: XT/AT/PS2/Terminal to USB Converter with NKRO
Post by: Hellmark on Wed, 06 November 2013, 06:52:15
Without soldering, it won't be permanent. Pick up a cheap iron go to town. Making stuff is fun, and a skillset so many people are missing any more.
Title: Re: XT/AT/PS2/Terminal to USB Converter with NKRO
Post by: Soarer on Wed, 06 November 2013, 07:02:09
Good. Yes, if you've found the pinout of the connector on the controller, you can rely on that.

The key thing to the connections staying put is to stop the cable pulling on it - solve that and you're most of the way there. Then wrap the Teensy in something (foam?) or stick it down, and it should be fine for a good time. It's also improtant that the Teensy pins don't short to ground (e.g. the case!), especially pin PD6 since that's +5V when the LED is lit (also, since that's on the end, it's more likely to touch).
Title: Re: XT/AT/PS2/Terminal to USB Converter with NKRO
Post by: Soarer on Wed, 06 November 2013, 07:09:18
Ok, I went through and double checked things. One wire I did have off. I before thought it was reset, but apparently there isnt' a wire to the reset, and instead is ground. I have both the bare wire ground ground and the pin ground now connected to the teensy's ground. The other ones seem to be correct though. Female plug facing me. from left to right, I have clock, ground, data, VCC, and what should be 3 but is no wire. That should match up with what the diagram shows.

Right, that sounds good. I still can't think how the missing ground gave the symptom, so it's worth checking at least the 5V to GND resistance on the XT keyboard in case it's damaged somehow. Otherwise, time to see what happens when it's plugged in...
Title: Re: XT/AT/PS2/Terminal to USB Converter with NKRO
Post by: Hellmark on Wed, 06 November 2013, 09:23:43
Same results, no change on either the AT or XT.

1.3kOhm on the XT for ground to 5v. Data and clock to 5v are both 2kOhm. Data and clock to ground are both around 3.25kOhm. Data to clock is 4kOhm.

AT keyboard is 9.6 ground to 5v. 11.8kOhm data and clock to ground. Data to 5v is 2kOhm, clock is 2kOhm. 4.38kOhm data to clock.
Title: Re: XT/AT/PS2/Terminal to USB Converter with NKRO
Post by: Soarer on Wed, 06 November 2013, 11:02:14
Those readings are all good. I'm stumped for the moment! Can't see how the clock line gets grounded, but only when a keyboard is plugged in, yet the keyboards seem fine.

In case I'm making an incorrect assumption, can you measure the voltage on the clock line when a keyboard is attached?
Title: Re: XT/AT/PS2/Terminal to USB Converter with NKRO
Post by: Hellmark on Wed, 06 November 2013, 11:15:33
The AT keyboard I know is good, because I was using it before I unplugged it to test it with the teensy. I am wondering if I did something to dork up the plug, and didn't realize it, because I know it was all good to start with, since I used it with the AT keyboard to work on a PS/2 system before I started.

Yeah, I can test voltage tonight, shouldn't be a problem.
Title: Re: XT/AT/PS2/Terminal to USB Converter with NKRO
Post by: vivalarevolución on Wed, 06 November 2013, 14:17:26
Without soldering, it won't be permanent. Pick up a cheap iron go to town. Making stuff is fun, and a skillset so many people are missing any more.

I do have a solder iron and I cannot wait to play with it!  But I'm a little cautious of screwing up the keyboard or Teensy with my novice soldering skills.  On the bright side, this converter has reawakened my dormant DIY and tinkering tendencies.

Good. Yes, if you've found the pinout of the connector on the controller, you can rely on that.

The key thing to the connections staying put is to stop the cable pulling on it - solve that and you're most of the way there. Then wrap the Teensy in something (foam?) or stick it down, and it should be fine for a good time. It's also improtant that the Teensy pins don't short to ground (e.g. the case!), especially pin PD6 since that's +5V when the LED is lit (also, since that's on the end, it's more likely to touch).

Luckily, these Model F's have a clamp of sorts that will keep that USB cable in place.  What is the purpose of wrapping the Teensy in foam?
Title: Re: XT/AT/PS2/Terminal to USB Converter with NKRO
Post by: fohat.digs on Wed, 06 November 2013, 14:24:36
What is the purpose of wrapping the Teensy in foam?

If you put it internal there are lots of metal surfaces that could touch any number of points and short them.

There is an extra bracket that I attach to if I am using a breadboard.
Title: Re: XT/AT/PS2/Terminal to USB Converter with NKRO
Post by: Soarer on Wed, 06 November 2013, 16:06:18
Yeah, and foam would stop it rattling around, which might also be enough to prevent cables falling out. I'm thinking enough foam so the foam is squashed by the case when closed ;)
Title: Re: XT/AT/PS2/Terminal to USB Converter with NKRO
Post by: vivalarevolución on Wed, 06 November 2013, 16:24:36
Thanks guys.  I'm a technological Luddite that forgot everything I learned from my Electronics merit badge.
Title: Re: XT/AT/PS2/Terminal to USB Converter with NKRO
Post by: Hellmark on Thu, 07 November 2013, 06:40:12
with AT keyboard attached, 2.28V on clock line. XT it is 2.84V.
Title: Re: XT/AT/PS2/Terminal to USB Converter with NKRO
Post by: Soarer on Thu, 07 November 2013, 06:51:25
Interesting. I wonder if the 5V is connecting to the keyboard properly. I'd guess at similar voltages on the data line in that case.

Does the AT have LEDs, and do they flash on as they should when it's connected?
Title: Re: XT/AT/PS2/Terminal to USB Converter with NKRO
Post by: Hellmark on Thu, 07 November 2013, 07:27:05
AT has LEDs, and they do not flash. Not even a flicker.

On data line, reading .69V when keyboard is plugged in.
Title: Re: XT/AT/PS2/Terminal to USB Converter with NKRO
Post by: Soarer on Thu, 07 November 2013, 14:04:33
Time to test continuity all the way through then. Easiest with the XT because I can show you where to probe, and there's handy test pads as well! You'll need to open it up and connect it to the converter (but not plug the USB side in), then check resistance between these points and the corresponding pins on the Teensy - they should all be 'low', as in ohms or tens of ohms.

[attachimg=1]
Title: Re: XT/AT/PS2/Terminal to USB Converter with NKRO
Post by: Hellmark on Thu, 07 November 2013, 23:57:31
I used the test pad as marked out by you in that pic. For the following I go from the test pad to the pin on the teensy. Keyboard plugged in, but USB isn't plugged in.
XT Test Point to teensy pin:
Ground to VCC = 1.25kOhm
Ground to Clock = 3.25kOhm
Ground to Data = 3.25kOhm
Ground to ground = 1.1kOhm

VCC to Clock = 2.02kOhm
VCC to Data = 2.03kOhm
VCC to Ground = 1.238kOhm
VCC to VCC = 1.1kOhm

Data to Clock = 4.03kOhm
Data to Ground = 3.28kOhm
Data to VCC = 2.03kOhm
Data to Data = 1.2kOhm

Clock to Data = 4.05kOhm
Clock to Ground = 3.26kOhm
Clock to VCC = 2.015kOhm
Clock to clock = 1.1kOhm
Title: Re: XT/AT/PS2/Terminal to USB Converter with NKRO
Post by: Soarer on Fri, 08 November 2013, 07:05:34
They all seem as expected, except for these:

Ground to ground = 1.1kOhm
VCC to VCC = 1.1kOhm
Data to Data = 1.2kOhm
Clock to clock = 1.1kOhm

Which I think is just a mistake in writing them - they should be without the 'k' - since the other measurements wouldn't be as they are, otherwise.

Next test is to plug the USB in, and measure the Vcc, Data and Clock voltages on those test pads, using the GND test pad as reference ('reference' just means where you stick the black probe).

Surely we must find something wrong soon!  :'(
Title: Re: XT/AT/PS2/Terminal to USB Converter with NKRO
Post by: Hellmark on Fri, 08 November 2013, 12:31:33
Oops, do believe that was a copy paste problem.

I'll double check voltages when I get home. I am hoping we can find something soon too, and thank you for being so patient.
Title: Re: XT/AT/PS2/Terminal to USB Converter with NKRO
Post by: fohat.digs on Fri, 08 November 2013, 19:19:36
I forgot to report back on my mysterious problem with spurious key strokes. No problem any more after at least a week of constant use (although my USB port must be weird, every few days or weeks it stops working (and knocks out other USB ports, too) until I unplug it and hot plug it again).

Soarer was skeptical that the metallic paint was the problem, and I did completely disassemble and reassemble it, so various things could have been jiggled just a bit.

Another thing - I have 3 bolts added in the concave part of the plate: approximately between 5 and upper F5, between 0 and upper F10, and between Enter and Up Arrow. I feel that these tighten up the feel somewhat, since the F-122 has such a vast unsupported area down the center line (those tabs hardly touch).

In the earlier iteration, I had these torqued down fairly hard, perhaps too hard. Afterwards, I made them just a hair past "snug"

Perhaps I was simply pulling the plates too close together and getting near contact with the hammers.
Title: Re: XT/AT/PS2/Terminal to USB Converter with NKRO
Post by: Soarer on Sat, 09 November 2013, 14:15:58
That sounds quite plausible :D
Title: Re: XT/AT/PS2/Terminal to USB Converter with NKRO
Post by: Soarer on Sat, 09 November 2013, 21:59:25
with AT keyboard attached, 2.28V on clock line. XT it is 2.84V.

AT has LEDs, and they do not flash. Not even a flicker.

On data line, reading .69V when keyboard is plugged in.

I tried a few tests, and the closest I got to these voltages was 0.5V on both clock and data, when the +5V line was disconnected from the keyboard. When the +5V from the keyboard was connected to GND on the Teensy, both were even lower, about 0.27V. I'm not prepared to try connecting the keyboard's power in reverse, but, assuming it didn't emit smoke, I'd expect a similar 0.27V or thereabouts.

I can't think how to get anything like 2.2 to 2.8V with the various resistances available  - the pull-up within the Teensy is very roughly 25kOhm, so it would require something similar to that pulling down. The other option would be that it is constantly flitting between 0V and 5v (and the multimeter averages it), but then the converter should be putting out more error messages.

Also, I don't know why there's the difference between data and clock voltages, on yours.

Hmm  :confused:
Title: Re: XT/AT/PS2/Terminal to USB Converter with NKRO
Post by: Hellmark on Sun, 10 November 2013, 00:37:14
Right now, I am kinda tempted to bypass the connector, and solder directly to the test pads, and see how it goes. I really wonder if i dorked up the plug.
Title: Re: XT/AT/PS2/Terminal to USB Converter with NKRO
Post by: Soarer on Sun, 10 November 2013, 05:18:07
I dunno - measuring the resistances from the test pads to the Teensy seemed to show that the connector is fine.

What's the voltage at the Vcc test pad?
Title: Re: XT/AT/PS2/Terminal to USB Converter with NKRO
Post by: Hellmark on Mon, 11 November 2013, 07:39:02
VCC test pad to Ground test pad = 1.529V
Ground to data = 110mV
ground to clock (black on ground) = -1.257V
Title: Re: XT/AT/PS2/Terminal to USB Converter with NKRO
Post by: Soarer on Mon, 11 November 2013, 08:17:56
Well that's clearly not the voltages we want there! They would account for the single R05 symptom, so we're getting somewhere :)

It doesn't correlate at all with the resistances between the test pads and the Teensy though (reply 986) - if those were correct, there's no way we could see a -ve voltage on clock w.r.t. ground. In fact, the only way we'd see a -ve voltage anywhere w.r.t. ground is if ground wasn't wired to ground! (Which would probably also mean that at least one other wire isn't wired correctly).

Just to verify - when you measured the resistances, was it all the way from the test pads to the Teensy pins and not just between the test pads and the keyboard's controller or cable connector?

A photo of your Teensy wiring would be really helpful in case there's something visibly wrong!
Title: Re: XT/AT/PS2/Terminal to USB Converter with NKRO
Post by: Hellmark on Mon, 11 November 2013, 08:48:34
When I tested resistance, I tested black on test pad to red on pins on the teensy. Wanted to make sure things went between the adapter and the cable.

Attached are how things are looking right now.

The pink looking thing is a bit of shrink tubing to help make sure that nothing shorted out on the case ground.
Title: Re: XT/AT/PS2/Terminal to USB Converter with NKRO
Post by: Soarer on Mon, 11 November 2013, 09:10:40
That look OK.

So with everything plugged in, what's the voltage on the Teensy Vcc w.r.t ground? (I've been assuming that it's still 5V as it should be, since the Teensy appears to be running, and the USB port would probably have shut down otherwise).
Title: Re: XT/AT/PS2/Terminal to USB Converter with NKRO
Post by: Hellmark on Wed, 13 November 2013, 07:33:39
Ground test pad to VCC pin on teensy, VCC test pad to ground pin on teensy, test pad to test pad, and pin to pin, doesn't matter, all register at 1.5V.

For ****s and grins, I tried going off the other ground and VCC pins on the teensy, and all works now!

Just to let you know that this works, I am typing this from the XT now, and will be taking it with me to work.

I really forgot about the different thwack sound of the F verses the M. Really been a long time since I had a chance to use one of these. I am really happy considering that I will be having some marathon sessions at work this week because of the final portion of the data center migration, so I am happy that I have this keyboard going. Right now on OSX, so no arrow keys since I cannot disable the numlock, but oh well. I have the keyboard working and that is what matters. That's a problem of the OS and not the keyboard or convertor, and could be overcome with changing the key mapping if I really want to, but probably won't monkey with since this is going to be used on Linux and Windows.
Title: Re: XT/AT/PS2/Terminal to USB Converter with NKRO
Post by: Hellmark on Wed, 13 November 2013, 07:39:06
Ok, after bringing it in to work with me, I realized that I definitely need to tweak the keymapping. The function keys are mapped to other things like media control, and for my work, I really need the function keys. Guess next step is to try and figure that out.
Title: Re: XT/AT/PS2/Terminal to USB Converter with NKRO
Post by: Soarer on Wed, 13 November 2013, 21:14:08
Hah, great!

Must be something bad about that Vcc and/or GND pin then - maybe a broken track, or a bad joint on the header pin. If you feel like it sometime, measure some voltages and resistances between the Vcc and GND pins on the Teensy to see if you can find the answer! (resistances when powered off, naturally). But I totally understand if you're sick of it by now!

Some remappings for sure... a layer is what you need :D
Title: Re: XT/AT/PS2/Terminal to USB Converter with NKRO
Post by: Hellmark on Wed, 13 November 2013, 23:47:26
Yeah, definitely curious as to what may be the deal. I know when I measure voltage between the two pins I had it on before, it is 5V, when no draw, but then drops after keyboard is connected.

Oh, I definitely want to do a layer. Figure have Capslock be function. Function Shift for Capslock. Function F1 for F11 and Function F2 for F12. Some other random keys for rest of the F keys.

Any idea why Control and Alt wouldn't work out of the box? Tried on 3 machines (Win7, a *nix box, and one running OS X), and they didn't seem do anything. Even key testing programs didn't register anything.
Title: Re: XT/AT/PS2/Terminal to USB Converter with NKRO
Post by: Soarer on Thu, 14 November 2013, 04:35:21
No idea - they should just work even with no config at all. You said the F-keys were media keys... what config have you got loaded at the moment?
Title: Re: XT/AT/PS2/Terminal to USB Converter with NKRO
Post by: Hellmark on Thu, 14 November 2013, 07:05:20
I had tried fooling with configs, I think the last was wcass's, but I had uploaded the firmware several times after that so I figured the config had been overwritten. I just made the empty config into a binary and wrote that onto the teensy, and function keys act like normal, and control works.

Seems like I have to really mash on the key to get alt to work now, so I am thinking it is an issue with the XT keyboard. Same goes with capslock and numpad 0
Title: Re: XT/AT/PS2/Terminal to USB Converter with NKRO
Post by: Soarer on Thu, 14 November 2013, 10:16:49
The Teensy loader doesn't blank the EEPROM, so the config remains. (Other non-Teensy loaders can blank it). I try to keep compatibiliity so that a later firmware works with an earlier config :)

Often there's no damage to the springs, and reseating the keycaps (maybe a few times!) can sort them out.

If a hammer has been dislodged or some dirt has got in, it might need disassembling to clean it out - a bit fiddly, but not too hard. Just remember to take all the keycaps EXCEPT the spacebar off first, or the hammers will fly out! There's a trick to getting it back together - use a bit of fishing line or similar to hold the spacebar hammer in place.
Title: Re: XT/AT/PS2/Terminal to USB Converter with NKRO
Post by: Hellmark on Thu, 14 November 2013, 11:57:39
The spring looks like it should be ok. When I've seen dislodged hammers on my M's, the springs are off at a different angle. I'll try reseating those keys a few times, and see if that'll help.
Title: Re: XT/AT/PS2/Terminal to USB Converter with NKRO
Post by: vivalarevolución on Sun, 17 November 2013, 08:35:07
Sorry if this is a repetitive post, but I am attempting to run hid_listen so I can determine the key codes for my keyboard for remapping, but I cannot get the hid_listen program to even work.

I went to the Prjc website and followed their instructions for hid_listen, and read some posts in this thread, but nothing seems to happen.  Help please?
Title: Re: XT/AT/PS2/Terminal to USB Converter with NKRO
Post by: Soarer on Sun, 17 November 2013, 08:59:48
If hid_listen just says "Waiting for device:......" (is that what you mean by nothing?) and keeps printing dots it means that either the converter .hex file hasn't been loaded, or that the device is in bootloader mode. (Pressing the reset button on the Teensy (are you using a Teensy?) takes it into bootloader mode; it doesn't run the loaded .hex).
Title: Re: XT/AT/PS2/Terminal to USB Converter with NKRO
Post by: vivalarevolución on Sun, 17 November 2013, 09:25:31
If hid_listen just says "Waiting for device:......" (is that what you mean by nothing?) and keeps printing dots it means that either the converter .hex file hasn't been loaded, or that the device is in bootloader mode. (Pressing the reset button on the Teensy (are you using a Teensy?) takes it into bootloader mode; it doesn't run the loaded .hex).

What I mean by nothing is I have Terminal open in Mac and I cannot get anything but this screen:

[attach=1]

I am way off.  I do not even know how to get hid_listen to say "waiting for device" or hid_listen to simply work as the prjc website instructs.

I am pretty sure that I am not in Bootloader mode because I have been using this Teensy converter for a couple weeks and everything works fine.

Is the Teensy loader application somehow involved in this hid_listen process?

Is there some step-by-step instructions on how to use hid_listen somewhere?
Title: Re: XT/AT/PS2/Terminal to USB Converter with NKRO
Post by: Soarer on Sun, 17 November 2013, 10:19:02
OK, I just tried the process out from scratch...

1. Right click hid_listen.mac (http://www.pjrc.com/teensy/hid_listen.mac) and save to Downloads.
2. Open Terminal and enter the following commands:
3. mv Downloads/hid_listen.mac .
4. chmod 755 hid_listen.mac
5. ./hid_listen.mac

Note the '.' on the end of the command in step 3, with a space before it.

(If I didn't save to Downloads I got a file named hid_listen.pnt instead of hid_listen.mac (I used Safari), so the PJRC instructions might need updating).
Title: Re: XT/AT/PS2/Terminal to USB Converter with NKRO
Post by: vivalarevolución on Sun, 17 November 2013, 13:20:27
OK, I just tried the process out from scratch...

1. Right click hid_listen.mac (http://www.pjrc.com/teensy/hid_listen.mac) and save to Downloads.
2. Open Terminal and enter the following commands:
3. mv Downloads/hid_listen.mac .
4. chmod 755 hid_listen.mac
5. ./hid_listen.mac

Note the '.' on the end of the command in step 3, with a space before it.

(If I didn't save to Downloads I got a file named hid_listen.pnt instead of hid_listen.mac (I used Safari), so the PJRC instructions might need updating).

Ok, thanks.  That's what I needed to relieve my cluelessness.  I got things working and I think that I can figure out the remapping now that I will know what each key is doing. 
Title: Re: XT/AT/PS2/Terminal to USB Converter with NKRO
Post by: Soarer on Sun, 17 November 2013, 14:04:47
Excellent. Now, if you copy it to your desktop (using Finder or whatever) and remove the extension by renaming it to hid_listen, it will start by double-clicking on it :D
Title: Re: XT/AT/PS2/Terminal to USB Converter with NKRO
Post by: vivalarevolución on Tue, 26 November 2013, 22:28:44
Ok, so I am trying to get into remapping and ifselect and layers and all that.  I am familiar with the instructions from wcass.  However, I am having trouble saving a document with a ".sc" extension.  I am using the basic text editor in Mac OS.    Any advice?

Also, I am assuming a dos prompt is the Terminal?
Title: Re: XT/AT/PS2/Terminal to USB Converter with NKRO
Post by: Soarer on Wed, 27 November 2013, 08:01:23
Yes, Terminal is the equivalent to Windows dos prompt.

You'll need to change TextEdit Preferences to stop it appending '.txt', see here (http://support.apple.com/kb/ta20406). Also, the format must be changed to plain text - either just for the current file using the Format menu, or as a default for all new files in the Preferences.

In fact, my tools don't actually care what extension is used, as long as the config file is plain text, but it helps to use a distinct extension to distinguish them :)
Title: Re: XT/AT/PS2/Terminal to USB Converter with NKRO
Post by: Hellmark on Wed, 27 November 2013, 08:04:52
If you're on a Mac, then you want to use Terminal. It isn't a DOS prompt. May look similar, but very very different.

Edit the file with any text editor, then use the scas tool to convert it to a format that can be used directly on the Teensy (the converted file will need the extension .scb). After you convert it, use scwr to send the converted configuration to the teensy.

If you're starting from scratch (a new, blank file, that you're picking the name for), and using TextEdit, when hitting Save, select Plain Text as the file format, and have the filename include the .sc at the end.
Title: Re: XT/AT/PS2/Terminal to USB Converter with NKRO
Post by: Soarer on Wed, 27 November 2013, 08:10:32
That sounds easier :D I hadn't opened TextEdit until a few moments ago - I normally just use 'vi' from the command line :-\
Title: Re: XT/AT/PS2/Terminal to USB Converter with NKRO
Post by: TacticalCoder on Wed, 11 December 2013, 11:25:17
Hey all,

I asked a question here and user 'damorgue' pointed me to Soarer's teensy thinggy:

http://geekhack.org/index.php?topic=52158.0 (http://geekhack.org/index.php?topic=52158.0)

and suggested that I'd post my question here after reading this whole thread (which I did but it's so big already that I may have missed quite a few things).

Could this thing be used to, in addition to "XT/AT/PS2/Terminal to USB", also do "USB to USB"? Basically I'd like the remapping (on my HHKB) to be done at a lower-level than the OSes (Linux, OpenBSD, Windows, OS X, whatever) so that the OS has clearly no say about which key I did physically press.

For example I'd like to have one modifier key (not the HHBK's 'fn' key, which I find poorly located), say the key physically at the left of the spacebar, act as a modifier and have that "modifier + ijkl" send arrow keys. But from the OS's point of view I want it to be exactly as if a real arrow key was pressed, with no way whatsoever for the OS to detect that I didn't really press an arrow key.

I know that "PS/2 to USB" adapters do exist (for example I've got several "blue cubes"), but I don't even know if "USB to PS/2" adapters exists. If they do, could I simply do "HHKB  -> USB-to-PS/2  ->  Soarer's teensy ->  USB" and plug that to my computers?



Title: Re: XT/AT/PS2/Terminal to USB Converter with NKRO
Post by: Soarer on Wed, 11 December 2013, 15:30:45
This doesn't support USB in, and there are no active USB-to-PS/2 converters afaik.

There's a thread on DT about USB-to-USB (http://deskthority.net/workshop-f7/is-remapping-a-usb-keyboard-using-teensy-possible-t2841.html) 'converters' for adding in custom functionality, and a couple of choices for firmware, but I'm not sure whether any have seen development in the last year or so.

A better solution is hasu's replacement HHKB controller (http://geekhack.org/index.php?topic=12047.0), either with custom PCB or with Teensy 2.0 or ++ (more pics (http://deskthority.net/workshop-f7/hardware-dvorak-hhkb-t3415.html)). The mod is fully reversible; it just plugs in. With this you'd be able to use the Fn key for something, which you couldn't with a USB-to-USB step.

You'd have to customize source code for any of these options.
Title: Re: XT/AT/PS2/Terminal to USB Converter with NKRO
Post by: TacticalCoder on Wed, 11 December 2013, 16:07:49
The mod is fully reversible; it just plugs in. With this you'd be able to use the Fn key for something, which you couldn't with a USB-to-USB step.

thanks a lot Soarer, will look into that !

Title: Re: XT/AT/PS2/Terminal to USB Converter with NKRO
Post by: JPG on Sun, 15 December 2013, 13:49:12
OK, I got my first model F yesterday, and even if I can't use for real yet, I am in love with the way it feels! Makes my filco feels cheap when comparing both side by side. Except for the F spacebar that is quite stiff, but I read that it can be mod.

So I am now in a desperate need for a soarer converter!. Since I want to leave my F pretty much untouched, I would like to build an external converter. My F is an XT 5150 (I am pretty sure, not opened yet, but the pictures correspond and it has the round din connector. But since I am new to this kind of things, even after reading most of this thread, I would appreciate some tips on the parts to get. From what I understand, I would need a teensy (or similar variant, someone posted a 5$ thing recently, just can't find it now), a female din plug, a box to put it in, and some wire with bread board to put it all together, with the usb cable (already have one). So it would be super nice if someone could give me some recommendations!

Also, well I would like to mod the spacebar to be lighter. I tried to search on the forum, but the search feature is not giving me what I want. And even if it's build like a thank, I am sure I would manage to break something. Finally, if someone has other tips to restore an F it would be appreciated!

Thx all  :thumb:
Title: Re: XT/AT/PS2/Terminal to USB Converter with NKRO
Post by: fohat.digs on Sun, 15 December 2013, 15:46:27
There are several ways to accomplish this. I built a box and a variety of adapters for different connections. The most challenging was the one commonly called "RJ45" that I showed in post #901.

For some reason project boxes cost a lot more in black than in beige. This is really cheap, but shipping will be 2-3 weeks from China.

http://www.ebay.com/itm/301037216227?ssPageName=STRK:MEWNX:IT&_trksid=p3984.m1497.l2649 (http://www.ebay.com/itm/301037216227?ssPageName=STRK:MEWNX:IT&_trksid=p3984.m1497.l2649)


Title: Re: XT/AT/PS2/Terminal to USB Converter with NKRO
Post by: Soarer on Sun, 15 December 2013, 17:44:44
The XT spacebar mods in much the same way as the AT mod (http://geekhack.org/index.php?topic=48288.0).
Title: Re: XT/AT/PS2/Terminal to USB Converter with NKRO
Post by: JPG on Sun, 15 December 2013, 18:31:43
The XT spacebar mods in much the same way as the AT mod (http://geekhack.org/index.php?topic=48288.0).

Hum, so the mod is to change the F spacebar with one from a M? But I like this 10x spacebar! And I kind off think that the layout is not as bad as people think it is on my XT. Haven't used in real typing situations, but it seems ok to me and relatively compact too! The worse key seems to be then enter, but I could get used to it!

Well, I will see if I have the guts to take it apart, with no replacement parts. I will probably try to give a look at least and see if I could maybe lube the spacebar stabs or the likes. I think I will start with making the converter so I can use it for real and see from there. Thx for all the info!
Title: Re: XT/AT/PS2/Terminal to USB Converter with NKRO
Post by: Soarer on Sun, 15 December 2013, 18:39:10
Oh, wait, not that one! There was one somewhere about making the spacebar less strong...
Title: Re: XT/AT/PS2/Terminal to USB Converter with NKRO
Post by: E TwentyNine on Sun, 15 December 2013, 18:47:28
There's one about changing the bend in the wire over at deskthority:

http://deskthority.net/workshop-f7/model-f-improvement-dis-assembly-tips-and-space-bar-mod-t6982.html
Title: Re: XT/AT/PS2/Terminal to USB Converter with NKRO
Post by: Soarer on Sun, 15 December 2013, 18:58:55
Yeah, that's the one I was thinking of. For some reason I thought it was about the AT. Anyway, they both have the same kind of spring in them.
Title: Re: XT/AT/PS2/Terminal to USB Converter with NKRO
Post by: JPG on Sun, 15 December 2013, 19:31:26
Yeah, that's the one I was thinking of. For some reason I thought it was about the AT. Anyway, they both have the same kind of spring in them.

Thx a lot. Looks much harder than I would have liked lol. Maybe I will grow some thumb muscles for now and see once I have my converter built!
Title: Re: XT/AT/PS2/Terminal to USB Converter with NKRO
Post by: fohat.digs on Sun, 15 December 2013, 20:34:47
Looks much harder than I would have liked lol.

Cracking a Model F completely open and putting it back together is not for the faint of heart, but it does create an opportunity for a very thorough (and usually much needed) cleaning.

That complicated undercarriage stabilizer system on the small Fs is a real piece of work.

Think of using a weighted thread when you put it back together.
Title: Re: XT/AT/PS2/Terminal to USB Converter with NKRO
Post by: lukabuz on Mon, 16 December 2013, 11:55:10
 Hello, I recently bough an IBM Model M that has an rj-45 connector. But, the cables on the connector do not match the picture you have given for the rj-45 connector. The colors of the cables are: blank, metal, white, yellow, red, black, blank, blank
(http://i.imgur.com/yDHde62.jpg)
Can you help me identify what cables are for what(vcc, data, clock, gnd, PE)?
Title: Re: XT/AT/PS2/Terminal to USB Converter with NKRO
Post by: fohat.digs on Mon, 16 December 2013, 12:41:27
You should not trust colors. I made an adapter to go to a standard plug in post #901
Title: Re: XT/AT/PS2/Terminal to USB Converter with NKRO
Post by: Soarer on Mon, 16 December 2013, 12:42:06
It does match, but perhaps the colours aren't what you expected! Silly IBM. The metal one is PE, which is the shielding ground.
Title: Re: XT/AT/PS2/Terminal to USB Converter with NKRO
Post by: lukabuz on Mon, 16 December 2013, 12:49:17
It does match, but perhaps the colours aren't what you expected! Silly IBM. The metal one is PE, which is the shielding ground.
Yes, but when you look at both my connector and your picture the same angle, in my picture, there are two blanks on the right and one blank on the left, while on your picture its the other way around
Title: Re: XT/AT/PS2/Terminal to USB Converter with NKRO
Post by: Soarer on Mon, 16 December 2013, 13:01:26
It does match, but perhaps the colours aren't what you expected! Silly IBM. The metal one is PE, which is the shielding ground.
Yes, but when you look at both my connector and your picture the same angle, in my picture, there are two blanks on the right and one blank on the left, while on your picture its the other way around

[attachimg=1]

Problem solved!  :cool:
Title: Re: XT/AT/PS2/Terminal to USB Converter with NKRO
Post by: lukabuz on Mon, 16 December 2013, 13:04:53
It does match, but perhaps the colours aren't what you expected! Silly IBM. The metal one is PE, which is the shielding ground.
Yes, but when you look at both my connector and your picture the same angle, in my picture, there are two blanks on the right and one blank on the left, while on your picture its the other way around

(Attachment Link)

Problem solved!  :cool:
is that a joke or is it really how that should be?
Also, is there any way I could use an arduino leonardo instead of a teensy?(they have the same chip)
Title: Re: XT/AT/PS2/Terminal to USB Converter with NKRO
Post by: Soarer on Mon, 16 December 2013, 13:28:29
No joke - the socket diagrams are looking IN to the socket, and that's how the plug lines up to it.

Leonardo should work fine. Use Arduino pin D3 for PD0, and pin D2 for PD1.
Title: Re: XT/AT/PS2/Terminal to USB Converter with NKRO
Post by: fohat.digs on Mon, 16 December 2013, 13:29:22
thanks, Soarer

this is your arena

Title: Re: XT/AT/PS2/Terminal to USB Converter with NKRO
Post by: lukabuz on Mon, 16 December 2013, 13:32:38
yes but how do I load the program onto the arduino itself? Can you tell me which cables go to which pins?
Sorry to bother you with these questions, I don't really know much about this.
Title: Re: XT/AT/PS2/Terminal to USB Converter with NKRO
Post by: lukabuz on Mon, 16 December 2013, 14:09:15
 Never mind, I have managed to make the converter work with arduino and it works very well. Thank you very much for your help! I am loving my model m so far :)
Title: Re: XT/AT/PS2/Terminal to USB Converter with NKRO
Post by: Soarer on Mon, 16 December 2013, 14:24:57
Ah, good! Because to be honest I can't remember how to get a .hex onto a Leonardo, it's been so long! :))

Title: Re: XT/AT/PS2/Terminal to USB Converter with NKRO
Post by: lukabuz on Mon, 16 December 2013, 14:51:33
 I used arduinobuilder. Which key is escape?
Title: Re: XT/AT/PS2/Terminal to USB Converter with NKRO
Post by: Soarer on Mon, 16 December 2013, 15:30:17
Top-left key of the numpad by default. You can remap it, of course. You might find configs\Halvar.sc a good starting point for making your own config :)
Title: Re: XT/AT/PS2/Terminal to USB Converter with NKRO
Post by: fohat.digs on Mon, 16 December 2013, 16:11:30
how do I load the program onto the arduino itself?

I used arduinobuilder.

I have ordered one of these "Leonardo Pro Micro ATmega32U4 Arduino" too.

Can you explain your process for me? I am much better with drills and hammers than I am with software.
Title: Re: XT/AT/PS2/Terminal to USB Converter with NKRO
Post by: Halvar on Mon, 16 December 2013, 16:22:23
@fohat.digs: urbancamo described how to do it on DT lately:

http://deskthority.net/photos-videos-f8/ibm-model-m-1395764-with-curious-graphic-legends-1989-t6407.html#p135750

I haven't tried it yet (my Pro Micro clone is still in the mail).
Title: Re: XT/AT/PS2/Terminal to USB Converter with NKRO
Post by: fohat.digs on Mon, 16 December 2013, 17:11:14
@fohat.digs: urbancamo described how to do it on DT lately:

I haven't tried it yet (my Pro Micro clone is still in the mail).


Thank you. I downloaded it, but Avast made it very difficult, convinced that it was bad, I suppose.

Mine is also in the mail, but I hope to get it soon.
Title: Re: XT/AT/PS2/Terminal to USB Converter with NKRO
Post by: JPG on Mon, 16 December 2013, 18:38:35
Ordered a "Leonardo Pro Micro ATmega32U4 Arduino" for my converter, and some stuff to build it!

Wait time now!
Title: Re: XT/AT/PS2/Terminal to USB Converter with NKRO
Post by: sjbeck86 on Wed, 18 December 2013, 22:30:47
Hello all. I recently took an old keyboard that was going to be thrown away. I want to  use Soarer's teensy converter on it and gift it to a friend who I think would really enjoy it. My only problem is that I have no idea what the pinout is. I can find very little information about it on the internet. What I do know is it is a Cherry G80-1080 and appear to use a 4P4C. Because of the common connector and having no idea what it goes to I can't figure out how to correctly wire it. I'm fairly sure trial and error would not have good results  :p Any help would be greatly appreciated!

(http://i.imgur.com/vzdHKW6h.jpg)
(http://i.imgur.com/xYPSjzW.jpg)
(http://i.imgur.com/T8DLUiAh.jpg)
Title: Re: XT/AT/PS2/Terminal to USB Converter with NKRO
Post by: Soarer on Wed, 18 December 2013, 23:51:51
Welcome! :D

That's a pretty unusual keyboard; I don't know whether I've seen that layout before on a Cherry.-branded 'board, or any with a 4P4C connector. It's somewhat similar to the WYSE 3161 keyboard in layout, in the connector, and some of the legends seem to match it as well. So I'm not sure if this converter will handle it... but I'm also working on a WYSE converter :cool:

Some pics of the insides, and/or the markings on the chips, might help identify it. Following the PCB tracks from where the cable connects should identify power and ground fairly easily. Do you have a multimeter?

Here's the WYSE 3161 keyboard for comparison:

[attachimg=1]

And then there's a more original IBM keyboard (http://deskthority.net/photos-videos-f8/ibm-model-m-1395764-with-curious-graphic-legends-1989-t6407.html?hilit=3161), which lacks F13 to F16, but has the same extra markings on the numpad as the WYSE 3161.
Title: Re: XT/AT/PS2/Terminal to USB Converter with NKRO
Post by: sjbeck86 on Thu, 19 December 2013, 21:44:10
Here are some more shots of the board that might help in identifying it. While I had it apart yesterday I hadn't thought to take a picture of the back. I do have a multimeter, although I'm pretty new to working on electronics. I just wanted to thank you for your help!

(http://i.imgur.com/znjbunQ.jpg)
(http://i.imgur.com/ar2nMg3.jpg)
(http://i.imgur.com/ndINsYs.jpg)
(http://i.imgur.com/3Eif1JV.jpg)
Title: Re: XT/AT/PS2/Terminal to USB Converter with NKRO
Post by: Soarer on Fri, 20 December 2013, 05:56:39
Ah good, it will be easier with a multimeter than tracing tracks by eye! Just by the components present, a PS/2 type of interface is looking like a possibility. If your multimeter has a continuity setting that beeps when the probes are shorted together that's all we need, if it doesn't then use a resistance range and the display.

First we're looking for which wires connect to power and ground, and the easiest place to find those is on the smaller logic chips, pins 14 and 7:

(http://makeyourownchip.tripod.com/7407diagram.GIF)

Then it's time to attach it to a Teensy (or Arduino Leonardo, or...) using pins PD0 and PD1 and run the logic analyzer (http://deskthority.net/workshop-f7/simple-logic-analyzer-for-teensy-t4567.html) hex to see if the other two wires are outputting data, and if so, what format it is in. If you're really lucky, it's PS/2 and the wiring will be correct to try the converter hex (50% chance that clock and data would need to be swapped, so perhaps make those connections temporary at one end since it's easy to damage the tracks on a Teensy when removing a wire).
Title: Re: XT/AT/PS2/Terminal to USB Converter with NKRO
Post by: lukabuz on Fri, 20 December 2013, 09:44:24
 Which key is num lock?
Title: Re: XT/AT/PS2/Terminal to USB Converter with NKRO
Post by: Soarer on Fri, 20 December 2013, 10:42:22
Which key is num lock?

Next one along!
Title: Re: XT/AT/PS2/Terminal to USB Converter with NKRO
Post by: IvanIvanovich on Fri, 20 December 2013, 19:29:56
I have a similar model, an 1191, PCB 601-1701 rev.00. If yours is the same PCB...
[attach=1]
It's good chance that is what it will be, as it is on mine.
Title: Re: XT/AT/PS2/Terminal to USB Converter with NKRO
Post by: Soarer on Fri, 20 December 2013, 19:59:55
Thanks Ivano! Does your 'board speak regular Extended Set 2 protocol?

Actually... did you mean the 1207? What do its 4 extra keys output as?

(http://i426.photobucket.com/albums/pp349/lysol8086/DSC01680_zps5dd5ff2c.jpg)
Title: Re: XT/AT/PS2/Terminal to USB Converter with NKRO
Post by: IvanIvanovich on Sat, 21 December 2013, 11:41:04
I got rid of that one, well even it's the same as the 1191 internally. 1191 have the same exact pcb but dosen't have the 4 extra function soldered on. Windows didn't understand what the extra 4 function keys and ignored them. I couldn't tell you what it told me in aqua anymore for scancode. It's a normal PS/2 keyboard.
Title: Re: XT/AT/PS2/Terminal to USB Converter with NKRO
Post by: Soarer on Sat, 21 December 2013, 12:04:55
Ah, I see, thanks! Possibly the extra keys were meant to work with some terminal emulation software, so it wouldn't matter if they weren't recognized otherwise. Anyway, that does improve the odds that the 4P4C version is also PS/2!

Still worth checking power and ground before wiring the 4P4C version up though, just to be sure!
Title: Re: XT/AT/PS2/Terminal to USB Converter with NKRO
Post by: IvanIvanovich on Sat, 21 December 2013, 13:27:00
Good chance it's PS/2 or otherwise I would guess it was meant as aftermarket for Wyse/Reynolds/Link/etc terminal and would speak that. Sometimes it is hard to figure out what things are with Cherry, they did some really odd things at times like the weirdness that is my G80-2550 terminal AS400 layout... I am still not sure what the hell that speaks. I also have some G80 that seem to be serial over a DIN5 AT plug?
Title: Re: XT/AT/PS2/Terminal to USB Converter with NKRO
Post by: gogi-goji on Sun, 22 December 2013, 23:16:01
When foraging in my dad's lab for a replacement power supply for my computer, I happened across this forgotten beauty hidden away in a cupboard:

http://imgur.com/P01MGrf

I've never felt any kind of keyboard other than rubber domes or scissor switches before, so I was somewhat entranced by the feel of the keys in this keyboard and took it home.  Nobody at the lab while I was there could remember where it came from.  It's part number is 1801449, but searching that didn't really get me anywhere.  From what my searching could gather, it's a Model F PC/XT keyboard, made between 1983-87.  It has a 5 pin DIN connector (which is the same as for AT keyboards, right?).  Does that all sound like accurate information, and am I using the terminology correctly?

Elsewhere in the lab, I did find a AT to PS2 adapter cable, but I don't have any computers with PS2 ports or PS2/USB converters to try it out with.  So I thought that I might build one of Soarer's converters and learn some basics about circuitry and microprocessors in the process!  (I also thought it'd be nice to be able to get some some notification LEDs and remap a couple of things on the keyboard to make the funky layout more usable.)

Of course, I don't know how to solder, so I thought I'd do it on a breadboard.  Is it possible to get any kind of DIN 5 pin connector to plug into a breadboard, or at least connect it without soldering?  Where should I look?  (Shipping to Canada, or physical Canadian stores to go to)
Title: Re: XT/AT/PS2/Terminal to USB Converter with NKRO
Post by: fohat.digs on Mon, 23 December 2013, 07:40:44
I don't know how to solder, so I thought I'd do it on a breadboard.  Is it possible to get any kind of DIN 5 pin connector to plug into a breadboard, or at least connect it without soldering?  Where should I look?  (Shipping to Canada, or physical Canadian stores to go to)

You can't avoid connecting a few wires. At the minimum, you will have to strip 4 wires from the keyboard side to make the connection to the Teensy.

The connector is the same as the AT, that is good news. If you can find a female AT connector, cut it off for the wiring to the Teensy to preserve the original cable.

Figure out what gender of wiring you need, these guys sell variations.


http://www.ebay.com/itm/40pcs-20cm-Dupont-Male-to-Female-Breadboard-Jumper-Wire-For-Raspberry-Pi-Arduino-/171065859856?pt=LH_DefaultDomain_0&hash=item27d451df10
Title: Re: XT/AT/PS2/Terminal to USB Converter with NKRO
Post by: Soarer on Mon, 23 December 2013, 08:57:25
Yeah, breadboards really aren't ideal for a permanent setup. I think there are some PCB mount 5-pin DIN sockets that have pins spaced so they'll fit in a breadboard - but the pins are short and it wouldn't be very secure! OK for testing though.

A more permanent non-solder option is to fit a Teensy-with-pins inside the keyboard using female-to-female jumper wires (but then you can't fit LEDs).
Title: Re: XT/AT/PS2/Terminal to USB Converter with NKRO
Post by: gogi-goji on Tue, 24 December 2013, 18:39:31
Thanks for chiming in!  Fair points about the delicacy of a breadboard-based solution, but at the very least I'd probably want to test things out on a breadboard first to make sure I can get everything actually working before messing around with getting a case and more-permanent wiring set up for the converter.

So I don't need to sacrifice the original cable at the alter of experimentation, is there any reason something like https://www.adafruit.com/products/1134 (https://www.adafruit.com/products/1134) or https://www.sparkfun.com/products/9536 (https://www.sparkfun.com/products/9536) wouldn't work?  If so, then I could use that for testing, and perhaps something in the vein of http://store.curiousinventor.com/5-pin-midi-din-panel-mount-connector.html (http://store.curiousinventor.com/5-pin-midi-din-panel-mount-connector.html) in a more permanent solution inside some sort of case for the converter.
Title: Re: XT/AT/PS2/Terminal to USB Converter with NKRO
Post by: Soarer on Tue, 24 December 2013, 19:14:18
Yep, that plan would work fine and tide you over until you decide on a case etc. :D

Probably worth getting some 6" jumper wires at the same time: at least M-M (for breadboarding), and maybe F-F (useful for connecting to various plugs and Teensy pins etc).
Title: Re: XT/AT/PS2/Terminal to USB Converter with NKRO
Post by: Pacifist on Sat, 28 December 2013, 23:11:10
Noob here

Can I get a 122 key 1390876 with the 5 pin cord to work with the soarers convertor? I found a page with info about the plug at

http://www.seasip.info/VintagePC/ibm_1390876.html

edit: its a terminal and soarers will work with it
Title: Re: XT/AT/PS2/Terminal to USB Converter with NKRO
Post by: fohat.digs on Sun, 29 December 2013, 08:01:09
Get something like this if you want to preserve your original cable:

http://www.ebay.com/itm/5-PIN-DIN-SOCKET-270-DEGREES-FEMALE-INLINE-PACK-Of-5-/120543224004?pt=UK_BOI_Electrical_Components_Supplies_ET&hash=item1c10efa0c4 (http://www.ebay.com/itm/5-PIN-DIN-SOCKET-270-DEGREES-FEMALE-INLINE-PACK-Of-5-/120543224004?pt=UK_BOI_Electrical_Components_Supplies_ET&hash=item1c10efa0c4)


Title: Re: XT/AT/PS2/Terminal to USB Converter with NKRO
Post by: damorgue on Wed, 01 January 2014, 13:34:12
Lets say I make a converter which has 4 different types of sockets soldered to the teensy at the same time. I don't think they will interfere with one another assuming only one keyboard is plugged in. I am however wondering what would happen if one would accidentally connect two boards at the same time. I am certain it will cause havoc and not work, but will it short/break something?
Title: Re: XT/AT/PS2/Terminal to USB Converter with NKRO
Post by: Soarer on Wed, 01 January 2014, 14:22:12
No, it won't break anything :)
Title: Re: XT/AT/PS2/Terminal to USB Converter with NKRO
Post by: damorgue on Wed, 01 January 2014, 14:37:38
I am just waiting for the last few parts. I have found panel-mountable sockets for most of the connectors that are relevant. I will put them inside a small aluminum box with the teensy and create a neat little universal adapter.

Edit: Could the two 1kOhm pull-up resistors be placed one between PD0 and Vcc and the second between PD1 and Vcc straight on the teensy 2.0?
Title: Re: XT/AT/PS2/Terminal to USB Converter with NKRO
Post by: fohat.digs on Wed, 01 January 2014, 17:20:35
I will put them inside a small aluminum box with the teensy and create a neat little universal adapter.

I considered that, and it is very cool, but eventually I came to the conclusion that the most direct and straightforward configuration would be a box with a single female receptacle. I used the AT ("large DIN") style plug and built a set of short pigtail adapters to mate with it.

That included:

Female 240 degree DIN to male AT (for IBM terminals),

Female PS/2 to male AT (for most "quasi-modern" keyboards), and

Female "RJ45" (actually 8C8P ethernet coupler with the proper 4 wires connected) to male AT (for other terminal keyboards).


Regular "old-school" keyboards, which are the majority of what people will use here (including Model F AT and XT) will plug in directly.

Last, I just need to figure out how to pin an ancient serial keyboard and the ADB (so I can use it with those great Alps Apple Extended Keyboards) and I will be all done.
Title: Re: XT/AT/PS2/Terminal to USB Converter with NKRO
Post by: fauxsoul on Sat, 04 January 2014, 02:09:29
I am going to be using a long cable and I just wanted to clarify, where exactly do I put the pull up resistors?
Title: Re: XT/AT/PS2/Terminal to USB Converter with NKRO
Post by: Soarer on Sat, 04 January 2014, 11:29:23
You might not need resistors at all, unless your cable is very long; most standard cables should be fine without them.

They should be somewhere near the Teensy end. Exactly where depends on how you're building your converter. If you're using stripboard to mount the Teensy onto, then on there is ideal. If you're using a panel mounted DIN socket, then attaching them onto its pins is probably easiest. Otherwise, you could fit them into the Teensy's holes, and then solder the wires from data and clock onto the legs of the resistors. Taking care to avoid shorting anything out, of course.  Lot's of choices!
Title: Re: XT/AT/PS2/Terminal to USB Converter with NKRO
Post by: Pacifist on Sun, 05 January 2014, 01:13:03
Get something like this if you want to preserve your original cable:

http://www.ebay.com/itm/5-PIN-DIN-SOCKET-270-DEGREES-FEMALE-INLINE-PACK-Of-5-/120543224004?pt=UK_BOI_Electrical_Components_Supplies_ET&hash=item1c10efa0c4 (http://www.ebay.com/itm/5-PIN-DIN-SOCKET-270-DEGREES-FEMALE-INLINE-PACK-Of-5-/120543224004?pt=UK_BOI_Electrical_Components_Supplies_ET&hash=item1c10efa0c4)

anything in the USA for this?
Title: Re: XT/AT/PS2/Terminal to USB Converter with NKRO
Post by: fauxsoul on Sun, 05 January 2014, 02:52:21
You might not need resistors at all, unless your cable is very long; most standard cables should be fine without them.

They should be somewhere near the Teensy end. Exactly where depends on how you're building your converter. If you're using stripboard to mount the Teensy onto, then on there is ideal. If you're using a panel mounted DIN socket, then attaching them onto its pins is probably easiest. Otherwise, you could fit them into the Teensy's holes, and then solder the wires from data and clock onto the legs of the resistors. Taking care to avoid shorting anything out, of course.  Lot's of choices!


Thank you for your response, and taking the time to do this work in general.
The cable that I will be using is 3 meters, so if I did add the pullup resistors I would place them between the Teensy and the din?
Sorry I'm kind of new to things like this.

http://imgur.com/KYT0FO2 (http://imgur.com/KYT0FO2)

Wired up just waiting for my keyboard in the mail.


Title: Re: XT/AT/PS2/Terminal to USB Converter with NKRO
Post by: Soarer on Sun, 05 January 2014, 09:26:09
At 3 metres you should be fine without pullups.

They could be fitted across pins of the DIN, kinda like this (except they don't fit as neatly as drawn):

[attachimg=1]

Title: Re: XT/AT/PS2/Terminal to USB Converter with NKRO
Post by: fauxsoul on Sun, 05 January 2014, 10:08:06
At 3 metres you should be fine without pullups.

They could be fitted across pins of the DIN, kinda like this (except they don't fit as neatly as drawn):

(Attachment Link)

Sounds good thank you, I will just leave them out for now.
Title: Re: XT/AT/PS2/Terminal to USB Converter with NKRO
Post by: meeeeeep on Tue, 07 January 2014, 10:49:56
Hmm... My AltGr is reported as LAlt (VK=A4, SC=038) and my WinKey is not found (VK=EA, SC=05C) using Soarer Converter v1.12 with Teensy 2.0 on my Swedish Steelseries 7G keyboard.

Is the source code available so i can try to fix this myself?

Edit: Normally without the converter the AltGr key translates to LControl (VK=A2, SC=01D) + RAlt (VK=A5, SC=138) and the WinKey translates to RWin (VK=5C, SC=15C).
Title: Re: XT/AT/PS2/Terminal to USB Converter with NKRO
Post by: Soarer on Tue, 07 January 2014, 15:21:27
It sounds like the 7G isn't sending the normal scan code sequences for those keys. My guess is that it's using something other than E0 to indicate an extended set 2 code, since dropping the E0 turns right alt into left alt, and left gui into keypad comma (which is only recognised on certain layouts, like Brazilian).

Can you try running running hid_listen (http://www.pjrc.com/teensy/hid_listen.html) to see what codes are actually coming from the keyboard?
Title: Re: XT/AT/PS2/Terminal to USB Converter with NKRO
Post by: Pacifist on Tue, 07 January 2014, 15:23:23
122 coming in two days, pro micro coming in 2 weeks

So I solder the pins to the pro micro, solder wire from the terminal cable to the pro micro, then load the software on the pro micro, and I'm set?
Title: Re: XT/AT/PS2/Terminal to USB Converter with NKRO
Post by: Soarer on Tue, 07 January 2014, 15:38:55
Pretty much (assuming you've decided to cut the plug off the IBM cable).

You don't have to use the pins, but they do give a good solid place to solder to if you're a bit clumsy with the iron!  :))
Title: Re: XT/AT/PS2/Terminal to USB Converter with NKRO
Post by: Pacifist on Tue, 07 January 2014, 15:47:42
Pretty much (assuming you've decided to cut the plug off the IBM cable).

You don't have to use the pins, but they do give a good solid place to solder to if you're a bit clumsy with the iron!  :))

Cool, thanks! Will cut the plug because its unlikely I'll ever find a terminal board
Title: Re: XT/AT/PS2/Terminal to USB Converter with NKRO
Post by: fohat.digs on Tue, 07 January 2014, 18:47:58
unlikely I'll ever find a terminal board

In reply #901 I showed my terminal adapter pigtail to work with my female DIN (aka AT) socket. You might want to be able to test another keyboard some day.
Title: Re: XT/AT/PS2/Terminal to USB Converter with NKRO
Post by: meeeeeep on Wed, 08 January 2014, 15:40:10
It sounds like the 7G isn't sending the normal scan code sequences for those keys. My guess is that it's using something other than E0 to indicate an extended set 2 code, since dropping the E0 turns right alt into left alt, and left gui into keypad comma (which is only recognised on certain layouts, like Brazilian).

Can you try running running hid_listen (http://www.pjrc.com/teensy/hid_listen.html) to see what codes are actually coming from the keyboard?

Sure:

[example] A-key:
r1C +04 d04 (when first pressing)
r1C (while being pressed, this code repeats)
rF0 r1C -04 u04 (when releasing)

[example] Left Alt-key:
r11 +E2 dE2
r11
rF0 r11 -E2 uE2

[broken] Swedish Right Alt-key (labeled Alt Gr):
rE0 r11 +E2 dE2
rE0 r11
rE0 rF0 r11 -E2 uE2

[broken] Right Windows-key:
rE0 r27 +8C d8C
rE0 r27
rE0 r27 rE0 rF0 r27 -8C u8C
Title: Re: XT/AT/PS2/Terminal to USB Converter with NKRO
Post by: Soarer on Wed, 08 January 2014, 15:49:07
Hmm, that looks normal. Maybe it's not being detected as an extended set 2 keyboard... what does hid_listen say when you first connect the USB end of the converter? Should tell us the keyboard ID and which set etc.
Title: Re: XT/AT/PS2/Terminal to USB Converter with NKRO
Post by: meeeeeep on Thu, 09 January 2014, 08:01:40
Hmm, that looks normal. Maybe it's not being detected as an extended set 2 keyboard... what does hid_listen say when you first connect the USB end of the converter? Should tell us the keyboard ID and which set etc.

Device disconnected.
Waiting for new device:............................

Listening:
rAA wEE rEE wF2 rFA

remaining: FFFC


Keyboard ID: 0000
Code Set: 2
Mode: AT/PS2
Title: Re: XT/AT/PS2/Terminal to USB Converter with NKRO
Post by: Soarer on Thu, 09 January 2014, 08:11:50
Yep, that's the problem right there - it's not replying with any ID! That is technically a bug with the 7G's implementation of PS/2 protocol.

You'll need to use a config file, and add this line to it:

Code: [Select]
force set2ext

Then compile it with scas and write it to the converter with scwr (or just drag/drop it onto scaswr.bat if you're using Windows). The Teensy should be in normal running mode to do that, not bootloader mode.
Title: Re: XT/AT/PS2/Terminal to USB Converter with NKRO
Post by: JPG on Fri, 10 January 2014, 15:35:43
Hey all, I just ordered an IBM model F with the 122 style layout. The info I found on it (from deskauthority) is that it has some inactive keys. Will these keys be totally not working or will there be a way to make em work with the converter?

Thx for the answer!
Title: Re: XT/AT/PS2/Terminal to USB Converter with NKRO
Post by: fohat.digs on Fri, 10 January 2014, 16:15:28
Will these keys be totally not working or will there be a way to make em work with the converter?

Lucky you. Welcome to the aircraft carrier club.

All my keys worked straight away with Soarer's Converter and a Teensy, after it was set up with the hex file.

Use the wcass method (reply # 560) to program the weird keys for whatever you want.

PS - if you are talking about the "secret keys" that is something different
Title: Re: XT/AT/PS2/Terminal to USB Converter with NKRO
Post by: JPG on Fri, 10 January 2014, 21:26:49
Will these keys be totally not working or will there be a way to make em work with the converter?

Lucky you. Welcome to the aircraft carrier club.

All my keys worked straight away with Soarer's Converter and a Teensy, after it was set up with the hex file.

Use the wcass method (reply # 560) to program the weird keys for whatever you want.

PS - if you are talking about the "secret keys" that is something different

What secret keys are you talking about? The ones for the ansi mod?
Title: Re: XT/AT/PS2/Terminal to USB Converter with NKRO
Post by: fourzeropooh on Fri, 10 January 2014, 22:56:10
Hey all, I just ordered an IBM model F with the 122 style layout. The info I found on it (from deskauthority) is that it has some inactive keys. Will these keys be totally not working or will there be a way to make em work with the converter?

Thx for the answer!

The $55 one?
Title: Re: XT/AT/PS2/Terminal to USB Converter with NKRO
Post by: JPG on Fri, 10 January 2014, 22:57:30
Hey all, I just ordered an IBM model F with the 122 style layout. The info I found on it (from deskauthority) is that it has some inactive keys. Will these keys be totally not working or will there be a way to make em work with the converter?

Thx for the answer!

The $55 one?

Yea
Title: Re: XT/AT/PS2/Terminal to USB Converter with NKRO
Post by: fourzeropooh on Fri, 10 January 2014, 23:03:07
Hey all, I just ordered an IBM model F with the 122 style layout. The info I found on it (from deskauthority) is that it has some inactive keys. Will these keys be totally not working or will there be a way to make em work with the converter?

Thx for the answer!

The $55 one?

Yea

Nice :thumb:
Title: Re: XT/AT/PS2/Terminal to USB Converter with NKRO
Post by: minium on Sat, 11 January 2014, 00:14:35
Will these keys be totally not working or will there be a way to make em work with the converter?

Lucky you. Welcome to the aircraft carrier club.

All my keys worked straight away with Soarer's Converter and a Teensy, after it was set up with the hex file.

Use the wcass method (reply # 560) to program the weird keys for whatever you want.

PS - if you are talking about the "secret keys" that is something different

I bought one from the same BIN. I have the M version and was wondering, is an M122 also an aircraft carrier? 'Cause that was my first thought when I stripped it down and saw the plastic barrel board. Maybe the F is a Nimitz Class.

ps. your rant on BIN was what helped me jump on it. thx.
Title: Re: XT/AT/PS2/Terminal to USB Converter with NKRO
Post by: bhtooefr on Thu, 16 January 2014, 06:19:51
Which version?

The original version of the Model M 122-key looks externally like a Model F 122-key, but has a plastic base instead of steel.

The later version has smaller bezels.
Title: Re: XT/AT/PS2/Terminal to USB Converter with NKRO
Post by: fohat.digs on Thu, 16 January 2014, 07:24:39
Which version?

They are all about 22"x8"x2" but the F-122 weighs over 8 pounds and the M-122 is about 6.
Title: Re: XT/AT/PS2/Terminal to USB Converter with NKRO
Post by: minium on Thu, 16 January 2014, 10:50:06
This is the M-122 that I bought: http://www.ebay.com/itm/181248084476 . To my eye it looks like an F, except that it doesn't have stepped keys or a black back. The "Model: M" on the back should be the clincher ;-) . My F-122 will be here next week. I'll have to get out the luggage scale and weigh both of them.
Title: Re: XT/AT/PS2/Terminal to USB Converter with NKRO
Post by: bhtooefr on Thu, 16 January 2014, 11:20:21
That's the early one.

The late one has a bezel that's only as thick as a 1391401.
Title: Re: XT/AT/PS2/Terminal to USB Converter with NKRO
Post by: Pacifist on Sun, 26 January 2014, 17:32:16
I have a terminal M, want to cut the wires where the grey cable starts and then solder them to a pro micro.

(http://i.imgur.com/6Tlpyg6.jpg)

Which color wire goes with which part? I'm pretty confused



pro micro pins:
(http://deskthority.net/resources/pins-on-leonardo-pro-micro-for-soarer-s-converter/9181)
Title: Re: XT/AT/PS2/Terminal to USB Converter with NKRO
Post by: fohat.digs on Sun, 26 January 2014, 18:21:06

Which color wire goes with which part? I'm pretty confused


You can trace them backwards from the diagram if you have a very thin probe.
Title: Re: XT/AT/PS2/Terminal to USB Converter with NKRO
Post by: JPG on Thu, 30 January 2014, 21:00:11
Hi Soarer,

I received my pro micro and tried to load the hex onto it but I get a strange error and would like your feedback on it. Here's what I did so far:

(I am on Windows 7 btw)
1. I installed the arduino software to get the driver and avrdude and winavr since I realised quite late that the arduino thing had it, but anyway.
2. I put the pro micro on a breadboard and plugged a usb cable in it and in my computer. It was detected as a Leonardo on COM3. I put a cable in the rst pin and then in the grd pin next to it.
3. I copied the Soarer_at2usb_v1.12_atmega32u4.hex on my c.
4. I opened a command window and typed the following: avrdude -patmega32u4 -cavr109 -PCOM3 -Uflash:w:Soarer_at2usb_v1.12_atmega32u4.hex
5. then avrdude starts and says : connecting to programmer. After a while, it gives me the following message: Found programmer: Id = "<- ("; Type = clover symbol (the symbol itself) Software version =  . ; Hardware version = . avrdude: error:  buffered memory access not supported. Maybe it isn't a butterfly/avr109 but a avr910 device?

So do you have any idea on what to do from there? What I could have done wrong? I rebooted my computer to make sure it was not a new driver issue, with no success. I am quite n00b at this so all help would be welcome!

edit: btw, after some googling, only info I found on this problem points to usb port/cable issue or reset issue. I tried 3 different usb ports and go the same error. Cable is cheap, got some new on the way, so maybe ... as for reset, is there a way of telling it happened?
Title: Re: XT/AT/PS2/Terminal to USB Converter with NKRO
Post by: Soarer on Thu, 30 January 2014, 22:12:47
I think you're almost there... to reset it have the wire in rst and just tap the other end against the USB socket to ground it briefly. Then Windows might load the driver again, on a different COM port. You only get about 8 seconds after resetting, so get your command line ready first, then reset, then quickly hit enter to run the command.

Mine came with an LED blink hex loaded onto it, so when the flashing stopped it was running the bootloader.
Title: Re: XT/AT/PS2/Terminal to USB Converter with NKRO
Post by: JPG on Thu, 30 January 2014, 22:40:00
I think you're almost there... to reset it have the wire in rst and just tap the other end against the USB socket to ground it briefly. Then Windows might load the driver again, on a different COM port. You only get about 8 seconds after resetting, so get your command line ready first, then reset, then quickly hit enter to run the command.

Mine came with an LED blink hex loaded onto it, so when the flashing stopped it was running the bootloader.

Woot, it worked! For everyones knowledge, when you reset it you will see the Leonardo disappear from de devices in the ports and be replaced with a bootloader (in a different com port for me). So I had to try it 2-3 times before I had the good setup with the good port in the command line. Also, to reset, I had to poke the usb connector more than I expected, but it end up working anyway.

Let's hope I'll manage to hook it up correctly tomorrow and try my XT at least!

Thx a lot Soarer. There will probably be more questions to come, but one thing at a time  :thumb:
Title: Re: XT/AT/PS2/Terminal to USB Converter with NKRO
Post by: fohat.digs on Fri, 31 January 2014, 09:22:56
I appreciate you guys doing all the dirty work for me.

I have had one of these for a month but have not taken it out of the bag yet because I was not in the mood to waste a bunch of time.
Title: Re: XT/AT/PS2/Terminal to USB Converter with NKRO
Post by: JPG on Fri, 31 January 2014, 09:29:37
I appreciate you guys doing all the dirty work for me.

I have had one of these for a month but have not taken it out of the bag yet because I was not in the mood to waste a bunch of time.


If you encounter any problem just post it and I'll share my experience as best as I can! It's always a small detail that makes the difference between a succes and a failure and often the error you get tells you close to nothing!


By the way, something I did not mention is that you need to be in the folder where your .hex is when you are in the command line window. For example, by default I was in the c:\users\user directory and I had copied my .hex directly on my c drive. So a basic cd .. twice got me back on the c directly and it worked. As long as you are at the same place as the .hex it should work.
Title: Re: XT/AT/PS2/Terminal to USB Converter with NKRO
Post by: bcg on Sun, 02 February 2014, 13:12:29
Hi guys... I have my AT Model F connected via Soarer's converter, its working well except I don't like how the shift keys work with the number pad... for example if I have num lock off and I do Shift+Home it outputs a 7 ... I use Shift+Home, Shift+End, and Shift+Insert all the time so this is kind of a pain... is there any easy way to remap that ?  thanks
Title: Re: XT/AT/PS2/Terminal to USB Converter with NKRO
Post by: JPG on Tue, 04 February 2014, 21:57:02
Hi Soarer,

I finally soldered a basic DIN5 female connector to my pro micro that I had loaded with the hex. I plugged my XT keyboard to it and plugged it with a usb cable to my computer.

It is being detected as a soarer keyboard but nothing happens when I press a key. I started hid_listen and here's what I get when I plug the keyboard:

Listening:
wEE

remaining: FFFC


Keyboard ID: 0000
Code Set: 1
Mode: PC/XT

I tested the continuity on my female connector and it seems fine but I am new to all of this (haven't played with a multimeter for 15 years).

Whatever I press nothing happens. The keyboard has not been tested since I got it since I didn't have a converter on hand, but it was supposed to be working.

What should I do from there?
Title: Re: XT/AT/PS2/Terminal to USB Converter with NKRO
Post by: Soarer on Wed, 05 February 2014, 06:20:16
Double-check that the socket isn't wired backwards.

Then the best way to test is to open the XT and test continuity for all four lines all the way from the Pro Micro to the XT's PCB. See here (http://geekhack.org/index.php?topic=17458.msg1108249#msg1108249).
Title: Re: XT/AT/PS2/Terminal to USB Converter with NKRO
Post by: Soarer on Wed, 05 February 2014, 15:15:17
Hi guys... I have my AT Model F connected via Soarer's converter, its working well except I don't like how the shift keys work with the number pad... for example if I have num lock off and I do Shift+Home it outputs a 7 ... I use Shift+Home, Shift+End, and Shift+Insert all the time so this is kind of a pain... is there any easy way to remap that ?  thanks

Which OS? (That stuff works OK for me on Windows).

I've got stuff like numpad modes and 'ways to react to lock state' on my to-do list... but also a lot else!
Title: Re: XT/AT/PS2/Terminal to USB Converter with NKRO
Post by: bcg on Thu, 06 February 2014, 16:35:27
Hi guys... I have my AT Model F connected via Soarer's converter, its working well except I don't like how the shift keys work with the number pad... for example if I have num lock off and I do Shift+Home it outputs a 7 ... I use Shift+Home, Shift+End, and Shift+Insert all the time so this is kind of a pain... is there any easy way to remap that ?  thanks

Which OS? (That stuff works OK for me on Windows).

I've got stuff like numpad modes and 'ways to react to lock state' on my to-do list... but also a lot else!

Debian Linux w/ Menta desktop environment

Probably something in my X settings... I'll take a look, thanks Soarer
Title: Re: XT/AT/PS2/Terminal to USB Converter with NKRO
Post by: JPG on Sat, 08 February 2014, 13:01:40
Double-check that the socket isn't wired backwards.

Then the best way to test is to open the XT and test continuity for all four lines all the way from the Pro Micro to the XT's PCB. See here (http://geekhack.org/index.php?topic=17458.msg1108249#msg1108249).

Hi Soarer,

I tested the continuity and they were all fine. After looking once more at where I plugged each cable and seeing all was fine as far as I understand it, I plugged it again, and got the same result. Then I unplugged each cable on the breadboard on which my pro micro is and I saw one had some kind of plastic on the metal part that is plugged (the clock one). So I removed this plastic thing and then I got a signal. Here's what I get when I plug it in now:

[attachimg=1]

I saw that these r something are bad, but don't know how to correct them... n00b needs help here!
Title: Re: XT/AT/PS2/Terminal to USB Converter with NKRO
Post by: fohat.digs on Sat, 08 February 2014, 14:34:57
Does the converter support the Commodore Amiga A2000?

Can I just plug it in to my external Teensy box, or do I have to reset something?

Thanks!
Title: Re: XT/AT/PS2/Terminal to USB Converter with NKRO
Post by: Soarer on Sat, 08 February 2014, 14:42:16
JPG - If you get one rFF for each key press and each release, that probably means that the data line isn't connected somewhere.

I'm not sure you did the continuity test quite how I meant, since you had a problem with clock still! I really meant to test from each pad on the XT's PCB, to the corresponding pin right on the Pro Micro, which would test every connection in between.

But now that clock is working, you could just pull the data wire out of the breadboard and see if you get the same behaviour :)
Title: Re: XT/AT/PS2/Terminal to USB Converter with NKRO
Post by: Soarer on Sat, 08 February 2014, 15:05:48
Does the converter support the Commodore Amiga A2000?

Can I just plug it in to my external Teensy box, or do I have to reset something?

Thanks!


Nope. It looks (http://amigadev.elowar.com/read/ADCD_2.1/Hardware_Manual_guide/node0173.html) quite simple - simpler than XT, in fact, with no start bit - but there's a startup and re-sync sequence to cope with before it will talk.

Nothing will blow up if you connect it; the pinout and signalling seem to be the same as XT/AT (just the protocol is different). But you'll get a lot of R05 errors!

If I get one I'll code for it, but it looks too tricky to code without the keyboard at hand.
Title: Re: XT/AT/PS2/Terminal to USB Converter with NKRO
Post by: JPG on Sun, 09 February 2014, 10:42:24
JPG - If you get one rFF for each key press and each release, that probably means that the data line isn't connected somewhere.

I'm not sure you did the continuity test quite how I meant, since you had a problem with clock still! I really meant to test from each pad on the XT's PCB, to the corresponding pin right on the Pro Micro, which would test every connection in between.

But now that clock is working, you could just pull the data wire out of the breadboard and see if you get the same behaviour :)

Well, I get this result without pressing any key. And yea, I tested the continuity from the pcb pins to the pcb pads, will do it from pads to pro micro next time.

I will do some more testing then and see what I can get from it, but when I was pressing a key nothing happened after the initial flow of rFF. More debugging to go!
Title: Re: XT/AT/PS2/Terminal to USB Converter with NKRO
Post by: Pacifist on Mon, 10 February 2014, 22:23:23
So I tried installing Arduino. I tried (but could not succeed) in installing avrdude. Tried arduino builder: what was recommended here: http://deskthority.net/photos-videos-f8/ibm-model-m-1395764-with-curious-graphic-legends-1989-t6407.html#p135750

and nothing. The hex never got flashed over to the pro micro.

Does anyone else have other options? Apart from getting a teensy (of which two have been ordered in jdcarpes GB and are last ditch for this convertor)
Title: Re: XT/AT/PS2/Terminal to USB Converter with NKRO
Post by: jdcarpe on Mon, 10 February 2014, 22:40:21

So I tried installing Arduino. I tried (but could not succeed) in installing avrdude. Tried arduino builder: what was recommended here: http://deskthority.net/photos-videos-f8/ibm-model-m-1395764-with-curious-graphic-legends-1989-t6407.html#p135750

and nothing. The hex never got flashed over to the pro micro.

Does anyone else have other options? Apart from getting a teensy (of which two have been ordered in jdcarpes GB and are last ditch for this convertor)

Keep trying over and over again with avrdude. Short RST to GND and wait about a second, then hit enter on your avrdude programming command at the command line. Try that over and over until it finally works. Took me over 20 tries, I'm certain, before it successfully flashed to my Pro Micro clone.
Title: Re: XT/AT/PS2/Terminal to USB Converter with NKRO
Post by: Pacifist on Mon, 10 February 2014, 22:49:57

So I tried installing Arduino. I tried (but could not succeed) in installing avrdude. Tried arduino builder: what was recommended here: http://deskthority.net/photos-videos-f8/ibm-model-m-1395764-with-curious-graphic-legends-1989-t6407.html#p135750

and nothing. The hex never got flashed over to the pro micro.

Does anyone else have other options? Apart from getting a teensy (of which two have been ordered in jdcarpes GB and are last ditch for this convertor)

Keep trying over and over again with avrdude. Short RST to GND and wait about a second, then hit enter on your avrdude programming command at the command line. Try that over and over until it finally works. Took me over 20 tries, I'm certain, before it successfully flashed to my Pro Micro clone.

I will do that. After 5ish tries, I started giving up. I guess I have to brute force it.

Thanks for the help!
Title: Re: XT/AT/PS2/Terminal to USB Converter with NKRO
Post by: Soarer on Tue, 11 February 2014, 06:19:12
Double-tap reset to ground, then it should stay in bootloader mode for a few seconds.
Title: Re: XT/AT/PS2/Terminal to USB Converter with NKRO
Post by: JPG on Tue, 11 February 2014, 06:25:10
For everyone knowledge, here's a more complete list of steps I did to load my pro micro:





1. I installed the arduino software to get the driver and avrdude and winavr since I realised quite late that the arduino thing had it, but anyway.
2. I put the pro micro on a breadboard and plugged a usb cable in it and in my computer. It was detected as a Leonardo on COM3. I put a cable in the rst pin.
3. I copied the Soarer_at2usb_v1.12_atmega32u4.hex on my c.
4. I opened a command window and typed the following: avrdude -patmega32u4 -cavr109 -PCOM3 -Uflash:w:Soarer_at2usb_v1.12_atmega32u4.hex (Don't press enter yet and be sure you are located on the directory where the converter is, on the c drive for me, you can use cd .. to go back and other cd commands to move to the directory you use)
5. Then you need to open your device window where you see your ports and you connect a cable to the rst pin and tap the other side to the micro usb connector (I had to do it a few times to make it works).
6. When it works, you will see your Leonardo device being disconnected in your port list, and a bootloader will appear and will last for around 5 seconds. You need to first look at which port it will use.
7. Then you change the port in you command line to put the one you saw for the bootloader (PCOM6 for example).
8. Then you tap the cable again to get your bootloader and when it appears you press enter in the command line. It should start loading your hex at this point.


P.S.: Taping the cable to get the bootloader to show has not been so easy. Try different parts of the usb connector (sides worked better for me, and holes in it too, I don't know why).
Title: Re: XT/AT/PS2/Terminal to USB Converter with NKRO
Post by: Hubbert on Sat, 15 February 2014, 11:38:28
Thanks again for all the great work.  Now that 1.0 is long released, is there any chance of releasing the source?
Title: Re: XT/AT/PS2/Terminal to USB Converter with NKRO
Post by: Soarer on Sun, 16 February 2014, 08:36:56
I keep thinking about it, but never seem to find a good time to do it. Unless I can find a way to remove certain info from the git repo, I won't be able to simply make my repo public. In all likelihood, I'll have to start a new repo without any history, which is a pain.
Title: Re: XT/AT/PS2/Terminal to USB Converter with NKRO
Post by: Hubbert on Sun, 16 February 2014, 12:30:03
Yeah, I hate to make extra non-fun work for you.  You've done such a great job of promptly maintaining the software so far that opening the source might not really speed development much.  But maybe it would help occasionally.
Title: Re: XT/AT/PS2/Terminal to USB Converter with NKRO
Post by: vivalarevolución on Sun, 16 February 2014, 15:21:09
If you're on a Mac, then you want to use Terminal. It isn't a DOS prompt. May look similar, but very very different.

Edit the file with any text editor, then use the scas tool to convert it to a format that can be used directly on the Teensy (the converted file will need the extension .scb). After you convert it, use scwr to send the converted configuration to the teensy.

If you're starting from scratch (a new, blank file, that you're picking the name for), and using TextEdit, when hitting Save, select Plain Text as the file format, and have the filename include the .sc at the end.

So after a couple months of procrastination, I have got back to attempting a remap.  I am using wcass's instructions from way back on page 19, but I cannot seem to get past the first step of drag and dropping the scas.exe file.  I know of the tools in the Docs folder, but dragging and dropping scas into Terminal does not seem to do anything.  All it says is "no such file or directory" or if I just enter "scas" into terminal, it says "command not found".

So do I use this scas tool in Terminal?  And where do I find this tools folder that I need to drag and drop from?

If you're on a Mac, then you want to use Terminal. It isn't a DOS prompt. May look similar, but very very different.

Edit the file with any text editor, then use the scas tool to convert it to a format that can be used directly on the Teensy (the converted file will need the extension .scb). After you convert it, use scwr to send the converted configuration to the teensy.

If you're starting from scratch (a new, blank file, that you're picking the name for), and using TextEdit, when hitting Save, select Plain Text as the file format, and have the filename include the .sc at the end.

So after a couple months of procrastination, I have got back to attempting a remap.  I am using wcass's instructions from way back on page 19, but I cannot seem to get past the first step of drag and dropping the scas.exe file.  I know of the tools in the Docs folder, but dragging and dropping scas into Terminal does not seem to do anything.  All it says is "no such file or directory" or if I just enter "scas" into terminal, it says "command not found".

So do I use this scas tool in Terminal?  And where do I find this tools folder that I need to drag and drop from?

EDIT:  Nevermind, I found the tools in v. 1.10.  I mistakingly thought the latest version would have all the tools that I needed.
Title: Re: XT/AT/PS2/Terminal to USB Converter with NKRO
Post by: vivalarevolución on Sun, 16 February 2014, 18:19:52
Alright, I figured it all out once I was able to locate that tools folder.
Title: Re: XT/AT/PS2/Terminal to USB Converter with NKRO
Post by: Soarer on Sun, 16 February 2014, 19:45:48
Sorry, yeah, tacking 'update' on the end of the zip name has become a pattern, so I don't mention it every time these days! I should add 'full' to the complete ones perhaps.
Title: Re: XT/AT/PS2/Terminal to USB Converter with NKRO
Post by: JPG on Mon, 17 February 2014, 20:01:42
Well I finally managed to make it work. My setup was a n00b total mess, but at least I had to connexions right.

My setup is still temporary since I removed the cable, plugged some female DuPont connector directly in the pins for the cable, thx for the test pads! The female cables are going out where the original cable goes and they are plugged directly in the pro micro.

Just sad that my 8 key is dead, but for home it's not a major issue. The stiff spacebar and the weird layout will need time getting used to until I get the guts to fully open the layer sandwich and solve these issues!

Soon it will be time to test my F122, but I am still super happy that it's working for now!!!

Thx a lot Soarer, your converter is absolutely amazing! If not for some little difficulties loading the hex and having a proper connexion, it would have been quite plug and play!
Title: Re: XT/AT/PS2/Terminal to USB Converter with NKRO
Post by: Pacifist on Tue, 18 February 2014, 19:36:39
Does anybody know where to buy XT female sockets to use with this converter?
Title: Re: XT/AT/PS2/Terminal to USB Converter with NKRO
Post by: fohat.digs on Tue, 18 February 2014, 19:49:11
Does anybody know where to buy XT female sockets to use with this converter?

Don't know what you are looking for. I used the first one of these for my outboard Teensy.

http://www.ebay.com/itm/5-pcs-Metal-shell-5-Pin-DIN-Plug-Female-socket-Connector-Cables-Soldering-DIY-/130974257924?pt=LH_DefaultDomain_0&hash=item1e7eac9304

http://www.ebay.com/itm/2-Studer-Revox-54-02-0310-5-Pin-Din-Socket-NOS-/121275704801?pt=Vintage_Electronics_R2&hash=item1c3c9865e1
http://www.ebay.com/itm/PS2-MALE-PLUG-TO-AT-FEMALE-SOCKET-KEYBOARD-ADAPTER-CABLE-/390683050301?pt=UK_VintageComputing_RL&hash=item5af686413d


http://www.ebay.com/itm/5-Tube-Socket-DIN-5-Pin-Connector-Audio-signal-Female-Fits-Sherline-AT-Keyboard-/201039342046?pt=Vintage_Electronics_R2&hash=item2ecee0e9de
Title: Re: XT/AT/PS2/Terminal to USB Converter with NKRO
Post by: JPG on Tue, 18 February 2014, 20:40:38
Does anybody know where to buy XT female sockets to use with this converter?

I found some on ebay. The XT use the DIN5 180 degree, same for AT. But the F122 use the 270 degree DIN5. I bought a DIN6 female for it and since it has the same layout but with an additional pin in the middle, it still works.

Can't say it's the best quality, but it works.

If you go back a few pages, I am pretty sure someone posted a link for a better quality female connector from mouser or something the likes, but the cost was much more.

And in fact, for my XT, for now I am not using the female at all. Instead (it should be temporary), I just plugged some female cable (the DuPont ones) directly where the cable is usually plugged and they go out from the cable hole and I plug them in my pro micro. Very artisanal and temporary, but it works for now!

BTW, I am typing this with my F122. It's so amazing! Thx Soarer again!
Title: Re: XT/AT/PS2/Terminal to USB Converter with NKRO
Post by: JPG on Wed, 19 February 2014, 09:50:51
Does anybody know where to buy XT female sockets to use with this converter?


Look at this (both 1$ free shipping):


for XT/AT DIN5 180°: http://www.ebay.ca/itm/DIN-Female-Jack-Cable-Connector-adapter-5-Pin-plug-panel-mount-solder-type-/280758416755?pt=US_Audio_Cable_Plugs_Jacks&hash=item415e817573&_uhb=1


for 270° DIN5 (F122): http://www.ebay.ca/itm/140624223277?ssPageName=STRK:MEWNX:IT&_trksid=p3984.m1497.l2648


I ordered the 270° one and use it with my F122 and it's doing a very ok job.

Title: Re: XT/AT/PS2/Terminal to USB Converter with NKRO
Post by: Pacifist on Wed, 19 February 2014, 19:40:14
http://www.ebay.com/itm/Arduino-Pro-Mini-w-Free-Headers-ATMEGA328P-16MHz-5V-ATMEGA328-Fast-USA-Ship-/161094027756?pt=LH_DefaultDomain_0&hash=item2581f3c9ec

Anybody tried pro mini? Has a built in reset button and is atmega328

Does anybody know where to buy XT female sockets to use with this converter?


Look at this (both 1$ free shipping):


for XT/AT DIN5 180°: http://www.ebay.ca/itm/DIN-Female-Jack-Cable-Connector-adapter-5-Pin-plug-panel-mount-solder-type-/280758416755?pt=US_Audio_Cable_Plugs_Jacks&hash=item415e817573&_uhb=1


for 270° DIN5 (F122): http://www.ebay.ca/itm/140624223277?ssPageName=STRK:MEWNX:IT&_trksid=p3984.m1497.l2648


I ordered the 270° one and use it with my F122 and it's doing a very ok job.

I'll grab one of those 180 degree pins
Title: Re: XT/AT/PS2/Terminal to USB Converter with NKRO
Post by: Soarer on Wed, 19 February 2014, 20:08:39
http://www.ebay.com/itm/Arduino-Pro-Mini-w-Free-Headers-ATMEGA328P-16MHz-5V-ATMEGA328-Fast-USA-Ship-/161094027756?pt=LH_DefaultDomain_0&hash=item2581f3c9ec

Anybody tried pro mini? Has a built in reset button and is atmega328

'328 is not supported, it doesn't have hardware USB like the '32U4.
Title: Re: XT/AT/PS2/Terminal to USB Converter with NKRO
Post by: JPG on Sun, 23 February 2014, 20:04:24
My thoughts of the day:

1. Soarer's converter is amazing and so easy to use.
2. I LOVE my F122. The layout is just perfect except that if I could find one without a numpad ... let me dream for this space unsaver!!!
3. I must admit, the XT layout is really painful. Really... so sad they are the most available of all F's.
Title: Re: XT/AT/PS2/Terminal to USB Converter with NKRO
Post by: JBert on Mon, 24 February 2014, 10:16:18
I keep thinking about it, but never seem to find a good time to do it. Unless I can find a way to remove certain info from the git repo, I won't be able to simply make my repo public. In all likelihood, I'll have to start a new repo without any history, which is a pain.
Actually, git has some destructive commands to change your history: Github: Remove sensitive data (https://help.github.com/articles/remove-sensitive-data). Just make sure you have enough backups of the original repo.

It mentions git-filter-branch or BFG repo-cleaner, but there's also Eric S. Raymond's reposurgeon tool (http://www.catb.org/esr/reposurgeon/) which allows you to splice out commits.

Again, keep in mind that this new repo will be radically different. I don't know how well branches or tags are preserved, as the commit hashes will be changed for any retouched commit and its descendants in the chain. Did I mention making backups?
Title: Re: XT/AT/PS2/Terminal to USB Converter with NKRO
Post by: Soarer on Mon, 24 February 2014, 20:45:53
Last time I looked I found git-filter-branch, but not reposurgeon, thanks! It has a couple of comands I'd need, that I couldn't quite figure out how to do properly with git-filter-branch. An effectively fresh repo, with fresh hashes, isn't a problem as long as history, branches and tags are present and dated correctly.

No matter what though, it's a big and tedious task, even just to check that the alterations/removals have been made 100% correctly, and don't remain lurking somewhere. It might be simpler to just manually create a fresh repo and push (possibly modified) snapshots of 1.0, 1.01, ... 1.11, 1.12 into it, plus branches that haven't merged back in yet. The dates would be wrong, but it would be *something*!
Title: Re: XT/AT/PS2/Terminal to USB Converter with NKRO
Post by: JPG on Mon, 24 February 2014, 23:57:59
Last time I looked I found git-filter-branch, but not reposurgeon, thanks! It has a couple of comands I'd need, that I couldn't quite figure out how to do properly with git-filter-branch. An effectively fresh repo, with fresh hashes, isn't a problem as long as history, branches and tags are present and dated correctly.

No matter what though, it's a big and tedious task, even just to check that the alterations/removals have been made 100% correctly, and don't remain lurking somewhere. It might be simpler to just manually create a fresh repo and push (possibly modified) snapshots of 1.0, 1.01, ... 1.11, 1.12 into it, plus branches that haven't merged back in yet. The dates would be wrong, but it would be *something*!

It would be very nice of you!

Also, as far as I experienced yet, I need to maintain a function key down for the corresponding layer to be active. But is there an alternative option to do the likes: Press function key once = go to function layer until the same key is pressed again or until you press another function layer? My purpose is to do something in the likes: press capslock to go to function layer, use this layer (for me it's a nav layer) and once I am done I just press capslock again to go back to my original layer (the main one). Not an absolute necessity, but it could be nice I think (I have yet to try it lol).
Title: Re: XT/AT/PS2/Terminal to USB Converter with NKRO
Post by: JBert on Tue, 25 February 2014, 02:58:37
I implement such layer locks using SELECT, if you can live with the fact that the "layer lock" button is different from your Fn key.

Here's a small example (note that I didn't test this one):
Code: [Select]
# Regular keyboard map
ifselect any
remapblock
layer 0
CAPS_LOCK SELECT_1
        APP FN1
endblock

# Link fn keys to layer number.
layerblock
FN1 1
endblock

remapblock
layer 1
I UP
J LEFT
K DOWN
L RIGHT
endblock

# Locked layer starts here, override default selected layer 0.
ifselect 1
remapblock
layer 0
I UP
J LEFT
K DOWN
L RIGHT
endblock

I don't know how fast the controller switches between SELECTs so I wouldn't recommend holding Caps lock.

It might also be possible to trigger the layer lock using Fn + some key, but I'll let you experiment with those yourself.
Title: Re: XT/AT/PS2/Terminal to USB Converter with NKRO
Post by: nuclearsandwich on Thu, 27 February 2014, 23:28:01
I keep thinking about it, but never seem to find a good time to do it. Unless I can find a way to remove certain info from the git repo, I won't be able to simply make my repo public. In all likelihood, I'll have to start a new repo without any history, which is a pain.

I can help with scrubbing the Git repo: https://help.github.com/articles/remove-sensitive-data


Edit: read more of the thread. If repodoctor doesn't do whatcha need and you want help with git-filter-branch you can always PM me.
Title: Re: XT/AT/PS2/Terminal to USB Converter with NKRO
Post by: ARAMP1 on Mon, 03 March 2014, 02:10:41
It won't. Teensy 3.0 has a totally different CPU architecture for a start. But the real killer is that it runs at 3.3 volts, and can't interface directly to our 5 volt keyboards.
I'm guessing this goes from the 3.1 also.  Just read on the 3.1 vs the 3.0: 

"All digital pins are 5 volt tolerant on Teensy 3.1. However, the analog-only pins (A10-A14), AREF, Program and Reset are 3.3V only."
Title: Re: XT/AT/PS2/Terminal to USB Converter with NKRO
Post by: Soarer on Mon, 03 March 2014, 05:46:50
The 5V tolerant digital pins on the 3.1 could be used to interface with PS/2 etc, since the pin is only ever required to output 0V. Pull-up resistors to the 5V USB supply would be required.

I still don't have any plans to make a port though. Other projects of mine still require a proper 5V output (the Wyse converter, and the controller firmware when used in certain modes e.g. for 5291 conversion).
Title: Re: XT/AT/PS2/Terminal to USB Converter with NKRO
Post by: Soarer on Mon, 03 March 2014, 05:52:38
I keep thinking about it, but never seem to find a good time to do it. Unless I can find a way to remove certain info from the git repo, I won't be able to simply make my repo public. In all likelihood, I'll have to start a new repo without any history, which is a pain.

I can help with scrubbing the Git repo: https://help.github.com/articles/remove-sensitive-data


Edit: read more of the thread. If repodoctor doesn't do whatcha need and you want help with git-filter-branch you can always PM me.

Thanks for the offer! Thing is, no matter how much help I get, I'm still going to want to understand and verify it, whcih takes time :)
Title: Re: XT/AT/PS2/Terminal to USB Converter with NKRO
Post by: Pacifist on Wed, 12 March 2014, 18:26:00
I want to be absolutely sure when soldering my XT board so I don't fry the controller

The backside where I will be soldering wires from socket to teensy

[attachimg=1]

Are the markings on this correct for XT layout?

Thanks! Can't wait to finally use the XT
Title: Re: XT/AT/PS2/Terminal to USB Converter with NKRO
Post by: Pacifist on Wed, 12 March 2014, 19:32:03
I want to be absolutely sure when soldering my XT board so I don't fry the controller

The backside where I will be soldering wires from socket to teensy

(Attachment Link)

Are the markings on this correct for XT layout?

Thanks! Can't wait to finally use the XT

soldered wires in this setup, got nothing. Are my wirings wrong and did I fry the board or does something else not work?
Title: Re: XT/AT/PS2/Terminal to USB Converter with NKRO
Post by: fohat.digs on Wed, 12 March 2014, 19:41:19
I have used this and it has worked. It looks like you did the right thing. Look elsewhere.

Title: Re: XT/AT/PS2/Terminal to USB Converter with NKRO
Post by: Pacifist on Wed, 12 March 2014, 20:09:38
I have used this and it has worked. It looks like you did the right thing. Look elsewhere.

Phew

Thanks for the help! I'll do some troubleshooting and see exactly what;s the problem
Title: Re: XT/AT/PS2/Terminal to USB Converter with NKRO
Post by: JPG on Wed, 12 March 2014, 20:43:44
I have used this and it has worked. It looks like you did the right thing. Look elsewhere.

Phew

Thanks for the help! I'll do some troubleshooting and see exactly what;s the problem

I don't know for you, but when I first did it, since I was a TOTAL n00b, I didn't solder the pin header to the controller so it didn't work. If you get no signal, it's probably some connexion problem. Just need to find it!
Title: Re: XT/AT/PS2/Terminal to USB Converter with NKRO
Post by: abzman on Mon, 17 March 2014, 00:58:07
Just completed this mod, I'm really happy with it.  Blog post http://abzman2k.wordpress.com/2014/03/17/ibm-model-m-122key/ (http://abzman2k.wordpress.com/2014/03/17/ibm-model-m-122key/) contains links to pictures and my config file. 
Title: Re: XT/AT/PS2/Terminal to USB Converter with NKRO
Post by: blackbox on Mon, 17 March 2014, 15:25:45
Just completed this mod, I'm really happy with it.  Blog post http://abzman2k.wordpress.com/2014/03/17/ibm-model-m-122key/ (http://abzman2k.wordpress.com/2014/03/17/ibm-model-m-122key/) contains links to pictures and my config file.

Interessting build. Nice project box!
Title: Re: XT/AT/PS2/Terminal to USB Converter with NKRO
Post by: abzman on Mon, 17 March 2014, 16:23:26
Yeah, as it turns out the n64's power supply is perfect for this task. 
Title: Re: XT/AT/PS2/Terminal to USB Converter with NKRO
Post by: Pacifist on Mon, 17 March 2014, 17:21:29
realized why my pro micro wasn't flashing correctly.......

the mini to micro converter I bought was just for charging....so there was no data or clock wire, just vcc and gnd. Accidentally broke the thing and found out that there were only two wires.....wtf
Title: Re: XT/AT/PS2/Terminal to USB Converter with NKRO
Post by: JPG on Mon, 17 March 2014, 19:45:26
realized why my pro micro wasn't flashing correctly.......

the mini to micro converter I bought was just for charging....so there was no data or clock wire, just vcc and gnd. Accidentally broke the thing and found out that there were only two wires.....wtf

If you need a micro usb cable, I got some for my converter, 10$ for a pack of 3 and they seem good quality to meé1

http://www.ebay.com/itm/6-FT-USB-Cable-2-0-MALE-A-to-Micro-B-5-PIN-Gold-Plated-USB-6-FT-White-Lot-of-3-/360662082010?pt=US_USB_Cables_Hubs_Adapters&hash=item53f922a1da
Title: Re: XT/AT/PS2/Terminal to USB Converter with NKRO
Post by: blackbox on Tue, 18 March 2014, 01:38:05
Yeah, as it turns out the n64's power supply is perfect for this task.

Who would have thought? Certainly not nintendo.
Title: Re: XT/AT/PS2/Terminal to USB Converter with NKRO
Post by: fohat.digs on Tue, 18 March 2014, 06:54:41

If you need a micro usb cable, I got some for my converter, 10$ for a pack of 3 and they seem good quality to meé1

http://www.ebay.com/itm/6-FT-USB-Cable-2-0-MALE-A-to-Micro-B-5-PIN-Gold-Plated-USB-6-FT-White-Lot-of-3-/360662082010?pt=US_USB_Cables_Hubs_Adapters&hash=item53f922a1da

I have bought several cables from this vendor and they have been good quality, with very fast delivery from US and not China.
Title: Re: XT/AT/PS2/Terminal to USB Converter with NKRO
Post by: Pacifist on Thu, 27 March 2014, 18:57:18
YESSSSS!!!!! Got my XT to work today. Don't know what exactly was the problem, but it seems to be working. I'm still getting used to the layout--the small shift and the large distance between keys. First time I've actually typed letters on a BS board. Theres still some kinks with my wiring, I've just switched to the laptop keyboard because it just failed...probally should get some kind of enclosure                                                                 
Title: Re: XT/AT/PS2/Terminal to USB Converter with NKRO
Post by: fohat.digs on Thu, 27 March 2014, 20:21:08
I am working on another F-122, and after putting it back together, it seemed dead. I tested the (outboard) Teensy with another keyboard and it was working properly.

After messing around with a jumper, I found that in the second row of "Keyboard A" hid_listen finally produced a response, although not one that meant anything to me:

Waiting for new device ........
Listening:
wEE

remaining: 0034
34@0008 remaps
layerdefs: 00
max_layer: 00
total_macros: 00
alloc ok.

Keyboard ID: 0000
Code Set: 1
Mode: PC/XT

So I don't know how to interpret this, or what to try next. After getting that bit, I get nothing else.

Thanks for your help.
Title: Re: XT/AT/PS2/Terminal to USB Converter with NKRO
Post by: ZeDestructor on Tue, 08 April 2014, 10:21:10
So, I finally soldered my teensies properly (silly uni not buying any clamps for the soldering stating made it a real PITA), and now I have a fully-functioning F-122.

After some messing around, I have built my layout and attach it here. Most notably over the legacy and Halvar layouts, I have a "normal" NumPad, that once I finally get proper drivers to remove the inner bolts, will be modded to use a model M's 2-high + key (turning the board into an F-121). The remaining extra keys are used for media control and to regain winkey/context menu. See the attached .sc file (with correct attributions for the layouts I based myself on) for detailed info.

@Soarer: feel free to include my layout in a future release

Title: Re: XT/AT/PS2/Terminal to USB Converter with NKRO
Post by: fohat.digs on Tue, 08 April 2014, 17:17:31

model M's 2-high + key (turning the board into an F-121). The remaining extra keys are used for media control and to regain winkey/context menu.


Ha ha! Never realized that my ANSI-modded F-122s are now all F-121s!

I love the Function keys on the left and use them in preference to the (now redundant) upper ones.

The left F10 turned into "Windows", F13 became a 2nd Escape (along with the former NumLock), and my media keys are the last several in the top row, along with Calculator and PrintScreen. And I still have a handful that are still in Limbo.
Title: Re: XT/AT/PS2/Terminal to USB Converter with NKRO
Post by: ZeDestructor on Tue, 08 April 2014, 20:19:24

model M's 2-high + key (turning the board into an F-121). The remaining extra keys are used for media control and to regain winkey/context menu.


Ha ha! Never realized that my ANSI-modded F-122s are now all F-121s!

I love the Function keys on the left and use them in preference to the (now redundant) upper ones.

The left F10 turned into "Windows", F13 became a 2nd Escape (along with the former NumLock), and my media keys are the last several in the top row, along with Calculator and PrintScreen. And I still have a handful that are still in Limbo.


I wouldn't ANSI convert mine. If anything, I'd do the opposite and ISO convert my M instead.. Love that ISO enter. At this point, my main keyboards are both ISO layout (laptop and F-122)

Sliightly off-topic: does anyone perchance have a spare F-122 spacebar they'd be willing to sell to me? Mine has no stabilizer because it's an M spacebar (I believe the seller lost the original spacebar and decided to fit an M spacebar instead to get a fully-keyed board).
Title: Re: XT/AT/PS2/Terminal to USB Converter with NKRO
Post by: Techno Trousers on Tue, 08 April 2014, 22:31:44
Sliightly off-topic: does anyone perchance have a spare F-122 spacebar they'd be willing to sell to me? Mine has no stabilizer because it's an M spacebar (I believe the seller lost the original spacebar and decided to fit an M spacebar instead to get a fully-keyed board).

Check out the super cool way that wcass made a bunch of M spacebar -> F mount stabilizer wires.

Parts List (http://geekhack.org/index.php?topic=52394.msg1241205#msg1241205)
Video of the process (http://geekhack.org/index.php?topic=52394.msg1247300#msg1247300)
Title: Re: XT/AT/PS2/Terminal to USB Converter with NKRO
Post by: ZeDestructor on Wed, 09 April 2014, 11:42:21
Sliightly off-topic: does anyone perchance have a spare F-122 spacebar they'd be willing to sell to me? Mine has no stabilizer because it's an M spacebar (I believe the seller lost the original spacebar and decided to fit an M spacebar instead to get a fully-keyed board).

Check out the super cool way that wcass made a bunch of M spacebar -> F mount stabilizer wires.

Parts List (http://geekhack.org/index.php?topic=52394.msg1241205#msg1241205)
Video of the process (http://geekhack.org/index.php?topic=52394.msg1247300#msg1247300)


Oooh, thanks! the dimension was the big issue for me...
Title: Re: XT/AT/PS2/Terminal to USB Converter with NKRO
Post by: nubbinator on Thu, 24 April 2014, 20:44:18
I've got a Dolch Pac 61 keyboard.  Will the pinout be the same as the Wyse keyboard pinout (http://geekhack.org/index.php?topic=52597.0)?  If not, does anyone know what the pinout will be?  I'd love to make this my weekend project.

The PCB is a Cherry 601-1567 Rev. 01.  I can take some PCB shots if that helps.
Title: Re: XT/AT/PS2/Terminal to USB Converter with NKRO
Post by: JPG on Fri, 25 April 2014, 09:26:20
Hi all, I have been using my XT for a while at home. Recently, I started playing elder scroll online and I got a strange bug that affects the keyboard itself. When I get in a pvp zone with a lot of players, my keyboard often goes crazy. By crazy I mean it starts spamming the same code endlessly. I need to unplug the keyboard and plug it back to make it work again, but if I stay in a "hot spot" in the game, it happens again after not so long.


If I move away (or do anything else), the keyboard behave normally.


So I would like to know if anyone experienced something similar before where his keyboard would go crazy because of a specific application (anything really, not this game specifically).


I can understand that the game has a problem with that many players at the same spot, but I don't get how it could affect my keyboard this way. I used the hid listen to confirm that the keyboard really sends some codes in a loop and is not just doing nothing.


Also, when I plug it back, it sometimes still behave like a key is pressed (usually one of the wasd). But it stops when I press the key, until the problem starts again. Is it possible that the code of the application would make it so that the OS sends some information back to the converter and put it in an abnormal state in some specific condition?
Title: Re: XT/AT/PS2/Terminal to USB Converter with NKRO
Post by: CryptoKid on Sat, 26 April 2014, 06:36:09
Got my XT working with this, thx Soarer!  ;D

I'd like to wish a feature. I use the function keys as media- and macrokeys, and use Scroll Lock as select_1 to switch between the modes. It would be nice to see in wich mode it currently is. There could be something like scroll_lock_led on/off configuration option that one could put into ifselect blocks.
Title: Re: XT/AT/PS2/Terminal to USB Converter with NKRO
Post by: kishy on Wed, 07 May 2014, 13:55:01
Not really an issue with Soarer's part of this, but an interesting observation...my very first original Teensy++ 2.0 from back in the day appears to have quit on me this past weekend. It just repeatedly connects/disconnects itself from the host computer, sometimes showing up under the device name Soarer gave it, sometimes as a generic HID, sometimes as an unknown device. Does not stay connected for long, can get one keystroke in sometimes before it "unplugs" again, and more recently it just isn't detected at all.

Said Teensy was actually second hand, I'm fairly sure I got it from another member before Soarer even made his project known. I do have to wonder how it failed...
Title: Re: XT/AT/PS2/Terminal to USB Converter with NKRO
Post by: jjgijon on Fri, 09 May 2014, 08:19:24
IBM XT SPANISH LAYOUT

Soarer’s converter works great, but found some problems to adapt to (1986) Spanish layout

Retrete (from spanish MEDIAVIDA) hinted me to ask Soarer directly for a solution…

1) Got this wonderful XT keyboard with this unusual Spanish layout (that I’d love to use):

Code: [Select]
¡ ¿ # $ % / & * ( ) ? +
1 2 3 4 5 6 7 8 9 0 ' =

 Q W E R T Y U I O P : ^
 q w e r t y u i o p ; `

  A S D F G H J K L Ñ ¨ Ç
  a s d f g h j k l ñ ´ ç

> Z X C V B N M " ! _
< z x c v b n m , . -

2) Once I installed the Teensy 2.0 with the "Soarer_at2usb_v1.12_atmega32u4.hex" file, I got this outcome:

Code: [Select]
! ” • $ % & / ( ) = ? ¿
1 2 3 4 5 6 7 8 9 0 ’ ¡

 Q W E R T Y U I O P ^ *
 q w e r t y u i o p ` +

  A S D F G H J K L Ñ ¨ ª
  A s d f g h j k l ñ ´ º

Ç Z X C V B N M ; : _
ç z x c v b n m , . -


3) By trial and error, from other .sc files, I’ve prepared the following SPANISH-XT.SC file, using also macro coding (it works, but I need some help to solve the remaining problems):
Code: [Select]
### IBM XT KEYBOARD QWERTY SPANISH

force set1
ifkeyboard any
ifselect any

# 83-key mappings

# On the XT, the ~/` key is located next to '/", and the key next to lshift is \|
# Remap this to match modern ISO layout
remapblock
layer 0
BACK_QUOTE BACKSLASH
BACKSLASH EUROPE_2
F10 FN1 # need to map the FN key into the base layer (0)
endblock

# Match the SPANISH XT's unusual legends
macroblock

# PROBLEMA
# ¿ Cómo conseguir [¡] al teclear Shift+1 ?

# Shift+2 = ¿
macro 2 shift -ctrl -alt
press EQUAL
endmacro

# Alt+Ctrl+2 = @
macro 2 -shift ctrl alt
push_meta set_meta
press 2
pop_meta
endmacro

# PROBLEMA
# Shift+3 = #
macro 3 shift -ctrl -alt
press 3 # Lo que sale es [•] (En cambio tengo [#] con Alt+Ctrl+3)
endmacro

# Shift+6 = /
macro 6 shift -ctrl -alt
press 7
endmacro

# Shift+7 = &
macro 7 shift -ctrl -alt
press 6
endmacro

# Shift+8 = *
macro 8 shift -ctrl -alt
press RIGHT_BRACE
endmacro

# Shift+9 = (
macro 9 shift -ctrl -alt
press 8
endmacro

# Shift+0 = )
macro 0 shift -ctrl -alt
press 9
endmacro

# PROBLEMA
# Tecla a la izq. de backspace debería ser [=] y [+], pero siguen saliendo [¡] y [¿]
# macro EQUAL -shift -ctrl -alt
# press EQUAL
# endmacro

# PROBLEMA
# ; No consigo que imprima [;] en las minúsculas (pero sí consigo [:] en la mayúsculas)
macro LEFT_BRACE -shift -ctrl -alt
press COMMA
endmacro

# Shift+; = :
macro LEFT_BRACE shift -ctrl -alt
press PERIOD
endmacro

# Shift+, = ”
macro COMMA shift -ctrl -alt
press 2
endmacro

# ‘
macro RIGHT_BRACE -shift -ctrl -alt
press LEFT_BRACE
endmacro

# ^
macro RIGHT_BRACE shift -ctrl -alt
press LEFT_BRACE
endmacro

# [
macro QUOTE -shift ctrl alt
push_meta set_meta
press LEFT_BRACE
pop_meta
endmacro

# Shift+. = !
macro PERIOD shift -ctrl -alt
press 1
endmacro

# Alt+Ctrl < = \
macro EUROPE_2 -shift ctrl alt
push_meta set_meta
press BACK_QUOTE
pop_meta
endmacro

# PrtSc macro
macro PAD_ASTERIX shift
press PRINTSCREEN
endmacro

endblock


4) The main problem is that HID codes for the sustitutions (a) does not separate normal characters from the CAPITALS, and (b) they are based on the US layout.

Problems remaining:


Any idea for this?  Someone worked out other layouts than the US? -  Ah, and a big thank you to Soarer (and Retrete).
Title: Re: XT/AT/PS2/Terminal to USB Converter with NKRO
Post by: hjkl_over_wasd on Sun, 11 May 2014, 07:10:28
I'm really interested in making a nice little converter that will go with my Poker II and will handle custom mappings and dual-role logic (caps->esc/ctrl), as well as being able to have modes: Let's say I hit both alt keys and that will allow me to toggle between several layouts.

I'm quite comfortable in C, but how do I calculate memory consumption when programming for the teensy? Do I just see if my c/h-files along with linked libraries fit within the teensy memory, along with whatever I have auto-allocated? Do I need to use malloc/free? How much space does each layout take? Is a layout just an array of unsigned chars?

Does the teensy have support for wchar?

Also, can I get NKRO with usb to usb on a teensy? I don't need more than 10KRO though.

I would like the converter to be as small and light as possible and the clunky usb->ps/2 converter infront of the teensy really bothers me. When I've checked the wiring for these converters, they seem to be just simple connections without any other components in between. So, I'm thinking: Is there any good reason for connecting the teensy to a PS/2 port and use a usb to ps/2 converter to get a usb keyboard to fit the teensy, if I can just wire a usb port to the teensy and have it be usb to usb?
Title: Re: XT/AT/PS2/Terminal to USB Converter with NKRO
Post by: 1391406 on Wed, 14 May 2014, 18:51:53
Is it possible to program a key to load Notepad? If so, how?
Title: Re: XT/AT/PS2/Terminal to USB Converter with NKRO
Post by: fohat.digs on Wed, 14 May 2014, 18:54:43
I am not sure whether I have asked this specifically, here, but is it possible to program keys to left and right mouse buttons?
Title: Re: XT/AT/PS2/Terminal to USB Converter with NKRO
Post by: echo0 on Thu, 15 May 2014, 06:19:47
Got model F-122 working with the converter.  Thanks Soarer!
Title: Re: XT/AT/PS2/Terminal to USB Converter with NKRO
Post by: bcg on Tue, 20 May 2014, 23:19:54
Is it possible to program a key to load Notepad? If so, how?

Your best bet might be to program a key to send a media key that you don't use or some sort of complicated modifier key combo and then map that key open Notepad using Auto Hot Key or whatever that program is called.

Or you could switch to Linux where everything works better and you can assign that to a key combo without any extra software  :p
Title: Re: XT/AT/PS2/Terminal to USB Converter with NKRO
Post by: bcg on Wed, 21 May 2014, 08:06:56
I'm really interested in making a nice little converter that will go with my Poker II and will handle custom mappings and dual-role logic (caps->esc/ctrl), as well as being able to have modes: Let's say I hit both alt keys and that will allow me to toggle between several layouts.

I'm quite comfortable in C, but how do I calculate memory consumption when programming for the teensy? Do I just see if my c/h-files along with linked libraries fit within the teensy memory, along with whatever I have auto-allocated? Do I need to use malloc/free? How much space does each layout take? Is a layout just an array of unsigned chars?

Does the teensy have support for wchar?

Also, can I get NKRO with usb to usb on a teensy? I don't need more than 10KRO though.

I would like the converter to be as small and light as possible and the clunky usb->ps/2 converter infront of the teensy really bothers me. When I've checked the wiring for these converters, they seem to be just simple connections without any other components in between. So, I'm thinking: Is there any good reason for connecting the teensy to a PS/2 port and use a usb to ps/2 converter to get a usb keyboard to fit the teensy, if I can just wire a usb port to the teensy and have it be usb to usb?

you could write your own firmware for sure, but hasu's TMK firmware should meet your needs if you want to write your own and need a good place to start... http://github.com/tmk/tmk_keyboard

"usb to usb nkro" could work if your kbd already supports NKRO over USB... I know hasu's firmware has support for the arduino usb host shield, but I'm not sure how well that shield works with a nkro HID profile.

That said you can do what you are looking to do with Soarer's converter too, because like you said can just use a female USB connector instead of a PS/2 connector, as long as the converter "quacks like a duck" your keyboard should talk in PS/2 no matter what type of connector you use.  That is assuming that it already works fine using a passive PS/2 converter.  That wouldn't really be "usb to usb" but I think that is the solution you are looking for (and NKRO should work fine).

As far as your questions about memory:  https://learn.adafruit.com/memories-of-an-arduino/you-know-you-have-a-memory-problem-when-dot-dot-dot
Title: Re: XT/AT/PS2/Terminal to USB Converter with NKRO
Post by: admiralvorian on Wed, 28 May 2014, 17:32:00
So I want to make a little converter box for my terminal model M without modifying the keyboard itself. The keyboard has an RJ-45 connector. If I wire a female RJ-45 following this diagram and wiring:

Code: [Select]
Conn.       Teensy
GND -------- GND
Vcc/+5V ---- Vcc
Data ------- PD0
Clock ------ PD1

(http://www.kbdbabel.org/conn/kbd_connector_ibmterm.png)


I would be wiring the back of the female rj-45 to the teensy, so this diagram would be reversed, with Vcc on the right and the GND on the left, correct?

and once it's wired, i just need to drop soarer's hex file on it and that's it?
Title: Re: XT/AT/PS2/Terminal to USB Converter with NKRO
Post by: fohat.digs on Wed, 28 May 2014, 17:49:32
So I want to make a little converter box for my terminal model M without modifying the keyboard itself. The keyboard has an RJ-45 connector. If I wire a female RJ-45 following this diagram and wiring:

Code: [Select]
Conn.       Teensy
GND -------- GND
Vcc/+5V ---- Vcc
Data ------- PD0
Clock ------ PD1

Show Image
(http://www.kbdbabel.org/conn/kbd_connector_ibmterm.png)



I would be wiring the back of the female rj-45 to the teensy, so this diagram would be reversed, with Vcc on the right and the GND on the left, correct?

and once it's wired, i just need to drop soarer's hex file on it and that's it?

It worked for me.

A lot of people get confused when the diagrams show the * socket * since they are usually holding the plug in their hands, at the time.
Title: Re: XT/AT/PS2/Terminal to USB Converter with NKRO
Post by: admiralvorian on Wed, 28 May 2014, 18:09:23
So I want to make a little converter box for my terminal model M without modifying the keyboard itself. The keyboard has an RJ-45 connector. If I wire a female RJ-45 following this diagram and wiring:

Code: [Select]
Conn.       Teensy
GND -------- GND
Vcc/+5V ---- Vcc
Data ------- PD0
Clock ------ PD1

Show Image
(http://www.kbdbabel.org/conn/kbd_connector_ibmterm.png)



I would be wiring the back of the female rj-45 to the teensy, so this diagram would be reversed, with Vcc on the right and the GND on the left, correct?

and once it's wired, i just need to drop soarer's hex file on it and that's it?

It worked for me.

A lot of people get confused when the diagrams show the * socket * since they are usually holding the plug in their hands, at the time.


Thanks for the clarification - it just seems all too easy!
Title: Re: XT/AT/PS2/Terminal to USB Converter with NKRO
Post by: 1391406 on Sat, 31 May 2014, 19:47:12
I just discovered something pretty cool. On a whim I tried to set one of the F-122's extra function keys as a desktop shortcut key... and it worked! Any of the extra function keys can be assigned to desktop shortcuts under desktop shortcut properties just like any other key. The difference is you'll notice the entry for the "Shortcut key" will be blank, but it still works once applied. Hence, I set my desktop shortcut key for Notepad to F13.

How cool is that?
Title: Re: XT/AT/PS2/Terminal to USB Converter with NKRO
Post by: 1391406 on Sat, 31 May 2014, 23:41:31
The above apparently only works with F13 - F24.
Title: Re: XT/AT/PS2/Terminal to USB Converter with NKRO
Post by: gustavQ on Mon, 02 June 2014, 07:15:52
Hi everyone,

I want to adventure myself making this converter, however I can't find any Teensy for a reasonable price. I found this one http://www.ebay.es/itm/Leonardo-Pro-Micro-ATmega32U4-Arduino-IDE-1-0-3-Bootloader-replace-Pro-Mini-UK-/221451734420?pt=UK_Computing_Other_Computing_Networking&hash=item338f8d4d94 (http://www.ebay.es/itm/Leonardo-Pro-Micro-ATmega32U4-Arduino-IDE-1-0-3-Bootloader-replace-Pro-Mini-UK-/221451734420?pt=UK_Computing_Other_Computing_Networking&hash=item338f8d4d94), since the CPUis the same i'm assuming that he will do the job.

Can anyone please confirm that I will not have any problem by using this microcontroller?
Title: Re: XT/AT/PS2/Terminal to USB Converter with NKRO
Post by: bcg on Mon, 02 June 2014, 07:27:39
You won't have a problem with that, there are instructions floating around here about how to load the hex with avrdude, that is the easiest way with the pro micro that I've found.

That said, Adafruit has Teensy 2.0 pretty cheap now, only 15.95 USD - also they are in New York right near the postal depot so it probably would ship pretty fast if you are in Spain

http://www.adafruit.com/products/199
Title: Re: XT/AT/PS2/Terminal to USB Converter with NKRO
Post by: Levelog on Mon, 02 June 2014, 23:53:30
To avoid any sort of damage or modification to the keyboard itself, I'd be fine to use something like http://www.monoprice.com/Product?c_id=102&cp_id=10204&cs_id=1020403&p_id=500&seq=1&format=2 (http://www.monoprice.com/Product?c_id=102&cp_id=10204&cs_id=1020403&p_id=500&seq=1&format=2), right? And has anyone had problems with the pin teensy? My soldering iron recently crapped out on me.
Title: Re: XT/AT/PS2/Terminal to USB Converter with NKRO
Post by: fohat.digs on Tue, 03 June 2014, 07:47:22
And has anyone had problems with the pin teensy?

You shouldn't need extensions, you will connect from Teensy to computer with a USB cable, so the Teensy can be as close to the keyboard as you want.

If you have an F AT, you don't need a converter at all. Otherwise, you will have to wire something up.

http://geekhack.org/index.php?topic=58941.0 (http://geekhack.org/index.php?topic=58941.0)
Title: Re: XT/AT/PS2/Terminal to USB Converter with NKRO
Post by: Levelog on Tue, 03 June 2014, 08:12:06
It's XT. The thing is, it seems I'd have to ruin the end of the plug, unless I'm completely misreading this
Title: Re: XT/AT/PS2/Terminal to USB Converter with NKRO
Post by: JPG on Tue, 03 June 2014, 08:49:36
It's XT. The thing is, it seems I'd have to ruin the end of the plug, unless I'm completely misreading this


No, if you open the keyboard, you can very easily remove the cable completely. This will make the pins directly available. Then, all you need is to plug a female dupont cable in each of the 4 pins that are used and that you previously soldered (or plugged) in the teensy/pro micro. Then you only plug a usb cable in the teensy/pro micro and plug the cable in the computer.


BTW, you need to load the Converter on the teensy/pro micro before you do all that.


So you end up with no damage/alteration to your keyboard. You only get the cable safely removed (you can plug it back anytime if you want) and as long as the keyboard is in working condition, the teensy/pro micro all working and correctly plugged and soldered then it should be working very easily!
Title: Re: XT/AT/PS2/Terminal to USB Converter with NKRO
Post by: Hellmark on Thu, 05 June 2014, 09:14:02
There is also the test pads too that you could solder to if you didn't want to use the pins (not wanting to solder directly to the pins, or unable to find a compatible plug for it).
Title: Re: XT/AT/PS2/Terminal to USB Converter with NKRO
Post by: sakai4eva on Wed, 11 June 2014, 22:52:39
How is LED supported on this thing anyway? Can I reprogram the LED locations?
Title: Re: XT/AT/PS2/Terminal to USB Converter with NKRO
Post by: Halvar on Thu, 12 June 2014, 01:34:02
What do you mean by "reprogram the LED locations"? You want to use your existing Scroll Lock LED as Num Lock LED and vice versa for example?

The converter doesn't support that through PS/2. If you build an internal converter, you can connect the LEDs directly to the Teensy though (with a resistor for each LED).

Title: Re: XT/AT/PS2/Terminal to USB Converter with NKRO
Post by: sakai4eva on Thu, 12 June 2014, 21:08:09
What do you mean by "reprogram the LED locations"? You want to use your existing Scroll Lock LED as Num Lock LED and vice versa for example?

The converter doesn't support that through PS/2. If you build an internal converter, you can connect the LEDs directly to the Teensy though (with a resistor for each LED).

Yeah, I think you hit the nail on the head for me. Thanks.
Title: Re: XT/AT/PS2/Terminal to USB Converter with NKRO
Post by: gustavQ on Sat, 21 June 2014, 10:55:45
You won't have a problem with that, there are instructions floating around here about how to load the hex with avrdude, that is the easiest way with the pro micro that I've found.

That said, Adafruit has Teensy 2.0 pretty cheap now, only 15.95 USD - also they are in New York right near the postal depot so it probably would ship pretty fast if you are in Spain

http://www.adafruit.com/products/199

The shipping costs are really high to send the teensy to Europe, so I went to the pro micro. However, i am having problems entering in the bootloader and load the .hex file.
I follow the steps that JPG mentioned a few pages back, but without success. I set the rst and the ground pin to a button to be more easy to tap two times, but nothing happens in the device manager. I will keep trying, I think I don't have any option here.
Title: Re: XT/AT/PS2/Terminal to USB Converter with NKRO
Post by: IvanIvanovich on Sat, 21 June 2014, 11:31:11
So today I discovered one of my Cherry keyboards I've never been able to use speaks IBM 3270. Forgive my ignorance here, but is that supported?
Title: Re: XT/AT/PS2/Terminal to USB Converter with NKRO
Post by: Techno Trousers on Sat, 21 June 2014, 11:41:36
I'm not really an expert, but I do know that the IBM Model F-122 (part number 6110XXX) shipped with the 3270 and 3280 workstations. Since this converter was built to support that keyboard, I'd think it should work for any 3270 compatible keyboard.
Title: Re: XT/AT/PS2/Terminal to USB Converter with NKRO
Post by: bcg on Sat, 21 June 2014, 13:11:05
So today I discovered one of my Cherry keyboards I've never been able to use speaks IBM 3270. Forgive my ignorance here, but is that supported?

Pretty sure it will... your Cherry keyboard probably uses PS/2 with scan code set 3.  If you use Windows it may not work because Windows.  But when hooked up to a real operating system (assuming it has a PS/2 connector or you have a proper adapter) you should be able to type on it, but some of the keys won't do what you expect because the scan codes are different.

If that is that case, you should be good to go with Soarer's converter.

http://www.seasip.info/VintagePC/ibm_1390876.html

http://www.seasip.info/VintagePC/5271.html

Title: Re: XT/AT/PS2/Terminal to USB Converter with NKRO
Post by: IvanIvanovich on Sat, 21 June 2014, 14:08:05
It has a din5 plug. I use Windows 8.1 and Server 2012. I think the last computer I tried it on was my 2008 rack since it's the only one I had with an OS on it with a native PS/2 using AT to PS/2 adapter which works fine on other keyboards. It never did anything but flicker the lock led. When I got it I was hoping it would be like the 2551 I had, it just worked like normal for all the keys that a standard 101 keyboard has, and the extra keys didn't do anything without the Cherry software running.
Thanks for that link, I might drag out an old PC I have with XP and try those patches and maybe try a linux live as well if nothing on XP. Would be nice to know if it even works at all before going down the road of building a converter for it. Though I do have another obscure Cherry keyboard coming with a 15pin connector (like old midi joystick) :/ that will need adapter or controller swap to be of any use, but I have zero clue what it will speak yet.
Title: Re: XT/AT/PS2/Terminal to USB Converter with NKRO
Post by: Halvar on Sat, 21 June 2014, 14:46:14
Building an external Soarer converter is probably worth it in any case!  :thumb:

It also allows you to define a mapping, which is something I would definitely recommend for a terminal keyboard.

You can also define the mapping saying that it should only be used if the keyboard it a terminal keyboard, so you can use the same converter for any PS/2 keyboard, too.

BTW: Does someone know where Soarer is, by the way? He used to be so active in this thread.
Title: Re: XT/AT/PS2/Terminal to USB Converter with NKRO
Post by: ZSYStriker on Sat, 21 June 2014, 20:56:13
Newbie here...  I've been reading this thread quite a while and recently I was successful in converting a 122-key terminal M.  I just acquired another terminal M real cheap.  This one is a 101-key.  But it must be a franken-board.  P/N is 1395162, but it's printed on a mailing label that's been pasted over an IBM-Lexmark label for 1391401 dated November 4, 1993.  There are no LED's and the logo is oval grey at upper-left and the connector is RJ45 - non-removable.  By the way, the key caps are almost identical to the standard PS/2 model M, locations and labels -- except for the pad_minus that has "Setup" printed on the front and the pad_plus with "\ z" printed on the front -- actually the top line of the "z" intersects the "\" -- never seen a symbol like that before.  So I'm thinking that the previous owner did some mix and matching...  I'm pretty sure it's not 1391401 given the non-removable RJ45 connector and the lack of LED's.

When I connected it and ran hid_listen, ESC showed up as F13, Print Screen as F23, Scroll lock as F24, Pause as LANG_4, Num_lock as ESC, pad_slash as Num_lock, pad_asterix as scroll lock, pad_plus as pad_asterix, pad_minus as extra_sysrq, and finally pad_plus as pad_enter.  Of course, I was able to fix all these using remap block thanks to Soarer.  But here's the kicker.  Neither CTRL key registers with hid_listen!!  Nothing shows up!  On a text editor, hitting CTRL-c registers as "c" -- it's as though CTRL doesn't exist.

I can believe that one CTRL key might be damaged, but both?  Otherwise the board is pretty solid -- all rivets are intact and the all other keys register and all keys buckle nicely -- tight, nothing loose.  typing feel is wonderful, almost as crisp as a new Model M, but without the CTRL key, well you know...

Any ideas??  I'm stumped.  As Halvar said, where is Soarer these days?  BTW, thanks, Halvar -- I'm using your config file for the 122-key.
Title: Re: XT/AT/PS2/Terminal to USB Converter with NKRO
Post by: Pacifist on Sun, 22 June 2014, 12:58:40
what's the female plug for the F-122 called?
Title: Re: XT/AT/PS2/Terminal to USB Converter with NKRO
Post by: Techno Trousers on Sun, 22 June 2014, 13:35:43
270 degree DIN
Title: Re: XT/AT/PS2/Terminal to USB Converter with NKRO
Post by: Pacifist on Sun, 22 June 2014, 13:50:59
270 degree DIN

All I need is the 5 pin one, right?

http://www.ebay.com/itm/5-PIN-DIN-SOCKET-270-DEGREES-FEMALE-INLINE-PACK-Of-5-/120543224004?pt=UK_BOI_Electrical_Components_Supplies_ET&hash=item1c10efa0c4
Title: Re: XT/AT/PS2/Terminal to USB Converter with NKRO
Post by: Techno Trousers on Sun, 22 June 2014, 14:03:52
Yes, that should do the trick
Title: Re: XT/AT/PS2/Terminal to USB Converter with NKRO
Post by: Mr. Perfect on Mon, 14 July 2014, 19:02:19
Kind of a random question here, but has anyone tried this converter with a programmable Cherry POS board? If so, does it work with the Cheery Tools programming software? I have my PS/2 POS board hooked up with a generic USB converter, and the Cherry Tools software can't detect the board for programming the keys or updating the firmware.
Title: Re: XT/AT/PS2/Terminal to USB Converter with NKRO
Post by: Halvar on Tue, 15 July 2014, 02:29:24
This converter won't help you there. It only converts standard PS/2 keyboard behaviour to USB. It doesn't support any special PS/2 commands for programming keyboards that Cherry uses. Even if it could do that, that would not work with the Cherry software. To program the board you will need a computer with a PS/2 port.

After you're done programming the board, you can probably use either your generic converter or use Soarer's if the board supports special key codes that the generic converter doesn't support.
Title: Re: XT/AT/PS2/Terminal to USB Converter with NKRO
Post by: kako on Wed, 16 July 2014, 20:59:32
Hi,

I have recently set up this converter with a model m ssk, to hopefully get rid of AHK for remapping,
but have stumbled on an issue. The ALT key behaves differently than on a 'bluebox' converter for example.
It is triggered on press down, instead it should be on release - because of that Alt - Print Screen combination
does not work.

Is this a bug or is there a way to specify this behaviour via config?

Title: Re: XT/AT/PS2/Terminal to USB Converter with NKRO
Post by: awong on Wed, 16 July 2014, 23:36:55
How do I program IBM Model M 122?
Title: Re: XT/AT/PS2/Terminal to USB Converter with NKRO
Post by: JPG on Wed, 16 July 2014, 23:48:25
How do I program IBM Model M 122?

Is your Soarer converter working already? If yes, then all you need to do is to copy a .SC file from the configs directory from you're Soarer package, open it and modify it to your liking (follow the doc for examples and start with some easy modifications). Once you have the mapping you want, you open a command shell window, position yourself on the sctools directory in the Soarer folder using the cd command and type scas ?. This will give you the syntax for using the scas tool. All you need to so is then type scas <your .sc file> <the new file name>. This will create a new file that is a compiled version of you're mapping. Then, while you have you're Soarer converter plugged, you type in the same command line: scwr <you're new file name>. This will send the file to the Soarer and become you're layout.

You can do this again to change the layout again!
Title: Re: XT/AT/PS2/Terminal to USB Converter with NKRO
Post by: fohat.digs on Thu, 17 July 2014, 06:55:28
How do I program IBM Model M 122?

Wcass made it easy in post # 560
Title: Re: XT/AT/PS2/Terminal to USB Converter with NKRO
Post by: kako on Thu, 17 July 2014, 12:21:00
Hi,

I have recently set up this converter with a model m ssk, to hopefully get rid of AHK for remapping,
but have stumbled on an issue. The ALT key behaves differently than on a 'bluebox' converter for example.
It is triggered on press down, instead it should be on release - because of that Alt - Print Screen combination
does not work.

Is this a bug or is there a way to specify this behaviour via config?


I do not know the cause of it but a working solution is actually quite simple.
Code: [Select]
remapblock
    EXTRA_SYSRQ PRINTSCREEN
endblock

Same behaviour is observed on a full size model m.

Title: Re: XT/AT/PS2/Terminal to USB Converter with NKRO
Post by: Techno Trousers on Thu, 17 July 2014, 12:57:55
This is a bit OT, but is Soarer still around and working on this? His last post on GH was four months ago. I know he said in the past that this project wasn't ready for open source, but I hope he'll consider opening it up if he's ready to give it up.
Title: Re: XT/AT/PS2/Terminal to USB Converter with NKRO
Post by: kako on Thu, 17 July 2014, 14:25:38
Is there a way to make a macro combination repeatable? Presently the command runs just once when the selected combination is pressed even if the two keys remains in down position/are not released.


And to answer myself;

Code: [Select]
macro PAGE_UP ALT
MAKE MEDIA_VOLUME_UP
onbreak norestoremeta
BREAK MEDIA_VOLUME_UP
endmacro


But can anyone tell me why this will not work


Code: [Select]
macroblock
macro DOWN ALT
PRESS X
endmacro
endblock


and this wont

Code: [Select]
macroblock
macro DOWN CTRL
PRESS X
endmacro
endblock


while this will


Code: [Select]
macroblock
macro DOWN SHIFT
PRESS X
endmacro
endblock


And to answer myself again; alt is complicated.

Code: [Select]
#missing numpad enter :'(
macro RIGHT LALT
BREAK LALT
PRESS ESC
PUSH_META CLEAR_META all
MAKE ENTER
onbreak norestoremeta
BREAK LALT
PRESS ESC
PUSH_META CLEAR_META all
BREAK ENTER
endmacro



Title: Re: XT/AT/PS2/Terminal to USB Converter with NKRO
Post by: Mr. Perfect on Fri, 18 July 2014, 14:40:41
This converter won't help you there. It only converts standard PS/2 keyboard behaviour to USB. It doesn't support any special PS/2 commands for programming keyboards that Cherry uses. Even if it could do that, that would not work with the Cherry software. To program the board you will need a computer with a PS/2 port.

After you're done programming the board, you can probably use either your generic converter or use Soarer's if the board supports special key codes that the generic converter doesn't support.

Damn, I was afraid of that. Thanks for answering. The board does hold the programming once it's set, but most machines don't even have PS/2 ports anymore.
Title: Re: XT/AT/PS2/Terminal to USB Converter with NKRO
Post by: ZefyrPyon on Sat, 16 August 2014, 19:12:45
Just ordered the parts in the mail. Can't wait to have fun with this project!! //squeals.-
Title: Re: XT/AT/PS2/Terminal to USB Converter with NKRO
Post by: vivalarevolución on Sun, 17 August 2014, 07:59:17
I know this info is probably in the thread somewhere, but I was hoping somebody could point me towards the answer.  On an IBM Model F XT, does anybody know which internal wires correspond to GND, VCC, Data, Clock, etc?   I want to connect the Teensy internally at the controller rather than use adapters with the connector cable.  I've got brown, red, white and black wires, if that helps anybody.
Title: Re: XT/AT/PS2/Terminal to USB Converter with NKRO
Post by: fohat.digs on Sun, 17 August 2014, 09:07:24
I know this info is probably in the thread somewhere, but I was hoping somebody could point me towards the answer.  On an IBM Model F XT, does anybody know which internal wires correspond to GND, VCC, Data, Clock, etc?   I want to connect the Teensy internally at the controller rather than use adapters with the connector cable.  I've got brown, red, white and black wires, if that helps anybody.

If you have the original cable and a multimeter, trace them yourself.
Title: Re: XT/AT/PS2/Terminal to USB Converter with NKRO
Post by: vivalarevolución on Sun, 17 August 2014, 20:03:44
I know this info is probably in the thread somewhere, but I was hoping somebody could point me towards the answer.  On an IBM Model F XT, does anybody know which internal wires correspond to GND, VCC, Data, Clock, etc?   I want to connect the Teensy internally at the controller rather than use adapters with the connector cable.  I've got brown, red, white and black wires, if that helps anybody.

If you have the original cable and a multimeter, trace them yourself.


I don't have a multimeter. I was hoping for the easy way out with this one.
Title: Re: XT/AT/PS2/Terminal to USB Converter with NKRO
Post by: fohat.digs on Sun, 17 August 2014, 21:19:42
I was hoping for the easy way out with this one.

NEVER trust colors. Including IBM-to-IBM.
Title: Re: XT/AT/PS2/Terminal to USB Converter with NKRO
Post by: Techno Trousers on Sun, 17 August 2014, 21:24:36
If you have a Harbor Freight Tools nearby, you can get a multimeter really cheap. You just need to test continuity, so accuracy isn't important here. It's better to spend a little up front to make sure the the wiring's right, rather than risk blowing a cap on the controller.
Title: Re: XT/AT/PS2/Terminal to USB Converter with NKRO
Post by: ZefyrPyon on Thu, 21 August 2014, 20:37:39
I used this:

http://deskthority.net/workshop-f7/simple-logic-analyzer-for-teensy-t4567.html

and got this:

Waiting for device:....................
Listening:
wEE

remaining: FFFC


Keyboard ID: 0000
Code Set: 1
Mode: PC/XT



Device disconnected.
Waiting for new device:.........................
Listening:
sctrace v1.01
0009771 0009771 FD48670 FD69770 0009771 000A771 37D1FF0 37EA770 3804770 3832770
3862770 3DB5770 3DCF770 483F770 4858770 4BF7770 0009771 0009771 2313730 5C0F730
8EA2730 BA0B730 0009731 79B4770 000A771 60F1730 000A731 0009731 81CEFF0 0009FF1
000AFF1 8B20770 0009771 0009771 49D8730 6B85770 6BB7730 9C4A730 0009731 2515730
34A2770 350E730 000A731 0009731 B2DD730 C809730 DD4C730 0009731 3970730 4977730
520A730 6401770 6701730 698B770 6B25730 F634770 0009771 0D02730 1175770 1B25730
3095770 313D730 3791770 56A0730 61AC770 733E730 7D9F730 826C730 88D2730 8DEB730
A13D730 A93A730 AECE730 BDFB730 C80B770 000A771 1D30730 41AF730 51E3770 6010730
9DB4730 AA6E730 000A731 40E1730 E778730 0009731 29DE730 6976730 0009731 0146730
7AAD730 B910770 000A771 01D0730 0009731 0009731 9BFE730 F3A8770 F3F3730 000A731
2767730 48AA730 70D3730 000A731 441A730 9C93730 0009731 000A731 66CB770 66E4730
000A731 0009731 0C8D730 0009731 0009731 5F7A770 0009771 0009771 B00F730 000B731
0009731 09EE770 0009771 0009771 9AC9730 0009731 000A731 C1BA770 0009771 0009771
7261730 000A731 0009731 3CA9770 0009771 000A771 0885FF0 08C2770 08DBFF0 08F4770
090EFF0 0928FF0 09CA770 09E5FF0 0BD3770 0BEDFF0 0EC2770 0EDCFF0 0F25770 0009771
0009771 74E4770 7857770 0009771 000A771 A93D770 000A771 0009771 4305770 43F3770
440D770 442FFF0 4448770 4503770 45CEFF0 45E7770 4672770 46B4770 47E7FF0 480E770
4A38770 4B3DFF0 4B57770 5610FF0 5690770 ACAFFF0 ACD5770 B2C7770 B3E5770 B603FF0
B623770 0009771 1AB2FF0 1ACC770 1C2DFF0 1C46770 28EAFF0 2903770 2A57FF0 2A70770
2C97FF0 2CB0770 2DC2FF0 2DDB770 3B99770 3DC7FF0 3DE0770 622A770 8371770 8AA1770
8CD5FF0 8CEE770 8EC1770 8FF5FF0 900E770 9137770 968A770 9943770 C74C770 C815770
E8A9770 F07D770 F33D770 F357770 F559770 F62CFF0 F694770 FCF6FF0 FD0F770 FFEB770
0009771 017CFF0 01B6770 08A0770 0967770 0B9AFF0 0BB5770 0F2F770 234D770 23EAFF0
2404770 3BEFFF0 3C09770 4F5DFF0 4F76770 5AB9FF0 5AD2770 61D2FF0 61EC770 6872770
7391FF0 73AA770 000A771 000A771 5F25FF0 638B770 6701770 6944770 6985FF0 6A39770
6A7BFF0 6A98770 6C80FF0 6CBD770 6D45FF0 6D8E770 6E6CFF0 6EA2770 72D9FF0 7318770
0009771 000A771


Using a teensy 2.0 and a Model M 122 Key Terminal Keyboard. What am I supposed to do. >.< I am lost now.
Title: Re: XT/AT/PS2/Terminal to USB Converter with NKRO
Post by: JPG on Thu, 21 August 2014, 20:46:28
First thing I would do is to test your wiring to make sure it's all ok and that you have not inverted the data and timing cables.
Title: Re: XT/AT/PS2/Terminal to USB Converter with NKRO
Post by: turtlelordjp on Mon, 01 September 2014, 18:42:26
I am having some issues with this on my teensy 2.0.  I have a model M (1395660) connected to the teensy.  It had a RJ-45 connector, and I have extra double checked that i have wired it correctly (5v on 3/Vcc, data on 4/PD0, clock on 5/PD1, grd on 6/grd).  I get the following readout when plugging it in

wEE

remaining:FFFC


Keyboard ID:0000
Code Set: 1
Mode: PC/XT

R05


I have taken a multimeter to the teensy, here are the readings:
5v -> data 2Kohm
5v -> clock 2Kohm
5v -> grd 10.27Kohm
grd -> data 12.26Kohm
grd -> clock 12.26Kohm
clock -> data 4.03Kohm

While plugged in (black on ground)
grd->clock 1.2V
grd->data 1.2V
grd->Vcc .08V

Any help would be appreciated! Thanks
Title: Re: XT/AT/PS2/Terminal to USB Converter with NKRO
Post by: fohat.digs on Mon, 01 September 2014, 18:51:43

It had a RJ-45 connector, and I have extra double checked that i have wired it correctly (5v on 3/Vcc, data on 4/PD0, clock on 5/PD1, grd on 6/grd). 


I am not sure what these numbers mean, but be sure to remember that the diagrams show the socket (female) that the cable (male) plugs into rather than the plug itself.

Conn.       Teensy
GND -------- GND
Vcc/+5V ---- Vcc
Data ------- PD0
Clock ------ PD1

Title: Re: XT/AT/PS2/Terminal to USB Converter with NKRO
Post by: turtlelordjp on Mon, 01 September 2014, 19:09:25

It had a RJ-45 connector, and I have extra double checked that i have wired it correctly (5v on 3/Vcc, data on 4/PD0, clock on 5/PD1, grd on 6/grd). 


I am not sure what these numbers mean, but be sure to remember that the diagrams show the socket (female) that the cable (male) plugs into rather than the plug itself.

Conn.       Teensy
GND -------- GND
Vcc/+5V ---- Vcc
Data ------- PD0
Clock ------ PD1

These numbers relate to the pin-out on the RJ-45 connector.  I have them as you said. Thanks
Title: Re: XT/AT/PS2/Terminal to USB Converter with NKRO
Post by: arakula on Mon, 15 September 2014, 06:38:52
Today, I've got a Teensy 2.0 and applied the converter to an old IBM 3270 terminal keyboard (1394312, M-122, no LEDs, RJ-45 connector). I had already created a little LED control PCB, so adding it was a matter of minutes. Absolutely great!

Since my main keyboard is a Unicomp PC/5250 keyboard, I've created a layout that's nearly 100% compatible to that (actually, it handles certain conditions BETTER than the original, which I intend to modify a bit once this replacement keyboard is fully up to the job). Here it is:

Code: [Select]
ifset set3
# Arakula's config for Terminal Model M (No 1394312, 122 keys, ISO Layout, cable with RJ45 connector)
# This one mimics the Unicomp PC/5250's behavior as closely as possible

###############################################################################
# macros to mimic the PC/5250 set 2 behavior
###############################################################################

# left hand side function keys
macroblock
    macro EXTRA_F2
      PUSH_META CLEAR_META all    # save and clear all metas
      SET_META lctrl
      press 2
      POP_ALL_META
    endmacro
    macro EXTRA_F5
      PUSH_META CLEAR_META all    # save and clear all metas
      SET_META LCTRL
      press PAUSE
      POP_ALL_META
    endmacro
    macro EXTRA_F6
      PUSH_META CLEAR_META all    # save and clear all metas
      SET_META LALT
      press F1
      POP_ALL_META
    endmacro
    macro EXTRA_F7
      PUSH_META CLEAR_META all    # save and clear all metas
      SET_META LCTRL LSHIFT
      press 4
      POP_ALL_META
    endmacro
    macro EXTRA_F8
      PUSH_META CLEAR_META all    # save and clear all metas
      SET_META LCTRL LSHIFT
      press 3
      POP_ALL_META
    endmacro
endblock

# function keys upper row
macroblock
    macro F13
      PUSH_META CLEAR_META all    # save and clear all metas
      SET_META lshift
      press F1
      POP_ALL_META
    endmacro
    macro F14
      PUSH_META CLEAR_META all    # save and clear all metas
      SET_META lshift
      press F2
      POP_ALL_META
    endmacro
    macro F15
      PUSH_META CLEAR_META all    # save and clear all metas
      SET_META lshift
      press F3
      POP_ALL_META
    endmacro
    macro F16
      PUSH_META CLEAR_META all    # save and clear all metas
      SET_META lshift
      press F4
      POP_ALL_META
    endmacro
    macro F17
      PUSH_META CLEAR_META all    # save and clear all metas
      SET_META lshift
      press F5
      POP_ALL_META
    endmacro
    macro F18
      PUSH_META CLEAR_META all    # save and clear all metas
      SET_META lshift
      press F6
      POP_ALL_META
    endmacro
    macro F19
      PUSH_META CLEAR_META all    # save and clear all metas
      SET_META lshift
      press F7
      POP_ALL_META
    endmacro
    macro F20
      PUSH_META CLEAR_META all    # save and clear all metas
      SET_META lshift
      press F8
      POP_ALL_META
    endmacro
    macro F21
      PUSH_META CLEAR_META all    # save and clear all metas
      SET_META lshift
      press F9
      POP_ALL_META
    endmacro
    macro F22
      PUSH_META CLEAR_META all    # save and clear all metas
      SET_META lshift
      press F10
      POP_ALL_META
    endmacro
    macro F23
      PUSH_META CLEAR_META all    # save and clear all metas
      SET_META lshift
      press F11
      POP_ALL_META
    endmacro
    macro F24
      PUSH_META CLEAR_META all    # save and clear all metas
      SET_META lshift
      press F12
      POP_ALL_META
    endmacro
endblock

# cursor block
macroblock
    # This is really for the INSERT key, which has been remapped to the unused key INTERNATIONAL_8
    macro INTERNATIONAL_8
      PUSH_META CLEAR_META all    # save and clear all metas
      SET_META lshift
      press TAB
      POP_ALL_META
    endmacro
    # This is really for the DELETE key, which has been remapped to the unused key INTERNATIONAL_9
    macro INTERNATIONAL_9
      # this one is completely senseless, but Unicomp PC/5250...
      PUSH_META CLEAR_META all    # save and clear all metas
      # must be set separately to get them in precise order
      SET_META lshift
      SET_META lctrl
      POP_ALL_META
    endmacro
endblock

# Numpad
macroblock
    macro SCROLL_LOCK shift
      PRESS NUM_LOCK
    endmacro
endblock

###############################################################################
# key remapping
###############################################################################
remapblock
    # left hand side function keys
    EXTRA_F1 ESC
# EXTRA_F2 macro: LCtll - 2 - 2 up - LCtrl up
    EXTRA_F3 PRINTSCREEN
    EXTRA_F4 PAUSE
# EXTRA_F5 macro: LCtrl - Break down - Break up - LCtrl up
# EXTRA_F6 macro: LAlt - F1 - F1 up - LAlt up
# EXTRA_F7 macro: LCtrl - LShift - 4 - LShift up - LCtrl up
# EXTRA_F8 macro: LCtll - LShift - 3 - LShift up - LCtrl up
    EXTRA_F9 LGUI
    EXTRA_F10 APP
   
    # function keys upper row
# F13         macro: LShift - F1 - F1 up - LShift up
# F14         macro: LShift - F2 - F2 up - LShift up
# F15         macro: LShift - F3 - F3 up - LShift up
# F16         macro: LShift - F4 - F4 up - LShift up
# F17         macro: LShift - F5 - F5 up - LShift up
# F18         macro: LShift - F6 - F6 up - LShift up
# F19         macro: LShift - F7 - F7 up - LShift up
# F20         macro: LShift - F8 - F8 up - LShift up
# F21         macro: LShift - F9 - F9 up - LShift up
# F22         macro: LShift - F10 - F10 up - LShift up
# F23         macro: LShift - F11 - F11 up - LShift up
# F24         macro: LShift - F12 - F12 up - LShift up

    # cursor block
    # these 2 mapped to unused keys, which are then treated by macros
    INSERT      INTERNATIONAL_8
    DELETE      INTERNATIONAL_9
    HOME        INSERT
    END         DELETE
    LANG_4      HOME
   
    # Numpad
    ESC         END
    NUM_LOCK    SCROLL_LOCK
    SCROLL_LOCK PAD_SLASH
    EXTRA_SYSRQ PAD_ASTERIX
    PAD_ASTERIX PAD_MINUS
    PAD_MINUS PAD_PLUS
    PAD_PLUS    PAD_ENTER
   
    # #-key
    EUROPE_1 BACKSLASH
endblock

... does the job, including the idiotic key behavior of the Delete key (in the sense of a normal PS/2 keyboard) on the number block.

Pics will follow once I got the final cabling :-)
Title: Re: XT/AT/PS2/Terminal to USB Converter with NKRO
Post by: arakula on Tue, 16 September 2014, 09:31:56
I've added a little image gallery for my mod at http://imgur.com/a/RRwBH - have fun!
Title: Re: XT/AT/PS2/Terminal to USB Converter with NKRO
Post by: vimx on Thu, 18 September 2014, 08:30:06
I've added a little image gallery for my mod at http://imgur.com/a/RRwBH - have fun!

Amazing work.  That is a really nice and HUGE keyboard. 
Title: Re: XT/AT/PS2/Terminal to USB Converter with NKRO
Post by: jevvix on Tue, 23 September 2014, 03:15:20
I'm getting some really strange behavior, maybe someone can guide me in the right direction. Keyboard is IBM XT.

On XP laptop, everything works fine. HID Listen output:
Keyboard ID: 0000
Code Set: 1
Mode: PC/XT

But on this Win8 desktop it doesn't work.  HID Listen output of a few seconds gets spammed until I disconnect it manually. Zero response from the keyboard:
(http://i.imgur.com/YHHNT4v.png)

Any ideas what's going on?
Title: Re: XT/AT/PS2/Terminal to USB Converter with NKRO
Post by: hjkl_over_wasd on Fri, 26 September 2014, 04:15:27
Can someone please help me troubleshoot my problem?

I have an HHKB Pro2 which I want connected to the Teensy2, but I also want to keep the USB hub. Therefore I thought I could use PS2 to USB, by connecting a USB cable from the HHKB to the Teensy as shown on the picture.

I've loaded the hex file I got from compiling the Makefile.pjrc in ps2_usb from the TMK repo. I tried both the GUI and the CLI loader. Nothing happens when I press a key ..
Title: Re: XT/AT/PS2/Terminal to USB Converter with NKRO
Post by: Halvar on Fri, 26 September 2014, 06:36:52
I've loaded the hex file I got from compiling the Makefile.pjrc in ps2_usb from the TMK repo.
TMK repo? Compiling? I think you are in the wrong thread, this is not about hasu's controller.

If you want the Soarer converter the download of the hex file is in the OP of this thread.
Title: Re: XT/AT/PS2/Terminal to USB Converter with NKRO
Post by: hjkl_over_wasd on Sat, 27 September 2014, 06:44:04
I've loaded the hex file I got from compiling the Makefile.pjrc in ps2_usb from the TMK repo.
TMK repo? Compiling? I think you are in the wrong thread, this is not about hasu's controller.

If you want the Soarer converter the download of the hex file is in the OP of this thread.
OK. I've tried loading the soarer firmware (1.12), but still no input from my keyboard shows up on screen.

the dmesg output shows that the firmware is loaded:

Code: [Select]
[136213.479186] usb 4-1.2: New USB device found, idVendor=16c0, idProduct=047d
[136213.479197] usb 4-1.2: New USB device strings: Mfr=1, Product=2, SerialNumber=0
[136213.479202] usb 4-1.2: Product: Soarer's Keyboard Converter
[136213.479207] usb 4-1.2: Manufacturer: Soarer
[136213.480416] hid-generic 0003:16C0:047D.0014: No inputs registered, leaving
[136213.480519] hid-generic 0003:16C0:047D.0014: hidraw0: USB HID v1.11 Keyboard [Soarer Soarer's Keyboard Converter] on usb-0000:00:1d.0-1.2/input0
[136213.481775] hid-generic 0003:16C0:047D.0015: hidraw1: USB HID v1.11 Device [Soarer Soarer's Keyboard Converter] on usb-0000:00:1d.0-1.2/input1
[136213.484198] input: Soarer Soarer's Keyboard Converter as /devices/pci0000:00/0000:00:1d.0/usb4/4-1/4-1.2/4-1.2:1.2/0003:16C0:047D.0016/input/input27
[136213.484410] hid-generic 0003:16C0:047D.0016: input,hidraw2: USB HID v1.11 Keyboard [Soarer Soarer's Keyboard Converter] on usb-0000:00:1d.0-1.2/input2
[136213.485902] hid-generic 0003:16C0:047D.0017: hiddev0,hidraw3: USB HID v1.11 Device [Soarer Soarer's Keyboard Converter] on usb-0000:00:1d.0-1.2/input3

Can someone please confirm that my wiring is correct?
Title: Re: XT/AT/PS2/Terminal to USB Converter with NKRO
Post by: Halvar on Sat, 27 September 2014, 08:30:48
Wiring looks wrong to me.

From Soarer's docs:

Quote
Wiring Info

Connector   Breakout board
GND GND
Vcc/+5V VCC
Data PD0
Clock PD1
Keyboard Reset v1.1+   PB7

See PJRC for Teensy pinouts, or the documentation that came with your chosen breakout board.

'Keyboard Reset' is only required for certain PC/XT-like keyboards, such as the Leading Edge DC-2014.

Teensy 2.0 wiring:
(http://www.pjrc.com/teensy/pinout2a.png)

Looks to me like you soldered data and clock to PD2 and PD5 instead of PD0 and PD1.
Title: Re: XT/AT/PS2/Terminal to USB Converter with NKRO
Post by: hjkl_over_wasd on Sat, 27 September 2014, 10:49:05
Thanks Halvard. You're absolutely correct. I've been mixing these instructions with the TMK stuff, thinking they've been the same thing for some reason ..

I'm tempted to see if I can make the changes in the firmware, since I'll have to wait until Monday to fix the soldering, but that's probably the safer thing to do, so I'll wait.

Thanks again.
Title: Re: XT/AT/PS2/Terminal to USB Converter with NKRO
Post by: jevvix on Thu, 09 October 2014, 02:25:49
v1.10 is now available in the OP (http://geekhack.org/index.php?topic=17458.0)!
  • Added support for 'almost' PC/XT protocol keyboards, e.g. Leading Edge DC-2014.

Has anyone actually been able to get the converter to work with a DC-2014? I keep getting the same thing:

Code: [Select]
Listening:
wEE

remaining: FFFC

Keyboard ID: 0000
Code Set: 1
Mode: PC/XT

R05

And nothing when I try to press keys. I've tried it on 5 different DC-2014's and I refuse to believe none of them work...
Title: Re: XT/AT/PS2/Terminal to USB Converter with NKRO
Post by: fohat.digs on Thu, 09 October 2014, 07:11:11

Has anyone actually been able to get the converter to work with a DC-2014?


I had the same experience.

Somewhere recently I heard an oblique reference that the DC-2014 expects that extra 5th leg connected for some reason.

I think that Akimbo got one to work.

PS - you are sitting on a gold mine
Title: Re: XT/AT/PS2/Terminal to USB Converter with NKRO
Post by: klunkymutt on Sat, 11 October 2014, 00:05:51
Alright, so I just picked up a Terminal Model M 1392595 with an RJ45 connector. I purchased a female RJ45 connector as well as a Teensy 2.0 and I read in the post that if you swap Ground and Power bad things happen. I was sort of confused by the orientation of your RJ45 diagram so I just wanted to clarify I had it right before I go break my new keyboard haha. If I hold the RJ45 connector like this: (http://imgur.com/Z3W8xWi) the very left wire(the black one on pin 3) is VCC 5v correct?

EDIT: The spellings
Title: Re: XT/AT/PS2/Terminal to USB Converter with NKRO
Post by: Halvar on Sat, 11 October 2014, 04:01:21
Does your post miss a photo?

This is the view on the front of your female RJ45 connector.

(http://www.kbdbabel.org/conn/kbd_connector_ibmterm.png)






Title: Re: XT/AT/PS2/Terminal to USB Converter with NKRO
Post by: klunkymutt on Sat, 11 October 2014, 11:27:44
Weird. My photo doesn't show up but if you click on it it will pull it up.

I was holding it with the retention clip facing down and looking at the pins. The 3rd pin would be VCC right?
Title: Re: XT/AT/PS2/Terminal to USB Converter with NKRO
Post by: fohat.digs on Sat, 11 October 2014, 13:41:42
Weird. My photo doesn't show up but if you click on it it will pull it up.

I was holding it with the retention clip facing down and looking at the pins. The 3rd pin would be VCC right?

The retention clip is on the cable (male).

The diagram is of the socket (female).

In the socket it is the 3rd pin from the left.

On the cable it is the 3rd pin from the right.

These socket diagrams make people crazy because 90% of the time it is the cable plug that they are holding in their hand and looking at.
Title: Re: XT/AT/PS2/Terminal to USB Converter with NKRO
Post by: Halvar on Sat, 11 October 2014, 13:42:43
Yes, that's right, 3rd pin (black cable) on the photo is VCC.

(http://i.imgur.com/Z3W8xWi.jpg)
Title: Re: XT/AT/PS2/Terminal to USB Converter with NKRO
Post by: klunkymutt on Sat, 11 October 2014, 13:50:24
Yup. I just realized that when I said it was pin 3 and I realized the numbers on the diagram correspond with the pins.

Thanks for the help :)
Title: Re: XT/AT/PS2/Terminal to USB Converter with NKRO
Post by: vivalarevolución on Mon, 13 October 2014, 16:53:25
If you have a Harbor Freight Tools nearby, you can get a multimeter really cheap. You just need to test continuity, so accuracy isn't important here. It's better to spend a little up front to make sure the the wiring's right, rather than risk blowing a cap on the controller.

Alright, I am back at with the keyboard, but I no clue how to check continuity or anything.  I don't get any readings on this multimeter.

Using a multimeter to me is like a black box.  I don't want to waste anyone's time with my total newbness, but I was wondering if anyone could point me towards some good resources on how to use a multimeter rather than me just randomly searching around the Internet.  I need like a mentor to take me under their arm and show me the ways electrical engineering.
Title: Re: XT/AT/PS2/Terminal to USB Converter with NKRO
Post by: fohat.digs on Mon, 13 October 2014, 17:33:03
how to use a multimeter rather than me just randomly searching around the Internet. 

My favorite cheap-o has a beeper. If you touch the 2 probes on something that is connected, it beeps.

98% of the time that is all I want to do, see if something is connected or not.

I have a 2nd multimeter that does more things but does not have a beeper. Does anybody want to buy it for $10 shipped including a new battery?

Without a beeper, just try to determine whether anything at all is passing through. If you get some sort of reading with both probes touching something, and no reading if they are not, then you probably have continuity.

At the moron level that I usually work from, that is all you need.
Title: Re: XT/AT/PS2/Terminal to USB Converter with NKRO
Post by: vivalarevolución on Tue, 14 October 2014, 05:46:16
how to use a multimeter rather than me just randomly searching around the Internet. 

My favorite cheap-o has a beeper. If you touch the 2 probes on something that is connected, it beeps.

98% of the time that is all I want to do, see if something is connected or not.

I have a 2nd multimeter that does more things but does not have a beeper. Does anybody want to buy it for $10 shipped including a new battery?

Without a beeper, just try to determine whether anything at all is passing through. If you get some sort of reading with both probes touching something, and no reading if they are not, then you probably have continuity.

At the moron level that I usually work from, that is all you need.

Yea, I am working from the same moron level.  I got an el cheapo from Harbor Freight, but I can't get readings from anything.  I think that I need to poke around the Internet some more for basic information.

Even if I figure out how to use the multimeter and get a reading, when I'm trying to determine which prong is which on the controller of the XT, I have no clue what I am looking for to make that determination.
Title: Re: XT/AT/PS2/Terminal to USB Converter with NKRO
Post by: medvednic on Tue, 14 October 2014, 09:58:55
My terminal Model M works thanks to soarers converters, here is the summary of my efforts:
http://imgur.com/a/WttW4

Thanks!
Title: Re: XT/AT/PS2/Terminal to USB Converter with NKRO
Post by: JPG on Tue, 14 October 2014, 10:16:43
how to use a multimeter rather than me just randomly searching around the Internet. 

My favorite cheap-o has a beeper. If you touch the 2 probes on something that is connected, it beeps.

98% of the time that is all I want to do, see if something is connected or not.

I have a 2nd multimeter that does more things but does not have a beeper. Does anybody want to buy it for $10 shipped including a new battery?

Without a beeper, just try to determine whether anything at all is passing through. If you get some sort of reading with both probes touching something, and no reading if they are not, then you probably have continuity.

At the moron level that I usually work from, that is all you need.

Yea, I am working from the same moron level.  I got an el cheapo from Harbor Freight, but I can't get readings from anything.  I think that I need to poke around the Internet some more for basic information.

Even if I figure out how to use the multimeter and get a reading, when I'm trying to determine which prong is which on the controller of the XT, I have no clue what I am looking for to make that determination.


The XT is the easiest to figure out since there's an image in this thread that shows what goes where AND it has test pads so it's much easier for a first conversion. As for the multimeter, just set it up to test continuity (it will beep if there's current and does nothing if there's no current and it's all you need to know. You put one pin from the multimeter on a pad and the other on a pin where the cable is plugged (or on the cable pins if you want to use the cable). If it beeps it's connected, else it's not.


To make it easier, I will post the image of the XT pads mapping that Soarer posted a few pages before:


[attach=1]
Title: Re: XT/AT/PS2/Terminal to USB Converter with NKRO
Post by: vivalarevolución on Tue, 14 October 2014, 16:31:13
how to use a multimeter rather than me just randomly searching around the Internet. 

My favorite cheap-o has a beeper. If you touch the 2 probes on something that is connected, it beeps.

98% of the time that is all I want to do, see if something is connected or not.

I have a 2nd multimeter that does more things but does not have a beeper. Does anybody want to buy it for $10 shipped including a new battery?

Without a beeper, just try to determine whether anything at all is passing through. If you get some sort of reading with both probes touching something, and no reading if they are not, then you probably have continuity.

At the moron level that I usually work from, that is all you need.

Yea, I am working from the same moron level.  I got an el cheapo from Harbor Freight, but I can't get readings from anything.  I think that I need to poke around the Internet some more for basic information.

Even if I figure out how to use the multimeter and get a reading, when I'm trying to determine which prong is which on the controller of the XT, I have no clue what I am looking for to make that determination.


The XT is the easiest to figure out since there's an image in this thread that shows what goes where AND it has test pads so it's much easier for a first conversion. As for the multimeter, just set it up to test continuity (it will beep if there's current and does nothing if there's no current and it's all you need to know. You put one pin from the multimeter on a pad and the other on a pin where the cable is plugged (or on the cable pins if you want to use the cable). If it beeps it's connected, else it's not.


To make it easier, I will post the image of the XT pads mapping that Soarer posted a few pages before:


(Attachment Link)

Now I feel lazy for not searching deep enough in the thread to find the answer and filling it up with my ignorance. 

Anyways, next time, I will do a little research.
Title: Re: XT/AT/PS2/Terminal to USB Converter with NKRO
Post by: fohat.digs on Tue, 14 October 2014, 17:02:55

Now I feel lazy for not searching deep enough in the thread


This thread is the quintessential example of "bloat" and I wish that there was a way to extract the 5% of it that is actually helpful and informative into a parallel "Soarer's" thread.
Title: Re: XT/AT/PS2/Terminal to USB Converter with NKRO
Post by: vivalarevolución on Tue, 14 October 2014, 17:29:51
Alright, thanks guys, got it working.
Title: Re: XT/AT/PS2/Terminal to USB Converter with NKRO
Post by: jevvix on Tue, 14 October 2014, 19:41:37

Has anyone actually been able to get the converter to work with a DC-2014?


I had the same experience.

Somewhere recently I heard an oblique reference that the DC-2014 expects that extra 5th leg connected for some reason.

I think that Akimbo got one to work.

PS - you are sitting on a gold mine

After searching I finally found the answer in the docs zip. Since version 1.1 of his firmware Soarer has supported the 'reset pin', that 5th pin, that enable keyboards like the Leading Edge DC-2014 to work. It's mapped to PB7 (pin 12) on the atmega32u4.

Great news for people that use the Teensy, but, I use the Pro Micro and PB7 isn't pinned out.

edit: Using http://deskthority.net/workshop-f7/how-to-use-a-pro-micro-as-a-cheap-controller-converter-like-soarer-s-t8448-30.html for the Pro Micro to remap PB7 to PB6 I've got all of my DC-2014's working!

I thought connecting the reset pin would also help my one other keyboards too but it seems to still not want to work. Registers under Soarer's firmware as XT but PCB it says "Multitech KB084 - PC/AT" and is unbranded otherwise. Doesn't work via passive din5 -> ps/2 either. The keys register(?) while watching HID_Listen but they all throw "r05" when depressed and "r06" when released. This one surely has to be another quasi-XT keyboard that Soarer's firmware doesn't support  :'(

(http://i.imgur.com/q0RbkrQ.jpg)
Title: Re: XT/AT/PS2/Terminal to USB Converter with NKRO
Post by: arakula on Wed, 15 October 2014, 11:50:59
Great news for people that use the Teensy, but, I use the Pro Micro and PB7 isn't pinned out.

edit: Using http://deskthority.net/workshop-f7/how-to-use-a-pro-micro-as-a-cheap-controller-converter-like-soarer-s-t8448-30.html for the Pro Micro to remap PB7 to PB6 I've got all of my DC-2014's working
Ah, so you're responsible for the "one download" :cool:
Great to know it was of help to somebody!

edit: BTW, I just added another little patch (downloadable from the same thread on DT) to let Soarer's Converter use the RX LED on the Pro Micro for visual feedback. Not necessary, but perhaps nice to have.
Title: Re: XT/AT/PS2/Terminal to USB Converter with NKRO
Post by: jevvix on Wed, 15 October 2014, 18:38:42
Great news for people that use the Teensy, but, I use the Pro Micro and PB7 isn't pinned out.

edit: Using http://deskthority.net/workshop-f7/how-to-use-a-pro-micro-as-a-cheap-controller-converter-like-soarer-s-t8448-30.html for the Pro Micro to remap PB7 to PB6 I've got all of my DC-2014's working
Ah, so you're responsible for the "one download" :cool:
Great to know it was of help to somebody!

edit: BTW, I just added another little patch (downloadable from the same thread on DT) to let Soarer's Converter use the RX LED on the Pro Micro for visual feedback. Not necessary, but perhaps nice to have.

Fantastic! Thank you for your work.
Title: Re: XT/AT/PS2/Terminal to USB Converter with NKRO
Post by: Hypersphere on Sat, 18 October 2014, 09:46:05
Will the Soarer Converter work on the IBM 5085 104-Key Model F terminal keyboard (part number 6016730)? This is the one that has two D-sub connectors rather than a Din-5 connector.

If the Soarer Converter will not work, what about the Xwhatsit controller?
Title: .
Post by: gr1618 on Fri, 24 October 2014, 16:30:01
.
Title: Re: XT/AT/PS2/Terminal to USB Converter with NKRO
Post by: jevvix on Mon, 27 October 2014, 22:59:01
I put together a new Soarer's converter last night. I didn't have an enclosure to house the electronics in so I had to go for a more minimalist approach. I used one of these (http://www.allelectronics.com/make-a-store/item/din-5f/female-5-pin-din-connector-in-line-locking/1.html) connectors and tried to keep everything as compact as possible. You can see the results below. Thank you Soarer for creating and sharing your converter.

Nice. Those DIN connectors are far cheaper than the PCB mount ones I bought from Digikey. Think mine were like $7-$8/each :eek: but I do like how my trio turned out. Still need to heat shrink cover them:

(http://i.imgur.com/UcGdCNR.jpg)

(http://i.imgur.com/Ej8tm19.jpg)
Title: .
Post by: gr1618 on Wed, 29 October 2014, 21:06:53
.
Title: Re: XT/AT/PS2/Terminal to USB Converter with NKRO
Post by: vivalarevolución on Sat, 01 November 2014, 15:49:59
Anybody got a photo of an internally mounted Teensy for a PS/2 Model M, not a Terminal M?  I want to mount my Teensy internally.  I'm thinking that I need to de-solder the socket, and then connect the Teensy that way by soldering some wires to the socket holes and the Teensy.  Does that sound about right?

Title: Re: XT/AT/PS2/Terminal to USB Converter with NKRO
Post by: TheSven on Sun, 02 November 2014, 04:41:40
So would I be able to program the teensy as a UK layout, because many terminal keyboards have an ISO enter key I believe?
Title: Re: XT/AT/PS2/Terminal to USB Converter with NKRO
Post by: Halvar on Sun, 02 November 2014, 06:12:07
The national keyboard layout is determined by the PC's operating system, not by the keyboard. You can use a US layout or a UK layout or any layout you like. The form of the Enter key doesn't matter as long as it sends the key code for "Return key" to the PC.

Soarer's converter cann basically make a keypress look like a different keypress, or like a sequence of keypresses. For example you could make your "Caps lock" key look to the PC like the "Control" key and the "Control" key look like "Caps lock", but the converter cannot emulate a different national layout.
Title: Re: XT/AT/PS2/Terminal to USB Converter with NKRO
Post by: wes1099 on Fri, 07 November 2014, 16:37:08
Are the wires in the IBM DIN5 connector color coded? If so what color means what?
Title: Re: XT/AT/PS2/Terminal to USB Converter with NKRO
Post by: fohat.digs on Fri, 07 November 2014, 16:57:15
If so what color means what?

NEVER  TRUST  WIRE  COLOR !
Title: Re: XT/AT/PS2/Terminal to USB Converter with NKRO
Post by: fanpeople on Fri, 07 November 2014, 17:13:42
G'day

I am pretty sure that I know the answer to this question already but I thought I check anyway.

So my Teensy ran out of memory, is there any way to hook in an SD card to the teensy (I am basing this off the adaptors that are available on PRJC) and use that for extra memory remembering that its running Soarer's? I have a problem where I like to input long and ridiculous key macros so as to open websites etc. but it maxed the bastard out. I still have about 8 keys begging to be used.

Any ideas help would be much appreciate.

Title: Re: XT/AT/PS2/Terminal to USB Converter with NKRO
Post by: wes1099 on Fri, 07 November 2014, 18:36:53
If so what color means what?

NEVER  TRUST  WIRE  COLOR !
Interesting. I guess that means I should get myself a functioning multimeter.
Title: Re: XT/AT/PS2/Terminal to USB Converter with NKRO
Post by: fohat.digs on Fri, 07 November 2014, 18:59:29
You can do damage if you reverse power and ground.

The daigram in the lower corner applies only to the connection of the F-122 cable to the controller.

http://i.imgur.com/NNquq.jpg[/img]](http://i.imgur.com/NNquq.jpg) (http://[img width=630 height=768)
Title: Re: XT/AT/PS2/Terminal to USB Converter with NKRO
Post by: Halvar on Sat, 08 November 2014, 09:09:39
So my Teensy ran out of memory, is there any way to hook in an SD card to the teensy (I am basing this off the adaptors that are available on PRJC) and use that for extra memory remembering that its running Soarer's?

As we don't have the source code, you would need Soarer's help to do that. It won't work with the software as it is.

However, there's a better solution: if you're using a Teensy 2.0 now, you can instead use the converter on a Teensy 2.0++ . It uses a different microcontroller (AT90USB1286) that has much more memory, (4x the EEPROM memory of the Teensy 2.0).

http://www.pjrc.com/teensy/index.html

http://deskthority.net/workshop-f7/xt-at-ps2-terminal-to-usb-converter-with-nkro-t2510-180.html#p99841



Title: Re: XT/AT/PS2/Terminal to USB Converter with NKRO
Post by: fanpeople on Sat, 08 November 2014, 15:15:40
So my Teensy ran out of memory, is there any way to hook in an SD card to the teensy (I am basing this off the adaptors that are available on PRJC) and use that for extra memory remembering that its running Soarer's?

As we don't have the source code, you would need Soarer's help to do that. It won't work with the software as it is.

However, there's a better solution: if you're using a Teensy 2.0 now, you can instead use the converter on a Teensy 2.0++ . It uses a different microcontroller (AT90USB1286) that has much more memory, (4x the EEPROM memory of the Teensy 2.0).

http://www.pjrc.com/teensy/index.html

http://deskthority.net/workshop-f7/xt-at-ps2-terminal-to-usb-converter-with-nkro-t2510-180.html#p99841

G"day

Thanks for your input. I originally looked at this as a solution and I think it will be the way to go. I guess it is really the only solution considering no source code (not that I could or would know how to edit it if I wanted to anyway).
Title: Re: XT/AT/PS2/Terminal to USB Converter with NKRO
Post by: wes1099 on Sun, 09 November 2014, 12:08:48
You can do damage if you reverse power and ground.

The daigram in the lower corner applies only to the connection of the F-122 cable to the controller.

http://i.imgur.com/NNquq.jpg[/img]](http://i.imgur.com/NNquq.jpg) (http://[img width=630 height=768)
So the image on the bottom right shows the pinout for the connector on the PCB that the cable connects to correct? Is the pinout the same for 101 key terminal boards?
Title: Re: XT/AT/PS2/Terminal to USB Converter with NKRO
Post by: wes1099 on Sun, 09 November 2014, 12:29:47
And another question; how do I make a config file to remap stuff. I know how to do the code but I don't know how to actually make the file...
Title: Re: XT/AT/PS2/Terminal to USB Converter with NKRO
Post by: fohat.digs on Sun, 09 November 2014, 12:47:56
So the image on the bottom right shows the pinout for the connector on the PCB that the cable connects to correct? Is the pinout the same for 101 key terminal boards?

Yes, all the diagrams refer to the sockets on the computer side, the plugs on the ends of the cable will be mirror images. The 2 diagrams at the bottom apply to the 122-key terminal F. I don't know about anything else and would bet money that they are NOT the same.

I think that you will find an easy simple method by wcass in post #560 of this thread on how to remap the Teensy. Also Soarer's response in # 571.

The scan codes are in the documents of Soarer's original post.
Title: Re: XT/AT/PS2/Terminal to USB Converter with NKRO
Post by: wes1099 on Sun, 09 November 2014, 19:11:23
I ordered a mutimeter to figure out the pinout for my model M conversion. I will try and post a chart showing the pinout for the connector on the PCB for anyone who may need it in the future.
Title: Re: XT/AT/PS2/Terminal to USB Converter with NKRO
Post by: wes1099 on Mon, 10 November 2014, 15:46:30
If I find the HID code for a key but can't find the key's name to put in the config file, can I just put they key's HID code?
Title: Re: XT/AT/PS2/Terminal to USB Converter with NKRO
Post by: Halvar on Mon, 10 November 2014, 19:13:32
I didn't try, but I don't think that'll work.

You can just open the file docs/codes.html from the download in your browser and search (Ctrl+F) for the HID code.
Title: Re: XT/AT/PS2/Terminal to USB Converter with NKRO
Post by: wes1099 on Mon, 10 November 2014, 21:14:10
I didn't try, but I don't think that'll work.

You can just open the file docs/codes.html from the download in your browser and search (Ctrl+F) for the HID code.
Well hopefully the HID code for the key I am thinking of is in the list of key names. I have not found any records of a soarer's converter being used on the specific keyboard I bought so I don't know if it works with one specific key, but I am guessing that it will. I am just paranoid about getting my keyboard and building the converter just to have something not work right...
Title: Re: XT/AT/PS2/Terminal to USB Converter with NKRO
Post by: arakula on Tue, 11 November 2014, 12:15:44
I tried to contact Soarer per eMail, but got no response.
Is there anybody here who knows whether he's still around?

Thank you,

  Hermann
Title: Re: XT/AT/PS2/Terminal to USB Converter with NKRO
Post by: wes1099 on Thu, 13 November 2014, 17:52:05
Is there any way to test and see if my converter is working without putting the keyboard together? I had to get rid of the plastic rivets and my bolts are not here yet.
Title: Re: XT/AT/PS2/Terminal to USB Converter with NKRO
Post by: fohat.digs on Thu, 13 November 2014, 19:22:57
Is there any way to test and see if my converter is working without putting the keyboard together? I had to get rid of the plastic rivets and my bolts are not here yet.


Ha Ha Ha Ha Ha Ha
Title: Re: XT/AT/PS2/Terminal to USB Converter with NKRO
Post by: arakula on Fri, 14 November 2014, 03:42:17
Is there any way to test and see if my converter is working without putting the keyboard together? I had to get rid of the plastic rivets and my bolts are not here yet.
Apart from fohat.digs' understandable reaction...

That's a Terminal Model M, right?
Just connect everything as it should be and make sure the membranes sit correctly on top of each other.
Then you can simply press the membranes together by tapping them with your fingertips.
The elaborate buckling spring mechanism that's normally on top of it does nothing else.
Title: Re: XT/AT/PS2/Terminal to USB Converter with NKRO
Post by: wes1099 on Fri, 14 November 2014, 20:18:33
So I have put everything together and the keyboard is not working. Any suggestions?
Title: Re: XT/AT/PS2/Terminal to USB Converter with NKRO
Post by: fohat.digs on Fri, 14 November 2014, 20:28:55
So I have put everything together and the keyboard is not working. Any suggestions?

I am finished being snide with you, that was probably rude, although I may not be much help.

Perhaps I just missed it, but: What is the keyboard? What is the cable connector?

Do you feel good about the pieces being re-assembled correctly after the bolt-mod?
Title: Re: XT/AT/PS2/Terminal to USB Converter with NKRO
Post by: wes1099 on Fri, 14 November 2014, 20:37:46
So I have put everything together and the keyboard is not working. Any suggestions?

I am finished being snide with you, that was probably rude, although I may not be much help.

Perhaps I just missed it, but: What is the keyboard? What is the cable connector?

Do you feel good about the pieces being re-assembled correctly after the bolt-mod?
I am fairly sure that everything was assembled correctly after the bolt mod. Everything feels right at least. The board is  1987 Model M 1390636 and it came with a DIN 5 cable.
Title: Re: XT/AT/PS2/Terminal to USB Converter with NKRO
Post by: vivalarevolución on Sat, 15 November 2014, 07:00:46
Anybody got a photo of an internally mounted Teensy for a PS/2 Model M, not a Terminal M?  I want to mount my Teensy internally.  I'm thinking that I need to de-solder the socket, and then connect the Teensy that way by soldering some wires to the socket holes and the Teensy.  Does that sound about right?

I'm going to pose this question again and see if I get an answer.
Title: Re: XT/AT/PS2/Terminal to USB Converter with NKRO
Post by: wes1099 on Sat, 15 November 2014, 07:40:08
Anybody got a photo of an internally mounted Teensy for a PS/2 Model M, not a Terminal M?  I want to mount my Teensy internally.  I'm thinking that I need to de-solder the socket, and then connect the Teensy that way by soldering some wires to the socket holes and the Teensy.  Does that sound about right?

I'm going to pose this question again and see if I get an answer.
I would do what this guide shows - http://straypoetry.com/ibm-model-m-keyboard/#

It works on all model M's but you will have to shave some plastic off of the panel mount USB connector for everything to fit.
Title: Re: XT/AT/PS2/Terminal to USB Converter with NKRO
Post by: Halvar on Sat, 15 November 2014, 07:42:37
So I have put everything together and the keyboard is not working. Any suggestions?
Could you elaborate on "is not working"?  :rolleyes:

Start hid_listen and then plug the usb cable into your computer. What does hid_listen show? Do you hear the Windows sound saying a new usb device has been found? Any error messages? Are any LEDs lit on the keyboard / do they work if you press e.g. caps lock? Any smoke coming from the controller?
Title: Re: XT/AT/PS2/Terminal to USB Converter with NKRO
Post by: wes1099 on Sat, 15 November 2014, 09:22:20
So I have put everything together and the keyboard is not working. Any suggestions?
Could you elaborate on "is not working"?  :rolleyes:

Start hid_listen and then plug the usb cable into your computer. What does hid_listen show? Do you hear the Windows sound saying a new usb device has been found? Any error messages? Are any LEDs lit on the keyboard / do they work if you press e.g. caps lock? Any smoke coming from the controller?
hid_listen says absolutely nothing. Windows does recognize soarer's converter as a HID usb device, it even says it is a keyboard. No error messages, and my specific board is a terminal board so it has no LEDs. No smoke coming from the controller, but I am starting to think that the controller is the issue.
Title: Re: XT/AT/PS2/Terminal to USB Converter with NKRO
Post by: wes1099 on Sat, 15 November 2014, 09:41:07
This is what hid_listen says when I unplug the board - https://www.dropbox.com/s/y9pjysoylghguou/Screenshot%202014-11-15%2010.28.39.png?dl=0

When I plug it back in it just spews out random crap that is different every time.
Title: Re: XT/AT/PS2/Terminal to USB Converter with NKRO
Post by: Halvar on Sat, 15 November 2014, 11:17:23
Looks like a problem with Soarer's converter to me right now.

If no keyboard is plugged into the converter and you start hid_listen first and then plug the converter into the computer, hid_listen should show

Code: [Select]
Waiting for new device:....................
Listening:
wEE

remaining: FFFC


Keyboard ID: 0000
Code Set: 1
Mode: PC/XT

Maybe you can test that first?

Here's what Soarer's converter should say if you first start hid_listen and then plug in Soarer's converter with a Model M connected to it.

It's important that you always plug your model M into the converter first, and only then the converter into the computer. For debugging, it's important that you start hid_listen first before you plug in the converter.

Code: [Select]
Waiting for device:...........
Listening:
rAA wEE rEE wF2 rFA rAB r83

remaining: FFFC


Keyboard ID: AB83
Code Set: 2 (extended)
Mode: AT/PS2

wED rFA w00 rFA
r11 +E2 dE2

When you plug out the converter, it should say:

Code: [Select]
Device disconnected.
Title: Re: XT/AT/PS2/Terminal to USB Converter with NKRO
Post by: wes1099 on Sat, 15 November 2014, 21:27:11
oh sh**! The diagram of the connectors are showing the end on the connector on the PC, not on the cable on the board! That means I hooked the wires up to teensy backwards! Would that hurt anything?
Title: Re: XT/AT/PS2/Terminal to USB Converter with NKRO
Post by: wes1099 on Sat, 15 November 2014, 21:29:39
oh sh**! The diagram of the connectors are showing the end on the connector on the PC, not on the cable on the board! That means I hooked the wires up to teensy backwards! Would that hurt anything? I didn't swap ground and VCC so it should be ok right? I swapped VCC and clock, GND and data, clock and vcc, and and data and GND.
Title: Re: XT/AT/PS2/Terminal to USB Converter with NKRO
Post by: fohat.digs on Sat, 15 November 2014, 21:33:41
The diagram of the connectors are showing the end on the connector on the PC, not on the cable on the board!

Almost everybody makes that mistake, even though it is noted on each drawing and has been discussed countless times.

My understanding is that the only danger is switching power and ground.
Title: Re: XT/AT/PS2/Terminal to USB Converter with NKRO
Post by: Vizir on Sat, 15 November 2014, 21:47:50
yes, as long as you don't put the +5v in the wrong place (from what i've read), you should be fine.
Title: Re: XT/AT/PS2/Terminal to USB Converter with NKRO
Post by: wes1099 on Sat, 15 November 2014, 22:17:57
ok i re-soldered it and it works now but the 'o' key and they '0' key both output '0o' and sometimes 'o0'. I also have broken stabilizer clips for the spacebar which really sucks because the space bar has to be pressed right in the center to register. I am thinking of sending it into unicomp to get a few original parts replaced.
Title: Re: XT/AT/PS2/Terminal to USB Converter with NKRO
Post by: wes1099 on Sat, 15 November 2014, 22:43:35
double post
Title: Re: XT/AT/PS2/Terminal to USB Converter with NKRO
Post by: Vizir on Sat, 15 November 2014, 22:52:58
ok i re-soldered it and it works now but the 'o' key and they '0' key both output '0o' and sometimes 'o0'. I also have broken stabilizer clips for the spacebar which really sucks because the space bar has to be pressed right in the center to register. I am thinking of sending it into unicomp to get a few original parts replaced.

check if you are connecting to pin pd6 on the teensy++. that is if you are using the teensy++.

i'd recommend sending it to someone in the artisan services. i know that dorkvader (https://geekhack.org/index.php?topic=61288.0) and several others from the artisan services do these kind of mods. alternatively, you could ask phosphorglow (http://phosphorglow.net/store/products/category/reconditioning-services/). there are many others who will do what you need and more!
Title: Re: XT/AT/PS2/Terminal to USB Converter with NKRO
Post by: Jersern on Sat, 15 November 2014, 23:14:22
Can I do this mod on a regular model m with a dodgy connector? I have a spare teensy 2 and a model m with a bad controller so I was hoping this would be the model ms saving grace. If it is possible could someone explain all the details including which usb wire to where on the teensy and how to use the teensy to bypass the bad controller.
Title: Re: XT/AT/PS2/Terminal to USB Converter with NKRO
Post by: arakula on Sun, 16 November 2014, 01:20:09
Anybody got a photo of an internally mounted Teensy for a PS/2 Model M, not a Terminal M?  I want to mount my Teensy internally.  I'm thinking that I need to de-solder the socket, and then connect the Teensy that way by soldering some wires to the socket holes and the Teensy.  Does that sound about right?

I'm going to pose this question again and see if I get an answer.
I would do what this guide shows - http://straypoetry.com/ibm-model-m-keyboard/#

It works on all model M's but you will have to shave some plastic off of the panel mount USB connector for everything to fit.

It doesn't "work on all Model Ms". Only on the later ones with a fixed cable.
Earlier models use a detachable cable, with an SDL connector mounted on the controller card that sits directly behind the hole in the case.

This needs a much more extensive modification, as you can only ... IMO, an external solution sitting on the far end of the cable, either directly replacing the AT or PS/2 connector with the Teensy or by using a PS/2 female connector to plug the original cable into it, would be a far easier way to go.
Title: Re: XT/AT/PS2/Terminal to USB Converter with NKRO
Post by: Jersern on Sun, 16 November 2014, 01:35:02
Anybody got a photo of an internally mounted Teensy for a PS/2 Model M, not a Terminal M?  I want to mount my Teensy internally.  I'm thinking that I need to de-solder the socket, and then connect the Teensy that way by soldering some wires to the socket holes and the Teensy.  Does that sound about right?

I'm going to pose this question again and see if I get an answer.
I would do what this guide shows - http://straypoetry.com/ibm-model-m-keyboard/#

It works on all model M's but you will have to shave some plastic off of the panel mount USB connector for everything to fit.

It doesn't "work on all Model Ms". Only on the later ones with a fixed cable.
Earlier models use a detachable cable, with an SDL connector mounted on the controller card that sits directly behind the hole in the case.

This needs a much more extensive modification, as you can only ...
  • desolder the connector and solder in a cable instead, then put a panel mount USB connector on top of the board (tricky work)
    or
  • move the complete controller board a bit into the case, in which case you'd have to remove the plastic clips that hold it in place and find a new way of attaching it to the shell. Then you could cut up the original cable behind the SDL connector and attach the leads to the Teensy. Not easily done either.
    Then, of course, there's still this way:
  • drill two new holes in the shell, feed the Teensy's USB cable to the first. Cut up the original cable, leave it connected externally to the original controller, feed the other end through the second hole, then solder the leads to the Teensy. Ugh.
IMO, an external solution sitting on the far end of the cable, either directly replacing the AT or PS/2 connector with the Teensy or by using a PS/2 female connector to plug the original cable into it, would be a far easier way to go.

Replacing the entire control is probably the better option for me. (I am modding a PS/2 variant) Can you explain how it's done? I (as you can probably tell) have no idea on Model Ms.
Title: Re: XT/AT/PS2/Terminal to USB Converter with NKRO
Post by: arakula on Sun, 16 November 2014, 01:36:52
Can I do this mod on a regular model m with a dodgy connector? I have a spare teensy 2 and a model m with a bad controller so I was hoping this would be the model ms saving grace. If it is possible could someone explain all the details including which usb wire to where on the teensy and how to use the teensy to bypass the bad controller.
That would rather be a job for Soarer's Controller (https://geekhack.org/index.php?topic=50437.0).
Title: Re: XT/AT/PS2/Terminal to USB Converter with NKRO
Post by: Jersern on Sun, 16 November 2014, 01:39:32
Isn't that merely firmware which I would flash after repairs? How would I go about replacing the broken controller with a Teensy?
Title: Re: XT/AT/PS2/Terminal to USB Converter with NKRO
Post by: fohat.digs on Sun, 16 November 2014, 09:03:37
I also have broken stabilizer clips for the spacebar which really sucks because the space bar has to be pressed right in the center to register.

There is the mind-numbingly simple and elegant solution by wcass for using 7/16" SAE washers in lieu of tabs:

(http://i.imgur.com/8r9JLTy.jpg)
Title: Re: XT/AT/PS2/Terminal to USB Converter with NKRO
Post by: wes1099 on Sun, 16 November 2014, 09:08:04
I also have broken stabilizer clips for the spacebar which really sucks because the space bar has to be pressed right in the center to register.

There is the mind-numbingly simple and elegant solution by wcass for using 7/16" SAE washers in lieu of tabs:

Show Image
(http://i.imgur.com/8r9JLTy.jpg)

How did he secure the washers?
Title: Re: XT/AT/PS2/Terminal to USB Converter with NKRO
Post by: fohat.digs on Sun, 16 November 2014, 10:00:24

How did he secure the washers?


The hardware store down the street, I suppose. I bought some for about $0.30 each just to keep on hand.

Oh, wait, are you talking about fastening? Nothing but gravity, that is what makes the solution so elegant!
Title: Re: XT/AT/PS2/Terminal to USB Converter with NKRO
Post by: vivalarevolución on Sun, 16 November 2014, 15:38:47
Anybody got a photo of an internally mounted Teensy for a PS/2 Model M, not a Terminal M?  I want to mount my Teensy internally.  I'm thinking that I need to de-solder the socket, and then connect the Teensy that way by soldering some wires to the socket holes and the Teensy.  Does that sound about right?

I'm going to pose this question again and see if I get an answer.
I would do what this guide shows - http://straypoetry.com/ibm-model-m-keyboard/#

It works on all model M's but you will have to shave some plastic off of the panel mount USB connector for everything to

Thanks.  That guide is for a terminal M.  I'm looking for a photo on a hookup to a PS/2 Model M. 

Great blog, though, I loved the blog.
Title: Re: XT/AT/PS2/Terminal to USB Converter with NKRO
Post by: ezrahilyer on Sun, 16 November 2014, 15:50:19
Anybody got a photo of an internally mounted Teensy for a PS/2 Model M, not a Terminal M?  I want to mount my Teensy internally.  I'm thinking that I need to de-solder the socket, and then connect the Teensy that way by soldering some wires to the socket holes and the Teensy.  Does that sound about right?

I'm going to pose this question again and see if I get an answer.
I would do what this guide shows - http://straypoetry.com/ibm-model-m-keyboard/#

It works on all model M's but you will have to shave some plastic off of the panel mount USB connector for everything to

Thanks.  That guide is for a terminal M.  I'm looking for a photo on a hookup to a PS/2 Model M. 

Great blog, though, I loved the blog.

This is Ezra from straypoetry.com, I do have a picture of an internal Soarer on a ps/2 model, but you will have to give me a few to find it, I think its on my other camera. I will post is shortly for you.
Title: Re: XT/AT/PS2/Terminal to USB Converter with NKRO
Post by: vivalarevolución on Sun, 16 November 2014, 16:28:43
Anybody got a photo of an internally mounted Teensy for a PS/2 Model M, not a Terminal M?  I want to mount my Teensy internally.  I'm thinking that I need to de-solder the socket, and then connect the Teensy that way by soldering some wires to the socket holes and the Teensy.  Does that sound about right?

I'm going to pose this question again and see if I get an answer.
I would do what this guide shows - http://straypoetry.com/ibm-model-m-keyboard/#

It works on all model M's but you will have to shave some plastic off of the panel mount USB connector for everything to

Thanks.  That guide is for a terminal M.  I'm looking for a photo on a hookup to a PS/2 Model M. 

Great blog, though, I loved the blog.

This is Ezra from straypoetry.com, I do have a picture of an internal Soarer on a ps/2 model, but you will have to give me a few to find it, I think its on my other camera. I will post is shortly for you.


Great, thanks for letting me know!
Title: Re: XT/AT/PS2/Terminal to USB Converter with NKRO
Post by: ezrahilyer on Sun, 16 November 2014, 17:50:57
(http://straypoetry.com/wp-content/uploads/2014/11/IMG_0421.jpg)

Here is a pic of the one that is sitting in front of me. (I seem to have lost the other pictures, so I took a new one) you can see how I have desoldered the SDL connector, and then soldered wires to the underside of the controller board, and then attached the bulkhead connector, and then routed and attached the soarer (in this case a pro-micro, not a teensy)

This is pretty much my SOP on PS/2 Model Ms.
Title: Re: XT/AT/PS2/Terminal to USB Converter with NKRO
Post by: wes1099 on Sun, 16 November 2014, 18:59:42
Does anyone know of any software that tells you the HID code of the key you are currently pressing? I need to figure out the HID code for the SetUp/Attn key so I can ctrl+f it in soarer's list of key codes.
Title: Re: XT/AT/PS2/Terminal to USB Converter with NKRO
Post by: fohat.digs on Sun, 16 November 2014, 19:22:43
Does anyone know of any software that tells you the HID code of the key you are currently pressing?

Aqua Key Test might tell you what you need. Look in the area at the bottom.

After you flash the Teensy with Soarer's firmware, that left bank of function keys on a 122 is identified as "EXTRA_F1-EXTRA_F10" etc, even if Aqua Key Test does not return that value.
Title: Re: XT/AT/PS2/Terminal to USB Converter with NKRO
Post by: wes1099 on Sun, 16 November 2014, 19:33:04
Does anyone know of any software that tells you the HID code of the key you are currently pressing?

Aqua Key Test might tell you what you need. Look in the area at the bottom.

After you flash the Teensy with Soarer's firmware, that left bank of function keys on a 122 is identified as "EXTRA_F1-EXTRA_F10" etc, even if Aqua Key Test does not return that value.
Aqua key test only does bios key codes and windows key codes. It is not one of the left FN keys on a 122, it is the key where the ESC key is on a terminal board like this one - http://www.ebay.com/itm/IBM-English-Keyboard-for-3196-Terminal-103-Key-1390636-/370400729457

The 122 key boards have a similar key on the left hand side so I will try the key code for that.
Title: Re: XT/AT/PS2/Terminal to USB Converter with NKRO
Post by: wes1099 on Sun, 16 November 2014, 19:45:48
Nevermind, I figured it out. I just got the windows key code and ctrl+f'd it here - http://msdn.microsoft.com/en-us/library/windows/desktop/dd375731(v=vs.85).aspx

Apparently the SetUp/Attn key on 101 key terminal boards outputs the windows key code for F13
Title: Re: XT/AT/PS2/Terminal to USB Converter with NKRO
Post by: fohat.digs on Sun, 16 November 2014, 20:19:41

I just got the windows key code and ctrl+f'd it here - http://msdn.microsoft.com/en-us/library/windows/desktop/dd375731(v=vs.85).aspx


Damn! You had me going.

I thought that maybe, at long last, I could realize my dream of programming 2 of my extra keys to left and right mouse button.

Alas, VK_LBUTTON = "invalid argument"
Title: Re: XT/AT/PS2/Terminal to USB Converter with NKRO
Post by: Kirbstomp on Wed, 19 November 2014, 19:04:37
How do I remap the keys? Some of the keys are screwed up and I cant figure out how to remap the keys.
Title: Re: XT/AT/PS2/Terminal to USB Converter with NKRO
Post by: fohat.digs on Wed, 19 November 2014, 19:13:32
Look at reply #560 and wcass gives you a very simple and clean method.
Title: Re: XT/AT/PS2/Terminal to USB Converter with NKRO
Post by: masihvahida on Wed, 19 November 2014, 19:45:49
dear sirs
i am new in the united states
can you tell me where is the place that has shops for electronic components such as avr micro controlers , resistore , capacitors , ...?
i need your help thankyou
Title: Re: XT/AT/PS2/Terminal to USB Converter with NKRO
Post by: MGH on Wed, 19 November 2014, 19:58:21
dear sirs
i am new in the united states
can you tell me where is the place that has shops for electronic components such as avr micro controlers , resistore , capacitors , ...?
i need your help thankyou
I think http://www.mouser.com/ sells electronics.
Title: Re: XT/AT/PS2/Terminal to USB Converter with NKRO
Post by: wes1099 on Fri, 21 November 2014, 13:20:06
Thanks for the suggestion of using washers to stabilize my model m space bar. It works perfectly now!
Title: Re: XT/AT/PS2/Terminal to USB Converter with NKRO
Post by: Jexu_IBM on Sat, 29 November 2014, 05:29:00
Hi,
I know nothing about teensy 2.0, I need to know something before you buy?
It is for soarer converter on a ibm 122.
It is reliable teensy ebay? or should I go pjrc ?

thank you very much, take the opportunity to thank all the great work of the libraries. A magnificent work.
Title: Re: XT/AT/PS2/Terminal to USB Converter with NKRO
Post by: fohat.digs on Sat, 29 November 2014, 08:04:19
Hi,
I know nothing about teensy 2.0, I need to know something before you buy?
It is for soarer converter on a ibm 122.
It is reliable teensy ebay? or should I go pjrc ?

thank you very much, take the opportunity to thank all the great work of the libraries. A magnificent work.

PJRC is great and ships very fast. They also have backup and support.

You can get similar devices for a few dollars cheaper from their associated sellers.

The Teensy 2.0 is entirely adequate, and you should decide whether you want it "without pins" to wire direct or "with pins" for mounting on a breadboard.
Title: Re: XT/AT/PS2/Terminal to USB Converter with NKRO
Post by: Jexu_IBM on Sat, 29 November 2014, 09:21:20
Thank you very much for responding.
As pjrc not accept paypal, I will order a piece in a partner. Right now! ^^

On ebay there are slight variations of the model 2.0 so I had doubts. And the travel would be horrible and eternal.

I really want to get to typing with the tank XD
Thanks.
Title: Re: XT/AT/PS2/Terminal to USB Converter with NKRO
Post by: arakula on Sat, 29 November 2014, 11:37:22
Pro Micro clones work just as well; if you got the time to wait for them to arrive from China, you can get like 4 for the price of 1 Teensy.

Or from me - at the moment, I have 2 spare ones, ready for use (loaded with Grendel's BootHID boot loader and Soarer Converter - see my contributions here, on page 2 of the thread (http://deskthority.net/workshop-f7/how-to-use-a-pro-micro-as-a-cheap-controller-converter-like-soarer-s-t8448.html)). Works nicely on the Model M 122 (another 2 are already at work inside these machines 8) ).
Title: Re: XT/AT/PS2/Terminal to USB Converter with NKRO
Post by: Halvar on Sat, 29 November 2014, 14:02:04
If it's called Teensy, it should be the PIRJ product and it should be the same no matter where you buy it. It's definitely possible to get them in Europe, you should not have to wait and pay extra taxes for an import from the US.

The cheap open hardware clone Pro Micro works, too, but programming is a little bit harder, and I did hear of people who had quality problems when buying these from some Chinese manufacturers.


EDIT: inserted missing "not"
Title: Re: XT/AT/PS2/Terminal to USB Converter with NKRO
Post by: Jexu_IBM on Sun, 30 November 2014, 01:17:03
Thanks for responding Arakula and thanks also to Halvar

Arakula
First I appreciate your offer, but I already placed the order. : (
I have here a Chinese micro arduino, I put it in debugger mode and I can see the keys pulse in the serial monitor. The problem is I have no experience with HID descriptors and bootloaders. I have to read more.

Halvar
I bought it in snootlab (French), I hope I have since bought the "expensive" just is upload the data and "plug and play".
One question, I understand that teensy uses a privative bootloader, if this is cleared you can download and put back in place?I do not find clear answers to this.

At each step new questions and solutions appear. Thanks
Sorry for translation
Title: Re: XT/AT/PS2/Terminal to USB Converter with NKRO
Post by: arakula on Sun, 30 November 2014, 03:37:06
I bought it in snootlab (French), I hope I have since bought the "expensive" just is upload the data and "plug and play".
It should be, yes. Both quality assurance and ease-of-use are a big plus for the Teensy.
My first M-122 mod (http://imgur.com/a/RRwBH) was done with a Teensy, too.

One question, I understand that teensy uses a privative bootloader, if this is cleared you can download and put back in place?I do not find clear answers to this.
Let's see if I can put that in a concise manner...

The Halfkay boot loader is one of the Teensy range's big selling points. It is very small (in fact, creating a smaller boot loader is not even feasible on an ATmega32U4), so it leaves as much space as possible for the application. It comes with a nice, friendly set of counterpart UI programs for Windows, Mac OS, and Linux, which makes it VERY easy to use.

It is NOT open source, however.
Quite to the contrary, in fact - it's actively protected intellectual property of PJRC. When they put it onto the microcontroller, they also set a fuse that prevents you from reading it. The only way to get access to the space used by the boot loader (except for executing it, of course) is to completely erase the chip, then you can install a new boot loader ...
but then the original Teensy boot loader is gone. You can't download it from PJRC, you can never get it onto this chip again. You'd have to use another boot loader instead. The best alternative I could find is Grendel's BootHID, which takes up 1K.

At each step new questions and solutions appear.
That's perfectly normal and, at least from my personal point of view, THIS is precisely what has kept my job as a programmer both interesting and fascinating for more than 3 decades now. You never stop learning something new every day.
Title: Re: XT/AT/PS2/Terminal to USB Converter with NKRO
Post by: Jexu_IBM on Sun, 30 November 2014, 14:52:59
Thank you very much Arakula.

I have seen your photos of the M-122 mod and it is what I want to do.
The bootloader has now been a little more clear thanks very good explanation.

Now I have to wait about 10 days until you receive the teensy.
Regards
Title: Re: XT/AT/PS2/Terminal to USB Converter with NKRO
Post by: CaptCarrot on Sun, 07 December 2014, 15:39:38
I am embarking on a little project using an old Archimedes keyboard.

This uses a PS/2 style connector, but not PS/2 protocol...

In this case the pin-outs are as follows:


Apparently (this is UNCONFIRMED) - "The Archimedes keyboard interface appears to be 31.25 kBaud serial"

I was planning on making a plug up and hooking this thing up to the GPIO on my Raspberry Pi (with suitable voltage dividers to deal with the 5v/3.3v issue) or by connecting it to a DB9 and seeing what luck I get through RS232.

Then, thanks to this post and work done by Dave at Tynemouth Software, I thought I might also try the Teensy/ProMicro route.  (I have a ProMicro on order for another project anyway)

Can anyone suggest what would be the best way to read the key-presses either through the ProMicro or through RS232?

Also, the keyboard has a socket for a Quadrature Mouse (9 pin mini din), the signals from which are passed through the keyboard 6 pin mini din.  As the ProMicro HID is recognised as KeyBoard and Mouse I am hoping I can use whatever method you recommend above to map the mouse too.
Title: Re: XT/AT/PS2/Terminal to USB Converter with NKRO
Post by: zambasdvd on Sun, 14 December 2014, 18:33:29
Hi to everyone,
I need some help with a custom dell at101w.
I removed the pcb and handwired my matrix and built the fw. Keyboard works fine but i need to ask 2 questions, if someone knows an answer please help me.
1. how to implement a backlight led to every switch? I know alps dont have space for leds but i will customize my backplate. Will i need a second teensy? what about power requirements? Will it handle all the leds? I dont need something fancy just a button to switch off or on all the leds at once.
2. I want to make an fn layer but i didnt quite understand how. Can someone write the code to my matrix? Say i want the ralt to be fn1 and up down to be volume up and down.
Thanks again
ps: sorry if this not the correct thread to ask this
Title: Re: XT/AT/PS2/Terminal to USB Converter with NKRO
Post by: rossviper on Sun, 04 January 2015, 06:18:14
Hi guys,

I could do with a bit of hand holding. I have a 122 key terminal, with a jr45, this one in fact:
http://www.ebay.co.uk/itm/390990832981?_trksid=p2060778.m2749.l2649&ssPageName=STRK%3AMEBIDX%3AIT

I have downloaded all the files etc, and flicked through the documents, and read around a bit. Will this board work?
http://www.ebay.co.uk/itm/400514883558?_trksid=p2060778.m1438.l2649&ssPageName=STRK%3AMEBIDX%3AIT

Also will the only software i need be scaswr.bat ? I play to flash and use the board on windows?

Also, and sorry for another question, I'm having problems get hold of a suitable driver for taking out the bolts (5.5 hex holding the case together), or where i can get a suitable tool in the UK?
http://www.ebay.co.uk/itm/370980746343?_trksid=p2060778.m1438.l2649&var=640173578992&ssPageName=STRK%3AMEBIDX%3AIT

Any input welcomed.

Many thanks Ross





Title: Re: XT/AT/PS2/Terminal to USB Converter with NKRO
Post by: fohat.digs on Sun, 04 January 2015, 10:22:43
It is my understanding that the non-Teensy breakout boards are much harder to program than the Teensy, but I have never tried.

That nut driver should work properly, I prefer them. Otherwise, try to find a "long, thin-walled" 5.5mm or 7/32" socket.
Title: Re: XT/AT/PS2/Terminal to USB Converter with NKRO
Post by: JPG on Sun, 04 January 2015, 10:46:52
The pro-micro will work. I can't compare to a teensy since I only used the pro-micro and never the teensy, but while not that easy to program, it's not hard either. In fact, once you know the steps, it's like 5 minutes.
Title: Re: XT/AT/PS2/Terminal to USB Converter with NKRO
Post by: arakula on Sun, 04 January 2015, 15:05:38
I have a 122 key terminal, with a jr45, this one in fact:
http://www.ebay.co.uk/itm/390990832981?_trksid=p2060778.m2749.l2649&ssPageName=STRK%3AMEBIDX%3AIT
Ouch. I hope that F16 key (F16, BTW, not F17; they didn't even get THAT right) isn't totally ruined. Looks really bad on the picture.

I have downloaded all the files etc, and flicked through the documents, and read around a bit. Will this board work?
http://www.ebay.co.uk/itm/400514883558?_trksid=p2060778.m1438.l2649&ssPageName=STRK%3AMEBIDX%3AIT

Yes it should work with a Model M-122 terminal keyboard, except for the little fact that Soarer's original firmware doesn't handle the Pro Micro's on-board LEDs correctly. See my posts here (http://deskthority.net/post187874.html#p187874) and here (http://deskthority.net/post189117.html#p189117) (the second one being more relevant here) for a patched version for the Pro Micro (plus my little writeup a bit below these posts on how I got them up to a decent, easily programmable state, if you're interested in technical details).
Title: Re: XT/AT/PS2/Terminal to USB Converter with NKRO
Post by: rossviper on Tue, 06 January 2015, 01:42:43
Thanks guys. Does anyone know of a good source of teensy boards, I cant seem to find one. I might go with that if I can find one, if the pro mirco is a bit harder.

Yeah the keyboard is not in great Nic, but it was only a five so can't ask for 2 much!

Thanks chaps

Ross
Title: Re: XT/AT/PS2/Terminal to USB Converter with NKRO
Post by: Halvar on Tue, 06 January 2015, 07:07:47
I don't know a source in the UK. I got mine from Germany, and they ship to UK:

http://www.watterott.com/de/Teensy-v20-ATMEGA32U4
Title: Re: XT/AT/PS2/Terminal to USB Converter with NKRO
Post by: mrfluffy on Tue, 06 January 2015, 08:23:43
Hiya Ross,

I too am the recipient of one of the 122 key terminal Model Ms off Ebay. Unfortunately, I couldn't get the keyboard to respond to my teensy at all, so have come to the conclusion that the control board is probably buggered. I've got the teensy working with the standard Model M that is my daily keyboard, so I think I'm going to strip it for parts. If you need any bits for that buggered F16 button, let me know and you can have them with pleasure.

If you could photo your controller board to show the jumpers on the edge of the control board, I'd be interested to see what your settings are.

Cheers

Tim
Title: Re: XT/AT/PS2/Terminal to USB Converter with NKRO
Post by: ezrahilyer on Tue, 06 January 2015, 09:07:26
Hiya Ross,

I too am the recipient of one of the 122 key terminal Model Ms off Ebay. Unfortunately, I couldn't get the keyboard to respond to my teensy at all, so have come to the conclusion that the control board is probably buggered. I've got the teensy working with the standard Model M that is my daily keyboard, so I think I'm going to strip it for parts. If you need any bits for that buggered F16 button, let me know and you can have them with pleasure.

If you could photo your controller board to show the jumpers on the edge of the control board, I'd be interested to see what your settings are.

Cheers

Tim

If you are looking for a replacement M122 controller, I can help you out, I have a few extra good ones here.
Title: Re: XT/AT/PS2/Terminal to USB Converter with NKRO
Post by: rossviper on Tue, 06 January 2015, 09:28:59
Hiya Ross,

I too am the recipient of one of the 122 key terminal Model Ms off Ebay. Unfortunately, I couldn't get the keyboard to respond to my teensy at all, so have come to the conclusion that the control board is probably buggered. I've got the teensy working with the standard Model M that is my daily keyboard, so I think I'm going to strip it for parts. If you need any bits for that buggered F16 button, let me know and you can have them with pleasure.

If you could photo your controller board to show the jumpers on the edge of the control board, I'd be interested to see what your settings are.

Cheers

Tim

If you are looking for a replacement M122 controller, I can help you out, I have a few extra good ones here.

Thanks Tim,

I've might well take you up on that offer, if I can get the boardworking. As soon as I get a suitable driver I'll take some pictures and let you know.


Thanks
Ross




Title: Re: XT/AT/PS2/Terminal to USB Converter with NKRO
Post by: mrfluffy on Tue, 06 January 2015, 11:27:20
If you are looking for a replacement M122 controller, I can help you out, I have a few extra good ones here.

Thanks for the offer, let's see how Ross gets on with his keyboard first. I've got a feeling the jumpers on the controller are set to something arcane, which is making the board refuse to cooperate. I think the M122 is going to be a long term project, and needs a bolt mod doing as a bare minimum.

Tim
Title: Re: XT/AT/PS2/Terminal to USB Converter with NKRO
Post by: rossviper on Tue, 06 January 2015, 15:09:19
I have a 122 key terminal, with a jr45, this one in fact:
http://www.ebay.co.uk/itm/390990832981?_trksid=p2060778.m2749.l2649&ssPageName=STRK%3AMEBIDX%3AIT
Ouch. I hope that F16 key (F16, BTW, not F17; they didn't even get THAT right) isn't totally ruined. Looks really bad on the picture.

I have downloaded all the files etc, and flicked through the documents, and read around a bit. Will this board work?
http://www.ebay.co.uk/itm/400514883558?_trksid=p2060778.m1438.l2649&ssPageName=STRK%3AMEBIDX%3AIT

Yes it should work with a Model M-122 terminal keyboard, except for the little fact that Soarer's original firmware doesn't handle the Pro Micro's on-board LEDs correctly. See my posts here (http://deskthority.net/post187874.html#p187874) and here (http://deskthority.net/post189117.html#p189117) (the second one being more relevant here) for a patched version for the Pro Micro (plus my little writeup a bit below these posts on how I got them up to a decent, easily programmable state, if you're interested in technical details).

Thanks for these links.

I think I'm going to give the Pro Micro a shot, it about 6GBP, v's 20 for the Teensy, given the keyboard might not work anyway, i might as well go cheap!!

Thaanks Guys, when I get all the bits and bobs I'll post back with how I got on.

Cheers
ross
Title: Re: XT/AT/PS2/Terminal to USB Converter with NKRO
Post by: arakula on Wed, 07 January 2015, 06:58:53
I've got a feeling the jumpers on the controller are set to something arcane, which is making the board refuse to cooperate. I think the M122 is going to be a long term project, and needs a bolt mod doing as a bare minimum.

AFAIK, the jumpers are only used to set the keyboard ID that's reported back to the computer.
Soarer's Converter follows this logic:
"Ask the keyboard for its ID.
If the first part of the returned ID happens to be AB (hexadecimal) and the second part is not 85 (also hex), treat it as a "normal" AT / PS/2 keyboard using extended scan code set 2.
Otherwise, if an ID came back, treat it as sending scan code set 3 (= your average terminal keyboard).
If only an ACK came back, it's AT (i.e., 84 key, scan code set 2 without extensions).
If nothing at all came back, it's PC / XT."

hid_listen.exe can be used to find out what Soarer's Converter determined.
Title: Re: XT/AT/PS2/Terminal to USB Converter with NKRO
Post by: mrfluffy on Wed, 07 January 2015, 13:28:05
Cool. I either got no ID, or garbage depending on where I put the jumpers. Voltage to the board was correct in all the right places, and triple checked the wiring, even transposing the data and clock lines to see if that helped.  Hid_listen just gave me a run of unbroken R06 codes, so after reading through Soarers excellent documentation, I came to the conclusion that the controller board was at fault.
Title: Re: XT/AT/PS2/Terminal to USB Converter with NKRO
Post by: rossviper on Wed, 07 January 2015, 15:50:38
This does not bode well for me its taken me weeks to find a nut driver!  ^-^
Title: Re: XT/AT/PS2/Terminal to USB Converter with NKRO
Post by: mrfluffy on Wed, 07 January 2015, 16:21:20
I just bought a standard one off Ebay and ground it back using a bench grinder. I think I'm probably in the minority of having a bad board (if indeed it it is faulty, operator error cannot be ruled out yet)
Title: Re: XT/AT/PS2/Terminal to USB Converter with NKRO
Post by: Melvang on Wed, 07 January 2015, 22:18:23
So I got my XT working over USB.  All I had to do was load the right firmware onto the teensy, hook up the wires, plug it in and off I went.

The problem is, I want to change some of the keys around.  How do I go about doing this?  Fair warning, I am a software newbie.
Title: Re: XT/AT/PS2/Terminal to USB Converter with NKRO
Post by: Halvar on Thu, 08 January 2015, 02:42:34
You essentially write a config file with your mappings and upload it to the teensy using Soarer's tools.

There's great documentation by Soarer in the firmware's download zip file on how to do that, as well as example config files. If you get stuck at some point, just ask here.
Title: Re: XT/AT/PS2/Terminal to USB Converter with NKRO
Post by: fohat.digs on Thu, 08 January 2015, 07:37:28
So I got my XT working over USB.  All I had to do was load the right firmware onto the teensy, hook up the wires, plug it in and off I went.

The problem is, I want to change some of the keys around.  How do I go about doing this?  Fair warning, I am a software newbie.

In Soarer's thread (oh wait, that is this thread!) post #560 by wcass gives you a clean and simple method that works great.

In the original post, the documentation includes a spreadsheet list of all the keyboard codes.
Title: Re: XT/AT/PS2/Terminal to USB Converter with NKRO
Post by: SpAmRaY on Thu, 08 January 2015, 07:40:44
So I got my XT working over USB.  All I had to do was load the right firmware onto the teensy, hook up the wires, plug it in and off I went.

The problem is, I want to change some of the keys around.  How do I go about doing this?  Fair warning, I am a software newbie.

In Soarer's thread (oh wait, that is this thread!) post #560 by wcass gives you a clean and simple method that works great.

In the original post, the documentation includes a spreadsheet list of all the keyboard codes.


Since I've found my way back to that post quite a few times here it is for those who don't want to find it. :D

I actually did this project about a month ago after I bought a 122 key model M off of ebay and it went perfectly. I honestly just have no clue how to remap it so I can make use of the extra keys. Could someone point me in the right direction?
it is actually quite easy. first, go to the DOCS folder and double-click on index.html. since you only need help re-mapping keys, go to the Config section and read the Command Reference. if you are starting with a 122 then you probably will only need to study/learn remapblock. you will also need to learn (or keep a cheat sheet handy) what the program expects you to name any keys you will be working with. you will find these in the Codes section. then open one or more of the .sc files in notepad and look at these as examples.

create your own sc file with a text editor. start with a comment line (line begins with #) that identifies what you are trying to do. add a line remapblock to start the remap block. list the keys you want to change and what you want to change each to. then close the remap block with the endblock command. save this file with a .sc extension.

Code: [Select]
# Billy's TSSK layout

remapblock
        F7     DELETE
        F8     END
        F9     PAGE_DOWN
        F10    LEFT
        F11    DOWN
        F12    RIGHT
        F13    F7
        F14    F8
        F15    F9
        F16    F10
        F17    F11
        F18    F12
        F19    INSERT
        F20    HOME
        F21    PAGE_UP
        F22    SCROLL_LOCK
        F23    UP
        F24    PAUSE
    FAKE_06    BACKSLASH
    FAKE_08    ESC
    FAKE_09    PRINTSCREEN
    FAKE_10    MEDIA_MEDIA_SELECT
    FAKE_11    MEDIA_PLAY_PAUSE
    FAKE_12    MEDIA_PREV_TRACK
    FAKE_13    MEDIA_NEXT_TRACK
    FAKE_14    MEDIA_VOLUME_DOWN
    FAKE_15    MEDIA_VOLUME_UP
    FAKE_16    APP
    FAKE_17    LGUI
endblock

open a dos prompt. navigate to your tools folder and drag&drop scas.exe to the command prompt, but don't run it yet. add a space to the end and then drag&drop your custom .sc file to the end of the command line - don't run it yet. add a space and then drag&drop the same .sc file - and then add a B to the end. now hit enter to run the command. this "compiles" your code. you will find it in the same folder as your SC file but with SCB as the file extension.

now that your custom file is compiled, you need to send that to the teensy. drag&drop scwr.exe into the command window, add a space, and then drag&drop your .SCB file to the end of the command line. hit enter to program.

test your newly remapped keys to verify that they are remapped.

Title: Re: XT/AT/PS2/Terminal to USB Converter with NKRO
Post by: rossviper on Sat, 10 January 2015, 14:38:52
Great news!!,

I am typing this from a recently converted keyboard, please see attached photo, as unquestionable proof!!!!!.

(http://i.imgur.com/mNo1chF.jpg)

As you can see I have it plugged in to a laptop in the lounge so i have not really tested it out for real, but all looks Ok in Aqua Key. Will need to do some work with the key mappings, but all in good time - is there a default for a 122 out there?

The whole thing only took me about an hour! I could not believe it!! I wasn't holding out much hope if Im honest. The pro micro, I ended up buying was a cheap clone, but was in the UK, so was about 7 quid, of the bay. I ordred in on the 8th, and it arrive to day. The nut drivers are still on the way, again from the UK. Because I don't yet have the nut drivers, i cant open it up, so no picture of the controller yet, bit I'll put them up when they come.

A few points:

I followed the excellent guide here http://hasbeardplaysgames.co.uk/2014/10/12/converting-an-ibm-model-m-terminal-keyboard/

Its worth noting that I had to plug the pro micro in to a USB 2 port, to get the driver to be installed by windows.


BTW, I assume I can use scaswr.bat even though the board is now wired up to the keyboard, right.

Tim, I will get the picture of the control as soon as the drivers come, I promise!!

Cheers guys
Ross
 







Title: Re: XT/AT/PS2/Terminal to USB Converter with NKRO
Post by: Melvang on Sat, 10 January 2015, 23:16:23
I got my XT remapped.  Thanks a ton spamray.  Here is the layout for what I change.

[attach=1]

Anything blank is still stock.  Not sure I need to work out a function layer. 

Strangely thought he hardest part about getting used to this keyboard is the fact that they F and J keys have nothing for homing on them.  No nubs, no dots, no dish, just nothing.  The biggest thing I love about this keyboard aside from the amazing feels is the fact that I unconsciously am hovering my wrists.  This is something I have not done with any other keyboard.
Title: Re: XT/AT/PS2/Terminal to USB Converter with NKRO
Post by: arakula on Sun, 11 January 2015, 00:30:19
I am typing this from a recently converted keyboard, please see attached photo, as unquestionable proof!!!!!.

Nice to see the passive rebellion against Microsoft's urge to switch to a newer OS, BTW :cool:

I followed the excellent guide here (http://hasbeardplaysgames.co.uk/2014/10/12/converting-an-ibm-model-m-terminal-keyboard/)

Nice writeup, just a bit wrong in minor details (Soarer recommended the Teensy 2.0, which is noticeably cheaper than the Teensy++ 2.0) ... and I'm one of those who cringe at the thought of ruining a perfectly working RJ45 keyboard cable when the alternative (6-pin flat cable and matching connector) is in the "nearly negligible" price category. But well, if there's no intention to ever undo the mod, it's OK, I presume.

I'm talking about the internal mod in the writeup, BTW - yours would have been possible to do with an RJ-45 socket and some short cables, but the same applies here - if there's no intention to ever undo the mod, it's OK, I presume.

Its worth noting that I had to plug the pro micro in to a USB 2 port, to get the driver to be installed by windows.

As opposed to ... what? USB 3, I presume? I've already heard that the ATmega32U4 has its problems with that, yes.

BTW, I assume I can use scaswr.bat even though the board is now wired up to the keyboard, right.

Yes, that should be the case. Once you got the firmware in place, scwr.exe (which is called inside scaswr.bat) talks directly to that. You don't even need to reboot the converter afterwards; just send a new layout and it's instantly available.
Title: Re: XT/AT/PS2/Terminal to USB Converter with NKRO
Post by: runcom on Mon, 12 January 2015, 13:41:10
Does anybody know where to get a mini-usb mount panel for an SSK? I'd love to put the teensy inside my SSK but i want it to looks nice :D
Title: Re: XT/AT/PS2/Terminal to USB Converter with NKRO
Post by: ezrahilyer on Mon, 12 January 2015, 14:08:29
Does anybody know where to get a mini-usb mount panel for an SSK? I'd love to put the teensy inside my SSK but i want it to looks nice :D

I have been using these: https://www.adafruit.com/products/936 (https://www.adafruit.com/products/936)

They make the rear of the board look almost factory. You use a USB/B cable (a printer cable) to connect to the computer.

I have a guide that shows how you do it with a terminal board: http://straypoetry.com/ibm-model-m-keyboard/ (http://straypoetry.com/ibm-model-m-keyboard/) the process is similar with a non-terminal except you have to de-solder the old connector and solder the wires directly to the bottom of the existing controller.
(http://straypoetry.com/wp-content/uploads/2014/11/IMG_0421.jpg)


Title: Re: XT/AT/PS2/Terminal to USB Converter with NKRO
Post by: runcom on Mon, 12 January 2015, 16:21:29
Does anybody know where to get a mini-usb mount panel for an SSK? I'd love to put the teensy inside my SSK but i want it to looks nice :D

I have been using these: https://www.adafruit.com/products/936 (https://www.adafruit.com/products/936)

They make the rear of the board look almost factory. You use a USB/B cable (a printer cable) to connect to the computer.

I have a guide that shows how you do it with a terminal board: http://straypoetry.com/ibm-model-m-keyboard/ (http://straypoetry.com/ibm-model-m-keyboard/) the process is similar with a non-terminal except you have to de-solder the old connector and solder the wires directly to the bottom of the existing controller.
Show Image
(http://straypoetry.com/wp-content/uploads/2014/11/IMG_0421.jpg)


Interesting :) but I was looking for a mini-usb one as in this photos:

(http://www.dubhead.at/media/pics/_DSC8402.jpg)
Title: Re: XT/AT/PS2/Terminal to USB Converter with NKRO
Post by: ezrahilyer on Mon, 12 January 2015, 16:24:57
Does anybody know where to get a mini-usb mount panel for an SSK? I'd love to put the teensy inside my SSK but i want it to looks nice :D

I have been using these: https://www.adafruit.com/products/936 (https://www.adafruit.com/products/936)

They make the rear of the board look almost factory. You use a USB/B cable (a printer cable) to connect to the computer.

I have a guide that shows how you do it with a terminal board: http://straypoetry.com/ibm-model-m-keyboard/ (http://straypoetry.com/ibm-model-m-keyboard/) the process is similar with a non-terminal except you have to de-solder the old connector and solder the wires directly to the bottom of the existing controller.
Show Image
(http://straypoetry.com/wp-content/uploads/2014/11/IMG_0421.jpg)


Interesting :) but I was looking for a mini-usb one as in this photos:

Show Image
(http://www.dubhead.at/media/pics/_DSC8402.jpg)

If you do find a source for the mini usb I would be interested.
Title: Re: XT/AT/PS2/Terminal to USB Converter with NKRO
Post by: runcom on Mon, 12 January 2015, 16:44:00
Does anybody know where to get a mini-usb mount panel for an SSK? I'd love to put the teensy inside my SSK but i want it to looks nice :D

I have been using these: https://www.adafruit.com/products/936 (https://www.adafruit.com/products/936)

They make the rear of the board look almost factory. You use a USB/B cable (a printer cable) to connect to the computer.

I have a guide that shows how you do it with a terminal board: http://straypoetry.com/ibm-model-m-keyboard/ (http://straypoetry.com/ibm-model-m-keyboard/) the process is similar with a non-terminal except you have to de-solder the old connector and solder the wires directly to the bottom of the existing controller.
Show Image
(http://straypoetry.com/wp-content/uploads/2014/11/IMG_0421.jpg)


Interesting :) but I was looking for a mini-usb one as in this photos:

Show Image
(http://www.dubhead.at/media/pics/_DSC8402.jpg)

If you do find a source for the mini usb I would be interested.

I'm not really sure that's a mini-usb btw...because the black piece is far more out than where should be, there are 2cm about at the end of the keyboard so that could easly be a USB-B as the one you linked, dunno
Title: Re: XT/AT/PS2/Terminal to USB Converter with NKRO
Post by: kishy on Fri, 16 January 2015, 09:36:39
Not really an issue with Soarer's part of this, but an interesting observation...my very first original Teensy++ 2.0 from back in the day appears to have quit on me this past weekend. It just repeatedly connects/disconnects itself from the host computer, sometimes showing up under the device name Soarer gave it, sometimes as a generic HID, sometimes as an unknown device. Does not stay connected for long, can get one keystroke in sometimes before it "unplugs" again, and more recently it just isn't detected at all.

Said Teensy was actually second hand, I'm fairly sure I got it from another member before Soarer even made his project known. I do have to wonder how it failed...

Finally got around to troubleshooting this. Works again after a simple reflash.
Title: Re: XT/AT/PS2/Terminal to USB Converter with NKRO
Post by: Melvang on Fri, 16 January 2015, 09:50:28
So if I want to change the keymap on my XT that I have already tweaked, do I use the default map to work from or do I need to use the already changed stuff?  Or would the easiest way be just to reflash with the default firmware and work back from that?

Title: Re: XT/AT/PS2/Terminal to USB Converter with NKRO
Post by: rossviper on Fri, 16 January 2015, 13:35:19
Tim
@mrfluffy

Here is a picture of the jumpers, hope it helps:
(http://i.imgur.com/swVPRfN.jpg)

Let me know if there is anything else you need?

Thanks
Ross

There are some more pictures here http://imgur.com/ygtOTNA,c7cfqi9,C0AB2z9,7SGWtTh,DYflj2K,R1OFUPg,Y0iojyz,NU1PBuA,jqn23vi,4gUDPB9#0
Title: Re: XT/AT/PS2/Terminal to USB Converter with NKRO
Post by: rossviper on Fri, 16 January 2015, 13:43:07
BTW, whats the script with the earth(?) cable that run on to the space bar... is it an imporant part of the over all set up - its got a copper clip, but that just clips on to a plastic bit in the space bar?

Already bought the next broad to convert! What fun! :))

THANKS SOARER!!!
Title: Re: XT/AT/PS2/Terminal to USB Converter with NKRO
Post by: Westwall on Fri, 16 January 2015, 17:45:45
Hello. I'm brand new to the forums, I come seeking some assistance and would greatly appreciate any I recieve.

So, for the sake of context, I live in Argentina. I've also been longing for a mechanical keyboard for a very long time now.

So, on the Argentine version of Ebay, I found a (legit) company selling a terminal IBM Model M (Part No. 1390250, IBM Spanish 122 key). Price, 10USD. Price of all the other Model M's on the market... absolutely ridiculous. Anything with a cherry switch is as expensive as the Model M's. Of course, it's a terminal version. Apart from using a scan code that modern PCs don't understand so to say (as far as I was able to understand the matter), the keyboard uses a detachable SDL cable for the connection... and the board does not come with the appropriate cable. SDL cables are just outright not sold here, and import is out of the question due to the current (very draconic) legislation.

So, I've been trying to come up with a solution. Fashioning my own SDL cable obviously won't work, but I'm questioning the possibility of soldering off the SDL port itself, testing continuity (I don't have a multimeter, so if one of you happened to know where each contact in the port goes where on the board, I'd be very happy. I'm sure I could improvise with a spare LED, a battery and some wire once I've got the port out, though), and soldering the cut-up end of a USB/PS2/whatever-as-ong-as-five-wires cable directly onto the board. I'd add some sort of strain relief along the way. The USB cable would, of course, go to an atmega converter. Obviously, I'd like to know if this would even be a viable option. I have never soldered before, but I know how to do it properly in theory. Five contacts on the board and another five on the converter, shouldn't be hard at all.

Teensies are used for PS3 custom firmware downgrades (console piracy is big here), so the price for them has been artificially inflated to well over 100USD. I can get an Arduino Pro Micro for much, much less. It's based on the Atmega 32U4, so in theory this should work as well and in the exact same fashion (save for different pin-outs) as the Teensy. I just want to have that confirmed, also.

Lastly, I play games on my computer, and I know that the Model M is 2KRO. The overwhelming response on most places I've checked is that it's fine for almost all cases. I don't do anything particularly demanding, just some Battlefield, Osu!, and whatnot. I don't think I'll hit any sort of limitation, but if any of you have a say on this, I'd love to hear your opinion.
Title: Re: XT/AT/PS2/Terminal to USB Converter with NKRO
Post by: mrfluffy on Sun, 18 January 2015, 00:18:19
Tim
@mrfluffy

Here is a picture of the jumpers, hope it helps:
Show Image
(http://i.imgur.com/swVPRfN.jpg)


Let me know if there is anything else you need?

Thanks
Ross

There are some more pictures here http://imgur.com/ygtOTNA,c7cfqi9,C0AB2z9,7SGWtTh,DYflj2K,R1OFUPg,Y0iojyz,NU1PBuA,jqn23vi,4gUDPB9#0

Sweet! Changed my jumpers to match yours, but still no response from the board. Definitely looks like a dud. Ross,if you want any keys or caps to complete your keyboard, let me know, and you can have them with pleasure. This keyboard is going into the project pile.
Title: Re: XT/AT/PS2/Terminal to USB Converter with NKRO
Post by: Parak on Sun, 18 January 2015, 00:39:48
So, I've been trying to come up with a solution. Fashioning my own SDL cable obviously won't work, but I'm questioning the possibility of soldering off the SDL port itself, testing continuity (I don't have a multimeter, so if one of you happened to know where each contact in the port goes where on the board, I'd be very happy. I'm sure I could improvise with a spare LED, a battery and some wire once I've got the port out, though), and soldering the cut-up end of a USB/PS2/whatever-as-ong-as-five-wires cable directly onto the board. I'd add some sort of strain relief along the way. The USB cable would, of course, go to an atmega converter. Obviously, I'd like to know if this would even be a viable option. I have never soldered before, but I know how to do it properly in theory. Five contacts on the board and another five on the converter, shouldn't be hard at all.

Odd. 122s with SDL ports that I know of are terminal emulators, which means that they do PS/2. Also, 1390250 should have been a 102 key.. well, if it is a terminal emulator, the pinout should be standard like here (http://www.kbdbabel.org/conn/kbd_connector_ibm_m.png). You'd probably have to map the internal pins to the pcb, desolder the connector, then solder on some wires, hot glue/zip tie, etc.

Teensies are used for PS3 custom firmware downgrades (console piracy is big here), so the price for them has been artificially inflated to well over 100USD. I can get an Arduino Pro Micro for much, much less. It's based on the Atmega 32U4, so in theory this should work as well and in the exact same fashion (save for different pin-outs) as the Teensy. I just want to have that confirmed, also.

Correct, you can use this guide here (http://deskthority.net/workshop-f7/how-to-use-a-pro-micro-as-a-cheap-controller-converter-like-soarer-s-t8448.html).
Title: Re: XT/AT/PS2/Terminal to USB Converter with NKRO
Post by: rossviper on Sun, 18 January 2015, 03:26:20
Tim
@mrfluffy

Here is a picture of the jumpers, hope it helps:
Show Image
(http://i.imgur.com/swVPRfN.jpg)


Let me know if there is anything else you need?

Thanks
Ross

There are some more pictures here http://imgur.com/ygtOTNA,c7cfqi9,C0AB2z9,7SGWtTh,DYflj2K,R1OFUPg,Y0iojyz,NU1PBuA,jqn23vi,4gUDPB9#0

Sweet! Changed my jumpers to match yours, but still no response from the board. Definitely looks like a dud. Ross,if you want any keys or caps to complete your keyboard, let me know, and you can have them with pleasure. This keyboard is going into the project pile.

Thanks Tim, that would be great, I actually need 3 caps, the F17, with the cap and the key/under cap, then 2 more caps... the interesting things is I'm not sure what the other missing keys are!!!! I'll try and pull up a reference image, and see if i can work out what ones are missing!!! I'll pm you and we can sort something out.

Thanks very much Tim, sorry your boards not working.

Title: Re: XT/AT/PS2/Terminal to USB Converter with NKRO
Post by: MGH on Sun, 18 January 2015, 21:10:02
Does anybody have a link to the project box that someone made that has plugs to convert every type of keyboard?
Title: Re: XT/AT/PS2/Terminal to USB Converter with NKRO
Post by: fohat.digs on Mon, 19 January 2015, 10:37:15
Does anybody have a link to the project box that someone made that has plugs to convert every type of keyboard?

I did this guide a while back:

https://geekhack.org/index.php?topic=58941.msg1348717#msg1348717

There are many project boxes that you can order on ebay. I have had problems with cracking because they are generally pretty flimsy and do not take kindly to being riddled with large holes.
Title: Re: XT/AT/PS2/Terminal to USB Converter with NKRO
Post by: cohomology on Thu, 22 January 2015, 18:37:19
Hi, I am new to this forum and thank you all for the great info. I recently pulled the trigger and picked up a 122 key with the RJ45 connector. I cleaned the thing and now am ready to adapt it to my computer. So I unplugged the RJ45 cable(well, have to take the board apart to do it, I mean, mine is probably the "permanent cable version", even though there is a connector inside the case) and disclosed 5 pins on the board that look like the following:

2 3 4
1    5

I am wondering which pin is which and hope someone can help me out! TIA!
Title: Re: XT/AT/PS2/Terminal to USB Converter with NKRO
Post by: fohat.digs on Thu, 22 January 2015, 18:45:19
Hi, I am new to this forum and thank you all for the great info. I recently pulled the trigger and picked up a 122 key with the RJ45 connector. I cleaned the thing and now am ready to adapt it to my computer. So I unplugged the RJ45 cable(well, have to take the board apart to do it, I mean, mine is probably the "permanent cable version", even though there is a connector inside the case) and disclosed 5 pins on the board that look like the following:

2 3 4
1    5

I am wondering which pin is which and hope someone can help me out! TIA!

The original post includes a diagram for the F-122, but I would not 100% guarantee that the M-122 is the same.

(http://i.imgur.com/NNquq.jpg)
Title: Re: XT/AT/PS2/Terminal to USB Converter with NKRO
Post by: cohomology on Thu, 22 January 2015, 21:22:28

I am assuming that I would need to follow the right bottom diagram right?

Hi, I am new to this forum and thank you all for the great info. I recently pulled the trigger and picked up a 122 key with the RJ45 connector. I cleaned the thing and now am ready to adapt it to my computer. So I unplugged the RJ45 cable(well, have to take the board apart to do it, I mean, mine is probably the "permanent cable version", even though there is a connector inside the case) and disclosed 5 pins on the board that look like the following:

2 3 4
1    5

I am wondering which pin is which and hope someone can help me out! TIA!

The original post includes a diagram for the F-122, but I would not 100% guarantee that the M-122 is the same.

Show Image
(http://i.imgur.com/NNquq.jpg)

Title: Re: XT/AT/PS2/Terminal to USB Converter with NKRO
Post by: arakula on Thu, 22 January 2015, 23:30:21
I am assuming that I would need to follow the right bottom diagram right?
Right. And yes, it's the same for M-122 (at least in the 3 of them that I have here).
Title: Re: XT/AT/PS2/Terminal to USB Converter with NKRO
Post by: fohat.digs on Fri, 23 January 2015, 07:08:09

Right. And yes, it's the same for M-122 (at least in the 3 of them that I have here).


Both bottom diagrams are the same.

It is good to know that the F-122 and M-122 use interchangeable cables, in case replacements are needed.
Title: Re: XT/AT/PS2/Terminal to USB Converter with NKRO
Post by: cohomology on Fri, 23 January 2015, 08:44:48
Oh, did not realize the two bottom diagrams are the same!

I can confirm that the wiring in the bottom two diagrams works with my 122 key M keyboard!
Title: Re: XT/AT/PS2/Terminal to USB Converter with NKRO
Post by: fohat.digs on Fri, 23 January 2015, 10:05:06

Oh, did not realize the two bottom diagrams are the same!


Mountains of heartache have resulted from people not thinking through which piece is the plug and which piece is the socket.
Title: Re: XT/AT/PS2/Terminal to USB Converter with NKRO
Post by: arakula on Fri, 23 January 2015, 14:36:55

Right. And yes, it's the same for M-122 (at least in the 3 of them that I have here).


Both bottom diagrams are the same.
My "Right." was an answer to the right "right?" part of the question, not the "right bottom diagram" left to it.
SCNR  ;D
Reminds me of my children's Jiu Jitsu trainers who always said: "... the other right!" when a move went wrong...
Title: Re: XT/AT/PS2/Terminal to USB Converter with NKRO
Post by: Westwall on Fri, 23 January 2015, 18:50:55
Hello again. I made a post towards the end of the last page, about a terminal keyboard I could get my hands on. After some shopping, I've got some news. In the end, it's not a terminal. It's a 102-key SDL-conenctor board! The part number is 1391506. "Hecho por IBM en Mexico", I know, they're a bit inferior to the rest, but I got this thing for 10USD. Best of all, while it didn't come with the box, this thing is NEW, I mean absolutely positively SPOTLESS and looking like it just came out of the factory. It even came with the perfectly-fitting Styrofoam (missing a few good pieces here and there), and a resealed transparent plastic bag with a serial number on it (which I tore to shreds in my excitement while trying to get the board out). I thought I'd be getting a grime-covered 122-key monster by the pictures the seller had up on the Internet, but apparently they were illustrative; this is much, much better, better than I dreamed of!

I also bought a non-working PS/2 rubber-dome for literally pennies while I was at it, and I've already gotten the PS/2 cable out of that thing (for the most part, more on that later). Now,I would actually prefer PS/2 to be honest (so no need for Soarer's), but again, I don't have an SDL cable and can't get one. I can borrow a soldering iron, so I was thinking of simply taking out the SDL port and hard-wiring a cable to it. PS/2 cables don't have standardized colors as far as I know, though, and that's a problem because I have no multimeter to check continuity, and know of nobody who could lend me one. The PS/2 cable I ripped out is still attached to a small PCB, which has four marking where the four wires connect; VC, VS, CL, DA. I'm dead sure CL and DA are clock and data respectively, but I'm not 100% sure of VC and VS. I'm have a strong hunch VC is for VCC (5V in), and VS would then be ground. Is my hunch strong enough to just identify the wires with those markings, or am I going to fry my computer and board? I've already got the layout for how the SDL connects to the PCB, so all that would be left is to have those cables identified and to start soldering!
Title: Re: XT/AT/PS2/Terminal to USB Converter with NKRO
Post by: fohat.digs on Fri, 23 January 2015, 18:58:30
The part number is 1391506. "Hecho por IBM en Mexico"

I don't know that the Mexican models are inferior.

Before you start "doing damage" you need to ascertain whether this is a PS/2 model or a terminal.

If it is native PS/2, then you may have it pretty easy. If you have an SDL socket, I would leave it in place.

If it is a terminal, you are going to need a Teensy anyway.
Title: Re: XT/AT/PS2/Terminal to USB Converter with NKRO
Post by: mougrim on Sun, 25 January 2015, 06:25:36
Hmm... I have one question for the elders of this forum.

Can I use Arduino Pro Micro or Leonardo for this converter? It's just I'd rather use 6 or 10 bucks controller instead of 20 :)
Title: Re: XT/AT/PS2/Terminal to USB Converter with NKRO
Post by: arakula on Sun, 25 January 2015, 08:15:22
Yes.
Title: Re: XT/AT/PS2/Terminal to USB Converter with NKRO
Post by: Westwall on Sun, 25 January 2015, 18:21:35
The part number is 1391506. "Hecho por IBM en Mexico"
Before you start "doing damage" you need to ascertain whether this is a PS/2 model or a terminal.

According to Wikipedia, IBM part no. 1391506 does PS/2 (https://i.imgur.com/xlSNhWw.png). This is a 102-key SDL board, I'm sure it's not terminal.

The part number is 1391506. "Hecho por IBM en Mexico"
If you have an SDL socket, I would leave it in place.

Ah, but then what about my dilemma of not being able to acquire any SDL-PS/2 cables in this country? Like I said previously, importing is impossible. What other means do I have of getting a PS/2 cable onto the PCB, without desoldering the port?

I guess I could solder a cable onto the port's underside (would that be viable?), but how do I get the cable out of the chassis? There's a nook on each side of the flip-up feet, but it'd be a veeeery tight fit, I don't know if I'd be able to squeeze a cable in there, and the feet would always have to be in upright position (but that's not really a problem, I prefer aggressive profiles).
Title: Re: XT/AT/PS2/Terminal to USB Converter with NKRO
Post by: fohat.digs on Sun, 25 January 2015, 19:15:29
Like I said previously, importing is impossible.

How unfortunate.

I don't understand, but in the US, for all of our other backwards and ridiculous problems, customs are not one.

If you could get one of orihalcon's cables (while pricey) you would have the most clean and elegant solution.
Title: Re: XT/AT/PS2/Terminal to USB Converter with NKRO
Post by: cohomology on Sun, 25 January 2015, 19:55:52
Since the other thread does not seem to get much traffic, let me ask this question here again. Hope this is fine. I picked up an IBM Model F 5291 Terminal (bigfoot) Keyboard and am trying to adapt it. There are a couple pins I don't seem to be able to find on the teensy: Frame GND, Output, Strobe. Can someone tell me which pins these are? TIA!
Title: Re: XT/AT/PS2/Terminal to USB Converter with NKRO
Post by: Melvang on Sun, 25 January 2015, 21:06:27
Since the other thread does not seem to get much traffic, let me ask this question here again. Hope this is fine. I picked up an IBM Model F 5291 Terminal (bigfoot) Keyboard and am trying to adapt it. There are a couple pins I don't seem to be able to find on the teensy: Frame GND, Output, Strobe. Can someone tell me which pins these are? TIA!

I was going to post in that thread but had other family stuff going on.  Those pins are not the teensy, that is the pinout for the keyboard plug.  Adapting a 5291 is a touch more involved.  Let me report back.

Edit:  I had this same discussion with xwhatsit.  Turns out my keyboard is neither a standard XT, for a 5291, though it is in a bigfoot case.

So I am getting a Bigfoot from hwood34.  Is there any chance of using either your capsense or a soarers converter with this thing?  He gave me the model as 8257816. 
G'day,

The bigfoot (like the XT, which is similar in many ways) unfortunately has a built-in controller, so it can't really be swapped out, short of hacksawing the thing off and soldering some wires onto it.

That said, you have a couple of options now that you didn't use to;

1) The XTant is supposedly possible with the bigfoot; I think wcass was going to have some kits for that soon. You'd need a new controller though of course (mine would work). You might want to get in touch with wcass regarding that.

2) The bigfoot is unusual in that it's controller is basically not there at all; the cable hanging off the keyboard is just an interface to the special IBM capsense chip and little more. Soarer's controller (not converter!) can work with this directly with a little bit of effort. Quantalume (over at DT: http://deskthority.net/keyboards-f2/in-praise-of-bigfoot-t8956.html ) has got this working very satisfactorily. You might want to sign up for a DT account and send him a PM; he's a really nice guy and I'm sure he'd give you some info on how he's done it if the linked info (https://geekhack.org/index.php?topic=48950.0) in that thread isn't enough, seeing as Soarer seems to have gone AWOL.

The XTant option might be the nicest, as you can get a more modern layout out of it, but the Soarer's controller option would probably be the simplest to get going (no need to crack the sucker open and replace the pad card etc.).

Good luck!

Cheers,

xwhatsit


Changed real name to xwhatsit for personal reasons
Title: Re: XT/AT/PS2/Terminal to USB Converter with NKRO
Post by: cohomology on Sun, 25 January 2015, 22:51:39
Thank you for answering my question. XTant does not seem an easy option for me. Guess I would follow the Soarer's controller option. That being said, I still don't understand how to wire a teensy to the keyboard. Could someone please write a short tutorial on how to get this going? I read that thread many times but still don't seem to be able to wire the teensy to the keyboard.

Since the other thread does not seem to get much traffic, let me ask this question here again. Hope this is fine. I picked up an IBM Model F 5291 Terminal (bigfoot) Keyboard and am trying to adapt it. There are a couple pins I don't seem to be able to find on the teensy: Frame GND, Output, Strobe. Can someone tell me which pins these are? TIA!

I was going to post in that thread but had other family stuff going on.  Those pins are not the teensy, that is the pinout for the keyboard plug.  Adapting a 5291 is a touch more involved.  Let me report back.

Edit:  I had this same discussion with xwhatsit.  Turns out my keyboard is neither a standard XT, for a 5291, though it is in a bigfoot case.

So I am getting a Bigfoot from hwood34.  Is there any chance of using either your capsense or a soarers converter with this thing?  He gave me the model as 8257816. 
G'day,

The bigfoot (like the XT, which is similar in many ways) unfortunately has a built-in controller, so it can't really be swapped out, short of hacksawing the thing off and soldering some wires onto it.

That said, you have a couple of options now that you didn't use to;

1) The XTant is supposedly possible with the bigfoot; I think wcass was going to have some kits for that soon. You'd need a new controller though of course (mine would work). You might want to get in touch with wcass regarding that.

2) The bigfoot is unusual in that it's controller is basically not there at all; the cable hanging off the keyboard is just an interface to the special IBM capsense chip and little more. Soarer's controller (not converter!) can work with this directly with a little bit of effort. Quantalume (over at DT: http://deskthority.net/keyboards-f2/in-praise-of-bigfoot-t8956.html ) has got this working very satisfactorily. You might want to sign up for a DT account and send him a PM; he's a really nice guy and I'm sure he'd give you some info on how he's done it if the linked info (https://geekhack.org/index.php?topic=48950.0) in that thread isn't enough, seeing as Soarer seems to have gone AWOL.

The XTant option might be the nicest, as you can get a more modern layout out of it, but the Soarer's controller option would probably be the simplest to get going (no need to crack the sucker open and replace the pad card etc.).

Good luck!

Cheers,

xwhatsit


Changed real name to xwhatsit for personal reasons
Title: Re: XT/AT/PS2/Terminal to USB Converter with NKRO
Post by: Melvang on Sun, 25 January 2015, 22:53:10
Thank you for answering my question. XTant does not seem an easy option for me. Guess I would follow the Soarer's controller option. That being said, I still don't understand how to wire a teensy to the keyboard. Could someone please write a short tutorial on how to get this going? I read that thread many times but still don't seem to be able to wire the teensy to the keyboard.

Since the other thread does not seem to get much traffic, let me ask this question here again. Hope this is fine. I picked up an IBM Model F 5291 Terminal (bigfoot) Keyboard and am trying to adapt it. There are a couple pins I don't seem to be able to find on the teensy: Frame GND, Output, Strobe. Can someone tell me which pins these are? TIA!

I was going to post in that thread but had other family stuff going on.  Those pins are not the teensy, that is the pinout for the keyboard plug.  Adapting a 5291 is a touch more involved.  Let me report back.

Edit:  I had this same discussion with xwhatsit.  Turns out my keyboard is neither a standard XT, for a 5291, though it is in a bigfoot case.

So I am getting a Bigfoot from hwood34.  Is there any chance of using either your capsense or a soarers converter with this thing?  He gave me the model as 8257816. 
G'day,

The bigfoot (like the XT, which is similar in many ways) unfortunately has a built-in controller, so it can't really be swapped out, short of hacksawing the thing off and soldering some wires onto it.

That said, you have a couple of options now that you didn't use to;

1) The XTant is supposedly possible with the bigfoot; I think wcass was going to have some kits for that soon. You'd need a new controller though of course (mine would work). You might want to get in touch with wcass regarding that.

2) The bigfoot is unusual in that it's controller is basically not there at all; the cable hanging off the keyboard is just an interface to the special IBM capsense chip and little more. Soarer's controller (not converter!) can work with this directly with a little bit of effort. Quantalume (over at DT: http://deskthority.net/keyboards-f2/in-praise-of-bigfoot-t8956.html ) has got this working very satisfactorily. You might want to sign up for a DT account and send him a PM; he's a really nice guy and I'm sure he'd give you some info on how he's done it if the linked info (https://geekhack.org/index.php?topic=48950.0) in that thread isn't enough, seeing as Soarer seems to have gone AWOL.

The XTant option might be the nicest, as you can get a more modern layout out of it, but the Soarer's controller option would probably be the simplest to get going (no need to crack the sucker open and replace the pad card etc.).

Good luck!

Cheers,

xwhatsit


Changed real name to xwhatsit for personal reasons

You could try and message Quantalume over at DT.
Title: Re: XT/AT/PS2/Terminal to USB Converter with NKRO
Post by: cohomology on Sun, 25 January 2015, 23:07:54
Thanks! Will do and report back. So far I really liked the feeling of this keyboard.

Thank you for answering my question. XTant does not seem an easy option for me. Guess I would follow the Soarer's controller option. That being said, I still don't understand how to wire a teensy to the keyboard. Could someone please write a short tutorial on how to get this going? I read that thread many times but still don't seem to be able to wire the teensy to the keyboard.

Since the other thread does not seem to get much traffic, let me ask this question here again. Hope this is fine. I picked up an IBM Model F 5291 Terminal (bigfoot) Keyboard and am trying to adapt it. There are a couple pins I don't seem to be able to find on the teensy: Frame GND, Output, Strobe. Can someone tell me which pins these are? TIA!

I was going to post in that thread but had other family stuff going on.  Those pins are not the teensy, that is the pinout for the keyboard plug.  Adapting a 5291 is a touch more involved.  Let me report back.

Edit:  I had this same discussion with xwhatsit.  Turns out my keyboard is neither a standard XT, for a 5291, though it is in a bigfoot case.

So I am getting a Bigfoot from hwood34.  Is there any chance of using either your capsense or a soarers converter with this thing?  He gave me the model as 8257816. 
G'day,

The bigfoot (like the XT, which is similar in many ways) unfortunately has a built-in controller, so it can't really be swapped out, short of hacksawing the thing off and soldering some wires onto it.

That said, you have a couple of options now that you didn't use to;

1) The XTant is supposedly possible with the bigfoot; I think wcass was going to have some kits for that soon. You'd need a new controller though of course (mine would work). You might want to get in touch with wcass regarding that.

2) The bigfoot is unusual in that it's controller is basically not there at all; the cable hanging off the keyboard is just an interface to the special IBM capsense chip and little more. Soarer's controller (not converter!) can work with this directly with a little bit of effort. Quantalume (over at DT: http://deskthority.net/keyboards-f2/in-praise-of-bigfoot-t8956.html ) has got this working very satisfactorily. You might want to sign up for a DT account and send him a PM; he's a really nice guy and I'm sure he'd give you some info on how he's done it if the linked info (https://geekhack.org/index.php?topic=48950.0) in that thread isn't enough, seeing as Soarer seems to have gone AWOL.

The XTant option might be the nicest, as you can get a more modern layout out of it, but the Soarer's controller option would probably be the simplest to get going (no need to crack the sucker open and replace the pad card etc.).

Good luck!

Cheers,

xwhatsit


Changed real name to xwhatsit for personal reasons

You could try and message Quantalume over at DT.
Title: Re: XT/AT/PS2/Terminal to USB Converter with NKRO
Post by: cinnamonrollz on Sun, 01 February 2015, 19:22:35
Is soarer dead or something?  :'(
Title: Re: XT/AT/PS2/Terminal to USB Converter with NKRO
Post by: fohat.digs on Sun, 01 February 2015, 19:34:38
He seems to have gone silent for over half a year now.

I keep hoping that he got a new girlfriend and went off the grid in Tonga.
Title: Re: XT/AT/PS2/Terminal to USB Converter with NKRO
Post by: mougrim on Mon, 02 February 2015, 09:22:52
Hmm... Anyone knows if I can made config with fn key for switching layers which also works like normal key?

e.g. one press - key value, hold + other keys - next layer?
Title: Re: XT/AT/PS2/Terminal to USB Converter with NKRO
Post by: Melvang on Mon, 02 February 2015, 10:53:24
I am not sure that that functionality is available with this firmware setup.  What you are refering to is usually called dual role keys.  I have used it on my JD40 with using the space bar as Function.  The biggest issue with it is when you tap for space, it registers on key up not key down.
Title: Re: XT/AT/PS2/Terminal to USB Converter with NKRO
Post by: mougrim on Mon, 02 February 2015, 11:10:21
I am not sure that that functionality is available with this firmware setup.  What you are refering to is usually called dual role keys.  I have used it on my JD40 with using the space bar as Function.  The biggest issue with it is when you tap for space, it registers on key up not key down.

Yeah... it seems while hasu firmware from tmk project has it (done adb/usb converter week ago), soarer's converter has not :( Oh well. I have key I have not use much on my AT anyway.

But to be able to change config on the fly - that's fantastic :)

BTW. I have ANSI-modden AT Model F. With Blue Cube converter button right above "Enter" key was working, but now it isn't :( Anyone know how I should write config to fix it?

UPD. Found it in the "codes" section of the docs and remapped. It's EXTRA_BACKSLASH to BACKSLASH
Title: Re: XT/AT/PS2/Terminal to USB Converter with NKRO
Post by: rossviper on Wed, 04 February 2015, 10:57:46
Just an update and review of my progress with the 122 terminal I got a few weeks ago if anyone is interested.

I ended up getting a pro micro clone off ebay from a UK supplier, (in fact I've had  off them now) it worked fine, only thing to note was i had to use a USB2 port to get the ArduinoBuilder software to work correctly. Tim (@mrfluffy) was kind enough to send me the missing function key, as well as a few spare caps that I also didn't have. I got a beige colour usb cable from amazon, and have now the final keyboard all up and running nicely.

(http://i.imgur.com/07emOcV.jpg)

Final tote up:
Keyboard £5
Postage of keyboard £10
ProMicro Board £7 posted
Cable £3
Hex Drivers £6
Missing caps FOC - Thanks Tim!!

so all up a grand total of 31 or 25 quid depending on how you look at it,  not bad, not bad at all.

Great fun and a great result at the end. Thanks again to Soarer, and Tim, and to the others on this thread for the advice.


Title: Re: XT/AT/PS2/Terminal to USB Converter with NKRO
Post by: mrfluffy on Wed, 04 February 2015, 19:39:48
Nice result there Ross. My old 122 key Model M has a faulty controller, rusty backplate, and a bunch of broken rivets, so it's going for a complete rebuild to replace my Razer Black Widow. If anyone else in the UK needs a couple of keycaps, drop me a pm and I'll see if I can help out.
Title: Re: XT/AT/PS2/Terminal to USB Converter with NKRO
Post by: Asininity on Sun, 08 February 2015, 18:10:38
I have a WYSE WY70. It uses the 4P4C/RJ10 connector. Will I be able to use a Teensy to convert it to a USB? I am not very knowledgeable on any of this and am at a complete loss on how to proceed. 
Title: Re: XT/AT/PS2/Terminal to USB Converter with NKRO
Post by: fohat.digs on Sun, 08 February 2015, 19:02:15
I have a WYSE WY70. It uses the 4P4C/RJ10 connector. Will I be able to use a Teensy to convert it to a USB? I am not very knowledgeable on any of this and am at a complete loss on how to proceed. 

I have a really nice Televideo with a 4P4C and I have not yet been able to get it running.
Perhaps you will be more knowledgeable or lucky ....
Title: Re: XT/AT/PS2/Terminal to USB Converter with NKRO
Post by: Asininity on Mon, 09 February 2015, 15:36:06
with a 4P4C and I have not yet been able to get it running.
Perhaps you will be more knowledgeable or lucky ....

Have you thought about hand wiring the board? I saw a thread in which someone hand wired their board.

Here's two threads that I found on the subject:
http://deskthority.net/keyboards-f2/rj11-to-ps-2-or-usb-adapter-for-dolch-pac-64-keyboard-t6243.html
https://geekhack.org/index.php?topic=46531.0

Soarer has already created a solution for WYSE boards. https://geekhack.org/index.php?topic=52597.0

Title: Re: XT/AT/PS2/Terminal to USB Converter with NKRO
Post by: fohat.digs on Mon, 09 February 2015, 16:05:57

Have you thought about hand wiring the board?

Soarer has already created a solution for WYSE boards. https://geekhack.org/index.php?topic=52597.0


The board is virtually new and I do not want to go that far.

And yes, I tried Soarer's Wyse converter with no luck.
Title: Re: XT/AT/PS2/Terminal to USB Converter with NKRO
Post by: Asininity on Mon, 09 February 2015, 18:02:47
The board is virtually new and I do not want to go that far.

And yes, I tried Soarer's Wyse converter with no luck.

That stinks. I hope you find a solution.
Title: Re: XT/AT/PS2/Terminal to USB Converter with NKRO
Post by: Coin-op Adjutant on Sat, 28 February 2015, 12:22:25
Salutations, gents.

I have an assortment of Model M-122s (1395660, terminal M, RJ45 connectors) that I'm trying to test with a new Teensy converter.  I've done this before with my Model F XT, and had absolutely no issues plugging in and going.

These three, however, are not even budging when I plug the Teensy in.  hid_listen just gives me a single immediate response of:
Code: [Select]
Waiting for device:..........
Listening:
wEE

remaining: FFFC

Keyboard ID: 0000
Code Set: 1
Mode: PC/XT

R05

...and nothing else--no responses from keypresses, nothing--so I'm wondering what exactly is going on here.

Of note: It looks like hid_listen at least *recognizes* that a keyboard is plugged in, and the keyboards start to heat up a little when I plug them in.  Hopefully I'm not cooking them--pretty sure I had the Teensy wiring correct--but I'm at a loss here.
Title: Re: XT/AT/PS2/Terminal to USB Converter with NKRO
Post by: arakula on Sun, 01 March 2015, 01:18:08
Of note: It looks like hid_listen at least *recognizes* that a keyboard is plugged in, and the keyboards start to heat up a little when I plug them in.  Hopefully I'm not cooking them--pretty sure I had the Teensy wiring correct--but I'm at a loss here.
Double-check that wiring. Especially the +5V and GND lines. You might well have fried your keyboards already. "Heating up" is not something they should do.
That response you see from hid_listen means that it did not recognize a keyboard, since no response for the EE command came back, so it assumes PC/XT.
Title: Re: XT/AT/PS2/Terminal to USB Converter with NKRO
Post by: Coin-op Adjutant on Sun, 01 March 2015, 08:28:23
I guess you're never too old or experienced to make some mistakes.

Yep, that was the issue.  Many thanks.
Title: Re: XT/AT/PS2/Terminal to USB Converter with NKRO
Post by: Melvang on Sat, 07 March 2015, 13:53:40
I am going to install a couple pull up resistors on my soarer modded XT.  Do I install them in the middle of the cable, or between the teensy and the XT pcb?
Title: Re: XT/AT/PS2/Terminal to USB Converter with NKRO
Post by: mougrim on Sat, 07 March 2015, 14:16:51
I am going to install a couple pull up resistors on my soarer modded XT.  Do I install them in the middle of the cable, or between the teensy and the XT pcb?

Between the pins of teensy.
Title: Re: XT/AT/PS2/Terminal to USB Converter with NKRO
Post by: Melvang on Sat, 07 March 2015, 14:41:38
I am going to install a couple pull up resistors on my soarer modded XT.  Do I install them in the middle of the cable, or between the teensy and the XT pcb?

Between the pins of teensy.

Excellent thanks
Title: Re: XT/AT/PS2/Terminal to USB Converter with NKRO
Post by: fohat.digs on Sat, 07 March 2015, 16:03:04
Do I install them in the middle of the cable, or between the teensy and the XT pcb?

Looking for a photo, I don't see what I need.

One leg of each resistor connects to +5V (aka VCC) and the other to clock or data.

Depending on how you are putting them all together, it can get very congested. At first, I did not realize that there are 2nd power and ground connections at each end of the Teensy, so you can use that second one for the resistors and get a little more elbow room at the other end.

Also, if you are using thin solid wire, I have been able to push both wire and the resistor leg through in one direction. If you are using braided wire it probably won't work.
Title: Re: XT/AT/PS2/Terminal to USB Converter with NKRO
Post by: Melvang on Sat, 07 March 2015, 16:10:29
Do I install them in the middle of the cable, or between the teensy and the XT pcb?

Looking for a photo, I don't see what I need.

One leg of each resistor connects to +5V (aka VCC) and the other to clock or data.

Depending on how you are putting them all together, it can get very congested. At first, I did not realize that there are 2nd power and ground connections at each end of the Teensy, so you can use that second one for the resistors and get a little more elbow room at the other end.

Also, if you are using thin solid wire, I have been able to push both wire and the resistor leg through in one direction. If you are using braided wire it probably won't work.


Thanks fohat, I have been chatting with a couple peeps in IRC, and turns out pull up resistors are probably not the fix.  Reason is because I only have about 4 inches or so between the teensy and the keybaord PCB.  I just don't have anything connecting the shield on the USB side to the plate on the keyboard side.  I am going to try that first and see what happens.  If I still get the random key presses I will try the resistors.
Title: Re: XT/AT/PS2/Terminal to USB Converter with NKRO
Post by: Westwall on Fri, 13 March 2015, 19:35:00
Hello! I made a post a couple of weeks ago about an IBM Model M terminal keyboard. Turned out it wasn't terminal, which is better. And it turns out I can, due to being in the right place and the right time and knowing the right person, get an SDL to PS2 cable. Huzzah! No need to buy a soldering iron and practice on scrap first! I get that cable in about a month, though, the wait is killing me.

In the meanwhile, I've found another good discovery. 10 US dollars. IBM Beam Spring. The grand-daddy of all IBM's. It's either a 3101 or a 3727 model, but I can't tell from the pictures. All I know is that it has a 2-row DB15 connection.

Now, here's the thing. This board is dirty and might have a stuck key, if the picture the seller posted is that of the actual keyboard they have. Heck, I'm not even sure if it's in working condition. Either way, some distilled water, peroxide and elbow grease, and I'm putting that thing on a shelf assuming it's not functional. That'd still be 10 dollars well spent in my opinion. I'm buying it as soon as I can.

But let's assume that it is actually working. These guys sold me an impeccable, barely-used, working Model M for 10 dollars, so it doesn't seem to be completely out of the question to me. Is there any way to interface this thing to PS/2 (I'm assuming it's easier to interface to PS/2 than USB, but I'd use either)? Something like Soarer's converter, or would Soarer's work in this case? I can get my hands on soldering equipment and a limited variety of micro-controllers, but not much more than that.
Title: Re: XT/AT/PS2/Terminal to USB Converter with NKRO
Post by: mougrim on Sat, 14 March 2015, 03:07:48
Hello! I made a post a couple of weeks ago about an IBM Model M terminal keyboard. Turned out it wasn't terminal, which is better. And it turns out I can, due to being in the right place and the right time and knowing the right person, get an SDL to PS2 cable. Huzzah! No need to buy a soldering iron and practice on scrap first! I get that cable in about a month, though, the wait is killing me.

In the meanwhile, I've found another good discovery. 10 US dollars. IBM Beam Spring. The grand-daddy of all IBM's. It's either a 3101 or a 3727 model, but I can't tell from the pictures. All I know is that it has a 2-row DB15 connection.

Now, here's the thing. This board is dirty and might have a stuck key, if the picture the seller posted is that of the actual keyboard they have. Heck, I'm not even sure if it's in working condition. Either way, some distilled water, peroxide and elbow grease, and I'm putting that thing on a shelf assuming it's not functional. That'd still be 10 dollars well spent in my opinion. I'm buying it as soon as I can.

But let's assume that it is actually working. These guys sold me an impeccable, barely-used, working Model M for 10 dollars, so it doesn't seem to be completely out of the question to me. Is there any way to interface this thing to PS/2 (I'm assuming it's easier to interface to PS/2 than USB, but I'd use either)? Something like Soarer's converter, or would Soarer's work in this case? I can get my hands on soldering equipment and a limited variety of micro-controllers, but not much more than that.

For beamspring you'll need an xwhatsit's controller, but it won't be cheap - about 50 bucks.

http://deskthority.net/for-sale-f55/xwhatsit-s-grand-unified-ibm-capsense-usb-controller-thread-t7993.html?hilit=xwhatsit

Alas, there are no alternatives where beamsprings are concerned. But this is a great controlled, easy to install and to configure.
Title: Re: XT/AT/PS2/Terminal to USB Converter with NKRO
Post by: Halvar on Sat, 14 March 2015, 08:58:33
There's been a lot of talk about how to get old beam spring boards to work using xwhatsit's controller last year on DT.

xwhatsit's controller is a true marvel, with great both hard- and software. And you don't have to destroy anything in your board to make it work -- you just plug the original controller out, plug the new controller in. It's fully reversible.

I got this one in a very rusty condition (on the inside) and got it to work nicely with some work:

(http://deskthority.net/resources/image/16687)

Thread about the restoration:
http://deskthority.net/workshop-f7/restoring-my-ibm-beam-spring-keyboard-from-ibm-3278-a02-terminal-t8515.html?hilit=3278



Title: Re: XT/AT/PS2/Terminal to USB Converter with NKRO
Post by: metalliqaz on Sat, 14 March 2015, 09:46:31
There's been a lot of talk about how to get old beam spring boards to work using xwhatsit's controller last year on DT.

xwhatsit's controller is a true marvel, with great both hard- and software. And you don't have to destroy anything in your board to make it work -- you just plug the original controller out, plug the new controller in. It's fully reversible.

I got this one in a very rusty condition (on the inside) and got it to work nicely with some work:

Show Image
(http://deskthority.net/resources/image/16687)


Thread about the restoration:
http://deskthority.net/workshop-f7/restoring-my-ibm-beam-spring-keyboard-from-ibm-3278-a02-terminal-t8515.html?hilit=3278

That's a thing of beauty
Title: Re: XT/AT/PS2/Terminal to USB Converter with NKRO
Post by: mougrim on Sat, 14 March 2015, 11:00:25
There's been a lot of talk about how to get old beam spring boards to work using xwhatsit's controller last year on DT.

xwhatsit's controller is a true marvel, with great both hard- and software. And you don't have to destroy anything in your board to make it work -- you just plug the original controller out, plug the new controller in. It's fully reversible.

I got this one in a very rusty condition (on the inside) and got it to work nicely with some work:

Thread about the restoration:
http://deskthority.net/workshop-f7/restoring-my-ibm-beam-spring-keyboard-from-ibm-3278-a02-terminal-t8515.html?hilit=3278

You, sir, is a true artisan. And now I want one too...
Title: Re: XT/AT/PS2/Terminal to USB Converter with NKRO
Post by: spoonypirate on Mon, 16 March 2015, 17:30:07
This is so great! I converted an AT Genovation 622 numpad today with it, and the longest part by far was testing continuity between the AT pins and the wires on the PCB. Super easy to deal with.

Title: Re: XT/AT/PS2/Terminal to USB Converter with NKRO
Post by: fms on Mon, 23 March 2015, 16:16:59
Hey  ;D

 I've recently got in my hands a Model F for a couple of bucks (pics below! [1]), I'd love to adapt it, according to what I've seen I could use Soarer's converter or xwhatsit's. Which one do you guys think is the best?  I ordered a Teensy recently to try and make this one, however I also found this converter on ebay [2], anyone bought something from him? is it safe? Nothing I'd ever make will look as neat so if it works I'd probably order it :)

What are the differences between [2] and [3]? I think the one I'll need is [2], anyone can confirm? there are pics on the album of my plug [1].

Also, is there any way to check if the keyboard internals are working before spending on the convertor?

[1] http://imgur.com/a/r55td
[2] http://www.ebay.com/itm/281476427201
[3] http://www.ebay.com/itm/271644933588


Title: Re: XT/AT/PS2/Terminal to USB Converter with NKRO
Post by: Melvang on Mon, 23 March 2015, 16:34:09
Hey  ;D

 I've recently got in my hands a Model F for a couple of bucks (pics below! [1]), I'd love to adapt it, according to what I've seen I could use Soarer's converter or xwhatsit's. Which one do you guys think is the best?  I ordered a Teensy recently to try and make this one, however I also found this converter on ebay [2], anyone bought something from him? is it safe? Nothing I'd ever make will look as neat so if it works I'd probably order it :)

What are the differences between [2] and [3]? I think the one I'll need is [2], anyone can confirm? there are pics on the album of my plug [1].

Also, is there any way to check if the keyboard internals are working before spending on the convertor?

[1] http://imgur.com/a/r55td
[2] http://www.ebay.com/itm/281476427201
[3] http://www.ebay.com/itm/271644933588

That is an F XT.  The teensy and the ebay items you linked are functionally the same thing.  In fact the firmware on those ebay items should be the same as what you would put on the teensy.  I have one converted with a teensy, though I still get the occasional random keypress on the - in the numpad area, and the space bar sometimes gives a double keystroke.   With my AT, converted with xwhatsit, I don't have these issues, but that is a totally different beast.  Xwhatsit is more difficult to install physically, but programming is stupid easy.
Title: Re: XT/AT/PS2/Terminal to USB Converter with NKRO
Post by: fohat.digs on Mon, 23 March 2015, 17:16:04
I'd love to adapt it, according to what I've seen I could use Soarer's converter or xwhatsit's. Which one do you guys think is the best?  I ordered a Teensy recently to try and make this one, however I also found this converter on ebay [2], anyone bought something from him? is it safe? Nothing I'd ever make will look as neat so if it works I'd probably order it :)

What are the differences between [2] and [3]? I think the one I'll need is [2], anyone can confirm? there are pics on the album of my plug [1].

Also, is there any way to check if the keyboard internals are working before spending on the convertor?

[1] http://imgur.com/a/r55td
[2] http://www.ebay.com/itm/281476427201
[3] http://www.ebay.com/itm/271644933588


Orihalcon's gear is very clean and yes, it is far nicer than what you build yourself, although you will have more flexibility with a Teensy. You will have to have some appropriate hardware to use the XT with a modern computer.

You want the one you call [2] which is the "180 degree" DIN plug rather than [3] the "240 degree" version.

If you anticipate more experimenting, you could build something like my outboard converter box:

https://geekhack.org/index.php?topic=58941.msg1348717#msg1348717 (https://geekhack.org/index.php?topic=58941.msg1348717#msg1348717)
Title: Re: XT/AT/PS2/Terminal to USB Converter with NKRO
Post by: antdes457 on Thu, 26 March 2015, 17:38:18
Anyone else noticed missing keystrokes with simultaneous keypresses when using Soarer's with a 122-key Model F?

Many 5+ key combinations such as 234we or pretty much any 5-key combinations on mixed rows and columns will only register 3-4 letters when pressed at the same time.

Another one, let's say you hold the shift key. Now press and hold 234we one by one while holding shift. If you release all the letters at the same time, the shift modifier will be lost. I don't know if this happens because of USB HID, the converter or the IBM controller. I'm trying to find out if other NKRO keyboards have the same problem with Soarer's converter or if xwhatsit's controller exhibits the same problems.
Title: Re: XT/AT/PS2/Terminal to USB Converter with NKRO
Post by: Purpeltendire on Wed, 01 April 2015, 17:57:42
I appear to be having some problems with this, and I'm not sure if it's the keyboard or my converter. I decided to try one of the eBay converters, as I haven't really had time to make things lately.

The keyboard I'm using it with is a 122-key Computer Lab International with a five-pin AT.

When I first plugged it in (sadly didn't have HID Listen running) the keys seemed all off, and kept repeating (as if I held down the key). Not a big deal, I figured. Ran HID_Listen, recieved a keyboard ID of 0000, but keypresses would register as different keys and seemed to be reading in okay. No big deal, I figured. I'll just make a config with 'force set3' in it and send it over using scaswr.

After doing that, I've only been able to get this from HID_Listen:
(http://i.imgur.com/xvUqlQU.jpg)

The first line of error codes, which show up when I connect the board:
Code: [Select]
wF8 W085wF8 W085wF8 W085

The rest of the output is what happens when I press a key - any key. No matter what key is pressed, one line of this shows up:
Code: [Select]
R06 wFE
R06 wFE
R06 wFE
R06 wFE
R06 wFE
R06 wFE

Any help would be greatly appreciated!
I tried sending Halvar.sc and dvorak.sc using scaswr as well, but they resulted in the same output.

Edit: Some more information as I try to figure out what's going on:

Rebooted my computer, and keyboard changed back to Code Set 1 - The keypresses you see here are the result of my typing 'test'
(http://i.imgur.com/YR3m8ug.jpg)

After typing that, the keyboard again acted like I was holding down a key. In this case it was k. No keypresses are registering, but if I go into any window with a field that accepts characters, it's automatically filled with 'kkkkkkkkkkkkkk' and I had to unplug the keyboard for it to stop. On plugging it back in, I get this:

(http://i.imgur.com/t4YC9K3.jpg)

And here's the output of scinfo:
(http://i.imgur.com/Pblmosq.jpg)
Title: Re: XT/AT/PS2/Terminal to USB Converter with NKRO
Post by: fohat.digs on Wed, 01 April 2015, 19:13:10
I would boot the computer with a conventional PS/2 keyboard connected.

Then connect the subject keyboard to the Teensy and plug in the USB from the Teensy "hot" and wait for the computer to see it.

If it did not work from that point, I would then try re-booting the computer with the Teensy connected.

The computer can only "see" 1 Teensy, in any case. I usually start "cold" with no USB keyboards and plug in the Teensy USB "hot" the first time.
Title: Re: XT/AT/PS2/Terminal to USB Converter with NKRO
Post by: Purpeltendire on Wed, 01 April 2015, 19:44:21
I would boot the computer with a conventional PS/2 keyboard connected.

Then connect the subject keyboard to the Teensy and plug in the USB from the Teensy "hot" and wait for the computer to see it.

If it did not work from that point, I would then try re-booting the computer with the Teensy connected.

The computer can only "see" 1 Teensy, in any case. I usually start "cold" with no USB keyboards and plug in the Teensy USB "hot" the first time.

Thanks for your help - unfortunately, no changes doing that. I booted with nothing, booted with a USB keyboard, and booted with a USB keyboard via a PS/2 adapter. Still the same result. Forcing Set 3 causes all keypresses to output R06, and forcing something else causes incorrect output.

'test' is being interpreted as 'backquote k F5 F6 Escape.'
Title: Re: XT/AT/PS2/Terminal to USB Converter with NKRO
Post by: antdes457 on Fri, 03 April 2015, 06:32:09
I had a similar same problem with a Raspberry Pi and a F122. Maybe the keyboard takes more than 500mA from the USB port. Do you have a USB3.0 port or a powered hub to test?

Also, maybe the data + clock voltage are too low on the AT side? Is it a keyboard where it's worth having pull-up resistors?

Actually, these guys state that the keyboard will not work with a USB converter, but they're probably not talking about Soarer's since it's able to convert protocols:
http://www.twindata.com/CLI/clikeyboard.htm
Title: Re: XT/AT/PS2/Terminal to USB Converter with NKRO
Post by: Purpeltendire on Sun, 05 April 2015, 16:02:55
I had a similar same problem with a Raspberry Pi and a F122. Maybe the keyboard takes more than 500mA from the USB port. Do you have a USB3.0 port or a powered hub to test?

Also, maybe the data + clock voltage are too low on the AT side? Is it a keyboard where it's worth having pull-up resistors?

Actually, these guys state that the keyboard will not work with a USB converter, but they're probably not talking about Soarer's since it's able to convert protocols:
http://www.twindata.com/CLI/clikeyboard.htm

I was actually using USB3.0 ports on the front of my case. I tried plugging it in directly to the motherboard but it didn't fix anything, sadly. Same results.

I'd be willing to try the pull-up resistor if I had time and this was my own Teensy, but as this is one from orihalcon's eBay I can't. I'm considering returning it and building my own instead, but I can't really think of a reason why that would work while his does not.
Title: Re: XT/AT/PS2/Terminal to USB Converter with NKRO
Post by: fohat.digs on Sun, 05 April 2015, 16:44:46
but as this is one from orihalcon's eBay I can't. I'm considering returning it and building my own instead,

If you send it back, ask him to test it.

I would guess that at least 10% of my computer problems come from faulty wiring or connections.
Title: Re: XT/AT/PS2/Terminal to USB Converter with NKRO
Post by: antdes457 on Thu, 09 April 2015, 07:57:14
The pull-up resistor is also possible directly on the IBM controller though.
Title: Re: XT/AT/PS2/Terminal to USB Converter with NKRO
Post by: mougrim on Thu, 09 April 2015, 11:13:41
There are something strange with my Model F or convertor. From time to time it just begins to repeat last pressed key. It never happens when I typing on it, but if I leave my PC powered on and returns to it after half an hour or so, I can find ten or so new pages in my editor filled with last entered letter. When I press some other key, it stops doing so. Any idea? Maybe I should re-flash my Soarer's converter?
Title: Re: XT/AT/PS2/Terminal to USB Converter with NKRO
Post by: antdes457 on Thu, 09 April 2015, 11:20:22
Can you try a USB 2 vs USB 3 port or a USB hub?
Title: Re: XT/AT/PS2/Terminal to USB Converter with NKRO
Post by: Skechup on Tue, 21 April 2015, 13:13:07
This seems like something I would do.

Good Job!!!  :thumb:
Title: Re: XT/AT/PS2/Terminal to USB Converter with NKRO
Post by: Skechup on Tue, 21 April 2015, 13:40:59
This seems like something I would do.

Good Job!!!  :thumb:
Title: Re: XT/AT/PS2/Terminal to USB Converter with NKRO
Post by: pandroid on Wed, 06 May 2015, 22:05:34
Hi folks,

After reading through the thread and going through the documentation of stellar work done by Soarer I've decided to bite the bullet and convert a terminal type keyboard (p/n 1394193) to USB using a Pro Micro. Got the Pro Micro side done, I can see it reporting as:

Code: [Select]
$ sudo ./scinfo
scinfo: looking for Soarer's Converter: found
scinfo: sending info request: ok
device: ok

Protocol Version: v1.00
Code Version: v1.12
Max Settings Version: v1.01
Current Settings Version: v0.00
SRAM Size: 2560 bytes
SRAM Free: 1809 bytes
EEPROM Size: 1024 bytes
EEPROM Free: 1020 bytes

I am not quite sure about the physical connection, though. Here's what I am thinking:

(http://i.imgur.com/gCOSVXi.jpg)

Does this look about right? I'd appreciate another set of eyes going through my connections before I go ahead and fry my keyboard off :)

Thanks!
Title: Re: XT/AT/PS2/Terminal to USB Converter with NKRO
Post by: Halvar on Thu, 07 May 2015, 01:48:14
Looks right to me.  :thumb:
Title: Re: XT/AT/PS2/Terminal to USB Converter with NKRO
Post by: fohat.digs on Thu, 07 May 2015, 07:41:02
When is Soarer's/Teensy recognized by the BIOS, and is there any way to change it?

While booting up, I cannot use "Delete" to get into BIOS because the keyboard is not recognized yet. Having a 2nd (conventional) keyboard plugged in solves the problem, but that is a kludge.

"Soarer's Converter" appears as a device in the hardware list, but is it actually a "keyboard" in the early part of the cycle?

Thanks
Title: Re: XT/AT/PS2/Terminal to USB Converter with NKRO
Post by: pandroid on Fri, 15 May 2015, 15:36:05
Looks right to me.  :thumb:

Indeed it was, thanks for checking. I'm now a proud owner of a new-old keyboard!
Title: Re: XT/AT/PS2/Terminal to USB Converter with NKRO
Post by: njbair on Fri, 15 May 2015, 20:53:06
Got my Teensy in the mail today. I couldn't believe how easy this was to set up!

[attach=1]

Now I can fully take advantage of my PC-122's battle station keys.
Title: Re: XT/AT/PS2/Terminal to USB Converter with NKRO
Post by: njbair on Mon, 18 May 2015, 11:40:33
So the docs say not to use FAKE_01 thru FAKE_19 because they are deprecated. Use EXTRA_* instead. But I don't see a replacement for FAKE_01 (B0) in the current table. This corresponds to the top-left nav cluster key on my PC-122 (where Insert usually is). The docs seem to skip over B0 and go right from AF to B1.

What EXTRA code do I use instead of FAKE_01? Am I missing something? Also, it looks like FAKE_18 (C1) is also missing from the main code listing.
Title: Re: XT/AT/PS2/Terminal to USB Converter with NKRO
Post by: E TwentyNine on Mon, 18 May 2015, 12:02:17
It's deprecated, it should still work.
Title: Re: XT/AT/PS2/Terminal to USB Converter with NKRO
Post by: njbair on Mon, 18 May 2015, 12:07:28
It's deprecated, it should still work.

Yes, the FAKE_* codes still work but I'm just wondering if there's a replacement for them so that I can future-proof my config.
Title: Re: XT/AT/PS2/Terminal to USB Converter with NKRO
Post by: E TwentyNine on Mon, 18 May 2015, 12:54:07
You're future proofed.  May not be as pretty as you like though.

Soarer hasn't been around here for a while now :( and I doubt any updates are coming soon.

If he did update there's no real valid reason for removing deprecated constants.

Checking the binary there are 17 EXTRA_ codes and 19 FAKE_ codes defined.   I pulled all the codes out of the binary, in attached file.

I don't know if there's a generic HID_## definition that will let you specify the code directly, didn't see anything in the docs.
Title: Re: XT/AT/PS2/Terminal to USB Converter with NKRO
Post by: berserkfan on Mon, 18 May 2015, 14:03:44
Hey Guys

 I have a couple of Arduinos but was never able to make them work.

I flashed them with great difficulty, but if anyone can suggest an easier way please tell. Dorkvader linked me to some rather complex instructions, already 95% refined by DV from the original discussion threads, but still hard enough to follow that I can't remember what I did.

Then I got soarer on them, but couldn't make progress after that. Windows Device Manager detects Soarer's Keyboard Converter. The red light is on, showing power is recieved.  scwr.exe shows that Soarer was indeed flashed correctly. My multimeter on DC voltage shows that voltage between vcc and gnd pins is 3.52v with the keyboard connected, and 4.55v without the keyboard.

  As reported here. https://geekhack.org/index.php?topic=71975.0

Findecanor has recommended that I short the J1 pins, but before I do anything that involves shorting anything I'd like to hear how other people did it!
Title: Re: XT/AT/PS2/Terminal to USB Converter with NKRO
Post by: Halvar on Mon, 18 May 2015, 15:04:18
So the docs say not to use FAKE_01 thru FAKE_19 because they are deprecated. Use EXTRA_* instead. But I don't see a replacement for FAKE_01 (B0) in the current table. This corresponds to the top-left nav cluster key on my PC-122 (where Insert usually is). The docs seem to skip over B0 and go right from AF to B1.

What EXTRA code do I use instead of FAKE_01? Am I missing something? Also, it looks like FAKE_18 (C1) is also missing from the main code listing.

The top left key on the numpad of a 122 key terminal keyboard is ESC by default. I'm using that to remap it (to NumLock), and it works. If your PC-122 (?) is a mode 3 board (i.e. a terminal board), it should work for you, too.

Where on the keyboard is FAKE_18?




Title: Re: XT/AT/PS2/Terminal to USB Converter with NKRO
Post by: njbair on Mon, 18 May 2015, 17:05:14


So the docs say not to use FAKE_01 thru FAKE_19 because they are deprecated. Use EXTRA_* instead. But I don't see a replacement for FAKE_01 (B0) in the current table. This corresponds to the top-left nav cluster key on my PC-122 (where Insert usually is). The docs seem to skip over B0 and go right from AF to B1.

What EXTRA code do I use instead of FAKE_01? Am I missing something? Also, it looks like FAKE_18 (C1) is also missing from the main code listing.

The top left key on the numpad of a 122 key terminal keyboard is ESC by default. I'm using that to remap it (to NumLock), and it works. If your PC-122 (?) is a mode 3 board (i.e. a terminal board), it should work for you, too.

Where on the keyboard is FAKE_18?

Mine is a Unicomp PS/2 PC-122. I did an ANSI layout conversion when I screw modded it, but that doesn't affect the keys in question.

BTW, I'm not talking about top left on the numpad, but rather the nav cluster (above the arrow keys). FAKE_01 works, I just saw the deprecation notice which is why I asked about it.

FAKE_18 corresponds to one of the meta cluster keys to the left of the alphas. I don't remember which one, but I think it was 2nd or 3rd from the bottom on the right. Again, FAKE_18 works fine to remap that key.

I'm just wondering why those two don't have replacement designations. Maybe Soarer didn't have a board to test these two when he redefined those constants?
Title: Re: XT/AT/PS2/Terminal to USB Converter with NKRO
Post by: Halvar on Tue, 19 May 2015, 02:16:49
Ah, I should read better.

You're probably right with your theory. I have both an IBM F-122 and an M-122, but they both use the terminal protocol, and I didn't need the FAKE_xx codes to fully convert them. The key on the upper left of the nav cluster on them just gives me INSERT like it's supposed to. I guess Unicomp might have come up with some different, special codes for their PC-122 boards that Soarer didn't consider.
Title: Re: XT/AT/PS2/Terminal to USB Converter with NKRO
Post by: berserkfan on Tue, 19 May 2015, 07:14:50
Ah, I should read better.

You're probably right with your theory. I have both an IBM F-122 and an M-122, but they both use the terminal protocol, and I didn't need the FAKE_xx codes to fully convert them. The key on the upper left of the nav cluster on them just gives me INSERT like it's supposed to. I guess Unicomp might have come up with some different, special codes for their PC-122 boards that Soarer didn't consider.

Having owned different Model Ms and Fs I can reassure you that there are a lot of weird models out there which send weird scancodes. I suspect that during these early computing days when a lot of hardware was still fairly proprietary, there would be big organizations ordering like 10000 keyboards with a few unique scancodes that worked only on their software.

So I always do HID test. And I am often surprised.
Title: Re: XT/AT/PS2/Terminal to USB Converter with NKRO
Post by: njbair on Tue, 19 May 2015, 14:42:00
Ah, I should read better.

You're probably right with your theory. I have both an IBM F-122 and an M-122, but they both use the terminal protocol, and I didn't need the FAKE_xx codes to fully convert them. The key on the upper left of the nav cluster on them just gives me INSERT like it's supposed to. I guess Unicomp might have come up with some different, special codes for their PC-122 boards that Soarer didn't consider.

Having owned different Model Ms and Fs I can reassure you that there are a lot of weird models out there which send weird scancodes. I suspect that during these early computing days when a lot of hardware was still fairly proprietary, there would be big organizations ordering like 10000 keyboards with a few unique scancodes that worked only on their software.

So I always do HID test. And I am often surprised.

Yeah I did the HID test for every key. AFAIK there was no pattern to the scancodes for any of the keys in the F13-F24 bank or the meta cluster on the left.

I take that back. I believe the keys labeled F17-F24 corresponded to the scancodes for F13-F20, respectively. Everything else was an utter hodgepodge.

Oh, well. At least I've got the FAKE_* codes that I can use. And if Soarer ever removes those I'll just make some noise that the replacements need to be added. Fortunately, as already stated, this is unlikely to happen at this point.
Title: Re: XT/AT/PS2/Terminal to USB Converter with NKRO
Post by: Halvar on Tue, 19 May 2015, 14:56:38
@berserkfan: Generally speaking that's definitely true, but we're talking about IBM in the late 80s to early 90s here, and I think IBM's hardware was pretty standardized at this time at this level. Do you have an example for a Model M keyboard with weird protocols/keycodes from the IBM time? The only example I can think of are their 122 key boards for PCs that were used to emulate a terminal on a PC, and those POS matrix boards.

The Unicomp PC-122 is a more or less modern keyboard though, and I don't really trust Unicomp to adhere to any IBM standards. Much more than IBM they are the kind of company that would custom-taylor controllers for special applications.
Title: Re: XT/AT/PS2/Terminal to USB Converter with NKRO
Post by: JPG on Tue, 19 May 2015, 15:10:47
Hey Guys

 I have a couple of Arduinos but was never able to make them work.

I flashed them with great difficulty, but if anyone can suggest an easier way please tell. Dorkvader linked me to some rather complex instructions, already 95% refined by DV from the original discussion threads, but still hard enough to follow that I can't remember what I did.

Then I got soarer on them, but couldn't make progress after that. Windows Device Manager detects Soarer's Keyboard Converter. The red light is on, showing power is recieved.  scwr.exe shows that Soarer was indeed flashed correctly. My multimeter on DC voltage shows that voltage between vcc and gnd pins is 3.52v with the keyboard connected, and 4.55v without the keyboard.

  As reported here. https://geekhack.org/index.php?topic=71975.0 (https://geekhack.org/index.php?topic=71975.0)

Findecanor has recommended that I short the J1 pins, but before I do anything that involves shorting anything I'd like to hear how other people did it!


The pro micro is the only converter I used so far. I used it on my AT, F122 and XT. Worked with all of them (even if the first time it was hard to find how to flash it). Some people said sometime you need a pullup resistor if your cable is very long, but I never had this issue. What keyboard are you trying to use?
Title: Re: XT/AT/PS2/Terminal to USB Converter with NKRO
Post by: berserkfan on Thu, 21 May 2015, 02:47:50
Hey Guys

 I have a couple of Arduinos but was never able to make them work.

I flashed them with great difficulty, but if anyone can suggest an easier way please tell. Dorkvader linked me to some rather complex instructions, already 95% refined by DV from the original discussion threads, but still hard enough to follow that I can't remember what I did.

Then I got soarer on them, but couldn't make progress after that. Windows Device Manager detects Soarer's Keyboard Converter. The red light is on, showing power is recieved.  scwr.exe shows that Soarer was indeed flashed correctly. My multimeter on DC voltage shows that voltage between vcc and gnd pins is 3.52v with the keyboard connected, and 4.55v without the keyboard.

  As reported here. https://geekhack.org/index.php?topic=71975.0 (https://geekhack.org/index.php?topic=71975.0)

Findecanor has recommended that I short the J1 pins, but before I do anything that involves shorting anything I'd like to hear how other people did it!


The pro micro is the only converter I used so far. I used it on my AT, F122 and XT. Worked with all of them (even if the first time it was hard to find how to flash it). Some people said sometime you need a pullup resistor if your cable is very long, but I never had this issue. What keyboard are you trying to use?

I am trying to use my two Arduinos on a Model F 122 key.

On one arduino I used a big blob of solder to merge the two J1 components together. On the other ardunio, I used a piece of wire to bridge the two components. Both did not work – exactly same result as always where the Soarer keyboard converter could be found and the Arduino LED lighted up, but no HID codes could be detected.

Did I do something wrong? The J1 is a square pad with two tiny rectangular components. Should I have bridged the two J1 pads with the USB micro casing instead? Or bridged the J1 components with other pads?
I am trying to use my two Arduinos on a Model F 122 key.

On one arduino I used a big blob of solder to merge the two J1 components together. On the other ardunio, I used a piece of wire to bridge the two components. Both did not work – exactly same result as always where the Soarer keyboard converter could be found and the Arduino LED lighted up, but no HID codes could be detected.

Did I do something wrong? The J1 is a square pad with two tiny rectangular components. Should I have bridged the two J1 pads with the USB micro casing instead? Or bridged the J1 components with other pads?
I am trying to use my two Arduinos on a Model F 122 key.

On one arduino I used a big blob of solder to merge the two J1 components together. On the other ardunio, I used a piece of wire to bridge the two components. Both did not work – exactly same result as always where the Soarer keyboard converter could be found and the Arduino LED lighted up, but no HID codes could be detected.

Did I do something wrong? The J1 is a square pad with two tiny rectangular components. Should I have bridged the two J1 pads with the USB micro casing instead? Or bridged the J1 components with other pads?

As for cable, I changed to a very short USB micro cable just in case. USB micro cables of different lengths don't work.
Title: Re: XT/AT/PS2/Terminal to USB Converter with NKRO
Post by: dark_samus on Fri, 17 July 2015, 18:19:09
Soarer you should release the source code for this I want to port it to an atmega32u2 (maybe you can compile a version for me or something) any help would be apreciated  :)
Title: Re: XT/AT/PS2/Terminal to USB Converter with NKRO
Post by: fohat.digs on Fri, 17 July 2015, 19:01:05
Soarer has been silent for well over a year now.

We all miss him badly.
Title: Re: XT/AT/PS2/Terminal to USB Converter with NKRO
Post by: Snarfangel on Wed, 22 July 2015, 16:05:46
I bought a converter from orihalcon, and want to do major changes to the mapping from a Maltron two-handed keyboard. I have a single question to start with (I will have more! Oh yes, I will have many, many more!):

Is it easy to change Soarer's converter back to its default setting (i.e. wipe out all of the cruft -- mappings and macros) in memory? Or is it a matter of rewriting all of the settings?

I just want a format c: command for the thing (ignoring the firmware, of course), and start fresh. :))
Title: Re: XT/AT/PS2/Terminal to USB Converter with NKRO
Post by: njbair on Thu, 23 July 2015, 22:22:55
I bought a converter from orihalcon, and want to do major changes to the mapping from a Maltron two-handed keyboard. I have a single question to start with (I will have more! Oh yes, I will have many, many more!):

Is it easy to change Soarer's converter back to its default setting (i.e. wipe out all of the cruft -- mappings and macros) in memory? Or is it a matter of rewriting all of the settings?

I just want a format c: command for the thing (ignoring the firmware, of course), and start fresh. :))

AFAIK you can use an empty file the same way as you would any other config (build .sc to .scb and write) and it should wipe all settings.
Title: Re: XT/AT/PS2/Terminal to USB Converter with NKRO
Post by: Blaise170 on Sun, 26 July 2015, 15:45:27
.
Title: Re: XT/AT/PS2/Terminal to USB Converter with NKRO
Post by: fohat.digs on Sun, 26 July 2015, 22:02:47
Orihalcon encloses his gear in a tiny package.

An actual Teensy has a reset button.
Title: Re: XT/AT/PS2/Terminal to USB Converter with NKRO
Post by: Blaise170 on Sun, 08 November 2015, 21:47:16
My search skills have failed me, so hope I can find an answer here. Is there a pinout for the Arduino Leonardo? I managed to get one of mine flashed with Soarer but I have no idea which pins to use.
Title: Re: XT/AT/PS2/Terminal to USB Converter with NKRO
Post by: njbair on Sun, 08 November 2015, 21:53:30
My search skills have failed me, so hope I can find an answer here. Is there a pinout for the Arduino Leonardo? I managed to get one of mine flashed with Soarer but I have no idea which pins to use.
You may have to pull up a teensy pinout and the Leonardo one side by side and map it out.
Title: Re: XT/AT/PS2/Terminal to USB Converter with NKRO
Post by: Halvar on Mon, 09 November 2015, 07:38:23
This should help:

http://www.johngineer.com/blog/?p=1224

(https://www.adafruit.com/adablog/wp-content/uploads/2012/06/leonardo_pinout_600.png)
Title: Re: XT/AT/PS2/Terminal to USB Converter with NKRO
Post by: Blaise170 on Mon, 09 November 2015, 07:48:11
Managed to find one, I'll link it here for future reference.

(http://i.imgur.com/h5Fyh3g.jpg)
Edit: thanks, I just found it too.
Title: Re: XT/AT/PS2/Terminal to USB Converter with NKRO
Post by: Misha353W on Sun, 06 December 2015, 11:17:59
Yesterday my order from China arrived, with 2 Arduino Leonardo clones :)
I flashed one of them with "Soarer_at2usb_v1.11_atmega32u4.hex". According to the Arduino builder the upload was successful but when I look in the device manager it shows 2 HID Keyboard Devices that both come from this one board. This doesn't seem right to me, should I try flashing the hex file again? I'm still waiting for a DIN socket to arrive so I can't test the keyboard yet...
Title: Re: XT/AT/PS2/Terminal to USB Converter with NKRO
Post by: Ir0n on Mon, 07 December 2015, 11:56:43
Edit: I got it
Title: Re: XT/AT/PS2/Terminal to USB Converter with NKRO
Post by: Misha353W on Wed, 09 December 2015, 15:26:46
It's alive! This is the first post I'm typing on my 1987 Model M! :thumb: I got the din socket in the mail yesterday and soldered all the parts together 10 minutes ago. It needs some fine tuning to work with the German layout but I'm quite happy it works and I want to enjoy the sound of it for a while before I do anything else with it.
After plugging in the keyboard for the 1st time it kept repeating the keys I pressed, but that problem seems to be gone now. The second keyboard still shows up in the device manager but apparently that doesn't cause any problems.

Title: Re: XT/AT/PS2/Terminal to USB Converter with NKRO
Post by: warfaren on Sun, 13 December 2015, 15:46:43
Been using it for a while now with my XT Model F and loving it! Now, if I could only get it to work with my KVM switch, it would be the best thing ever. It just won't work though, I'm assuming it's because of how it achieves full NKRO. If there's a way to disable that I would be perfectly happy with the 6KRO USB provides anyway.
Title: Re: XT/AT/PS2/Terminal to USB Converter with NKRO
Post by: Blaise170 on Sun, 13 December 2015, 16:44:07
It's alive! This is the first post I'm typing on my 1987 Model M! :thumb: I got the din socket in the mail yesterday and soldered all the parts together 10 minutes ago. It needs some fine tuning to work with the German layout but I'm quite happy it works and I want to enjoy the sound of it for a while before I do anything else with it.
After plugging in the keyboard for the 1st time it kept repeating the keys I pressed, but that problem seems to be gone now. The second keyboard still shows up in the device manager but apparently that doesn't cause any problems.



Been using it for a while now with my XT Model F and loving it! Now, if I could only get it to work with my KVM switch, it would be the best thing ever. It just won't work though, I'm assuming it's because of how it achieves full NKRO. If there's a way to disable that I would be perfectly happy with the 6KRO USB provides anyway.

Hi guys, unfortunately Soarer disappeared last year and (as far as I know) no one knows what happened. I don't know enough about AVR programming to help either. Sorry about that.  :thumb:
Title: Re: XT/AT/PS2/Terminal to USB Converter with NKRO
Post by: fohat.digs on Sun, 13 December 2015, 18:10:17

unfortunately Soarer disappeared last year


I think it has been closer to 2 years. I just hope that he got a new girl friend and went off the grid in Pago Pago.

Title: Re: XT/AT/PS2/Terminal to USB Converter with NKRO
Post by: Blaise170 on Sun, 13 December 2015, 20:24:07

unfortunately Soarer disappeared last year


I think it has been closer to 2 years. I just hope that he got a new girl friend and went off the grid in Pago Pago.

Yep, last login August 2014 so over a year ago.
Title: Re: XT/AT/PS2/Terminal to USB Converter with NKRO
Post by: jiexi on Tue, 12 January 2016, 00:32:13
Just want to make sure, is this the most up-to-date soarer's mod thread? Can I use this with an IBM 5576-003? Can it be set to block obvious keychatter (double presses)?

Thanks!
Title: Re: XT/AT/PS2/Terminal to USB Converter with NKRO
Post by: Halvar on Thu, 14 January 2016, 15:50:22
@jiexy: This is the thread on Soarer's PS/2 to USB converter, there is also a keyboard controller by Soarer, but that's a different thread (https://geekhack.org/index.php?topic=50437.0).

You can probably use the converter with the 5576 since it has a PS/2 connector. That said, I haven't seen much talk about using it with JIS layout keyboards in this thread, so there might be problems we don't know about.

Keychatter is normally something that the original controller of the keyboard should take care of before producing PS/2 signals. The converter doesn't have a function for that IIRC.

If that's important to you, you should probably replace the original controller. You can use Soarer's controller instead, or there are also other alternative controller firmware source codes that can be compiled to run on Teensies or Arduinos. Soarer's controller is said to have good chatter control, and you can configure it without compiling.
Title: Re: XT/AT/PS2/Terminal to USB Converter with NKRO
Post by: Venatorious on Fri, 05 February 2016, 15:36:07
The kb is recognized in HID listen, but I can't get keypresses to register and all three LED lights are lit when I plug it in.

What did I do wrong?
Title: Re: XT/AT/PS2/Terminal to USB Converter with NKRO
Post by: Halvar on Fri, 05 February 2016, 16:12:46
Uh, no idea...

Can you check the keyboard with a different converter? Can you check the converter with a different keyboard?

What exactly does HID listen say?
Title: Re: XT/AT/PS2/Terminal to USB Converter with NKRO
Post by: Venatorious on Fri, 05 February 2016, 16:17:02
Says this:  https://gyazo.com/effc6cf004ed7f77dce424de33f88674

I can't really check the keyboard with a different converter, this is my last pro micro.   

Also, this time I plugged it in only the scroll lock LED was lit.
Title: Re: XT/AT/PS2/Terminal to USB Converter with NKRO
Post by: Halvar on Fri, 05 February 2016, 17:00:07
If it has LEDs, I assume it's not an XT keyboard, right? So it's actually not recognised correctly by the converter. It should say Code Set: 2 for an AT or PS/2 compatible board and Code set:3 for a terminal board.

First thing, check your cabling I'd say, especially clock vs. data.
Title: Re: XT/AT/PS2/Terminal to USB Converter with NKRO
Post by: Venatorious on Fri, 05 February 2016, 17:15:18
Switched out clock and data and the same thing happened except this time R05 appeared in the next line after PC/XT

Its a computerworld blue alps keyboard. 
Title: Re: XT/AT/PS2/Terminal to USB Converter with NKRO
Post by: Blaise170 on Tue, 09 February 2016, 14:44:23
Some keyboards have odd pinouts, for example the Leading Edge DC-2014. Maybe check the keyboard itself.
Title: Re: XT/AT/PS2/Terminal to USB Converter with NKRO
Post by: Venatorious on Tue, 09 February 2016, 20:31:12
Maybe check the keyboard itself.

How so?
Title: Re: XT/AT/PS2/Terminal to USB Converter with NKRO
Post by: Blaise170 on Tue, 09 February 2016, 20:40:40
Maybe check the keyboard itself.

How so?

I remember when I was trying to convert my Leading Edge that I had to physically check the PCB for what each wire was. Despite having the same DIN-5 connector as most other keyboards, each pin had a different function.
Title: Re: XT/AT/PS2/Terminal to USB Converter with NKRO
Post by: Venatorious on Wed, 10 February 2016, 11:56:58
What parts of the PCB told you function the wires assigned to? Sorry I don't know much about internal electronics.
Title: Re: XT/AT/PS2/Terminal to USB Converter with NKRO
Post by: simingma on Fri, 12 February 2016, 13:54:32
Can someone tell me why all the sudden my F122 converter (orihalcon) now only works in Linux, but not on windows or mac?

On windows the tools recognizes and programs the converter with no problem, but non of the keys will register in the OS.


----------------------
Problem solve..connector was loose :-[
Title: Re: XT/AT/PS2/Terminal to USB Converter with NKRO
Post by: buedi on Mon, 14 March 2016, 13:43:18
Hi everyone. I´m about to order such a converter which is using the Soarer Firmware.
To be more specific, it would be this one, because I want to use my Model F XT which is sitting here since a decade now. And finally I think I have the opportunity to use it (again).

http://www.ebay.com/itm/NEW-XT-AT-to-USB-Soarers-Converter-Remapping-Macros-NKRO-Support-IBM-Model-F/281476427201?_trksid=p2047675.c100005.m1851&_trkparms=aid=222007&algo=SIC.MBE&ao=1&asc=20131003132420&meid=5587ff37135243b78cbd3788a79c4493&pid=100005&rk=3&rkt=6&sd=271832202316#shpCntId

I´ve read the documentation and there´s a thing I don´t understand. Since I have a German Model F with special characters like äöüß which I cannot find in the code.html included in the Soarer software package, I fear I will not be able to use this converter with the Soarer Firmware at all. To me the code.html looks like the controller / firmware is limited just to the standard US ASCII character set.

Is someone here using this Software with special characters (finnish, german, french...) and can comment on that? IF it is not working... does someone have a good suggestion? It´s a shame. I have lots of Keyboards and the Model F XT with its massive steel backplate is my absolute favourite sounding keyboard ever :-)
Title: Re: XT/AT/PS2/Terminal to USB Converter with NKRO
Post by: Halvar on Tue, 15 March 2016, 05:44:11
@buedi: yes, I'm using a German layout.

The keyboard sends what is called "HID key scancodes" to the PC, not characters. Every key has a scan code. The operating system of the PC decides what characters or functions these scan codes represent by looking at the keyboard language table (that is different for every keyboard language)

Here's the list from the USB documentation in case you're interested: http://www.usb.org/developers/hidpage/Hut1_12v2.pdf (chapter 10)

For example, the scancode for the 7th key on the third row is 28. On an American keyboard, the OS translates this to "y", on a German one, it's converted to "z". Soarer calls this key "Y" because he goes by the (default) US standard.

Another example: The ";" key on Soarer's converter is the "ö" key on a German board.

So for all purposes of remapping in Soarer's converter, get yourself a picture of a US keyboard like this one:

(https://upload.wikimedia.org/wikipedia/commons/thumb/3/37/ANSI_Keyboard_Layout_Diagram_with_Form_Factor.svg/1280px-ANSI_Keyboard_Layout_Diagram_with_Form_Factor.svg.png)

and go by that.
Title: Re: XT/AT/PS2/Terminal to USB Converter with NKRO
Post by: buedi on Thu, 17 March 2016, 13:51:26
Halvar, thank you very much! And these are very good news for me. This means I could possibly use the Model F XT in the near future :-)
I´m strongly considering ordering such an adapter now. I only hope that the Keyboard still works. I never had the opportunity to test it. But it´s worth a shot. For me it´s the best sounding Keyboard I´ve ever heard and I´m happy I never threw it away.

The fact that the Soarer Firmware is very flexible should make it possible to map every Key I need on it. I was searching for a few weeks now for a new Keyboard, because my Acer with Alps Switches (it´s around 20 years old now) starts to make problems. And in the Office I´m using a Cherry G80-3000 which is also over 20 years old now (using and Adapter from DIN to PS/2 to USB) and it´s still working like a champ. My daily usage keyboards never had Windows / Menu Keys and since I can´t find a classic layout on the new Keyboards, I could even go wild and back even further in thime by using the Model F XT (I also have an Model F AT and a Model M, but it´s not the same).

Thanks again for your help, it´s highly appreciated :-)
Title: Re: XT/AT/PS2/Terminal to USB Converter with NKRO
Post by: Blaise170 on Thu, 17 March 2016, 18:49:38
Halvar, thank you very much! And these are very good news for me. This means I could possibly use the Model F XT in the near future :-)
I´m strongly considering ordering such an adapter now. I only hope that the Keyboard still works. I never had the opportunity to test it. But it´s worth a shot. For me it´s the best sounding Keyboard I´ve ever heard and I´m happy I never threw it away.

The fact that the Soarer Firmware is very flexible should make it possible to map every Key I need on it. I was searching for a few weeks now for a new Keyboard, because my Acer with Alps Switches (it´s around 20 years old now) starts to make problems. And in the Office I´m using a Cherry G80-3000 which is also over 20 years old now (using and Adapter from DIN to PS/2 to USB) and it´s still working like a champ. My daily usage keyboards never had Windows / Menu Keys and since I can´t find a classic layout on the new Keyboards, I could even go wild and back even further in thime by using the Model F XT (I also have an Model F AT and a Model M, but it´s not the same).

Thanks again for your help, it´s highly appreciated :-)

What kind of switches does that Acer use?
Title: Re: XT/AT/PS2/Terminal to USB Converter with NKRO
Post by: CreepyCarpet on Mon, 21 March 2016, 09:52:44
I have soldered a teensy 2.0 to my 122 key 1394017. I've flashed the firmware and the teensy shows up as a HID. But when i connect the teensy to the controller board the teensy stops showing up as a HID, using hid_listen i get error messages before the device disconnects. the errors I get are R04, R05 and R06. Does anybody have some possible solutions to the issue?

Title: Re: XT/AT/PS2/Terminal to USB Converter with NKRO
Post by: Halvar on Mon, 21 March 2016, 13:48:35
I don't know if this helps you or not, but you always connect the keyboard to the converter first, and then the converter to the computer. The converter software doesn't support hot-plugging on the PS/2 side at all. If you do it in the right order, what exactly does hid_listen show you when the converter is connected to the PC?
Title: Re: XT/AT/PS2/Terminal to USB Converter with NKRO
Post by: CreepyCarpet on Tue, 22 March 2016, 05:49:53
I don't know if this helps you or not, but you always connect the keyboard to the converter first, and then the converter to the computer. The converter software doesn't support hot-plugging on the PS/2 side at all. If you do it in the right order, what exactly does hid_listen show you when the converter is connected to the PC?

If I connect the teensy to my pc while the keyboard is also fully connected the device is never even registered. The errors I got was while trying to hotplug the keyboard to the teensy. I know the teensy is not dead since it registers as long as it is not connected to the keyboard.
Title: Re: XT/AT/PS2/Terminal to USB Converter with NKRO
Post by: Halvar on Tue, 22 March 2016, 14:44:20
Maybe a short-circuit that overloads the USB port and/or the teensy? The HID device should always be visible from the PC.

Did you recheck the wiring? Could some soldering point be in contact with another or something like that? 
Title: Re: XT/AT/PS2/Terminal to USB Converter with NKRO
Post by: CreepyCarpet on Wed, 23 March 2016, 07:40:02
Maybe a short-circuit that overloads the USB port and/or the teensy? The HID device should always be visible from the PC.

Did you recheck the wiring? Could some soldering point be in contact with another or something like that?

I have it working now!  :D I went through the DA thread and saw that a user named wcass had the same model as mine and that his wiring was different from mine. I then realized that I had wired it "backwards" because I looked at the RJ45 connecter upside-down when I looked up the schematics *facepalm*. Ohh well thanks for the help anyways!  :thumb:
Title: Re: XT/AT/PS2/Terminal to USB Converter with NKRO
Post by: itzmeluigi on Mon, 28 March 2016, 19:08:27
Does anyone know of a way to disable NKRO? I have my XT Z-150 up and running with a Pro Micro but sometimes when typing keypresses are missed. The Z-150 has NKRO over USB with the soarer converter but id like to disable it to see if NKRO is causing the keypresses being missed.
Title: Re: XT/AT/PS2/Terminal to USB Converter with NKRO
Post by: samwisekoi on Thu, 07 April 2016, 14:32:43
Memory Limitations: Teensy 2.0 vs. Teensy++ 2.0

I am currently controlling my F-122 with a Teensy 2.0, and to fit the whole map into available memory required me to scrimp and save every last char.  Has anyone else hit the memory limit?  More interestingly, has anyone tried to use the four times as much RAM in the Teensey++ to enable a larger map?

 - Ron | samwisekoi

p.s.  See the comparison chart about half-way down this page:  https://www.pjrc.com/teensy/index.html (https://www.pjrc.com/teensy/index.html)
Title: Re: XT/AT/PS2/Terminal to USB Converter with NKRO
Post by: Halvar on Sat, 09 April 2016, 02:27:26
I haven't (so perhaps I shouldn't answer) but I remember Soarer recommending the Teensy++ if you want more EEPROM space for larger maps, so I'm pretty sure it will work.
Title: Re: XT/AT/PS2/Terminal to USB Converter with NKRO
Post by: samwisekoi on Wed, 13 April 2016, 10:49:39
I haven't (so perhaps I shouldn't answer) but I remember Soarer recommending the Teensy++ if you want more EEPROM space for larger maps, so I'm pretty sure it will work.

Hey Halvar!

Thanks very much for the reply.  That is enough to encourage me to try soldering up a Teensy++ to give it a try.

 - Ron | samwisekoi
(Auto-typed by my GH36 Matrix Keypad.)
Title: Re: XT/AT/PS2/Terminal to USB Converter with NKRO
Post by: Mr. Perfect on Wed, 13 April 2016, 16:41:09
Hey, does anyone know if this works for ADB to USB? Soarer mentioned that he wanted to incorporate it, so I'm hoping he got around to it before disappearing.
Title: Re: XT/AT/PS2/Terminal to USB Converter with NKRO
Post by: fohat.digs on Wed, 13 April 2016, 18:43:01
That was Hasu's baby.

https://geekhack.org/index.php?topic=14290.msg277407#msg277407 (https://geekhack.org/index.php?topic=14290.msg277407#msg277407)
Title: Re: XT/AT/PS2/Terminal to USB Converter with NKRO
Post by: Mr. Perfect on Thu, 14 April 2016, 11:40:22
Okay, thanks.
Title: Re: XT/AT/PS2/Terminal to USB Converter with NKRO
Post by: mtdnelson on Tue, 21 June 2016, 16:57:17
So... I just read the whole thread, and only found out in the last ten minutes that Soarer has disappeared.    :(

Anyway, I acquired myself a small collection of 122-key model Ms, and an even smaller collection of later model M, with fewer keys... (11 keyboards in total, all for nothing!) I've cleaned and converted one of the 122-key terminal models, and it is great.

I have written myself a new keymap, but get this error when trying to flash it:
Code: [Select]
[nels@ella configs]$ scwr mtdnelson122.scb
scwr: error while loading shared libraries: libusb-0.1.so.4: cannot open shared object file: No such file or directory

I'm using Fedora 23, which seems to have libusb-0.5.
Code: [Select]
[nels@ella configs]$ sudo dnf info libusb
Last metadata expiration check: 0:04:58 ago on Tue Jun 21 20:54:02 2016.
Installed Packages
Name        : libusb
Arch        : x86_64
Epoch       : 1
Version     : 0.1.5
Release     : 6.fc23
Size        : 66 k

Has anyone got any suggestions? I guess I'll have to downgrade in some way... Not sure how at the moment.

<edit>If no-one comes up with something better, I guess I should find an older version of Ubuntu or something, and boot from USB...</edit>
Title: Re: XT/AT/PS2/Terminal to USB Converter with NKRO
Post by: mtdnelson on Wed, 22 June 2016, 16:57:16
I might have answered my own question.

I had this installed:

Code: [Select]
[nels@ella ~]$ sudo dnf list libusb
Last metadata expiration check: 2:33:42 ago on Wed Jun 22 20:13:31 2016.
Installed Packages
libusb.x86_64                                                                   1:0.1.5-6.fc23                                                                   @koji-override-0
Available Packages
libusb.i686                                                                     1:0.1.5-6.fc23                                                                   fedora         

So I installed the package for the i686 architecture alongside the other x86_64 one.

Code: [Select]
[nels@ella ~]$ sudo dnf install libusb.i686
Now, when I run the command to write the map file to the converter, it doesn't fail!

Code: [Select]
nels@ella configs]$ scwr mtdnelson122.scb
scwr v1.10
scwr: looking for Soarer's Converter: found
scwr: reading file: 6 bytes: ok
scwr: sending info request: ok
device: ok
protocol version check: converter=1.00, scwr=1.00: ok
settings version check: converter=1.01, file=1.01: ok
settings length check: max=1018, file=4 bytes: ok
scwr: sending write request for 4 bytes: ok
device: ok
device: ready
scwr: sending 4 bytes: ok
device: ok
device: complete

My next job is to make a much more complete and functional map...
Title: Re: XT/AT/PS2/Terminal to USB Converter with NKRO
Post by: DannyHuynh on Fri, 05 August 2016, 11:41:53
Hi, I purchased a Soarer's converter for my F 122 on eBay. When I plugged the adapter with the keyboard connected to it to the computer. There was a USB Power Surge notification. Does anybody has an idea if it's the converter problem or it's my keyboard problem. Is there any way to test the converter separately?
Title: Re: XT/AT/PS2/Terminal to USB Converter with NKRO
Post by: fohat.digs on Fri, 05 August 2016, 17:14:21
Hi, I purchased a Soarer's converter for my F 122 on eBay. When I plugged the adapter with the keyboard connected to it to the computer. There was a USB Power Surge notification. Does anybody has an idea if it's the converter problem or it's my keyboard problem. Is there any way to test the converter separately?

You should ask Orihalcon directly. He could probably answer better than anybody.
Title: Re: XT/AT/PS2/Terminal to USB Converter with NKRO
Post by: Halvar on Wed, 10 August 2016, 12:57:46
You can also plug in the converter without any keyboard connected to it, it should also register as a keyboard. If you don't get the warning without the keyboard then there's probably something wrong with the keyboard.

Model F keyboards use a lot of power compared to modern keyboards, but a USB port should always be able to handle it easily.
Title: Re: XT/AT/PS2/Terminal to USB Converter with NKRO
Post by: //gainsborough on Fri, 09 September 2016, 01:53:14
I've been trying to get the converter orihalcon made for the zentih z-10/dc-2014 for my zenith keyboard (http://www.ebay.com/itm/272328994093?_t ... BIDX%3AIT). I had previously given up trying to get it to work, but since I've got some spare time before I start teaching again I thought I'd dig a little deeper and see if I can solve the issue.

Originally it did work, but some key presses would be missed/skipped - but then the next morning it wouldn't register any keypresses at all. Confusingly, though, the lock lights come on, and even the beeper occasionally sounds. HID Listen recognizes they keyboard with an ID of 0000, with set code 1 in XT, which seems correct, but nothing comes up when I press any keys. The ID of 0000 seems off as well.

Anyone have any suggestions on what I can do?
Title: Re: XT/AT/PS2/Terminal to USB Converter with NKRO
Post by: Arhipio on Fri, 13 January 2017, 16:22:44
I'd like to do convert my g80-11900 from ps2 to usb using this converter method. The problem is that the g80 comes with a touchpad and I would like that be functional as well. How would I go about wiring that up to the teensy. Not sure if the firmware even supports mouse inputs.
Title: Re: XT/AT/PS2/Terminal to USB Converter with NKRO
Post by: fohat.digs on Fri, 13 January 2017, 18:30:53

I'd like to do convert my g80-11900 from ps2 to usb using this converter method.


I used something like this with no problems.

http://www.ebay.com/itm/Dual-PS2-Female-to-USB-Male-Converter-Adaptor-Cable-F-M-for-Mouse-KeyboaV1-/112241700551?hash=item1a22206ec7:g:DCIAAOSw44BYMtG8 (http://www.ebay.com/itm/Dual-PS2-Female-to-USB-Male-Converter-Adaptor-Cable-F-M-for-Mouse-KeyboaV1-/112241700551?hash=item1a22206ec7:g:DCIAAOSw44BYMtG8)
Title: Re: XT/AT/PS2/Terminal to USB Converter with NKRO
Post by: kobra182 on Mon, 23 January 2017, 23:38:52
Hello, i recently did a soarers convert with a teensy 2.0 on an ibm model m, but for some reason whenever i click the 8* button it spams itself until i click another key, is there a software problem or a problem in the actual keyboard?
Title: Re: XT/AT/PS2/Terminal to USB Converter with NKRO
Post by: invariance on Tue, 24 January 2017, 03:58:31
Hello, i recently did a soarers convert with a teensy 2.0 on an ibm model m, but for some reason whenever i click the 8* button it spams itself until i click another key, is there a software problem or a problem in the actual keyboard?

Sounds like a hardware fault.  Check the hammer and spring otherwise it might be time for a bolt/screw mod to check out the membranes and blanket.
Title: Re: XT/AT/PS2/Terminal to USB Converter with NKRO
Post by: subcat on Thu, 09 March 2017, 02:04:36
I am incredibly bad when it comes to anything programming related. i just got my converter, and I've followed the instructions for remapping keys, but when i try to drag the .sc file into scaswr.bat, it only puts it in the same folder, not actually uploading it. I am using notepad, if that means anything. Thanks! This is probably glaringly obvious.
Title: Re: XT/AT/PS2/Terminal to USB Converter with NKRO
Post by: Tactile on Thu, 09 March 2017, 07:05:27
I am incredibly bad when it comes to anything programming related. i just got my converter, and I've followed the instructions for remapping keys, but when i try to drag the .sc file into scaswr.bat, it only puts it in the same folder, not actually uploading it. I am using notepad, if that means anything. Thanks! This is probably glaringly obvious.

You can work around that problem by not using scaswr.bat and just doing the steps yourself. With your *.sc file in the same directory as the tools the commands would be:

scas myfile.sc myfile.scb
scwr myfile.scb

[EDIT]
Sorry for being incomplete. Obviously you must be in a terminal in that directory for that to work.
Title: Re: XT/AT/PS2/Terminal to USB Converter with NKRO
Post by: fohat.digs on Thu, 09 March 2017, 07:39:09
I follow the instructions by wcass in reply #560 and it has always worked for me, although I type in the instructions and don't mess with the paste and drop stuff.
Title: Re: XT/AT/PS2/Terminal to USB Converter with NKRO
Post by: buzzking00 on Wed, 15 March 2017, 01:11:35
Hey Soarer, which converter will I need for a WY-50 ASCII Terminal Keyboard?
Title: Re: XT/AT/PS2/Terminal to USB Converter with NKRO
Post by: invariance on Wed, 15 March 2017, 05:13:45
Hey Soarer, which converter will I need for a WY-50 ASCII Terminal Keyboard?


Soarer hasn't been around for a few years.
You will need his WysEverter (https://geekhack.org/index.php?topic=52597.0).
Title: Re: XT/AT/PS2/Terminal to USB Converter with NKRO
Post by: Honthro on Wed, 12 April 2017, 08:43:52
Hi guys. Just installed this for my Model F XT. Was surprised how easy it was to load. Now looking at remapping options for the XT's layout. Do you guys know any resources for this? Looking to see what other people have done with their XT to make them easier to use
Title: Re: XT/AT/PS2/Terminal to USB Converter with NKRO
Post by: Tactile on Wed, 12 April 2017, 08:58:56
Hi guys. Just installed this for my Model F XT. Was surprised how easy it was to load. Now looking at remapping options for the XT's layout. Do you guys know any resources for this? Looking to see what other people have done with their XT to make them easier to use

I've sold my XT and so don't have the layout files anymore but I turned my XT into essentially a 60% keyboard with F1-F12 across the number row. With that setup you now have all of the left hand F keys to do anything you want. Mine was very similar to a Pok3r layout with Home, End, Print Screen, Scroll lock, Pause, all in the same locations as a Pok3r.

I don't remember any more details of my setup but I'm sure you get the idea.
Title: Re: XT/AT/PS2/Terminal to USB Converter with NKRO
Post by: odysseusgiacosa on Fri, 23 June 2017, 06:00:12
Has anyone used Soarer's SDL to USB cable with an Asus Z97-K motherboard? Thank you.
Title: Re: XT/AT/PS2/Terminal to USB Converter with NKRO
Post by: Toysrfun on Fri, 30 June 2017, 12:01:31
Here is a link to a converter that works great a little pricey maybe around sixty usd maybe more if you live outside the United States of America but well worth the investment. This company has a ps2 to xt and a USB to xt also many other encoders for the mouse and keyboard amoung other items. You can also search their website they also have good customer support where you can ask them what you are looking for and they will tell you if they carry the item.

http://hagstromelectronics.com/products/ke_xtusb.html
Title: Re: XT/AT/PS2/Terminal to USB Converter with NKRO
Post by: PancakeMSTR on Sun, 02 July 2017, 12:20:08
Hi,
So I'm trying to convert a 1990 model M I have and I've installed soarer's firmware but things aren't working properly unfortunately. A number of keys are sending unidentified signals to the computer, and F1-F4 sends the F12 signal. Could anyone help me figure this out? I can't seem to get anywhere. Thanks.
Title: Re: XT/AT/PS2/Terminal to USB Converter with NKRO
Post by: invariance on Sun, 02 July 2017, 18:01:02
Hi,
So I'm trying to convert a 1990 model M I have and I've installed soarer's firmware but things aren't working properly unfortunately. A number of keys are sending unidentified signals to the computer, and F1-F4 sends the F12 signal. Could anyone help me figure this out? I can't seem to get anywhere. Thanks.
What does hidlisten tell you?


Sent from my iPhone using Tapatalk
Title: Re: XT/AT/PS2/Terminal to USB Converter with NKRO
Post by: PancakeMSTR on Sun, 02 July 2017, 22:12:05
HID Listen: http://imgur.com/a/UKzwP

Oh btw, the original cable on my Model M was an RT. Don't know if that helps.
Title: Re: XT/AT/PS2/Terminal to USB Converter with NKRO
Post by: fohat.digs on Mon, 03 July 2017, 07:35:25
After HID_listen finds the device, press the keys to see what they are saying.

Generally, as I recall, responses like "R05" and "R06" indicate errors.
Title: Re: XT/AT/PS2/Terminal to USB Converter with NKRO
Post by: PancakeMSTR on Mon, 03 July 2017, 11:23:17
Alright I'll try that. What can be done to fix the problem though?

Excluding the numpad, heres HID listen output for every row (top -> Bottom, RIGHT->LEFT).

Code: [Select]
Waiting for device:
Listening:
r62 +93
rF0 r62 -93
r5F +73
rF0 r5F -73
r57 +72
rF0 r57 -72
r5E +BD
rF0 r5E -BD
r5E +BD r56 +BC rF0 r5E -BD
rF0 r56 -BC
r4F +BB
rF0 r4F -BB
r47 +BA
rF0 r47 -BA
r3F +B9
rF0 r3F -B9
r37 +B8
rF0 r37 -B8
r2F +B7
rF0 r2F -B7
r27 +8C
rF0 r27 -8C
r1F +B2
rF0 r1F -B2
r17 +B0
rF0 r17 -B0
r0F +67
rF0 r0F -67
r07 +45
rF0 r07 -45
r08 +68
rF0 r08 -68
r6F +C1
rF0 r6F -C1
r6E +C0
rF0 r6E -C0
r67 +8B
rF0 r67 -8B
r66 +2A
rF0 r66 -2A
r55 +2E
rF0 r55 -2E
r4E +2D
rF0 r4E -2D
r45 +27
rF0 r45 -27
r46 +26
rF0 r46 -26
r3E +25
rF0 r3E -25
r3D +24
rF0 r3D -24
r36 +23
rF0 r36 -23
r2E +22
rF0 r2E -22
r25 +21
rF0 r25 -21
r26 +20
rF0 r26 -20
r1E +1F
rF0 r1E -1F
r16 +1E
rF0 r16 -1E
r0E +35
rF0 r0E -35
r6D +85
rF0 r6D -85
r65 +BF
rF0 r65 -BF
r64 +8A
rF0 r64 -8A
r5C +B5
rF0 r5C -B5
r5B +30
rF0 r5B -30
r54 +2F
rF0 r54 -2F
r4D +13
rF0 r4D -13
r44 +12
rF0 r44 -12
r43 +0C
rF0 r43 -0C
r3C +18
rF0 r3C -18
r35 +1C
rF0 r35 -1C
r2C +17
rF0 r2C -17
r2D +15
rF0 r2D -15
r24 +08
rF0 r24 -08
r1D +1A
rF0 r1D -1A
r15 +14
rF0 r15 -14
r0D +2B
rF0 r0D -2B
r5A +28
rF0 r5A -28
r52 +34
rF0 r52 -34
r4C +33
rF0 r4C -33
r4B +0F
rF0 r4B -0F
r42 +0E
rF0 r42 -0E
r3B +0D
rF0 r3B -0D
r33 +0B
rF0 r33 -0B
r34 +0A
rF0 r34 -0A
r2B +09
rF0 r2B -09
r23 +07
rF0 r23 -07
r1B +16
rF0 r1B -16
r1C +04
rF0 r1C -04
r14 +E0
rF0 r14 -E0
r63 +92
rF0 r63 -92
r59 +E5
rF0 r59 -E5
r4A +38
rF0 r4A -38
r49 +37
rF0 r49 -37
r41 +36
rF0 r41 -36
r3A +10
rF0 r3A -10
r31 +11
rF0 r31 -11
r32 +05
rF0 r32 -05
r2A +19
rF0 r2A -19
r21 +06
rF0 r21 -06
r22 +1B
rF0 r22 -1B
r1A +1D
rF0 r1A -1D
r12 +E1
rF0 r12 -E1
r6A +89
rF0 r6A -89
r60 +BE
rF0 r60 -BE
r61 +64
rF0 r61 -64
r58 +39 wED W105wED W105wED rFA w04 rFA
rF0 r58 -39
r39 +B3
rF0 r39 -B3
r29 +2C
rF0 r29 -2C
r19 +B1
rF0 r19 -B1
r11 +E2
rF0 r11 -E2
Device disconnected.
Waiting for new device:...........

Then here is the numpad, top->bottom, left->right

Code: [Select]
Waiting for device:
Listening:
R04 wFE
rF0 r76
r77 +53 wED W105wED W105wED R06 R106!!00rFA +00
wED rFA w01 rFA rF0 r77 -53
r7E +47 wED W105wED W105wED rFA w00 rFA
rF0 r7E -47
r84 +C2
rF0 r84 -C2
r6C +5F
rF0 r6C -5F
r75 +60
rF0 r75 -60
r7D +61
rF0 r7D -61
r7C +55
rF0 r7C -55
r6B +5C
rF0 r6B -5C
r73 +5D
rF0 r73 -5D
r74 +5E
rF0 r74 -5E
r69 +59
rF0 r69 -59
r72 +5A
rF0 r72 -5A
r7A +5B
rF0 r7A -5B
r79 +57
rF0 r79 -57
r70 +62
rF0 r70 -62
r71 +63
rF0 r71 -63

I appear to be getting errors on the RO6 errors on the numpad. I still don't know how to fix anything.
Title: Re: XT/AT/PS2/Terminal to USB Converter with NKRO
Post by: PancakeMSTR on Tue, 04 July 2017, 12:51:30
So the IBM Model M I'm trying to convert uses the RT connector. Soarer's converter is supposed to work with RT, but I can't get it to do so. How do you get Soarer's firmware to work with the RT model M?
Title: Re: XT/AT/PS2/Terminal to USB Converter with NKRO
Post by: Tactile on Tue, 04 July 2017, 14:16:13
So the IBM Model M I'm trying to convert uses the RT connector. Soarer's converter is supposed to work with RT, but I can't get it to do so. How do you get Soarer's firmware to work with the RT model M?

With HID Listen (https://www.pjrc.com/teensy/hid_listen.html) already running in a terminal, plug the keyboard in. The Soarer's should boot and give some info into HID Listen. Pay close attention to the lines beginning with "Code Set:" and "Mode:".

Here's the result as I plug in an IBM 42H1292 with Soarer's:
Code: [Select]
Waiting for device:..............
Listening:
wEE rEE wF2 rFA rAB r83

remaining: 0026
26@0008 macros
layerdefs: 00
max_layer: 00
total_macros: 03
alloc ok.


Keyboard ID: AB83
Code Set: 2 (extended)
Mode: AT/PS2

wED rFA w02 rFA
Title: Re: XT/AT/PS2/Terminal to USB Converter with NKRO
Post by: PancakeMSTR on Tue, 04 July 2017, 15:08:15
I posted, pretty extensively, the results of HID listen on the previous page. Here are just the results of plugging the keyboard in, though: http://imgur.com/a/UKzwP
Title: Re: XT/AT/PS2/Terminal to USB Converter with NKRO
Post by: Tactile on Tue, 04 July 2017, 15:17:44
I posted, pretty extensively, the results of HID listen on the previous page. Here are just the results of plugging the keyboard in, though: http://imgur.com/a/UKzwP

It looks to me like Soarer's does not see a keyboard connected. Keyboard ID:0000 and no "Mode:" line at all. Exactly what are your hardware connections between the keyboard controller and the Teensy(or whatever)?
Title: Re: XT/AT/PS2/Terminal to USB Converter with NKRO
Post by: PancakeMSTR on Tue, 04 July 2017, 20:08:45
I posted, pretty extensively, the results of HID listen on the previous page. Here are just the results of plugging the keyboard in, though: http://imgur.com/a/UKzwP

It looks to me like Soarer's does not see a keyboard connected. Keyboard ID:0000 and no "Mode:" line at all. Exactly what are your hardware connections between the keyboard controller and the Teensy(or whatever)?

I suppose. Some of the keys work though, in fact pretty much all of the alphas work perfectly. I just used the RT connector pinout diagram in the list posted in the beginning of this thread, and wired up only Data, clock, VCC, and ground to the appropriate teensy ports. I'll double check everything though.
Title: Re: XT/AT/PS2/Terminal to USB Converter with NKRO
Post by: hasu on Tue, 04 July 2017, 20:32:13
PancakeMSTR,
Are you sure using the latest version of firmware? According to version histroy only 1.11+ support RT.

And what model number is your keyboard? and posting pics of your converter would be useful to check your wiring and soldering doubly by others.
Title: Re: XT/AT/PS2/Terminal to USB Converter with NKRO
Post by: PancakeMSTR on Tue, 04 July 2017, 23:37:43
PancakeMSTR,
Are you sure using the latest version of firmware? According to version histroy only 1.11+ support RT.

And what model number is your keyboard? and posting pics of your converter would be useful to check your wiring and soldering doubly by others.

**** hasu you're right I was using the wrong firmware. I downloaded the TOP one thinking it was the right version, didn't realize LOWER was LATER.

I just loaded version 1.12 onto the teensy. It's working A LOT better. However I'm still having some issues. The ESC key doesn't work, though numlock thinks it's ESC. A few other problems as well. Generally everything to the right of F12 is ****ed up.

Any suggestions?

Actually Ins, Home, Pg up, del, end, pg down, and the arrow cluster are working fine. The numpad is borked, and print screen, scroll lock, and pause don't work either.

To be honest, the only keys that aren't currently functional that I actually care about are ESC and print screen.
Title: Re: XT/AT/PS2/Terminal to USB Converter with NKRO
Post by: fohat.digs on Wed, 05 July 2017, 12:16:50

The ESC key doesn't work, though numlock thinks it's ESC. A few other problems as well. Generally everything to the right of F12 is ****ed up.


Remember, Soarer originally began the project to use an IBM F AT in a conventional configuration, so Escape being on the numpad is natural.

I have never tried to use a Soarer's on a conventional PS/2-ANSI keyboard, what would be the point?

At any rate, it generally works out of the box converting non-ANSI layouts to ANSI.
 
Title: Re: XT/AT/PS2/Terminal to USB Converter with NKRO
Post by: PancakeMSTR on Wed, 05 July 2017, 15:03:12

The ESC key doesn't work, though numlock thinks it's ESC. A few other problems as well. Generally everything to the right of F12 is ****ed up.


Remember, Soarer originally began the project to use an IBM F AT in a conventional configuration, so Escape being on the numpad is natural.

I have never tried to use a Soarer's on a conventional PS/2-ANSI keyboard, what would be the point?

At any rate, it generally works out of the box converting non-ANSI layouts to ANSI.

Well the point is that my Model M is RT, not ansi. What SHOULD I be using to convert it, if not Soarer's firmware? How do I fix the layout?
Title: Re: XT/AT/PS2/Terminal to USB Converter with NKRO
Post by: fohat.digs on Wed, 05 July 2017, 17:05:42
I guess that I don't know what RT is, but in reply #560 (memorized the number because I have referred it so often) in this thread the ever-helpful wcass details an easy technique for re-mapping keys in the Teensy. You will need to use Soarer's codes posted in the docs.

Title: Re: XT/AT/PS2/Terminal to USB Converter with NKRO
Post by: hasu on Wed, 05 July 2017, 18:30:04
I found the remap guide reply and place a link here for sake of easy reference.
https://geekhack.org/index.php?topic=17458.msg708153#msg708153

I think you need to remap some keys on RT keyboard. Follow disourse about RT support around the post.
https://deskthority.net/workshop-f7/xt-at-ps2-terminal-to-usb-converter-with-nkro-t2510-210.html#p105239
Title: Re: XT/AT/PS2/Terminal to USB Converter with NKRO
Post by: PancakeMSTR on Wed, 05 July 2017, 19:37:59
Hasu and fohat - I'll look into that and get back to you. Thanks.
Title: Re: XT/AT/PS2/Terminal to USB Converter with NKRO
Post by: PancakeMSTR on Thu, 06 July 2017, 01:31:33
Okay Hasu and fohat - I managed, with the remap process, was able to fix the numpad enter, numpad +, numpad *, numpad /, and num lock.

However, I don't know how to fix numpad "-", Pause, Scroll lock, Print Screen, or ESC, because those aren't giving me any output. They send signals into the computer, I know because keyboardtester.com registers a keypress (though it doesn't indicate anything ACTUALLY being pressed), and also HID_Listen.exe sees something. But I don't know what it thinks those keys are. How do I fix these?

By the way thanks for the help. Saving my ****in life here.

Nevermind, got it. Figured out the part of the HID_Listen output are Hex codes. Used that to figure out what the keyboard was trying to send, then remap them. Damn guys, couldn't have done it without you. ****ing lifesavers.
Title: Re: XT/AT/PS2/Terminal to USB Converter with NKRO
Post by: fohat.digs on Thu, 06 July 2017, 17:03:11

However, I don't know how to fix numpad "-"
 

"EXTRA_SYSRQ" is one of the particularly obtuse ones.
Title: Re: XT/AT/PS2/Terminal to USB Converter with NKRO
Post by: PancakeMSTR on Fri, 07 July 2017, 02:24:29

However, I don't know how to fix numpad "-"
 

"EXTRA_SYSRQ" is one of the particularly obtuse ones.

The HID_Listen Hex code pointed to some language thing but I couldn't get the numpad "-" working even from that. It's the final enigma. I'll look into that.
Title: Re: XT/AT/PS2/Terminal to USB Converter with NKRO
Post by: invariance on Fri, 07 July 2017, 07:14:32

However, I don't know how to fix numpad "-"
 

"EXTRA_SYSRQ" is one of the particularly obtuse ones.

The HID_Listen Hex code pointed to some language thing but I couldn't get the numpad "-" working even from that. It's the final enigma. I'll look into that.


Particularly annoying when accustomed to using Alt+PrtScr to capture the active window, as I do a lot of at work, and that is the combination to produce EXTRA_SYSRQ.


For the numpad "-", wouldn't something like below resolve this?  (where x=the language number)
Code: [Select]
remapblock
  LANG_x PAD_MINUS
endblock
Title: Re: XT/AT/PS2/Terminal to USB Converter with NKRO
Post by: fohat.digs on Sun, 09 July 2017, 11:13:33

For the numpad "-", wouldn't something like below resolve this?  (where x=the language number)
Code: [Select]
remapblock
  LANG_x PAD_MINUS
endblock

I have not finalized my AT conversion, but on the F-122 you remap EXTRA_SYSRQ to PAD_MINUS and you are done.
Title: Re: XT/AT/PS2/Terminal to USB Converter with NKRO
Post by: Zobeid Zuma on Fri, 04 August 2017, 18:29:39
I got a XT keyboard and a converter off fleaBay, and happy to report they are working together now as expected.  (Typing on it right now, in fact!)  Next I am trying to figure out the configuration software.  At the moment I'm running it on a Ubuntu system, although I also have a Mac and a Windows system here in case either of those might be easier to work with.  On Linux I figured the first thing to try would be the "scinfo" tool.  Then I get this:

./scinfo: error while loading shared libraries: libusb-0.1.so.4: cannot open shared object file: No such file or directory

Hmm...   Is my system missing a package that these tools expect to be present?  I tried searching the forum to see if anyone else ran into this, but I didn`t turn up anything.
Title: Re: XT/AT/PS2/Terminal to USB Converter with NKRO
Post by: adiron on Fri, 11 August 2017, 03:40:42
Great converter! Works great on this old DIN 5-pin keyboard I salvaged. Thanks a lot!

One question though, has anybody ever had issues with the right control (which reads "Enter" on this keyboard actually) releasing too late when held for a long time? I wonder if this is a thing about the keyboard itself or if this is something that the firmware can somehow solve...

What happens is that after pressing down RCTRL for >1s or so, the key up event is delayed ~250ms. If I open up hid_listen, I can see the delay there, too (which leads me to think that maybe the keyboard is just sending it late?...)
Title: Re: XT/AT/PS2/Terminal to USB Converter with NKRO
Post by: invariance on Fri, 11 August 2017, 18:01:38
Great converter! Works great on this old DIN 5-pin keyboard I salvaged. Thanks a lot!

One question though, has anybody ever had issues with the right control (which reads "Enter" on this keyboard actually) releasing too late when held for a long time? I wonder if this is a thing about the keyboard itself or if this is something that the firmware can somehow solve...

What happens is that after pressing down RCTRL for >1s or so, the key up event is delayed ~250ms. If I open up hid_listen, I can see the delay there, too (which leads me to think that maybe the keyboard is just sending it late?...)

Does sound like a feature of the keyboard's controller, especially if it is designed for a specific system.
Does it do it for any other keys?
Title: Re: XT/AT/PS2/Terminal to USB Converter with NKRO
Post by: adiron on Sat, 12 August 2017, 01:29:04
Great converter! Works great on this old DIN 5-pin keyboard I salvaged. Thanks a lot!

One question though, has anybody ever had issues with the right control (which reads "Enter" on this keyboard actually) releasing too late when held for a long time? I wonder if this is a thing about the keyboard itself or if this is something that the firmware can somehow solve...

What happens is that after pressing down RCTRL for >1s or so, the key up event is delayed ~250ms. If I open up hid_listen, I can see the delay there, too (which leads me to think that maybe the keyboard is just sending it late?...)

Does sound like a feature of the keyboard's controller, especially if it is designed for a specific system.
Does it do it for any other keys?

No other keys that I managed to find.

Some hid_listen output from pressing down RCTRL a few times:

Code: [Select]
rF0 r58 -E4 uE4
r58 +E4 dE4
rF0 r58 -E4 uE4 r58 +E4 dE4
rF0 r58 -E4 uE4

No idea what's going on. Maybe there's a magic keybinding I can somehow type in to get rid of this?
Title: Re: XT/AT/PS2/Terminal to USB Converter with NKRO
Post by: invariance on Sat, 12 August 2017, 04:12:10
This is what I get
Code: [Select]
rE0 r14 +E0 dE4
rE0 rF0 r14 -E0 uE4
which corresponds to the scancode translation table (https://geekhack.org/www.hiemalis.org/~keiji/PC/scancode-translate.pdf).

According to the table, you are making and breaking the caps lock (ps2 scan code 58) which is being translated to RCtrl (HID E4): weird.

Maybe try reloading the firmware.
Also what board do you have?
Title: Re: XT/AT/PS2/Terminal to USB Converter with NKRO
Post by: adiron on Sat, 12 August 2017, 06:54:21
I'm using an Arduino Leonardo (I had one lying around). I can't seem to reflash it (won't show up as a serial device?), so there's that

Edit: binding "boot" to a macro doesn't work either.
Title: Re: XT/AT/PS2/Terminal to USB Converter with NKRO
Post by: invariance on Sat, 12 August 2017, 08:05:30
I have been using Arduino Builder (Windows environ) and it took a while for me to find the sweet spot between pressing the bootloader button on the leonardo and pressing 'start' (actually COM3) in Arduino Builder: about 3 seconds actually.
Could be similar with your loading s/w.
Title: Re: XT/AT/PS2/Terminal to USB Converter with NKRO
Post by: adiron on Sat, 12 August 2017, 08:59:07
No idea, but I'm not getting a serial device. Anyway, sticky right ctrl still a thing :p


Edit: I'll have to get a USB programmer thing. No worries
Title: Re: XT/AT/PS2/Terminal to USB Converter with NKRO
Post by: Giorgio on Mon, 14 August 2017, 03:29:48
What a shame that Soarer has disappeared from the keyboard communities. He gave us a great firmware, too bad that there's no source. I wonder what could have made him so angry.
Title: Re: XT/AT/PS2/Terminal to USB Converter with NKRO
Post by: adiron on Fri, 18 August 2017, 13:59:08
too bad that there's no source.


Source would have solved a lot of issues I think :(
Title: Re: XT/AT/PS2/Terminal to USB Converter with NKRO
Post by: Giorgio on Sun, 20 August 2017, 01:22:08
too bad that there's no source.


Source would have solved a lot of issues I think :(

Why don't we pay a real programmer to do the same job? A kick starter with a 5000 USD target?
Title: Re: XT/AT/PS2/Terminal to USB Converter with NKRO
Post by: bachamn on Wed, 01 November 2017, 20:11:19
I recently bought one of Soarer's cables and have successfully remapped almost all of the keys I needed to make my terminal board (1390670) run normally, but I'm having a similar issue as PancakeMSTR when trying to map ESC key.

By default, the physical ESC key sends F13 code, and Numlock sends ESC code (as follows)
Code: [Select]
ESC
r76 +29 d29
rF0 r76 -29 u29

F13
r08 +68 d68
rF0 r08 -68 u68

The following codes are sent after I remap these two keys as denoted

Code: [Select]
ESC NUM_LOCK
r76 +29 d53 wED rFA w05 rFA
rF0 r76 -29 u53

F13 ESC
r08 +68 d29
rF0 r08 -68 u29

Interestingly despite still returning +29 and the extra wonky code it spits out, the remapped NUM_LOCK does work, but ESC does not want to remap, as you can see it's still registering +68. It is clearly doing something, as I noticed it's appending 'd29' and 'u29' to the end of those lines instead of 'd68' and 'u68', so it seems that maybe it's just getting scrambled?

Bummed to see the creator isn't in the community anymore. Is there another way to manually modify the codes that are used by the device? Firmware? (is it even possible to flash firmware update to one of the cables? everything I've read so far refers only to flashing the teensy boards)
Title: Problems with XT Keyboards
Post by: pivanow on Thu, 15 February 2018, 19:20:27
Hi guys,

I'm testing the Soaror's Converter and it's working fine with AT keyboards. But none of my XT keyboards are working. Just a lot of R05 and R06 errors...

Do you have any sugestion? All the keyboards work fine in various IBM XT Clones I have.

Thank you.

[attachimg=1]
Title: Re: Problems with XT Keyboards
Post by: Tactile on Thu, 15 February 2018, 19:55:00
Hi guys,

I'm testing the Soaror's Converter and it's working fine with AT keyboards. But none of my XT keyboards are working. Just a lot of R05 and R06 errors...

Do you have any sugestion? All the keyboards work fine in various IBM XT Clones I have.

Thank you.

(Attachment Link)

I'd try adding pull-up resistors to the clock & data wires.
Title: Re: XT/AT/PS2/Terminal to USB Converter with NKRO
Post by: pivanow on Wed, 21 February 2018, 12:34:24
I'd try adding pull-up resistors to the clock & data wires.

No way, even with resistors...

I've found an AT2XT adaptor here. Soaror's Converter recoginizes an AT keyboard with the AT2XT adaptor as a XT keyboard (as expected), and it works perfectly!

So, I've gotten very curious to understand why the AT2XT adaptor works but the original XT keyboard doesn't.

Trying to remember how to use an osciloscope, I've gotten some waveforms. The first picture contains the AT2XT waveforms when "a" and "s" are pressed in the keyboard. It looks compatible with XT IBM Keyboard Protocol.

[attachimg=1]

The second picture contains the XT pure keyboard waveforms when "a" and "s" are pressed. The clock seems to be higher and we can see only 8 bits, not 9 as it was supposed to be.

[attachimg=2]

I guess that's why the Soaror's converter is not recognizing my XT keyboards.

Do you thing I will have to write a specific code for converting my XT keyboards or it may exist another solution?
Title: Re: XT/AT/PS2/Terminal to USB Converter with NKRO
Post by: Giorgio on Wed, 21 February 2018, 18:53:27
No way, even with resistors...

I've found an AT2XT adaptor here. Soaror's Converter recoginizes an AT keyboard with the AT2XT adaptor as a XT keyboard (as expected), and it works perfectly!

So, I've gotten very curious to understand why the AT2XT adaptor works but the original XT keyboard doesn't.

Trying to remember how to use an osciloscope, I've gotten some waveforms. The first picture contains the AT2XT waveforms when "a" and "s" are pressed in the keyboard. It looks compatible with XT IBM Keyboard Protocol.

(Attachment Link)

The second picture contains the XT pure keyboard waveforms when "a" and "s" are pressed. The clock seems to be higher and we can see only 8 bits, not 9 as it was supposed to be.

(Attachment Link)

I guess that's why the Soaror's converter is not recognizing my XT keyboards.

Do you thing I will have to write a specific code for converting my XT keyboards or it may exist another solution?

Soarer won't help in case anyone is wondering :-)
Title: Re: XT/AT/PS2/Terminal to USB Converter with NKRO
Post by: hasu on Thu, 22 February 2018, 20:17:45
No way, even with resistors...

I've found an AT2XT adaptor here. Soaror's Converter recoginizes an AT keyboard with the AT2XT adaptor as a XT keyboard (as expected), and it works perfectly!

So, I've gotten very curious to understand why the AT2XT adaptor works but the original XT keyboard doesn't.

Trying to remember how to use an osciloscope, I've gotten some waveforms. The first picture contains the AT2XT waveforms when "a" and "s" are pressed in the keyboard. It looks compatible with XT IBM Keyboard Protocol.

(Attachment Link)

The second picture contains the XT pure keyboard waveforms when "a" and "s" are pressed. The clock seems to be higher and we can see only 8 bits, not 9 as it was supposed to be.

(Attachment Link)

I guess that's why the Soaror's converter is not recognizing my XT keyboards.

Do you thing I will have to write a specific code for converting my XT keyboards or it may exist another solution?

What model is actually your "XT pure keyboard"?
It waveform has no start bit which is expected in original XT. You can see this post for normal XT signal.
https://geekhack.org/index.php?topic=62168.msg1469706#msg1469706

And is this AT2XT adapter you are refering to?
http://www.vcfed.org/forum/showthread.php?26426-AT2XT-keyboard-converter
Title: Re: XT/AT/PS2/Terminal to USB Converter with NKRO
Post by: pivanow on Sat, 24 February 2018, 13:20:30
What model is actually your "XT pure keyboard"?
It waveform has no start bit which is expected in original XT. You can see this post for normal XT signal.
https://geekhack.org/index.php?topic=62168.msg1469706#msg1469706

I actually don't know. I've tested four diferent XT keyboards and all of them present the same waveform, without start bit. Maybe it's a singular caracteristic of Brazilian keyboards. The strange about this is that I have some Juko motherboards with 8088 and NEC V20 processors, and they work fine with my XT keyboards.

And is this AT2XT adapter you are refering to?
http://www.vcfed.org/forum/showthread.php?26426-AT2XT-keyboard-converter

Yes. And it works fine with my Juko motherboards and other XT ones.

Well, this week I've tried stop crying and wrote a code for Teensy 2.0++ using Teensyduino, for decode my XT keyboards.
I've had some problems with the code, because the processor is not fast and some operations in the program were causing clock pulses loss. After some tries, I guess the code is mature, and I'm actually typing with a XT clicky keyboard in my Win 10 now.

It`s here as a contribution for the community. Free for copy, re-use and distribution.

Code: [Select]
//Brazilian XT Keyboard to USB Converter 1.0 - 8 bits protocol (no start bit).
//Developed by Leandro Piva (pivanow at gmail dot com), from Brazil, for Teensy 2.0++ using Teensyduino.
//Tested and working fine with keyboards presenting 17.5kHz clock. Higher clock keyboards may suffer with clock pulses loss.
//Free for copy, re-use and distribution.

#define CPU_PRESCALE(n) (CLKPR = 0x80, CLKPR = (n))
#define CPU_16MHz       0x00

int dataPin = 0; // Data line connected to PD0 in Teensy 2.0++
int clockPin = 1; // Clock line connected to PD1 in Teensy 2.0++
int clockDown = 0;
int count = 0;
byte data = 00;

void setup() {
  CPU_PRESCALE(CPU_16MHz);
  pinMode(dataPin, INPUT);
  pinMode(clockPin, INPUT);
  Serial.begin(2000000); // Use Serial Monitor from Arduino IDE (with Teensyduino) to see the scancodes sent from keyboard
}

void loop() {
  if(digitalRead(clockPin) == LOW) {
    clockDown = 1;
  }
  if(digitalRead(clockPin) == HIGH && clockDown == 1 && count <= 7) {
    clockDown = 0;
    if(digitalRead(dataPin) == HIGH) {
       bitSet(data,count);
    }
    count++;
  }
  if(count == 8){
   
    Serial.println(data);
       
    // Scan-code Set 1 structure for sending USB keyboard command to the computer.
    switch(data){
      case 1: Keyboard.press(KEY_ESC); break;
      case 2: Keyboard.press(KEY_1); break;
      case 3: Keyboard.press(KEY_2); break;
      case 4: Keyboard.press(KEY_3); break;
      case 5: Keyboard.press(KEY_4); break;
      case 6: Keyboard.press(KEY_5); break;
      case 7: Keyboard.press(KEY_6); break;
      case 8: Keyboard.press(KEY_7); break;
      case 9: Keyboard.press(KEY_8); break;
      case 10: Keyboard.press(KEY_9); break;
      case 11: Keyboard.press(KEY_0); break;
      case 12: Keyboard.press(KEY_MINUS); break;
      case 13: Keyboard.press(KEY_EQUAL); break;
      case 14: Keyboard.press(KEY_BACKSPACE); break;
      case 15: Keyboard.press(KEY_TAB); break;
      case 16: Keyboard.press(KEY_Q); break;
      case 17: Keyboard.press(KEY_W); break;
      case 18: Keyboard.press(KEY_E); break;
      case 19: Keyboard.press(KEY_R); break;
      case 20: Keyboard.press(KEY_T); break;
      case 21: Keyboard.press(KEY_Y); break;
      case 22: Keyboard.press(KEY_U); break;
      case 23: Keyboard.press(KEY_I); break;
      case 24: Keyboard.press(KEY_O); break;
      case 25: Keyboard.press(KEY_P); break;
      case 26: Keyboard.press(KEY_LEFT_BRACE); break;
      case 27: Keyboard.press(KEY_RIGHT_BRACE); break;
      case 28: Keyboard.press(KEY_ENTER); break;
      case 29: Keyboard.press(MODIFIERKEY_CTRL); break;
      case 30: Keyboard.press(KEY_A); break;
      case 31: Keyboard.press(KEY_S); break;
      case 32: Keyboard.press(KEY_D); break;
      case 33: Keyboard.press(KEY_F); break;
      case 34: Keyboard.press(KEY_G); break;
      case 35: Keyboard.press(KEY_H); break;
      case 36: Keyboard.press(KEY_J); break;
      case 37: Keyboard.press(KEY_K); break;
      case 38: Keyboard.press(KEY_L); break;
      case 39: Keyboard.press(KEY_SEMICOLON); break;
      case 40: Keyboard.press(KEY_QUOTE); break;
      case 41: Keyboard.press(KEY_TILDE); break;
      case 42: Keyboard.press(MODIFIERKEY_SHIFT); break;
      case 43: Keyboard.press(KEY_BACKSLASH); break;
      case 44: Keyboard.press(KEY_Z); break;
      case 45: Keyboard.press(KEY_X); break;
      case 46: Keyboard.press(KEY_C); break;
      case 47: Keyboard.press(KEY_V); break;
      case 48: Keyboard.press(KEY_B); break;
      case 49: Keyboard.press(KEY_N); break;
      case 50: Keyboard.press(KEY_M); break;
      case 51: Keyboard.press(KEY_COMMA); break;
      case 52: Keyboard.press(KEY_PERIOD); break;
      case 53: Keyboard.press(KEY_SLASH); break;
      case 54: Keyboard.press(MODIFIERKEY_RIGHT_SHIFT); break;
      case 55: Keyboard.press(KEYPAD_ASTERIX); break;
      case 56: Keyboard.press(MODIFIERKEY_ALT); break;
      case 57: Keyboard.press(KEY_SPACE); break;
      case 58: Keyboard.press(KEY_CAPS_LOCK); break;
      case 59: Keyboard.press(KEY_F1); break;
      case 60: Keyboard.press(KEY_F2); break;
      case 61: Keyboard.press(KEY_F3); break;
      case 62: Keyboard.press(KEY_F4); break;
      case 63: Keyboard.press(KEY_F5); break;
      case 64: Keyboard.press(KEY_F6); break;
      case 65: Keyboard.press(KEY_F7); break;
      case 66: Keyboard.press(KEY_F8); break;
      case 67: Keyboard.press(KEY_F9); break;
      case 68: Keyboard.press(KEY_F10); break;
      case 69: Keyboard.press(KEY_NUM_LOCK); break;
      case 70: Keyboard.press(KEY_SCROLL_LOCK); break;
      case 71: Keyboard.press(KEYPAD_7); break;
      case 72: Keyboard.press(KEYPAD_8); break;
      case 73: Keyboard.press(KEYPAD_9); break;
      case 74: Keyboard.press(KEYPAD_MINUS); break;
      case 75: Keyboard.press(KEYPAD_4); break;
      case 76: Keyboard.press(KEYPAD_5); break;
      case 77: Keyboard.press(KEYPAD_6); break;
      case 78: Keyboard.press(KEYPAD_PLUS); break;
      case 79: Keyboard.press(KEYPAD_1); break;
      case 80: Keyboard.press(KEYPAD_2); break;
      case 81: Keyboard.press(KEYPAD_3); break;
      case 82: Keyboard.press(KEYPAD_0); break;
      case 83: Keyboard.press(KEYPAD_PERIOD); break;
      case 87: Keyboard.press(KEY_F11); break;
      case 88: Keyboard.press(KEY_F12); break;

      case 129: Keyboard.release(KEY_ESC); break;
      case 130: Keyboard.release(KEY_1); break;
      case 131: Keyboard.release(KEY_2); break;
      case 132: Keyboard.release(KEY_3); break;
      case 133: Keyboard.release(KEY_4); break;
      case 134: Keyboard.release(KEY_5); break;
      case 135: Keyboard.release(KEY_6); break;
      case 136: Keyboard.release(KEY_7); break;
      case 137: Keyboard.release(KEY_8); break;
      case 138: Keyboard.release(KEY_9); break;
      case 139: Keyboard.release(KEY_0); break;
      case 140: Keyboard.release(KEY_MINUS); break;
      case 141: Keyboard.release(KEY_EQUAL); break;
      case 142: Keyboard.release(KEY_BACKSPACE); break;
      case 143: Keyboard.release(KEY_TAB); break;
      case 144: Keyboard.release(KEY_Q); break;
      case 145: Keyboard.release(KEY_W); break;
      case 146: Keyboard.release(KEY_E); break;
      case 147: Keyboard.release(KEY_R); break;
      case 148: Keyboard.release(KEY_T); break;
      case 149: Keyboard.release(KEY_Y); break;
      case 150: Keyboard.release(KEY_U); break;
      case 151: Keyboard.release(KEY_I); break;
      case 152: Keyboard.release(KEY_O); break;
      case 153: Keyboard.release(KEY_P); break;
      case 154: Keyboard.release(KEY_LEFT_BRACE); break;
      case 155: Keyboard.release(KEY_RIGHT_BRACE); break;
      case 156: Keyboard.release(KEY_ENTER); break;
      case 157: Keyboard.release(MODIFIERKEY_CTRL); break;
      case 158: Keyboard.release(KEY_A); break;
      case 159: Keyboard.release(KEY_S); break;
      case 160: Keyboard.release(KEY_D); break;
      case 161: Keyboard.release(KEY_F); break;
      case 162: Keyboard.release(KEY_G); break;
      case 163: Keyboard.release(KEY_H); break;
      case 164: Keyboard.release(KEY_J); break;
      case 165: Keyboard.release(KEY_K); break;
      case 166: Keyboard.release(KEY_L); break;
      case 167: Keyboard.release(KEY_SEMICOLON); break;
      case 168: Keyboard.release(KEY_QUOTE); break;
      case 169: Keyboard.release(KEY_TILDE); break;
      case 170: Keyboard.release(MODIFIERKEY_SHIFT); break;
      case 171: Keyboard.release(KEY_BACKSLASH); break;
      case 172: Keyboard.release(KEY_Z); break;
      case 173: Keyboard.release(KEY_X); break;
      case 174: Keyboard.release(KEY_C); break;
      case 175: Keyboard.release(KEY_V); break;
      case 176: Keyboard.release(KEY_B); break;
      case 177: Keyboard.release(KEY_N); break;
      case 178: Keyboard.release(KEY_M); break;
      case 179: Keyboard.release(KEY_COMMA); break;
      case 180: Keyboard.release(KEY_PERIOD); break;
      case 181: Keyboard.release(KEY_SLASH); break;
      case 182: Keyboard.release(MODIFIERKEY_RIGHT_SHIFT); break;
      case 183: Keyboard.release(KEYPAD_ASTERIX); break;
      case 184: Keyboard.release(MODIFIERKEY_ALT); break;
      case 185: Keyboard.release(KEY_SPACE); break;
      case 186: Keyboard.release(KEY_CAPS_LOCK); break;
      case 187: Keyboard.release(KEY_F1); break;
      case 188: Keyboard.release(KEY_F2); break;
      case 189: Keyboard.release(KEY_F3); break;
      case 190: Keyboard.release(KEY_F4); break;
      case 191: Keyboard.release(KEY_F5); break;
      case 192: Keyboard.release(KEY_F6); break;
      case 193: Keyboard.release(KEY_F7); break;
      case 194: Keyboard.release(KEY_F8); break;
      case 195: Keyboard.release(KEY_F9); break;
      case 196: Keyboard.release(KEY_F10); break;
      case 197: Keyboard.release(KEY_NUM_LOCK); break;
      case 198: Keyboard.release(KEY_SCROLL_LOCK); break;
      case 199: Keyboard.release(KEYPAD_7); break;
      case 200: Keyboard.release(KEYPAD_8); break;
      case 201: Keyboard.release(KEYPAD_9); break;
      case 202: Keyboard.release(KEYPAD_MINUS); break;
      case 203: Keyboard.release(KEYPAD_4); break;
      case 204: Keyboard.release(KEYPAD_5); break;
      case 205: Keyboard.release(KEYPAD_6); break;
      case 206: Keyboard.release(KEYPAD_PLUS); break;
      case 207: Keyboard.release(KEYPAD_1); break;
      case 208: Keyboard.release(KEYPAD_2); break;
      case 209: Keyboard.release(KEYPAD_3); break;
      case 210: Keyboard.release(KEYPAD_0); break;
      case 211: Keyboard.release(KEYPAD_PERIOD); break;
      case 215: Keyboard.release(KEY_F11); break;
      case 216: Keyboard.release(KEY_F12); break;
    }
    count = 0;
    data = 00;
  }
}

P.S.: Here is a picture of one of my "made in Brazil" XT keyboards. Made in 1987, perfect working.

[attachimg=1]
Title: Re: XT/AT/PS2/Terminal to USB Converter with NKRO
Post by: Techno Trousers on Sat, 24 February 2018, 15:22:35


P.S.: Here is a picture of one of my "made in Brazil" XT keyboards. Made in 1987, perfect working.

(Attachment Link)

Wow, that is the most usable version of an XT layout I've ever seen!
Title: Re: XT/AT/PS2/Terminal to USB Converter with NKRO
Post by: Giorgio on Sat, 24 February 2018, 17:41:17
@pivanow

Pardon my ignorance, but why don't you invest some time in writing some code with the same functionalities of soarer's?

I'm sure that many would like to kickstart such a feature.
Title: Re: XT/AT/PS2/Terminal to USB Converter with NKRO
Post by: pivanow on Sun, 25 February 2018, 07:15:09
Wow, that is the most usable version of an XT layout I've ever seen!

It's similar to IBM model F, I guess. I miss F11 and F12 (specially F11, because of its browser fullscreen function; maybe I will program the Scroll Lock key to have F11 function). CTRL and ALT positions are strange compared to modern layouts too. I'll take some time to get used to.

@pivanow

Pardon my ignorance, but why don't you invest some time in writing some code with the same functionalities of soarer's?

I'm sure that many would like to kickstart such a feature.

That's a good idea. But it will be hard to develop all functions that Soarer gently made. His converter offers support to many kinds of different keyboards, and most of them I have no acess. I've never ever seen an original IBM model F or model M here in Brazil.
Title: Re: XT/AT/PS2/Terminal to USB Converter with NKRO
Post by: fohat.digs on Sun, 25 February 2018, 08:59:26

it will be hard to develop all functions that Soarer gently made.


Soarer's work is astonishing. With very few exceptions, almost EVERY keyboard that I plug into my converter *just works* with no additional drama.
Title: Re: XT/AT/PS2/Terminal to USB Converter with NKRO
Post by: pivanow on Sun, 25 February 2018, 17:09:55

Soarer's work is astonishing. With very few exceptions, almost EVERY keyboard that I plug into my converter *just works* with no additional drama.

I agree. But some issues make me think if it's invalid trying to develop a new converter:

1) Teensy 2.0 and Teensy 2.0++ won't be avaliable forever. In some years, maybe it could be difficult to find this hardware for running Soarer's application.

2) Even if most keyboards are supported by Soarer's Converter, some keyboards are not, like mine. A person without knowledge, equipment, time and good will could simply turn a good unsupported keyboard into trash.

3) These problems would be solved if Soarer had released the source-code of his converter. Community would have conditions to expand the supported formats and to create versions for newer hardware. I don't believe Soarer is going to release the source-code some day.

That's why I guess it would be convenient to develop a newer open-source converter.
Title: Re: XT/AT/PS2/Terminal to USB Converter with NKRO
Post by: hasu on Wed, 28 February 2018, 02:07:58
I'd try adding pull-up resistors to the clock & data wires.

No way, even with resistors...

I've found an AT2XT adaptor here. Soaror's Converter recoginizes an AT keyboard with the AT2XT adaptor as a XT keyboard (as expected), and it works perfectly!

So, I've gotten very curious to understand why the AT2XT adaptor works but the original XT keyboard doesn't.

Trying to remember how to use an osciloscope, I've gotten some waveforms. The first picture contains the AT2XT waveforms when "a" and "s" are pressed in the keyboard. It looks compatible with XT IBM Keyboard Protocol.

(Attachment Link)

The second picture contains the XT pure keyboard waveforms when "a" and "s" are pressed. The clock seems to be higher and we can see only 8 bits, not 9 as it was supposed to be.

(Attachment Link)

I guess that's why the Soaror's converter is not recognizing my XT keyboards.

Do you thing I will have to write a specific code for converting my XT keyboards or it may exist another solution?

I did some researches on XT keyboard protocol including Soarer's converter these a few days.
https://github.com/tmk/tmk_keyboard/wiki/IBM-PC-XT-Keyboard-Protocol

Noticed your keyboard(microtec) has different timing on its signaling, but it is compatible to XT protocol.
After emulating different XT keyboard signals with tweaking AT2XT code I came to think Soarer's converter read data line on rising edge of clock and this is problem here. (Also my tmk converter does wrongly at this point :p)

Looking into keyboard interface schematic of XT technical reference  you will know you have to read data line on falling edge of clock.
https://github.com/tmk/tmk_keyboard/wiki/IBM-PC-XT-Keyboard-Protocol#xt-keyboard-interface

I know you already solved this progblem yourself, congrat!
But it would be appreciated if you are willing to try my new converter firmware and let me know whether it works with the keyboard or not.
Attached firmware is built for Teensy2.0++ and compatible to Soarer's in terms of hardware. Thanks.
[attachurl=1]
Title: Re: XT/AT/PS2/Terminal to USB Converter with NKRO
Post by: pivanow on Wed, 28 February 2018, 17:36:02
Noticed your keyboard(microtec) has different timing on its signaling, but it is compatible to XT protocol.
After emulating different XT keyboard signals with tweaking AT2XT code I came to think Soarer's converter read data line on rising edge of clock and this is problem here. (Also my tmk converter does wrongly at this point :p)

That's a totally different way of thinking, and it makes sense. My code is using the rising edge of clock too. I'll try to implement a new code this weekend using this new paradigm.

I know you already solved this progblem yourself, congrat!
But it would be appreciated if you are willing to try my new converter firmware and let me know whether it works with the keyboard or not.
Attached firmware is built for Teensy2.0++ and compatible to Soarer's in terms of hardware. Thanks.

It worked for my Microtec keyboard, but not perfectly. All keys worked, but some press or release codes are frequently lost, resulting in missing characters or constant repetition (because of missing release code).

I've had the same problem in my implementation. I've concluded that I had to make the code as simpliest as possible, without many comparations or math operations, because the processor must be free for running the loops in time for reading the clock pulses. If the processor is busy, it could miss some clock pulses. Making a simply code solved this problem for me. I thought buying a faster Teensy too.

I'm available for more tests if you need. Thank you for your help and orientation.
Title: Re: XT/AT/PS2/Terminal to USB Converter with NKRO
Post by: Syren__ on Thu, 01 March 2018, 13:41:10
Has anyone with a 122 key tried to map the F13-F24 keys as they actually were meant for (mapping them to real F13-F24)? I use some old software at work that was terminal based and would love to have them function as they were intended to.  it would be entertaining to my coworkers.
Title: Re: XT/AT/PS2/Terminal to USB Converter with NKRO
Post by: fohat.digs on Fri, 02 March 2018, 12:13:41
Has anyone with a 122 key tried to map the F13-F24 keys as they actually were meant for (mapping them to real F13-F24)?


I am pretty sure that Soarer's firmware defaults to that.

If not, you could make it happen.

Title: Re: XT/AT/PS2/Terminal to USB Converter with NKRO
Post by: Myvryn on Wed, 14 March 2018, 17:26:32
I just picked up a keyboard from my youth. A Tandy Enhanced Keyboard with the 5pin-din connector.
My problem plugging this into my Linux box is that all of the "normal" keys work fine, but others do odd things.
Namely, the arrow keys, the entire Insert-Home-PageUp group, etc. will not work correctly. The up arrow launches my media player.

If I was to pick up one of your converters, would it solve my problem?

Thanks,
Eddy
Title: Re: XT/AT/PS2/Terminal to USB Converter with NKRO
Post by: hasu on Thu, 15 March 2018, 19:19:44

I know you already solved this progblem yourself, congrat!
But it would be appreciated if you are willing to try my new converter firmware and let me know whether it works with the keyboard or not.
Attached firmware is built for Teensy2.0++ and compatible to Soarer's in terms of hardware. Thanks.

It worked for my Microtec keyboard, but not perfectly. All keys worked, but some press or release codes are frequently lost, resulting in missing characters or constant repetition (because of missing release code).

I've had the same problem in my implementation. I've concluded that I had to make the code as simpliest as possible, without many comparations or math operations, because the processor must be free for running the loops in time for reading the clock pulses. If the processor is busy, it could miss some clock pulses. Making a simply code solved this problem for me. I thought buying a faster Teensy too.

I'm available for more tests if you need. Thank you for your help and orientation.

Sorry for late reply and thank you for the test!
Hm, it seems that my firmware read data line after around 5-10us from clock falling egde and this might be too slow to support your wild Microtech. From your scope image its clock seems to have pretty small margin for reading data, around 5us or less? comparing to other XT keyboards.

I fixed my code and it can read in 3us after the edge now, could you try this when you have time? To be honest, I'm still not sure the 3 micro sec is fast enough because original XT interface works in tens or houndreds of nano second probably.
https://github.com/tmk/tmk_keyboard/blob/xt_rev2/converter/xt_usb/binary/xt_at90usb1286.hex

I afraid this may be a bit off-topic for most of subscribers of this thread now and created new thread for my fimrware. If you can post result there it would be appreciated. Also other XT keyboard owners who are willing to help and test my firmware would be welcome.
https://geekhack.org/index.php?topic=94649.0

Thanks
Title: Re: XT/AT/PS2/Terminal to USB Converter with NKRO
Post by: hking0036 on Sun, 18 March 2018, 18:13:36
What are the names for the extra 122 keys? I'm in the process of doing an ANSI mod (thanks to fohat) and I can't figure out what the name for some of the keys are. The left bank seems to be the EXTRA_F# code, and the top I'm assuming are F1-F24, but the key in the center of the arrow cluster, <>, and the !/c key I don't know. thanks.
Title: Re: XT/AT/PS2/Terminal to USB Converter with NKRO
Post by: fohat.digs on Mon, 19 March 2018, 18:34:38
The center arrow is LANG_4, the upper right of the numpad is EXTRA_SYSRQ

Otherwise, I think that most of his default layout is what the key position would be in standard ANSI.

The right side of Left Shift, I don't know, I always cover it up. HID_listen will tell you what it is putting out, then you could look it up.
Title: Re: XT/AT/PS2/Terminal to USB Converter with NKRO
Post by: hking0036 on Mon, 19 March 2018, 21:14:50
The center arrow is LANG_4, the upper right of the numpad is EXTRA_SYSRQ

Otherwise, I think that most of his default layout is what the key position would be in standard ANSI.

The right side of Left Shift, I don't know, I always cover it up. HID_listen will tell you what it is putting out, then you could look it up.
Thanks, that helps. Forgot that the rod stab ends up going into the <> key so no need to be concerned over that. Haven't got the converter wired up yet, I just want to have it set up so once I get the thing back together it's all good. Need to repaint the plate next.
Title: Re: XT/AT/PS2/Terminal to USB Converter with NKRO
Post by: feltel on Sat, 05 May 2018, 08:37:50
I recently aquired a used Model M 122 Terminal board (1394338) which I planned to convert to USB using Soarer's firmware and an Teensy 2.0++. I flashed the firmware and connected the keyboard according to pinout listed on this threads page 1. Unfortunately no keypress is registered and checking hid_listen it seems the keyboard is not detected at all.

Sometimes hid_listen/teensy-listen shows
Code: [Select]
feltel@bigblue:~/bin$ sudo teensy-listen
Waiting for device:......................................
Listening:


remaining: 0000
wF8 W004wF8 W004wF8 W004

Keyboard ID: 0000
Code Set: 3
Mode: AT/PS2

wED W104wED W104wED W104
often also
Code: [Select]
feltel@bigblue:~/bin$ sudo teensy-listen
Waiting for device:.................
Listening:
R06 wFE
R06 wFE
R05 wFE
or long colums of R05 and/or R06. Could be a dead keyboard controller board the reason for this behavior? As I was not sure if the keyset detection is the source of the problem I uploaded a simple config file to the teensy with "force set3".

I'm using a notebook (where demanding USB devices may cause problems) I cross-checked everyting using a powered USB hub. The results did not change. Checking the teensy with scinfo looks good imho:
Code: [Select]
feltel@bigblue:~/bin$ ./scinfo
scinfo v1.10
scinfo: looking for Soarer's Converter: found
scinfo: sending info request: ok
device: ok

Protocol Version: v1.00
Code Version: v1.12
Max Settings Version: v1.01
Current Settings Version: v1.01
SRAM Size: 8192 bytes
SRAM Free: 7441 bytes
EEPROM Size: 4096 bytes
EEPROM Free: 4088 bytes
Title: Re: XT/AT/PS2/Terminal to USB Converter with NKRO
Post by: fohat.digs on Sat, 05 May 2018, 08:44:25
You did notice that the connections are showing the socket, not the plug, didn't you?
Title: Re: XT/AT/PS2/Terminal to USB Converter with NKRO
Post by: feltel on Sat, 05 May 2018, 08:50:57
I think so. I repurposed the parts of the original cable. So black wire goes to 5V, white to ground, red (which is DATA) to PD0 and yellow (CLOCK) to PD1.
Title: Re: XT/AT/PS2/Terminal to USB Converter with NKRO
Post by: 624245305 on Mon, 14 May 2018, 03:47:35
I come from China, a primary school student, I learned a lot, the original HID appeared 404,HID which corresponds to the scancode translation table
Title: Re: XT/AT/PS2/Terminal to USB Converter with NKRO
Post by: Red October on Tue, 12 June 2018, 16:41:19
Hey guys, I'm having a bit of a problem here.  I bought a Soarer's Converter for XT keyboards from Orihalcon on eBay a while ago, used it happily for some time, only to have it develop an intermittent fault.  He had me send it back and sent me a new one.  Now that one has developed a fault too, at first it was intermittent too, but last week it just up and quit on me.  I decided that, as I had already received a second one and that it had been some time, I would tackle this one myself, especially as my soldering skills have improved greatly and I have a lot more tools for electronics work. 

I proceeded with disassembly and discovered that the circuit board inside the USB plug was potted in hot snot (da bigger da gob, da better da job, amIright? ...) which hadn't bonded to the board or components, or even the rubber shell, only the wires.  I cut everything back and proceeded to solder up the USB and DIN-5 connections now inside an enclosure box with a panel-mount DIN-5 and a USB cable with a gland, salvaged from some other thing long ago.  Unfortunately, when I was doing something, I managed to knock off a tiny little surface-mount component about 1/4 the size of a grain of rice.  Aided by a bright LED torch, I finally found the goddamn thing (on a filthy cement floor... fun!) and was able to put it back on the board, thanks to my needle tweezers.  Testing it with a meter showed it seemed to be a capacitor, as with the probes in one orientation the meter counted upwards and in the other downwards (in Ohms mode, beautiful old HP 3455a).  I put it back in what I thought was the correct orientation and tried the unit.  Plugging it into a laptop for testing (Dell Precision M60 portable workstation) I got an error from Windows: "Power Surge on Hub Port".  I checked all my work, found some little bits of wire from the USB side that may have been making contact with one-another and trimmed them back.  Same problem.  I swapped around the orientation of the mystery surface-mount device, still the same error.  What's up here???
Title: Re: XT/AT/PS2/Terminal to USB Converter with NKRO
Post by: thealeinman on Wed, 04 July 2018, 15:13:59
Just wanted to say thanks for the software, gave me a fun 4th of july soldering and hiding the arduino inside the keyboard and maintaining the original cable, the tip job is bad but I cut an old cable, ordered a proper one but still not in yet thanks.  This is the first thing ive typed on this model M and it aint to shabby for 25$  Hopefully this attaches right, also first post.
Title: Re: XT/AT/PS2/Terminal to USB Converter with NKRO
Post by: joshualuo7 on Tue, 17 July 2018, 22:42:36
Trying to convert my Model F XT but things are not working out....
I'm using an Leonardo Pro Micro (ATmega32U4, 5V/16MHz) and I did the wiring according to http://i.imgur.com/lLDBHvZ.jpg (http://i.imgur.com/lLDBHvZ.jpg)
I wrote the hex file using QMT toolbox on Windows.
Everytime I did plug everything in it either shows USB not recognized and nothing in the hid_listen (not enough voltage, but I tried multiple usb cable and only one work occasionally), or when it is corrected recognized, the hid_listen terminal just show a bunch of random code https://cdn.discordapp.com/attachments/378255567426420736/468925320842706945/2018-07-17.png (https://cdn.discordapp.com/attachments/378255567426420736/468925320842706945/2018-07-17.png)

Title: Re: XT/AT/PS2/Terminal to USB Converter with NKRO
Post by: Tactile on Tue, 17 July 2018, 22:58:37
To start, have a look at this post (https://geekhack.org/index.php?topic=96236.msg2625899#msg2625899).
Title: Re: XT/AT/PS2/Terminal to USB Converter with NKRO
Post by: joshualuo7 on Tue, 17 July 2018, 23:17:21
I put some solder on J1 and it finally does connect everytime I plug it in an usb, however, the random letters on the hid_listen is still there... and I don't thinks keys are registering...
Title: Re: XT/AT/PS2/Terminal to USB Converter with NKRO
Post by: Tactile on Wed, 18 July 2018, 00:30:04
You could try swapping the clock & data wires. That's safe to try. If they're wrong there's no damage, but I don't know if that could cause your random characters.
Title: Re: XT/AT/PS2/Terminal to USB Converter with NKRO
Post by: joshualuo7 on Wed, 18 July 2018, 15:24:44
Tried to swape the clock and data... the same thing happens... also I realized that f11 (which doesn't even exist on XT :/) are been pressed repeatedly. I also tried downgrading the framework to 1.03, the hid terminal doesn't show chunks of code now and f11 aren't been pressed. but instead show R04, R05, or R06 Error code. Tried a new Chip and the same thing happens... Gonna order an Teensy and try that now..
Title: Re: XT/AT/PS2/Terminal to USB Converter with NKRO
Post by: Ridingmac on Tue, 24 July 2018, 12:18:03
Hi guys , found myself a model m terminal keyboard with the round (3179 / 318x/ 319x) connector. Since i dont have the added keys of the 122 key variant im only interested in adapting it to modern ps/2 connector. Can i just cut off the connector and splice in a ps/2 connector while following the diagrams in the OP. Im not interested in remapping anything. Thanks guys.


(https://uploads.tapatalk-cdn.com/20180724/59dafdee21aa252d2081b4d0a6b002be.jpg)


Sent from my iPad using Tapatalk
Title: Re: XT/AT/PS2/Terminal to USB Converter with NKRO
Post by: fohat.digs on Tue, 24 July 2018, 14:42:04
No. Terminals don't speak the same language and you will need a hardware converter.

However, if you follow Soarer's instructions, that terminal should respond properly with no additional drama.
Title: Re: XT/AT/PS2/Terminal to USB Converter with NKRO
Post by: Ridingmac on Tue, 24 July 2018, 18:21:28
No. Terminals don't speak the same language and you will need a hardware converter.

However, if you follow Soarer's instructions, that terminal should respond properly with no additional drama.
it always mentions for 122 keys keyboard. since i only have the 104 key variant will it still work?

Sent from my SM-N915W8 using Tapatalk

Title: Re: XT/AT/PS2/Terminal to USB Converter with NKRO
Post by: fohat.digs on Tue, 24 July 2018, 19:33:33
It has never failed to work with any IBM, in my experience.

Soarer was meticulous in his work. The entire project began as a means to remap keys on an F AT.
Title: Re: XT/AT/PS2/Terminal to USB Converter with NKRO
Post by: Ridingmac on Tue, 24 July 2018, 19:38:32
It has never failed to work with any IBM, in my experience.

Soarer was meticulous in his work. The entire project began as a means to remap keys on an F AT.
awsime ill give it a try

Sent from my SM-N915W8 using Tapatalk

Title: Re: XT/AT/PS2/Terminal to USB Converter with NKRO
Post by: Ridingmac on Tue, 24 July 2018, 21:53:45
found myself a teensy 2.0 from ebay. Downloaded the whole soarer package. now for the way. ;)
It has never failed to work with any IBM, in my experience.

Soarer was meticulous in his work. The entire project began as a means to remap keys on an F AT.

Sent from my SM-N915W8 using Tapatalk

Title: Re: XT/AT/PS2/Terminal to USB Converter with NKRO
Post by: supermario802.1 on Wed, 25 July 2018, 02:28:24
I'm selling a few of my tinkerBOY XT/AT USB Converter with Soarer’s Converter Firmware (http://www.tinkerboy.xyz/product/tinkerboy-xt-at-usb-converter-with-soarers-converter-firmware/) if anyone is interested. I have tested them myself with an old IBM XT and AT keyboard.
Title: Re: XT/AT/PS2/Terminal to USB Converter with NKRO
Post by: Ridingmac on Fri, 27 July 2018, 11:07:28
i downloaded all the packages and zips on the op. i couldnt find a easy to understans tutorial in it. (Unless i missed it) on how to do this. I havent received my teensy yet but i was gsthering up info on how to do this. could anyone give me a small crash course. flashing the teensy seems easy enough but wich file do i flash. there seem to be a few hex files and im just not sure.

I have the 104 keys terminal model m

Sent from my SM-N915W8 using Tapatalk

Title: Re: XT/AT/PS2/Terminal to USB Converter with NKRO
Post by: Tactile on Fri, 27 July 2018, 11:33:33
i downloaded all the packages and zips on the op. i couldnt find a easy to understans tutorial in it. (Unless i missed it) on how to do this. I havent received my teensy yet but i was gsthering up info on how to do this. could anyone give me a small crash course. flashing the teensy seems easy enough but wich file do i flash. there seem to be a few hex files and im just not sure.

I have the 104 keys terminal model m

Sent from my SM-N915W8 using Tapatalk

The docs are in Soarer_Converter_v1.12_docs.zip - use a web browser to navigate the HTML pages.

Open Soarer_Converter_v1.12_update.zip to find four files. Different files for different hardware. For a Teensy 2.0 you'd flash it with Soarer_at2usb_v1.12_atmega32u4.hex

After that your keyboard should just work. Nothing else is necessary unless you want to use the programming features to change layouts or whatever.
Title: Re: XT/AT/PS2/Terminal to USB Converter with NKRO
Post by: Ridingmac on Fri, 27 July 2018, 12:15:58
A huge thanks. Simple enought. you made my day ;)
i downloaded all the packages and zips on the op. i couldnt find a easy to understans tutorial in it. (Unless i missed it) on how to do this. I havent received my teensy yet but i was gsthering up info on how to do this. could anyone give me a small crash course. flashing the teensy seems easy enough but wich file do i flash. there seem to be a few hex files and im just not sure.

I have the 104 keys terminal model m

Sent from my SM-N915W8 using Tapatalk

The docs are in Soarer_Converter_v1.12_docs.zip - use a web browser to navigate the HTML pages.

Open Soarer_Converter_v1.12_update.zip to find four files. Different files for different hardware. For a Teensy 2.0 you'd flash it with Soarer_at2usb_v1.12_atmega32u4.hex

After that your keyboard should just work. Nothing else is necessary unless you want to use the programming features to change layouts or whatever.

Sent from my SM-N915W8 using Tapatalk

Title: Re: XT/AT/PS2/Terminal to USB Converter with NKRO
Post by: Ridingmac on Sat, 28 July 2018, 10:34:21
If i were to add a 5V LED strip to the keyboard. Could i just weld it on the 5v and gnd pin on the teensy along with the keyboard or would that intefere with the keyboard. Unless there would be a way to send 5V to another pin?

Sent from my SM-N915W8 using Tapatalk

Title: Re: XT/AT/PS2/Terminal to USB Converter with NKRO
Post by: supermario802.1 on Sun, 29 July 2018, 21:30:07
Tried to swape the clock and data... the same thing happens... also I realized that f11 (which doesn't even exist on XT :/) are been pressed repeatedly. I also tried downgrading the framework to 1.03, the hid terminal doesn't show chunks of code now and f11 aren't been pressed. but instead show R04, R05, or R06 Error code. Tried a new Chip and the same thing happens... Gonna order an Teensy and try that now..

Are you testing it on a Windows or Linux computer?

Random letters usually means an issue an issue with the power supply. How are you powering the keyboard? Im assuming from the Pro Micro? Coz that might be your problem.
Title: Re: XT/AT/PS2/Terminal to USB Converter with NKRO
Post by: Ridingmac on Thu, 02 August 2018, 17:35:18
Would anybody have the wiring color. Wich color goes to where. I want to put the teensy inside the keyboard so ill wire it close to the board.

theres yellow, white, red and black and an unshielded wire but i already know that ones the gnd.

Would i be right to assume red is 5v. (https://uploads.tapatalk-cdn.com/20180802/f652a7640e5539eb07c414b5ff94b2b6.jpg)

Sent from my SM-N915W8 using Tapatalk

Title: Re: XT/AT/PS2/Terminal to USB Converter with NKRO
Post by: Ridingmac on Thu, 02 August 2018, 17:41:16
nevermind got it ;((https://uploads.tapatalk-cdn.com/20180802/2f0e2f093b0c063c5cdff3ac7bd01bd7.jpg)

Sent from my SM-N915W8 using Tapatalk

Title: Re: XT/AT/PS2/Terminal to USB Converter with NKRO
Post by: johnson20050 on Sat, 01 September 2018, 16:48:32
Hi,
    I faced some problem on using this USB converter.
Does anyone know how do I find "Soarer's Converter"
in scinfo command?

I'm trying to connect my PS/2 keyboard to arduino Pro Micro.
And it works with Soarer_at2usb_v1.12_atmega32u4.hex file.
The problem happens when I'm starting to build my keymap.
scwr & scinfo cannot find out the converter:

terminal output:
    scinfo v1.10
    scinfo: looking for Soarer's Converter: not found

Do I need to put the hex file to some specific directory?
Title: Re: XT/AT/PS2/Terminal to USB Converter with NKRO
Post by: Tactile on Sat, 01 September 2018, 17:23:33
Hi,
    I faced some problem on using this USB converter.
Does anyone know how do I find "Soarer's Converter"
in scinfo command?

I'm trying to connect my PS/2 keyboard to arduino Pro Micro.
And it works with Soarer_at2usb_v1.12_atmega32u4.hex file.
The problem happens when I'm starting to build my keymap.
scwr & scinfo cannot find out the converter:

terminal output:
    scinfo v1.10
    scinfo: looking for Soarer's Converter: not found

Do I need to put the hex file to some specific directory?

Are you putting the Pro Micro into bootloader mode? You don't need to do that. Once Soarer's is flashed onto the Pro Micro you never need the bootloader mode again.

Just run scinfo without messing with the Pro Micro at all and it should be seen.
Title: Re: XT/AT/PS2/Terminal to USB Converter with NKRO
Post by: johnson20050 on Sat, 01 September 2018, 18:50:23
Are you putting the Pro Micro into bootloader mode? You don't need to do that. Once Soarer's is flashed onto the Pro Micro you never need the bootloader mode again.

Just run scinfo without messing with the Pro Micro at all and it should be seen.

Oh, it works !
Thank you.

And I am able to use Dvorak keyboard!
( Just my first step, confirm this package owns the ability to configure PS/2 keyboard )
----------------------------------------------------------
// The above is my murmur...
//  I need to use sudo to get the information.
// So I need to use "sudo ./bin/scinfo"

No, I don't connect my Arduino.
After reading your suggestion, I connect my arduino and retry scinfo.
No matter whether I press reset button, scinfo cannot find Soarer's converter.

And no other message shown.


p.s. ( I don't know if it is useful information or not )
lsusb command output:
reset button pressed:
    Bus 002 Device 011: ID 2341:0036 Arduino SA
reset button not pressed:
    Bus 002 Device 012: ID 16c0:047d Van Ooijen Technische Informatica Teensy Keyboard+Debug
Title: Re: XT/AT/PS2/Terminal to USB Converter with NKRO
Post by: supermario802.1 on Tue, 11 September 2018, 04:04:14
Hey guys, I'm having a bit of a problem here.  I bought a Soarer's Converter for XT keyboards from Orihalcon on eBay a while ago, used it happily for some time, only to have it develop an intermittent fault.  He had me send it back and sent me a new one.  Now that one has developed a fault too, at first it was intermittent too, but last week it just up and quit on me.  I decided that, as I had already received a second one and that it had been some time, I would tackle this one myself, especially as my soldering skills have improved greatly and I have a lot more tools for electronics work. 

I proceeded with disassembly and discovered that the circuit board inside the USB plug was potted in hot snot (da bigger da gob, da better da job, amIright? ...) which hadn't bonded to the board or components, or even the rubber shell, only the wires.  I cut everything back and proceeded to solder up the USB and DIN-5 connections now inside an enclosure box with a panel-mount DIN-5 and a USB cable with a gland, salvaged from some other thing long ago.  Unfortunately, when I was doing something, I managed to knock off a tiny little surface-mount component about 1/4 the size of a grain of rice.  Aided by a bright LED torch, I finally found the goddamn thing (on a filthy cement floor... fun!) and was able to put it back on the board, thanks to my needle tweezers.  Testing it with a meter showed it seemed to be a capacitor, as with the probes in one orientation the meter counted upwards and in the other downwards (in Ohms mode, beautiful old HP 3455a).  I put it back in what I thought was the correct orientation and tried the unit.  Plugging it into a laptop for testing (Dell Precision M60 portable workstation) I got an error from Windows: "Power Surge on Hub Port".  I checked all my work, found some little bits of wire from the USB side that may have been making contact with one-another and trimmed them back.  Same problem.  I swapped around the orientation of the mystery surface-mount device, still the same error.  What's up here???

Post some pictures I might be able to help you.
Title: Re: XT/AT/PS2/Terminal to USB Converter with NKRO
Post by: nullb on Sat, 24 November 2018, 02:53:13
Hey guys I'm trying to replace the PS/2 cable on a 82G2383 Model M, scored this thing but the cord was chewed and broken.
https://imgur.com/a/qAYQdtf

Does anybody know what the pin-out is on these boards? Don't really have the equipment to check myself.
Title: Re: XT/AT/PS2/Terminal to USB Converter with NKRO
Post by: Tactile on Sat, 24 November 2018, 09:19:21
Hey guys I'm trying to replace the PS/2 cable on a 82G2383 Model M, scored this thing but the cord was chewed and broken.
https://imgur.com/a/qAYQdtf

Does anybody know what the pin-out is on these boards? Don't really have the equipment to check myself.

[attach=1]

For the other end - I think this is right

white = ground
yellow = data
red = clock
black   = 5v

[attach=2]
Title: Re: XT/AT/PS2/Terminal to USB Converter with NKRO
Post by: nullb on Wed, 12 December 2018, 04:09:52
Thanks for that can confirm that was correct, my keyboard works...

Well almost, a number of keys are dead, I'm thinking it may be the board... It's safe to assume if I see nothing in hid_listen.exe for some keys that it's not the Soarer's mapping being wrong... right?
Title: Re: XT/AT/PS2/Terminal to USB Converter with NKRO
Post by: Ridingmac on Wed, 12 December 2018, 07:38:30
Thanks for that can confirm that was correct, my keyboard works...

Well almost, a number of keys are dead, I'm thinking it may be the board... It's safe to assume if I see nothing in hid_listen.exe for some keys that it's not the Soarer's mapping being wrong... right?


I mremember when i did mine, most of my numpad was dead. The escape key did an enter command and some of the function keys were messed up . All it took was a remap. Like you mentionned HID listen will confirm if you have the same issue i had.


Sent from my iPad using Tapatalk
Title: Re: XT/AT/PS2/Terminal to USB Converter with NKRO
Post by: nullb on Wed, 12 December 2018, 16:47:21
Seems to be the ribben cable if I clean it I get more keys, but still not all of them.
Title: Re: XT/AT/PS2/Terminal to USB Converter with NKRO
Post by: youxiaojie on Sat, 29 December 2018, 01:15:53
Is the source code available for the latest version?I use oscilloscope to recode a set of scancode (non-standard.thank)and hope to modify your converter to use my old keyboard. Thanks a lot.
Title: Re: XT/AT/PS2/Terminal to USB Converter with NKRO
Post by: 624245305 on Mon, 28 January 2019, 09:00:39
I have 2 DEVLIN keyboard. When I press a button, it is released as LSHFIT+L. Is this a macro configuration? I looked at the description of the macro and the examples in configs. But what I wrote doesn't seem to work, I hope to get a complete example.
Title: Re: XT/AT/PS2/Terminal to USB Converter with NKRO
Post by: Tactile on Mon, 28 January 2019, 11:30:25
I have 2 DEVLIN keyboard. When I press a button, it is released as LSHFIT+L. Is this a macro configuration? I looked at the description of the macro and the examples in configs. But what I wrote doesn't seem to work, I hope to get a complete example.

A lot of special purpose keyboards have the controller programmed to send key combinations to trigger something in their software. I don't know if this will help but here's my story of one such keyboard.

The board I bought looked like this:
[attach=1]
The F1-F8 keys above the numeric keypad worked as expected but there was no F9, F10...F12. Instead the double row of extra keys would send F9+A, F9+B...F9+Z and F10+A... you get the idea.

This keyboard came from some kind of special medical equipment. Companies will program their keyboards with key combinations because if their software is based on Microsoft Windows, and it usually is, Windows will only recognize the "usual" keys and will ignore anything else. So they can't just use a distinct keycode for some function - Windows will ignore it - they have to stick with regular keycodes and use combinations to trigger their special functions. In the end, for these special keys, I used the first key of the combination to trigger a layer change and then acted on the second code of the key combination. Here's my Soarer's file for this keyboard:

Code: [Select]
#
#
# Soarer's converter file for my TG3 keyboard
#
#

#
#
# Numlock is permanently on so no need to map it to a key. Turn numlock off
# and the keyboard controller turns it right back on again.
#
#

#
#
# Simple remapping works for the group of 8 FN keys above the numeric keypad
# and for the numpad keys we want to be math operators
#
#

remapblock
    F1 INSERT  # top row - l to r
    F2 HOME
    F3 PAGE_UP
    F4 UNASSIGNED
    F5 DELETE  # bottom row - l to r
    F6 END
    F7 PAGE_DOWN
    F8 UNASSIGNED
# Numeric keypad operators - from the enter key we go up & then turn left
    PAGE_DOWN PAD_PLUS
    PAGE_UP PAD_MINUS
    DELETE PAD_ASTERIX
    HOME PAD_SLASH
    ESC TAB
    END UNASSIGNED  # top left numpad corner - usual numlock position
endblock

#
#
# Our oddball keys are all prefixed with F9 or F10
# We'll let F9 or F10 switch layers and then act on the second key code:
# The top leftmost key sends F9 + A, so in our code:
# F9 is absorbed as it shifts to layer 1, then we act on the "A"
# This works remarkably well and wasn't my idea -
# I asked for help on Geekhack.org and ShawnMeg came up with the idea.
#
# SHIFT + RIGHT or LEFT arrow also presses F11 so we need to have F11 trigger
# a layer. The layer trigger itself absorbs the phantom keypress of F11
# then the shifted right/left arrows act normally
#
#

layerblock
    FN1 1
    FN2 2
    FN3 1
endblock

remapblock
  layer 0
    F9 FN1
    F10 FN2
    F11 FN3
endblock

#
#
# UNASSIGNED doesn't seem to work here (?) so we'll use EXTRA_PAD_PLUS
# It's a code unrecognized by Windows and so effectively blanks these keys
#
#

remapblock
  layer 1  # F9 prefixed
    A ESC              # top row left end
    B EXTRA_PAD_PLUS
    C EXTRA_PAD_PLUS
    D EXTRA_PAD_PLUS
    E EXTRA_PAD_PLUS
    F EXTRA_PAD_PLUS
    G EXTRA_PAD_PLUS
    H EXTRA_PAD_PLUS
    I EXTRA_PAD_PLUS
    J EXTRA_PAD_PLUS
    K EXTRA_PAD_PLUS
    L EXTRA_PAD_PLUS
    M EXTRA_PAD_PLUS
    N EXTRA_PAD_PLUS
    O EXTRA_PAD_PLUS   # top row right end
    P F1               # bottom row left end
    Q F2
    R F3
    S F4
    T F5
    U F6
    V F7
    W F8
    X F9
    Y F10
    Z F11
Endblock

remapblock
  layer 2  # F10 prefixed
    A F12
    B EXTRA_PAD_PLUS
    C EXTRA_PAD_PLUS
    D RGUI             # bottom row right end
# row of four at the top right corner - left to right   
    E ESC   
    F PRINTSCREEN
    G SCROLL_LOCK
    H PAUSE
Endblock

These specialized keyboards can be tricky to reprogram in Soarer's, but it can usually be done if you give it some thought. And it's worth the effort. Here's how mine turned out:

[attach=2]
Title: Re: XT/AT/PS2/Terminal to USB Converter with NKRO
Post by: livingspeedbump on Tue, 29 January 2019, 14:04:37
Fairly quick question here. Curious if you can remap undefined keys?
They do register as unique, they simply are undefined:
(https://i.imgur.com/FNUF4Vc.png)
Overall this was fairly simple, the biggest setback is that the =+ key is UNREGISTERED along with others that make much more sense to be such.

I have made a scratch layout (http://www.keyboard-layout-editor.com/#/gists/cbfb59964c115c089851466cd27aad4c) to help me plan/think through/remember the layout, with the current code in the notes.

This is the dude in question, but more on this later:
(https://i.imgur.com/A635TOr.jpg)

Title: Re: XT protocol is not perfect with one high level bit
Post by: youxiaojie on Tue, 29 January 2019, 15:30:31
Your xt converter is not  good at one bit start bit instead 2bits start bit. IBM started with 0and1 as start bit, while alt of xt keyboard use 1as start bit, so can you make it  more smart? Or make a setup item stored in eeprom?
Title: Re: XT/AT/PS2/Terminal to USB Converter with NKRO
Post by: 624245305 on Tue, 29 January 2019, 23:52:39
I have 2 DEVLIN keyboard. When I press a button, it is released as LSHFIT+L. Is this a macro configuration? I looked at the description of the macro and the examples in configs. But what I wrote doesn't seem to work, I hope to get a complete example.

A lot of special purpose keyboards have the controller programmed to send key combinations to trigger something in their software. I don't know if this will help but here's my story of one such keyboard.

The board I bought looked like this:
(Attachment Link)
The F1-F8 keys above the numeric keypad worked as expected but there was no F9, F10...F12. Instead the double row of extra keys would send F9+A, F9+B...F9+Z and F10+A... you get the idea.

This keyboard came from some kind of special medical equipment. Companies will program their keyboards with key combinations because if their software is based on Microsoft Windows, and it usually is, Windows will only recognize the "usual" keys and will ignore anything else. So they can't just use a distinct keycode for some function - Windows will ignore it - they have to stick with regular keycodes and use combinations to trigger their special functions. In the end, for these special keys, I used the first key of the combination to trigger a layer change and then acted on the second code of the key combination. Here's my Soarer's file for this keyboard:
Code: [Select]
#
#
# Soarer's converter file for my TG3 keyboard
#
#

#
#
# Numlock is permanently on so no need to map it to a key. Turn numlock off
# and the keyboard controller turns it right back on again.
#
#

#
#
# Simple remapping works for the group of 8 FN keys above the numeric keypad
# and for the numpad keys we want to be math operators
#
#

remapblock
    F1 INSERT  # top row - l to r
    F2 HOME
    F3 PAGE_UP
    F4 UNASSIGNED
    F5 DELETE  # bottom row - l to r
    F6 END
    F7 PAGE_DOWN
    F8 UNASSIGNED
# Numeric keypad operators - from the enter key we go up & then turn left
    PAGE_DOWN PAD_PLUS
    PAGE_UP PAD_MINUS
    DELETE PAD_ASTERIX
    HOME PAD_SLASH
    ESC TAB
    END UNASSIGNED  # top left numpad corner - usual numlock position
endblock

#
#
# Our oddball keys are all prefixed with F9 or F10
# We'll let F9 or F10 switch layers and then act on the second key code:
# The top leftmost key sends F9 + A, so in our code:
# F9 is absorbed as it shifts to layer 1, then we act on the "A"
# This works remarkably well and wasn't my idea -
# I asked for help on Geekhack.org and ShawnMeg came up with the idea.
#
# SHIFT + RIGHT or LEFT arrow also presses F11 so we need to have F11 trigger
# a layer. The layer trigger itself absorbs the phantom keypress of F11
# then the shifted right/left arrows act normally
#
#

layerblock
    FN1 1
    FN2 2
    FN3 1
endblock

remapblock
  layer 0
    F9 FN1
    F10 FN2
    F11 FN3
endblock

#
#
# UNASSIGNED doesn't seem to work here (?) so we'll use EXTRA_PAD_PLUS
# It's a code unrecognized by Windows and so effectively blanks these keys
#
#

remapblock
  layer 1  # F9 prefixed
    A ESC              # top row left end
    B EXTRA_PAD_PLUS
    C EXTRA_PAD_PLUS
    D EXTRA_PAD_PLUS
    E EXTRA_PAD_PLUS
    F EXTRA_PAD_PLUS
    G EXTRA_PAD_PLUS
    H EXTRA_PAD_PLUS
    I EXTRA_PAD_PLUS
    J EXTRA_PAD_PLUS
    K EXTRA_PAD_PLUS
    L EXTRA_PAD_PLUS
    M EXTRA_PAD_PLUS
    N EXTRA_PAD_PLUS
    O EXTRA_PAD_PLUS   # top row right end
    P F1               # bottom row left end
    Q F2
    R F3
    S F4
    T F5
    U F6
    V F7
    W F8
    X F9
    Y F10
    Z F11
Endblock

remapblock
  layer 2  # F10 prefixed
    A F12
    B EXTRA_PAD_PLUS
    C EXTRA_PAD_PLUS
    D RGUI             # bottom row right end
# row of four at the top right corner - left to right   
    E ESC   
    F PRINTSCREEN
    G SCROLL_LOCK
    H PAUSE
Endblock
These specialized keyboards can be tricky to reprogram in Soarer's, but it can usually be done if you give it some thought. And it's worth the effort. Here's how mine turned out:
(Attachment Link)

Thank you very much for your help, I cloned the .SC file in my code to fit my Devlin keyboard. However, there are several keys on my keyboard that are the same, such as 2 SPACE/2 PERIOD/2 SLASH, the code monitored by HID is the same. In addition, the LALT/LCTRL on the left and the RALT/RCTL on the right both send the HID code on the left, the LCRT on the left is set to FN, and the CTRL on the right also becomes the FN. Not perfect, but it is very fun to configure the extra buttons.

There are a lot of TG3 keyboards in China. Although I haven't played your TG3, I also have the following TG3. The keyboard is very good. The first row of double-row buttons also triggers two buttons, and your help is very good for me to solve such problems. Here I wish you a Chinese holiday, Happy New Year.
Title: Re: XT/AT/PS2/Terminal to USB Converter with NKRO
Post by: youxiaojie on Sat, 09 March 2019, 07:07:45
dear author,I used modify soarer's converter and write configure ok the first time and then I hope to change key configure  it is said failure and scrd return signature error.is there something wrong?how to rewrite eeprom?
Title: Re: XT/AT/PS2/Terminal to USB Converter with NKRO
Post by: ivanthetolerable on Tue, 19 March 2019, 08:12:56
Hello all,

I recently ordered two adapters on eBay for my XT model F. One of the adapters randomly died altogether and I was sent a replacement. The replacement arrived, but when I plug in any of my Model Fs, it doesn't work. In HID I am getting R06 WFE for all key presses, and I noticed that the Keyboard IF is 0000 and the code set is Unknown. The mode is set to AT/PS2 instead of XT. Any idea what caused this and how to fix it? It is like that on any computer I use.
Title: Re: XT/AT/PS2/Terminal to USB Converter with NKRO
Post by: 624245305 on Thu, 21 March 2019, 08:50:44
Hello all,

I recently ordered two adapters on eBay for my XT model F. One of the adapters randomly died altogether and I was sent a replacement. The replacement arrived, but when I plug in any of my Model Fs, it doesn't work. In HID I am getting R06 WFE for all key presses, and I noticed that the Keyboard IF is 0000 and the code set is Unknown. The mode is set to AT/PS2 instead of XT. Any idea what caused this and how to fix it? It is like that on any computer I use.

Code   Error   Description
R03   unknown   something bad happened!
R04   clock   missed one edge of the clock signal, usually because of a short spike
R05   timeout   started receiving clock from the board, but didn't receive enough for a full code
R06   start bit   read a start bit, but it was incorrect
R07   parity bit   failed to correctly read a parity bit
R08   stop bit   failed to correctly read a stop bit
W005   timeout   timeout while writing a command to the keyboard
W105   timeout   timeout while writing the first byte of a 2-byte command
W205   timeout   timeout while writing the second byte of a 2-byte command
Title: Re: XT/AT/PS2/Terminal to USB Converter with NKRO
Post by: 624245305 on Thu, 21 March 2019, 09:15:58
Have help with the IBM 3178 keyboard converter? I purchased a keyboard with the code C2 without a line. I saw someone making an IBM 3178 converter, and an external 12V power supply, perfect use of the solenoid valve switch.......
Title: Re: XT/AT/PS2/Terminal to USB Converter with NKRO
Post by: ivanthetolerable on Mon, 13 May 2019, 10:50:09
Hi all,

Can anyone lead me in the right direction to learn about programming macros in the .sc file? I'm trying to figure out how to map two key presses to one key. I.e, pressing F7 to trigger ALT + LGUI press. Any tips?
Title: Re: XT/AT/PS2/Terminal to USB Converter with NKRO
Post by: Tactile on Mon, 13 May 2019, 11:12:05
Hi all,

Can anyone lead me in the right direction to learn about programming macros in the .sc file? I'm trying to figure out how to map two key presses to one key. I.e, pressing F7 to trigger ALT + LGUI press. Any tips?

With no assurance that this will do what you want:

Code: [Select]
macroblock
    macro F7
        PUSH_META CLEAR_META all
        MAKE LALT
        PRESS LGUI
        BREAK LALT
        POP_ALL_META
    endmacro
endblck

Macros are explained pretty well in the docs, with examples.
Title: Re: XT/AT/PS2/Terminal to USB Converter with NKRO
Post by: apastuszak on Sat, 18 May 2019, 15:57:25
I just got my Soarer's Converter in the mail and am currently tinkering with it.

Two questions that I have:

1. Is it possible to have a macro launch an application?  For example, could I configure CTRL+SHIFT+F launch Firefox?
2. Is it possible to do pattern substitution with it?  For example, can I type yw and have the converter convert to you're welcome.

Any and all help from a newbie greatly appreciated.
Title: Re: XT/AT/PS2/Terminal to USB Converter with NKRO
Post by: fohat.digs on Sat, 18 May 2019, 20:30:05
Launching from keyboard is easy. Just set a shortcut with properties (in the "shortcut key" in Windows).
Title: Re: XT/AT/PS2/Terminal to USB Converter with NKRO
Post by: apastuszak on Sat, 18 May 2019, 21:48:44
Launching from keyboard is easy. Just set a shortcut with properties (in the "shortcut key" in Windows).

I tried that on my Windows 7 work laptop and it didn't work.  I think they may have it blocked by policy or through some other means.

I've been using AutoHotKey to do it, but I got a nasty email that I am not allowed to use AutoHotKey any more.
Title: Re: XT/AT/PS2/Terminal to USB Converter with NKRO
Post by: AJM on Sun, 19 May 2019, 08:33:11
1. Is it possible to have a macro launch an application?  For example, could I configure CTRL+SHIFT+F launch Firefox?
2. Is it possible to do pattern substitution with it?  For example, can I type yw and have the converter convert to you're welcome.

1. If Firefox is your standard browser, you can simply program the special code "MEDIA_WWW_HOME" to any key you like, which will open the browser.
If Firefox is not your standard browser, but it is in your task bar - let's say on second position, you could program the macro <WIN> + <2>.

2. No, you would have to program for example <CTRL>+<ALT>+<Y> to output this text.
Title: Re: XT/AT/PS2/Terminal to USB Converter with NKRO
Post by: apastuszak on Sun, 19 May 2019, 09:12:55
1. Is it possible to have a macro launch an application?  For example, could I configure CTRL+SHIFT+F launch Firefox?
2. Is it possible to do pattern substitution with it?  For example, can I type yw and have the converter convert to you're welcome.

1. If Firefox is your standard browser, you can simply program the special code "MEDIA_WWW_HOME" to any key you like, which will open the browser.
If Firefox is not your standard browser, but it is in your task bar - let's say on second position, you could program the macro <WIN> + <2>.

2. No, you would have to program for example <CTRL>+<ALT>+<Y> to output this text.

For 1, Firefox was just an example.  If I wanted to launch a batch file with a keyboard shortcut of some kind, is there some way to do it with a Soarer's Converter?  if not, is thee another hardware device with firmware that will let me do it?
Title: Re: XT/AT/PS2/Terminal to USB Converter with NKRO
Post by: AJM on Sun, 19 May 2019, 12:41:07
Well, you can always use the slighty crude method and program:

<WIN>+<R>
D:\script.bat
<ENTER>
Title: Re: XT/AT/PS2/Terminal to USB Converter with NKRO
Post by: ModernRetro on Mon, 09 September 2019, 03:24:05
I bought this keyboard: Epson QX-10 keyboard.
I think it needs to be converted. (https://deskthority.net/viewtopic.php?t=21416)
Can I get any external converter for this?
Title: Re: XT/AT/PS2/Terminal to USB Converter with NKRO
Post by: PancakeMSTR on Mon, 09 September 2019, 09:44:32
I bought this keyboard: Epson QX-10 keyboard.
I think it needs to be converted. (https://deskthority.net/viewtopic.php?t=21416)
Can I get any external converter for this?

I believe that the Epson's have their own protocol that isn't supported by Soarer's. Snacksthecat on deskthority figured out the epson protocol (https://deskthority.net/viewtopic.php?p=451207#p451207), but the board itself may only support 1KRO, which is pretty much unusable.


Best bet is probably to trace the matrix, wire the rows and columns to a teensy 2.0, and use QMK to make firmware for it. I have a QX503A and that's what I'm planning on doing with mine.
Title: Re: XT/AT/PS2/Terminal to USB Converter with NKRO
Post by: kelvinhall05 on Thu, 07 November 2019, 12:13:14
Hi, do you think I could use this microcontroller? I don't want to wait possibly months for shipping from China or pay $25+ to get it in a week or so.
https://www.amazon.ca/ATmega32U4-Development-Microcontroller-Leonardo-Bootloader/dp/B07WPCLF8Y/ref=sr_1_4?keywords=ATmega32U4&qid=1573150246&sr=8-4
I'm looking to convert a terminal Model M to USB. Thanks!
Title: Re: XT/AT/PS2/Terminal to USB Converter with NKRO
Post by: SuccnYeet on Thu, 28 November 2019, 20:04:48
Anyone able to help me with thiss? I've been trying to convert a Reuters D3D keyboard for quite some time now and have had no luck.  :(

It uses a 25 pin parralel port. I have managed to get it to output some codes using a pro micro and some random pins on the 25pin. I have flashed using soarers at2usb but I cannot get any unique scancodes for each keypress. just 'rFF r05' and such....

(https://i.imgur.com/tFfjyfz.png)
Title: Re: XT/AT/PS2/Terminal to USB Converter with NKRO
Post by: hasu on Sun, 01 December 2019, 20:35:13
What that log shows is only errors on reading signals and the converter doesnt' recognize it.
The keyboard speaks proprietary protocol and you need this breakout box to convert it and get PS/2 output probably. http://i.imgur.com/rLsNk1D.jpg

Try this to look into the proprietary protocol. You may want to buy logic analyzer in the market instead.
https://deskthority.net/viewtopic.php?f=7&t=4567&start=
Title: Re: XT/AT/PS2/Terminal to USB Converter with NKRO
Post by: ivanthetolerable on Sun, 08 December 2019, 08:33:41
Hi, do you think I could use this microcontroller? I don't want to wait possibly months for shipping from China or pay $25+ to get it in a week or so.
https://www.amazon.ca/ATmega32U4-Development-Microcontroller-Leonardo-Bootloader/dp/B07WPCLF8Y/ref=sr_1_4?keywords=ATmega32U4&qid=1573150246&sr=8-4
I'm looking to convert a terminal Model M to USB. Thanks!

Fellow Canuck here. I tried that and I couldn't get the firmware to flash properly. It could be that I was just doing it wrong but I ended up returning it. I ordered a few Teensy 2.0 from China to Ontario and it took only 2 weeks. Not that bad.
Title: Re: XT/AT/PS2/Terminal to USB Converter with NKRO
Post by: ivanthetolerable on Mon, 09 December 2019, 13:32:50
Has anyone had the issue "block too large" when trying to create a lot of macros?
Title: Re: XT/AT/PS2/Terminal to USB Converter with NKRO
Post by: kelvinhall05 on Tue, 10 December 2019, 08:42:38
Hi, do you think I could use this microcontroller? I don't want to wait possibly months for shipping from China or pay $25+ to get it in a week or so.
https://www.amazon.ca/ATmega32U4-Development-Microcontroller-Leonardo-Bootloader/dp/B07WPCLF8Y/ref=sr_1_4?keywords=ATmega32U4&qid=1573150246&sr=8-4
I'm looking to convert a terminal Model M to USB. Thanks!

Fellow Canuck here. I tried that and I couldn't get the firmware to flash properly. It could be that I was just doing it wrong but I ended up returning it. I ordered a few Teensy 2.0 from China to Ontario and it took only 2 weeks. Not that bad.
Maybe I should have posted an update. I got it to work and wrote a guide here:
https://linustechtips.com/main/topic/1125819-how-to-convert-a-terminal-ibm-model-m/
Title: Re: XT/AT/PS2/Terminal to USB Converter with NKRO
Post by: antigua1103 on Mon, 30 December 2019, 15:06:12
I just tried this out with my amtelco kb163 and it works so I no longer need a bunch of adapters but as I looked at the codes the key use in hopes to use the extra keys as macros or other functions they are all mapped to corresponding keys on the keyboard but the codes are rather different has anyone else come across this?
Title: Re: XT/AT/PS2/Terminal to USB Converter with NKRO
Post by: JakeyPancakey on Sat, 11 January 2020, 13:37:02
I purchased an IBM Model F without a cable off eBay recently and have been struggling to figure out which pins inside the keyboard itself I should connect to the breadboard and Teensy. I looked through all the pinouts and previous posts in the guide but couldn't find anything that looked like this. Can anybody help me sort out which pins are which (i.e. Vcc, Gnd, Data, Clock)?

[attachimg=1]

I know there was a picture in the thread of the cables and I can get a vague idea of where the pins are supposed to go, but the picture is taken from a perspective that does not make it entirely clear. Thanks for the guide and help!
Title: Re: XT/AT/PS2/Terminal to USB Converter with NKRO
Post by: matalog on Sun, 23 February 2020, 22:23:08
I have a Filco MJ2 ordered.  Obviously I want to see the NKRO in action on my PC which has only USB in.

I ordered a Teensy 2.0, ps/2 socket, usb type A male to type B.  Have the hex code of Soarer's Converter, and Teensy Programming software for windows.

I will have to connect ports of the teensy to the ps/2 socket GND, VCC, CLOCK and DATA, then program the Teensy with the ATmega32U4 hex file.  When I then power on the teensy connected to ps/2 and usb the next time, Will my keyboard be working already?  Or will I have to take some other steps I haven't mentioned?

I don't want anything fancy, no remapping or function keys, no lights on teensy, no aux keys.  Just that the Filco keyboard is NKRO on windows through USB.

Thanks for any tips :-).

matalog.
Title: Re: XT/AT/PS2/Terminal to USB Converter with NKRO
Post by: Tactile on Sun, 23 February 2020, 23:05:36
I have a Filco MJ2 ordered.  Obviously I want to see the NKRO in action on my PC which has only USB in.

I ordered a Teensy 2.0, ps/2 socket, usb type A male to type B.  Have the hex code of Soarer's Converter, and Teensy Programming software for windows.

I will have to connect ports of the teensy to the ps/2 socket GND, VCC, CLOCK and DATA, then program the Teensy with the ATmega32U4 hex file.  When I then power on the teensy connected to ps/2 and usb the next time, Will my keyboard be working already?  Or will I have to take some other steps I haven't mentioned?

I don't want anything fancy, no remapping or function keys, no lights on teensy, no aux keys.  Just that the Filco keyboard is NKRO on windows through USB.

Thanks for any tips :-).

matalog.

It should work right away.
Title: Re: XT/AT/PS2/Terminal to USB Converter with NKRO
Post by: ivanthetolerable on Fri, 20 March 2020, 23:55:45
Hey guys,

I've been driving myself crazy lately. I'm trying to program one of the Extra_F keys to have a different effect when I press it + Shift or CTRL. I.E, right now Extra_F1 is set to copy, but I want it to launch calculator when I press Shift+ Extra_F1. Any idea? I feel like I've tried everything
Title: Re: XT/AT/PS2/Terminal to USB Converter with NKRO
Post by: edlee on Sat, 11 April 2020, 19:12:07
I can create a shortcut to the Calculator on the Windows 7 Desktop by right clicking on the Windows Desktop and selecting New / Shortcut. 

Enter the location of the Calculator program:

%windir%\system32\calc.exe

Type a name for the shortcut or accept the default name and click on the Finish button.  Double click on the shortcut to see if the location is correct and the shortcut works.  The Properties of the shortcut can be accessed by right clicking on the shortcut and selecting Properties from the context menu that appears.  One of the Properties is, "Shortcut key:".  Click in the text box to the right of, "Shortcut key:", and press the key combination that you want to activate the program.  I pressed:

Ctrl Alt C

This key combination is unlikely to be used by any of the Windows programs that I run.  Windows will display, "Ctrl + Alt + C", but I don't do that, because the extra + signs confuse some people into thinking they have to press the + sign when they shouldn't.  Click on the OK button to save your change to the Properties.

The macro in a Soarer configuration file to press Ctrl Alt C to activate the shortcut for the Calculator would look something like this:

macroblock
  macro EXTRA_F1
    PUSH_META CLEAR_META all
    SET_META LCTRL LALT
    PRESS c
    POP_ALL_META
  endmacro
endblock

This is similar to one of the example macros in the documentation.  Other people would have to replace the, "EXTRA_F1", with what HID code or codes they want to activate the macro.  I have tested this macro with a different HID code on my keyboard.

Save this macro in a text file.  Drag and drop the text file onto the, "scasw.bat", file.
Title: Re: XT/AT/PS2/Terminal to USB Converter with NKRO
Post by: edlee on Sat, 11 April 2020, 19:54:14
I am using Soarer's Converter, which I purchased on eBay several years ago, on a Gateway AnyKey keyboard.  This keyboard has a built-in ability to remap keys to each other or to record macros.  When I press the right side Ctrl key, something goofy happens and the Scroll Lock toggles on or off.  If I use the keyboard's built-in ability to remap the left Ctrl key to the right side Ctrl key, then the problem goes away.  I don't think this is the fault of Soarer's Converter.  I originally got the following output from the, "hid_listen.exe", program after pressing the unmodified right Ctrl key:

rE0 r14 +E4 dE4 wED rFA w03 rFA
rE0 rF0 r14 -E4 uE4

When I press the keyboard's remap key sequence Remap, Left Ctrl, Right Ctrl, Remap and run the hid_listen program again, then I get the following more concise output after I press Right Ctrl:

r14 +E0 dE0
rF0 r14 -E0 uE0

Then the Scroll Lock behaves normally by not changing.  I write this because I am wondering if this bug is specific to my particular keyboard or if anyone else who has a Gateway AnyKey keyboard is experiencing this.

My model of Gateway AnyKey keyboard has a bottom row asterisk (*) key and a backslash (\) key in between the Ctrl and Alt keys in place of the Windows keys that are on modern keyboards.  I created a simple remapping configuration file for Soarer's Converter which solves this problem:

remapblock
  RALT RGUI
endblock

This makes the Right Alt key the Right Windows key.  I never use the Right Alt key, so it's easy to sacrifice this key.  I then use the built-in remap function of the GateWay AnyKey keyboard to assign the Right Alt key to the bottom row asterisk key and backslash key so I can use them as Windows keys.  Maybe someone else with a GateWay AnyKey keyboard will find this information useful.
Title: Re: XT/AT/PS2/Terminal to USB Converter with NKRO
Post by: edlee on Sun, 12 April 2020, 00:44:49
This should work for Shift F1:

macroblock
  macro EXTRA_F1 LSHIFT
    PUSH_META CLEAR_META all
    SET_META LCTRL LALT
    PRESS c
    POP_ALL_META
  endmacro
endblock


This should work for Ctrl F1:

macroblock
  macro EXTRA_F1 LCTRL
    PUSH_META CLEAR_META all
    SET_META LCTRL LALT
    PRESS c
    POP_ALL_META
  endmacro
endblock
Title: Re: XT/AT/PS2/Terminal to USB Converter with NKRO
Post by: edlee on Mon, 13 April 2020, 02:54:55
I think people who are new to Soarer's Converter need better examples of configuration files.  I spent the weekend looking through all of Soarer's posts to glean useful information.  Below is a sample configuration file.

Code: [Select]
# In Windows, you can drag and drop this configuration file to the, "scaswr.bat",
# batch file to configure Soarer's converter.  The name of this
# text file can end in *.txt or *.sc or anything else.  The *.txt extension
# might be more convenient in the Windows operating system so that you can
# double click on the file name to edit the file in the Notepad program.

# Soarer configuration files are case-insensitive.
# You can use tab or spaces characters to align text.
# Text to the right of # characters are comments.

ifselect any

layerblock
  FN1 1  # FN1 is a virtual key and is not the same thing as a physical F1 function key.
endblock

# Enter your default key mappings here:

remapblock
RALT RGUI # The Right Alt key becomes the Right Windows key
CAPS_LOCK FN1 # The CAPS_LOCK key becomes like a shift key into keyboard layer 1
endblock

remapblock
 layer 1
C EXSEL # CAPS_LOCK C is remapped to a key that is non-existent on my keyboard to trigger a macro
endblock

# Enter your default macro definitions here:

macroblock
  # Press Ctrl Break when CAPS_LOCK C is pressed
  macro EXSEL
    push_meta clear_meta all
    set_meta LCTRL
    press PAUSE
    pop_all_meta
  endmacro

  # The gray number pad keys on my keyboard have no special meaning with modifiers,
  # so modifiers like Ctrl, Alt, Shift can be used with the keys for
  # NUM_LOCK / * - + ENTER on the number pad for macros.

  # Pressing LEFT SHIFT with NUM LOCK toggles the Colemak keyboard layout.
  macro num_lock LSHIFT -ctrl -alt
    push_meta clear_meta all
    press SELECT_1  # SELECT_1 is not a physical key but a toggle like CAPS LOCK or NUM LOCK
    pop_all_meta
  endmacro

  # Pressing LEFT CTRL with NUM LOCK toggles the Dvorak keyboard layout.
  macro num_lock LCTRL -shift -alt
    push_meta clear_meta all
    press SELECT_2  # SELECT_2 is not a physical key but a toggle like CAPS LOCK or NUM LOCK
    pop_all_meta
  endmacro

  # Pressing LEFT ALT with NUM LOCK resets all select states and returns to qwerty layout
  macro num_lock LALT -ctrl -shift
    push_meta clear_meta all
    press select_0
    pop_all_meta
  endmacro

  # Simultaneously pressing Left Shift and Right Shift is the same as pressing Caps Lock.
  # That frees up the Caps Lock key to be something more useful, such as the left Ctrl key (LCTRL).
  # There are 2 entries here for pressing the Shift keys in different orders.

  macro LSHIFT RSHIFT -ctrl -alt
    press caps_lock  # This presses the actual Caps Lock key, not the remapped Caps Lock key.
  endmacro

  macro RSHIFT LSHIFT -ctrl -alt
    press caps_lock
  endmacro

endblock

# The contents of the sample, "colemak.sc", and, "dvorak.sc", files are included
# here for easy adjustment.

ifselect 1

# Colemak keyboard layout.
# Holding down the LEFT SHIFT key and then pressing the NUM LOCK key
# toggles the Select 1 state and the Colemak keyboard layout.

remapblock
D S
E F
F T
G D
I U
J N
K E
L I
N K
O Y
P SEMICOLON
R P
S R
T G
U L
Y J
SEMICOLON O
endblock


ifselect 2

# Dvorak keyboard layout - contributed by Morning Song.
# Holding down the LEFT CTRL key and then pressing the NUM LOCK key
# toggles the Select 2 state and the Dvorak keyboard layout.

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
Z SEMICOLON
X Q
C J
V K
B X
N B
# M M
COMMA W
PERIOD V
SLASH Z
endblock
Title: Re: XT/AT/PS2/Terminal to USB Converter with NKRO
Post by: edlee on Fri, 24 April 2020, 02:33:14
I learned that Soarer's example for simultaneously pressing both SHIFT keys to act as CAPS LOCK results in shifting anomalies.  You have to execute, "clear_meta shift", before the line for CAPS_LOCK:

  macro LSHIFT RSHIFT -ctrl -alt -gui
    clear_meta shift
    press CAPS_LOCK
  endmacro

  macro RSHIFT LSHIFT -ctrl -alt -gui
    clear_meta shift
    press CAPS_LOCK
  endmacro
Title: Re: XT/AT/PS2/Terminal to USB Converter with NKRO
Post by: edlee on Sun, 26 April 2020, 19:35:56
I got Soarer's converter working with my Rosewill RK-9000V2 keyboard with Cherry MX blue switches.  The Rosewill RK-9000V2 keyboard came with both a PS/2 cable and a USB cable, either of which can be used with the keyboard.  Attached is the Soarer configuration file for the RK-9000V2 keyboard as an example for others.  An odd thing about this keyboard is that you have to force the set2ext keyboard protocol in the configuration file.  Another odd thing about this keyboard is that all of the Caps Lock , Num Lock, and Scroll Lock LED lights flash several times and then go dark whenever you toggle any of their settings.  If you type some keys while the LEDs are flashing, the keyboard locks up.  So, I created empty macros to disable Num Lock and Scroll Lock to avoid accidentally pressing them.
Title: Re: XT/AT/PS2/Terminal to USB Converter with NKRO
Post by: edlee on Wed, 29 April 2020, 01:23:06
Here is an excerpt from my latest configuration file.  A user on the Deskthority web site gave a long example of creating a SELECT configuration with a macro for each letter to capitalize every letter and replace the space character with an underline character, but there is a far more concise way to accomplish the same thing that uses less precious EEPROM memory in Soarer's converter.

macroblock
  # Pressing SCROLL_LOCK by itself toggles the case of letters with the space
  # character replaced by an underline character, SUCH_AS_THIS.  This works
  # with the Colemak, Dvorak, or default keyboard layouts.  This assumes
  # that the CAPS_LOCK is not already on.  If CAPS_LOCK is on, then when
  # you toggle on SELECT_3, the letters will be in lower case and the space
  # character will be an underline, such_as_this.  If you press the Right Shift
  # key while in the SELECT_3 configuration, then the shift will be toggled off,
  # resulting in text such-as-this.  In this situation, press SCROLL_LOCK again
  # to turn the MINUS back into a SPACE and press the Right Shift key to release
  # the shift toggle.

  macro SCROLL_LOCK -shift -ctrl -alt -gui
    toggle_meta RSHIFT
    press SELECT_3
  endmacro

endblock

ifselect 3

remapblock
  SPACE MINUS
endblock
Title: Re: XT/AT/PS2/Terminal to USB Converter with NKRO
Post by: edlee on Fri, 01 May 2020, 01:05:32
If you want to create a macro for automatically entering text, such as a mailing address, it can be very tedious to spell out all of the PRESS commands in a Soarer configuration file.  I wrote code in Visual Basic for Applications for use in a Word document to automate the generation of the PRESS commands.

Code: [Select]
' This routine prompts the user to enter a string and then generates the corresponding
' key press commands for use in a macro in a configuration file for Soarer's converter
' for adapting a keyboard with a PS/2 interface cable to a USB port.  You can copy
' and paste the resulting code into a Soarer configuration file or use an include statement.
'
' This code is written in Visual Basic for Applications for use in a Microsoft Word
' document.  You can press Alt F11 while in Microsoft Word to enter the Visual Basic
' environment.  You can then select Module from the Insert menu and copy this code into
' the module and run the GeneratePresses() routine.  Depending on what version of
' Microsoft Word you have and what security settings are in place, you might need to
' enable macros.  Some versions of Word might require you to save the Word document
' with a *.docm file name extension to be able to execute Visual Basic macros.
'
' 01 May 2020 Edward Lee.
'
Sub GeneratePresses()
  Dim s As String
  Dim c As String
  Dim i As Integer
  Dim Shifted As Boolean
  Dim CharacterCount As Integer
 
  Shifted = False
  CharacterCount = 0
 
  s = InputBox("Enter a string:")
 
  For i = 1 To Len(s)
    c = Mid(s, i, 1)
   
    ' Is the character in upper case or shifted on the keyboard?
    If (c >= "A" And c <= "Z") Or c = "~" Or c = "!" Or c = "@" Or c = "#" Or c = "$" Or c = "%" Or c = "^" Or c = "&" Or c = "*" Or c = "(" Or c = ")" Or c = "_" Or c = "+" Or c = "{" Or c = "}" Or c = "|" Or c = ":" Or c = """" Or c = "<" Or c = ">" Or c = "?" Then
      ' If the shift state is not active, then activate shift
      If Not Shifted Then
        Shifted = True
        ActiveDocument.Content.InsertAfter "    set_meta LSHIFT" & Chr(13) & Chr(10)
      End If
    Else
      ' If the shift state is active, then deactivate shift
      If Shifted Then
        Shifted = False
        ActiveDocument.Content.InsertAfter "    clear_meta LSHIFT" & Chr(13) & Chr(10)
      End If
    End If
   
    ActiveDocument.Content.InsertAfter "    press " & Name(c) & Chr(13) & Chr(10)
    CharacterCount = CharacterCount + 1
  Next i
 
  ' If the shift state is active, then deactivate shift
  If Shifted Then
    Shifted = False
    ActiveDocument.Content.InsertAfter "    clear_meta LSHIFT" & Chr(13) & Chr(10)
  End If
 
  If CharacterCount > 63 Then ActiveDocument.Content.InsertAfter "  # Warning: The string is too long, requiring " & CharacterCount & " PRESS commands, which exceeds the limit of 63."
 
End Sub

' Given a character on a USA keyboard, this function
' returns the name to use in a PRESS command.
Function Name(c As String) As String
  Select Case c
    Case " "
      Name = "SPACE"
    Case "!"
      Name = "1" & Chr(9) & "# ! Exclamation"
    Case """"
      Name = "QUOTE" & Chr(9) & "# "" Double quote"
    Case "#"
      Name = "3" & Chr(9) & "# # Number sign"
    Case "$"
      Name = "4" & Chr(9) & "# $ Dollar sign"
    Case "%"
      Name = "5" & Chr(9) & "# % Percent"
    Case "&"
      Name = "7" & Chr(9) & "# & Ampersand"
    Case "'"
      Name = "QUOTE" & Chr(9) & "# ' Apostrophe or single quote"
    Case "("
      Name = "9" & Chr(9) & "# ( Opening parenthesis"
    Case ")"
      Name = "0" & Chr(9) & "# ) Closing parenthesis"
    Case "*"
      Name = "8" & Chr(9) & "# Asterisk"
    Case "+"
      Name = "EQUAL" & Chr(9) & "# Plus"
    Case ","
      Name = "COMMA" & Chr(9) & "# ,"
    Case "-"
      Name = "MINUS" & Chr(9) & "# -"
    Case "."
      Name = "PERIOD" & Chr(9) & "# ."
    Case "/"
      Name = "SLASH" & Chr(9) & "# / Forward slash"
    Case "0"
      Name = "0"
    Case "1"
      Name = "1"
    Case "2"
      Name = "2"
    Case "3"
      Name = "3"
    Case "4"
      Name = "4"
    Case "5"
      Name = "5"
    Case "6"
      Name = "6"
    Case "7"
      Name = "7"
    Case "8"
      Name = "8"
    Case "9"
      Name = "9"
    Case ":"
      Name = "SEMICOLON" & Chr(9) & "# : Colon"
    Case ";"
      Name = "SEMICOLON" & Chr(9) & "# ;"
    Case "<"
      Name = "COMMA" & Chr(9) & "# < Less than"
    Case "="
      Name = "EQUAL" & Chr(9) & "# ="
    Case ">"
      Name = "PERIOD" & Chr(9) & "# > Greater than"
    Case "?"
      Name = "SLASH" & Chr(9) & "# ? Question mark"
    Case "@"
      Name = "2" & Chr(9) & "# @ At sign"
    Case "A"
      Name = "A"
    Case "B"
      Name = "B"
    Case "C"
      Name = "C"
    Case "D"
      Name = "D"
    Case "E"
      Name = "E"
    Case "F"
      Name = "F"
    Case "G"
      Name = "G"
    Case "H"
      Name = "H"
    Case "I"
      Name = "I"
    Case "J"
      Name = "H"
    Case "K"
      Name = "K"
    Case "L"
      Name = "L"
    Case "M"
      Name = "M"
    Case "N"
      Name = "N"
    Case "O"
      Name = "O"
    Case "P"
      Name = "P"
    Case "Q"
      Name = "Q"
    Case "R"
      Name = "R"
    Case "S"
      Name = "S"
    Case "T"
      Name = "T"
    Case "U"
      Name = "U"
    Case "V"
      Name = "V"
    Case "W"
      Name = "W"
    Case "X"
      Name = "X"
    Case "Y"
      Name = "Y"
    Case "Z"
      Name = "Z"
    Case "["
      Name = "LEFT_BRACE" & Chr(9) & "# [ Opening square brace"
    Case "\"
      Name = "BACKSLASH" & Chr(9) & "# \"
    Case "]"
      Name = "RIGHT_BRACE" & Chr(9) & "# ] Closing square brace"
    Case "^"
      Name = "6" & Chr(9) & "# ^ Carat"
    Case "_"
      Name = "MINUS" & Chr(9) & "# _ Underline"
    Case "`"
      Name = "BACK_QUOTE" & Chr(9) & "# `"
    Case "a"
      Name = "a"
    Case "b"
      Name = "b"
    Case "c"
      Name = "c"
    Case "d"
      Name = "d"
    Case "e"
      Name = "e"
    Case "f"
      Name = "f"
    Case "g"
      Name = "g"
    Case "h"
      Name = "h"
    Case "i"
      Name = "i"
    Case "j"
      Name = "j"
    Case "k"
      Name = "k"
    Case "l"
      Name = "l"
    Case "m"
      Name = "m"
    Case "n"
      Name = "n"
    Case "o"
      Name = "o"
    Case "p"
      Name = "p"
    Case "q"
      Name = "q"
    Case "r"
      Name = "r"
    Case "s"
      Name = "s"
    Case "t"
      Name = "t"
    Case "u"
      Name = "u"
    Case "v"
      Name = "v"
    Case "w"
      Name = "w"
    Case "x"
      Name = "x"
    Case "y"
      Name = "y"
    Case "z"
      Name = "z"
    Case "{"
      Name = "LEFT_BRACE" & Chr(9) & "# { Opening curly brace"
    Case "|"
      Name = "BACKSLASH" & Chr(9) & "# | Vertical Pipe"
    Case "}"
      Name = "RIGHT_BRACE" & Chr(9) & "# Closing curly brace"
    Case "~"
      Name = "BACK_QUOTE" & Chr(9) & "# ~ Tilde"
    Case Else
      Name = "UNASSIGNED"
  End Select
End Function
Title: Re: XT/AT/PS2/Terminal to USB Converter with NKRO
Post by: edlee on Sat, 02 May 2020, 14:28:21
There is a bug in the, "hid_tokens.cpp", source file.  For some reason, Soarer commented out two lines for:

Code: [Select]
//{ "EXTRA_UNUSED_1",          0xB0 }, //  extra
//{ "EXTRA_UNUSED_2",          0xC1 }, //  extra

This causes the hid_token_list[] array indexes for the HID codes greater than 0xB0 to be decremented by 1 and the array indexes for the HID codes greater than 0xC1 to be decremented by another 1.  This causes the lookup_hid_token(int value) function to return the wrong HID name (token) for the HID values that are equal to or greater than 0xB0.  This potentially affects the, "scdis.cpp", program which uses the lookup_hid_token(int value) function to disassemble a binary *.scb file.

If the lookup_hid_token(int value) function is used in other source files which Soarer did not release, then those source files might be affected as well.
Title: Re: XT/AT/PS2/Terminal to USB Converter with NKRO
Post by: edlee on Sun, 03 May 2020, 23:34:02
You can use a female USB to male PS/2 KVM converter to attach to Soarer's converter to make Soarer's converter a USB to USB converter with all of Soarer's useful keyboard macro and remapping capabilities. There are 3 models that I was able to find on eBay:

Black Box kvusb-ps2

TRIPP LITE 0DT60002

NTI USB-PS2-R

I originally searched for something like, "USB PS/2 adapter", and waded through all of the listings for converters that work with opposite connectors with a female PS/2 to male USB connector.

The converters are priced in the range of $70 to $130. I am using the Tripp Lite 0DT60002 which has worked with a Rosewill RK-9000V2 (non-backlit, non-macro, PS/2 or USB) keyboard and a RK-9000V2 RGB (backlit, macro, USB) keyboard with USB cable. This Tripp Lite/Soarer converter combination is more stable than using the Rosewill RK-9000V2 (non-backlit) keyboard with PS/2 cable directly with Soarer's converter. The LEDs for Caps Lock, Scroll Lock, Num Lock do not properly function with the Rosewill RK-9000V2 (non-backlit) keyboard connected directly to Soarer's converter with a PS/2 cable, but the LED indicators do properly work with the Rosewill RK-9000V2 or Rosewill RK-9000V2 RGB keyboards connected by USB cable to the Tripp Lite converter which is then connected to Soarer's converter. I have also tried the Redragon Brahma Pro optical USB keyboard with the Tripp Lite/Soarer converter combination, and this keyboard works, too. You can use the built-in macro recording and playback capabilities of the Rosewill RK-9000V2 RGB and Redragon Brahma Pro keyboards which do not require any software and also use the macros of Soarer's converter. The non-backlit Rosewill RK-9000V2 keyboard version does not have any macro recording or playback capability. I do not like the slowness of the built-in macro playback on the Rosewill RK-9000V2 RGB keyboard or Redragon Brahma Pro keyboard. Soarer's macros play back much faster at full interface speed. I am still searching for a modern keyboard that can record and play back macros at full speed without any additional software to replace my Gateway Anykey keyboard, because some businesses do not allow unapproved software installation on their computers as a security measure. You might need the following two lines at the start of a Soarer configuration file to work with the Tripp Lite converter:

ifkeyboard 0000
force set2ext

ifkeyboard any

# set1 is the PC/XT keyboard scan code set.
# set2 is the AT keyboard scan code set.
# set2ext is the PS/2 keyboard scan code set.
# set3 is the 3179/318x/319x terminal keyboard scan code set.
Title: Re: XT/AT/PS2/Terminal to USB Converter with NKRO
Post by: DV on Tue, 05 May 2020, 17:31:30
Hello. I recently migrated to a new computer after my old one broke and the Soarer's converter is not compatible with my BIOS. It's an HP Z420 with BIOS version J61 v02.11. Any ideas on why this is happening?
Title: Re: XT/AT/PS2/Terminal to USB Converter with NKRO
Post by: fohat.digs on Tue, 05 May 2020, 18:48:50

some businesses do not allow unapproved software installation on their computers as a security measure


I don't know the answer to your question, but imagine where an actual breakout board is acceptable but an old generic rubber dome keyboard isn't!
   
Title: Re: XT/AT/PS2/Terminal to USB Converter with NKRO
Post by: edlee on Tue, 05 May 2020, 20:19:46
I doubt that anyone other than Soarer can answer your question, DV.

fohat.digs, my Soarer's converter is a seamless, professional looking PS/2 to USB converter which I purchased on eBay.  It is not a breakout box.  I don't think any business would have trouble with letting people use something like this, because Soarer's converter can be used without installing software.
Title: Re: XT/AT/PS2/Terminal to USB Converter with NKRO
Post by: edlee on Tue, 05 May 2020, 20:46:22
Hey, DV, I just thought of something.  Maybe your new computer doesn't supply enough power in the USB port for both Soarer's converter and the external keyboard to which Soarer's converter is attached.  You could try plugging your external keyboard with Soarer's converter into a powered USB hub and then plug the USB hub into the your new computer.
Title: Re: XT/AT/PS2/Terminal to USB Converter with NKRO
Post by: DV on Tue, 05 May 2020, 22:14:44
I don’t have an external USB hub, but it works in Windows perfectly, and in my laptop’s BIOS, but not on my desktop’s BIOS. Even if I swap keyboards in the setup utility, no dice.

EDIT: Forgot to mention this but the Model M I have is a 1395660 122-key terminal keyboard.
Title: Re: XT/AT/PS2/Terminal to USB Converter with NKRO
Post by: fohat.digs on Wed, 06 May 2020, 08:09:38

my Soarer's converter is a seamless, professional looking PS/2 to USB converter


You got one of Orihalcon's converter cables? That actually does have a very small circuit board inside it.

Go to the beginning of the thread and you see that Soarer designed his firmware for the Teensy 2.0, Orihalcon re-jiggered it to fit into a much smaller space with a physically smaller circuit.
Title: Re: XT/AT/PS2/Terminal to USB Converter with NKRO
Post by: TreeIsDeath on Fri, 29 May 2020, 23:23:21
I'm building an active converter adapter for an USB cherry G80 3000 series "2013-2017?" keyboard.
Standard 104 Keys and comes with a passive PS/2 converter.
NKRO works only with the passive converter. Plugging with USB directly disables it.
Power usage of 25mA typical.

Using a pro micro clone.

I'm a noob when concerning electronics. 
There is VCC,GND,CLOCK,DATA pin outs graphs on both the PS/2 and pro micro but nothing about pull-ups.
I didn't see any clear pictures in this thread of an finished one with pull-ups.

First Soarer recommended using 1k Ohm for long cables (https://geekhack.org/index.php?topic=17458.msg335414#msg335414). Not usually needed?
Then I see on hasu tmk ps2_usb wiki the pro micro needs an 1k-10k (https://github.com/tmk/tmk_keyboard/tree/master/converter/ps2_usb).  This is an much wider range.
Searching the web further, it seems 4.7k is the norm for pull-ups on USB tinkerware.

I've already soldered two 1/4W 2.4k Ohm resistors on the back of the pcb, One VCC to Clock, One VCC to DATA, picture below:
[attach=1]

Is this correctly used?
Is there any danger of using too strong pull-ups?
Title: Re: XT/AT/PS2/Terminal to USB Converter with NKRO
Post by: Tactile on Sat, 30 May 2020, 09:56:06
I'm building an active converter adapter for an USB cherry G80 3000 series "2013-2017?" keyboard.
Standard 104 Keys and comes with a passive PS/2 converter.
NKRO works only with the passive converter. Plugging with USB directly disables it.
Power usage of 25mA typical.

Using a pro micro clone.

I'm a noob when concerning electronics. 
There is VCC,GND,CLOCK,DATA pin outs graphs on both the PS/2 and pro micro but nothing about pull-ups.
I didn't see any clear pictures in this thread of an finished one with pull-ups.

First Soarer recommended using 1k Ohm for long cables (https://geekhack.org/index.php?topic=17458.msg335414#msg335414). Not usually needed?
Then I see on hasu tmk ps2_usb wiki the pro micro needs an 1k-10k (https://github.com/tmk/tmk_keyboard/tree/master/converter/ps2_usb).  This is an much wider range.
Searching the web further, it seems 4.7k is the norm for pull-ups on USB tinkerware.

I've already soldered two 1/4W 2.4k Ohm resistors on the back of the pcb, One VCC to Clock, One VCC to DATA, picture below:
(Attachment Link)

Is this correctly used?
Is there any danger of using too strong pull-ups?

The general rule is if your keyboard works with the converter, you don't need the pull-up resistors. They won't affect NKRO in any way.

I have installed Soarer's internally in quite a few different keyboards, using both Teensy & Pro Micro and never needed pull-up resistors. I also have a Soarer's converter on a breadboard using a Teensy. I've plugged many keyboards into this external setup & never needed pull-up resistors.

The value of the resistors is not critical. Your 2.4k should be fine.
Title: Re: XT/AT/PS2/Terminal to USB Converter with NKRO
Post by: suicidal_orange on Sat, 30 May 2020, 15:19:02

I've already soldered two 1/4W 2.4k Ohm resistors on the back of the pcb, One VCC to Clock, One VCC to DATA, picture below:
(Attachment Link)

Is this correctly used?

If you're thinking two resistors = double the resistance then no, that's not correct.  In parallel the same amount of current goes through each resistor so the resistance is actually halved to 1.2k.  If you put them in series (connect one to the other in a line) that would be 4.8k :)
Title: Re: XT/AT/PS2/Terminal to USB Converter with NKRO
Post by: superuser41 on Sat, 30 May 2020, 16:19:18

I've already soldered two 1/4W 2.4k Ohm resistors on the back of the pcb, One VCC to Clock, One VCC to DATA, picture below:
(Attachment Link)

Is this correctly used?

If you're thinking two resistors = double the resistance then no, that's not correct.  In parallel the same amount of current goes through each resistor so the resistance is actually halved to 1.2k.  If you put them in series (connect one to the other in a line) that would be 4.8k :)

Except these are not in parallel..
Title: Re: XT/AT/PS2/Terminal to USB Converter with NKRO
Post by: fohat.digs on Sat, 30 May 2020, 16:52:36
I was curious about this, too. If parallel is an "H" then what is a "Y"?
Title: Re: XT/AT/PS2/Terminal to USB Converter with NKRO
Post by: edlee on Sun, 14 June 2020, 16:16:57
Attached is the latest sample configuration file from me which uses most of the EEPROM memory of Soarer's Converter.  I learned how to use the norestoremeta clause and how to make macros repeat with the MAKE and BREAK commands.  I also learned how to use the MAKE and BREAK commands to make the CAPS LOCK key function like a layer key but with SELECT.  That makes the associated macros a lot cleaner without having to define macros for unused key codes or FAKE_XX codes.  This configuration file is set up so that it is almost impossible to activate the SCROLL LOCK, NUM LOCK, or CAPS LOCK by accident.  You have to press two keys to activate each function, such as:

NUM_LOCK SCROLL_LOCK to toggle SCROLL_LOCK
SCROLL_LOCK NUM_LOCK to toggle NUM_LOCK
SHIFT CAPS_LOCK to toggle CAPS_LOCK

The sample configuration file also contains macros for creating common code in Visual Basic, such as IF THEN ELSE, FOR NEXT, WHILE WEND, SELECT ... END SELECT.

I corrected the bug caused by Soarer commenting out the EXTRA_UNUSED_KEY_1  (0xB0) and EXTRA_UNUSED_KEY_2 (0xC1) codes in the, "hid_tokens.cpp", file.  I then recompiled the affected scas and scdis programs.  EXTRA_UNUSED_KEY_1  is also called FAKE_01.  EXTRA_UNUSED_KEY_2 is also called FAKE_18.

I have also included in the ZIP file a copy of my Generate Presses code for Visual Basic in Microsoft Word to make it easier to generate PRESS commands for a string of text.
Title: Re: XT/AT/PS2/Terminal to USB Converter with NKRO
Post by: DaWorm on Wed, 17 June 2020, 07:57:10
First post, forgive me if this has been covered, but if it has I was unable to come up with the right search terms for it.

I have several Dell AT101 keyboards (not AT101W) that I've been using for literally decades.  I've always struggled with USB to PS/2 converters, having to often unplug and replug when the keyboard inevitably quit working.  Which has, way too late is seems, led me to discovering the Soarer's keyboard adapter.  I'm not particularly concerned with remapping or macros (yet) I just want a more stable experience, and I have been led to believe this is the way to go.

I bought two premade adapters from an eBay seller, and hooked the first up to my Windows 10 machine at work.  So far, it works perfectly, but I don't have a whole lot of hours on it yet.  Where I'm having problems is at home on my Xubuntu Linux machine.  There, I am having two annoying problems.

First, I cannot get SHIFT ARROW functionality.  When in an editor, I often use SHIFT RIGHT or SHIFT DOWN to highlight text, then CTRL C to copy it.  With the cheap PS/2 converter this works fine, but with the Soarer's converter, it does not.  Other SHIFT functions, like accessing capital letters or punctuation characters work fine.

I downloaded hid_listen (and the 32 bit libusb needed to run it) for Linux and checked out what was going on.  What I saw was when I pressed either shift key, I got a + code, and when I released it I got the corresponding - code.  Same with the arrow keys, press get + code, release get - code, all as expected.  When I pressed either shift and then one of the direction arrows, however, what I saw was first the - code for the shift, then the + code for the arrow.  This would explain why I can't use that key combination for highlighting, I suppose, but why would I see that in the first place?  And more importantly, how can I make it stop? 

Also, this doesn't happen on the one on the Windows 10 machine at work, or at least I can SHIFT arrow highlight there anyway, I didn't hid_listen that combo as there was no need to.

I thought maybe the unit I bought may have had someone else's config file loaded into it, so I tried to use scrd to read out the current config file.  That's where I run into my second problem.  Whenever I use any of the utility programs, it appears to function, but then the keyboard freezes.  No more typing until I unplug the USB cable and put it back in.  I don't know if this is normal behavior on Linux or not.  I do have to use sudo to execute the commands.

Unfortunately I'm about to have a knee replacement surgery, and left the other unit at work and won't be able to go back for it for at least three weeks, so I can't swap them to see if the bad behavior stays with the converter or with the keyboard.  Both are the same model, purchased at the same time, so I doubt it is the keyboard, but I suppose it could be. 

Any help or suggestions appreciated.
Title: Re: XT/AT/PS2/Terminal to USB Converter with NKRO
Post by: edlee on Wed, 17 June 2020, 19:25:57
You can try my sample configuration file in the post above yours which will enable you to hold down the CAPS_LOCK key followed by one of the letters E, X, S, D for Up, Down, Left, Right arrow key equivalent functionality.  You can hold down CAPS_LOCK followed by the left shift key or right shift key followed by E, X, S, D to perform the equivalent of a shift arrow key combination.  If you are unable to run scas to assemble the configuration file or are unable to run scwr to write the assembled file to Soarer's converter, then there is not much you can do to fix your problem.  Do you have a Windows computer on which you can run the Windows versions of the scas and scwr programs?
Title: Re: XT/AT/PS2/Terminal to USB Converter with NKRO
Post by: knightjp on Sun, 12 July 2020, 13:23:04
Would this allow for the function cluster on the Sun Type 7 keyboard to start working with Windows?
Title: Re: XT/AT/PS2/Terminal to USB Converter with NKRO
Post by: DaWorm on Mon, 13 July 2020, 12:30:18
If you are unable to run scas to assemble the configuration file or are unable to run scwr to write the assembled file to Soarer's converter, then there is not much you can do to fix your problem.
Sorry it took so long, as noted, had a knee replacement, haven't been back on this machine since.  Now that I'm back, things are even odder.  I know for sure I could run scinfo on this, and got back reasonable results.  Now, scinfo (or scwr) says it can't find the converter.  Yet I'm typing with it right now!  Also, Shift-Cursor keys are now working properly.  Baffling. 

lsusb shows the following:

Code: [Select]
Bus 003 Device 004: ID 16c0:047d Van Ooijen Technische Informatica Teensy Keyboard+Debug

Do you have a Windows computer on which you can run the Windows versions of the scas and scwr programs?

I do, but it will take me a bit to get everything downloaded on it.
Title: Re: XT/AT/PS2/Terminal to USB Converter with NKRO
Post by: edlee on Mon, 13 July 2020, 19:16:48
I'm unfamiliar with the Sun Type 7 keyboard, but the general procedure for getting the keys working would be to run the, "hid_listen.exe", program and then press the keys that you want to use with Soarer's converter connected and see what pairs of digits are preceded by the + sign are output by the hid_listen program in response to the key presses, such as +F9 or +E7.  At the bottom of any one of my configuration files is a copy of the names and codes of the keys that you can use in remapping keys or in assigning macros to the keys.  There are some keyboards that output more than one pair of numbers for a single key press.  I think I once read a post by Soarer who got around that problem by mapping the first key code to a layer function key and then handling the second key code in the layer's key remap section.
Title: Re: XT/AT/PS2/Terminal to USB Converter with NKRO
Post by: kelvinhall05 on Fri, 17 July 2020, 21:14:51
Any idea if this will work with a Wang 725? If so, does someone have a pinout of the Wang's connector? Mine doesn't have the cable :(
Title: Re: XT/AT/PS2/Terminal to USB Converter with NKRO
Post by: edlee on Mon, 20 July 2020, 22:25:42
The following web site contains information about Wang keyboards, but I don't know if the information applies to your Wang 725 keyboard:

https://www.seasip.info/VintagePC/wang_kb.html (https://www.seasip.info/VintagePC/wang_kb.html)
Title: Re: XT/AT/PS2/Terminal to USB Converter with NKRO
Post by: ZyBeR on Sun, 23 August 2020, 11:29:16
Is there anyway to rename the controller from "Soarer's Keyboard converter (Soarer)"? It would be nice to have the actually keyboard manufacturer and model name instead.

Can I control the Num Lock or Scroll Lock leds and use them as layer indicators?
Title: Re: XT/AT/PS2/Terminal to USB Converter with NKRO
Post by: ivanthetolerable on Thu, 24 September 2020, 19:35:57
Hey guys, is it possible to modify the firmware to change the pin for the teensy? I have an old teensy I tried to use 4 years ago and I destroyed the d0 pin... I hate to buy a new one just because of that.
Title: Re: XT/AT/PS2/Terminal to USB Converter with NKRO
Post by: Mikhail on Mon, 16 November 2020, 12:12:51
Help
I need to convert Siemens F500, that probably XT.
Also I have few keyboards with AT/XT switches to test.
I use Teensy 2.0 and ProMicro.
I got all correct in AT mode.
But in XT mode all keyboards work with follow issues:
1. R. Alt R. Ctrl - Left ones
2. Ins, del, home, end, pg dn, pg up, arrows - all work as same keys on numpad section
2. When Num lock ON follow keys work same but with Left Shift.
3. Enter on Numpad - Enter, "/" on numpad - "/?" on alphas.
Title: Re: XT/AT/PS2/Terminal to USB Converter with NKRO
Post by: hasu on Mon, 16 November 2020, 18:36:48
Mikhail,
Does the Siemens F500 has AT/XT switch? If so you better use it as AT keyboard.

It seems to fail to handle extended scan codes(E0 xx), this converter doesn't support them perhaps?
IBM PC/XT keyboard doesn't have those keys originally and they were added on enhanced keyobard later on.


EDIT: You may try my converter firmware also to see difference. https://geekhack.org/index.php?topic=103648.0
Title: Re: XT/AT/PS2/Terminal to USB Converter with NKRO
Post by: Mikhail on Mon, 16 November 2020, 21:37:17
Hasu

Thank you, your firmware are working on Chicony kb-5191 in XT mode!
Only Pause/Break key are not response (press but not release).
Siemens F500 will try later (same).
Siemens F500 has no AT/XT switch, otherwise it wouldn't make sense for me to make a converter.

Can you fix the Pause/Break issue?
Title: Re: XT/AT/PS2/Terminal to USB Converter with NKRO
Post by: hasu on Tue, 17 November 2020, 19:30:50
Yes, I'm happy to fix that. Post this result in my thread. Also 'hid_listen' debug output of the F500 would be helful.
https://geekhack.org/index.php?topic=103648.0

Hasu

Thank you, your firmware are working on Chicony kb-5191 in XT mode!
Only Pause/Break key are not response (press but not release).
Siemens F500 will try later (same).
Siemens F500 has no AT/XT switch, otherwise it wouldn't make sense for me to make a converter.

Can you fix the Pause/Break issue?

Title: Re: XT/AT/PS2/Terminal to USB Converter with NKRO
Post by: mech0nly on Sat, 14 August 2021, 08:50:42
Hi, apologies for the necro.

Is it possible to adjust debounce value? I can't find any references anywhere for it.

Thanks in advance!
Title: Re: XT/AT/PS2/Terminal to USB Converter with NKRO
Post by: hasu on Sat, 14 August 2021, 09:48:26
No probably. Keyboard converter doesn't/can't debounce in general.

Title: Re: XT/AT/PS2/Terminal to USB Converter with NKRO
Post by: mech0nly on Sun, 15 August 2021, 11:05:58
No probably. Keyboard converter doesn't/can't debounce in general.

Thanks hasu!
Title: Re: XT/AT/PS2/Terminal to USB Converter with NKRO
Post by: Matty on Sat, 21 August 2021, 00:25:18
Does anyone know how I can adapt this to the Arduino Beetle board/Arduino Leonardo Tiny? The only pins I have available for clock and data are A0, A1, A2, D9, D10, D11.

Any advice is greatly appreciated  :D

Cheers
Title: Re: XT/AT/PS2/Terminal to USB Converter with NKRO
Post by: Zefix on Fri, 22 October 2021, 11:02:24
HELP REQUESTED
I'm trying to compile a empty.sc file that I moved into my Soarer_sctools_v1.10_macosx folder to test and then eventually remap keys using my own sc file.

when I run

$ ./scas empty.sc empty.scb

"zsh: bad CPU type in executable: ./scas"

Anybody know how to troubleshoot this?
(imac 2019 running macOS Big Sur)
Title: Re: XT/AT/PS2/Terminal to USB Converter with NKRO
Post by: hasu on Fri, 22 October 2021, 21:20:00
The tools for Mac are 32-bit executable binary files and recent versions of MacOS(10.15-) doens't support 32-bit anymore.
You will have to compile binary files from srouce codes with Xcode yourself  or you can find them here.

https://deskthority.net/viewtopic.php?f=7&t=25309
Title: Re: XT/AT/PS2/Terminal to USB Converter with NKRO
Post by: Zefix on Fri, 22 October 2021, 22:49:00
The tools for Mac are 32-bit executable binary files and recent versions of MacOS(10.15-) doens't support 32-bit anymore.
You will have to compile binary files from srouce codes with Xcode yourself  or you can find them here.

https://deskthority.net/viewtopic.php?f=7&t=25309

Perfect. Thanks for the link the zip file listed near the top works great! Rip soarer's outdated code haha

PS. this message was brought to you courtesy of a 1985 IBM Model F AT keyboard :P
Title: Re: XT/AT/PS2/Terminal to USB Converter with NKRO
Post by: sofakng on Wed, 17 November 2021, 18:30:51
What's the cleanest way (ie. case, parts) to make one of these adapters?

I'm looking for an atmega32u4 that would fit inside a USB male connector house but can't find anything.

I see that some people have found parts (ie. sudoboy, orihalcon, etc) but are selling their cables for $40 which seems a bit much.
Title: Re: XT/AT/PS2/Terminal to USB Converter with NKRO
Post by: sofakng on Fri, 19 November 2021, 15:38:00
Another question ... do I connect the PS/2 shield wire and GND pins together?
Title: Re: XT/AT/PS2/Terminal to USB Converter with NKRO
Post by: edlee on Sat, 20 November 2021, 07:26:21
That sounds similar to what I did with my first custom Soarer's converter.  The issue I had with my first custom Soarer's converter was it did not reliably work with an IBM Model M keyboard or with an active USB to PS/2 converter in series with Soarer's converter.  So, my second Soarer's converter had the optional pull up resistors that Soarer mentions in his documentation where you put extra 1K Ohm resistors between Clock and +5V and between Data and +5V.  I used a Teensy++ 2.0 for extra macro memory on a perf board with traces made with wire glue between conductors on the perforations for the extra resistors.  Wire glue is a black, I think carbon-based, substance, so no soldering was required.
Title: Re: XT/AT/PS2/Terminal to USB Converter with NKRO
Post by: suicidal_orange on Sun, 01 May 2022, 06:23:48
I've locked this thread as it keeps being spammed - if you want to post in it please report this post (https://geekhack.org/index.php?action=reporttm;topic=17458.1659;msg=3123162) and someone will unlock it.  Sorry for the inconvenience!
Title: Re: XT/AT/PS2/Terminal to USB Converter with NKRO
Post by: flipkey on Tue, 18 July 2023, 16:36:41
I guess Soarer's Converters are being manufactured now, because the ones I found online are from sellers who don't know what microcontroller is inside, and the listings all seem to share the same photos. Here's an example:

(https://images4.imagebam.com/40/a2/40/MEMWK7W_o.jpg)

I bought one of these and wrote up what I learned about it over at deskthority (https://deskthority.net/viewtopic.php?p=515222#p515222). I'm sharing it here in case others find themselves in a similar situation and want to identify what they have on their hands.

The one I bought responded to scinfo as running code version 1.12, which is the latest version number, but I wanted to overwrite it with Soarer's original hex file because I don't trust preinstalled firmware from random sellers. Also, the device was producing key events when plugged in, which showed up in my terminal as repeating F7 until I pressed a key, and I hoped that clean firmware might fix it.

Forum consensus was that the microcontroller was most likely an ATmega32U4, but none of dfu-loader, avrdude, or teensy-loader-cli recognized it as that MCU, nor as any of the other MCU names found in Soarer's docs. To make this work, I would have to figure out which firmware hex file to use, and find a tool that could upload it.

To narrow down the microcontroller possibilities, I compared the data sheets for each of the chips supported by Soarer's firmware with these values reported by scinfo:
 
SRAM Size: 2816 bytes
SRAM Free: 1806 bytes
EEPROM Size: 1024 bytes
EEPROM Free: 1020 bytes

The AT90USB1286, AT90USB646, and ATmega16U4 data sheets all list sizes significantly different from those. The ATmega32U4 sheet matches that 1K EEPROM size exactly, but lists only 2.5K SRAM, which doesn't quite match the 2.75K shown by scinfo. However, it lists a start address at the 0.25K mark, which could explain the discrepancy. That seemed like my best bet.

The device showed up as USB ID 16c0:047d in normal mode and 16c0:05df in bootloader mode (after running the scboot tool). That second ID appears in several unrelated projects online, probably because it's a popular ID to use for homebrew projects. Among them, I found these BootloadHID instructions (https://github.com/qmk/qmk_firmware/blob/master/docs/flashing_bootloadhid.md). That's no guarantee, of course, but I decided to risk bricking the device and try the bootloadHID (https://github.com/whiteneon/bootloadHID) command line tool.

The guesswork and risk paid off. It worked.

Keyboard input was broken after flashing the firmware, but uploading a blank config with scwr restored it.

Some of scinfo's reported values changed after flashing the official firmware. I'll highlight the fields that were different when the pre-installed version was running:

Protocol Version: v1.00 (unchanged)
Code Version: v1.12 (unchanged)
Max Settings Version: v1.01 (unchanged)
Current Settings Version: v0.00 -> v1.01
SRAM Size: 2816 -> 2560 bytes
SRAM Free: 1806 -> 1809 bytes
EEPROM Size: 1024 bytes (unchanged)
EEPROM Free: 1020 -> 1016 bytes

What's more, the flood of F7 keystrokes when plugging it in is now gone. I wonder why the firmware this device shipped with was doing that. Corrupted data? Malware? It's too bad I had no way of dumping that firmware before replacing it; a comparison with Soarer's files might have revealed something interesting.

In any case, the sleuthing and a little risk paid off. It's working well now. I hope this info helps someone else. :)