Author Topic: TMK IBM PC Keyboard Converter  (Read 139564 times)

0 Members and 1 Guest are viewing this topic.

Offline hasu

  • Thread Starter
  • Posts: 3471
  • Location: Tokyo, Japan
  • @tmk
    • tmk keyboard firmware project
Re: TMK IBM PC Keyboard Converter
« Reply #150 on: Tue, 17 November 2020, 17:20:04 »
You can post detailed infomation to improve this converter. Your contribution are welcome.

I'm getting a lot of key chatter or freezing with this converter vs Soarer's


Offline Mikhail

  • Posts: 91
  • Location: Moscow, Russia
Re: TMK IBM PC Keyboard Converter
« Reply #151 on: Tue, 17 November 2020, 20:59:51 »
Hi!
Chicony kb-5191 in XT mode:
Pressing Pause/Break:

Listening:
rE1 r1D r45 rE1 r9D rC5

All 6 byte in press, no hold and release (like it should be in DOS). In Windows it should generate first 3 byte by press and hold, and rest of 3 bytes by release (as told Wiki)

Keyboard testers in Win shows the key stand pressed.
If remap key in Macs carabiner, key stand pressed too.


Waiting for device:...........................
Listening:


TMK:12eaedf9/LUFA


USB configured.

Keyboard start.

PRT:22 ISR:AAC0 I1582 wFF A2619
ERR:11 ISR:0000 X3121 rAA W3229 wF2 R3765
ID:FFFF(1)
ERR:11 ISR:AAC0 S3766 L3766 rAA


For Siemens F500:
Waiting for device:........
Listening:


TMK:12eaedf9/LUFA


USB configured.

Keyboard start.

PRT:21 ISR:AFA0 I1582 wFF A2619
ERR:11 ISR:AFA0 X3121 e20
ERR:20 ISR:4000 rEA W3207 rAF W3208 wF2 R3744
ID:FFFF(1)
ERR:11 ISR:AFA0 S3745 L3745
« Last Edit: Tue, 17 November 2020, 21:19:17 by Mikhail »

Offline hasu

  • Thread Starter
  • Posts: 3471
  • Location: Tokyo, Japan
  • @tmk
    • tmk keyboard firmware project
Re: TMK IBM PC Keyboard Converter
« Reply #152 on: Tue, 17 November 2020, 22:10:03 »
Mikhail, Thanks for the report
I found and fixed a bug on handling of XT Pause key. Fixed firmware is attached. * ibmpc_usb_debug_pause_fix.hex (52.55 kB - downloaded 243 times.)


'ERR:11' in debug outputs is expected and no problem for XT keyobard when plugin and startup.
But 'ERR:20' is not expected and a bit weird. This is not problem if the error is temporary and happens only after plugin.

Try attached firmware on Siemens F500 and type some keys to see if the error happens. Its debug output would be helpful again.

Assuming both kb-5191 and F500 have LED indicators, how they work in XT mode when you press capslock or numlock?


For Siemens F500:
Waiting for device:........
Listening:


TMK:12eaedf9/LUFA


USB configured.

Keyboard start.

PRT:21 ISR:AFA0 I1582 wFF A2619
ERR:11 ISR:AFA0 X3121 e20
ERR:20 ISR:4000 rEA W3207 rAF W3208 wF2 R3744
ID:FFFF(1)
ERR:11 ISR:AFA0 S3745 L3745





Offline Mikhail

  • Posts: 91
  • Location: Moscow, Russia
Re: TMK IBM PC Keyboard Converter
« Reply #153 on: Tue, 17 November 2020, 22:26:54 »
Hasu,
Now it’s hard to test Siemens because it without switches. Original blacks was to scratchy so i decide to desolder it to clean and lube. I will try.
Also the reset pin are connected.
Num lock is light when Num lock is OFF, and not light when ON.
Same thing with Pause/Break on Chicony((
« Last Edit: Tue, 17 November 2020, 22:43:16 by Mikhail »

Offline hasu

  • Thread Starter
  • Posts: 3471
  • Location: Tokyo, Japan
  • @tmk
    • tmk keyboard firmware project
Re: TMK IBM PC Keyboard Converter
« Reply #154 on: Wed, 18 November 2020, 00:32:47 »
XT keyboard  have no lock indicator originally and XT protocol doesn't support indicator.
The keyboard just controls its LEDs internally and it can lost sync with lock key status of computer. Conveter is not reloated here.

Fixed again. Try this firmware then.
* ibmpc_usb_debug_pause_fix2.hex (52.55 kB - downloaded 241 times.)

Offline Mikhail

  • Posts: 91
  • Location: Moscow, Russia
Re: TMK IBM PC Keyboard Converter
« Reply #155 on: Wed, 18 November 2020, 07:07:11 »
XT keyboard  have no lock indicator originally and XT protocol doesn't support indicator.
The keyboard just controls its LEDs internally and it can lost sync with lock key status of computer. Conveter is not reloated here.

Fixed again. Try this firmware then.
(Attachment Link)

Ok, now seems all work! Pause press and release without holding.

Chicony 5191
Listening:


TMK:4f845302/LUFA


USB configured.

Keyboard start.

PRT:22 ISR:AAC0 I1583 wFF A2620
ERR:11 ISR:0000 X3122 rAA W3230 wF2 R3766
ID:FFFF(1)
ERR:11 ISR:AAC0 S3767 L3767 rAA



Siemens F500
Listening:


TMK:4f845302/LUFA


USB configured.

Keyboard start.

PRT:21 ISR:AFA0 I1583 wFF A2620
ERR:11 ISR:AFA0 X3122
ERR:20 ISR:4000 e20 rEA W3208 rAF W3209 wF2 R3745
ID:FFFF(1)
ERR:11 ISR:AFA0 S3746 L3746



The "TERM FUNC" key generate r65 rE5 scan code.
I'll wait when you make changes to the main firmware ti use Keymap Editor. Thank you again!
« Last Edit: Wed, 18 November 2020, 07:11:26 by Mikhail »

Offline hasu

  • Thread Starter
  • Posts: 3471
  • Location: Tokyo, Japan
  • @tmk
    • tmk keyboard firmware project
Re: TMK IBM PC Keyboard Converter
« Reply #156 on: Wed, 18 November 2020, 08:12:43 »
Great. I'll update firmware on repo and Keymap Editor some later.

The Siemens keyboard seems to be unusual on startup at least, let me know when you find problem.

Offline hasu

  • Thread Starter
  • Posts: 3471
  • Location: Tokyo, Japan
  • @tmk
    • tmk keyboard firmware project
Re: TMK IBM PC Keyboard Converter
« Reply #157 on: Sat, 21 November 2020, 13:39:21 »
Updated firmware on github repository and Keymap Editor.

- Fixed Pause key for enhanced XT keyboard

Offline Mikhail

  • Posts: 91
  • Location: Moscow, Russia
Re: TMK IBM PC Keyboard Converter
« Reply #158 on: Fri, 27 November 2020, 18:32:33 »
Hello! I have assembled Siemens F500. Everything works as expected. Tried TMK Keymap Editor, works too. The only thing would be cool to be able to reassign the TERM FUNC button (r65 rE5 scan code / ACPI Wake function).

Offline hasu

  • Thread Starter
  • Posts: 3471
  • Location: Tokyo, Japan
  • @tmk
    • tmk keyboard firmware project
Re: TMK IBM PC Keyboard Converter
« Reply #159 on: Fri, 27 November 2020, 19:53:08 »
Hi,  great to hear that.
Scan code 0x65 of Code Set 1(XT) is assigned to 'F14'(USB) here and you can remap the F14 on keymap editor.
I guess Windows recognizes F14 as ACPI Wake probably. In general how F13-F24 keys are handled depends on your OS.

https://github.com/tmk/tmk_keyboard/blob/master/converter/ibmpc_usb/unimap_trans.h#L91

Offline Mikhail

  • Posts: 91
  • Location: Moscow, Russia
Re: TMK IBM PC Keyboard Converter
« Reply #160 on: Sat, 28 November 2020, 11:23:34 »
Yea, F14 remap is working))

Offline cparrot

  • Posts: 2
Re: TMK IBM PC Keyboard Converter
« Reply #161 on: Wed, 02 December 2020, 13:23:55 »
Updated firmware on github repository and Keymap Editor.

- Fixed Pause key for enhanced XT keyboard

