Author Topic: IBM 1386887 (3179 terminal) keyboard conversion  (Read 93030 times)

0 Members and 1 Guest are viewing this topic.

Offline kishy

  • Thread Starter
  • Posts: 1576
  • Location: Windsor, ON Canada
  • Eye Bee M
    • http://kishy.ca/
IBM 1386887 (3179 terminal) keyboard conversion
« on: Mon, 10 August 2009, 19:02:21 »
What This Thread is About:
Converting 3179 (and compatible) terminal keyboards for use with the AT or PS/2 interface
There are two "halves" to this - hardware and software.
Thread details hardware rather thoroughly.
Software is still a bit hairy - throw in some questions if you need a hand, I am happy to help.
The software 'half' consists of two things - replacing/modifying a driver and remapping keys through the Windows registry.

Progress You Can Attain By Following This Thread:
Almost 100% - there is still no typematic repeat, however.

This mod can be done by users of Linux or Windows (I can verify my own success for Win2k/XP users only, though)
Chances are good that users with Hackintosh setups will likely not succeed.

---

A proper, more direct write up can be found here.
This is the information/discussion/theorizing thread for that mod, terminal keyboards in general, and any potentially relevant "stuff".

---

Before You Continue

It is highly recommended that you have an extra, "unimportant" computer or motherboard available for testing that your wiring is correct. If the wiring is not correct, you can and possibly will permanently destroy the PS/2 keyboard interface on your computer!

Unfortunately, there will be some victims in the quest for terminal board use on PCs. Hopefully we can reduce the effect so it is only unwanted extra hardware being victimized, not people's "daily driver" computers.

You have been warned - proceed with caution.

---


Hi all, new member here...keep finding myself returning here from Google results so I took that as a sign I should register :)

I have 4 IBM Model M keyboards...2 of them are somewhat odd, being that they are 3179 terminal keyboards, both born on the same day in 1986 (the other two are 1993 1391401's).

I'm seeking to convert those 3179 terminal 'boards over to the AT and PS/2 standard, most likely using the kbdbabel project (I'm sure plenty here are familiar with it, kbdbabel.org).

[strike]You can find the details of the keyboards and the conversion on my sort of mediocre website, http://kishy.comuf.com/. Projects -> Current -> IBM 3179 Terminal Keyboard Conversion to AT, PS/2. Since I don't have much of a discussion board, I'm kind of looking for a forum to act as a meeting ground for this.[/strike]

I've seen from Google results here that people have tried the 122-key conversion before, or at least wanted to...seems like we all might make more progress if we work together, so I'm more or less calling out to YOU, 122-key owners, for your help/cooperation. Any progress I make is yours, and hopefully vise-versa.

Of course, not all 122-key units are the same electrically...if you've found info saying yours will work on a 3179 then it is functionally the same as mine.

Cheers

edit Aug 13 09
Significant success has been attained by simply swapping the cord and using registry key remaps via the free program "Key Mapper".
I do plan to make a kbdbabel adapter in the future however, and will document that process here, since it seems like directions for making one are desired by at least a couple people. >> KBDBABEL DONGLE DELAYED INDEFINITELY because alternate methods of gaining compatibility have been so successful. I hope and plan to make one but don't have the time, motivation/reason, or money at the moment.



Edit Feb 13 2010: need to make note of this somewhere
Resources which have assisted me in this project:
(in no particular order)
« Last Edit: Fri, 11 June 2010, 00:57:57 by kishy »
Enthusiast of springs which buckle noisily: my keyboards
Want to learn about the Kishsaver?
kishy.ca

Offline ch_123

  • * Exalted Elder
  • Posts: 5860
IBM 1386887 (3179 terminal) keyboard conversion
« Reply #1 on: Mon, 10 August 2009, 19:06:50 »
I think this should have what you are looking for. There's also a thread about a similar Model M terminal keyboard here.

I wonder how similar the electronics are to the old 3178 keyboards... probably not alot considering the 3178 had a parallel connection.
« Last Edit: Mon, 10 August 2009, 19:10:55 by ch_123 »

Offline kishy

  • Thread Starter
  • Posts: 1576
  • Location: Windsor, ON Canada
  • Eye Bee M
    • http://kishy.ca/
IBM 1386887 (3179 terminal) keyboard conversion
« Reply #2 on: Mon, 10 August 2009, 19:34:43 »
Mhmm, that's (one of?) the thread(s) I found in the past. I figured that a new thread would convey perhaps..."fresh interest", I guess (just checked and see the last post was fairly recent...making me look kind of foolish). Also, that page (on diff site) is in my bookmarks...I've been unsure of what to believe though since that page says it will work, yet kbdbabel suggests a "non-dumb" hardware adapter is needed (since they provide an assembly file for the 3179 adapter).

(either way a physical adapter is needed; the question is if a dumb one can work or not. I'll be answering that for myself once I've swapped the cable for a PS/2 one)

If you're interested in photographs of the PCB in the keyboard I can take a couple...doubt my camera will show any detail on any components so I'd be happy to answer questions about "what's that say on it".

I know nothing about terminals or terminal keyboards, except that I want this monster beast on my desk...though I'd have to put the 1391401 back in the closet until my PS/2 30-286 is back up and running (anyone have a 3.5" HH RLL hard drive?). Point being I can't offer any help with the 3178 question.
« Last Edit: Mon, 10 August 2009, 19:39:05 by kishy »
Enthusiast of springs which buckle noisily: my keyboards
Want to learn about the Kishsaver?
kishy.ca

Offline ch_123

  • * Exalted Elder
  • Posts: 5860
IBM 1386887 (3179 terminal) keyboard conversion
« Reply #3 on: Mon, 10 August 2009, 19:42:00 »
I think the kbdbabel thing is based on two things -

1) You need a physical adaptor for the connector.
2) You need some sort of software component to interpret the keyboard's scancodes correctly.

I'm not familar with the exact model of keyboard that you have, but does it have a permanently attached cable, or a removable SDL cable like the regular Model Ms?

Offline kishy

  • Thread Starter
  • Posts: 1576
  • Location: Windsor, ON Canada
  • Eye Bee M
    • http://kishy.ca/
IBM 1386887 (3179 terminal) keyboard conversion
« Reply #4 on: Mon, 10 August 2009, 19:49:24 »
The cord is built in and connects with pins similar to jumpers (same 2x3 connector I've seen used for some PS/2 mouse headers on socket 7 motherboards), some people call them Berg connectors but a "berg connector" is normally floppy power...so idk.

One must wonder...I've read somewhere (I've read a lot and always forget where it comes from) that the original PS/2 standard in some way incorporated scancode set 3, which supposedly is used by these keyboards...then wouldn't my IBM PS/2 systems support it out of the box, using the ps/2 cable?

Difficult to know since the 30-286 is nonoperational and the 56 SX is OS/2...so I wouldn't know if it was OS/2 supporting the board or the controller on the motherboard.
Enthusiast of springs which buckle noisily: my keyboards
Want to learn about the Kishsaver?
kishy.ca

Offline ch_123

  • * Exalted Elder
  • Posts: 5860
IBM 1386887 (3179 terminal) keyboard conversion
« Reply #5 on: Mon, 10 August 2009, 20:02:50 »
Quote from: kishy;108771
some people call them Berg connectors but a "berg connector" is normally floppy power...so idk.


As far as I know, 'Berg connector' is the name for that style of connector, not just the floppy/IDE ones specifically. Same way you have DIN connectors for a bunch of stuff other than keyboards.

Quote
One must wonder...I've read somewhere (I've read a lot and always forget where it comes from) that the original PS/2 standard in some way incorporated scancode set 3, which supposedly is used by these keyboards...then wouldn't my IBM PS/2 systems support it out of the box, using the ps/2 cable?


IBM was going to implement it, but by the time that they had intended on doing it, they lost interest for some reason or another.

Offline kishy

  • Thread Starter
  • Posts: 1576
  • Location: Windsor, ON Canada
  • Eye Bee M
    • http://kishy.ca/
IBM 1386887 (3179 terminal) keyboard conversion
« Reply #6 on: Mon, 10 August 2009, 20:11:49 »
Just looked on Wikipedia and you're right, it's all of the pin-type connectors.

Was going to? I'm guessing then that support is nonexistent because of them losing interest.
Enthusiast of springs which buckle noisily: my keyboards
Want to learn about the Kishsaver?
kishy.ca

