Author Topic: XT/AT/PS2/Terminal to USB Converter with NKRO  (Read 893780 times)

0 Members and 1 Guest are viewing this topic.

Offline Soarer

  • * Moderator
  • Thread Starter
  • Posts: 1918
  • Location: UK
Re: XT/AT/PS2/Terminal to USB Converter with NKRO
« Reply #500 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 last year, but of course, there's no pics in it now :(

Offline Krogenar

  • The Kontrarian
  • * Esteemed Elder
  • Posts: 1266
  • Location: Eastchester, NY
  • "DO NOT BRING YOUR EVIL HERE." -Swamp Thing
    • Buried Planet
Re: XT/AT/PS2/Terminal to USB Converter with NKRO
« Reply #501 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
GeekHack Artwork Resources | The Living GeekHack Logo Thread | Signature Plastics ABS Chip Scanning Project | Krog Flocks Around | Keyboard Color Scheme Archive | [GB] PBT DyeSub DSA Granite Set
More
Quote from: Samuel Adams
"If ye love wealth better than liberty, the tranquility of servitude better than the animating contest of freedom, go home from us in peace. We ask not your counsels or your arms. Crouch down and lick the hands which feed you. May your chains set lightly upon you, and may posterity forget that you were our countrymen."

Offline Soarer

  • * Moderator
  • Thread Starter
  • Posts: 1918
  • Location: UK
Re: XT/AT/PS2/Terminal to USB Converter with NKRO
« Reply #502 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).

Offline oTurtlez

  • DAT ZACKATTACK
  • Posts: 586
  • Location: Rhode Island
  • Fo' Realforce
Re: XT/AT/PS2/Terminal to USB Converter with NKRO
« Reply #503 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
« Last Edit: Tue, 25 September 2012, 21:30:02 by oTurtlez »
TOO BAD FOR YOU

              Phantom 62g MX Whites    

Offline Soarer

  • * Moderator
  • Thread Starter
  • Posts: 1918
  • Location: UK
Re: XT/AT/PS2/Terminal to USB Converter with NKRO
« Reply #504 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:



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!

Offline oTurtlez

  • DAT ZACKATTACK
  • Posts: 586
  • Location: Rhode Island
  • Fo' Realforce
Re: XT/AT/PS2/Terminal to USB Converter with NKRO
« Reply #505 on: Wed, 26 September 2012, 13:57:28 »
Heres another pic focusing more on the traces.

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.



Thanks a bunch for all of the help by the way
TOO BAD FOR YOU

              Phantom 62g MX Whites    

Offline Soarer

  • * Moderator
  • Thread Starter
  • Posts: 1918
  • Location: UK
Re: XT/AT/PS2/Terminal to USB Converter with NKRO
« Reply #506 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.

Offline oTurtlez

  • DAT ZACKATTACK
  • Posts: 586
  • Location: Rhode Island
  • Fo' Realforce
Re: XT/AT/PS2/Terminal to USB Converter with NKRO
« Reply #507 on: Wed, 26 September 2012, 14:45:47 »
Traces of the 14 pin --->

The 40-pin is an 8048 and the 14 pin reads 6A1 8(New line)HD74LS125AP
TOO BAD FOR YOU

              Phantom 62g MX Whites    

Offline Soarer

  • * Moderator
  • Thread Starter
  • Posts: 1918
  • Location: UK
Re: XT/AT/PS2/Terminal to USB Converter with NKRO
« Reply #508 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 :)

Offline oTurtlez

  • DAT ZACKATTACK
  • Posts: 586
  • Location: Rhode Island
  • Fo' Realforce
Re: XT/AT/PS2/Terminal to USB Converter with NKRO
« Reply #509 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
« Last Edit: Wed, 26 September 2012, 16:41:32 by alaricljs »
TOO BAD FOR YOU

              Phantom 62g MX Whites    

Offline oTurtlez

  • DAT ZACKATTACK
  • Posts: 586
  • Location: Rhode Island
  • Fo' Realforce