Hi and thank you for your awesome work on this.
I noticed that the printscreen/* key below enter is only *, NumLock on or off,
with this new version. I will adjust my mapping to that, but I wanted to let you know.
Until this version the firmware worked like a charm on my XT, with my costum mapping.

I had troubles with random keys registering on my XT and updated to this version in hopes of fixing that.
It didn't work still, but I found that my problem probably came from the only screw on the boards PCB being too loose,
leading to grounding issues.
After thightening it the random presses went away, but the unremapped firmware had that behaviour.
« Last Edit: Wed, 02 December 2020, 17:02:08 by cparrot »

Offline hasu

  • Thread Starter
  • Posts: 3471
  • Location: Tokyo, Japan
  • @tmk
    • tmk keyboard firmware project
Re: TMK IBM PC Keyboard Converter
« Reply #162 on: Tue, 08 December 2020, 20:02:27 »
cparrot,
What is behaviour you expected on the key and how did you do in your custom mapping actually?

Orignally on IBM PC/XT the 'PrtSc *' key spits out 'Keypad *' usually while 'PrintScreen' with holding Shift(this is recognized in BIOS, not keyboard).
https://github.com/tmk/tmk_keyboard/wiki/IBM-PC-XT-Keyboard-Protocol#print-screen

The keys are assigned as 'Keypad *' in the converter and this is intended behaviour. The converter doesn't  emulate the original key behaviour by default, it is not my goal.
You can remap the key if you don't like default mapping anyway.

Offline cparrot

  • Posts: 2
Re: TMK IBM PC Keyboard Converter
« Reply #163 on: Mon, 14 December 2020, 12:40:59 »
Thanks, I didn't know about the Shift+KP* behaviour.

Before the new version my mapping had a layer 2 toggle in place of the NumLock key
and on the default layer were the (back then) locked num keys.
Layer 2 was exactly like the legends, but L2 Keypad 5 acted as a second enter key.

I was really confused for a bit, because I didn't know NumLock was handled by OS and I got stuck with unlocked num key behaviour
on both layers. I must have toggled NumLock somewhen in the process of updating and I don't have any indicator for that.

To get this mapping right all the time I would have to ditch KP keys completely,
but until now I just left it stock and used a different shortcut for screenshots.

Offline hasu

  • Thread Starter
  • Posts: 3471
  • Location: Tokyo, Japan
  • @tmk
    • tmk keyboard firmware project
Re: TMK IBM PC Keyboard Converter
« Reply #164 on: Mon, 14 December 2020, 18:49:38 »
cparrot, Thanks for the explanation.

Offline Alectardy98

  • Posts: 17
  • Location: United States
  • Pre Dental
Re: TMK IBM PC Keyboard Converter
« Reply #165 on: Sat, 19 December 2020, 14:02:11 »
hey I wanted to say that this let me use my focus 2001 that I was unable to get to work reliably using a soarers, anyways I wanted a bit of help programing TMK with the focus 2001. The focus 2001 has a blank key on the left that when pressed gives this imput to hd listen
r61 §rF0 r61

what would I do if I wanted this button to be my lgui key?

Offline hasu

  • Thread Starter
  • Posts: 3471
  • Location: Tokyo, Japan
  • @tmk
    • tmk keyboard firmware project
Re: TMK IBM PC Keyboard Converter
« Reply #166 on: Sat, 19 December 2020, 20:53:35 »
Need some info to answer you quesiton.

First, show me outputs from hid_listen when startup to know how the converter recognize the keyboard.
What's  your keyboard layout setting on your OS? US or European ISO?
And the keyboard seems to be AT/XT switchable, which protocol is selected?

What exactly happens with Soarer's converter?

hey I wanted to say that this let me use my focus 2001 that I was unable to get to work reliably using a soarers, anyways I wanted a bit of help programing TMK with the focus 2001. The focus 2001 has a blank key on the left that when pressed gives this imput to hd listen
r61 §rF0 r61

what would I do if I wanted this button to be my lgui key?


Offline Alectardy98

  • Posts: 17
  • Location: United States
  • Pre Dental
Re: TMK IBM PC Keyboard Converter
« Reply #167 on: Sun, 20 December 2020, 12:37:50 »
When I Plug in the keyboard, This is what HID listen does
Keyboard start.
I210 wFF rFA A1215
PRT:10 ISR:FE90 rAA W1294 wF2 rFA rAB r83 R1801
ID:AB83(AT) S1802 wED rFA w00 rFA L1809


The keyboard is set to US, and I have fliped the switch from at to xt so may times that I Lost track, but I belive it is AT because lock lights works

Offline hasu

  • Thread Starter
  • Posts: 3471
  • Location: Tokyo, Japan
  • @tmk
    • tmk keyboard firmware project
Re: TMK IBM PC Keyboard Converter
« Reply #168 on: Sun, 20 December 2020, 19:46:03 »
The log shows that the keyboards is recognized  as AT keyboard with Code Set 2.
So the scan code '61' of the key means ISO key between Left shift and Z(on usual layout). You can remap it with keymap editor or editing unimap_plain.c.
https://github.com/tmk/tmk_keyboard/blob/c230460b12f1d6ff149a6139166bed8247eeeb60/converter/ibmpc_usb/unimap_trans.h#L99-L136

It would be appreciated if you can take some time to test and improve the converter firmware.
- Can you test TMK firmware with the keyobard in XT mode?  hid_listen log would be helpful too here.

- Optionally, but I'm still curious, can you test Soarer's firmware with the keyboard in both mode?
I've never heard Soarer's firmware has problem with the keyboard and think it works without problem.
hid_listen log would be helpful again if you find something weird.


Offline Alectardy98

  • Posts: 17
  • Location: United States
  • Pre Dental
re
« Reply #169 on: Sun, 20 December 2020, 20:44:47 »
Thank you for the help, that was the right button to change! AT Mode works perfect
okay I did a very short test in xt mode, and everything is working fine, for reference I wrote this using XT mode,  Also Lock Lights work on XT Mode
here is what HID listen had to say

USB configured.

Keyboard start.
I182 wFF A1219
ERR:11 ISR:AAC0
PRT:22 ISR:0000 X1721 rAA W1722 wF2 R2258
ID:FFFF(XT)
ERR:11 ISR:AAC0 S2259 L2259

With Soarers it is another story, Like I said I couldn't get it to work, but I know the converters work, I have three of them and none of them work, Here is what I get with HID listen in XT mode
Keyboard ID: 0000
Code Set: 1
Mode: PC/XT

(and I get no inputs)

This is what I get with soarers in at mode

Keyboard ID: 00AB
Code Set: 2 (extended)
Mode: AT/PS2

wED rFA w00 rFA

It recognizes inputs but it has heavy ghosting, even worse than my zenith z150 had with soarers. also, a lot of keys lag or fail to recognize presses, overall over with the soarers I have an inconsistent and unusable keyboard, and using this tmk firmware it works perfectly in both modes.

Offline hasu

  • Thread Starter
  • Posts: 3471
  • Location: Tokyo, Japan
  • @tmk
    • tmk keyboard firmware project
Re: TMK IBM PC Keyboard Converter
« Reply #170 on: Sun, 20 December 2020, 21:15:56 »
Thanks for the tests and logs.

The converter recognizes it as XT. (those 'ERR's are expected at startup).
Its lock lights are controled by keyboard itself, interesting. Converter/host can't change them in XT mode due to its protocol limitation.

Hmm, FK-2001 may use unusual signal timing and Soarer's seems to miss it occasionally, perhaps. Good to know.

Offline Alectardy98

  • Posts: 17
  • Location: United States
  • Pre Dental
Re: TMK IBM PC Keyboard Converter
« Reply #171 on: Sat, 26 December 2020, 12:45:25 »
could someone knowledgeable with tmk tell me how to assign macros, I am having a hard time with it

Offline Alectardy98

  • Posts: 17
  • Location: United States
  • Pre Dental
Re: TMK IBM PC Keyboard Converter
« Reply #172 on: Sat, 26 December 2020, 17:02:48 »
IBM Numpad 1396199 does not work


TMK:e473e8ce/LUFA


USB configured.

Keyboard start.
I282 wFF A1319
ERR:11 ISR:0000 X1820



Offline hasu

  • Thread Starter
  • Posts: 3471
  • Location: Tokyo, Japan
  • @tmk
    • tmk keyboard firmware project
Re: TMK IBM PC Keyboard Converter
« Reply #173 on: Sat, 26 December 2020, 23:31:09 »
The log shows it can't seems to read anything on signal lines.

The converter is same as one used with your Focus before?
The numpad works with usual PS/2 converter or Soarer's?


Offline Alectardy98

  • Posts: 17
  • Location: United States
  • Pre Dental
Re: TMK IBM PC Keyboard Converter
« Reply #174 on: Fri, 15 January 2021, 00:05:37 »
sorry for the late response, I believe the Numpad was electrically shot, i don't think it had anything to do with tmk, sorry about that

Offline hasu

  • Thread Starter
  • Posts: 3471
  • Location: Tokyo, Japan
  • @tmk
    • tmk keyboard firmware project
Re: TMK IBM PC Keyboard Converter
« Reply #175 on: Fri, 05 February 2021, 23:43:06 »
If there is someone with Zenith Z-150 AT here ...

Can you try this firmware and post your result with 'hid_listen' log?
https://github.com/tmk/tmk_keyboard/tree/09e4aa77072393c89e7f75202bf6531445dc2d56/converter/ibmpc_usb/binary

- Type keys and check if they work without glitch
- Press CapsLock or NumLock key and check if its LED indicator changes

Thanks



Detailed Issue Description:
- https://github.com/tmk/tmk_keyboard/issues/661
- https://github.com/tmk/tmk_keyboard/wiki/IBM-PC-AT-Keyboard-Protocol#zenith-z-150-at

Offline gottspeed

  • Posts: 2
Re: TMK IBM PC Keyboard Converter
« Reply #176 on: Sun, 07 February 2021, 20:03:14 »
IBM Rapid Access Keyboard conversion

Hi, I'd like to work towards converting a PS/2 keyboard to a USB unit, but its an unusual case. This keyboard requires that a scan-code be sent to it to initialize its multimedia and shortcut buttons. Its not a keyboard I've seen covered on here so I'm wondering what the path forward would be to get this working. I see lots of different converters available for purchase but I'm not sure which one would work, and what would be required to customize its firmware to initialize and handle the scancodes from the extra buttons.

Offline hasu

  • Thread Starter
  • Posts: 3471
  • Location: Tokyo, Japan
  • @tmk
    • tmk keyboard firmware project
Re: TMK IBM PC Keyboard Converter
« Reply #177 on: Sun, 07 February 2021, 20:15:51 »
Check first post and program default firmware on your converter.
You can download the firmware from Keymap Editor or github.

And then post debug outputs on 'hid_listen'. I'd like to know ID of the keyboard, first.


EDIT:
Check this page to compile firmware as well.
https://github.com/tmk/tmk_keyboard/wiki#build-firmware
« Last Edit: Sun, 07 February 2021, 20:21:51 by hasu »

Offline gottspeed

  • Posts: 2
Re: TMK IBM PC Keyboard Converter
« Reply #178 on: Sun, 07 February 2021, 20:34:02 »
Thank you, I'll purchase a converter this evening. The make scancodes are published for the multimedia keys on this keyboard, but not the break scancodes. Will the converter report these non-standard scan codes through hid_listen?

I'm going to put my mind to this but I may need a bit of spoonfeeding as to where to add the initializing scancode of "ea 71" to the firmware code.

Offline hasu

  • Thread Starter
  • Posts: 3471
  • Location: Tokyo, Japan
  • @tmk
    • tmk keyboard firmware project
Re: TMK IBM PC Keyboard Converter
« Reply #179 on: Sun, 07 February 2021, 22:11:05 »
hmm, 'no break code' makes it difficult to integrate its support into default firmware, perhaps.
It will need custom code for the keys and this is tricker than what I expected.

Sending the "ea 71" code at startup won't be a problem if the keyboard has useful ID to discriminate it from others.

Thank you, I'll purchase a converter this evening. The make scancodes are published for the multimedia keys on this keyboard, but not the break scancodes. Will the converter report these non-standard scan codes through hid_listen?

I'm going to put my mind to this but I may need a bit of spoonfeeding as to where to add the initializing scancode of "ea 71" to the firmware code.


Offline TheNeonKnight

  • Posts: 25
Re: TMK IBM PC Keyboard Converter
« Reply #180 on: Fri, 12 February 2021, 17:00:22 »
Is it possible to add the second key under Numpad 0 to the unimap_plain.c? It is in unimap_trans but i'm not sure on the bearing b/w the 2.

Offline Fritz the German

  • Posts: 18
  • Location: Germany
    • My Blog
Re: TMK IBM PC Keyboard Converter
« Reply #181 on: Thu, 18 March 2021, 15:13:54 »
My Teensy 2.0 is arriving soon. Two questions, before I fetch my soldering iron:
Quote
- Reset PB6 or PB7 (For some of XT keyboards. Not needed for AT, PS/2 and Terminal)
It's the same if I choose PB6 or PB7, right?

Quote
Pull up resistors of 1-4.7K Ohm on both Data and Clock line are strongly recommended, without them it won't work in some cases.
Pull up resistors between both Data and Clock to ground or to VCC? AFAIK to VCC, but I want to be sure...!

Offline hasu

  • Thread Starter
  • Posts: 3471
  • Location: Tokyo, Japan
  • @tmk
    • tmk keyboard firmware project
Re: TMK IBM PC Keyboard Converter
« Reply #182 on: Thu, 18 March 2021, 19:19:30 »
same. But use PB7 for compatibility to Soarer's firmware if possible.

VCC, of course. But you can try without pull-up's first if you are not sure about what they are.

Offline Fritz the German

  • Posts: 18
  • Location: Germany
    • My Blog
Re: TMK IBM PC Keyboard Converter
« Reply #183 on: Sat, 03 April 2021, 06:02:46 »
Hello,
thanks for the info. My converter works now with my Siemens S26381-K257-L120 (rubber dome) PS/2 keyboard.
265823-0
hid_listen:
Listening:


TMK:93e9ee22+/LUFA


USB configured.

Keyboard start.
I166 X668 rAA W669 R1170 wF2 rFA rAB r83 ID:AB83(2)
S1175 wED rFA w00 rFA L1182


And I was able to confirm that the F1 - F10 keys on the left side give the same codes - r05   r06   r04   r0C   r03   r0B   r83   r0A   r01   r09 - as F1 - F10 on the top.
« Last Edit: Sat, 03 April 2021, 13:35:20 by Fritz the German »

Offline Fritz the German

  • Posts: 18
  • Location: Germany
    • My Blog
Re: TMK IBM PC Keyboard Converter
« Reply #184 on: Sat, 03 April 2021, 13:34:43 »
Hallo,
any idea about the best way to check the signal of the On/Off button from my Siemens PS/2 keyboard?

265865-0

Or do I simply have to enable something in the software?

Offline hasu

  • Thread Starter
  • Posts: 3471
  • Location: Tokyo, Japan
  • @tmk
    • tmk keyboard firmware project
Re: TMK IBM PC Keyboard Converter
« Reply #185 on: Sat, 03 April 2021, 20:29:06 »
Thanks for your report.
Intereting layout...
Special keys on the top portion like CH.CODE, MODE, DRUCK and HELP send their own scan code?
And I wonder how you type F21-24. Which key is 'Fn' key for them?

If On/Off button doesn't register any scan code, you need to check its hardware and pcb trace with case open.
Also searching manual for the keyboard would be helpful to know how the button work.

Offline Fritz the German

  • Posts: 18
  • Location: Germany
    • My Blog
Re: TMK IBM PC Keyboard Converter
« Reply #186 on: Sun, 04 April 2021, 11:50:32 »
Hi,
here are the codes for the second row from the top, together with the corresponding Set-2 translations since the rest of the keyboard is also compatible to set 2.

ESC  markier
/CH.CODE  Blind  druck 1
/MODE  druck 2/
DRUCK  Blind  Zeichen 
 WORT  Zeile  Blind  Zeichen  Daten
/WORT   Zeile  Blind  |>/
HELP  </
START  ^/
END 
DRUCK           K1/
ROLL      K2/
PAUSE     skip/
K3  lö.Bild/
rs.Anz./
NumL  Blind
r76  r08              r0F    r18           r10            r67    rE0+r70  r84   r51    r68    r6F      r50          r64    r6A    r63      r5C      r28   rE0+r12+rE0+r7C r7E          rE1+r14+r77
  r20      r77                   r17
Esc  ??               ??     ??            ??             ??     Insert   ??    ??     ??     ??       ??           ??     ??     ??       ??       ??    Print Screen    Scroll Lock  Pause Break  ??       Num Lock              ??

Every key on the board gives a scan code; even under the blind keys are rubber domes and corresponding "switches" on the pcb that give scan codes.
The sole exception are the two blind keys directly under the power LED and the power button. There are rubber domes under them but no pcb-"switches".

The positioning of the Windows keys in the cursor block is very peculiar.

The scan codes of the bottom row rubber domes are:

CTRL       Blind  ALT       Spacebar  Compose/Alt Gr  <|/CTRL     Send/Menu
r14        r27    r11       r29       rE0+r11         rE0+r14     rE0+r14
Left Ctrl  ??     Left Alt  Spacebar  Right Alt       Right Ctrl  Right Ctrl

The Send/Menu key has double height and is over two rubber domes, but activates only one of them, the upper, and gives the scan code r48 - there is no translation for that in set 2.


I tried to trace the plastic pcb track from zur On/Off button but without success. And I wasn't able to check out the corresponding PS/2 pins - in need a smaller set of alligator clips for my multimeter.


« Last Edit: Sun, 04 April 2021, 11:52:31 by Fritz the German »

Offline hasu

  • Thread Starter
  • Posts: 3471
  • Location: Tokyo, Japan
  • @tmk
    • tmk keyboard firmware project
Re: TMK IBM PC Keyboard Converter
« Reply #187 on: Sun, 04 April 2021, 22:59:19 »
Thanks for the detailed info!

You can remap the keys with Keymap Editor somehow, see this wiki entry.
https://github.com/tmk/tmk_keyboard/wiki/IBM-PC-AT-Keyboard-Protocol#siemens-s26381-k257-l120

My wild guess was that the on/off button may be connected to unused pin of PS/2 connector and that function is specific to Siemens computer anyway. Apple ADB keyboard has similar function like that, btw.

Offline RonnocDa

  • Posts: 13
Re: TMK IBM PC Keyboard Converter
« Reply #188 on: Fri, 07 May 2021, 10:57:03 »
Hey Hasu :)
Finally got some time to test and get debug info on all my AT/XT boards in addition to the few I mentioned in our earlier emails.

Heath Computer Systems early Z150 XT
Code: [Select]
Hang on init
----------
Keyboard start.
I216 A3217 wFF
ERR:12 ISR:0000 X3721
----------

Error after ID detect
----------
Keyboard start.
I216 rAA AA566
PRT:22 ISR:AAC0 r58 W567 r57 W568 wF2 R571
ID:FFFF(XT)
ERR:13 ISR:57C0 S572 L572 r55 r1C r53 r52 r51 r50 r4F r4E r4D
ERR:F0 ISR:FFC0 !FF! rFF
[OVR] r01 r01 r01 r01 r01 r01 r01 r01 r01 r01 r01
----------

----------
Keyboard start.
I219
PRT:22 ISR:F2C0 rF2 r58 r57 r56 r55 r1C r53 r52 r51 r50 r4F r4E r4D
ERR:F0 ISR:FFC0 !FF! rFF r01 r01 r01 r01 r01 r01 r01 r01 r01 r01 r01 r01 r01 r01 r01 r01 r01 r01 r01 r01 r01 r01 r01 r01 r01 r01 r01 r01 r01 r01 r01 r01 r01 r01 r01 r01 r01 r01 r01 r01 r01 r01 r01 r01 r01 r01 r01 A3220 wFF
ERR:11 ISR:01C0 X3934 rAA W4571 r58 W4572 r57 W4573 wF2 R4576
ID:FFFF(XT)
ERR:20 ISR:C000 S4577 L4577 e20
ERR:80 ISR:5560 [RST] I4578
PRT:22 ISR:0000 rC7
PRT:10 ISR:9550 r55 r8D
PRT:21 ISR:50A0 r50
PRT:22 ISR:4FC0 r4F r4E r4D
ERR:F0 ISR:FFC0 !FF! rFF r01 r01 r01 r01 r01 r01 r01 r01 r01 r01 r01 r01 r01
----------


Successful starts
----------
Keyboard start.
I217 A3219 wFF
ERR:11 ISR:0000 X3933
PRT:22 ISR:AAC0 rAA W4052 wF2 R4765
ID:FFFF(XT)
ERR:11 ISR:0000 S4766 L4766 r39 rB9 r39 rB9 r39
----------

----------
Keyboard start.
I221 A3223 wFF
ERR:11 ISR:0000 X3937
PRT:22 ISR:AAC0 rAA W4056 wF2 R4769
ID:FFFF(XT)
ERR:11 ISR:0000 S4770 L4770 r4B rCB r4B rCB r4C rCC r4C rCC r4D rCD r4D rCD r49 rC9 r49 rC9 r48 rC8 r48 rC8 r47 rC7 r47 rC7
----------

Zenith Inteq - Tempest shielded Z150 AT
Code: [Select]
No ID Detected/Starts as XT
----------
Keyboard start.
I215
PRT:11 ISR:6A90 rAA AA349 wF2 R1103
ID:FFFF(XT) S1103 L1103 r29 rF0 r29 r29 rF0 r29 r29 rF0 r29 r29 rF0 r29 r29 rF0 r29 r29 rF0 r29
----------

Forced into AT mode: errors until keys are pressed repeatedly and scan codes start recognizing
----------
Keyboard start.
I223 rAA AA351
PRT:11 ISR:6A90 wF2 R1104
ID:0000(AT_AT84) S1104 wED L1107
ERR:17 ISR:0000 rFA !CS2_INIT!
I1109
PRT:11 ISR:7E90 A4110 wFF rFA rAA W4348 wF2 R5102
ID:0000(AT_AT84) S5102 wED L5315
ERR:11 ISR:0000
PRT:23 ISR:0000 [CHG] I5316
PRT:11 ISR:7E90 rFA rAA AA5553 wF2 R6306
ID:0000(AT_AT84) S6306 wED L6310
ERR:17 ISR:0000 rFA !CS2_INIT!
I6311
PRT:11 ISR:7E90 A9312 wFF rFA rAA W9550 wF2 R10304
ID:0000(AT_AT84) S10304 wED L10308
ERR:17 ISR:0000 rFA !CS2_INIT!
I10309
PRT:11 ISR:0000 A13310 wFF rFA rAA W13549 r29 W13741 rF0 W13808 wF2 r29 R13810
ID:FFFD(AT_Z150) S13811 wED rFA w00 rFA L13816 r29 rF0 r29 r29 rF0 r29 r29 rF0 r29 r29 rF0 r29 r29 rF0 r29 r29 rF0 r29 r29 rF0 r29 r29 rF0 r29 r29 rF0 r29 r29 rF0 r29 r29 rF0 r29
----------
Keyboard start.
I219
PRT:11 ISR:6A90 rAA AA348 wF2 R1061
ID:FFFD(AT_Z150)
ERR:11 ISR:0000
PRT:23 ISR:0000 S1062 wED L1065 e20
ERR:20 ISR:F480 [RST]
PRT:21 ISR:0000 I1067
PRT:21 ISR:0000 r7E A4068 wFF
ERR:17 ISR:0000 X4573
PRT:11 ISR:7E90 rFA W4574 rAA W4810 r29 W4822 wF2 rF0 R4897
ID:FFFD(AT_Z150) S4898 wED rFA w00 rFA L4902 r29 r29 rF0 r29
----------

Pressing multiple lock keys at once induces errors, can also recorrect by pressing other keys
----------
rF0 r29 r29 rF0 r29 r77 wED rFA w02 rFA rF0 r77 r7E wED rFA w03 rFA rF0 r7E r58 wED rFA w07 rFA rF0 r58 r77 wED
ERR:11 ISR:5DD0
ERR:F0 ISR:FFE0
PRT:23 ISR:0000 [CHG] I35779
PRT:11 ISR:7E90 rFA rAA AA36011 wF2 R36765
ID:0000(AT_AT84) S36765 wED L36769
ERR:17 ISR:0000 rFA !CS2_INIT!
I36770
PRT:11 ISR:0000 A39771 wFF rFA rAA W40010 wF2 R40763
ID:0000(AT_AT84) S40763 wED L40767
ERR:17 ISR:0000 rFA !CS2_INIT!
I40768
PRT:11 ISR:0000 A43769 wFF rFA rAA W44008 wF2 R44761
ID:0000(AT_AT84) S44761 wED L44765
ERR:17 ISR:0000 rFA !CS2_INIT!
I44766
PRT:11 ISR:0000 A47767 wFF rFA rAA W48006 r29 W48390 rF0 W48463 wF2 r29 R48465
ID:FFFD(AT_Z150) S48466 wED rFA w05 rFA L48471 r29 rF0 r29 r29 rF0 r29 r29
----------


BTC-5161 - Early BTC5339 variant - AT/XT auto detection issues
Code: [Select]
Keyboard start.
I217 A3219 wFF
ERR:11 ISR:0000 X3933
Device disconnected.
Waiting for new device:....................
Listening:
1014 rAA !CS2_INIT!
I1015
PRT:10 ISR:AA90 rAA AA1016 rAA W1017 rAA W1018 wF2 rAA R1020
ID:FFFE(AT_????) S1021 wED rAA L1023 rAA !CS2_INIT!
I1024
PRT:10 ISR:AA90 rAA AA1025 rAA W1026 rAA W1027 wF2 rAA R1029
ID:FFFE(AT_????) S1030 wED rAA L1033 rAA !CS2_INIT!
I1034
PRT:10 ISR:AA90 rAA AA1035 rAA W1035 rAA W1036 wF2 rAA R1039
ID:FFFE(AT_????) S1039 wED rAA L1042 rAA !CS2_INIT!
I1043
PRT:10 ISR:AA90 rAA AA1044 rAA W1045 rAA W1046 wF2 rAA R1048
ID:FFFE(AT_????) S1049 wED rAA L1051 rAA !CS2_INIT!
I1052
PRT:10 ISR:AA90 rAA AA1053 rAA W1054 rAA W1055 wF2 rAA R1058
ID:FFFE(AT_????) S1058 wED rAA L1061 rAA !CS2_INIT!
I1062
PRT:10 ISR:AA90 rAA AA1063 rAA W1064 rAA W1065 wF2 rAA R1067
ID:FFFE(AT_????) S1068 wED rAA L1070 rAA !CS2_INIT!
I1071
PRT:10 ISR:AA90 rAA AA1072 rAA W1073 rAA W1074 wF2 rAA R1076
ID:FFFE(AT_????) S1077 wED rAA L1080 rAA !CS2_INIT!
I1081
PRT:10 ISR:AA90 rAA AA1082 rAA W1082 rAA W1083 wF2 rAA R1086
ID:FFFE(AT_????) S1086 wED rAA L1089 rAA !CS2_INIT!
I1090
PRT:10 ISR:AA90 rAA AA1091 rAA W1092 rAA W1093 wF2 rAA R1095
ID:FFFE(AT_????) S1096 wED rAA L1098 rAA !CS2_INIT!
I1099
PRT:10 ISR:AA90 rAA AA1100 rAA W1101 rAA W1102 wF2 rAA R1105
ID:FFFE(AT_????) S1105 wED rAA L1108 rAA !CS2_INIT!
I1109
PRT:10 ISR:AA90 rAA AA1110 rAA W1111 rAA W1111 wF2 rAA R1114
ID:FFFE(AT_????) S1115 wED rAA L1117 rAA !CS2_INIT!
I1118
PRT:10 ISR:AA90 rAA AA1119 rAA W1120 rAA W1121 wF2 rAA R1123
ID:FFFE(AT_????) S1124 wED rAA L1127 rAA !CS2_INIT!
I1128
PRT:10 ISR:AA90 rAA AA1129 rAA W1129 rAA W1130 wF2 rAA R1133
ID:FFFE(AT_????) S1133 wED rAA L1136 rAA !CS2_INIT!
I1137
PRT:10 ISR:AA90 rAA AA1138 rAA W1139 rAA W1140 wF2 rAA R1142
ID:FFFE(AT_????) S1143 wED rAA L1146 rAA !CS2_INIT!
I1147
PRT:10 ISR:AA90 rAA AA1148 rAA W1148 rAA W1149 wF2 rAA R1152
ID:FFFE(AT_????) S1153 wED rAA L1155 rAA !CS2_INIT!
I1156
PRT:10 ISR:AA90 rAA AA1157 rAA W1158 rAA W1159 wF2 rAA R1161
ID:FFFE(AT_????) S1162 wED rAA L1164 rAA !CS2_INIT!
I1166
PRT:10 ISR:AA90 rAA AA1166 rAA W1167 rAA W1168 wF2 rAA R1171
ID:FFFE(AT_????) S1171 wED rAA L1174 rAA !CS2_INIT!
I1175
PRT:10 ISR:AA90 rAA AA1176 rAA W1177 rAA W1178 wF2 rAA R1180
ID:FFFE(AT_????) S1181 wED rAA L1183 rAA !CS2_INIT!
I1184
PRT:10 ISR:AA90 rAA AA1185 rAA W1186 rAA W1187 wF2 rAA R1189
ID:FFFE(AT_????) S1190 wED rAA L1193 rAA !CS2_INIT!
I1194
PRT:10 ISR:AA90 rAA AA1195 rAA W1195 rAA W1196 wF2 rAA R1199
ID:FFFE(AT_????) S1200 wED rAA L1202 rAA !CS2_INIT!
I1203
PRT:10 ISR:AA90 rAA AA1204 rAA W1205 rAA W1206 wF2 rAA R1208
ID:FFFE(AT_????) S1209 wED rAA L1211 rAA !CS2_INIT!
I1213
PRT:10 ISR:AA90 rAA AA1213 rAA W1214 rAA W1215 wF2 rAA R1218
ID:FFFE(AT_????) S1218 wED rAA L1221 rAA !CS2_INIT!
I1222
PRT:10 ISR:AA90 rAA AA1223 rAA W1224 rAA W1225 wF2 rAA R1227
ID:FFFE(AT_????) S1228 wED rAA L1230 rAA !CS2_INIT!
I1231
PRT:10 ISR:AA90 rAA AA1232 rAA W1233 rAA W1234 wF2 rAA R1237
ID:FFFE(AT_????) S1237 wED rAA L1240 rAA !CS2_INIT!
I1241
PRT:10 ISR:AA90 rAA AA1242 rAA W1243 rAA W1243 wF2 rAA R1246
ID:FFFE(AT_????) S1247 wED rAA L1249 rAA !CS2_INIT!
I1250
PRT:10 ISR:AA90 rAA AA1251 rAA W1252 rAA W1253 wF2 rAA R1255
ID:FFFE(AT_????) S1256 wED rAA L1259 rAA !CS2_INIT!
I1260
PRT:10 ISR:AA90 rAA AA1261 rAA W1261 rAA W1262 wF2 rAA R1265
ID:FFFE(AT_????) S1265 wED rAA L1268 rAA !CS2_INIT!
I1269
PRT:10 ISR:AA90 rAA AA1270 rAA W1271 rAA W1272 wF2 rAA R1274
ID:FFFE(AT_????) S1275 wED rAA L1277 rAA !CS2_INIT!
I1278
PRT:10 ISR:AA90 rAA AA1279 rAA W1280 rAA W1281 wF2 rAA R1284
ID:FFFE(AT_????) S1284 wED rAA L1287 rAA !CS2_INIT!
I1288
PRT:10 ISR:AA90 rAA AA1289 rAA W1290 rAA W1290 wF2 rAA R1293
ID:FFFE(AT_????) S1294 wED rAA L1296 rAA !CS2_INIT!
I1297
PRT:10 ISR:AA90 rAA AA1298 rAA W1299 rAA W1300 wF2 rAA R1302
ID:FFFE(AT_????) S1303 wED rAA L1306 rAA !CS2_INIT!
I1307
PRT:10 ISR:AA90 rAA AA1308 rAA W1308 rAA W1309 wF2 rAA R1312
ID:FFFE(AT_????) S1312 wED rAA L1315 rAA !CS2_INIT!
I1316
PRT:10 ISR:AA90 rAA AA1317 rAA W1318 rAA W1319 wF2 rAA R1321
ID:FFFE(AT_????) S1322 wED rAA L1324 rAA !CS2_INIT!
I1326
PRT:10 ISR:AA90 rAA AA1326 rAA W1327 rAA W1328 wF2 rAA R1331
ID:FFFE(AT_????) S1331 wED rAA L1334 rAA !CS2_INIT!
I1335
PRT:10 ISR:AA90 rAA AA1336 rAA W1337 rAA W1337 wF2 rAA R1340
ID:FFFE(AT_????) S1341 wED rAA L1343 rAA !CS2_INIT!
I1344
PRT:10 ISR:AA90 rAA AA1345 rAA W1346 rAA W1347 wF2 rAA R1349
ID:FFFE(AT_????) S1350 wED rAA L1353 rAA !CS2_INIT!
I1354
PRT:10 ISR:AA90 rAA AA1355 rAA W1355 rAA W1356 wF2 rAA R1359
ID:FFFE(AT_????) S1359 wED rAA L1362 rAA !CS2_INIT!
I1363
PRT:10 ISR:AA90 rAA AA1364 rAA W1365 rAA W1366 wF2 rAA R1368
ID:FFFE(AT_????) S1369 wED rAA L1371 rAA !CS2_INIT!
I1373
PRT:10 ISR:AA90 rAA AA1373 rAA W1374 rAA W1375 wF2 rAA R1378
ID:FFFE(AT_????) S1378 wED rAA L1381 rAA !CS2_INIT!
I1382
PRT:10 ISR:AA90 rAA AA1383 rAA W1384 rAA W1384 wF2 rAA R1387
ID:FFFE(AT_????) S1388 wED rAA L1390 rAA !CS2_INIT!
I1391
PRT:10 ISR:AA90 rAA AA1392 rAA W1393 rAA W1394 wF2 rAA R1397
ID:FFFE(AT_????) S1397 wED rAA L1400 rAA !CS2_INIT!
I1401
PRT:10 ISR:AA90 rAA AA1402 rAA W1403 rAA W1403 wF2 rAA R1406
ID:FFFE(AT_????) S1407 wED rAA L1409 rAA !CS2_INIT!
I1410
PRT:10 ISR:AA90 rAA AA1411 rAA W1412 rAA W1413 wF2 rAA R1415
ID:FFFE(AT_????) S1416 wED rAA L1418 rAA !CS2_INIT!
I1420
PRT:10 ISR:AA90 rAA AA1421 rAA W1421 rAA W1422 wF2 rAA R1425
ID:FFFE(AT_????) S1425 wED rAA L1428 rAA !CS2_INIT!
I1429
PRT:10 ISR:AA90 rAA AA1430 rAA W1431 rAA W1432 wF2 rAA R1434
ID:FFFE(AT_????) S1435 wED rAA L1437 rAA !CS2_INIT!
I1439
PRT:10 ISR:AA90 rAA AA1439 rAA W1440 rAA W1441 wF2 rAA R1444
ID:FFFE(AT_????) S1444 wED rAA L1447 rAA !CS2_INIT!
I1448
PRT:10 ISR:AA90 rAA AA1449 rAA W1450 rAA W1451 wF2 rAA R1453
ID:FFFE(AT_????) S1454 wED rAA L1456 rAA !CS2_INIT!
I1457
PRT:10 ISR:AA90 rAA AA1458 rAA W1459 rAA W1460 wF2 rAA R1462
ID:FFFE(AT_????) S1463 wED rAA L1466 rAA !CS2_INIT!
I1467
PRT:10 ISR:AA90 rAA AA1468 rAA W1468 rAA W1469 wF2 rAA R1472
ID:FFFE(AT_????) S1473 wED rAA L1475 rAA !CS2_INIT!
I1476
PRT:10 ISR:AA90 rAA AA1477 rAA W1478 rAA W1479 wF2 rAA R1481
ID:FFFE(AT_????) S1482 wED rAA L1484 rAA !CS2_INIT!
I1486
PRT:10 ISR:AA90 rAA AA1486 rAA W1487 rAA W1488 wF2 rAA R1491
ID:FFFE(AT_????) S1491 wED rAA L1494 rAA !CS2_INIT!
I1495
PRT:10 ISR:AA90 rAA AA1496 rAA W1497 rAA W1498 wF2 rAA R1500
ID:FFFE(AT_????) S1501 wED rAA L1503 rAA !CS2_INIT!
I1504
PRT:10 ISR:AA90 rAA AA1505 rAA W1506 rAA W1507 wF2 rAA R1510
ID:FFFE(AT_????) S1510 wED rAA L1513 rAA !CS2_INIT!
I1514
PRT:10 ISR:AA90 rAA AA1515 rAA W1516 rAA W1516 wF2 rAA R1519
ID:FFFE(AT_????) S1520 wED rAA L1522 rAA !CS2_INIT!
I1523
PRT:10 ISR:AA90 rAA AA1524 rAA W1525 rAA W1526 wF2 rAA R1528
ID:FFFE(AT_????) S1529 wED rAA L1531 rAA !CS2_INIT!
I1533
PRT:10 ISR:AA90 rAA AA1533 rAA W1534 rAA W1535 wF2 rAA R1538
ID:FFFE(AT_????) S1538 wED rAA L1541 rAA !CS2_INIT!
I1542
PRT:10 ISR:AA90 rAA AA1543 rAA W1544 rAA W1545 wF2 rAA R1547
ID:FFFE(AT_????) S1548 wED rAA L1550 rAA !CS2_INIT!
I1552
PRT:10 ISR:AA90 rAA AA1552 rAA W1553 rAA W1554 wF2 rAA R1557
ID:FFFE(AT_????) S1557 wED rAA L1560 rAA !CS2_INIT!
I1561
PRT:10 ISR:AA90 rAA AA1562 rAA W1563 rAA W1564 wF2 rAA R1566
ID:FFFE(AT_????) S1567 wED rAA L1569 rAA !CS2_INIT!
I1570
PRT:10 ISR:AA90 rAA AA1571 rAA W1572 rAA W1573 wF2 rAA R1575
ID:FFFE(AT_????) S1576 wED rAA L1578 rAA !CS2_INIT!
I1580
PRT:10 ISR:AA90 rAA AA1581 rAA W1581 rAA W1582 wF2 rAA R1585
ID:FFFE(AT_????) S1585 wED rAA L1588 rAA !CS2_INIT!
I1589
PRT:10 ISR:AA90 rAA AA1590 rAA W1591 rAA W1592 wF2 rAA R1594
ID:FFFE(AT_????) S1595 wED rAA L1597 rAA !CS2_INIT!
I1599


Sanyo N860 XT - MBC-885 for XT??
Code: [Select]
Keyboard start.

PRT:21 ISR:AAA0 I219
PRT:21 ISR:0000 rAA AA220 wF2 R723
ID:0000(AT_AT84)
ERR:13 ISR:0000 S724 wED L769
ERR:17 ISR:0000
ERR:20 ISR:F000 [RST] I813
PRT:21 ISR:0000 rAA AA814 wF2 R1317
ID:0000(AT_AT84)
ERR:12 ISR:0000 S1318 wED L1322
ERR:17 ISR:0000
PRT:21 ISR:AAA0 rAA !CS2_INIT!
I1366
PRT:21 ISR:0000 A4368 wFF
ERR:17 ISR:0000 X4873 rAA W4917 wF2 R5420
ID:0000(AT_AT84)
ERR:13 ISR:AAA0 S5421 wED L5466
ERR:17 ISR:0000
ERR:20 ISR:F000 [RST] I5510
PRT:22 ISR:AAC0 rAA AA5511 wF2 R6015
ID:0000(AT_AT84)
ERR:13 ISR:0000 S6016 wED L6061
ERR:17 ISR:0000
ERR:20 ISR:F000 [RST] I6105
PRT:22 ISR:AAC0 rAA AA6106


AT/XT switchable boards do not work in XT mode
Seems like all the same issue with ID 0000

C260 Enhanced Keyboard (Deyi foam and foil)
Code: [Select]
Keyboard start.
I220
PRT:22 ISR:43C0 r43 rC3 A3221 wFF
ERR:11 ISR:C3C0 X3935 rAA W3935 wF2 R4648
ID:0000(AT_AT84)
ERR:11 ISR:AAC0 S4649 wED L4861
ERR:11 ISR:0000 r21 rA1 !CS2_INIT!
I7346
PRT:22 ISR:A1C0 r21 rA1 r20 rA0 r20 rA0

Northgate Omnikey 101
Code: [Select]
Keyboard start.
I220 A3221 wFF
ERR:11 ISR:0000 X3935
PRT:21 ISR:AAA0 rAA W3936 wF2 R4650
ID:0000(AT_AT84)
ERR:11 ISR:0000 S4651 wED L4863
ERR:11 ISR:0000 r4B rCB !CS2_INIT!
I9271
PRT:21 ISR:CBA0 r4C rCC

RT-101+ AQ659ZRT-725M
Code: [Select]
Keyboard start.
I236 A3237 wFF
ERR:11 ISR:0000 X3951
PRT:21 ISR:AAA0 rAA W3956 wF2 R4669
ID:0000(AT_AT84)
ERR:11 ISR:0000 S4670 wED L4882
ERR:11 ISR:0000 r4F rCF !CS2_INIT!
I8979
PRT:21 ISR:CFA0 r50 rD0 r51 rD1 r4B rCB r4C rCC r4D rCD r4B rCB r4C rCC r4D rCD A11980 wFF
ERR:11 ISR:CDA0 X12694 rAA W12698

Zenith ZKB-2
Code: [Select]
Keyboard start.
I217
ERR:20 ISR:4000 e20 A3218 wFF
ERR:11 ISR:0000 X3932
PRT:22 ISR:EAC0 rEA W4187 wF2 R4900
ID:0000(AT_AT84)
ERR:11 ISR:0000 S4901 wED L5113
ERR:11 ISR:0000 r4B rCB !CS2_INIT!
I7160
PRT:22 ISR:CBC0 r4B rCB r4C rCC


Let me know if there is any additional debugging I can help with :)

Offline hasu

  • Thread Starter
  • Posts: 3471
  • Location: Tokyo, Japan
  • @tmk
    • tmk keyboard firmware project
Re: TMK IBM PC Keyboard Converter
« Reply #189 on: Fri, 07 May 2021, 20:24:59 »
RonnocDa,
Thanks for your report.

Too many errors :D It is what I don't expect with this converter.
Is there any keyboard works well with your converter?

I'd suspect your converter hardware or invalid firmware, first.

What does your converter look like? Posting pics would be helpful especially if it is DIY one.
And let me know how did you get the firmwware and its version. downloaded from Keympa Editor or buit from source yourself?

Firmware version is displayed on the top of debug outputs like this: TMK:a93677cb/LUFA



Offline RonnocDa

  • Posts: 13
Re: TMK IBM PC Keyboard Converter
« Reply #190 on: Fri, 07 May 2021, 22:49:38 »
Hasu,
Having lots of strange keyboards can cause lots of errors :D

I have 10+ keyboards which function perfectly with the converter I'm using here, including all the mentioned AT/XT switchable ones when used in AT mode

It is a reflashed tinkerboy ps/2 adapter which uses the standard pin assignment for soarers converter on an atmega32u4
Looking at it again just now, it does not have Reset wired which may be responsible for the issues with the Z150 XT, but probably not any of the other issues.
I can always wire a breadboard up if we need to eliminate that as a source of problems ;)

Firmware was built myself from the ibmpc_z150at_fix4 branch TMK:8f86d125+/LUFA
No changes except to force the Z150 AT into AT detection by modifying ibmpc_usb.c:68
if (code == -1) { id = 0xFFFF; goto DONE; }  -->  if (code == -1) { id = 0x0000; goto DONE; }


Offline hasu

  • Thread Starter
  • Posts: 3471
  • Location: Tokyo, Japan
  • @tmk
    • tmk keyboard firmware project
Re: TMK IBM PC Keyboard Converter
« Reply #191 on: Fri, 07 May 2021, 23:21:35 »
OK. The "tinkerboy ps/2 adapter" doesn't have RESET pin as you said, some XT keyboards that require reset signal doesn't work.
Conveter without RESET pin is not good to test  with "strange" XT keyboards unfortunately. They won't work at all without RESET pin possibly.

Can you list name or model number of  the "10+ keyboards which function perfectly" with TMK IBMPC firmware? It would be appriciated and I like to add them to the list in the first post.

Firmware you are using seems to be rather old for some reason.  "TMK:8f86d125+/LUFA" indicates you are basing on a year old codes(2020-03-22).

Just use the prebuilt latest fimrware to test instead, you can download it here and it should suit for Soarer's pin compatible converters.
http://www.tmk-kbd.com/tmk_keyboard/editor/unimap/?ibmpc_usb_32u4


Just curious, how do you place the "tinkerboy ps/2 adapter" into flash/program/bootloader mode? It doesn't seems to have flash/program button.


Anyway, could you try the prebuilt latest firmware with "Z150 AT" and "Northgate Omnikey 101"? It should show "TMK:e473e8ce/LUFA" as version info on hid_listen.
« Last Edit: Fri, 07 May 2021, 23:30:16 by hasu »

Offline RonnocDa

  • Posts: 13
Re: TMK IBM PC Keyboard Converter
« Reply #192 on: Sat, 08 May 2021, 00:07:04 »
I'll do one better and quickly set up a breadboard with Reset wired in.

Here's a list of the keyboards which are working perfectly
RT8255c+
RT-101+
C260 Enhanced Keyboard (Deyi foam and foil)
Northgate Omnikey 101
Zenith ZKB-2
BTC5339
APC-H410E
IBM 5576-001 (except keys outside range of ps/2)
Toshiba JIS AT101 (rear metal label very helpfully reads キーボード and serial number only  :) )
Dell AT101 - GYI3PVAT101 (old logo)
Wang 724
Unicomp Model M
IBM P70 Keyboard

Offline RonnocDa

  • Posts: 13
Re: TMK IBM PC Keyboard Converter
« Reply #193 on: Sat, 08 May 2021, 03:45:00 »
Flashing to the tinkerboy is pretty easy, just need to ground the reset pin which is clearly marked on the pcb, after that it's just DFU.
To get to the reset pin you need to remove the casement which is two plastic shells held together with a few friction pins.
Comes apart and goes back together with no damaging or signs of entry :)


Reset pin resolves all the XT related issues so we can add these to the list of working boards
Z150 XT - Part Number: 92-803
BTC-5161 - Part number: BTC5339 (Not to be confused with BTC-53 series keyboards)
Sanyo N860-2905


Curious as to why the Reset was needed on the AT/XT switchable boards in XT mode, seems like they were outputting XT scancodes but not being detected as XT?
The Sanyo board also functioned with a Soarers converter without Reset pin somehow, maybe just lucky?


The Z150 AT is now correctly detected as AT and hid_listen shows scan codes which appear to be correct for the keys being pressed, but nothings makes it to the system.
Internal beeper is working properly including with repeat/disable.
Lock lights will change with the system, but do not initialize to the right state.
Code: [Select]
TMK:e473e8ce/LUFA


USB configured.

Keyboard start.
I381 wFF rFA A1385
PRT:11 ISR:7E90 rAA W1621 R2122
ID:FFFD(AT_Z150) S2122 L2122 r29 rF0 r29 r29 rF0 r29 r29 rF0 r29 r77 rF0 r77 r7E rF0 r7E r58 rF0 r58

Offline hasu

  • Thread Starter
  • Posts: 3471
  • Location: Tokyo, Japan
  • @tmk
    • tmk keyboard firmware project
Re: TMK IBM PC Keyboard Converter
« Reply #194 on: Sat, 08 May 2021, 04:43:29 »
Flashing to the tinkerboy is pretty easy, just need to ground the reset pin which is clearly marked on the pcb, after that it's just DFU.
To get to the reset pin you need to remove the casement which is two plastic shells held together with a few friction pins.
Comes apart and goes back together with no damaging or signs of entry :)
Good to know, thanks for the info.



Quote
Reset pin resolves all the XT related issues so we can add these to the list of working boards
Z150 XT - Part Number: 92-803
BTC-5161 - Part number: BTC5339 (Not to be confused with BTC-53 series keyboards)
Sanyo N860-2905


Curious as to why the Reset was needed on the AT/XT switchable boards in XT mode, seems like they were outputting XT scancodes but not being detected as XT?
The Sanyo board also functioned with a Soarers converter without Reset pin somehow, maybe just lucky?

I guess the latest firmware resolves XT issues, not RESET pin.(except for Z150 XT, which really requires RESET pin.)

With seeing debug logs your change seemed to prevent detecting XT protocol. (though, BTC-5161 log is different from others and indicates weird behaviour, it may have different cause.)

I also think AT/XT switchable keyboards don't use RESET pin probably, as you says. Did you try the switchable keyboards without RESET pin and the prebuilt firmware?




Quote
The Z150 AT is now correctly detected as AT and hid_listen shows scan codes which appear to be correct for the keys being pressed, but nothings makes it to the system.
Internal beeper is working properly including with repeat/disable.
Lock lights will change with the system, but do not initialize to the right state.
Code: [Select]
TMK:e473e8ce/LUFA


USB configured.

Keyboard start.
I381 wFF rFA A1385
PRT:11 ISR:7E90 rAA W1621 R2122
ID:FFFD(AT_Z150) S2122 L2122 r29 rF0 r29 r29 rF0 r29 r29 rF0 r29 r77 rF0 r77 r7E rF0 r7E r58 rF0 r58


It is good indication, I think we are on the right track somehow.
I'll look into the issue not registered keys.

« Last Edit: Sat, 08 May 2021, 04:52:00 by hasu »

Offline RonnocDa

  • Posts: 13
Re: TMK IBM PC Keyboard Converter
« Reply #195 on: Sat, 08 May 2021, 06:14:52 »
That change to XT detection was only used for the one test on the Z150 AT, so not relevant to the other logs.
Though it does seem that you are correct, the updated firmware is what fixed things and not the reset pin.

For AT/XT switchable and the Sanyo ID:0000 from the old firmware is the same as I see in Soarers converter, but Soarers does switch to XT protocol in that case.

The BTC-5161 probably just needed the same XT issues resolved. I think the auto switching it does is pretty naive, I've seen at least one person complaining about it having issues on actual XT machines.

Z150 XT definitely works perfect with the reset pin, however it does work without it with a few attempts, any ideas on why that would be?

Offline hasu

  • Thread Starter
  • Posts: 3471
  • Location: Tokyo, Japan
  • @tmk
    • tmk keyboard firmware project
Re: TMK IBM PC Keyboard Converter
« Reply #196 on: Sat, 08 May 2021, 07:50:33 »
That change to XT detection was only used for the one test on the Z150 AT, so not relevant to the other logs.
Though it does seem that you are correct, the updated firmware is what fixed things and not the reset pin.

For AT/XT switchable and the Sanyo ID:0000 from the old firmware is the same as I see in Soarers converter, but Soarers does switch to XT protocol in that case.
XT keyboards actually doesn't have any "Keyboard ID" and can't reply to command 'F2'(Read ID). So ID of XT keyboard is virtual and dependent on converter implementation.

https://github.com/tmk/tmk_keyboard/wiki/IBM-PC-AT-Keyboard-Protocol#commands-from-the-system
https://github.com/tmk/tmk_keyboard/wiki/IBM-PC-AT-Keyboard-Protocol#keyboard-id

TMK assigns 'FFFF' for XT keyboards while Soarer's uses '0000'. And with TMK firmware ID '0000' is also virtual and used for IBM 84-key AT keyboard,  another virtual ID is 'FFFD' for Zenith Z-150 AT.
Except for these special cases it shows real 16-bit value replied from AT('AB**') and Terminal keyboards('BF**').
https://github.com/tmk/tmk_keyboard/blob/master/converter/ibmpc_usb/ibmpc_usb.c#L53-L83





Quote
The BTC-5161 probably just needed the same XT issues resolved. I think the auto switching it does is pretty naive, I've seen at least one person complaining about it having issues on actual XT machines.
Wow, I didn't know auto-switching AT/XT keyboards really existed in the market. Interesting. I don't understand how they actually auto-detect keyboard protocol, but guess  they can conflict with converter's auto-detect mechanism.

Can you post debug log of the keyboard? I like to check how it starts up with this converter.


Quote
Z150 XT definitely works perfect with the reset pin, however it does work without it with a few attempts, any ideas on why that would be?
Zenith Z150 XT(also IBM XT Type-1, Leading Edge DC-2014 and some other XT clones) really needs a pulse on RESET pin to start its microcontroller up correctly.
The RESET pin of connector is actually connectecd to RESET pin of the microcontroller on the keyboards.

I guess old microcontrollers are likely to be unstable on state of its RESET pin and internals when the pin is floating on pwerup and this makes microcontroller start normally sometimes.
Or I don't know but if the microcontroller may have BOR or other internal reset mechanisms and one of them may be triggered by intermittent power cycles.




Offline hasu

  • Thread Starter
  • Posts: 3471
  • Location: Tokyo, Japan
  • @tmk
    • tmk keyboard firmware project
Re: TMK IBM PC Keyboard Converter
« Reply #197 on: Sat, 08 May 2021, 08:18:09 »
Quote
The Z150 AT is now correctly detected as AT and hid_listen shows scan codes which appear to be correct for the keys being pressed, but nothings makes it to the system.
Internal beeper is working properly including with repeat/disable.
Lock lights will change with the system, but do not initialize to the right state.
Code: [Select]
TMK:e473e8ce/LUFA


USB configured.

Keyboard start.
I381 wFF rFA A1385
PRT:11 ISR:7E90 rAA W1621 R2122
ID:FFFD(AT_Z150) S2122 L2122 r29 rF0 r29 r29 rF0 r29 r29 rF0 r29 r77 rF0 r77 r7E rF0 r7E r58 rF0 r58


It is good indication, I think we are on the right track somehow.
I'll look into the issue not registered keys.



Can you try this firmware with your Z150 AT?

* ibmpc_usb_atmega32u4.hex (56.33 kB - downloaded 219 times.)

This should register keys normally on computer.
And can you post its debug log with pressing lock keys some times like you did on previous post?
Please include 'firmware version' string in debug log for future reference.


This doesn't fix lock indicator state at startup, though. This will be fixed later.

Offline RonnocDa

  • Posts: 13
Re: TMK IBM PC Keyboard Converter
« Reply #198 on: Sun, 09 May 2021, 04:09:46 »
Log of the BTC-5161 starting up
Code: [Select]
TMK:e473e8ce/LUFA


USB configured.

Keyboard start.

ERR:40 ISR:AA90
PRT:10 ISR:0000 I312
PRT:10 ISR:0000 wFF rFA A1316 rAA W1380 wF2 b:FAAB rFA rAB r83 R1887
ID:AB83(AT) S1887 wED rFA w00 rFA L1897

It has the same errors as before on the firmware you just sent to test Z150 AT
Code: [Select]
TMK:a33e8a96/LUFA


USB configured.

Keyboard start.
I225 A3226 wFF
ERR:11 ISR:0000 X3940
Device disconnected.
Waiting for new device:..........
Listening:
FFE(AT_????) S792 wED rAA L795 rAA !CS2_INIT!
I796
PRT:10 ISR:AA90 rAA AA797 rAA W798 rAA W798 wF2 rAA R801
ID:FFFE(AT_????) S802 wED rAA L804 rAA !CS2_INIT!
I805
PRT:10 ISR:AA90 rAA AA806 rAA W807 rAA W808 wF2 rAA R810
ID:FFFE(AT_????) S811 wED rAA L813 rAA !CS2_INIT!
I814
PRT:10 ISR:AA90 rAA AA815 rAA W816 rAA W817 wF2 rAA R820
ID:FFFE(AT_????) S820 wED rAA L823 rAA !CS2_INIT!
I824
PRT:10 ISR:AA90 rAA AA825 rAA W826 rAA W826 wF2 rAA R829
ID:FFFE(AT_????) S830 wED rAA L832 rAA !CS2_INIT!
I833
PRT:10 ISR:AA90 rAA AA834 rAA W835 rAA W836 wF2 rAA R838
ID:FFFE(AT_????) S839 wED rAA L841 rAA !CS2_INIT!
I843
PRT:10 ISR:AA90 rAA AA843 rAA W844 rAA W845 wF2 rAA R848
ID:FFFE(AT_????) S848 wED rAA L851 rAA !CS2_INIT!
I852
PRT:10 ISR:AA90 rAA AA853 rAA W854 rAA W855 wF2 rAA R857
ID:FFFE(AT_????) S858 wED rAA L860 rAA !CS2_INIT!
I861
PRT:10 ISR:AA90 rAA AA862 rAA W863 rAA W864 wF2 rAA R866
ID:FFFE(AT_????) S867 wED rAA L869 rAA !CS2_INIT!
I870
PRT:10 ISR:AA90 rAA AA871 rAA W872 rAA W873 wF2 rAA R876
ID:FFFE(AT_????) S876 wED rAA L879 rAA !CS2_INIT!
I880
PRT:10 ISR:AA90 rAA AA881 rAA W881 rAA W882 wF2 rAA R885

For comparison here's a log of it starting with a Soarers
Code: [Select]
Listening:
R07 R07 R07 R07 R07 R07 R07 R07 R07 R07 R07 R07 R07 R07 R07 R07 R07 R07 R07 R07 R07 R07 R07 R07 R07 R07 R07 R07 R07 R07 R07 R07 R07 R07 R07 R07 R07 R07 R07 R07 R07 R07 R07 R07 R07 R07 R07 R07 R07 R07 R07 R07 R07 R07 R07 R07 R07 R07 R07 R07 R07 R07 R07 R07 R07 R07 R07 R07 R07 R07 R07 R07 R07 R07 R07 R07 R07 R07 R07 R07 R07 R07 R07 R07 R07 R07 R07 R07 R07 R07 R07 R07 R07 R07 R07 R07 R07 R07 R07 R07 R07 R07 R07 R07 R07 R07 R07 R07 R07 R07 R07 R07 R07 R07 R07 R07 R07 R07 R07 R07 R07 R07 R07 R07 R07 R07 R07 R07 R07 R07 R07 R07 R07 R07 R07 R07 R07 R07 R07 R07 R07 R07 R07 R07 R07 R07 R07 R07 R07 R07 R07 R07 R07 R07 R07 R07 R07 R07 R07 R07 R07 R07 R07 R07 R07 R07 R07 R07 R07 R07 R07 R07 R07 R07 R07 R07 R07 R07 R07 R07 R07 R07 R07 R07 R07 R07 R07 R07 R07 R07 R07 R07 R07 R07 R07 R07 R07 R07 R07 R07 R07 R07 R07 R07 R07 R07 R07 R07 R07 R07 R07 R07 R07 R07 R07 R07 R07 R07 R07 R07 R07 R07 R07 R07 R07 R07 R07 R07 R07 R07 R07 R07 R07 R07 R07 R07 R07 R07 R07 R07 R07 R07 R07 R07 R07 R07 R07 R07 R07 R07 R07 R07 R07 R07 R07 R07 R07 R07 R07 R07 R07 R07 R07 R07 R07 R07 R07 R07 R07 R07 R07 R07 R07 R07 R07 R07 R07 R07 R07 R07 R07 R07 R07 R07 R07 R07 R07 R07 R07 R07 R07 R07 R07 R07 R07 R07 R07 R07 R07 R07 R07 R07 R07 R07 R07 R07 R07 R07 R07 R07 R07 R07 R07 R07 R07 R07 R07 R07 R07 R07 R07 R07 R07 R07 R07 R07 R07 R07 R07 R07 R07 R07 R07 R07 R07 R07 R07 R07 R07 R07 R07 R07 R07 R07 R07 R07 R07 R07 R07 R07 R07 R07 R07 R07 R07 R07 R07 R07 R07 R07 R07 R07 R07 R07 R07 R07 R07 R07 R07 R07 R07 R07 R07 R07 R07 R07 R07 R07 R07 R07 R07 R07 R07 R07 R07 R07 R07 R07 R07 R07 R07 R07 R07 R07 R07 R07 R07 R07 R07 R07 R07 R07 R07 R07 R07 R07 R07 R07 R07 R07 R07 R07 R07 R07 R07 R07 R07 R07 R07 R07 R07 R07 R07 R07 R07 R07 R07 R07 R07 R07 R07 R07 R07 R07 R07 R07 R07 R07 R07 R07 R07 R07 R07 R07 R07 R07 R07 R07 R07 R07 R07 R07 R07 R07 R07 R07 R07 R07 R07 R07 R07 R07 R07 R07 R07 R07 R07 R07 R07 R07 R07 R07 R07 R07 R07 R07 R07 R07 R07 R07 R07 R07 R07 R07 R07 R07 R07 R07 R07 R07 R07 R07 R07 R07 R07 R07 R07 R07 R07 R07 R07 R07 R07 R07 R07 R07 R07 R07 R07 R07 R07 R07 R07 R07 R07 R07 R07 R07 R07 R07 R07 R07 R07 R07 R07 R07 R07 R07 R07 R07 R07 R07 R07 R07 R07 R07 R07 R07 R07 R07 R07 R07 R07 R07 R07 R07 R07 R07 R07 R07 R07 R07 R07 R07 R07 R07 R07 R07 R07 R07 R07 R07 R07 R07 R07 R07 R07 R07 R07 R07 R07 R07 R07 R07 R07 R07 R07 R07 R07 R07 R07 R07 R07 R07 R07 R07 R07 R07 R07 R07 R07 R07 R07 R07 R07 R07 R07 R07 R07 R07 R07 R07 R07 R07 R07 R07 R07 R07 R07 R07 R07 R07 R07 R07 R07 R07 R07 R07 R07 R07 R07 R07 R07 R07 R07 R07 R07 R07 R07 R07 R07 R07 R07 R07 R07 R07 R07 R07 R07 R07 R07 R07 R07 R07 R07 R07 R07 R07 R07 R07 R07 R07 R07 R07 R07 R07 R07 R07 R07 R07 R07 R07 R07 R07 R07 R07 R07 R07 R07 R07 R07 R07 R07 R07 R07 R07 R07 R07 R07 R07 R07 R07 R07 R07 R07 R07 R07 R07 R07 R07 R07 R07 R07 R07 R07 R07 R07 R07 R07 R07 R07 R07 R07 R07 R07 R07 R07 R07 R07 R07 R07 R07 R07 R07 R07 R07 R07 R07 R07 R07 R07 R07 R07 R07 R07 R07 R07 R07 R07 R07 R07 R07 R07 R07 R07 R07 R07 R07 R07 R07 R07 R07 R07 R07 R07 R07 R07 R07 R07 R07 R07 R07 R07 R07 R07 R07 R07 R07 R07 R07 R07 R07 R07 R07 R07 R07 R07 R07 R07 R07 R07 R07 R07 R07 R07 R07 R07 R07 R07 R07 R07 R07 R07 R07 R07 R07 R07 R07 R07 R07 R07 R07 R07 R07 R07 R07 R07 R07 R07 R07 R07 R07 R07 R07 R07 R07 R07 R07 R07 R07 R07 R07 R07 R07 R07 R07 R07 R07 R07 R07 R07 R07 R07 R07 R07 R07 R07 R07 R07 R07 R07 R07 R07 R07 R07 R07 R07 R07 R07 R07 R07 R07 R07 R07 R07 R07 R07 R07 R07 R07 R07 R07 R07 R07 R07 R07 R07 R07 R07 R07 R07 R07 R07 R07 R07 R07 R07 R07 R07 R07 R07 R07 R07 R07 R07 R07 R07 R07 R07 R07 R07 R07 R07 R07 R07 R07 R07 R07 R07 R07 R07 R07 R07 R07 R07 R07 R07 R07 R07 R07 R07 R07 R07 R07 R07 R07 R07 R07 R07 R07 R07 R07 R07 R07 R07 R07 R07 R07 R07 R07 R07 R07 R07 R07 R07 R07 R07 R07 R07 R07 R07 R07 R07 R07 R07 R07 R07 R07 R07 R07 R07 R07 R07 R07 R07 R07 R07 R07 R07 R07 R07 R07 R07 R07 R07 R07 R07 R07 R07 R07 R07 R07 R07 R07 R07 R07 R07 R07 R07 R07 R07 R07 R07 R07 R07 R07 R07 R07 R07 R07 R07 R07 R07 R07 R07 R07 R07 R07 R07 R07 R07 R07 R07 R07 R07 R07 R07 R07 R07 R07 R07 R07 R07 R07 R07 R07 R07 R07 R07 R07 R07 R07 R07 R07 R07 R07 R07 R07 R07 R07 R07 R07 R07 R07 R07 R07 R07 R07 R07 R07 R07 R07 R07 R07 R07 R07 R07 R07 R07 R07 R07 R07 R07 R07 R07 R07 R07 R07 R07 R07 R07 R07 R07 R07 R07 R07 R07 R07 R07 R07 R07 R07 R07 R07 R07 R07 R07 R07 R07 R07 R07 R07 R07 R07 R07 R07 R07 R07 R07 R07 R07 R07 R07 R07 R07 R07 R07 R07 R07 R07 R07 R07 R07 R07 R07 R07 R07 R07 R07 R07 R07 R07 R07 R07 R07 R07 R07 R07 R07 R07 R07 R07 R07 R07 R07 R07 R07 R07 R07 R07 R07 R07 R07 R07 R07 R07 R07 R07 R07 R07 R07 R07 R07 R07 R07 R07 R07 R07 R07 R07 R07 R07 R07 R07 R07 R07 R07 R07 R07 R07 R07 R07 R07 R07 R07 R07 R07 R07 R07 R07 R07 R07 R07 R07 R07 R07 R07 R07 R07 R07 R07 R07 R07 R07 R07 R07 R07 R07 R07 R07 R07 R07 R07 R07 R07 R07 R07 R07 R07 R07 R07 R07 R07 R07 R07 R07 R07 R07 R07 R07 R07 R07 R07 R07 R07 R07 R07 R07 R07 R07 R07 R07 R07 R07 R07 R07 R07 R07 R07 R07 R07 R07 R07 R07 R07 R07 R07 R07 R07 R07 R07 R07 R07 R07 R07 R07 R07 R07 R07 R07 R07 R07 R07 R07 R07 R07 R07 R07 R07 R07 R07 R07 R07 R07 R07 R07 R07 R07 R07 R07 R07 R07 R07 R07 R07 R07 R07 R07 R07 R07 R07 R07 R07 R07 R07 R07 R07 R07 R07 R07 R07 R07 R07 R07 R07 R07 R07 R07 R07 R07 R07 R07 R07 R07 R07 R07 R07 R07 R07 R07 R07 R07 R07 R07 R07 R07 R07 R07 R07 R07 R07 R07 R07 R07 R07 R07 R07 R07 R07 R07 R07 R07 R07 R07 R07 R07 R07 R07 R07 R07 R07 R07 R07 R07 R07 R07 R07 R07 R07 R07 R07 R07 R07 R07 R07 R07 R07 R07 R07 R07 R07 R07 R07 R07 R07 R07 R07 R07 R07 R07 R07 R07 R07 R07 R07 R07 R07 R07 R07 R07 R07 R07 R07 R07 R07 R07 R07 R07 R07 R07 R07 R07 R07 R07 R07 R07 R07 R07 R07 R07 R07 R07 R07 R07 R07 R07 R07 R07 R07 R07 R07 R07 R07 R07 R07 R07 R07 R07 R07 R07 R07 R07 R07 R07 R07 R07 R07 R07 R07 R07 R07 R07 R07 R07 R07 R07 R07 R07 R07 R07 R07 R07 R07 R07 R07 R07 R07 R07 R07 R07 R07 R07 R07 R07 R07 R07 R07 R07 R07 R07 R07 R07 R07 R07 R07 R07 R07 R07 R07 R07 R07 R07 R07 R04 R07 R07 R07 R07 R07 R07 R07 R07 R07 R07 R07 R07 R07 R07 R04 R07 R07 R07 R07 R07 R07 R07 R07 R07 R07 R07 R07 R07 R07 R07 R07 R07 R07 R07 R07 R07 R07 R07 R07 R07 R07 R07 R07 R07 R07 R07 R07 R07 R07 R07 R07 R07 R07 R07 R07 R07 R07 R07 R07 R07 R07 R07 R07 R07 R07 R07 R07 R07 R07 R07 R07 R07 R07 R07 R07 R07 R07 R07 R07 R07 R07 R07 R07 R07 R07 R07 R07 R07 R07 R07 R07 R07 R07 R07 R07 R07 R07 R07 R07 R07 R07 R07 R07 R07 R07 R07 R07 R07 R07 R07 R07 R07 R07 R07 R07 R07 R07 R07 R07 R07 R07 R07 R07 R07 R07 R07 R07 R07 R07 R07 R07 R07 R07 R07 R07 R07 R07 R07 R07 R07 R07 R07 R07 R07 R07 R07 R07 R07 R07 R07 R07 R07 R07 R07 R07 R07 R07 R07 R07 R07 R07 R07 R07 R07 R07 R07 R07 R07 R07 R07 R07 R07 R07 R07 R07 R07 R07 R07 R07 R07 R07 R07 R07 R07 R07 R07 R07 R07 R07 R07 R07 R07 R07 R07 R07 R07 R07 R07 R07 R07 R07 R07 R07 R07 R07 R07 R07 R07 R07 R07 R07 R07 R07 R07 R07 R07 R07 R07 R07 R07 R07 R07 R07 R07 R07 R07 R07 R07 R07 R07 R07 R07 R07 R07 R07 R07 R07 R07 R07 R07 R07 R07 R07 R07 R07 R07 R07 R07 R07 R07 R07 R07 R07 R07 R07 R07 R07 R07 R07 R07 R07 R07 R07 R07 R07 R07 R07 R07 R07 R07 R07 R07 R07 R07 R07 R07 R07 R07 R07 R07 R07 R07 R07 R07 R07 R07 R07 R07 R07 R07 R07 R07 R07 R07 R07 R07 R07 R07 R07 R07 R07 R07 R07 R07 R07 R07 R07 R07 R07 R07 R07 R07 R07 R07 R07 R07 R07 R07 R07 R07 R07 R07 R07 R07 R07 R07 R07 R07 R07 R07 R07 R07 R07 R07 R07 R07 R07 R07 R07 R07 R07 R07 R07 R07 R07 R07 R07 R07 R07 R07 R07 R07 R07 R07 R07 R07 R07 R07 R07 R07 R07 R07 R07 R07 R07 R07 R07 R07 R07 R07 R07 R07 R07 R07 R07 R07 R07 R07 R07 R07 R07 R07 R07 R07 R07 R07 R07 R07 R07 R07 R07 R07 R07 R07 R07 R07 R07 R07 R07 R07 R07 R07 R07 R07 R07 R07 R07 R07 R07 R07 R07 R07 R07 R07 R07 R07 R07 R07 R07 R07 R07 R07 R07 R07 R07 R07 R07 R07 R07 R07 R07 R07 R07 R07 R07 R07 R07 R07 R07 R07 R07 R07 R07 R07 R07 R07 R07 R07 R07 R07 R07 R07 R07 R07 R07 R07 R07 R07 R07 R07 R07 R07 R07 R07 R07 R07 R07 R07 R07 R07 R07 R07 R07 R07 R07 R07 R07 R07 R07 R07 R07 R07 R07 R07 R07 R07 R07 R07 R07 R07 R07 R07 R07 R07 R07 R07 R07 R07 R07 R07 R07 R07 R07 R07 R07 R07 R07 R07 R07 R07 R07 R07 R07 R07 R07 R07 R07 R07 R07 R07 R07 R07 R07 R07 R07 R07 R07 R07 R07 R07 R07 R07 R07 R07 R07 R07 R07 R07 R07 R07 R07 R07 R07 R07 R07 R07 R07 R07 R07 R07 R07 R07 R07 R07 R07 R07 R07 R07 R07 R07 R07 R07 R07 R07 R07 R07 R07 R07 R07 R07 R07 R07 R07 R07 R07 R07 R07 R07 R07 R07 R07 R07 R07 R07 R07 R07 R07 R07 R07 R07 R07 R07 R07 R07 R07 R07 R07 R07 R07 R07 R07 R07 R07 R07 wEE R07 R107wF2 R07 R107

remaining: FFFC


Keyboard ID: 0000
Code Set: 2 (extended)
Mode: AT/PS2

R07 wFE R07 wFE rAA wED rFA w00 rFA


I believe AT/XT auto switching was at least somewhat common during the time when PC(XT) and AT coexisted before the introduction of ps/2.
I've heard of similar functionality in Compaq Enhanced II keyboard, FKB4700 N860-4709-T101, Maxi Switch 2189, as well as some early versions of Model M though I can't confirm anything personally for those keyboards.


Z150 AT is registering keys properly now and lock lights do not init correctly as you noted but do update correctly.

Code: [Select]
Num and scroll lock pressed at the same time
----------
TMK:a33e8a96/LUFA


USB configured.

Keyboard start.
I323
PRT:11 ISR:6A90 rAA AA410 R911
ID:FFFD(AT_Z150) S911 L911 r77 wED
ERR:11 ISR:5DD0 !FF! rFF
[OVR]
ERR:F0 ISR:FFE0 rFA !CS2_INIT!
I5096
PRT:11 ISR:0000 rAA AA5328 R5829
ID:FFFD(AT_Z150) S5829 L5829
----------

Scroll and caps lock pressed at the same time
----------
TMK:a33e8a96/LUFA


USB configured.

Keyboard start.
I306
PRT:11 ISR:6A90 rAA AA409 R910
ID:FFFD(AT_Z150) S910 L910 r7E r58 wED rFA w07 rFA wED
ERR:11 ISR:7E90
ERR:F0 ISR:FFE0
PRT:23 ISR:0000 [CHG] I3201
PRT:11 ISR:0000 rFA rAA AA3433 R3934
ID:FFFD(AT_Z150) S3934 L3934
----------

Rapidly pressing Caps lock
----------
TMK:a33e8a96/LUFA


USB configured.

Keyboard start.
I368
PRT:11 ISR:6A90 rAA AA391 R892
ID:FFFD(AT_Z150) S892 L892 r58 wED rFA w00 rFA rF0 r58 r58 wED rFA w04 rFA rF0 r58 r58 wED rFA w00 rFA rF0 r58 r58 wED rFA w04 rFA rF0 r58 r58 wED rFA w00 rFA rF0 r58 r58 wED rFA w04 rFA rF0 r58 r58 wED rFA w00 rFA rF0 r58 r58 wED rFA w04 rFA rF0 r58 r58 wED rFA w00 rFA rF0 r58 r58 wED rFA w04 rFA rF0 r58 r58 wED rFA w00 rFA rF0 r58 r58 wED rFA w04 rFA rF0 r58 r58 wED rFA w00 rFA rF0 r58 r58 wED
ERR:11 ISR:1610
PRT:23 ISR:0000 [CHG] I4214
PRT:11 ISR:7E90 rFA rAA AA4447 r58 W4479 rF0 W4486 R4486
ID:FFFD(AT_Z150) S4487 L4487 r58 wED rFA w00 rFA
----------

Rapidly pressing scroll lock
----------
TMK:a33e8a96/LUFA


USB configured.

Keyboard start.
I398
PRT:11 ISR:6A90 rAA AA407 R908
ID:FFFD(AT_Z150) S908 L908 r7E wED rFA w00 rFA rF0 r7E r7E wED rFA w01 rFA rF0 r7E r7E wED rFA w00 rFA rF0 r7E r7E wED rFA w01 rFA rF0 r7E r7E wED rFA w00 rFA rF0 r7E r7E wED rFA w01 rFA rF0 r7E r7E wED rFA w00 rFA rF0 r7E r7E wED rFA w01 rFA rF0 r7E r7E wED rFA w00 rFA rF0 r7E r7E wED rFA w01 rFA rF0 r7E r7E wED rFA w00 rFA rF0 r7E r7E wED rFA w01 rFA rF0 r7E r7E wED
ERR:11 ISR:5F90
ERR:F0 ISR:FFE0
PRT:23 ISR:0000 [CHG] I10366
PRT:11 ISR:7E90 rFA rAA AA10599 R11100
ID:FFFD(AT_Z150) S11100 L11101
----------

Rapidly pressing Num lock
----------
TMK:a33e8a96/LUFA


USB configured.

Keyboard start.
I295
PRT:11 ISR:6A90 rAA AA414 R915
ID:FFFD(AT_Z150) S915 L915 r77 wED rFA w02 rFA rF0 r77 r77 wED rFA w00 rFA rF0 r77 r77 wED rFA w02 rFA rF0 r77 r77 wED rFA w00 rFA rF0 r77 r77 wED rFA w02 rFA rF0 r77 r77 wED rFA w00 rFA rF0 r77 r77 wED rFA w02 rFA rF0 r77 r77 wED rFA w00 rFA rF0 r77 r77 wED rFA w02 rFA rF0 r77 r77 wED rFA w00 rFA rF0 r77 r77 wED rFA w02 rFA rF0 r77 r77 wED rFA w00 rFA rF0 r77 r77 wED rFA w02 rFA rF0 r77 r77 wED rFA w00 rFA rF0 r77 r77 wED rFA w02 rFA rF0 r77 r77 wED rFA w00 rFA rF0 r77 r77 wED rFA w02 rFA rF0 r77 r77 wED rFA w00 rFA rF0 r77 r77 wED rFA w02 rFA rF0 r77 r77 wED rFA w00 rFA rF0 r77 r77 wED rFA w02 rFA rF0 r77 r77 wED rFA w00 rFA rF0 r77 r77 wED rFA w02 rFA rF0 r77 r77 wED rFA w00 rFA rF0 r77 r77 wED rFA w02 rFA rF0 r77 r77 wED
ERR:11 ISR:5DD0
ERR:F0 ISR:FFE0
PRT:23 ISR:0000 [CHG] I7207
PRT:11 ISR:0000 rFA rAA AA7440 R7941
ID:FFFD(AT_Z150) S7941 L7942
----------

Offline hasu

  • Thread Starter
  • Posts: 3471
  • Location: Tokyo, Japan
  • @tmk
    • tmk keyboard firmware project
Re: TMK IBM PC Keyboard Converter
« Reply #199 on: Sun, 09 May 2021, 09:36:36 »
I changed keyboard initializing procedure in the latest firmware but BTC-5161 dislikes it.
The BTC-5161 seems to send 'AA' with weird signaling and expect that AT host handles it as parity error while XT reads as 'AA' smiply.
Interesting...

I just changed init procedure again to emulate old firmware, try attached fimrware.


Z150 AT fails to respond 'ED'(LED) comand from converter for some reason.

The attached firmware makes signal timing relaxed more for Z150 AT. Can you check it with pressing lock keys rapidly again?

* ibmpc_usb_atmega32u4.hex (56.38 kB - downloaded 227 times.)

Thanks