Offline ch_123

  • * Exalted Elder
  • Posts: 5860
IBM 1386887 (3179 terminal) keyboard conversion
« Reply #7 on: Mon, 10 August 2009, 20:36:46 »
Well, if your keyboard is like the one on John Elliot's site, the keyboard uses the standard AT protocol, it's just that some (ok, most) are not mapped correctly.

You could take a wire from a cheap keyboard, and hook the connectors up to the Berg connector, and try and copy what John Elliot did with his. He gave instructions on the linked thread about setting up the scancodes under Linux, which I'm sure would have an equivalent under Mac OS X. As for Windows, Im not sure of the exact process, but it should be doable.

Offline kishy

  • Thread Starter
  • Posts: 1576
  • Location: Windsor, ON Canada
  • Eye Bee M
    • http://kishy.ca/
IBM 1386887 (3179 terminal) keyboard conversion
« Reply #8 on: Tue, 11 August 2009, 00:22:13 »
Wellllll,,,,,



I am     typingggggggggggg thisssssss onmyyyyyyyyy termiiiiiiiiiiiiiiiiiinalllll keyboooooooooooooooooooarddddd onaaaaaaaa cheaaaaap usbbbbb conveeeeeeeeeeeeeeeeeeeeeeeeeeerteeeeeeeeeerrrrr.....




As     you caaaaaaaaaaaan seeeeee, therrrrrrrrrrrre arrrrrrrrrrrre     repeattttt issueeeeeeeeeessss..... Moreeeeeeee detaiiiiiiiiiiiiiils     tomrrrrrrrrrrrrrrrrrow dayyyyytimeeeee.....
Enthusiast of springs which buckle noisily: my keyboards
Want to learn about the Kishsaver?
kishy.ca

Offline keyb_gr

  • Posts: 1384
  • Location: Germany
  • Cherrified user
    • My keyboard page (German)
IBM 1386887 (3179 terminal) keyboard conversion
« Reply #9 on: Tue, 11 August 2009, 03:13:47 »
Looks like another usbbb conveerteeerrr might be worth a shot.
Hardware in signatures clutters Google search results. There should be a field in the profile for that (again).

This message was probably typed on a vintage G80-3000 with blues. Double-shots, baby. :D

Offline JohnElliott

  • Posts: 109
IBM 1386887 (3179 terminal) keyboard conversion
« Reply #10 on: Tue, 11 August 2009, 05:15:16 »
Quote from: ch_123;108779
You could take a wire from a cheap keyboard, and hook the connectors up to the Berg connector, and try and copy what John Elliot did with his. He gave instructions on the linked thread about setting up the scancodes under Linux, which I'm sure would have an equivalent under Mac OS X. As for Windows, Im not sure of the exact process, but it should be doable.


I've updated that page since, with my experiences under Windows 2000. I could get it to work, but I had to use a KVM switch to do it -- switch away during boot, and come back afterwards. It's then possible to use Windows's scancode remapper to get the function and cursor keys doing what they should.

Whether it's practical for daily use rather than one-off experiments is another matter...

