• Please review our updated Terms and Rules here

122-key keyboard interfacing...

IBMMuseum

Veteran Member
Joined
Aug 28, 2006
Messages
1,488
The late-model PS/2s had support for 122-key keyboards out of the box. This is the sequence to check for BIOS support, possibly working for other manufacterers/BIOSes as well. Of course any OS with a HAL (typically off-topic here anyway) may give a different reply.

INT 15h, AH = C0h, bit 6 of Feature Byte 2 shows if the system has the ability to report keyboard functionality (in other words, for the next call)

INT 16h, AH = 09h. If bit 6 in AL is set on return, it means the BIOS has 122-key keyboard support (and can support INT 16h, AH = 20 -22h calls, checking for and retrieving 122-key keystrokes)

If bit 4 of AL is set for the same call, it means that the BIOS supports retrieving the Keyboard ID (the next call)

INT 16h, AH = 0Ah. Retrieves Keyboard ID in BX on return from call. The Keyboard ID of a 122-key keyboard (at least IBM's "Host Connect" keyboard for PS/2s) is 86ABh.
 
...The Keyboard ID of a 122-key keyboard (at least IBM's "Host Connect" keyboard for PS/2s) is 86ABh.

Other Keyboard IDs:

101-key "Enhanced" keyboard (or Japanese 'G' keyboard in "pass-through" mode): 83ABh

84-key "Space Saver" (not IBM 'F') keyboard (or Japanese 'G' keyboard in "pass-through" mode): 84ABh

Japanese 'G' keyboard: 41ABh

Japanese 'P' keyboard: 54ABh

"Old" Japanese 'G' keyboard: 90ABh

"Old" Japanese 'P' keyboard: 91ABh

"Old" Japanese 'A' keyboard: 92ABh
 
...I figured my 56 would be able to see the host connect board. As you may have seen, it didn't cooperate with the terminal keyboard because of the keyboard ID, which we then changed with jumpers on the DIP switch pins...

As per the picture (if you didn't change it already), you should remove the jumper from B5 to place on B7 for a Keyboard ID of 86ABh (same as what a "Host Connect" keyboard would have). Theory is, if anything is checking the ID, it is better to provide it with the correct one. For at least the BIOS of the 56SX it will make a difference.
 
As per the picture (if you didn't change it already), you should remove the jumper from B5 to place on B7 for a Keyboard ID of 86ABh (same as what a "Host Connect" keyboard would have). Theory is, if anything is checking the ID, it is better to provide it with the correct one. For at least the BIOS of the 56SX it will make a difference.

The problem with this is that the goal was to make it give the ID of a "normal" keyboard (for example your run-of-the-mill 1391401 Model M)...it's certainly something worth trying to see what happens though.

(I don't know what kbd id it is giving with the jumpers the way they are; I just followed the directions I was given and the 301 went away using this setup)
 
The problem with this is that the goal was to make it give the ID of a "normal" keyboard (for example your run-of-the-mill 1391401 Model M)...it's certainly something worth trying to see what happens though.

(I don't know what kbd id it is giving with the jumpers the way they are; I just followed the directions I was given and the 301 went away using this setup)

I´ve been reaching into my stuff and starting to pull things out, so stand by. Probably I will cross-post most of the data between both forums, but my interest in this is still ¨vintage¨. Thank You for bringing this up so I can help out too.

Now I´ll teach you some binary/hexidecimal for the keyboard PCB:

The default terminal Keyboard ID here is BFh BFh (´h´is one way of showing hexidecimal notation). [For those not familiar with the topic at hand, there are no jumpers installed by default to have the BFh BFh value] In binary (´b´) it is 1011b (Bh) 1111b (Fh) 1011b (Bh) 1111b (Fh). The upper two bits (´10´) of each byte for the Keyboard ID cannot be changed by the jumpers.

Notice all other bits are set (´xx11b 1111b´). A jumper on their corresponding location clears the bit (´0´). First we will jumper A3 (look at the picture) to change the Keyboard ID to 1010b (Ah) 1111b (Fh) 1011b (Bh) 1111b (Fh). The Keyboard ID (with the bytes swapped) is now AFh BFh.

Next, put a jumper on A5. We get 1010b (Ah) 1011b (Bh) 1011b (Bh) 1111b (Fh). The reversed Keyboard ID is now ABh BFh.

Jumper B2, for 1010b (Ah) 1011b (Bh) 1001b (9h) 1111b (Fh). Also B3, for 1010b (Ah) 1011b (Bh) 1000b (8h) 1111b (Fh). Now the reversed bytes for the Keyboard ID are ABh 8Fh.

A jumper on B4 gives 1010b (Ah) 1011b (Bh) 1000b (8h) 0111b (7h). Then jumper B7, for 1010b (Ah) 1011b (Bh) 1001b (8h) 0110b (6h). If we now switch the bytes to the correct order we have 86h ABh, or just 86ABh, the Keyboard ID for a ¨Host Connect¨ keyboard.

Compare that to the 101-key Keyboard ID (83ABh) you have now. The jumper was on B5 for a 3h (0011b) instead of B7 (6h, or 0110b). Do you see the pattern now?

0000b = 0h = 0d (decimal)
0001b = 1h = 1d
0010b = 2h = 2d
0011b = 3h = 3d
0100b = 4h = 4d
0101b = 5h = 5d
0110b = 6h = 6d
0111b = 7h = 7d
1000b = 8h = 8d
1001b = 9h = 9d
1010b = Ah = 10d
1011b = Bh = 11d
1100b = Ch = 12d
1101b = Dh = 13d
1110b = Eh = 14d
1111b = Fh = 15d
 
Last edited:
...The Keyboard ID of a 122-key keyboard (at least IBM's "Host Connect" keyboard for PS/2s) is 86ABh.

I had an associate (named on thee other forum as a reference) years ago that stated his ¨Host Connect¨ keyboard was Keyboard ID 85ABh (you may have seen on the forum with these listed such as 0x85AB, which is another hexidecimal notation). Either the UK version he had has this Keyboard ID, or it was a slightly different type. It is unknown at this point whether IBM had a ¨Host Connect¨ (for the PS/2) version like this:

1387033.jpg
 
For all of my talk about late-model PS(2s (not really vintage here yet), the topic does have a vintage application. These 122-key terminal keyboards can connect to an IBM AT / XT286 (and possibly the late-model XTs) if the cable is changed out for the correct plug. And you wouldn´t even have to put on any of the keyboard PCB jumpers to set a different Keyboard ID!
 
It appears that setting the Keyboard ID on the PCB (86ABh on a part number 6110345 Model F 3180 keyboard) doesn´t matter to the 3270 PC. I´m going to leave it set that way, and try the AT and PS/2 connections from there. Probably my way will be to convert an old mechanical KVM switch (not switching under power, just a way to make the connections) to go between different keyboard cable connections
 
...Do you see the pattern now?

Or just to give a chart I made:

Code:
 Kbd ID | Keyboard Style |JA2|JA3|JA4|JA5|JA6|JA7|JB2|JB3|JB4|JB5|JB6|JB7|
--------|----------------|---|---|---|---|---|---|---|---|---|---|---|---|
  0000  |   No keyboard  |N/A|N/A|N/A|N/A|N/A|N/A|N/A|N/A|N/A|N/A|N/A|N/A|
--------|----------------|---|---|---|---|---|---|---|---|---|---|---|---|
  83AB  | 101 "Enhanced" |   | X |   | X |   |   | X | X | X | X |   |   |
--------|----------------|---|---|---|---|---|---|---|---|---|---|---|---|
  84AB  | 84 Space Saver |   | X |   | X |   |   | X | X | X |   | X | X |
--------|----------------|---|---|---|---|---|---|---|---|---|---|---|---|
  85AB  |   UK 122-key?  |   | X |   | X |   |   | X | X | X |   | X |   |
--------|----------------|---|---|---|---|---|---|---|---|---|---|---|---|
  86AB  | "Host Connect" |   | X |   | X |   |   | X | X | X |   |   | X |
--------|----------------|---|---|---|---|---|---|---|---|---|---|---|---|
  90AB  |  Old Japan 'G' |   | X |   | X |   |   | X |   | X | X | X | X |
--------|----------------|---|---|---|---|---|---|---|---|---|---|---|---|
  91AB  |  Old Japan 'P' |   | X |   | X |   |   | X |   | X | X | X |   |
--------|----------------|---|---|---|---|---|---|---|---|---|---|---|---|
  92AB  |  Old Japan 'A' |   | X |   | X |   |   | X |   | X | X |   | X |
--------|----------------|---|---|---|---|---|---|---|---|---|---|---|---|
  BFBF  |  Term. default |   |   |   |   |   |   |   |   |   |   |   |   |
--------|----------------|---|---|---|---|---|---|---|---|---|---|---|---|

I don't know if I'm scaring people away, or this is outside the interest here...
 
The problem with this is that the goal was to make it give the ID of a "normal" keyboard (for example your run-of-the-mill 1391401 Model M)...it's certainly something worth trying to see what happens though.

(I don't know what kbd id it is giving with the jumpers the way they are; I just followed the directions I was given and the 301 went away using this setup)

If you are able to get your Model 56SX into DOS, I would like you to run a program I will supply...
 
If you are able to get your Model 56SX into DOS, I would like you to run a program I will supply...

It's got Win95 installed at the moment so I can indeed boot it into DOS with ease. Supply the program and run it I shall.

Heads up - I don't intend to have that machine too much longer. Any testing you want me to do, put together a list and get it over to me. I could have the thing for a month, I could have it for 2 years, it all depends on finding an appropriate new home for it.

Not meaning to disregard your lesson on keyboard IDs, I just don't know how to comment on it lol. It makes sense while I'm reading it but good luck getting it to 'stick'.
 
It's got Win95 installed at the moment so I can indeed boot it into DOS with ease. Supply the program and run it I shall.

Heads up - I don't intend to have that machine too much longer. Any testing you want me to do, put together a list and get it over to me. I could have the thing for a month, I could have it for 2 years, it all depends on finding an appropriate new home for it.

Not meaning to disregard your lesson on keyboard IDs, I just don't know how to comment on it lol. It makes sense while I'm reading it but good luck getting it to 'stick'.

PM sent about the program...

But isn´t it great to adjust the jumpers just so the 56SX doesn´t complain?...
 
...Not meaning to disregard your lesson on keyboard IDs, I just don't know how to comment on it lol. It makes sense while I'm reading it but good luck getting it to 'stick'.

One cool thing I found out a couple years back is an IBM laptop that identified its built-in keyboard as a ¨Space Saver¨ (Keyboard ID 84AB) had an option for an external numerical pad (which is what is ¨missing¨ from the Space Saver keyboard layout) to be plugged into the keyboard port. Once you did, the Keyboard ID changed to that of the ´Enhanced´ 101-key keyboard (83AB). Well, it was cool to me.
 
The 56SX stopped complaining when I changed the jumpers to the current configuration (not the one you've given me, the one in the photo).

At least, the 301 stopped coming up and it booted peacefully.

It's, I believe, a fundamental incompatibility of OS/2 2.1 with 84-key AT keyboards (which is what the real terminal boards function as after having a cord swap) that resulted in it typing gibberish. We'll see with Win95 in a few minutes when I start it up to run your program.
 
Well, I figured out why it stopped complaining despite it being wrong. It's reading the ID as exactly the same thing for both jumper settings (B7 vs B5).

Still types gibberish with either setting. My theory is this:

The BIOS of the PS/2s which can support host-connect keyboards is intended to support certain keyboards only...your typical run of the mill 101/102-key "M" and compatibles, and then the host connect series. Since we have set the ID that the host connect keyboard uses, the BIOS is performing some sort of low-level key remapping (???), which because the real terminal keyboard is electrically different are being interpreted quite incorrectly.

If I may throw a suggestion out there that I don't entirely understand myself, it is possible that the very fact this machine DOES support host connect keyboards by design is in fact the reason why it cannot work with a real terminal keyboard.


Edit: tried on the 30-286. There is currently no OS (I put that hard drive to work somewhere else so I've put another in, and it's blank)
Error "AB 301", when it prompted me to hit F1 to continue I hit what would be F1 on an 84-key keyboard and it worked. Then goes to the 'Non-system disk or disk error' prompt and it repeated 5 times, probably because it thought F1 was still held down (not sending break codes). Why it stopped after that, I'm not sure.
 

Attachments

  • jumperonb5.jpg
    jumperonb5.jpg
    37.7 KB · Views: 1
  • jumperonb7.jpg
    jumperonb7.jpg
    36.3 KB · Views: 1
Last edited:
Well, I figured out why it stopped complaining despite it being wrong. It's reading the ID as exactly the same thing for both jumper settings (B7 vs B5).

Still types gibberish with either setting. My theory is this:

The BIOS of the PS/2s which can support host-connect keyboards is intended to support certain keyboards only...your typical run of the mill 101/102-key "M" and compatibles, and then the host connect series. Since we have set the ID that the host connect keyboard uses, the BIOS is performing some sort of low-level key remapping (???), which because the real terminal keyboard is electrically different are being interpreted quite incorrectly.

If I may throw a suggestion out there that I don't entirely understand myself, it is possible that the very fact this machine DOES support host connect keyboards by design is in fact the reason why it cannot work with a real terminal keyboard.


Edit: tried on the 30-286. There is currently no OS (I put that hard drive to work somewhere else so I've put another in, and it's blank)
Error "AB 301", when it prompted me to hit F1 to continue I hit what would be F1 on an 84-key keyboard and it worked. Then goes to the 'Non-system disk or disk error' prompt and it repeated 5 times, probably because it thought F1 was still held down (not sending break codes). Why it stopped after that, I'm not sure.

Thank You for your work in this. I think your theory is very correct regarding PS/2s (I´m testing on a Model 77 ¨Lacuna¨, so my platform could be different enough from your 56SX, although they are supposed to have the same Keyboard Controller, ¨KBC¨, on the motherboard/planar). My ¨True Blue¨ Host Connect keyboard works there without errors, and is identified as Keyboard ID 86AB (my convertions with the same keyboard PCB as yours don´t even like the 83AB setting).

For however that newer clones support showing the IBM convention of the Feature Bytes in the ¨Get Configuration¨ call (INT 15h AX=C0h), we may learn if there is something else. All PS/2s that support (their PS/2 version) 122-key keyboard have a ¨non-8042¨ KBC. It looks that the KBC and other components may have to be more standard like the older interface for a system to like the converted terminal keyboards (there is a place in the program that shows whether the system reports a ¨non-8042¨ KBC).

Even if I learn that these keyboard types don´t work with a PS/2 I am content that I tried. I am heartened by the keyboard PCB on the 6110345 Model F being the same on the AT (I am going to try that later today). In fact I have to remember to keep the vintage tact here, but to still keep both forums informed (like you are doing too).
 
Thank You for your work in this. I think your theory is very correct regarding PS/2s (I´m testing on a Model 77 ¨Lacuna¨, so my platform could be different enough from your 56SX, although they are supposed to have the same Keyboard Controller, ¨KBC¨, on the motherboard/planar). My ¨True Blue¨ Host Connect keyboard works there without errors, and is identified as Keyboard ID 86AB (my convertions with the same keyboard PCB as yours don´t even like the 83AB setting).

For however that newer clones support showing the IBM convention of the Feature Bytes in the ¨Get Configuration¨ call (INT 15h AX=C0h), we may learn if there is something else. All PS/2s that support (their PS/2 version) 122-key keyboard have a ¨non-8042¨ KBC. It looks that the KBC and other components may have to be more standard like the older interface for a system to like the converted terminal keyboards (there is a place in the program that shows whether the system reports a ¨non-8042¨ KBC).

Even if I learn that these keyboard types don´t work with a PS/2 I am content that I tried. I am heartened by the keyboard PCB on the 6110345 Model F being the same on the AT (I am going to try that later today). In fact I have to remember to keep the vintage tact here, but to still keep both forums informed (like you are doing too).

Although you likely already knew this, the 56SX does say "non-8042" in that system information program you provided.

About the 84-key Model F, remember the matrix has more connections on the terminal keyboards, so one or both ribbons will probably be longer (if I remember right).

Interestingly, the presence of the 486SLC3 processor caused the system info tool to believe I have a 56 SLC.
 
Although you likely already knew this, the 56SX does say "non-8042" in that system information program you provided...

Yes, all PS/2s that support the PS/2 Host Connect keyboard have that. I wanted to see what some newer clone systems that ran the modified terminal keyboards would report. Even though the 8042 replacement circuitry has been in chipsets rather than that particular component for years.

...About the 84-key Model F, remember the matrix has more connections on the terminal keyboards, so one or both ribbons will probably be longer (if I remember right)...

For both styles of ¨F¨ keyboards, the key matrix assembly is soldered to the PCB. It is the same width of connections on both styles. And a modified ´F´ terminal keyboard might even be able to be retrofitted with lock lights too.

...Interestingly, the presence of the 486SLC3 processor caused the system info tool to believe I have a 56 SLC.

There are two 8556-level systems, a 386SX and (an IBM) 386SLC CPU, both run at 20MHz. The 9556 systems are a 486SLC2 and 486SLC3, both run at a base clock of 25MHz (so internal to the CPU, 50 and 75MHz respectively). All have a proprietary daughtercard socket to be able to upgrade the CPU.

For the 386SX base planar, you can put in a 386SLC, 486SLC2, or 486SLC3 daughtercard. The 386SLC planar can have a 486SLC2 or 486SLC3 daughtercard. But the 8556 runs the upgrade CPU daughtercards at multiples of its planar CPU base clock, meaning the 486SLC2 is running at 40MHz internally, and 486SLC3 is running at 60MHz internally.

The 9556 planars run the same CPU upgrade daughtercards from their base clock of 25MHz. So a 486SLC3 daughtercard on a 486SLC2 planar (the only practical upgrade for the 9556 systems) will be run at 75MHz internally. Despite there being no effective upgrades for the 486SLC3 planar, it still has the upgrade socket.

There are also differences in the planar video system. The 8556 have a TI SVGA chip with 512Kb VRAM. On the 9556 systems it is XGA-2, with 2Mb of VRAM.
 
There are two 8556-level systems, a 386SX and (an IBM) 386SLC CPU, both run at 20MHz. The 9556 systems are a 486SLC2 and 486SLC3, both run at a base clock of 25MHz (so internal to the CPU, 50 and 75MHz respectively). All have a proprietary daughtercard socket to be able to upgrade the CPU.

For the 386SX base planar, you can put in a 386SLC, 486SLC2, or 486SLC3 daughtercard. The 386SLC planar can have a 486SLC2 or 486SLC3 daughtercard. But the 8556 runs the upgrade CPU daughtercards at multiples of its planar CPU base clock, meaning the 486SLC2 is running at 40MHz internally, and 486SLC3 is running at 60MHz internally.

The 9556 planars run the same CPU upgrade daughtercards from their base clock of 25MHz. So a 486SLC3 daughtercard on a 486SLC2 planar (the only practical upgrade for the 9556 systems) will be run at 75MHz internally. Despite there being no effective upgrades for the 486SLC3 planar, it still has the upgrade socket.

There are also differences in the planar video system. The 8556 have a TI SVGA chip with 512Kb VRAM. On the 9556 systems it is XGA-2, with 2Mb of VRAM.

I hate to do this because you DO know what you're talking about, but there is only 256Kb of memory for the integrated video on an 8556-045.

Given that I have a 386SX 'planar' and have installed a 486SLC3 "module" as I'll call it, that would mean I have a (internally only) 60MHz CPU?

About the F matrix connection, are you sure there aren't more "wires" for the 122-key Model F vs the 84-key Model F? Logic says there should be but I don't have either handy to rip apart.
 
I hate to do this because you DO know what you're talking about, but there is only 256Kb of memory for the integrated video on an 8556-045...

Right, I was confused with the MCA adapter using the same TI chip. There is solder pads on the planar for doubling the VRAM to make it the same as the MCA card. I think it was tried, but I can´t remember the outcome.

...Given that I have a 386SX 'planar' and have installed a 486SLC3 "module" as I'll call it, that would mean I have a (internally only) 60MHz CPU?...

Yes...

...About the F matrix connection, are you sure there aren't more "wires" for the 122-key Model F vs the 84-key Model F? Logic says there should be but I don't have either handy to rip apart.

Yes, I´m sure. Side-by-side, they look exactly the same except for the different soldered keymatrix assembly attached, with the same width of cables there. But I´ve put out an inquiry to the pinouts of the keyboard PCB berg connection - My 84-key AT keyboard doesn´t work with the connection I have fabricated.
 
Back
Top