Re: XT/AT/PS2/Terminal to USB Converter with NKRO
« Reply #510 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?
TOO BAD FOR YOU

              Phantom 62g MX Whites    

Offline Soarer

  • * Moderator
  • Thread Starter
  • Posts: 1918
  • Location: UK
Re: XT/AT/PS2/Terminal to USB Converter with NKRO
« Reply #511 on: Wed, 26 September 2012, 17:04:11 »
Bah :(

Is it giving any output to hid_listen when you press keys?

Also, with hid_listen running, what gets printed when you connect the converter to USB?

Offline oTurtlez

  • DAT ZACKATTACK
  • Posts: 586
  • Location: Rhode Island
  • Fo' Realforce
Re: XT/AT/PS2/Terminal to USB Converter with NKRO
« Reply #512 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.
« Last Edit: Wed, 26 September 2012, 18:04:16 by oTurtlez »
TOO BAD FOR YOU

              Phantom 62g MX Whites    

Offline fohat.digs

  • * Elevated Elder
  • Posts: 6462
  • Location: 35°55'N, 83°53'W
  • weird funny old guy
Re: XT/AT/PS2/Terminal to USB Converter with NKRO
« Reply #513 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?
State Freedom Caucus News 2024
Missouri state Senator Nick Schroer sponsors a bill that would allow senators to duel one another — in the Senate chambers! – legally.

Offline oTurtlez

  • DAT ZACKATTACK
  • Posts: 586
  • Location: Rhode Island
  • Fo' Realforce
Re: XT/AT/PS2/Terminal to USB Converter with NKRO
« Reply #514 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.
TOO BAD FOR YOU

              Phantom 62g MX Whites    

Offline Halvar

  • Posts: 403
  • Location: Germany
Re: XT/AT/PS2/Terminal to USB Converter with NKRO
« Reply #515 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









« Last Edit: Wed, 03 October 2012, 11:53:21 by Halvar »

Offline Soarer

  • * Moderator
  • Thread Starter
  • Posts: 1918
  • Location: UK
Re: XT/AT/PS2/Terminal to USB Converter with NKRO
« Reply #516 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 :(

Offline oTurtlez

  • DAT ZACKATTACK
  • Posts: 586
  • Location: Rhode Island
  • Fo' Realforce
Re: XT/AT/PS2/Terminal to USB Converter with NKRO
« Reply #517 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.
TOO BAD FOR YOU

              Phantom 62g MX Whites    

Offline oTurtlez

  • DAT ZACKATTACK
  • Posts: 586
  • Location: Rhode Island
  • Fo' Realforce
Re: XT/AT/PS2/Terminal to USB Converter with NKRO
« Reply #518 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?
TOO BAD FOR YOU

              Phantom 62g MX Whites    

Offline Soarer

  • * Moderator
  • Thread Starter
  • Posts: 1918
  • Location: UK
Re: XT/AT/PS2/Terminal to USB Converter with NKRO
« Reply #519 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!!

Offline oTurtlez

  • DAT ZACKATTACK
  • Posts: 586
  • Location: Rhode Island
  • Fo' Realforce
Re: XT/AT/PS2/Terminal to USB Converter with NKRO
« Reply #520 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.)
TOO BAD FOR YOU

              Phantom 62g MX Whites    

Offline Krogenar

  • The Kontrarian
  • * Esteemed Elder
  • Posts: 1266
  • Location: Eastchester, NY
  • "DO NOT BRING YOUR EVIL HERE." -Swamp Thing
    • Buried Planet
Re: XT/AT/PS2/Terminal to USB Converter with NKRO
« Reply #521 on: Thu, 27 September 2012, 13:08:12 »
How would you know if a keyboards controller were faulty, broken?
GeekHack Artwork Resources | The Living GeekHack Logo Thread | Signature Plastics ABS Chip Scanning Project | Krog Flocks Around | Keyboard Color Scheme Archive | [GB] PBT DyeSub DSA Granite Set
More
Quote from: Samuel Adams
"If ye love wealth better than liberty, the tranquility of servitude better than the animating contest of freedom, go home from us in peace. We ask not your counsels or your arms. Crouch down and lick the hands which feed you. May your chains set lightly upon you, and may posterity forget that you were our countrymen."

Offline Soarer

  • * Moderator
  • Thread Starter
  • Posts: 1918
  • Location: UK
Re: XT/AT/PS2/Terminal to USB Converter with NKRO
« Reply #522 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.

Offline Soarer

  • * Moderator
  • Thread Starter
  • Posts: 1918
  • Location: UK
Re: XT/AT/PS2/Terminal to USB Converter with NKRO
« Reply #523 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 :-)

Offline Soarer

  • * Moderator
  • Thread Starter
  • Posts: 1918
  • Location: UK
Re: XT/AT/PS2/Terminal to USB Converter with NKRO
« Reply #524 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...



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



From the IBM PS/2 Technical Reference...


« Last Edit: Sat, 29 September 2012, 16:56:09 by Soarer »

Offline Krogenar

  • The Kontrarian
  • * Esteemed Elder
  • Posts: 1266
  • Location: Eastchester, NY
  • "DO NOT BRING YOUR EVIL HERE." -Swamp Thing
    • Buried Planet
Re: XT/AT/PS2/Terminal to USB Converter with NKRO
« Reply #525 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
GeekHack Artwork Resources | The Living GeekHack Logo Thread | Signature Plastics ABS Chip Scanning Project | Krog Flocks Around | Keyboard Color Scheme Archive | [GB] PBT DyeSub DSA Granite Set
More
Quote from: Samuel Adams
"If ye love wealth better than liberty, the tranquility of servitude better than the animating contest of freedom, go home from us in peace. We ask not your counsels or your arms. Crouch down and lick the hands which feed you. May your chains set lightly upon you, and may posterity forget that you were our countrymen."

Offline Soarer

  • * Moderator
  • Thread Starter
  • Posts: 1918
  • Location: UK
Re: XT/AT/PS2/Terminal to USB Converter with NKRO
« Reply #526 on: Wed, 03 October 2012, 10:50:12 »
That's good to hear! Let's have some pics :D

Offline Soarer

  • * Moderator
  • Thread Starter
  • Posts: 1918
  • Location: UK
Re: XT/AT/PS2/Terminal to USB Converter with NKRO
« Reply #527 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...

5384-0

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

5386-1

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.
« Last Edit: Wed, 03 October 2012, 11:27:32 by Soarer »

Offline __red__

  • Posts: 194
Re: XT/AT/PS2/Terminal to USB Converter with NKRO
« Reply #528 on: Thu, 04 October 2012, 08:14:57 »
Any sign of bulging or other physical defecT?

Offline Soarer

  • * Moderator
  • Thread Starter
  • Posts: 1918
  • Location: UK
Re: XT/AT/PS2/Terminal to USB Converter with NKRO
« Reply #529 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!!

Offline page2pagepro

  • Posts: 2
  • Location: Austin, TX
    • Web hosting
Re: XT/AT/PS2/Terminal to USB Converter with NKRO
« Reply #530 on: Fri, 05 October 2012, 13:54:31 »
Terminal keyboards usually have a 5 pin, 270 degree, DIN connector...
Show Image


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

Here's the pin-out I used (using original cable and Teensy 2.0)


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, but I am trying to map the keyboard to be more ANSI compliant. thx!
« Last Edit: Fri, 05 October 2012, 13:59:52 by page2pagepro »

Offline Soarer

  • * Moderator
  • Thread Starter
  • Posts: 1918
  • Location: UK
Re: XT/AT/PS2/Terminal to USB Converter with NKRO
« Reply #531 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, 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 helping out another new user, which might be helpful to you as well.
« Last Edit: Sat, 06 October 2012, 10:51:24 by Soarer »

Offline Soarer

  • * Moderator
  • Thread Starter
  • Posts: 1918
  • Location: UK
Re: XT/AT/PS2/Terminal to USB Converter with NKRO
« Reply #532 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...



That's even faster than 8_INCH_FLOPPY's weirdo Monterey!

Here's an IBM PC keyboard for comparison, where clock is low for about 30 microseconds...

5567-1

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.
« Last Edit: Sat, 06 October 2012, 11:29:45 by Soarer »

Offline page2pagepro

  • Posts: 2
  • Location: Austin, TX
    • Web hosting
Re: XT/AT/PS2/Terminal to USB Converter with NKRO
« Reply #533 on: Sat, 13 October 2012, 18:02:06 »
Anti-Ghosting with Teensy?

Using tool, 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.



My results are here: 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!

Offline Soarer

  • * Moderator
  • Thread Starter
  • Posts: 1918
  • Location: UK
Re: XT/AT/PS2/Terminal to USB Converter with NKRO
« Reply #534 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 :(

Offline __red__

  • Posts: 194
Re: Re: XT/AT/PS2/Terminal to USB Converter with NKRO
« Reply #535 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.

Offline Soarer

  • * Moderator
  • Thread Starter
  • Posts: 1918
  • Location: UK
Re: XT/AT/PS2/Terminal to USB Converter with NKRO
« Reply #536 on: Sun, 14 October 2012, 10:55:49 »
Thanks red!

Actually, I've already got this one with a wing... here's some sniffing! ;D

But mostly for converter stuff I just use a two channel 'scope. 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

« Last Edit: Sun, 14 October 2012, 10:59:11 by Soarer »

Offline Krogenar

  • The Kontrarian
  • * Esteemed Elder
  • Posts: 1266
  • Location: Eastchester, NY
  • "DO NOT BRING YOUR EVIL HERE." -Swamp Thing
    • Buried Planet
Re: XT/AT/PS2/Terminal to USB Converter with NKRO
« Reply #537 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!




GeekHack Artwork Resources | The Living GeekHack Logo Thread | Signature Plastics ABS Chip Scanning Project | Krog Flocks Around | Keyboard Color Scheme Archive | [GB] PBT DyeSub DSA Granite Set
More
Quote from: Samuel Adams
"If ye love wealth better than liberty, the tranquility of servitude better than the animating contest of freedom, go home from us in peace. We ask not your counsels or your arms. Crouch down and lick the hands which feed you. May your chains set lightly upon you, and may posterity forget that you were our countrymen."

Offline Halvar

  • Posts: 403
  • Location: Germany
Re: XT/AT/PS2/Terminal to USB Converter with NKRO
« Reply #538 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

« Last Edit: Mon, 15 October 2012, 01:12:45 by Halvar »

Offline Soarer

  • * Moderator
  • Thread Starter
  • Posts: 1918
  • Location: UK
Re: XT/AT/PS2/Terminal to USB Converter with NKRO
« Reply #539 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.

Offline urbanus

  • Posts: 110
  • Location: Sydney, Australia
Re: XT/AT/PS2/Terminal to USB Converter with NKRO
« Reply #540 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.

Offline Krogenar

  • The Kontrarian
  • * Esteemed Elder
  • Posts: 1266
  • Location: Eastchester, NY
  • "DO NOT BRING YOUR EVIL HERE." -Swamp Thing
    • Buried Planet
Re: XT/AT/PS2/Terminal to USB Converter with NKRO
« Reply #541 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:
6128-0

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!
« Last Edit: Mon, 15 October 2012, 09:17:19 by Krogenar »
GeekHack Artwork Resources | The Living GeekHack Logo Thread | Signature Plastics ABS Chip Scanning Project | Krog Flocks Around | Keyboard Color Scheme Archive | [GB] PBT DyeSub DSA Granite Set
More
Quote from: Samuel Adams
"If ye love wealth better than liberty, the tranquility of servitude better than the animating contest of freedom, go home from us in peace. We ask not your counsels or your arms. Crouch down and lick the hands which feed you. May your chains set lightly upon you, and may posterity forget that you were our countrymen."

Offline alaricljs

  • I be WOT'ing all day...
  • ** Moderator Emeritus
  • Posts: 3715
  • Location: NE US
Re: XT/AT/PS2/Terminal to USB Converter with NKRO
« Reply #542 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.
Filco w/ Imsto thick PBT
Ducky 1087XM PCB+Plate, w/ Matias "Quiet Click" spring-swapped w/ XM Greens

Offline Krogenar

  • The Kontrarian
  • * Esteemed Elder
  • Posts: 1266
  • Location: Eastchester, NY
  • "DO NOT BRING YOUR EVIL HERE." -Swamp Thing
    • Buried Planet
Re: XT/AT/PS2/Terminal to USB Converter with NKRO
« Reply #543 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
6172-0

 ;D

And now my version:
6168-16170-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.
« Last Edit: Mon, 15 October 2012, 17:20:51 by Krogenar »
GeekHack Artwork Resources | The Living GeekHack Logo Thread | Signature Plastics ABS Chip Scanning Project | Krog Flocks Around | Keyboard Color Scheme Archive | [GB] PBT DyeSub DSA Granite Set
More
Quote from: Samuel Adams
"If ye love wealth better than liberty, the tranquility of servitude better than the animating contest of freedom, go home from us in peace. We ask not your counsels or your arms. Crouch down and lick the hands which feed you. May your chains set lightly upon you, and may posterity forget that you were our countrymen."

Offline Soarer

  • * Moderator
  • Thread Starter
  • Posts: 1918
  • Location: UK
Re: XT/AT/PS2/Terminal to USB Converter with NKRO
« Reply #544 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.

Offline Krogenar

  • The Kontrarian
  • * Esteemed Elder
  • Posts: 1266
  • Location: Eastchester, NY
  • "DO NOT BRING YOUR EVIL HERE." -Swamp Thing
    • Buried Planet
Re: XT/AT/PS2/Terminal to USB Converter with NKRO
« Reply #545 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!
GeekHack Artwork Resources | The Living GeekHack Logo Thread | Signature Plastics ABS Chip Scanning Project | Krog Flocks Around | Keyboard Color Scheme Archive | [GB] PBT DyeSub DSA Granite Set
More
Quote from: Samuel Adams
"If ye love wealth better than liberty, the tranquility of servitude better than the animating contest of freedom, go home from us in peace. We ask not your counsels or your arms. Crouch down and lick the hands which feed you. May your chains set lightly upon you, and may posterity forget that you were our countrymen."

Offline Halvar

  • Posts: 403
  • Location: Germany
Re: XT/AT/PS2/Terminal to USB Converter with NKRO
« Reply #546 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...)


Offline Krogenar

  • The Kontrarian
  • * Esteemed Elder
  • Posts: 1266
  • Location: Eastchester, NY
  • "DO NOT BRING YOUR EVIL HERE." -Swamp Thing
    • Buried Planet
Re: XT/AT/PS2/Terminal to USB Converter with NKRO
« Reply #547 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.
GeekHack Artwork Resources | The Living GeekHack Logo Thread | Signature Plastics ABS Chip Scanning Project | Krog Flocks Around | Keyboard Color Scheme Archive | [GB] PBT DyeSub DSA Granite Set
More
Quote from: Samuel Adams
"If ye love wealth better than liberty, the tranquility of servitude better than the animating contest of freedom, go home from us in peace. We ask not your counsels or your arms. Crouch down and lick the hands which feed you. May your chains set lightly upon you, and may posterity forget that you were our countrymen."

Offline Soarer

  • * Moderator
  • Thread Starter
  • Posts: 1918
  • Location: UK
Re: XT/AT/PS2/Terminal to USB Converter with NKRO
« Reply #548 on: Tue, 16 October 2012, 15:06:45 »
Nothing exciting... it's just the Window's menu key.

Offline Halvar

  • Posts: 403
  • Location: Germany