(Oh, and I also made a PS/2-to-DIN adaptor lead for the keyboard so I didn't have to keep borrowing the cable from my Model F).

Offline lowpoly

  • Posts: 1749
IBM 1386887 (3179 terminal) keyboard conversion
« Reply #11 on: Tue, 11 August 2009, 06:59:46 »
If someone builds a kbdbabel converter, please document it in the mod forum.

Miniguru thread at GH // The Apple M0110 Today

Offline ch_123

  • * Exalted Elder
  • Posts: 5860
IBM 1386887 (3179 terminal) keyboard conversion
« Reply #12 on: Tue, 11 August 2009, 07:12:53 »
Quote from: JohnElliott;108833
I've updated that page since, with my experiences under Windows 2000. I could get it to work, but I had to use a KVM switch to do it -- switch away during boot, and come back afterwards. It's then possible to use Windows's scancode remapper to get the function and cursor keys doing what they should.


Was Linux affected by the same problems?

Offline JohnElliott

  • Posts: 109
IBM 1386887 (3179 terminal) keyboard conversion
« Reply #13 on: Tue, 11 August 2009, 11:22:22 »
Quote from: ch_123;108837
Was Linux affected by the same problems?


No, it worked straight away. I think something in the initialisation sequence that Windows sends makes the keyboard sulk; using the KVM means that that sequence never reaches the keyboard.

Offline kishy

  • Thread Starter
  • Posts: 1576
  • Location: Windsor, ON Canada
  • Eye Bee M
    • http://kishy.ca/
IBM 1386887 (3179 terminal) keyboard conversion
« Reply #14 on: Tue, 11 August 2009, 11:24:37 »
(this entire post will be typed on the keyboard in question)

keyb_gr,

Correct, it was the USB converter (not a direct adapter; a converter with circuitry inside). Interestingly though, I was getting some of the Cmd keys at the top to DO THINGS while on the USB converter (Cmd 8 was the Standby button, Cmd 7 was the Power button, Cmd 6 context menu, Cmd 4/5 Windows keys). This functionality does not exist over a true PS/2 interface, apparently.

I am now using this connected via an AT-PS/2 adapter on my desktop (one keyboard will end in an AT plug, the other in PS/2, I decided to do the AT one first) and as you can see, no repeat issues, and it's just as lovely to type on as my more traditional Model Ms...though I'd say the keys feel nicer actually.

JohnElliott, You actually don't need a KVM switch...you can unplug and replug the keyboard and it works (but it must remain plugged in during boot for BIOS to keep the PS/2 port operational). I'm planning to put a momentary SPST normally closed button somewhere on this keyboard to interrupt the +5V wire...that should be functionally the same thing as unplugging and replugging it, right?

I've made my own cable for this, without chopping up the original. I collect berg connectors from things I throw out and it turns out my efforts paid off...I found two 2x3 connectors in that ziplock bag.

I'm planning to make this my "daily driver", so to speak. I've found the commercial software PassMark KeyboardTest very handy, as it reveals all sorts of info about the keys being pressed (including the fact that they NEVER SEND AN "UP CODE"...to the computer, the keys are permanently down once pressed. I think this contributed to the repeat issue.)

I'll be writing up a complete document of the WinXP-interpreted equivalents of each key. You've done a lot of the same in a more technical manner (scancode interpretation, etc.).
(edit aug 16 09 - this would be impractical and would take ages, so I've decided not to do it. if anyone has a specific need for this information I will do it by request in this thread)

lowpoly, I am planning to make one...unfortunately the information from Alexander (seems to own/manage the project) was not 100% helpful for someone with no knowledge of microcontroller programming. I will be making one eventually, but unless I get some help with it, it could be +10 years for all I know...a local store which manufactures their own hardware has said they'll help if they can but they need to see all the details to judge if they can.

That said...I think purely software based solutions will actually work on this, for the most part. My motherboard (ECS 755-A2) doesn't seem to have any issues with this keyboard and that's good enough for me. Obviously, remapping all the oddly-mapped keys is a priority, because I forget where I found CTRL hidden...it's on some random key and if I remember right it toggles on/off...

(did all the experiments last night at 3AM, I'm surprised I remember doing them at all)

Pics:
I apologize for the bad pictures; I'm still not 100% used to this camera yet (macro mode seems to be kind of tricky)
Those joints are soldered, the hot glue is for added strengh and short prevention.
The kbdbabel adapter, if made, would go inside the keyboard case itself, and would be a permanent part of the cable, which itself is still removable.

http://img190.imageshack.us/img190/4756/1386887freshaftermod.jpg
http://img17.imageshack.us/img17/1236/1386887newplug.jpg
http://img17.imageshack.us/img17/9937/1386887newplugguts.jpg
http://img40.imageshack.us/img40/9211/1386887newcordinside.jpg
http://img44.imageshack.us/img44/2713/1386887originallayoutcl.jpg
« Last Edit: Sun, 04 October 2009, 21:12:48 by kishy »
Enthusiast of springs which buckle noisily: my keyboards
Want to learn about the Kishsaver?
kishy.ca

Offline kishy

  • Thread Starter
  • Posts: 1576
  • Location: Windsor, ON Canada
  • Eye Bee M
    • http://kishy.ca/
IBM 1386887 (3179 terminal) keyboard conversion
« Reply #15 on: Tue, 11 August 2009, 12:33:08 »
Quote from: ripster;108883
Same thing here on the Boscom.  I can't remember exactly WHAT keys did what but I was surprised how many of the extra keys were recognized.  I'd test more but my Boscom is "temporarily indisposed".


Hmm...is the Boscom an actual terminal keyboard, or a more modern terminal emulation board?

I suspect it's a feature of my particular "Hong-Kong-2-dollar-ebay-special" USB converter which is interpreting those keys and sending them off to the computer...Windows doesn't know what the heck they do unless it's on the adapter, and when it is, it also has the repeat issue.
Enthusiast of springs which buckle noisily: my keyboards
Want to learn about the Kishsaver?
kishy.ca

Offline dw_junon

  • Posts: 96
    • http://www.9999hp.net/
IBM 1386887 (3179 terminal) keyboard conversion
« Reply #16 on: Tue, 11 August 2009, 13:00:00 »
Hey, this is great to see.  Good work!  I've rambled here about just how similar these are to regular PS/2 'boards of their time, but never did get as far as trying out anything.  I would do so now, though I've searched the place for my 5.5mm nutdriver and the 5.5mm socket bit and just can't find them.  Well Brandon, they are not "totally incompatible", but you really do need to know what you are doing...

From my understanding, I would speculate that the startup issue is related to the keyboard ID (0xBF 0xBF for the 1390876 and the 6110344), which differs from the genericised 0xAB 0x83 [source], though I think usually only the first byte is read during initialization.

[strike]Having thought about it, there may also issues with the BAT, which I will have to look up.[/strike]  Nope, my source says "Four. BAT completion code AA is the same, then the ID will send BFBF.", in reference to a 1390876.

I must also say, it's great to see you've got hold of a 6110344 for your 5271, John; your pages are great, I don't know of any better documentation of either of those.  I must admit though I thought that BT XT 'board you had looked interesting.

Before he so brutally murdered it, ripster's Boscom was indeed a terminal emulator board.  Unicomp presently offer at least three different layouts for these, I uploaded some time ago their PDF on the PC/5250 version, along with an incomplete PassMark-made chart for a Greenock built 5250 emulator 'board P/N 1397003.
« Last Edit: Tue, 11 August 2009, 13:18:08 by dw_junon »
ARC/Chicony KB-5181 XT/AT blue ALPS? 101 US FCC ID E8H51KKB-5181 • AST ASTKB102 AT capacitive rubber dome 102 UK ISO
Cherry G80-2100 AT black Cherry 126 key German ISO unique • Compaq Enhanced III PS/2 unknown rubber dome 102 UK ISO
Datacomp DFK102ARA03 AT 102 blue ALPS? US/Arabic FCC ID blank, S/N 37880001 • Dell AT102W PS/2 Black ALPS 105 UK ISO x2
Fujitsu KFB4725-102 AT membrane rubber dome with spring 105 UK ISO • Hewlett Packard C1405A AT rubber dome 102 UK ISO
IBM 0989705 XT/AT no LEDs Model M 102 US/Arabic  • IBM 1388076 Industrial AT Model M 102 UK ISO
IBM 1389260 3179/3180 Display Station Model M 122 US 3270 x2 • IBM 1391406 PS/2 Model M 102 UK ISO x2
IBM 1397003 PS/2 Model M "Host Connect" emulator 122 German ISO • IBM 71G4643 PS/2 Model M Quiet Touch "Ouch!    Rubber spring" 102 UK ISO x2
IBM 5640987 3178 Display Station Model C2 capacitive buckling spring 87 key US 3270 • IBM 556-712-01 RT PC rubber dome [same as 2nd PCjr kbd?] 101 US
IBM 6450225 PC/AT capacitive buckling spring 84 key UK PC/AT • Lexmark 8125460 Model M2 102 UK ISO
NMB RT-102 117456-002 AT Hi-Tek black, clicky 102 UK ISO • Olivetti ANK 2462 M24 Personal Computer keyboard 2 clicky Olivetti spring module 102 UK unique
Ortek MCK-142Pro AT white ALPS 142 key UK • Sun 540-1006-03 Type unknown linear(?) keyswitch 2 87 key SunType2
Wang 724 725-3771-UK salmon ALPS 110 key UK Wang724 • Making this list hasn\'t half scared me...
[/I]

Offline Shawn Stanford

  • Posts: 368
IBM 1386887 (3179 terminal) keyboard conversion
« Reply #17 on: Tue, 11 August 2009, 14:46:04 »
Quote from: dw_junon;108904
Before he so brutally murdered it, ripster's Boscom was indeed a terminal emulator board.  Unicomp presently offer at least three different layouts for these, I uploaded some time ago their PDF on the PC/5250 version, along with an incomplete PassMark-made chart for a Greenock built 5250 emulator 'board P/N 1397003.

I have the same keyboard. It's a terminal emulation board, but it's meant more for an AS400 than for a mainframe. Here's the original thread: http://geekhack.org/showthread.php?t=6080&highlight=boscom
The Brat Prince of COBOL

Offline JohnElliott

  • Posts: 109
IBM 1386887 (3179 terminal) keyboard conversion
« Reply #18 on: Tue, 11 August 2009, 14:47:10 »
Quote from: kishy;108878
Interestingly though, I was getting some of the Cmd keys at the top to DO THINGS while on the USB converter (Cmd 8 was the Standby button, Cmd 7 was the Power button, Cmd 6 context menu, Cmd 4/5 Windows keys). This functionality does not exist over a true PS/2 interface, apparently.


That'll be because the Set 2 codes for those keys are similar to the Set 3 codes for the function keys. For example, F4 in set 3 produces 5B, and Left-Windows in set 2 produces E05B. Sounds like the converter isn't making the distinction.

Quote
JohnElliott, You actually don't need a KVM switch...you can unplug and replug the keyboard and it works (but it must remain plugged in during boot for BIOS to keep the PS/2 port operational).


Yes, but you're not supposed to hotplug PS/2 equipment :smile:

Quote
(including the fact that they NEVER SEND AN "UP CODE"...to the computer, the keys are permanently down once pressed. I think this contributed to the repeat issue.)


It may be possible to change this by sending commands to the keyboard; if you put a 102-key keyboard such as the 1391406 into mode 3, it does the same. The problem is that to do that in Windows requires writing a new keyboard filter driver; that functionality isn't exposed by the standard driver, as I understand it.

Offline JohnElliott

  • Posts: 109
IBM 1386887 (3179 terminal) keyboard conversion
« Reply #19 on: Tue, 11 August 2009, 15:17:20 »
Quote from: dw_junon;108904
I must also say, it's great to see you've got hold of a 6110344 for your 5271, John; your pages are great, I don't know of any better documentation of either of those.
 

Thanks.

Quote
I must admit though I thought that BT XT 'board you had looked interesting.


The microcontroller in that has a Zenith copyright sticker. The PCB is marked "12KC397A / Alps Made in Japan / Heath P/N: 163-16". It also has all the keynumbers silkscreened onto it, and a "diode" symbol by each one. As well as the LEDs in the Num Lock and Caps Lock keys, it's also got a piezo speaker that simulates keyclicks.

Offline InSanCen

  • Posts: 560
IBM 1386887 (3179 terminal) keyboard conversion
« Reply #20 on: Tue, 11 August 2009, 15:53:13 »
Right, I'm buying one the second I find one on a uk site.

And as a bonus, I use Linux.

Yay, honking great Terminal keyboards forever!
Currently Using :- IBM M13 1996, Black :
Currently Own :- 1391406 1989 & 1990 : AT Model F 1985 : Boscom 122 (Black) : G80-3000 : G80-1800 (x2) : Wang 724 : G81-8000LPBGB (Card Reader, MY) : Unitek : AT102W : TVS Gold :
Project\'s :- Wang 724 Pink-->White Clicky : USB Model M : IBM LPFK :
Pointing stuff :- Logitech MX-518 : I-One Lynx R-15 Trackball : M13 Nipple : Microsoft Basic Optical\'s
:

Offline ch_123

  • * Exalted Elder
  • Posts: 5860
IBM 1386887 (3179 terminal) keyboard conversion
« Reply #21 on: Tue, 11 August 2009, 16:17:12 »
The odds of you finding one on eBay UK is quite limited. On the other hand, you can get ones for America that are still reasonably cheap.

Example

Even taking the shipping into account, it will more than likely to be cheaper getting it from abroad anyway. Also, as the thing is only $12, you're not going to have that many problems with customs.

Speaking of terminals, one of these is definitely on my to get list -

« Last Edit: Tue, 11 August 2009, 16:20:48 by ch_123 »

Offline kishy

  • Thread Starter
  • Posts: 1576
  • Location: Windsor, ON Canada
  • Eye Bee M
    • http://kishy.ca/
IBM 1386887 (3179 terminal) keyboard conversion
« Reply #22 on: Tue, 11 August 2009, 22:45:53 »
Quote from: dw_junon;108904
Hey, this is great to see.  Good work!


I can't honestly take any credit for anything except my ability to put together a keyboard cord (a very mediocre one at that). All credit should go to John Elliott for those fantastically helpful webpages. Alexander at kbdbabel should get some credit too for the inspiration (and also for the pinouts; I like to check pinouts from multiple sources before I trust them, and indeed I did find an incorrect AT kb pinout somewhere in my travels of the net. beware, an inaccurate one IS OUT THERE)

Quote from: dw_junon;108904
From my understanding, I would speculate that the startup issue is related to the keyboard ID (0xBF 0xBF for the 1390876 and the 6110344), which differs from the genericised 0xAB 0x83 [source], though I think usually only the first byte is read during initialization.


I'll be straight-up honest and say I don't really understand how this causes issues; it seems to me that it would work anyway (but I don't understand how these signals work, what interprets them, etc. I'd greatly appreciate a lesson in keyboard signalling from someone here). Also on "BAT", not sure what that refers to (I'd take a stab and say it's the keyboard identifier sent during initialization).

Quote from: dw_junon;108904
ripster's Boscom was indeed a terminal emulator board.


I then presume that it is USB, and possibly has a similar integrated conversion circuitry to my lame PS/2 -> USB converter, which might explain the Cmd keys functioning for (him?) as well.

Quote from: JohnElliott;108921
Sounds like the converter isn't making the distinction.


I figured as much...seemed to be a "lucky glitch" to me. At, of course, the expense of the repeating keys (which do not repeat if you immediately press another key after, but that turns into an endless cycle of neverending typing). None of those functions exist when it's going direct to a PS/2 port so it's definitely something to do with the adapter like you said.


Quote from: JohnElliott;108921
Yes, but you're not supposed to hotplug PS/2 equipment :smile:


I know, but I've done it on many computers many times with many keyboards (also with AT)...never had a problem...YET. I forget what post I put it in but I mentioned installing a momentary normally-closed button to interrupt the +5V wire...would this be an equivalent, and if so, does it reduce the risk for damage that comes with hotplugging?

Quote from: JohnElliott;108921
It may be possible to change this by sending commands to the keyboard ..... The problem is that to do that in Windows requires writing a new keyboard filter driver


That's of course about the "sticking" keys...some of them stick, some do not. It's weird. Also...about that USB converter...haha. The keys don't stick when I use it, but they do hold down for it to repeat. When it is not on the adapter, they go down and electrically stay down. When it's on the adapter, they go down, stay down for a rather precise period of time, then go up. I imagine this is the adapter compensating in some way.

It does appear that (you?) have had more success in Linux than Windows (or simply focused on Linux since that's the system you prefer). Not to say I'm "pro-closed-source" exactly, but I would be...well...much less enthusiastic about technology without my Windows. Thus, I am working almost exclusively with Windows (XP 32-bit) for this, but will have a Win98 rig at my disposal if needed, as well as OS/2 2.1 on the PS/2.


Quote from: InSanCen;108936
Right, I'm buying one the second I find one on a uk site.

And as a bonus, I use Linux.

Yay, honking great Terminal keyboards forever!


Quote from: ch_123;108940
The odds of you finding one on eBay UK is quite limited.


Although Canada Post absolutely RAPES YOU for international postage, I definitely have to recommend the eBay seller who GAVE ME MY TWO KEYBOARDS. I explained it was in educational interest as somewhat of a learning experience / summer project and he dropped them off (lives locally to me). I asked for and expected only one, the second was an absolute bonus. Note that the other two he is still selling were made on the same day as my two, they were a matching set of 4 with close but not consecutive serial numbers.

http://cgi.ebay.ca/Vintage-IBM-KEYBOARD-Clicky-Model-M-1386887-Wow1986_W0QQitemZ280340022342QQcmdZViewItemQQptZLH_DefaultDomain_2?hash=item4145914446&_trksid=p3286.c0.m14

Don't expect condition to be optimal on those; both of mine were missing a couple keycaps but I was able to piece one complete one together out of the two. I don't know if he'll clean them before shipping (mine were not, but then again I didn't pay so I wouldn't expect that). They CLEARLY saw use in a machine shop or factory and were filthy before my cleaning (the bad one didn't get a before pic, sadly, I wish I had taken one).
Enthusiast of springs which buckle noisily: my keyboards
Want to learn about the Kishsaver?
kishy.ca

Offline microsoft windows

  • Blue Troll of Death
  • * Exalted Elder
  • Posts: 3621
  • President of geekhack.org
    • Get Internet Explorer 6
IBM 1386887 (3179 terminal) keyboard conversion
« Reply #23 on: Wed, 12 August 2009, 08:07:46 »
My keyboard is missing a few keycaps too but I never really got around to finding replacements (they're Esc and I).
CLICK HERE!     OFFICIAL PRESIDENT OF GEEKHACK.ORG    MAKE AMERICA GREAT AGAIN MERRY CHRISTMAS

Offline Specter_57

  • Posts: 143
IBM 1386887 (3179 terminal) keyboard conversion
« Reply #24 on: Wed, 12 August 2009, 10:31:42 »
kishy ...

You may want to take a look at this thread here on GeekHack:

http://geekhack.org/showthread.php?t=5264

...there is some discussion about 122-key terminal and emulator keyboards there...and some info related to what you are interested in doing, especially toward the end of the thread.

Hopefully you'll find the info there useful and interesting as related to your project.


Spec57
« Last Edit: Wed, 12 August 2009, 10:33:47 by Specter_57 »

Offline kishy

  • Thread Starter
  • Posts: 1576
  • Location: Windsor, ON Canada
  • Eye Bee M
    • http://kishy.ca/
IBM 1386887 (3179 terminal) keyboard conversion
« Reply #25 on: Wed, 12 August 2009, 17:42:32 »
ripster,

Interesting then. Did you also find that the additional functions went away when you used it directly on PS/2?

I'd venture a guess that our USB converters possibly have the same (or extremely similar) circuitry inside if so.

Specter,

Thanks for that, I've actually seen it before though. The problem is, after reading it 3 times (more or less the second half, about the 122 key boards), I still don't see many parallels to my own situation...though I am going to try the remapping software mentioned in it. Let's remember that this keyboard is "working properly" using only a different cable, nothing more. Also, PassMark KeyboardTest indicates that Windows is in fact seeing the scancodes from the non-recognized keys, so they can (in theory) be assigned to stuff.

Though, that "always down" issue could prove problematic at some point. Fortunately the modifier keys don't stick (that would be miserable).



edit:
Looking for keycaps, just checked both boards to figure out which:

Cmd14
Blank keycap
Play / Test (play on top surface, test on front)
SetUp (blue text)
Roll (down arrow) (this is the cursor down arrow)

If anyone has some or all of these keys, I'm interested.
« Last Edit: Wed, 12 August 2009, 20:55:36 by kishy »
Enthusiast of springs which buckle noisily: my keyboards
Want to learn about the Kishsaver?
kishy.ca

Offline kishy

  • Thread Starter
  • Posts: 1576
  • Location: Windsor, ON Canada
  • Eye Bee M
    • http://kishy.ca/
IBM 1386887 (3179 terminal) keyboard conversion
« Reply #26 on: Wed, 12 August 2009, 22:57:23 »
"AutoHotKey" is going to be useless for this, it doesn't appear to actually do anything with scancodes. I say this because earlier I said I'd try it.

I have, however, just discovered something possibly helpful, which appears to have been mentioned on the site before but not often...the Microsoft Keyboard Layout Creator (http://msdn.microsoft.com/en-ca/goglobal/bb964665.aspx).

Haven't even touched it yet, but if it works by scancodes which it appears to (the claims it makes suggest it does, but I can't find info saying it actually does), this could be the thing. Will report on success if any.

-edit-
Forget that, it's pretty much useless.

-edit-
OMFG I FOUND IT
"Key Mapper 1.0.0.0"
http://justkeepswimming.net/keymapper/
It lets me have it watch for keys, then I can press a key (even the currently undetected ones!) and map them to pretty much any imaginable function.

The software solution is here!
« Last Edit: Wed, 12 August 2009, 23:17:30 by kishy »
Enthusiast of springs which buckle noisily: my keyboards
Want to learn about the Kishsaver?
kishy.ca

Offline Rajagra

  • Posts: 1930
IBM 1386887 (3179 terminal) keyboard conversion
« Reply #27 on: Wed, 12 August 2009, 23:45:04 »
Quote from: kishy;109357
"AutoHotKey" is going to be useless for this, it doesn't appear to actually do anything with scancodes. I say this because earlier I said I'd try it.


Didn't it show them at all in the key history screen?

I'll download that other app anyway, just in case.

Offline kishy

  • Thread Starter
  • Posts: 1576
  • Location: Windsor, ON Canada
  • Eye Bee M
    • http://kishy.ca/
IBM 1386887 (3179 terminal) keyboard conversion
« Reply #28 on: Wed, 12 August 2009, 23:59:07 »
From my looking into it, it sounded so promising, but then I actually looked at how you write scripts for it and you don't reference scancodes, you reference a key by its function (like, E instead of the scancode for the E key). That's a problem here because the vast majority of the keys are either not performing any function or performing ones from various other keys.

Now, to work on getting those keys to "release". It's not proving to be problematic for the alphanumeric keys, but the lock keys are bad...also when I start assigning stuff to the Cmd keys it could be a problem since they do stick.
Enthusiast of springs which buckle noisily: my keyboards
Want to learn about the Kishsaver?
kishy.ca

Offline Rajagra

  • Posts: 1930
IBM 1386887 (3179 terminal) keyboard conversion
« Reply #29 on: Thu, 13 August 2009, 00:15:07 »
AHK can use virtual key or scan code references, but that Key Mapper looks good - when I loaded it up it knew I had remapped 3 keys in the registry and was using Colemak!...

Offline kishy

  • Thread Starter
  • Posts: 1576
  • Location: Windsor, ON Canada
  • Eye Bee M
    • http://kishy.ca/
IBM 1386887 (3179 terminal) keyboard conversion
« Reply #30 on: Thu, 13 August 2009, 00:25:02 »
It does use registry entries, but does include a way to clear them out again after.

That said, if you were to export a reg file from it, then use that on a computer lacking the program, removing those remaps would involve deleting a ton of registry entries.
Enthusiast of springs which buckle noisily: my keyboards
Want to learn about the Kishsaver?
kishy.ca

Offline Rajagra

  • Posts: 1930
IBM 1386887 (3179 terminal) keyboard conversion
« Reply #31 on: Thu, 13 August 2009, 00:38:06 »
I think KeyTweak would reset the registry key mappings easily.

Offline kishy

  • Thread Starter
  • Posts: 1576
  • Location: Windsor, ON Canada
  • Eye Bee M
    • http://kishy.ca/
IBM 1386887 (3179 terminal) keyboard conversion
« Reply #32 on: Thu, 13 August 2009, 03:18:08 »
As a side note, KeyTweak is one of the few apps I tried in the quest for one which works by reading scancodes; it does not. But of course it would accomplish that purpose just fine I'm sure also (unmapping).

Hate to be a bother, but does anyone have an answer to the question about putting a normally-closed button on the +5V wire? I'm starting to get paranoid about the hotplugging thing.
Enthusiast of springs which buckle noisily: my keyboards
Want to learn about the Kishsaver?
kishy.ca

Offline keyb_gr

  • Posts: 1384
  • Location: Germany
  • Cherrified user
    • My keyboard page (German)
IBM 1386887 (3179 terminal) keyboard conversion
« Reply #33 on: Thu, 13 August 2009, 03:28:10 »
Quote from: kishy;109383
Hate to be a bother, but does anyone have an answer to the question about putting a normally-closed button on the +5V wire? I'm starting to get paranoid about the hotplugging thing.

Is your KVM switch purely mechanical? Otherwise it wouldn't matter.
Hardware in signatures clutters Google search results. There should be a field in the profile for that (again).

This message was probably typed on a vintage G80-3000 with blues. Double-shots, baby. :D

Offline Rajagra

  • Posts: 1930
IBM 1386887 (3179 terminal) keyboard conversion
« Reply #34 on: Thu, 13 August 2009, 04:00:11 »
Quote from: kishy;109383
Hate to be a bother, but does anyone have an answer to the question about putting a normally-closed button on the +5V wire? I'm starting to get paranoid about the hotplugging thing.


It would be safer putting the switch on the data line, as that's how hot-plug connections work. It wouldn't reset the keyboard however, just stop it from communicating.

Offline kishy

  • Thread Starter
  • Posts: 1576
  • Location: Windsor, ON Canada
  • Eye Bee M
    • http://kishy.ca/
IBM 1386887 (3179 terminal) keyboard conversion
« Reply #35 on: Thu, 13 August 2009, 10:03:45 »
Quote from: keyb_gr;109385
Is your KVM switch purely mechanical? Otherwise it wouldn't matter.


I'm not using a KVM switch; currently I am booting with the keyboard connected, then unplugging it once at the login screen and plugging it back in. In other words, it's pretty much exactly like a mechanical KVM switch.

Quote from: Rajagra;109388
It would be safer putting the switch on the data line, as that's how hot-plug connections work. It wouldn't reset the keyboard however, just stop it from communicating.


I wonder if this would have the same effect...because in theory it seems like it's safer (not violently taking away and re-applying power to it). The idea is that I'm looking for a momentary button I can hit after Windows boots to fix it not working.

I'd probably mount said button in the little pop-out section for the DIP switches on the 3270 PC's keyboard (or whatever model is the one that has DIPs, I think it's that).
Enthusiast of springs which buckle noisily: my keyboards
Want to learn about the Kishsaver?
kishy.ca

Offline kishy

  • Thread Starter
  • Posts: 1576
  • Location: Windsor, ON Canada
  • Eye Bee M
    • http://kishy.ca/
IBM 1386887 (3179 terminal) keyboard conversion
« Reply #36 on: Thu, 13 August 2009, 13:13:32 »
Attached you can find some photos regarding the layout. Because the Lock keys do not respond well to being "stuck down", I removed Scroll Lock entirely (since I've never once used it), and put Num Lock on the right Alt key (since I never use Right Alt, and the Right Alt key doesn't have the "sticking" problem). Caps Lock is fortunately one of the keys that sends an up code so it can stay where it is.

I used my "poorer condition" 1391401 (have two) to donate the keycaps. The current layout photo demonstrates how I have it mapped right now (except Cmd1-10, and the left block, I don't know what to do with those yet). I'm having few if any problems with the layout as shown in that photo.

(numpad + and Enter are for show, after photo I swapped back on the 1386887 keys because the 1391401 ones don't fit properly, but the keys in those positions are mapped to + and Enter)

Oh, and Home in the middle of the cursor keys is mapped to Enter (so I can for example navigate a folder and then hit the middle key to open something)


Update RE keyboard stops working after Windows boots:
(if anyone read what was here before I removed it, ignore it...it was wrong, I forgot something else I did first)

http://img34.imageshack.us/img34/2844/1386887removedkeycaps.jpg
http://img33.imageshack.us/img33/7894/1386887donor1391401.jpg
http://img42.imageshack.us/img42/5164/1386887currentlayout.jpg
« Last Edit: Sun, 04 October 2009, 21:16:22 by kishy »
Enthusiast of springs which buckle noisily: my keyboards
Want to learn about the Kishsaver?
kishy.ca

Offline dw_junon

  • Posts: 96
    • http://www.9999hp.net/
IBM 1386887 (3179 terminal) keyboard conversion
« Reply #37 on: Thu, 13 August 2009, 13:25:13 »
Quote from: JohnElliott;108927
The microcontroller in that has a Zenith copyright sticker. The PCB is marked "12KC397A / Alps Made in Japan / Heath P/N: 163-16". It also has all the keynumbers silkscreened onto it, and a "diode" symbol by each one. As well as the LEDs in the Num Lock and Caps Lock keys, it's also got a piezo speaker that simulates keyclicks.

Ah, so it's a OEM Zenith that was made by Alps, wouldn't have guessed that.  I love the idea of having keynumbers on the PCB, every 'board with a PCB should have them.  Added keyclicks though can be annoying or fun, depending on the individual user.


Quote from: ShawnStanford
I have the same keyboard. It's a terminal emulation board, but it's meant more for an AS400 than for a mainframe.

Hm, hence 3270 / 5250 surely?  Or have I inflamed some sort of Poughkeepsie vs Rochester thing (yikes...)?


Quote from: kishy
I can't honestly take any credit for anything except my ability to put together a keyboard cord (a very mediocre one at that). All credit should go to John Elliott for those fantastically helpful webpages. Alexander at kbdbabel should get some credit too for the inspiration (and also for the pinouts; I like to check pinouts from multiple sources before I trust them, and indeed I did find an incorrect AT kb pinout somewhere in my travels of the net. beware, an inaccurate one IS OUT THERE)

Well, you seem to have instigated something.  Fresh interest indeed!  (You woke me up, anyway...)  Certainly no denying John and Alexander's brilliant work in this area, though.


Quote from: kishy
I'll be straight-up honest and say I don't really understand how this causes issues; it seems to me that it would work anyway (but I don't understand how these signals work, what interprets them, etc. I'd greatly appreciate a lesson in keyboard signalling from someone here). Also on "BAT", not sure what that refers to (I'd take a stab and say it's the keyboard identifier sent during initialization).

I was under the impression that the ID was intended to provide a means of classifying different keyboard types, so in theory systems would complain when they come across something they know that they can't support.  As the evidence seems to be here that many modern controllers and/or software don't actually care, this may not be such an issue but could still crop up (have you tried one on a PS/2?  Perhaps I should do that myself...).

BAT is not an issue, it's the Basic Assurance Test.  I thought that the terminal keyboard might return a different value to the accepted norm, but it doesn't.

In any case, bear in mind that personally I was looking at all the potential theoretical issues rather than actually trying anything out, because I was relying on making up a 5-pin 240 DIN socket to 6-pin min DIN plug adapter but never did thanks to other events.

Probably the best grounding in how keyboards operate in relation to their host device can be found at the site I quoted: http://www.computer-engineering.org/


~~~

For interested Brits, these are pretty difficult to find over here...  Permanent eagle eyes on the 'Bay might find something, but expect a long wait.  All my terminal 'boards have come from the US, with the expection of this 1397003 emulator board from Germany.

UK postal strikes aside, USPS Priority Mail has generally been trouble free, with 'boards getting through customs without any charges and taking about a week, as opposed to anything I've had sent by UPS who never fail to add on charges with comparable delivery times due to the customs delays despite the rapidity of UPS itself.

Also, watch out for the weight difference on the capacitive bucklers ["F"] as opposed to the membrane bucklers ["M"].


~~~

Hi Spec57!  Thanks for linking to that, I never did get to doing so.

Rereading that, I see my 5.5mm nutdriver has been lost since April...  So long as the hardware store still has them, I will be able to buy a new one on Saturday and will take some pics of the 1397003 PCB :)


Quote from: kishy
Looking for keycaps

I'm not going to part with any at the moment since I haven't decided what I'm doing, but there may be some available from a 1389260 (also for the 3179) in future.


Quote from: kishy
the DIP switches on the 3270 PC's keyboard (or whatever model is the one that has DIPs, I think it's that).

Yes, the 6110344 has the DIPs (not to be confused with P/N 6110345 which was for the 3180 and has no DIPs).  Sandy took some great pics of the PCB of his 6110344 (see A little bit of keyboards), which suggest that the DIP switches are involved with adjusting the keyboard ID:

(click for bigger version)

Though this image poses more questions that it answers....
There are 8 switches, the connector according to Sandy attaches directly next to the keyboard cable connector and so only allows setting of "KBDID A" 2-7 to and "KBDID B" 2 and 3.  Supposing that these are the two bytes of the keyboard ID... the typical byte has eight bits, not six.  And is there a 0?  Whether the series starts at 0 or 1, is it the least significant or most significant bit?  Note also the extra pins beyond the end, are these for another bit or some other purpose?  Do the switches set the bits or just flip existing states?  Are the PCB markings even relevant to the purpose of the switches anyway?  Also note that some of the pins seem to be tied high or low, having attempted to follow the traces.

John, as you have one of these 'boards and seem to have the ability to read reported keyboard IDs, might you be interested in playing with the DIPs?
ARC/Chicony KB-5181 XT/AT blue ALPS? 101 US FCC ID E8H51KKB-5181 • AST ASTKB102 AT capacitive rubber dome 102 UK ISO
Cherry G80-2100 AT black Cherry 126 key German ISO unique • Compaq Enhanced III PS/2 unknown rubber dome 102 UK ISO
Datacomp DFK102ARA03 AT 102 blue ALPS? US/Arabic FCC ID blank, S/N 37880001 • Dell AT102W PS/2 Black ALPS 105 UK ISO x2
Fujitsu KFB4725-102 AT membrane rubber dome with spring 105 UK ISO • Hewlett Packard C1405A AT rubber dome 102 UK ISO
IBM 0989705 XT/AT no LEDs Model M 102 US/Arabic  • IBM 1388076 Industrial AT Model M 102 UK ISO
IBM 1389260 3179/3180 Display Station Model M 122 US 3270 x2 • IBM 1391406 PS/2 Model M 102 UK ISO x2
IBM 1397003 PS/2 Model M "Host Connect" emulator 122 German ISO • IBM 71G4643 PS/2 Model M Quiet Touch "Ouch!    Rubber spring" 102 UK ISO x2
IBM 5640987 3178 Display Station Model C2 capacitive buckling spring 87 key US 3270 • IBM 556-712-01 RT PC rubber dome [same as 2nd PCjr kbd?] 101 US
IBM 6450225 PC/AT capacitive buckling spring 84 key UK PC/AT • Lexmark 8125460 Model M2 102 UK ISO
NMB RT-102 117456-002 AT Hi-Tek black, clicky 102 UK ISO • Olivetti ANK 2462 M24 Personal Computer keyboard 2 clicky Olivetti spring module 102 UK unique
Ortek MCK-142Pro AT white ALPS 142 key UK • Sun 540-1006-03 Type unknown linear(?) keyswitch 2 87 key SunType2
Wang 724 725-3771-UK salmon ALPS 110 key UK Wang724 • Making this list hasn\'t half scared me...
[/I]

Offline Shawn Stanford

  • Posts: 368
IBM 1386887 (3179 terminal) keyboard conversion
« Reply #38 on: Thu, 13 August 2009, 13:32:55 »
Quote from: kishy;109494
Attached you can find some photos regarding the layout.

Wow, that's... Different.
The Brat Prince of COBOL

Offline kishy

  • Thread Starter
  • Posts: 1576
  • Location: Windsor, ON Canada
  • Eye Bee M
    • http://kishy.ca/
IBM 1386887 (3179 terminal) keyboard conversion
« Reply #39 on: Thu, 13 August 2009, 14:31:37 »
Silly me, watching Pg 3 for replies when a half hour ago they happened on Pg4...

Quote from: dw_junon;109497
Well, you seem to have instigated something.  Fresh interest indeed!  (You woke me up, anyway...)  Certainly no denying John and Alexander's brilliant work in this area, though.

Well, instigated perhaps...but I'll be sticking with this 100% through to the end, including a kbdbabel adapter (unless something ridiculously impossible gets in my way of doing that, I am going to do it). I'm interested to see how much of my annoying remapping (and possibly the key up code problems) is canceled out by using one.

Quote from: dw_junon;109497
PS/2?

Right, doing that later today. Thanks for the reminder.
Mind you, it'll be a 56 SX with OS/2 2.1, but a PS/2 nonetheless.

Quote from: dw_junon;109497
5-pin 240 DIN socket to 6-pin min DIN plug adapter

Would be interested in this myself except for the relative rarity of that socket, and the fact that any kbdbabel adapter I make will be built into the keyboard case, and permanently attached to the cable I constructed myself.

Quote from: dw_junon;109497
http://www.computer-engineering.org/

Thank you, bookmarked for investigation later on.

Quote from: dw_junon;109497
5.5mm nutdriver

Quoting this as a reminder to myself to buy one; I've never been able to open my good 1391401 because of not having one. (at least not thin walled)

Note that the terminal boards of this case design do not need a thin walled one, and I use a 7/32 socket.

Quote from: dw_junon;109497
PCB stuff

I thought I'd read somewhere (possibly John's site, not to discredit Sandy but I didn't find any of those pages until the last day or two) that there were DIPs on it. I wonder, if the DIP module was put in for example my board, would it do the same function it does in the 3270 PC one? If so, it could theoretically be possible to in some way improve "out of the box compatibility" by throwing jumpers on some of those pins (but I'd need someone to guide me in exactly which to short to achieve anything useful).

Quote from: Shawn Stanford;109500
Wow, that's... Different.

I know...but it's about the best I've been able to manage, seeing as Lock keys cannot be on the keys that stick, otherwise I need to reboot after pressing one.
« Last Edit: Thu, 13 August 2009, 14:41:34 by kishy »
Enthusiast of springs which buckle noisily: my keyboards
Want to learn about the Kishsaver?
kishy.ca

Offline kishy

  • Thread Starter
  • Posts: 1576
  • Location: Windsor, ON Canada
  • Eye Bee M
    • http://kishy.ca/
IBM 1386887 (3179 terminal) keyboard conversion
« Reply #40 on: Thu, 13 August 2009, 15:07:09 »
As an FYI, here's my PCB. Best of 3 shots for the top, best of 3 shots for bottom. Can clarify anything anyone wants to know; since I have 2 of them one just sits around with the screws out anyway.

http://img34.imageshack.us/img34/9127/1386887pcbtop.jpg
http://img29.imageshack.us/img29/1883/1386887pcbbottom.jpg
« Last Edit: Sun, 04 October 2009, 21:18:39 by kishy »
Enthusiast of springs which buckle noisily: my keyboards
Want to learn about the Kishsaver?
kishy.ca

Offline JohnElliott

  • Posts: 109
IBM 1386887 (3179 terminal) keyboard conversion
« Reply #41 on: Thu, 13 August 2009, 17:01:16 »
Quote from: dw_junon;109497
There are 8 switches, the connector according to Sandy attaches directly next to the keyboard cable connector and so only allows setting of "KBDID A" 2-7 to and "KBDID B" 2 and 3.  Supposing that these are the two bytes of the keyboard ID... the typical byte has eight bits, not six.  And is there a 0?  Whether the series starts at 0 or 1, is it the least significant or most significant bit?  Note also the extra pins beyond the end, are these for another bit or some other purpose?  Do the switches set the bits or just flip existing states?  Are the PCB markings even relevant to the purpose of the switches anyway?  Also note that some of the pins seem to be tied high or low, having attempted to follow the traces.

John, as you have one of these 'boards and seem to have the ability to read reported keyboard IDs, might you be interested in playing with the DIPs?


OK. I'll write it up on my website, but in brief:

  • Switches 1-6 control bits 5-0 of the first keyboard ID byte (bits 7-6 are always 1,0). So in their default position where they're all open, the first ID byte is 10111111 (0xBF). If you close one or more, the corresponding bit goes to 0. Close switch 1 and you get an ID of 0x9F 0xBF, and so on.
  • Similarly, Switches 7 and 8 control bits 5 and 4 of the second keyboard ID byte.
  • And therefore I'd guess that, with 12 sets of pins and 8 switches, the remaining four sets of pins are used to set the low 4 bits of the second ID byte.


Note also that that area of the PCB looks identical on the 84-key Model F, down to the "KBDID A" and "KBDID B" markings, and the extra pair of pins beyond them. But on that model, the schematic at kbdbabel.org shows that pins B5, B6 and B7 are now used to drive the LED panel.

Offline dw_junon

  • Posts: 96
    • http://www.9999hp.net/
IBM 1386887 (3179 terminal) keyboard conversion
« Reply #42 on: Thu, 13 August 2009, 17:03:19 »
Quote from: kishy;109519
I'm interested to see how much of my annoying remapping (and possibly the key up code problems) is canceled out by using one.

Your desired mapping could be incorporated into the code for your kbdbabel ΅controller, so that could be solved forever, at least until you want to change your layout.  As for the lack of scancodes on key up, I don't know how the kbdbabel code deals with this.  Checking the comments in the code, I can see that the typematic repeat rate command is not implemented, however this doesn't really address the matter.


Quote from: kishy
a 56 SX with OS/2 2.1

What's wrong with a Model 56?  I guess they're more common than some, but hey, they're MCA.  It's not like it was a 30 or a E.

Quote from: kishy

Note that the terminal boards of this case design do not need a thin walled one, and I use a 7/32 socket.

Indeed, though I couldn't even find one of those, just my "integer" metric sockets, and our half-decent socket set that just doesn't quite go down to that size...  ISTR that 5.5mm is the "proper" size, though indeed 7/32" is just fine.  Cheap sockets will probably vary a bit anyway... as you point out, it's how thick the thing is that is the usual showstopper.

Note also that the later design does have the same recesses as a '401 and so will need a deep/thin one or a nutdriver.


Quote from: kishy
I thought I'd read somewhere (possibly John's site, not to discredit Sandy but I didn't find any of those pages until the last day or two) that there were DIPs on it.

Sandy is one of my heroes...
Quote from: kishy
I wonder, if the DIP module was put in for example my board, would it do the same function it does in the 3270 PC one?

"Module" is a bit of a glorification, that could be read to imply an extra PCB.  AFAIK it's just a bank of 8 DIP switches, one side of which is shorted together to a common input, the other side providing eight outputs.

Here is the link to Sandy's 6113044 page which I should have posted before.

As to what they might do, it's very hard to say.  It might help if we knew what they did on the 6113044, if anything...

Quote from: kishy
If so, it could theoretically be possible to in some way improve "out of the box compatibility" by throwing jumpers on some of those pins (but I'd need someone to guide me in exactly which to short to achieve anything useful).

Exactly, I was thinking along the same lines before.  Too hard to say what might happen, but if anything would I expect jumpers would do the trick.
ARC/Chicony KB-5181 XT/AT blue ALPS? 101 US FCC ID E8H51KKB-5181 • AST ASTKB102 AT capacitive rubber dome 102 UK ISO
Cherry G80-2100 AT black Cherry 126 key German ISO unique • Compaq Enhanced III PS/2 unknown rubber dome 102 UK ISO
Datacomp DFK102ARA03 AT 102 blue ALPS? US/Arabic FCC ID blank, S/N 37880001 • Dell AT102W PS/2 Black ALPS 105 UK ISO x2
Fujitsu KFB4725-102 AT membrane rubber dome with spring 105 UK ISO • Hewlett Packard C1405A AT rubber dome 102 UK ISO
IBM 0989705 XT/AT no LEDs Model M 102 US/Arabic  • IBM 1388076 Industrial AT Model M 102 UK ISO
IBM 1389260 3179/3180 Display Station Model M 122 US 3270 x2 • IBM 1391406 PS/2 Model M 102 UK ISO x2
IBM 1397003 PS/2 Model M "Host Connect" emulator 122 German ISO • IBM 71G4643 PS/2 Model M Quiet Touch "Ouch!    Rubber spring" 102 UK ISO x2
IBM 5640987 3178 Display Station Model C2 capacitive buckling spring 87 key US 3270 • IBM 556-712-01 RT PC rubber dome [same as 2nd PCjr kbd?] 101 US
IBM 6450225 PC/AT capacitive buckling spring 84 key UK PC/AT • Lexmark 8125460 Model M2 102 UK ISO
NMB RT-102 117456-002 AT Hi-Tek black, clicky 102 UK ISO • Olivetti ANK 2462 M24 Personal Computer keyboard 2 clicky Olivetti spring module 102 UK unique
Ortek MCK-142Pro AT white ALPS 142 key UK • Sun 540-1006-03 Type unknown linear(?) keyswitch 2 87 key SunType2
Wang 724 725-3771-UK salmon ALPS 110 key UK Wang724 • Making this list hasn\'t half scared me...
[/I]

Offline kishy

  • Thread Starter
  • Posts: 1576
  • Location: Windsor, ON Canada
  • Eye Bee M
    • http://kishy.ca/
IBM 1386887 (3179 terminal) keyboard conversion
« Reply #43 on: Thu, 13 August 2009, 17:21:56 »
Well, in general, my current issue is the key-up thing. I tried to play a game (Garry's Mod) with it and completely failed...just kept walking everywhere after I pressed W, because the game was looking for the up code and never got it. Also one of my mapped keys (ESC, mapped to Cmd13's normal spot) didn't register so getting out of the game was kind of interesting.

Priority 1 in my mind at this time is getting the key-up thing resolved.
As a side note, the second keyboard will get its PS/2 cord either tonight or tomorrow, hopefully. Like this one, it will be going to a berg connector so it will be a completely reversible "mod".

Model 56, well, IDK. Something about 386s, I just don't like them. 286, sure, 486, why not...but a 386, despite having been a relatively significant chip, historically...just bores me. This one does have a 486SLC card though, so maybe I should call it a 486...a half-assed one, but still a 486.

First time I saw that Model F page I missed the fact that the actual back is entirely metal...odd. See, the plastic casing for mine has a removable (and replaceable, it doesn't break off) panel which is in the general area of the large berg connector. Difficult to say for sure but it looks like the same little "DIP module" (that is, the switch bank and the small plastic bracket) would fit perfectly, but then that's just eyeballing it. I imagine the switches short top to bottom pins (hopefully) so jumpers would be the way to do it, aside from obtaining a DIP block and wiring that mess.

I believe John said something earlier in the thread about how the key-up thing could potentially be solved by sending something to the keyboard, but that the Windows keyboard driver(s) didn't allow it. John, did you have any success with that in Linux? If it could successfully be accomplished "at all" then that means it could most likely be done in Windows.
Enthusiast of springs which buckle noisily: my keyboards
Want to learn about the Kishsaver?
kishy.ca

Offline JohnElliott

  • Posts: 109
IBM 1386887 (3179 terminal) keyboard conversion
« Reply #44 on: Thu, 13 August 2009, 17:32:57 »
I've now checked my 1390876 as well. The B2-B7 headers correspond to the low 6 bits of the second ID byte in the same way, and I'm sure if my board had headers on A2-A7 they'd affect the first byte too.

Offline JohnElliott

  • Posts: 109
IBM 1386887 (3179 terminal) keyboard conversion
« Reply #45 on: Thu, 13 August 2009, 17:43:53 »
Quote from: kishy;109581
I believe John said something earlier in the thread about how the key-up thing could potentially be solved by sending something to the keyboard, but that the Windows keyboard driver(s) didn't allow it. John, did you have any success with that in Linux? If it could successfully be accomplished "at all" then that means it could most likely be done in Windows.


Send command 0xF8 to the keyboard, and all keys then send make and break codes. I've only tried that under DOS, which is what my homebrew keyboard tester program runs under. Works on both the 6110344 and the 1390876.

Offline kishy

  • Thread Starter
  • Posts: 1576
  • Location: Windsor, ON Canada
  • Eye Bee M
    • http://kishy.ca/
IBM 1386887 (3179 terminal) keyboard conversion
« Reply #46 on: Thu, 13 August 2009, 17:51:28 »
Hmm...I can't see any logical reason why it wouldn't work in Windows (the act of sending the command, that is, not your program).

I don't have a clue, however, how to "send command ____ to the keyboard". Is it possible to do this via a DOS command, or perhaps via DEBUG? Or is there something about your program which I'd be missing (sorry, not very knowledgeable in the software -> hardware interaction area).

Unfortunately, the software I'm using to view if the keys have come back up or not is Windows-dependent, and on the same machine I cannot run true DOS (and I doubt XP's command prompt would do the trick).

I have a system, if you can call it that, set up on a tray table...motherboard, PSU, floppy drive. Has a Windows ME boot floppy in the drive, I boot it up and run EDIT to work with the keyboard on it. In that environment, I have no means to see if the keys actually did send their "break code" though.



edit: you've specified:
Quote
Send command 0xF8 to the keyboard, and all keys then send make and break codes.

"ALL" keys send make and break codes? Wouldn't this then result in every key on the board first performing its function, then "turning off"?
Enthusiast of springs which buckle noisily: my keyboards
Want to learn about the Kishsaver?
kishy.ca

Offline JohnElliott

  • Posts: 109
IBM 1386887 (3179 terminal) keyboard conversion
« Reply #47 on: Thu, 13 August 2009, 18:19:41 »
Quote from: kishy;109585
I don't have a clue, however, how to "send command ____ to the keyboard".


In principle, all you do is output 0xF8 to port 0x60, and wait for the keyboard to return 0xFA. In practice you have to do irritating housekeeping tasks to make sure the keyboard doesn't try to send a keystroke to you at the wrong time. Here's how I'd do it in my DOS program:

Code: [Select]

di();
waitempty();
kwait();
outp(0x64, 0xAD);   /* disable keyboard */
kwait();
outp(0x60, 0xF8);   /* send command */
kwait();
result = inp(0x60);  /* result, should be 0xFA */
kwait();
outp(0x64, 0xAE);   /* enable keyboard */
ei();

where kwait() and waitempty() are helper functions in assembly:
Code: [Select]

_kwait:
        push    cx
        push    ax
        xor     cx, cx
kw1:    in      al, 0x64
        test    al, 2
        loopnz  kw1
        pop     ax
        pop     cx
        retf

_waitempty:
        push    cx
        push    ax
        xor     cx, cx
kw2:    in      al, 0x64
        test    al, 1
        loopnz  kw2
        pop     ax
        pop     cx
        retf



Under an NT-based Windows system, with I/O privileges locked down, it gets harder. You have to ask the keyboard driver to do it for you, which is done with an IOCTL_INTERNAL_I8042_KEYBOARD_WRITE_BUFFER request. The problem is that (as I understand it; I haven't tried) that request can't be made by normal programs, so you need to write a so-called 'filter driver' to make the request... we could really do with someone who's got experience with kernel-mode Windows programming at this point.

Quote

edit: you've specified:

"ALL" keys send make and break codes? Wouldn't this then result in every key on the board first performing its function, then "turning off"?


It would make each key send a code when pressed, and another one when released -- just as 102-key keyboards do when not using scancode set 3.

Offline kishy

  • Thread Starter
  • Posts: 1576
  • Location: Windsor, ON Canada
  • Eye Bee M
    • http://kishy.ca/
IBM 1386887 (3179 terminal) keyboard conversion
« Reply #48 on: Thu, 13 August 2009, 18:29:01 »
Ohhhkay gotcha then on the make/break thing...you're saying if you send the command to the keyboard, it will then send both make and break codes for keys from that point on. That makes more sense than my initial interpretation (that you'd need to send this command after each keystroke).

I definitely appreciate the time and presumably research that went into that post, but I don't understand a) how to actually send the command(s) or b) how to verify that it is working (despite never sending a break code, they do not repeat if connected via the AT interface, so I wouldn't see a difference in a DOS environment).
Enthusiast of springs which buckle noisily: my keyboards
Want to learn about the Kishsaver?
kishy.ca

Offline kishy

  • Thread Starter
  • Posts: 1576
  • Location: Windsor, ON Canada
  • Eye Bee M
    • http://kishy.ca/
IBM 1386887 (3179 terminal) keyboard conversion
« Reply #49 on: Thu, 13 August 2009, 19:17:20 »
Regarding 1386887 usage on a PS/2 56SX:

Code 301 on POST (keyboard not responding or stuck key)
So I plugged in the 1391401, booted into OS/2 then fired up Note Pad.

Typed a sentence "This sentence is being typed on a 1993 1391401."

Then, I swapped out the keyboard for the terminal board, and proceeded to type "This sentence is being typed on a 1986 1386887."

The problem was that the sentence came out looking something similar to "#R@#$T$^^*&^%*$&^&^%::::"'';;;';,..,,<>$#%", at which point it crashed (see blurry attachment).

This suggests to me that PS/2s might not support set 3 at all (perhaps designed not to), and that we just happen to be lucky that modern equipment does by some odd fluke.

http://img40.imageshack.us/img40/5034/1386887onps256sx.jpg
« Last Edit: Sun, 04 October 2009, 21:19:49 by kishy »
Enthusiast of springs which buckle noisily: my keyboards
Want to learn about the Kishsaver?
kishy.ca