Author Topic: [REQUEST FOR TEST] TMK IBM PC Keyboard Converter  (Read 11449 times)

0 Members and 1 Guest are viewing this topic.

Offline hasu

  • Thread Starter
  • Posts: 3086
  • Location: Tokyo, Japan
  • @tmk
    • tmk keyboard firmware project
[REQUEST FOR TEST] TMK IBM PC Keyboard Converter
« on: Tue, 03 December 2019, 05:59:31 »
IBM PC Keyboard Converter

The converter translates IBM PC keyboard protocols to use classic keyboards with modern computer with USB ports. It supports both IBM XT and AT protocols, and all of scan code set 1, 2 and 3 with one firmware.

This project is intended to integrated existent TMK XT, PS/2 and Terminal converters.
- IBM XT converter: https://geekhack.org/index.php?topic=94649.0
- PS/2 converter: https://geekhack.org/index.php?topic=14618.0
- IBM Terminal converter: http://geekhack.org/index.php?topic=27272.0

This is not finish project and still work in progress as of 2019-12-02. Test in the field and feedback from users are needed to improve

REQUEST FOR HELP:
Try this firmware and report your result and your keyboard model number. Also debug outputs on hid_listen would be helpful.

The converter need to be tested with keyboards below particularly, as of 2020-03-24.


- Zenith Z-150 XT black label
- IBM PC XT 83-key
- IBM PC AT 84-key



Update
2020-05-11 Add handler for keyboard buffer full to prevent key stuck
2020-05-11 Add adhoc start bit error recovery for XT keyboards
2020-04-28 Add support G80-2551 and possibly other terminal keyboards(whose id is AB86)
2020-04-11 Keymap Editor is available
2020-03-02 firmware update for XT protocol handling and many other fixes



Tested Keyboards
- IBM 122-key Terminal: 6110345, 6111070, 6110344

- IBM XT 83-key: 4584656

- AT Keyboards: DS-2001, Northgate Omnikey

- Other XT Keybaords: Leading Edge DC-2014

- Other Terminal Keyboards: G80-2551



Issues
Post your result to debug and improvement.

Z-150 beige(AT):
The converter should receive scan codes but fails to send command to the keyboard.

Try default firmware first, if it doesn't work test firmware in 'ibmpc_z150at_fix' branch. Post your result and 'hid_listen' log.
https://github.com/tmk/tmk_keyboard/tree/ibmpc_z150at_fix/converter/ibmpc_usb/binary

The converter can't control LED indicator correctly and the keyboard stops working when pressing any lock keys.
https://geekhack.org/index.php?topic=103648.msg2895781#msg2895781
https://github.com/tmk/tmk_keyboard/wiki/IBM-PC-AT-Keyboard-Protocol#zenith-z-150-at


IBM PC XT 83-key:
- Random issues show up.
https://geekhack.org/index.php?topic=103648.msg2898287#msg2898287
https://github.com/tmk/tmk_keyboard/issues/635#issuecomment-626363659
https://github.com/tmk/tmk_keyboard/issues/635#issuecomment-626346945
It was hardware issue probably. 2020-05-14

- miss start bit(0) and register wrong key
https://github.com/tmk/tmk_keyboard/issues/635#issuecomment-626249036
https://github.com/tmk/tmk_keyboard/wiki/IBM-PC-XT-Keyboard-Protocol#note-for-start0

https://github.com/tmk/tmk_keyboard/commit/7c3b669e6f7f449fa4ae58e028fcd07182cafa99
https://github.com/tmk/tmk_keyboard/issues/635#issuecomment-627397611
Updated firmware and solved. Use the latest firmware. 2020-05-14



Keyboards with which this firmware should work

- PC XT keyboard of IBM 5150 5160
  - 83-key: 1501100 1501105
- PC AT keyboard of IBM 5170
  - 84-key: 6450200 6450225
- PC Terminal keyboard of IBM 5271(3270 PC)
  - 122-key: 6110344 6110345 1397000
  - 102-key: 1390680 1395764 1392595
- PS/2 keyboards(AT+CodeSet2)
- Clones of above models


Hardware

Firmware supports ATmega32u4 by default, Teensy2/2++ or Pro Micro can be used.
Wire controller pins below to keyboard signals, besides VCC and GND. This is compatible for Soarer's converter.

- Data    PD0
- Clock   PD1
- Reset   PB6 or PB7 (For some of XT keyboards. Not needed for AT, PS/2 and Terminal)

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.


Pro Micro Caveat
First, RAW pin is not for 5V power supply directly from USB line. The name may be not easy to understand but it is used for external power input, not output. You get only around 4.6V due to protection diode's forward voltage drop(0.4V typically) on RAW pin.
You have to use VCC pin to power your keyboard, not RAW pin.
And you have to make J1 solder bridged, without this you will get same voltage as RAW pin or lower.
With J1 soder bridge you can get raw power(possibly 5V) directly from USB line on VCC pin, note that RAW pin doesn't give 5V even with the solder bridge. Check this wiki for detail.
https://github.com/tmk/tmk_keyboard/wiki/Pro-Micro#j1-solder-bridge

Note that ATmega32u4 pinout PD0, PD1 and PB6 are maked on Pro Micro PCB as 3, 2 and 10 respectively.

https://github.com/tmk/tmk_keyboard/wiki/Pro-Micro#pinout



Reset
Old Type-1 IBM XT keyboard and some of XT clones need this to reset its controller on startup. Many of IBM XT keyboards available are Type-2 and don't need the reset pin.

See this for Type-1 vs Type-2:
https://vintagecomputer.ca/ibm-pc-model-f-keyboard-type-1-vs-type-2/

As for clones Zenith Z-150 XT and  Leading Edge DC-2014 are known to need this.


Connector pinouts

More



Keymap Editor

You can edit keymap and download firmware here.

http://www.tmk-kbd.com/tmk_keyboard/editor/#ibmpc_usb



Default Prebuilt Firmware

Use this when you have trouble with firmware built yourself.

https://github.com/tmk/tmk_keyboard/tree/master/converter/ibmpc_usb/binary



Build Firmware

Download source code from: https://github.com/tmk/tmk_keyboard/tree/master/converter/ibmpc_usb

    $ cd converter/ibmpc_usb
    $ make clean
    $ make



Debug

Use hid_listen to see debug outputs from the converter.

https://www.pjrc.com/teensy/hid_listen.html

Code: [Select]
Waiting for new device:...
Listening:


TMK:95aba6dd/LUFA


USB configured.

Keyboard start.
rAA rBF rBF wF5 rFA wF2 rFA rBF rBF wF4 rFA ID: BFBF
kbd: Terminal
wF8 rFA 



TODO

* Reset method for rescue
For converter without accesible reset button when magickey combo doesn't work.
Check pin status at powerup:
- if Data and/or Clock are pull down to GND

* Force protocol and scan code set
Keyboard discrimination may fail and you have to configure them by hand.



Resources

- https://github.com/tmk/tmk_keyboard/wiki/IBM-PC-XT-Keyboard-Protocol

- https://github.com/tmk/tmk_keyboard/wiki/IBM-PC-AT-Keyboard-Protocol



Keyboard discrimination

This section explains how the converter determines proper protocol and scan code set for keyboard. The converter need to do that before starting to receive and translate scan codes from keyboard.

Keyboard ID
After startup the converter sends 0xF2 command to get keyboard ID and sees how the keyboard responds to the command.
https://github.com/tmk/tmk_keyboard/wiki/IBM-PC-AT-Keyboard-Protocol#keyboard-id

Response from keyboard:

- XT keyboard doesn't support any command and returns no response.
- AT keyboard should respond with 0xFA to the command but returns no keyboard ID.
- PS/2 keyboard should respond with 0xFA to the command, followd by keyboard ID, such as 0xAB83.
- Terminal keyboard should respond with 0xFA to the command, followed by keyboard ID, such as 0xBFBF.

Now we can dscriminate the keyboard and determine suitable protocol and scan code set as described below.

Protocol
- Signals from XT keyboard are recognized by XT protocol.
- Signals from AT, PS/2 and Terminal keyboard are recognized by AT protocol.

This converter can recognize both XT and AT protocol dynamically.
https://github.com/tmk/tmk_keyboard/blob/f8685ce694329529d93c4e3afb8aae25d7ec5959/tmk_core/protocol/ibmpc.c#L200-L332

Scan code Set
- Scan codes from XT keyboard are handled as CodeSet1.
- Scan codes from AT and PS/2 keyboard are handled as CodeSet2.
- Scan codes from Terminal keyhboard are handled as CodeSet3.
« Last Edit: Fri, 22 May 2020, 01:30:50 by hasu »
TMK products:HHKB Alt  ⌨ConvertersAlps64FC660C AltFC980C Alt

Offline hasu

  • Thread Starter
  • Posts: 3086
  • Location: Tokyo, Japan
  • @tmk
    • tmk keyboard firmware project
Re: [REQUEST FOR TEST] TMK IBM PC Keyboard Converter
« Reply #1 on: Sun, 05 January 2020, 20:05:56 »
anyone? please check first post.


Quote
REQUEST FOR HELP: Try and report your result.
Post your keyboard model number here, also debug outputs on hid_listen would be helpful.
TMK products:HHKB Alt  ⌨ConvertersAlps64FC660C AltFC980C Alt

Online Maledicted

  • Posts: 1031
  • Location: Wisconsin, United States
Re: [REQUEST FOR TEST] TMK IBM PC Keyboard Converter
« Reply #2 on: Mon, 06 January 2020, 12:00:47 »
I have a few ATMega32u4s sitting around waiting to be turned into Soarer's Converters, and probably the necessary resistors. I have both the standard IBM Model F XT, and AT. I also have some AT/XT switchable Uniteks and a DC-2014, although it already currently has a Soarer's converter I built inside of it. I know a guy that has an old RJ11 Wyse too (among other old weird things), if any of that may be helpful for testing.

What exactly is it that you wish to accomplish? An open-source alternative to Soarer's Converter? I would think that the AT/PS2 keyboards should all work just about the same, right? My F AT works with modern systems with a 5 pin din to PS2 adapter. There's certainly no shortage of random old PS2 boards that must be available to you.

Offline hasu

  • Thread Starter
  • Posts: 3086
  • Location: Tokyo, Japan
  • @tmk
    • tmk keyboard firmware project
Re: [REQUEST FOR TEST] TMK IBM PC Keyboard Converter
« Reply #3 on: Mon, 06 January 2020, 18:46:54 »
I have a few ATMega32u4s sitting around waiting to be turned into Soarer's Converters, and probably the necessary resistors. I have both the standard IBM Model F XT, and AT. I also have some AT/XT switchable Uniteks and a DC-2014, although it already currently has a Soarer's converter I built inside of it. I know a guy that has an old RJ11 Wyse too (among other old weird things), if any of that may be helpful for testing.
Report on those keyobards would be definitely helpful. As for DC-2014 this firmware is compatible to Soarer's hardware you can just program it to test. This doesn't break your existent keymap settings of in eeprom, so you just need to program Soarer's firmware again to restore.

I really want to know my firmware with the IBM model F AT and XT(I don't own any unfortunately), they are very original and legitimate test samples for the keyboard  protocols.

I don't know much about RJ11 Wyse but I guess some of them uses Wyse specific protocol, not AT or XT.

Quote
What exactly is it that you wish to accomplish? An open-source alternative to Soarer's Converter? I would think that the AT/PS2 keyboards should all work just about the same, right? My F AT works with modern systems with a 5 pin din to PS2 adapter. There's certainly no shortage of random old PS2 boards that must be available to you.

Yes, I like to make this useful open-source converter and I will have to improve it.
I believe that there are still unexpected behaviours of keyboards and bugs on my code that cuases problems. It is difficult to find them without testing with real keyboards.

TMK products:HHKB Alt  ⌨ConvertersAlps64FC660C AltFC980C Alt

Offline hasu

  • Thread Starter
  • Posts: 3086
  • Location: Tokyo, Japan
  • @tmk
    • tmk keyboard firmware project
Re: [REQUEST FOR TEST] TMK IBM PC Keyboard Converter
« Reply #4 on: Mon, 06 January 2020, 19:07:53 »
I tested with IBM 122-key Terminal 6110345 and it worked well.

The converter recognizes like below.
Quote
Waiting for new device:.......
Listening:


TMK:5a759850/LUFA


USB configured.

Keyboard start.
err: 2A
rAA rBF rBF wF5 rFA wF2 rFA rBF rBF wF4 rFA ID: BFBF
kbd: Terminal
wF8 rFA r3B rF0 r3B r3B rF0 r3B r3B rF0 r3B
TMK products:HHKB Alt  ⌨ConvertersAlps64FC660C AltFC980C Alt

Online Maledicted

  • Posts: 1031
  • Location: Wisconsin, United States
Re: [REQUEST FOR TEST] TMK IBM PC Keyboard Converter
« Reply #5 on: Tue, 07 January 2020, 09:48:25 »
My DC-2014 doesn't have any resistors soldered to the Pro Micro (I figured that would be fine with such short wires, but I think the reset pin should still be easily accessible to flash your firmware and it does appear to be wired the same. My general-use Soarer's converter at home doesn't even have the XT reset wire soldered to it ... and that's encased in hot glue now. I really should pry it back out and resolve that though. Worst case, I'll rig up a fresh controller and get back to you, maybe tonight. I'll have to lug the F AT and DC-2014 home from work.

Offline hasu

  • Thread Starter
  • Posts: 3086
  • Location: Tokyo, Japan
  • @tmk
    • tmk keyboard firmware project
Re: [REQUEST FOR TEST] TMK IBM PC Keyboard Converter
« Reply #6 on: Tue, 07 January 2020, 18:08:48 »
It works without pull up resistors in most cases, you don't have to modify your exisitent converter, this conveter should work if Soarer's does.
XT reset is needed only for Old Type-1 IBM XT keyboard and some of XT clones.

Don't use short wire intead of pull up resistor, it may harm on the pin.
TMK products:HHKB Alt  ⌨ConvertersAlps64FC660C AltFC980C Alt

Online Maledicted

  • Posts: 1031
  • Location: Wisconsin, United States
Re: [REQUEST FOR TEST] TMK IBM PC Keyboard Converter
« Reply #7 on: Wed, 08 January 2020, 09:43:05 »
What I mean is that the wires are very short, since I put the converter inside the case of the keyboard. I like to move that one around so I removed the original cable and have a short micro usb extension cable peeking out of the case. The one I have in a hardware store junction box needs to be freed from the hot glue to add the reset wire anyway, so I may as well add resistors to it as well.

Tonight, hopefully, I will get to this. My box jades for a keyboard mod are coming in today as well, so possibly not, but it all gives me an excuse to keep the soldering iron hot.

Online Maledicted

  • Posts: 1031
  • Location: Wisconsin, United States
Re: [REQUEST FOR TEST] TMK IBM PC Keyboard Converter
« Reply #8 on: Fri, 10 January 2020, 22:08:35 »
Sorry about the delay. I don't get enough sleep on weekdays. Here's a fun one. It looks like the K151L worked in both AT and XT mode. Neither the F AT, nor F XT worked. The Leading Edge DC-2014 didn't work either. I did notice that the lock lights did seem to come on if I enabled them from another usb keyboard on the F AT, but the F AT lock light did not work. The F XT spewed out garbled keypresses the entire time that it was connected.

With the F AT, interestingly, it would say it was an XT keyboard until I hit the reset button I added to the Pro Micro. Here's the results of HID_Listen for that board, including after having hit the reset button:



For the F XT I unplugged the converter so that it would stop listening for me to copy the entire text ... it is a long one:

* IBM Model F XT output.txt

Here's the results from the DC-2014:



Here are the results of the K151L in AT mode:



And here are the results of the K151L in XT mode:



Let me know if you need anything else.


Offline hasu

  • Thread Starter
  • Posts: 3086
  • Location: Tokyo, Japan
  • @tmk
    • tmk keyboard firmware project
Re: [REQUEST FOR TEST] TMK IBM PC Keyboard Converter
« Reply #9 on: Sat, 11 January 2020, 07:07:08 »
Thank you for the report!

As for Model F AT, can you try procedure below?
1. connect keyboard to converter
2. plug it into usb port
When you connect keyboard after usb plugin, the converter tries to recognize the keyboard as possible, but it requires several key strokes and the keys are ignored. You better connect keyboard before plugin to computer basically.

For Model F XT and DC-2014, the converter seems to miss signal, could you try attached firmware?
TMK products:HHKB Alt  ⌨ConvertersAlps64FC660C AltFC980C Alt

Online Maledicted

  • Posts: 1031
  • Location: Wisconsin, United States
Re: [REQUEST FOR TEST] TMK IBM PC Keyboard Converter
« Reply #10 on: Sat, 11 January 2020, 18:19:22 »
Thank you for the report!

As for Model F AT, can you try procedure below?
1. connect keyboard to converter
2. plug it into usb port
When you connect keyboard after usb plugin, the converter tries to recognize the keyboard as possible, but it requires several key strokes and the keys are ignored. You better connect keyboard before plugin to computer basically.

For Model F XT and DC-2014, the converter seems to miss signal, could you try attached firmware?

Well, with every keyboard I tested I made sure that their 5 pin din connectors were plugged into the Pro Micro before I connected the Pro Micro to the computer. I did the following with all of them:

1) Start HID_listen

2) Connect keyboard to Pro Micro

3) Connect Pro Micro to usb port on the computer

What I did with the F AT, since it was being detected as an XT keyboard for some reason when doing this, was short the reset contact to ground with a momentary button I added (while everything was still plugged in), since I figured I would need such functionality if we would be doing a lot of this.

This almost makes me want to pick up a female PS/2 adapter to wire into it as well to see what happens with random generic boards I have lying around, but I suppose they would probably work just about like the Unitek, right? I did also add a 1k resistor between data - ground and clock - ground as well, just in case (2 separate resistors). I added both of those resistors and the proper XT reset wire before I started testing your firmware.

Your alternative firmware seems to work with the DC-2014, but the XT behaved similarly to before. I would plug the Pro Micro into the computer with the keyboard already attached, no keypresses seemed to register, and HID_listen would freak out until I unplugged it. It looks like the output was a bit different this time though?

* IBM Model F XT output with alternative firmware.txt (1 kB - downloaded 16 times.)
« Last Edit: Sat, 11 January 2020, 18:39:55 by Maledicted »

Offline hasu

  • Thread Starter
  • Posts: 3086
  • Location: Tokyo, Japan
  • @tmk
    • tmk keyboard firmware project
Re: [REQUEST FOR TEST] TMK IBM PC Keyboard Converter
« Reply #11 on: Sat, 11 January 2020, 18:41:22 »
Just note that Pull-up register is placed between 5V and signal line, not ground. 1-10K Ohm would be fine.
To confirm your converter hardware setup before testing my firmware, you can use well-tested Soarer's converter firmware.
TMK products:HHKB Alt  ⌨ConvertersAlps64FC660C AltFC980C Alt

Online Maledicted

  • Posts: 1031
  • Location: Wisconsin, United States
Re: [REQUEST FOR TEST] TMK IBM PC Keyboard Converter
« Reply #12 on: Sat, 11 January 2020, 18:45:12 »
Just note that Pull-up register is placed between 5V and signal line, not ground. 1-10K Ohm would be fine.
To confirm your converter hardware setup before testing my firmware, you can use well-tested Soarer's converter firmware.

Right. 5V, not ground. My mistake. What you describe is actually how I wired it. I had previously used all of these keyboards successfully with Soarer's firmware, but I could re-test with this specific Pro Micro, and the new modifications if you like. I imagine they'll all work.

Alright, interesting results. With Soarer's converter flashed to the Pro Micro, it works with everything (including the F AT) except for the F XT, it continues to spit random things out in HID_listen. I think it might dislike the reset wire that the DC-2014 requires. I may solder an on/of switch in if I desolder the reset wire and the F XT suddenly works again with Soarer's converter.

Even with the reset wire desoldered, it is doing the same thing. Is it possible that the F XT isn't happy with a 1k ohm resistor between clock - 5v/vcc and data - 5v/vcc? I know that this keyboard worked with this very same Pro Micro without the resistors.

I think I'll throw together another basic Soarer's converter from scratch, without the resistors. I have a few more Pro Micros lying around anyway.

It just keeps getting stranger. I desoldered the resistors and resoldered the XT reset wire and the F XT did nothing. If I disconnected the XT reset wire as well, it went back to freaking out. My computer even bluescreened. I wonder what version of Soarer's firmware I originally used with this keyboard now. I'm most recently using one that somebody modified to make the Pro Micro's PB6/ contact/pin 10 into the keyboard reset line, since Soarer's firmware apparently didn't account for this on the Pro Micro.

Now the Pro Micro itself is spurting out random characters. I tried reflowing all of the solder and flashing another version of Soarer's but that didn't change anything ... I'll build a new one.
« Last Edit: Sat, 11 January 2020, 19:41:40 by Maledicted »

Offline hasu

  • Thread Starter
  • Posts: 3086
  • Location: Tokyo, Japan
  • @tmk
    • tmk keyboard firmware project
Re: [REQUEST FOR TEST] TMK IBM PC Keyboard Converter
« Reply #13 on: Sat, 11 January 2020, 20:36:27 »
Just note that Pull-up register is placed between 5V and signal line, not ground. 1-10K Ohm would be fine.
To confirm your converter hardware setup before testing my firmware, you can use well-tested Soarer's converter firmware.

Right. 5V, not ground. My mistake. What you describe is actually how I wired it. I had previously used all of these keyboards successfully with Soarer's firmware, but I could re-test with this specific Pro Micro, and the new modifications if you like. I imagine they'll all work.

Alright, interesting results. With Soarer's converter flashed to the Pro Micro, it works with everything (including the F AT) except for the F XT, it continues to spit random things out in HID_listen. I think it might dislike the reset wire that the DC-2014 requires. I may solder an on/of switch in if I desolder the reset wire and the F XT suddenly works again with Soarer's converter.

Interesting.
There are two types of IBM XT. Type-1 requires reset line to start up while Type-2 doesn't. But on Type-2 reset line is not connected to its controller so I believe reset line doesn't bother Type-2. Converter with reset line should work regardless of whether your XT keyboard is Type-1 or Type-2.
https://github.com/tmk/tmk_keyboard/wiki/IBM-PC-XT-Keyboard-Protocol#type-1-vs-type-2

If your XT is Type-1 and you use ProMicro you will have to use this modified version of Soarers' firmware to support reset line on pin 10(PB6). I belive you already know and use this on DC-2014, though.
https://deskthority.net/viewtopic.php?p=187874#p187874


Quote
Even with the reset wire desoldered, it is doing the same thing. Is it possible that the F XT isn't happy with a 1k ohm resistor between clock - 5v/vcc and data - 5v/vcc? I know that this keyboard worked with this very same Pro Micro without the resistors.

I think I'll throw together another basic Soarer's converter from scratch, without the resistors. I have a few more Pro Micros lying around anyway.

I don't think 1K pull-up resistors are problem but it is still worth trying without them.

Thanks for your time.

TMK products:HHKB Alt  ⌨ConvertersAlps64FC660C AltFC980C Alt

Online Maledicted

  • Posts: 1031
  • Location: Wisconsin, United States
Re: [REQUEST FOR TEST] TMK IBM PC Keyboard Converter
« Reply #14 on: Sat, 11 January 2020, 20:48:50 »
I redid all of the wiring on the Pro Micro with some good high quality silicone wire, cleaned up all of the old solder first with some wick. It seems to work with other keyboards again, with Soarer's firmware. I didn't know that some F XTs required the reset wire and that some did not, I figured it was weird "XT-like" boards that used it. I do know that my F XT refused to work on initial boot of my operating system unless I unplugged the converter and plugged it back in, without the reset wire. The F XT is still doing the same thing as before even with Soarer's firmware. I may take it apart and take a look inside. I got it with a cut cable, so I snipped a MIDI cable and soldered it in.

Let me know if there's anything else you want me to try with the F AT with your firmware in the mean time.

F XT cable tests good, all wires make a good connection to the controller and none are bridged. I should have known. I made sure this thing would never break. Mine must be a type-2, there are only 4 wires running from what's left of the original cable to the controller.

Alright, I built an entirely new Soarer's converter and the F XT is now working with that. I thought there may be something wrong with the other converter, but I think there was something flaky with the usb cable, grounding maybe, since once I removed the usb extender it would work. I still can't get the F AT or F XT to work with either version of your firmware though. At least the F XT doesn't spit out random keypresses though. So, I've tried 3 different usb cables and 2 different Pro Micros, one with and without the pullup resistors and a complete rewire, with the same results (once whatever was going on with the XT was resolved).

With a little more testing, I also noticed that the K151L was only working when I connected while it was in XT mode. If i switched it to AT mode, it would continue to work, but if I connected it while it was already in AT mode, it would not.

So, with the original firmware the K151L worked in XT mode. With the alternative firmware the DC-2014 worked.
« Last Edit: Sun, 12 January 2020, 03:59:12 by Maledicted »

Offline hasu

  • Thread Starter
  • Posts: 3086
  • Location: Tokyo, Japan
  • @tmk
    • tmk keyboard firmware project
Re: [REQUEST FOR TEST] TMK IBM PC Keyboard Converter
« Reply #15 on: Sun, 12 January 2020, 06:05:54 »
Let me know if there's anything else you want me to try with the F AT with your firmware in the mean time.

I found description of power-on-reset on original 84-key AT in IBM tech reference, it is  rather slower than I expected.
Could you try this new attached firmware and show me output of hid_listen when press a, s, d and f key? I need to know numbers of Ixxx and Rxxx in particular, like below.

Code: [Select]
TMK:ee0200d6/LUFA

USB configured.

Keyboard start.
I401
rAA R1163
wF5 rFA wF2 rFA rAB r83 wF4 rFA ID: AB83
kbd: AT
L1175
wED rFA w00 rFA wED rFA w02 rFA r1C rF0 r1C r1B rF0 r1B r23 rF0 r23 r2B rF0 r2B r34 rF0 r34



Quote
Alright, I built an entirely new Soarer's converter and the F XT is now working with that. I thought there may be something wrong with the other converter, but I think there was something flaky with the usb cable, grounding maybe, since once I removed the usb extender it would work. I still can't get the F AT or F XT to work with either version of your firmware though. At least the F XT doesn't spit out random keypresses though. So, I've tried 3 different usb cables and 2 different Pro Micros, one with and without the pullup resistors and a complete rewire, with the same results (once whatever was going on with the XT was resolved).

Do you test my firmware with the "new Soarer's converter", right?
Sorry but can you share output of hid_listen for F XT with this new firmware again?  Pressing a, s, d and f key would be helpful.

TMK products:HHKB Alt  ⌨ConvertersAlps64FC660C AltFC980C Alt

Online Maledicted

  • Posts: 1031
  • Location: Wisconsin, United States
Re: [REQUEST FOR TEST] TMK IBM PC Keyboard Converter
« Reply #16 on: Sun, 12 January 2020, 22:17:44 »
I tried both previous firmwares with both the newly assembled Pro Micro, and the previous one that I had re-wired. The results were the same other than the F XT no longer spewed out random keypresses (most of the time). I noticed that with your latest firmware the F XT spewed out random keypresses on the rebuilt Pro Micro and did not on the one that I just newly built specific for this testing. That makes no sense to me since I wired them exactly the same way this time, with the extra XT wire soldered, and no resistors.

The XT did now give results with the new firmware, on the newly-assembled Pro Micro, when pressing the a,s,d, and f keys, although that didn't seem to translate into actual character signals that the computer understood when I tried to type out text. HID_listen detected nothing at all when I used the latest supplied firmware to press the a,s,d, and f keys on the F AT. I have attached the results of your requested test with the F XT:

* Ibm Model F XT output second alternative firmware, asdf pressed.txt (0.65 kB - downloaded 19 times.)

Online Maledicted

  • Posts: 1031
  • Location: Wisconsin, United States
Re: [REQUEST FOR TEST] TMK IBM PC Keyboard Converter
« Reply #17 on: Wed, 15 January 2020, 15:18:45 »
I don't mean to double post, but do you have everything you need, or is there anything else I can test for you while I have all of the boards in one place? I jump around between buildings at work, and use the DC-2014 especially at work, but also the F AT. I have been keeping them at home the last few days for testing this.

Offline hasu

  • Thread Starter
  • Posts: 3086
  • Location: Tokyo, Japan
  • @tmk
    • tmk keyboard firmware project
Re: [REQUEST FOR TEST] TMK IBM PC Keyboard Converter
« Reply #18 on: Thu, 16 January 2020, 17:43:42 »
Maledicted,
Thank you for your service so far! I really appreciate.
I don't want to prevent you from using your keyobards anymore, feel free to place them back to where they should be when you need.

I'm debuging my code on keyboard protocol recoginition and signal handling and this will take some time. If this is not in time for your test, others in the community will help me in the end.

Thanks agian!
TMK products:HHKB Alt  ⌨ConvertersAlps64FC660C AltFC980C Alt

Online Maledicted

  • Posts: 1031
  • Location: Wisconsin, United States
Re: [REQUEST FOR TEST] TMK IBM PC Keyboard Converter
« Reply #19 on: Fri, 17 January 2020, 09:14:45 »
Absolutely, anything I can do. Thank you for putting all of that effort into an open source project for the community at large.

Actually, since I posted that, I won another F AT and DC-2014 on Ebay, so I should have at least one of each available no matter what now. lol

Have others with the same boards helped elsewhere? I wouldn't be surprised if none had. I imagine a lot of people go, "Soarer's firmware works for me. I'm good." since all of these boards work fine already. I think it is pretty important to expand on the functionality of Soarer's work though myself, and being open source like that, TMK seems to have the potential to become the one catch-all solution in time.

Offline gravesgeek

  • Posts: 1
Re: [REQUEST FOR TEST] TMK IBM PC Keyboard Converter
« Reply #20 on: Sun, 02 February 2020, 12:43:35 »
Hi, I am new to the community with my model m, unicomp ultracompact.
I found a 1987model m122 with stepped key and DIN 5 plug and 1981 model f xt with DIN 5 plug from a local flea market for 30 and 40 USD, respectively.

But the problem is I am not an electronics man (MD. actually). I can find someone from the medical device maintenance dept. for soldering. But I don't think they can handle the programming.

Is there any guide for building converters from the beginning?

Is there a software with a simple interface for remapping the keys or this can be don only by code writing?

Thanks to everybody.

Online Maledicted

  • Posts: 1031
  • Location: Wisconsin, United States
Re: [REQUEST FOR TEST] TMK IBM PC Keyboard Converter
« Reply #21 on: Sun, 02 February 2020, 19:43:10 »
Hi, I am new to the community with my model m, unicomp ultracompact.
I found a 1987model m122 with stepped key and DIN 5 plug and 1981 model f xt with DIN 5 plug from a local flea market for 30 and 40 USD, respectively.

But the problem is I am not an electronics man (MD. actually). I can find someone from the medical device maintenance dept. for soldering. But I don't think they can handle the programming.

Is there any guide for building converters from the beginning?

Is there a software with a simple interface for remapping the keys or this can be don only by code writing?

Thanks to everybody.

Hello gravesgeek, welcome to the keyboard obsession. You're probably best off posting a separate thread on this, but the M122 should work with most any 5-pin din to ps2 adapter with any modern computer that has a ps2 port. For the F XT, or to use either through a usb port, you'll need to build or buy a converter and flash it either with Soarer's converter firmware, or Hasu's. Pre-made converters with Soarer's firmware are readily available on Ebay.

For remapping, there are programs like SharpKeys, which seemed easy enough to me the last time I used it, but that was years ago. The zip downloads for Soarer's firmware contain documentation on how to remap keys and apply that remapping to the converter (which would, conveniently, mean that all computers you use with the converter would have that same mapping). Google searches reveal the same.

For the process of wiring and flashing, this is a simple/detailed guide:

https://deskthority.net/viewtopic.php?t=19035

Offline hking0036

  • Posts: 342
  • Location: NC, USA
Re: [REQUEST FOR TEST] TMK IBM PC Keyboard Converter
« Reply #22 on: Tue, 04 February 2020, 11:41:50 »
I can try this out - my kbd is Terminal F122 6111070. It's got french legends on the CMD keys up top but other than that I believe it is identical to 6110344.

Here is the output:
Code: [Select]
Waiting for device:.....
Listening:


TMK:5a759850/LUFA


USB configured.

Keyboard start.
rAA rBF rBF wF5 rFA wF2 rFA rBF rBF wF4 rFA ID: BFBF
kbd: Terminal
wF8 rFA

I have been using the terminal_usb converter for some time, and it has worked very well. Is there a particular intent for this FW?

P.S. Looking in unimap_trans.h, it seems that 0x58 is bound to 0x14 for Type-3 sets, but isn't marked.
« Last Edit: Tue, 04 February 2020, 14:53:03 by hking0036 »
Realforce RF87UB 45g Uniform | Leopold FC660C w/ TMK | IBM Model M - 3/24/1997 | IBM Model F 122 - 11/25/1985 ANSI'd w/ TMK | IBM Model F XT in a box

Offline hasu

  • Thread Starter
  • Posts: 3086
  • Location: Tokyo, Japan
  • @tmk
    • tmk keyboard firmware project
Re: [REQUEST FOR HELP] TMK IBM PC Keyboard Converter [2020-03-02]
« Reply #23 on: Mon, 02 March 2020, 00:00:34 »
REQUEST FOR HELP:

Updated firmware for XT protocol handling and many other fixes. 2020-03-02
Could someone try this prebuilt firmware and report your result and your keyboard model number? Also debug outputs on hid_listen would be helpful.

https://github.com/tmk/tmk_keyboard/tree/master/converter/ibmpc_usb/binary

The converter need to be tested with keyboards below particularly.

- IBM PC XT 83-key
- IBM PC AT 84-key

Thank you
TMK products:HHKB Alt  ⌨ConvertersAlps64FC660C AltFC980C Alt

Online Maledicted

  • Posts: 1031
  • Location: Wisconsin, United States
Re: [REQUEST FOR HELP] TMK IBM PC Keyboard Converter [2020-03-02]
« Reply #24 on: Tue, 03 March 2020, 10:30:18 »
REQUEST FOR HELP:

Updated firmware for XT protocol handling and many other fixes. 2020-03-02
Could someone try this prebuilt firmware and report your result and your keyboard model number? Also debug outputs on hid_listen would be helpful.

https://github.com/tmk/tmk_keyboard/tree/master/converter/ibmpc_usb/binary

The converter need to be tested with keyboards below particularly.

- IBM PC XT 83-key
- IBM PC AT 84-key

Thank you

I'll do this this evening, if I get the chance. I have ... way too many additional keyboards I could be testing with now too.

Offline hasu

  • Thread Starter
  • Posts: 3086
  • Location: Tokyo, Japan
  • @tmk
    • tmk keyboard firmware project
Re: [REQUEST FOR TEST] TMK IBM PC Keyboard Converter
« Reply #25 on: Tue, 03 March 2020, 17:10:41 »
I can try this out - my kbd is Terminal F122 6111070. It's got french legends on the CMD keys up top but other than that I believe it is identical to 6110344.

Here is the output:
Code: [Select]
Waiting for device:.....
Listening:


TMK:5a759850/LUFA


USB configured.

Keyboard start.
rAA rBF rBF wF5 rFA wF2 rFA rBF rBF wF4 rFA ID: BFBF
kbd: Terminal
wF8 rFA

I have been using the terminal_usb converter for some time, and it has worked very well. Is there a particular intent for this FW?

P.S. Looking in unimap_trans.h, it seems that 0x58 is bound to 0x14 for Type-3 sets, but isn't marked.

I did miss this post for no reason. Thank you for the test and insight.

Fixed the scancode in comment at this commit.
https://github.com/tmk/tmk_keyboard/commit/a4d4f14942a906d540c1f5aaf9d65fb6be17686b#diff-b9793345227e846a48d134c1e5f548f4
TMK products:HHKB Alt  ⌨ConvertersAlps64FC660C AltFC980C Alt

Offline hasu

  • Thread Starter
  • Posts: 3086
  • Location: Tokyo, Japan
  • @tmk
    • tmk keyboard firmware project
Re: [REQUEST FOR TEST] TMK IBM PC Keyboard Converter
« Reply #26 on: Tue, 03 March 2020, 21:18:59 »
REQUEST FOR HELP:

Updated firmware for XT protocol handling and many other fixes. 2020-03-02
Could someone try this prebuilt firmware and report your result and your keyboard model number? Also debug outputs on hid_listen would be helpful.

https://github.com/tmk/tmk_keyboard/tree/master/converter/ibmpc_usb/binary

The converter need to be tested with keyboards below particularly.

- IBM PC XT 83-key
- IBM PC AT 84-key

Thank you

I'll do this this evening, if I get the chance. I have ... way too many additional keyboards I could be testing with now too.

Also, can you try this XT converter firmware with your IBM XT keyboard?
https://geekhack.org/index.php?topic=94649.0

You can get the firmware for ATMega32u4 here.
https://github.com/tmk/tmk_keyboard/tree/master/converter/xt_usb/binary
TMK products:HHKB Alt  ⌨ConvertersAlps64FC660C AltFC980C Alt

Online Maledicted

  • Posts: 1031
  • Location: Wisconsin, United States
Re: [REQUEST FOR TEST] TMK IBM PC Keyboard Converter
« Reply #27 on: Fri, 06 March 2020, 17:30:07 »
Well, On my Pro Micro with the pullup resistors, the flash failed and it appears to have nuked the bootloader. Probably my own fault for trying to flash it while connected to an unpowered hub. Not sure if I'll bother to try to unbrick it or not. It appears to have successfully flashed both variations of the bootloader to another Pro Micro I use without the resistors, but even after a second flash, your first all-in-one firmware didn't seem to function at all with a working F AT or XT. hid_listen searches endlessly and detects nothing, even after shorting reset to ground and/or pressing keys. The XT-specific firmware seemed to do the same. Flashing back to Soarer's firmware instantly restores functionality.

Offline hasu

  • Thread Starter
  • Posts: 3086
  • Location: Tokyo, Japan
  • @tmk
    • tmk keyboard firmware project
Re: [REQUEST FOR TEST] TMK IBM PC Keyboard Converter
« Reply #28 on: Fri, 06 March 2020, 18:48:38 »
Maledicted, Thanks for the test.
Hmm, I don't see why it fails, we are missing something perhaps. I like to see feedback from others.


It would be really helpful if someone else can test.
Please  check the first post and this.
https://geekhack.org/index.php?topic=103648.msg2871066#msg2871066

Thanks
TMK products:HHKB Alt  ⌨ConvertersAlps64FC660C AltFC980C Alt

Online Maledicted

  • Posts: 1031
  • Location: Wisconsin, United States
Re: [REQUEST FOR TEST] TMK IBM PC Keyboard Converter
« Reply #29 on: Sun, 08 March 2020, 23:11:05 »
Maledicted, Thanks for the test.
Hmm, I don't see why it fails, we are missing something perhaps. I like to see feedback from others.


It would be really helpful if someone else can test.
Please  check the first post and this.
https://geekhack.org/index.php?topic=103648.msg2871066#msg2871066

Thanks

Any time, hasu. You're doing great things for this community. I could try the updated firmware with he DC-2014 as well, if you like, maybe as a control. I also have ... a lot of other old XT and AT protocol boards now. NEC, Samsung, Zenith, etc, though I imagine the beige label Z-150 isn't even on your radar, and most of the rest are probably similarly functional to anything else that cloned the AT protocol.

Offline ivanthetolerable

  • Posts: 10
Re: [REQUEST FOR TEST] TMK IBM PC Keyboard Converter
« Reply #30 on: Thu, 12 March 2020, 10:27:53 »
Currently working on my F122. Using AutoHotkey to create layers of macros

Online Maledicted

  • Posts: 1031
  • Location: Wisconsin, United States
Re: [REQUEST FOR TEST] TMK IBM PC Keyboard Converter
« Reply #31 on: Thu, 12 March 2020, 10:32:23 »
Currently working on my F122. Using AutoHotkey to create layers of macros

Which controller are you using? Which resistors, if any? How are you flashing? I wonder if I should pick up an authentic Teensy or two. I don't own an F122, but you would think the protocol would be be close enough to the standard XT.

That's a great username by the way, and a cool F122. Is that a GBC LCD cover/sticker? I'm using one of those same Optiplexes as an HTPC at the moment.
« Last Edit: Thu, 12 March 2020, 10:36:04 by Maledicted »

Offline ivanthetolerable

  • Posts: 10
Re: [REQUEST FOR TEST] TMK IBM PC Keyboard Converter
« Reply #32 on: Thu, 12 March 2020, 10:55:47 »
Currently working on my F122. Using AutoHotkey to create layers of macros

Which controller are you using? Which resistors, if any? How are you flashing? I wonder if I should pick up an authentic Teensy or two. I don't own an F122, but you would think the protocol would be be close enough to the standard XT.

That's a great username by the way, and a cool F122. Is that a GBC LCD cover/sticker? I'm using one of those same Optiplexes as an HTPC at the moment.

I'm just using a standard Teensy 2.0. I tried it on my F XT with no issues too.

The GBC is the cover I took off when I replaced the screen with a backlight LCD and glass protector. Didn't want to throw it out.. This Optiplex is just a standard work machine.

Online Maledicted

  • Posts: 1031
  • Location: Wisconsin, United States
Re: [REQUEST FOR TEST] TMK IBM PC Keyboard Converter
« Reply #33 on: Thu, 12 March 2020, 12:17:07 »
Currently working on my F122. Using AutoHotkey to create layers of macros

Which controller are you using? Which resistors, if any? How are you flashing? I wonder if I should pick up an authentic Teensy or two. I don't own an F122, but you would think the protocol would be be close enough to the standard XT.

That's a great username by the way, and a cool F122. Is that a GBC LCD cover/sticker? I'm using one of those same Optiplexes as an HTPC at the moment.

I'm just using a standard Teensy 2.0. I tried it on my F XT with no issues too.

The GBC is the cover I took off when I replaced the screen with a backlight LCD and glass protector. Didn't want to throw it out.. This Optiplex is just a standard work machine.

Resistor configuration? What steps did you follow to flash? I really should get a Teensy then and see if the problem is with my using Pro Micros.

Those backlight mods are tempting. I still have my atomic purple GBC I got for Pokemon Red version when it came out.

Sure, it is just a standard work machine, which is nice. Business class desktops last literally forever, and even LGA 1155 i3s are more than enough for 99% of all tasks. Nice and easy to take apart and work in too.

Offline ivanthetolerable

  • Posts: 10
Re: [REQUEST FOR TEST] TMK IBM PC Keyboard Converter
« Reply #34 on: Thu, 12 March 2020, 13:01:52 »
Currently working on my F122. Using AutoHotkey to create layers of macros

Which controller are you using? Which resistors, if any? How are you flashing? I wonder if I should pick up an authentic Teensy or two. I don't own an F122, but you would think the protocol would be be close enough to the standard XT.

That's a great username by the way, and a cool F122. Is that a GBC LCD cover/sticker? I'm using one of those same Optiplexes as an HTPC at the moment.

I'm just using a standard Teensy 2.0. I tried it on my F XT with no issues too.

The GBC is the cover I took off when I replaced the screen with a backlight LCD and glass protector. Didn't want to throw it out.. This Optiplex is just a standard work machine.

Resistor configuration? What steps did you follow to flash? I really should get a Teensy then and see if the problem is with my using Pro Micros.

Those backlight mods are tempting. I still have my atomic purple GBC I got for Pokemon Red version when it came out.

Sure, it is just a standard work machine, which is nice. Business class desktops last literally forever, and even LGA 1155 i3s are more than enough for 99% of all tasks. Nice and easy to take apart and work in too.

I didn't use any resisters. Just a stanard Teensy and this guide. Before I used this https://geekhack.org/index.php?topic=17458.0

Offline hasu

  • Thread Starter
  • Posts: 3086
  • Location: Tokyo, Japan
  • @tmk
    • tmk keyboard firmware project
Re: [REQUEST FOR TEST] TMK IBM PC Keyboard Converter
« Reply #35 on: Thu, 12 March 2020, 17:35:59 »
Currently working on my F122. Using AutoHotkey to create layers of macros

Which controller are you using? Which resistors, if any? How are you flashing? I wonder if I should pick up an authentic Teensy or two. I don't own an F122, but you would think the protocol would be be close enough to the standard XT.

That's a great username by the way, and a cool F122. Is that a GBC LCD cover/sticker? I'm using one of those same Optiplexes as an HTPC at the moment.

I'm just using a standard Teensy 2.0. I tried it on my F XT with no issues too.

The GBC is the cover I took off when I replaced the screen with a backlight LCD and glass protector. Didn't want to throw it out.. This Optiplex is just a standard work machine.

ivanthetolerable,
Great. Thank you.
Can you share model nubmer for your  "F XT" and "F122" so that I'll update first post?


Maledicted,
I believe *decent* ProMicro should work and the converter doesn't require Teensy.

EDIT: ProMicro has several variants of pcb design and there are many clones by small vendors in the market, though. I believe SparkFun's should work at least.
https://www.sparkfun.com/products/12640

But we may miss something, I'll get ProMicro to test this firmware. What is source(site or URL) of your ProMicro so that I get same as yours?
Also can you post some pics of your ProMicro and its wiring, I can find something perhaps?



And I'll work on TMK keymap editor for this converter once I can believe it works well after getting some more reports.
« Last Edit: Thu, 12 March 2020, 17:52:39 by hasu »
TMK products:HHKB Alt  ⌨ConvertersAlps64FC660C AltFC980C Alt

Online Maledicted

  • Posts: 1031
  • Location: Wisconsin, United States
Re: [REQUEST FOR TEST] TMK IBM PC Keyboard Converter
« Reply #36 on: Fri, 13 March 2020, 07:29:17 »
I believe I have only used these, which have worked perfectly with Soarer's firmware:

KeeYees Pro Micro ATmega32U4 5V 16MHz Micro USB Development Board Module Microcontroller for Arduino IDE Leonardo Bootloader (Pack of 3pcs)

I can get pictures after work today. They shouldn't look out of the ordinary though. Wouldn't surprise me if it is just the controllers, they're pretty cheap. lol

I did order some real Teensy 2.0s, with headers. I already have some Dupont wires lying around, so I might try to set up something modular, but semi-permanent for this stuff. Could even swap different controllers in then too I suppose. Might eventually pick up one of those Sparkfun Pro Micros to try too.

Do you ever plan on supporting the beige label Zenith Z-150. It doesn't work with the vast majority of computers with ps/2 ports, and doesn't work at all with Soarer's firmware. I found only one computer, out of 4 or 5 I tested, that had 100% function with it.
« Last Edit: Fri, 13 March 2020, 08:34:48 by Maledicted »

Offline ivanthetolerable

  • Posts: 10
Re: [REQUEST FOR TEST] TMK IBM PC Keyboard Converter
« Reply #37 on: Fri, 13 March 2020, 07:54:04 »
Currently working on my F122. Using AutoHotkey to create layers of macros

Which controller are you using? Which resistors, if any? How are you flashing? I wonder if I should pick up an authentic Teensy or two. I don't own an F122, but you would think the protocol would be be close enough to the standard XT.

That's a great username by the way, and a cool F122. Is that a GBC LCD cover/sticker? I'm using one of those same Optiplexes as an HTPC at the moment.

I'm just using a standard Teensy 2.0. I tried it on my F XT with no issues too.

The GBC is the cover I took off when I replaced the screen with a backlight LCD and glass protector. Didn't want to throw it out.. This Optiplex is just a standard work machine.

ivanthetolerable,
Great. Thank you.
Can you share model nubmer for your  "F XT" and "F122" so that I'll update first post?


Maledicted,
I believe *decent* ProMicro should work and the converter doesn't require Teensy.

EDIT: ProMicro has several variants of pcb design and there are many clones by small vendors in the market, though. I believe SparkFun's should work at least.
https://www.sparkfun.com/products/12640

But we may miss something, I'll get ProMicro to test this firmware. What is source(site or URL) of your ProMicro so that I get same as yours?
Also can you post some pics of your ProMicro and its wiring, I can find something perhaps?



And I'll work on TMK keymap editor for this converter once I can believe it works well after getting some more reports.

F XT is 4584656
f 122 is 6110344

Offline ivanthetolerable

  • Posts: 10
Re: [REQUEST FOR TEST] TMK IBM PC Keyboard Converter
« Reply #38 on: Wed, 18 March 2020, 12:20:59 »
One thing I have noticed while using this firmware for the last week is that it often up and doesn't detect my keypresses, or will randomly send a different key. This doesn't happen on my other Model F using Soarers firmware on the same Teensy. Has anyone else noticed this?

Online Maledicted

  • Posts: 1031
  • Location: Wisconsin, United States
Re: [REQUEST FOR TEST] TMK IBM PC Keyboard Converter
« Reply #39 on: Wed, 18 March 2020, 12:28:57 »
I think I posted about that earlier on, in the few cases in which I had the F XT ... somewhat functional, but that was with a generic Chinesium Pro Micro as well. At some point my F AT and Leading Edge DC-2014 were working perfectly, but I certainly didn't use them as long as you have continuously. I do have some Teensies now. I do still plan to flash one and see how that goes with my boards. I just haven't gotten around to it.

Offline hasu

  • Thread Starter
  • Posts: 3086
  • Location: Tokyo, Japan
  • @tmk
    • tmk keyboard firmware project
Re: [REQUEST FOR TEST] TMK IBM PC Keyboard Converter
« Reply #40 on: Thu, 19 March 2020, 01:05:29 »
ivanthetolerable,
The issue happens on F XT only, or both XT and 122?
Does your converter has pull up resistors? This is not root cause  probably but it may help a bit.

Maledicted,
Good to hear that It works with F AT now, it is what I expected with my fix.



I think AT protocol(AT, PS/2 and Terminal keyoards) part works as expected now.

As for XT protocol the converter has had serious problem with IBM XT keyboard.
To support various XT keyobards including IBM XT and clones, the converter should read signal(start bit) at exact timing, within a few micro second.
I guess USB interrupt can prevent this, perhaps. I'll look into.
TMK products:HHKB Alt  ⌨ConvertersAlps64FC660C AltFC980C Alt

Online Maledicted

  • Posts: 1031
  • Location: Wisconsin, United States
Re: [REQUEST FOR TEST] TMK IBM PC Keyboard Converter
« Reply #41 on: Thu, 19 March 2020, 08:11:20 »
ivanthetolerable,
The issue happens on F XT only, or both XT and 122?
Does your converter has pull up resistors? This is not root cause  probably but it may help a bit.

Maledicted,
Good to hear that It works with F AT now, it is what I expected with my fix.



I think AT protocol(AT, PS/2 and Terminal keyoards) part works as expected now.

As for XT protocol the converter has had serious problem with IBM XT keyboard.
To support various XT keyobards including IBM XT and clones, the converter should read signal(start bit) at exact timing, within a few micro second.
I guess USB interrupt can prevent this, perhaps. I'll look into.

I actually haven't tested it again since I bricked that one Pro Micro. I just know the F AT did work at some point, conditionally, with the old firmware. I need to rig up one of those Teensies still.

Offline hasu

  • Thread Starter
  • Posts: 3086
  • Location: Tokyo, Japan
  • @tmk
    • tmk keyboard firmware project
Re: [REQUEST FOR TEST] TMK IBM PC Keyboard Converter
« Reply #42 on: Sun, 22 March 2020, 07:38:05 »
ivanthetolerable, Maledicted or someone else,
Could you try new firmware with IBM XT keyboard?

With the latest fix I removed USB related intterupt routine that can interfere XT signal handling.

https://raw.githubusercontent.com/tmk/tmk_keyboard/master/converter/ibmpc_usb/binary/ibmpc_usb_atmega32u4.hex

hid_listen output would be helpful for me when you find glitch with the converter.
TMK products:HHKB Alt  ⌨ConvertersAlps64FC660C AltFC980C Alt

Online Maledicted

  • Posts: 1031
  • Location: Wisconsin, United States
Re: [REQUEST FOR TEST] TMK IBM PC Keyboard Converter
« Reply #43 on: Mon, 23 March 2020, 18:57:20 »
ivanthetolerable, Maledicted or someone else,
Could you try new firmware with IBM XT keyboard?

With the latest fix I removed USB related intterupt routine that can interfere XT signal handling.

https://raw.githubusercontent.com/tmk/tmk_keyboard/master/converter/ibmpc_usb/binary/ibmpc_usb_atmega32u4.hex

hid_listen output would be helpful for me when you find glitch with the converter.

I finally stopped being lazy and made a completely modular setup including a Teensy 2.0. Through the use of a lot of dupont connectors and some quick and dirty modification of a breadboard, I can quickly connect or disconnect the XT reset wire and quickly connect or disconnect the pull-up resistors to clock and data, and even swap the Teensy out entirely should I brick it.

The IBM F XT seemed to work immediately. For whatever reason, the IBM F AT did not work at all until I pulled the resistors and reset line. After I reconnected the reset line, it started working. I added the resistors back in, and it continued to work. That could (maybe) just come down to how impermanent my setup is. The DC-2014 seemed to have perfect function immediately as well. Alas, nothing works with my beige label Zenith Z-150 still. I figured maybe using an authentic Teensy had a shot, but it doesn't work with TMK or Soarer's firmware.

I am typing this from my F XT at this very moment. Are there any other weird old boards you would like tested in particular?

I did save the results of HID_listen when pressing the a, s, d, and f keys when the F AT keyboard wasn't working, if that would at all be helpful. You'll find it attached.
« Last Edit: Mon, 23 March 2020, 19:53:18 by Maledicted »

Offline hasu

  • Thread Starter
  • Posts: 3086
  • Location: Tokyo, Japan
  • @tmk
    • tmk keyboard firmware project
Re: [REQUEST FOR TEST] TMK IBM PC Keyboard Converter
« Reply #44 on: Tue, 24 March 2020, 04:36:38 »
Thanks for your support!

The IBM F XT seemed to work immediately.

It will have to be tested on F XT for long period to check the issue reported by ivanthetolerable, which may be intermittent.
https://geekhack.org/index.php?action=profile;u=76741



Quote
For whatever reason, the IBM F AT did not work at all until I pulled the resistors and reset line. After I reconnected the reset line, it started working. I added the resistors back in, and it continued to work. That could (maybe) just come down to how impermanent my setup is.

Let me know if you find something on this.



Quote
The DC-2014 seemed to have perfect function immediately as well.
Great.



Quote
Alas, nothing works with my beige label Zenith Z-150 still. I figured maybe using an authentic Teensy had a shot, but it doesn't work with TMK or Soarer's firmware.


Doesn't hid_listen show anything?

Beige label  Zenith Z-150 really looks odd for AT keyboard according to people's experiences.
https://github.com/tmk/tmk_keyboard/wiki/IBM-PC-AT-Keyboard-Protocol#whitebeige-label-zenith-z-150

Debugging this without seeing its actual signals would be really difficult. It would be helpful if you can try Soarer's Logic Analyzer on the board.
https://deskthority.net/viewtopic.php?f=7&t=4567



Quote
I am typing this from my F XT at this very moment. Are there any other weird old boards you would like tested in particular?

Black label Z-150 XT keyboard.
I'll post in deskthority thread some later if anyone doesn't  appear with it here.

https://deskthority.net/viewtopic.php?f=2&t=12972&start=30
« Last Edit: Wed, 29 April 2020, 02:26:13 by hasu »
TMK products:HHKB Alt  ⌨ConvertersAlps64FC660C AltFC980C Alt

Online Maledicted

  • Posts: 1031
  • Location: Wisconsin, United States
Re: [REQUEST FOR TEST] TMK IBM PC Keyboard Converter
« Reply #45 on: Tue, 24 March 2020, 19:20:24 »
Thanks for your support!

I have said it before, but any time hasu. You're doing a lot of really great things for this community.

The IBM F XT seemed to work immediately.

It will have to be tested on F XT for long period to check the issue reported by ivanthetolerable, which may be intermittent.
https://geekhack.org/index.php?action=profile;u=76741

Oh man, you mean I have to try to type with the XT format for an extended period? I'll try.

For whatever reason, the IBM F AT did not work at all until I pulled the resistors and reset line. After I reconnected the reset line, it started working. I added the resistors back in, and it continued to work. That could (maybe) just come down to how impermanent my setup is.

Let me know if you find something on this.


I'll keep messing with it and see if I can reproduce it. I did try once more just now and it seems to work normally, so maybe one of the dupont connectors was just loose.

Alas, nothing works with my beige label Zenith Z-150 still. I figured maybe using an authentic Teensy had a shot, but it doesn't work with TMK or Soarer's firmware.


Doesn't hid_listen show anything?

Beige label  Zenith Z-150 really looks odd for AT keyboard according to people's experiences.
https://github.com/tmk/tmk_keyboard/wiki/IBM-PC-AT-Keyboard-Protocol/_edit#whitebeige-label-zenith-z-150

Debugging this without seeing its actual signals would be really difficult. It would be helpful if you can try Soarer's Logic Analyzer on the board.
https://deskthority.net/viewtopic.php?f=7&t=4567

Well, I flashed the proper firmware and attempted to run scla. It errored out just saying that MFC71.dll was missing. This is apparently a file used by Visual Studio 2003, which is, by now, ancient. The internet suggests that Internet Explorer also uses it, which seems to still be functional on my Windows 10 system, but even installing the latest community release of Visual Studio doesn't seem to resolve that error. I'm hesitant to start going around and finding VS 2003 installers, or manually downloading the dll and throwing it into System 32. Any ideas? I might have a Windows 7 system somewhere still to try with, otherwise I could even dig out my first desktop computer. I'm pretty sure that thing has an IDE/PATA hard drive in it with Windows XP installed on it. lol


I am typing this from my F XT at this very moment. Are there any other weird old boards you would like tested in particular?

Black label Z-150 XT keyboard.
I'll post in deskthority thread some later if anyone doesn't  appear with it here.

https://deskthority.net/viewtopic.php?f=2&t=12972&start=30

I don't have one of those, unfortunately. There was a guy a while back asking for help getting his working in another thread. It sounded like he eventually gave up instead of taking the effort to properly configure a controller with TMK. I do wish he would have given the board to somebody that would cooperate with you. Maybe I could find him and ask if he'll sell.

Offline Rayndalf

  • Posts: 280
Re: [REQUEST FOR TEST] TMK IBM PC Keyboard Converter
« Reply #46 on: Tue, 31 March 2020, 18:19:45 »
I recently picked up a K151L on ebay (previously I'd bought what was left of one after a harvesting on Mechmarket)

I thought about just handwiring both, but after cleaning the complete one I found it has in switch diodes, so I'm eager to convert it (and get a new badge made). I'll give this convertor a shot and see (just need to buy a female DIN plug).

Online Maledicted

  • Posts: 1031
  • Location: Wisconsin, United States
Re: [REQUEST FOR TEST] TMK IBM PC Keyboard Converter
« Reply #47 on: Wed, 01 April 2020, 08:35:39 »
I recently picked up a K151L on ebay (previously I'd bought what was left of one after a harvesting on Mechmarket)

I thought about just handwiring both, but after cleaning the complete one I found it has in switch diodes, so I'm eager to convert it (and get a new badge made). I'll give this convertor a shot and see (just need to buy a female DIN plug).

Take a good look at the solder pads for the switches on the one somebody harvested the switches from and make sure they're intact if you plan on using it. Literally the only board I have ever lifted a pad on was a K151L, and I have been doing soldering for years, and have a proper temperature-controlled iron. Those PCBs are really shoddy, as much as I love those boards. They are AT/XT switchable, so you should be able to just use a 5-pin din to ps2 adapter with a modern computer, though I imagine that TMK will work (it has worked with every AT clone I have tried, besides the beige label Zenith Z-150), and I know that Soarer's firmware will work with them.

With the one I did a switch swap on, I ended up having to replace most of the diodes because the legs on the originals had rusted. With the box jades I chose to replace the "vintage" blacks, the diodes fit nicely within the switch housing.

Offline Rayndalf

  • Posts: 280
Re: [REQUEST FOR TEST] TMK IBM PC Keyboard Converter
« Reply #48 on: Wed, 01 April 2020, 14:00:37 »
The one I got in parts may have had a toggle switch for protocol, but the new one didn't work with a passive 5 pin Din to 6 pin mini Din + active ps/2 to usb converter which works with my other boards, so either its XT only (as the label somewhat suggests) or there is already a lifted pad.

Unitek/Unitech is a strange company who recycled model numbers and changed their logo to most closely match the particular product they were cloning (they started cloning Macs and now they make hearing aids?), so nothing would surprise me.

Online Maledicted

  • Posts: 1031
  • Location: Wisconsin, United States
Re: [REQUEST FOR TEST] TMK IBM PC Keyboard Converter
« Reply #49 on: Wed, 01 April 2020, 14:35:04 »
The one I got in parts may have had a toggle switch for protocol, but the new one didn't work with a passive 5 pin Din to 6 pin mini Din + active ps/2 to usb converter which works with my other boards, so either its XT only (as the label somewhat suggests) or there is already a lifted pad.

Unitek/Unitech is a strange company who recycled model numbers and changed their logo to most closely match the particular product they were cloning (they started cloning Macs and now they make hearing aids?), so nothing would surprise me.

You have one with no AT/XT switch? The chassis and layout are identical otherwise? I didn't know they made any XT-only ones. You learn something every day. I fixed the pad I lifted with a scrap bit of the excess cut from the diode legs that I soldered between the trace and the switch leg, just something to look out for.

My K151L did work with TMK in XT mode, so I imagine that your oddball one will too? I guess we'll see.

Offline Rayndalf

  • Posts: 280
Re: [REQUEST FOR TEST] TMK IBM PC Keyboard Converter
« Reply #50 on: Wed, 01 April 2020, 15:09:21 »
I don't have my disassembled one on hand, but comparing the rear labels it (from an old time stamp) to my complete one and they appear to be different revisions.
http://imgur.com/a/2aZwdgY

I have yet to receive one that still has a front sticker/badge, I assume Unitek worked as an OEM and various other companies could slap their own logo on top, but I'm going to try to get some metal badges made and need some inspiration.

Sorry for derailing this thread, I'm ordering some DIN sockets  and will get a convertor made whenever they can arrive.

Online Maledicted

  • Posts: 1031
  • Location: Wisconsin, United States
Re: [REQUEST FOR TEST] TMK IBM PC Keyboard Converter
« Reply #51 on: Wed, 01 April 2020, 15:22:13 »
I don't have my disassembled one on hand, but comparing the rear labels it (from an old time stamp) to my complete one and they appear to be different revisions.
http://imgur.com/a/2aZwdgY

I have yet to receive one that still has a front sticker/badge, I assume Unitek worked as an OEM and various other companies could slap their own logo on top, but I'm going to try to get some metal badges made and need some inspiration.

Sorry for derailing this thread, I'm ordering some DIN sockets  and will get a convertor made whenever they can arrive.

Cool, it is in really good shape too.

I have never seen one with a sticker or badge at all myself, lol. I wonder if they designed the case and already had the tooling and just went, "... eh, screw it." If you get any badges made, I would love to hear about it, and maybe get in on that order. You could try to recreate IBM's metal badges. It looks close enough to an F AT for it to fit in well enough.

Offline hasu

  • Thread Starter
  • Posts: 3086
  • Location: Tokyo, Japan
  • @tmk
    • tmk keyboard firmware project
Re: [REQUEST FOR TEST] TMK IBM PC Keyboard Converter
« Reply #52 on: Sat, 11 April 2020, 05:24:57 »
Keymap Editor is available here now.

http://www.tmk-kbd.com/tmk_keyboard/editor/#ibmpc_usb

Report when you try this firmware with your keyboard.  Check first post.
TMK products:HHKB Alt  ⌨ConvertersAlps64FC660C AltFC980C Alt

Online Maledicted

  • Posts: 1031
  • Location: Wisconsin, United States
Re: [REQUEST FOR TEST] TMK IBM PC Keyboard Converter
« Reply #53 on: Mon, 13 April 2020, 12:05:10 »
Keymap Editor is available here now.

http://www.tmk-kbd.com/tmk_keyboard/editor/#ibmpc_usb

Report when you try this firmware with your keyboard.  Check first post.

Awesome. I'll take a look at it. I have used the F XT as much as I can stomach and can't say that any typing errors have been the result of your firmware. I thought so at first, but I think all of that has been me missing the oddly-placed and stepped modifiers, so far.

Offline PancakeMSTR

  • Posts: 484
Re: [REQUEST FOR TEST] TMK IBM PC Keyboard Converter
« Reply #54 on: Mon, 13 April 2020, 14:17:16 »
Hasu

I just gave this a try with my Northgate Omnikey Ps2. It's almost working perfectly, but I've identified two strange items. Specifically, the 'F11' and 'RALT' keys don't seem to want to fire:

239827-0

I'm not entirely sure why this would be. It could honestly be an issue with my keyboard. I'm getting RALT to fire intermittently by pressing down on it really hard.

Other than that, looks good!

« Last Edit: Mon, 13 April 2020, 14:23:19 by PancakeMSTR »
   

Offline EspritBerlin

  • Posts: 12
Re: [REQUEST FOR TEST] TMK IBM PC Keyboard Converter // 126 key G80-2551
« Reply #55 on: Tue, 21 April 2020, 13:51:31 »
Keymap Editor is available here now.

http://www.tmk-kbd.com/tmk_keyboard/editor/#ibmpc_usb

Report when you try this firmware with your keyboard.  Check first post.

Thanks!

A would like to ask you and the community advise how to re-map a 126 key G80-2551. Is has 4 additional keys around the nav cluster, so the 122 key layout would not work I assume. Referring to https://deskthority.net/wiki/Cherry_G80-2551 it is said that "[the] 4 extra keys which send a NULL before the key codes of 1 2 3 and 4 which means that these keys are useless on computers using the PS/2 protocol."

Any help and hints are very, very welcome before I start working on that board.

Thank you all in advance!  :thumb:

Offline hasu

  • Thread Starter
  • Posts: 3086
  • Location: Tokyo, Japan
  • @tmk
    • tmk keyboard firmware project
Re: [REQUEST FOR TEST] TMK IBM PC Keyboard Converter
« Reply #56 on: Tue, 21 April 2020, 18:26:35 »
Thanks!

A would like to ask you and the community advise how to re-map a 126 key G80-2551. Is has 4 additional keys around the nav cluster, so the 122 key layout would not work I assume. Referring to https://deskthority.net/wiki/Cherry_G80-2551 it is said that "[the] 4 extra keys which send a NULL before the key codes of 1 2 3 and 4 which means that these keys are useless on computers using the PS/2 protocol."

Any help and hints are very, very welcome before I start working on that board.

Thank you all in advance!  :thumb:


Use Full-key layout instead of 122-key Keymap Editor can support up to 128 keys at same time. It is different from the keyboard layout and not intuitive for the keyboard, though, you should still remmap all keys with Full-key layout.

Download firmware without editting keys when you test first, though.

I can't understand exactly what the wiki says, especially "before the keycodes of 1 2 3 and 4" part. What does the "1 2 3 and 4" mean?  I may be missing something, it would be helpful if you or someone can rephrase.

Try the firmware with default layout and see if the four keys resister something on computer. If not, use 'hid_listen' tool to see raw scan codes the keyboard spits out, so that I can update firmware for the keys if needed.

Let us know your result.


TMK products:HHKB Alt  ⌨ConvertersAlps64FC660C AltFC980C Alt

Offline EspritBerlin

  • Posts: 12
Re: [REQUEST FOR TEST] TMK IBM PC Keyboard Converter // 126 key G80-2551
« Reply #57 on: Fri, 24 April 2020, 12:54:29 »
Dear All

First: a very big thanks to hasu for pointing me to 'ibmpc_usb_at90usb1286.hex' (https://raw.githubusercontent.com/tmk/tmk_keyboard/master/converter/ibmpc_usb/binary/ibmpc_usb_at90usb1286.hex) to be able to use the G80-2551 with a Teensy 2++.

The "regular" 122 keys work perfectly. (I would like to arrange some keys - later).

I used hid_listen to check the scan codes for the 4 extra keys around the nav cluster (see attached pic);
for the first one "TD=" (10 o'clock in the pic) I get:

r80 !CS2_INIT!
I45570 X46071 r26 W46072 r80 W46074 rF0 W46076 R46076 wF2 rFA rAB r86 ID:AB86(2)
S46083 wED rFA w02 rFA L46090 3r26 333333333333333333333333333333333333333333

for the second "page with edge":

r80 !CS2_INIT!
I61468 X61969 r25 W61970 r80 W61972 rF0 W61974 R61975 wF2 rFA rAB r86 ID:AB86(2)
S61981 wED rFA w02 rFA L61988 4r25 44444444444444444444444444444

for the third "two pages (1/2)":

r80 !CS2_INIT!
I10585 X11087 r16 W11088 r80 W11090 rF0 W11092 R11092 wF2 rFA rAB r86 ID:AB86(2)
S11099 wED rFA w02 rFA L11106 r16 11111111111

for the forth "calc":

r80 !CS2_INIT!
I17872 X18374 r1E W18375 r80 W18377 rF0 W18379 R18380 wF2 rFA rAB r86 ID:AB86(2)
S18386 wED rFA w02 rFA L18394 r1E 22222222222222222222222222222222222

After every key press the 1s, 2s, 3s, and 4s repeat endless until I press another key.

(Just in case: here the output after I pressed qwertzuiop which behaves normal on the keyboard:
r15 qrF0 r15 r1D wrF0 r1D re24 rF0 r24 rr2D rF0 r2D r2Ct rF0 r2C r35 zrF0 r35 r3C urF0 r3C r43 irF0 r43 ro44 rF0 r44 r4D prF0 r4D)

It would be great if the 4 extra keys could be used and mapped.

Best, EspritBerlin

Offline hasu

  • Thread Starter
  • Posts: 3086
  • Location: Tokyo, Japan
  • @tmk
    • tmk keyboard firmware project
Re: [REQUEST FOR TEST] TMK IBM PC Keyboard Converter
« Reply #58 on: Fri, 24 April 2020, 20:52:10 »
EspritBerlin,

That hid_listen log is very helpful to add support of the extra keys.
The keyboard seem to send codes in Scan Code Set 2 like below for the keys.

TD=: 80, 26 / 80, F0, 26
page with edge: 80, 25 / 80, F0, 25
two pages: 80, 16 / 80, F0, 16
calc: 80, 1E / 80, F0, 1E

I added some codes to support the four extra keys. Try attached hex file and can you post hid_listen output again? They should not repeat key any more.

The keys are assigned to Japanese specific keys and Mute by default. This is because of compatibitly for other terminal keyboards. (You can remap the keys with editor later after I add support.)

Also check the keys with xev assuming you are on Linux. Your OS may not recognize the Japanese keys, perhaps.

* ibmpc_usb_at90usb1286.hex (54.2 kB - downloaded 8 times.)
TMK products:HHKB Alt  ⌨ConvertersAlps64FC660C AltFC980C Alt

Offline EspritBerlin

  • Posts: 12
Re: [REQUEST FOR TEST] TMK IBM PC Keyboard Converter
« Reply #59 on: Sat, 25 April 2020, 01:44:34 »
Dear Hasu

Thanks for the new hex file! It works:

hid_listen reports:

TD=: r80 r26 r80 rF0 r26
page with edge: r80 r25 r80 rF0 r25
two pages: r80 r16 r80 rF0 r16
calc: r80 r1E r80 rF0 r1E

There is no repetition anymore; as you assumed, 'page with edge' does mute/unmute, the other three keys nothing so far, given that I use German keyboard layout.

xev reports:

TD=:

KeyPress event, serial 38, synthetic NO, window 0x5800001,
    root 0x1da, subw 0x0, time 792293, (-469,195), root:(392,650),
    state 0x10, keycode 132 (keysym 0x0, NoSymbol), same_screen YES,
    XLookupString gives 0 bytes:
    XmbLookupString gives 0 bytes:
    XFilterEvent returns: False

Page with edge:
FocusOut event, serial 39, synthetic NO, window 0x5800001,
    mode NotifyGrab, detail NotifyAncestor

FocusIn event, serial 39, synthetic NO, window 0x5800001,
    mode NotifyUngrab, detail NotifyAncestor

KeymapNotify event, serial 39, synthetic NO, window 0x0,
    keys:  2   0   0   0   0   0   0   0   0   0   0   0   0   0   0   0   
           0   0   0   0   0   0   0   0   0   0   0   0   0   0   0   0 

Note: in the sequence above, "keys: 2  0  0.." I got sometimes on the first keypress also 75, 419, after that always 2.

Two pages:
KeyPress event, serial 38, synthetic NO, window 0x5800001,
    root 0x1da, subw 0x0, time 1032317, (-297,-49), root:(564,406),
    state 0x10, keycode 97 (keysym 0x0, NoSymbol), same_screen YES,
    XLookupString gives 0 bytes:
    XmbLookupString gives 0 bytes:
    XFilterEvent returns: False

Calc:
KeyPress event, serial 38, synthetic NO, window 0x5800001,
    root 0x1da, subw 0x0, time 1121468, (-161,127), root:(700,582),
    state 0x10, keycode 101 (keysym 0xff27, Hiragana_Katakana), same_screen YES,
    XLookupString gives 0 bytes:
    XmbLookupString gives 0 bytes:
    XFilterEvent returns: False

Best, EspritBerlin

Offline hasu

  • Thread Starter
  • Posts: 3086
  • Location: Tokyo, Japan
  • @tmk
    • tmk keyboard firmware project
Re: [REQUEST FOR TEST] TMK IBM PC Keyboard Converter
« Reply #60 on: Sat, 25 April 2020, 05:06:51 »
Great. It seems to work as I expected.
And xev recognizes the four keys somehow but Xorg doesn't seems to have useful keymapping for them by default. You will have to remap the keys on Keymap Editor.

OK. I'll work on Keymap Editor for the extra keys and some other keys specific to the keyboard.

Could you look into scan codes for 10 function keys on left cluster,  6 keys above cusors key and 'Linie' keys?
You can use hid_listen again as you did in previous post. This would be helpful to make reasonable layout of Keymap Editor.

Thanks,
TMK products:HHKB Alt  ⌨ConvertersAlps64FC660C AltFC980C Alt

Offline EspritBerlin

  • Posts: 12
Re: [REQUEST FOR TEST] TMK IBM PC Keyboard Converter
« Reply #61 on: Sat, 25 April 2020, 06:17:23 »
Great. It seems to work as I expected.
And xev recognizes the four keys somehow but Xorg doesn't seems to have useful keymapping for them by default. You will have to remap the keys on Keymap Editor.

OK. I'll work on Keymap Editor for the extra keys and some other keys specific to the keyboard.

Could you look into scan codes for 10 function keys on left cluster,  6 keys above cusors key and 'Linie' keys?
You can use hid_listen again as you did in previous post. This would be helpful to make reasonable layout of Keymap Editor.

Thanks,

Please find the scan codes attached  :)

Offline eruizc

  • Posts: 1
Re: [REQUEST FOR TEST] TMK IBM PC Keyboard Converter
« Reply #62 on: Sat, 25 April 2020, 18:10:16 »
Hello everyone! I'm new to this, I'm amazed by your work but may need some insights on what to do now...
I've got a model M122 1390250 that is currently not working, this is what the hid_listen says:

Code: [Select]
Waiting for device:...
Listening:

TMK:fefe1028/LUFA

USB configured.

Keyboard start.
I458 X960
Device disconnected.
Waiting for new device:..........
Listening:

TMK:fefe1028/LUFA

USB configured

Keyboard start
I488 X989
Device disconnected.

I've noticed the keyboard has 8 switches at the back, done some research but I'm completely lost on them. The first try they were 11111110 and the second 00000001, because I read somewhere to try them like that.

What could I be missing here?

Offline hasu

  • Thread Starter
  • Posts: 3086
  • Location: Tokyo, Japan
  • @tmk
    • tmk keyboard firmware project
Re: [REQUEST FOR TEST] TMK IBM PC Keyboard Converter
« Reply #63 on: Sat, 25 April 2020, 19:49:48 »
eruizc,
Can you post pic of the switches for the future reference? I couldn't find it with my quick internet search.

I guess the switches cofigure part of keyboard ID and should be '0xBF'. Try below.
10111111
0100000
11111101
0000010

See Identity explanation on this page.
https://www.seasip.info/VintagePC/ibm_1390876.html

Also you better check if your converter work with other keyboard first.


EspritBerlin,
Thanks for the scan codes! I'm working on Keymap Editor and firmware for G80-2551 and will post when it is done.
TMK products:HHKB Alt  ⌨ConvertersAlps64FC660C AltFC980C Alt

Offline hasu

  • Thread Starter
  • Posts: 3086
  • Location: Tokyo, Japan
  • @tmk
    • tmk keyboard firmware project
Re: [REQUEST FOR TEST] TMK IBM PC Keyboard Converter
« Reply #64 on: Sun, 26 April 2020, 02:15:19 »
Can you try attached firmware?
Especially for 10 function keys on left and F13-F24 portion, check if they register anything in xev. It doesn't matter what those keys registers at this point.

Other keys are expected to register as below.

Quote

 * G80-2551(Code Set 2) Unimap default mapping                                                                     
 *               ,-----------------------------------------------.
 *               |Gui|Mhk|F23|Hnk|F13|F14|F15|F16|F17|F18|F19|F20|                                                 
 *               |-----------------------------------------------|
 *               | F1| F2| F3| F4| F5| F6| F7| F8| F9|F10|F11|F12|                                                 
 *               `-----------------------------------------------'
 * ,-------. ,-----------------------------------------------------------. ,-----------. ,---------------.         
 * |Mut|F24| |   |   |   |   |   |   |   |   |   |   |   |   |   |       | |  /|PgU|PgD| |Esc|NmL|ScL|  *|
 * |-------| |-----------------------------------------------------------| |-----------| |---------------|         
 * |VoU|Pau| |     |   |   |   |   |   |   |   |   |   |   |   |   |     | |End|Ins|Del| |   |   |   |  +|
 * |-------| |------------------------------------------------------`    | |-----------| |---------------|         
 * |VoD|F22| |      |   |   |   |   |   |   |   |   |   |   |   |   |    | |Yen|   |  #| |   |   |   |  -|
 * |-------| |-----------------------------------------------------------| |-----------| |---------------|         
 * |Psc|App| |    |   |   |   |   |   |   |   |   |   |   |   |          | |   |Hom|   | |   |   |   |   |
 * |-------| |-----------------------------------------------------------| |-----------| |-----------|Ent|         
 * |Gui|F21| |     |   |                                  |    |   |       | RO|   |KAN| |       |  .|   |
 * `-------' `-----'   `---------------------------------------'   `-----' `-----------' `---------------'         
 * 

* ibmpc_usb_at90usb1286.hex (54.78 kB - downloaded 7 times.)



Great. It seems to work as I expected.
And xev recognizes the four keys somehow but Xorg doesn't seems to have useful keymapping for them by default. You will have to remap the keys on Keymap Editor.

OK. I'll work on Keymap Editor for the extra keys and some other keys specific to the keyboard.

Could you look into scan codes for 10 function keys on left cluster,  6 keys above cusors key and 'Linie' keys?
You can use hid_listen again as you did in previous post. This would be helpful to make reasonable layout of Keymap Editor.

Thanks,

Please find the scan codes attached  :)
TMK products:HHKB Alt  ⌨ConvertersAlps64FC660C AltFC980C Alt

Offline EspritBerlin

  • Posts: 12
Re: [REQUEST FOR TEST] TMK IBM PC Keyboard Converter
« Reply #65 on: Sun, 26 April 2020, 03:32:06 »
I checked new firmware. I have serious trouble with repeating keys for the 10 function keys on the left.
Please see details attached.

I have not checked F1-F24 etc so far.

Can you try attached firmware?
Especially for 10 function keys on left and F13-F24 portion, check if they register anything in xev. It doesn't matter what those keys registers at this point.

Other keys are expected to register as below.


Offline hasu

  • Thread Starter
  • Posts: 3086
  • Location: Tokyo, Japan
  • @tmk
    • tmk keyboard firmware project
Re: [REQUEST FOR TEST] TMK IBM PC Keyboard Converter
« Reply #66 on: Sun, 26 April 2020, 04:30:25 »
Thanks for testing.

I think this fixes the problem.

* ibmpc_usb_at90usb1286.hex (54.83 kB - downloaded 9 times.)
TMK products:HHKB Alt  ⌨ConvertersAlps64FC660C AltFC980C Alt

Offline EspritBerlin

  • Posts: 12
Re: [REQUEST FOR TEST] TMK IBM PC Keyboard Converter
« Reply #67 on: Sun, 26 April 2020, 05:18:06 »
Thank you!

I tested the new firmware esp. regarding the repeating for the left 10 function keys.
It got better, but it seems that they only register about every second key press and get rarely into the repeating mode again.
Very left column of keys (labeled: Abruf=row1, PsAus=row2, ErAus=row3, Druck=row4, blank=row5) behave as follows:

Abruf (row1):sometimes toggles between mute and volume, fast repeating key presses lead to loop/repeating on/off vol

PsAus (row2): every 2nd to 3rd key press increases vol

ErAus (row 3): singe key press has no action, 3 fast key presses = vol - by auto repeat

Druck (row 4): print screen works without problems

blank (row 5): menu key loops/repeats (same as in my post before: pressing d leads to desktop); I can leave this loop only by unplugging Teensy from USB.

I added some information in the attached docs for the 5 keys.
Please let me know how I can help to investigate further.



Thanks for testing.

I think this fixes the problem.

(Attachment Link)

Offline hasu

  • Thread Starter
  • Posts: 3086
  • Location: Tokyo, Japan
  • @tmk
    • tmk keyboard firmware project
Re: [REQUEST FOR TEST] TMK IBM PC Keyboard Converter
« Reply #68 on: Sun, 26 April 2020, 06:14:06 »
I seems to have missed something to be cared for.
hope new firmware fixes the problems this time.

* ibmpc_usb_at90usb1286.hex (54.83 kB - downloaded 7 times.)
TMK products:HHKB Alt  ⌨ConvertersAlps64FC660C AltFC980C Alt

Offline EspritBerlin

  • Posts: 12
Re: [REQUEST FOR TEST] TMK IBM PC Keyboard Converter
« Reply #69 on: Sun, 26 April 2020, 08:34:52 »
The loops are gone! The firmware did not hung or crash once, no unexpected behavior!

I have tested the firmware and attached hid_listen output for
- 10 function keys (left)
- 24 F keys (top)
- nav cluster
- num pad (right)

For the 10 function keys I included xev, for the remaining keys I tested if xev output was given.

Since this layout opens the opportunity to move arrow keys to inverted T this would be a good option I think.
Please let me know if further testing/reporting is needed to support you.

Thanks, best, EspritBerlin

I seems to have missed something to be cared for.
hope new firmware fixes the problems this time.

(Attachment Link)

Offline hasu

  • Thread Starter
  • Posts: 3086
  • Location: Tokyo, Japan
  • @tmk
    • tmk keyboard firmware project
Re: [REQUEST FOR TEST] TMK IBM PC Keyboard Converter
« Reply #70 on: Sun, 26 April 2020, 10:06:30 »
EspritBerlin,

I updated Keymap Editor for G80-2551 support. You can acess it here.
http://www.tmk-kbd.com/tmk_keyboard/editor/unimap/?ibmpc_usb_1286_terminal

Keys are expected to register as below with default mapping. Function keys on left and top row are not straight
due to difference from IBM 122-key. Those keys can be remappable somehow, Editor is not intuitive though.

Try it and report if you find something weird.

Quote

 * G80-2551(Code Set 2) Unimap default mapping
 *               ,-----------------------------------------------.
 *               |Gui|Mhk|F23|Hnk|F13|F14|F15|F16|F17|F18|F19|F20|
 *               |-----------------------------------------------|
 *               | F1| F2| F3| F4| F5| F6| F7| F8| F9|F10|F11|F12|
 *               `-----------------------------------------------'
 * ,-------. ,-----------------------------------------------------------. ,-----------. ,---------------.
 * |Mut|F24| |   |   |   |   |   |   |   |   |   |   |   |   |   |       | |NmL|PgU|PgD| |Esc|ScL|  *|  /|
 * |-------| |-----------------------------------------------------------| |-----------| |---------------|
 * |VoU|Pau| |     |   |   |   |   |   |   |   |   |   |   |   |   |     | |End|Ins|Del| |   |   |   |  +|
 * |-------| |------------------------------------------------------`    | |-----------| |---------------|
 * |VoD|F22| |      |   |   |   |   |   |   |   |   |   |   |   |   |    | |Yen|   |  #| |   |   |   |  -|
 * |-------| |-----------------------------------------------------------| |-----------| |---------------|
 * |Psc|App| |    |   |   |   |   |   |   |   |   |   |   |   |          | |   |Hom|   | |   |   |   |   |
 * |-------| |-----------------------------------------------------------| |-----------| |-----------|Ent|
 * |Gui|F21| |     |   |                                  |    |   |       | RO|   |KAN| |       |  .|   |
 * `-------' `-----'   `---------------------------------------'   `-----' `-----------' `---------------'
 * JPY: JIS ¥
 * KAN: ひらがな
 * RO: JIS ろ(Japanese RO)
 * Hnk: 変換(Japanese Henkan)
 * Mhk: 無変換(Japanese MuHenkan)
TMK products:HHKB Alt  ⌨ConvertersAlps64FC660C AltFC980C Alt

Offline EspritBerlin

  • Posts: 12
Re: [REQUEST FOR TEST] TMK IBM PC Keyboard Converter
« Reply #71 on: Sun, 26 April 2020, 12:27:59 »
Hi Hasu

Thank you for all the work! I did work on the nav cluster, worked fine!
As you expected I am did not manage to do some changes to some keys. I attached an example (see hex and pic).
Num, nav, home, end, page up/down worked fine; new Esc (=1), insert (=2), three most right keys of num pad (=3) are resistant [all are mapped in the editor].
Furthermore gui assigment (last row, 10er fun keys) are resistant to change.

This is what his_listen reports for the 'new' keys
- ESC: r5F rF0 r5F
- insert: r1/7 rF0 r17
- old scl/new P/: r7E *rF0 r7E
- old */new Px: r7C -rF0 r7C
- old P() new P/: rE0 r4A ^[[2~rE0 rF0 r4A

Could you give me a hint how to change the behaviour of those 'strage' keys?

Thank you very much, best, EspritBerlin

EspritBerlin,

I updated Keymap Editor for G80-2551 support. You can acess it here.
http://www.tmk-kbd.com/tmk_keyboard/editor/unimap/?ibmpc_usb_1286_terminal

Keys are expected to register as below with default mapping. Function keys on left and top row are not straight
due to difference from IBM 122-key. Those keys can be remappable somehow, Editor is not intuitive though.

Try it and report if you find something weird.

Quote



Offline hasu

  • Thread Starter
  • Posts: 3086
  • Location: Tokyo, Japan
  • @tmk
    • tmk keyboard firmware project
Re: [REQUEST FOR TEST] TMK IBM PC Keyboard Converter
« Reply #72 on: Mon, 27 April 2020, 02:11:54 »
Remmaping the keys is tricky.

For example,
When you want to Key1 in your pic:
The key of G80-2551 is refered as 'F24', see Fig.1 below.
You can remap the Key1 with changing key indicated as 'F24' in Fig.2 on Keymap Editor. i.e. key on left top.

When you want to Key2 in your pic:
The key of G80-2551 is refered as 'NmL'(NumLock), see Fig.1 below.
You can remap the Key2 with changing key indicated as 'NmL' in Fig.2 on Keymap Editor. You can find 'NmL' on keypad portoin, next to 'ESC' in Keymap Editor.

Hope this helps.

Fig.1 Default keymap of G80-2551
Quote

 *               ,-----------------------------------------------.
 *               |Gui|Mhk|F23|Hnk|F13|F14|F15|F16|F17|F18|F19|F20|
 *               |-----------------------------------------------|
 *               | F1| F2| F3| F4| F5| F6| F7| F8| F9|F10|F11|F12|
 *               `-----------------------------------------------'
 * ,-------. ,-----------------------------------------------------------. ,-----------. ,---------------.
 * |Mut|F24| |   |   |   |   |   |   |   |   |   |   |   |   |   |       | |NmL|PgU|PgD| |Esc|ScL|  *|  /|
 * |-------| |-----------------------------------------------------------| |-----------| |---------------|
 * |VoU|Pau| |     |   |   |   |   |   |   |   |   |   |   |   |   |     | |End|Ins|Del| |   |   |   |  +|
 * |-------| |------------------------------------------------------`    | |-----------| |---------------|
 * |VoD|F22| |      |   |   |   |   |   |   |   |   |   |   |   |   |    | |JPY|   |  #| |   |   |   |  -|
 * |-------| |-----------------------------------------------------------| |-----------| |---------------|
 * |Psc|App| |    |   |   |   |   |   |   |   |   |   |   |   |          | |   |Hom|   | |   |   |   |   |
 * |-------| |-----------------------------------------------------------| |-----------| |-----------|Ent|
 * |Gui|F21| |     |   |                                  |    |   |       | RO|   |KAN| |       |  .|   |
 * `-------' `-----'   `---------------------------------------'   `-----' `-----------' `---------------'

Fig.2 Default keymap of Keymap Editor
Quote

 *               ,-----------------------------------------------.
 *               |F13|F14|F15|F16|F17|F18|F19|F20|F21|F22|F23|F24|
 *               |-----------------------------------------------|
 *               |F1 |F2 |F3 |F4 |F5 |F6 |F7 |F8 |F9 |F10|F11|F12|
 *               `-----------------------------------------------'
 * ,-------. ,-----------------------------------------------------------. ,-----------. ,---------------.
 * |Mut|Hkn| |  `|  1|  2|  3|  4|  5|  6|  7|  8|  9|  0|  -|  =|Yen| BS| |  /|PgU|PgD| |Esc|NmL|ScL|  *|
 * |-------| |-----------------------------------------------------------| |-----------| |---------------|
 * |VoU|Pau| |Tab  |  Q|  W|  E|  R|  T|  Y|  U|  I|  O|  P|  [|  ]|    \| |End|Ins|Del| |  7|  8|  9|  +|
 * |-------| |-----------------------------------------------------------| |-----------| |-----------|---|
 * |VoD|Mhk| |CapsLo|  A|  S|  D|  F|  G|  H|  J|  K|  L|  ;|  '|  #| Ret| |JPY|Up |  #| |  4|  5|  6|  -|
 * |-------| |-----------------------------------------------------------| ,-----------| |---------------|
 * |Psc|App| |Shif|  \|  Z|  X|  C|  V|  B|  N|  M|  ,|  ,|  /| RO| Shift| |Lef|Hom|Rig| |  1|  2|  3|Ent|
 * |-------| |-----------------------------------------------------------| |-----------| |-----------|---|
 * |Gui|Gui| |Ctrl|    |Alt |          Space              |Alt |    |Ctrl| | RO|Dow|KAN| |  ,|  0|  .|  =|
 * `-------' `----'    `---------------------------------------'    `----' `-----------' `---------------'
 * JPY: JIS ¥
 * KAN: ひらがな
 * RO: JIS ろ(Japanese RO)
 * Hnk: 変換(Japanese Henkan)
 * Mhk: 無変換(Japanese MuHenkan)
TMK products:HHKB Alt  ⌨ConvertersAlps64FC660C AltFC980C Alt

Offline hasu

  • Thread Starter
  • Posts: 3086
  • Location: Tokyo, Japan
  • @tmk
    • tmk keyboard firmware project
Re: [REQUEST FOR TEST] TMK IBM PC Keyboard Converter
« Reply #73 on: Mon, 27 April 2020, 07:49:19 »
EspritBerlin,
Can you try this temporary firmware for test if you have time?

* ibmpc_usb_at90usb1286.hex (56.78 kB - downloaded 7 times.)

I got some idea of handling G80-2551 as a Terminal keyboard(Code Set 3). Current firmware sees it as weird PC keyboards with 126 keys.

I like to know whether G80-2551 supports decently 'Code Set 3' and its scan codes are correspondent with genuine IBM ones.
We can have better/straight mapping support in Keymap Editor perhaps if the keyboard does.

It would be helpful if you can share hid_listen output of firmware startup.

Genuine terminal keyboard should send scan codes like below. Can you check left 10-key function portion and  F13-F24 especially? If they look all good look into four extra keys around cursors also.

Quote

 *               ,-----------------------------------------------.
 *               | 08| 10| 18| 20| 28| 30| 38| 40| 48| 50| 57| 5F|
 *               |-----------------------------------------------|
 *               | 07| 0F| 17| 1F| 27| 2F| 37| 3F| 47| 4F| 56| 5E|
 *               `-----------------------------------------------'
 * ,-------. ,-----------------------------------------------------------. ,-----------. ,---------------.
 * | 05| 06| | 0E| 16| 1E| 26| 25| 2E| 36| 3D| 3E| 46| 45| 4E| 55| 5D| 66| | 67| 6E| 6F| | 76| 77| 7E|*84|
 * |-------| |-----------------------------------------------------------| |-----------| |---------------|
 * | 04| 0C| | 0D  | 15| 1D| 24| 2D| 2C| 35| 3C| 43| 44| 4D| 54| 5B|  5C | | 64| 65| 6D| | 6C| 75| 7D| 7C|
 * |-------| |-----------------------------------------------------------| `-----------' |---------------|
 * | 03| 0B| | 14   | 1C| 1B| 23| 2B| 34| 33| 3B| 42| 4B| 4C| 52| 53| 5A |     | 63|     | 6B| 73| 74| 7B|
 * |-------| |-----------------------------------------------------------| ,-----------. |---------------|
 * |*83| 0A| | 12 | 13| 1A| 22| 21| 2A| 32| 31| 3A| 41| 49| 4A| 51|  59  | | 61| 62| 6A| | 69| 72| 7A| 79|
 * |-------| |-----------------------------------------------------------| `-----------' |---------------|
 * | 01| 09| | 11  |   |19  |        29                   |39  |   | 58  |     | 60|     | 68| 70| 71| 78|
 * `-------' `-----'   `---------------------------------------'   `-----'     `---'     `---------------'
TMK products:HHKB Alt  ⌨ConvertersAlps64FC660C AltFC980C Alt

Offline EspritBerlin

  • Posts: 12
Re: [REQUEST FOR TEST] TMK IBM PC Keyboard Converter
« Reply #74 on: Mon, 27 April 2020, 11:33:28 »
Dear Hasu

Please find attached the hid_listen codes for 10 F keys on the left, nav cluster, F1-F24, and num pad.

Please let me know if I can help further

EspritBerlin,
Can you try this temporary firmware for test if you have time?


Offline hasu

  • Thread Starter
  • Posts: 3086
  • Location: Tokyo, Japan
  • @tmk
    • tmk keyboard firmware project
Re: [REQUEST FOR TEST] TMK IBM PC Keyboard Converter
« Reply #75 on: Mon, 27 April 2020, 22:41:08 »
EspritBerlin,
Great. The keyboard seems to be very straight terminal keyboard except for the extra keys.

I just updated firmware in Keymap Editor to support G80-2551 in better way. This update breaks your current keymap probably and you will have to start mapping from scratch.

To get new version Editor you may need to reload Keymap Editor page completely in web browser with Shift+Control+R or summat.

Try mapping especially on the extra keys in Keymap Editor. Mapping keys should be very straight now.

Thanks,
TMK products:HHKB Alt  ⌨ConvertersAlps64FC660C AltFC980C Alt

Offline EspritBerlin

  • Posts: 12
Re: [REQUEST FOR TEST] TMK IBM PC Keyboard Converter
« Reply #76 on: Tue, 28 April 2020, 00:50:00 »
Dear Hasu

I can confirm that all keys can be mapped. I am running the prior proposed mapping

- nav as inverted T
- num pad 'modern style'
- ESC on left 10 F keys
- changed position of menu key

Thank you very, very much for your help and patience!

Kind regards, EspritBerlin


EspritBerlin,
Great. The keyboard seems to be very straight terminal keyboard except for the extra keys.

I just updated firmware in Keymap Editor to support G80-2551 in better way. This update breaks your current keymap probably and you will have to start mapping from scratch.

To get new version Editor you may need to reload Keymap Editor page completely in web browser with Shift+Control+R or summat.

Try mapping especially on the extra keys in Keymap Editor. Mapping keys should be very straight now.

Thanks,

Online Maledicted

  • Posts: 1031
  • Location: Wisconsin, United States
Re: [REQUEST FOR TEST] TMK IBM PC Keyboard Converter
« Reply #77 on: Tue, 28 April 2020, 23:18:04 »
At long last, I stopped being lazy and installed wine on a Linux install I have lying around for that beige label Zenith Z-150. scla works on there, at least. I'll attach the full output from sctrace, and a zip file of every individual screenshot of a zoomed-in visualization of that output from scla. Here's a selection from the output, in order:

241039-0

241041-1

241043-2

241045-3

241047-4

* Zenith Z-150 Beige Label scla output.zip (238.13 kB - downloaded 7 times.)

I hope that's everything you need to crack the case. Otherwise, let me know.

I think I mentioned it last time, but the portB version of sctrace basically did nothing, by the way. This was with the portD version of sctrace.
« Last Edit: Tue, 28 April 2020, 23:21:47 by Maledicted »

Offline hasu

  • Thread Starter
  • Posts: 3086
  • Location: Tokyo, Japan
  • @tmk
    • tmk keyboard firmware project
Re: [REQUEST FOR TEST] TMK IBM PC Keyboard Converter
« Reply #78 on: Wed, 29 April 2020, 02:23:10 »
Maledicted,
Great contribution! Thank you for your time.

Zenith Z-150 Beige asserts stop bit as low level(0) for some reason, this is obvious violation of IBM PC AT protocol.




That is why many PS/2 converters and PS/2 port on PC fail to talk with the keyboard. Converter and PC with decent implementation of AT keyboard protocol won't accept the keyboard.

https://github.com/tmk/tmk_keyboard/wiki/IBM-PC-AT-Keyboard-Protocol#whitebeige-label-zenith-z-150

TMK IBM PC Keyboard Conveter doesn't check validity of stop bit, I don't think the stop bit prevents the converter from working. I may miss something else.

What ouputs do you get on hid_listen with the latest firmware?
TMK products:HHKB Alt  ⌨ConvertersAlps64FC660C AltFC980C Alt

Online Maledicted

  • Posts: 1031
  • Location: Wisconsin, United States
Re: [REQUEST FOR TEST] TMK IBM PC Keyboard Converter
« Reply #79 on: Wed, 29 April 2020, 21:10:01 »
I wish I could help more than what little I may have done. With the latest version of TMK it acts much the same:



That's all I can get because none of the keys register, the beeper doesn't even work. I tested with an old Fujitsu board, which is most likely AT, as a control and that board worked as it should. Even on the HP 8200 system that the board does work with (beeper and all keys), it still doesn't seem to always initiate caps lock, num lock, etc as you would normally expect from a keyboard, and on some other computers mashing caps lock over and over again would sometimes get the rest of the keys to register.

Offline hasu

  • Thread Starter
  • Posts: 3086
  • Location: Tokyo, Japan
  • @tmk
    • tmk keyboard firmware project
Re: [REQUEST FOR TEST] TMK IBM PC Keyboard Converter
« Reply #80 on: Wed, 29 April 2020, 21:57:27 »
hid_listen log is almos always really helpful for me to debug.
'Copy and paste' log text is good enough unless taking screenshot is easier for you.

The converter can read powerup test result code(rAA) from the keyboard at startup as I expected.
But the keyboard doesn't response with 'read ID' command(wF2) at all and seems to stop working since then.

I just changed firmware temporarily to skip the 'read ID' and recognize it as AT(Code Set 2) automatically. You can type keys with firmware perhaps. And I guess it stops after pressing Caps Lock or Num Lock.

Can you try pressing Q, W, Caps Lock, A and S in this order? hid_listen log would be helpul again.

* ibmpc_usb_atmega32u4.hex (54.39 kB - downloaded 5 times.)

TMK products:HHKB Alt  ⌨ConvertersAlps64FC660C AltFC980C Alt

Online Maledicted

  • Posts: 1031
  • Location: Wisconsin, United States
Re: [REQUEST FOR TEST] TMK IBM PC Keyboard Converter
« Reply #81 on: Wed, 29 April 2020, 23:01:30 »
hid_listen log is almos always really helpful for me to debug.
'Copy and paste' log text is good enough unless taking screenshot is easier for you.

The converter can read powerup test result code(rAA) from the keyboard at startup as I expected.
But the keyboard doesn't response with 'read ID' command(wF2) at all and seems to stop working since then.

I just changed firmware temporarily to skip the 'read ID' and recognize it as AT(Code Set 2) automatically. You can type keys with firmware perhaps. And I guess it stops after pressing Caps Lock or Num Lock.

Can you try pressing Q, W, Caps Lock, A and S in this order? hid_listen log would be helpul again.

(Attachment Link)

Here you go:

Keyboard start.
I267 X769 rAA W1213 R1714 ID:0000(2)
S1714 wED w00 L1750
ERR:17
r15 rF0 r15 r1D rF0 r1D r58 wED w04
ERR:17
rF0 r58 r1C rF0 r1C r1B rF0 r1B

It looks like it actually has full function with that modified firmware, it even seems to toggle caps lock num lock and scroll lock normally, and continues to type. Interestingly, the LED status lights for the lock keys do not work though.

Offline hasu

  • Thread Starter
  • Posts: 3086
  • Location: Tokyo, Japan
  • @tmk
    • tmk keyboard firmware project
Re: [REQUEST FOR TEST] TMK IBM PC Keyboard Converter
« Reply #82 on: Thu, 30 April 2020, 00:34:14 »
Can you try this and check if the LED indicators works?

* ibmpc_usb_atmega32u4.hex (54.26 kB - downloaded 5 times.)

According to this post in reddit,
it seems that the indicators are controlled internally by the keyboard, instead of the converter.

https://www.reddit.com/r/MechanicalKeyboards/comments/16woai/having_troubles_with_my_newly_acquired_zenith/

Quote
I recently picked up a Zenith data systems keyboard from 1984. Its in great condition. It has an AT plug so i got an AT(dim 5) to PS/2 adapter. I plug it in and it not registering with windows. It does however light up the num lck and caps lock when pressed and the keys make faint beeps when pressed.
TMK products:HHKB Alt  ⌨ConvertersAlps64FC660C AltFC980C Alt

Online Maledicted

  • Posts: 1031
  • Location: Wisconsin, United States
Re: [REQUEST FOR TEST] TMK IBM PC Keyboard Converter
« Reply #83 on: Thu, 30 April 2020, 17:38:01 »
That seems to have brought no functional change. I'm using the board right now to type this. These green Alps are wonderful. I noticed that Sys Req muted my computer's audio, lol. Is that a normal feature of TMK? The weird thing is that the lock lights do work on every direct ps2 connection computer that I could get the board to somewhat work on, even the ones where I had to mash the caps lock key many times on to get the rest of the keys to register.

With the HP 8200, literally everything works normally, though the lock keys don't always necessarily engage their corresponding lock mode on every press.

Offline hasu

  • Thread Starter
  • Posts: 3086
  • Location: Tokyo, Japan
  • @tmk
    • tmk keyboard firmware project
Re: [REQUEST FOR TEST] TMK IBM PC Keyboard Converter
« Reply #84 on: Thu, 30 April 2020, 18:09:16 »
It depends on what scan code Sys Req key sends. What does log output show when pressing the key?
EDIT: And what does the key register on HP 8200?


WIth internet search I found people said many computers and PS/2 converters couldn't handle with the keyboard.
PS/2 port on HP 8200 can handle with beige Z-150. Interesting. Do you have other computer that can do with the keyboard?

When plugin USB keyboard with HP 8200 as well and press lock key on the USB keyboard, does indicator of Z-150 on PS/2 port change?
If yes the it means keyboard can receive commands from computer.



That seems to have brought no functional change. I'm using the board right now to type this. These green Alps are wonderful. I noticed that Sys Req muted my computer's audio, lol. Is that a normal feature of TMK? The weird thing is that the lock lights do work on every direct ps2 connection computer that I could get the board to somewhat work on, even the ones where I had to mash the caps lock key many times on to get the rest of the keys to register.

With the HP 8200, literally everything works normally, though the lock keys don't always necessarily engage their corresponding lock mode on every press.

« Last Edit: Thu, 30 April 2020, 18:20:32 by hasu »
TMK products:HHKB Alt  ⌨ConvertersAlps64FC660C AltFC980C Alt

Online Maledicted

  • Posts: 1031
  • Location: Wisconsin, United States
Re: [REQUEST FOR TEST] TMK IBM PC Keyboard Converter
« Reply #85 on: Thu, 30 April 2020, 19:38:56 »
It took me a while to even find a tool that would work with the Sys Req key. Nirsoft always seems to have an awesome utility for everything. Sys Req is functioning as print screen by default. Relatedly, the actual print screen key functions only as *, regardless of number lock status, etc.

I looked back through a thread I started in February when I first tested all of this. My HP may actually be an 8300. I think they're basically the same, HP just added USB 3.0 ports to the 8300 vs 8200. I tested on quite a few computers, though I think I may have more I could try now. A lot of the others I didn't at the time because they don't even have operating systems on them.

It had perfect function on my:

HP 8200/8300
Compaq SR1920nx (yeah, that's an oldie, my first desktop computer)

It had partial function by mashing the caps lock key many times on an old Dell XPS 630, in Linux Mint ... maybe 17 or so. The same trick didn't work in Windows 10.

It didn't work at all on any other computer I tried.

The lock keys of a separate keyboard do indeed turn on the corresponding indicator LED of the Zenith when connected to the HP.

Offline hasu

  • Thread Starter
  • Posts: 3086
  • Location: Tokyo, Japan
  • @tmk
    • tmk keyboard firmware project
Re: [REQUEST FOR TEST] TMK IBM PC Keyboard Converter
« Reply #86 on: Fri, 01 May 2020, 08:40:16 »
Then, the keyboard supports commands somewhat.

I tweaked timing of command signal a bit.
Can you try attached firmware and post 'hid_listen' log with pressing the 'Sys Req' key, Caps Lock and Num Lock?

* ibmpc_usb_atmega32u4.hex (54.65 kB - downloaded 5 times.)

The lock keys of a separate keyboard do indeed turn on the corresponding indicator LED of the Zenith when connected to the HP.

As for the '*/Print screen' key, I think it worked as Print screen on original XT AT computer when pressed with Shift key. But mordern  OS and USB keyboards don't have the feature. The key just registers 'numpad *' with the converter and modern PCs.
And I think the 'Sys Req' key on IBM AT 84-key keyboard should be registered as Print screen. Its scan code is 0x84 but Z-150 seems to use diffrent code perhaps.
TMK products:HHKB Alt  ⌨ConvertersAlps64FC660C AltFC980C Alt

Online Maledicted

  • Posts: 1031
  • Location: Wisconsin, United States
Re: [REQUEST FOR TEST] TMK IBM PC Keyboard Converter
« Reply #87 on: Sat, 02 May 2020, 00:09:30 »
That new firmware does not work with the keyboard at all. On my first reboot after flashing it, the keys would still beep, but it wasn't sending any codes to the computer. Every other try after the keyboard would do nothing, so I flashed it back to the previous firmware and everything but the lock lights is working again. The caps lock and num lock keys, although they function normally, do not send any codes that hid_listen detects. I think I could get the specific codes with that Nirsoft utility I found though.

Here it is with sys req:

TMK:2e5e6a69+/LUFA


USB configured.

Keyboard start.
I279 X781 rAA W1224 R1725 ID:0000(2)
S1725 L1725 r7F rF0 r7F r58 rF0 r58 r77 rF0 r77

The utility is KeyboardStateView

Key Name   Description   Key Code   Hex Key Code   Key Pressed   Key Toggled
VK_CAPITAL   CAPS LOCK key   20   0x14   *   *   5/2/2020 12:03:25 AM

Key Name   Description   Key Code   Hex Key Code   Key Pressed   Key Toggled   Last Key Press Time   
VK_NUMLOCK   NUM LOCK key   144   0x90   *   *   5/2/2020 12:04:03 AM   

Those are, all standard, I imagine.

Here's Sys Req, with the converter:

Key Name   Description   Key Code   Hex Key Code   Key Pressed   Key Toggled   Last Key Press Time   
VK_VOLUME_MUTE   Volume Mute key   173   0xad   *   *   5/2/2020 12:08:34 AM   


Offline hasu

  • Thread Starter
  • Posts: 3086
  • Location: Tokyo, Japan
  • @tmk
    • tmk keyboard firmware project
Re: [REQUEST FOR TEST] TMK IBM PC Keyboard Converter
« Reply #88 on: Sat, 02 May 2020, 00:28:31 »
Sorry. It seems I attached wrong or corrupt firmware for no reason.

Can you try this instead and check if the indicators work with Caps Lock and Num Lock?

* ibmpc_usb_atmega32u4.hex (54.56 kB - downloaded 5 times.)
TMK products:HHKB Alt  ⌨ConvertersAlps64FC660C AltFC980C Alt

Online Maledicted

  • Posts: 1031
  • Location: Wisconsin, United States
Re: [REQUEST FOR TEST] TMK IBM PC Keyboard Converter
« Reply #89 on: Sat, 02 May 2020, 00:50:28 »
That firmware is doing the same thing, with the Fujitsu control board from before as well.

Offline hasu

  • Thread Starter
  • Posts: 3086
  • Location: Tokyo, Japan
  • @tmk
    • tmk keyboard firmware project
Re: [REQUEST FOR TEST] TMK IBM PC Keyboard Converter
« Reply #90 on: Sat, 02 May 2020, 01:20:41 »
That firmware is doing the same thing, with the Fujitsu control board from before as well.

I believe the firmware should display hid_listen log at least and wonder old firmware is sitll in the converter.
Could you check the file and flash it again?
TMK products:HHKB Alt  ⌨ConvertersAlps64FC660C AltFC980C Alt

Online Maledicted

  • Posts: 1031
  • Location: Wisconsin, United States
Re: [REQUEST FOR TEST] TMK IBM PC Keyboard Converter
« Reply #91 on: Sat, 02 May 2020, 01:47:31 »
That firmware is doing the same thing, with the Fujitsu control board from before as well.

I believe the firmware should display hid_listen log at least and wonder old firmware is sitll in the converter.
Could you check the file and flash it again?

I deleted the old firmware file from my computer, copied the latest to its place, flashed it, and tested. Then I flashed to the firmware prior to it, tested, flashed back to the latest and tested. That's what I did before posting the previous message. Now I deleted it once more, downloaded it again, renamed it just in case the Teensy flashing utility had cached it somewhere or something, and flashed it once more.

The results are all the same.

Here's what hid_listen says with this firmware:

Keyboard start.
I232 wED
ERR:11
X733 rAA W1178 R1679 ID:0000(2)
S1679 wED
ERR:11
L1750

Offline hasu

  • Thread Starter
  • Posts: 3086
  • Location: Tokyo, Japan
  • @tmk
    • tmk keyboard firmware project
Re: [REQUEST FOR TEST] TMK IBM PC Keyboard Converter
« Reply #92 on: Sat, 02 May 2020, 08:49:02 »
The keyboard still doesn't like how the converter sends command and the request ends in timeout.

Attached firmware revised for signal timing again. Also fixed for 'SysRq' key, it should register Print Screen now.

* ibmpc_usb_atmega32u4.hex (54.72 kB - downloaded 3 times.)

TMK products:HHKB Alt  ⌨ConvertersAlps64FC660C AltFC980C Alt

Online Maledicted

  • Posts: 1031
  • Location: Wisconsin, United States
Re: [REQUEST FOR TEST] TMK IBM PC Keyboard Converter
« Reply #93 on: Sat, 02 May 2020, 18:14:55 »
Same results, functionally. No beeps, no key codes sent.

TMK:da82c5f3+/LUFA


USB configured.

Keyboard start.
I297 X799 rAA W1243 R1744 ID:0000(2)
S1744 wED
ERR:11
L1797


Offline hasu

  • Thread Starter
  • Posts: 3086
  • Location: Tokyo, Japan
  • @tmk
    • tmk keyboard firmware project
Re: [REQUEST FOR TEST] TMK IBM PC Keyboard Converter
« Reply #94 on: Sun, 03 May 2020, 04:48:41 »
I looked into some ps/2 port of computers and PS/2 converters kicking around and found some variations of sginal handling there but got no definite useful finding. We will have to do a bunch of trials and errors on timing values without any insight :(

What does hid_listen show with attached firmware when pressing CapsLock?

* ibmpc_usb_atmega32u4.hex (54.69 kB - downloaded 4 times.)


I wonder what Soarer's converter display on its debug log with the Z-150. Can you try it too?
TMK products:HHKB Alt  ⌨ConvertersAlps64FC660C AltFC980C Alt

Offline acid2000

  • Posts: 18
Re: [REQUEST FOR TEST] TMK IBM PC Keyboard Converter
« Reply #95 on: Sun, 03 May 2020, 16:26:51 »
Iíve been testing the latest TMK firmware from the github link you shared. The newer ones posted in the forum just spew out garbage.

Overall it is better than when I was testing in September but still has lots of issues.

Iím using an XT 83 key 5150 UK layout with a 5V Pro Micro without reset connected. Itís either connected into a powered USB hub or with a Y cable into a 2.1amp PSU to ensure the voltage doesnít drop. It has strong pull-ups and the cable to the board itself is short.

I have built a few pro micros with Soarers before. With XTs I usually power it up with the RAW pin and bypass the regulator all together to make sure the power doesnít dip. I canít remember if I did this in this one.

It works well with Soarers and is my daily driver.

Iíve got some hid listen output for a few different states.
* No input, power on and donít touch anything. I left it for around 5m. I was expecting to see nothing but got some things that look like errors.
* Holding down Q. I have two different outputs with slightly different results. Iíve tried a few keys and Q always seems to show issues.
* General typing. Iíve included the ASCII output from the keyboard and the corresponding hid_listen results.

Testing is a PITA for me. For some reason I canít get the Soarers fw into the bootloader from Windows. I need to bridge the reset pin by hand. I have a few 5150 keyboards and in all of them my adapter is inside the keyboard glued in place and wrapped in electrical tape.

Back in September there were lots of problems with stuck keys. This looks like that is solved (only did a bit of testing) but instead I do get an incorrect keypresses. Is this a timing error?

Iím really hoping that one day soon these issues can be resolved. Iím quite familiar with the TMK codebase now and already have some mods Iíve written Iíd like to push up when theyíve been tested.

Offline hasu

  • Thread Starter
  • Posts: 3086
  • Location: Tokyo, Japan
  • @tmk
    • tmk keyboard firmware project
Re: [REQUEST FOR TEST] TMK IBM PC Keyboard Converter
« Reply #96 on: Sun, 03 May 2020, 19:55:33 »
acid2000,
Thanks a lot for the report.
It sems to read a lot of garbage and phantom key press of Q and not completely miss signals.
The converter read signal at diffrent timing from Soarer's and it can be fussy on signal cleanness. But I don't know why Soarer's can work even with this situation. The setup of same keyboard with same Pro Micro works well with Soarer's firmware?

My fIrmware can still have a silly bug or room to improve but I'd suspect its power line first. I'm not totally sure power voltage drop causes  serious problem like these.

Quote
Iím using an XT 83 key 5150 UK layout with a 5V Pro Micro without reset connected. Itís either connected into a powered USB hub or with a Y cable into a 2.1amp PSU to ensure the voltage doesnít drop. It has strong pull-ups and the cable to the board itself is short.

I have built a few pro micros with Soarers before. With XTs I usually power it up with the RAW pin and bypass the regulator all together to make sure the power doesnít dip. I canít remember if I did this in this one.

I got Pro Micro and looked into closely the other day and found something people are likely to misunderstand.

DId you check voltage with multimeter?
First, RAW pin is not for 5V power supply directly from USB line. The name may be not easy to understand but it is used for external power input, not output. You get voltage with diode's forward voltage drop(0.4V typically) on RAW pin.

You have to use VCC pin to power your keyboard, not RAW pin.

And you have to make J1 solder bridged, without this you will get same voltage as RAW pin or lower.

With J1 soder bridge you can get raw power(possibly 5V) from USB line on VCC pin, note that RAW pin doesn't give 5V even with the solder bridge.

Check this wiki for detail.
https://github.com/tmk/tmk_keyboard/wiki/Pro-Micro#j1-solder-bridge


TMK products:HHKB Alt  ⌨ConvertersAlps64FC660C AltFC980C Alt

Online Maledicted

  • Posts: 1031
  • Location: Wisconsin, United States
Re: [REQUEST FOR TEST] TMK IBM PC Keyboard Converter
« Reply #97 on: Sun, 03 May 2020, 20:37:53 »
I looked into some ps/2 port of computers and PS/2 converters kicking around and found some variations of sginal handling there but got no definite useful finding. We will have to do a bunch of trials and errors on timing values without any insight :(

What does hid_listen show with attached firmware when pressing CapsLock?

(Attachment Link)


I wonder what Soarer's converter display on its debug log with the Z-150. Can you try it too?

With the firmware you attached, this is the result in hid_listen after having pressed caps lock, which caused the board to stop responding. Before I press caps lock with that firmware, the regular keys seem to function and beep like normal. After pressing it, they stop working:

TMK:b9de6db4+/LUFA


USB configured.

Keyboard start.
I287 X789 rAA W1234 R1735 ID:0000(2)
S1735 L1735 r58 rF0 r58

The keyboard doesn't work at all with Soarer's firmware, so this is all hid_listen reports:

Listening:
R08 wEE

remaining: FFFC


Keyboard ID: 0000
Code Set: 1
Mode: PC/XT

Offline hasu

  • Thread Starter
  • Posts: 3086
  • Location: Tokyo, Japan
  • @tmk
    • tmk keyboard firmware project
Re: [REQUEST FOR TEST] TMK IBM PC Keyboard Converter
« Reply #98 on: Sun, 03 May 2020, 21:10:02 »
With the firmware you attached, this is the result in hid_listen after having pressed caps lock, which caused the board to stop responding. Before I press caps lock with that firmware, the regular keys seem to function and beep like normal. After pressing it, they stop working:

TMK:b9de6db4+/LUFA


USB configured.

Keyboard start.
I287 X789 rAA W1234 R1735 ID:0000(2)
S1735 L1735 r58 rF0 r58

Didn't you see any output like 'wED' or 'ERR:11' as before?
I expect the error output when seding command of 'set indicator'(ED). Debug prints is not very reliable and you have to try several times perhaps?



I see. R08 means stop bit error. Soarer's do very right thing, it is totally the keyboard's fault.
I wonder why Zenith made the keyboard not compliant to AT protocol :(

Quote
The keyboard doesn't work at all with Soarer's firmware, so this is all hid_listen reports:

Listening:
R08 wEE

remaining: FFFC


Keyboard ID: 0000
Code Set: 1
Mode: PC/XT

TMK products:HHKB Alt  ⌨ConvertersAlps64FC660C AltFC980C Alt

Offline acid2000

  • Posts: 18
Re: [REQUEST FOR TEST] TMK IBM PC Keyboard Converter
« Reply #99 on: Mon, 04 May 2020, 03:25:12 »
My fIrmware can still have a silly bug or room to improve but I'd suspect its power line first. I'm not totally sure power voltage drop causes  serious problem like these.

I checked again a few things again, Iím not doing any power shenanigans.

Soarers converter works without issue, I swap the fw to TMK and have issues.
Iíve tried on 2 different XT keyboards both built around the same time using two different ProMicros. Same issues.

Offline hasu

  • Thread Starter
  • Posts: 3086
  • Location: Tokyo, Japan
  • @tmk
    • tmk keyboard firmware project
Re: [REQUEST FOR TEST] TMK IBM PC Keyboard Converter
« Reply #100 on: Mon, 04 May 2020, 03:57:23 »
My fIrmware can still have a silly bug or room to improve but I'd suspect its power line first. I'm not totally sure power voltage drop causes  serious problem like these.

I checked again a few things again, Iím not doing any power shenanigans.

Soarers converter works without issue, I swap the fw to TMK and have issues.
Iíve tried on 2 different XT keyboards both built around the same time using two different ProMicros. Same issues.

I belive you can't get 5V at RAW on Pro Micro and you need to use VCC pin with J1 solder bridged. (It seems liek most of cheap Pro Mciros come without the solder bridge) I'm NOT sure that voltage of power matters, though.

It would be helpful if you can see whether there are any difference with 5V when you have time.
« Last Edit: Mon, 04 May 2020, 04:03:22 by hasu »
TMK products:HHKB Alt  ⌨ConvertersAlps64FC660C AltFC980C Alt

Offline acid2000

  • Posts: 18
Re: [REQUEST FOR TEST] TMK IBM PC Keyboard Converter
« Reply #101 on: Mon, 04 May 2020, 06:52:41 »
J1 on the pro micro is for voltage select. 3V vs 5V.

Iím running a 5V pro micro.

Running at 3v is way out of spec for an XT. In the past Iíve run accidentally on 3v and they wonít come up.
Even if they did (by tapping of the usb power) you would be driving a 5V GPIO with 3V, it would probably work but would be a PITA to set up.

Run your ProMicro at 5V.

Offline hasu

  • Thread Starter
  • Posts: 3086
  • Location: Tokyo, Japan
  • @tmk
    • tmk keyboard firmware project
Re: [REQUEST FOR TEST] TMK IBM PC Keyboard Converter
« Reply #102 on: Mon, 04 May 2020, 07:25:16 »
J1 on the pro micro is for voltage select. 3V vs 5V.

Iím running a 5V pro micro.

Running at 3v is way out of spec for an XT. In the past Iíve run accidentally on 3v and they wonít come up.
Even if they did (by tapping of the usb power) you would be driving a 5V GPIO with 3V, it would probably work but would be a PITA to set up.

Run your ProMicro at 5V.

No, I'm not referring 3.3V Pro Micro.

Did you check the wiki page?
Beleive me, you will get only 4.6V typically from RAW pin even if you are using 5V version Pro Micro.
You should be able to confirm this with multimeter easily, or this can be evident from its schematic also.

To get proper 5V you have to do both two things below.
1) Make solder bridge on J1
2) Use VCC pin to give keyboard power , not RAW pin

https://github.com/tmk/tmk_keyboard/wiki/Pro-Micro#j1-solder-bridge

TMK products:HHKB Alt  ⌨ConvertersAlps64FC660C AltFC980C Alt

Online Maledicted

  • Posts: 1031
  • Location: Wisconsin, United States
Re: [REQUEST FOR TEST] TMK IBM PC Keyboard Converter
« Reply #103 on: Mon, 04 May 2020, 08:48:07 »
J1 on the pro micro is for voltage select. 3V vs 5V.

Iím running a 5V pro micro.

Running at 3v is way out of spec for an XT. In the past Iíve run accidentally on 3v and they wonít come up.
Even if they did (by tapping of the usb power) you would be driving a 5V GPIO with 3V, it would probably work but would be a PITA to set up.

Run your ProMicro at 5V.

No, I'm not referring 3.3V Pro Micro.

Did you check the wiki page?
Beleive me, you will get only 4.6V typically from RAW pin even if you are using 5V version Pro Micro.
You should be able to confirm this with multimeter easily, or this can be evident from its schematic also.

To get proper 5V you have to do both two things below.
1) Make solder bridge on J1
2) Use VCC pin to give keyboard power , not RAW pin

https://github.com/tmk/tmk_keyboard/wiki/Pro-Micro#j1-solder-bridge

I suppose that could explain why all of my Pro Micros only intermittently worked with TMK, but Teensies work fine. I'll have to look at that.

I do still plan on flashing back to your most recently posted modified TMK firmware by the way, it was just getting late last night. Is there any sort of sniffing we could try to do on a computer that natively works with the beige label Z-150 to figure out how/why?

Also, maybe if you could point me to what values to play with, and what you think the general threshold may be, I could tweak the timings myself?

Offline acid2000

  • Posts: 18
Re: [REQUEST FOR TEST] TMK IBM PC Keyboard Converter
« Reply #104 on: Mon, 04 May 2020, 13:29:25 »
Iíve bought a Teensy 2.0 from an official distributor.

This will be the last time I give this a go. I hope it works.

Offline hasu

  • Thread Starter
  • Posts: 3086
  • Location: Tokyo, Japan
  • @tmk
    • tmk keyboard firmware project
Re: [REQUEST FOR TEST] TMK IBM PC Keyboard Converter
« Reply #105 on: Wed, 06 May 2020, 02:25:27 »
J1 on the pro micro is for voltage select. 3V vs 5V.

Iím running a 5V pro micro.

Running at 3v is way out of spec for an XT. In the past Iíve run accidentally on 3v and they wonít come up.
Even if they did (by tapping of the usb power) you would be driving a 5V GPIO with 3V, it would probably work but would be a PITA to set up.

Run your ProMicro at 5V.

No, I'm not referring 3.3V Pro Micro.

Did you check the wiki page?
Beleive me, you will get only 4.6V typically from RAW pin even if you are using 5V version Pro Micro.
You should be able to confirm this with multimeter easily, or this can be evident from its schematic also.

To get proper 5V you have to do both two things below.
1) Make solder bridge on J1
2) Use VCC pin to give keyboard power , not RAW pin

https://github.com/tmk/tmk_keyboard/wiki/Pro-Micro#j1-solder-bridge

I suppose that could explain why all of my Pro Micros only intermittently worked with TMK, but Teensies work fine. I'll have to look at that.

If you can confirm that  the lower voltage power of Pro Micro affects any keyboard this would be worth sharing with the community and I would make a thread for this Pro Micro topic.


Quote
I do still plan on flashing back to your most recently posted modified TMK firmware by the way, it was just getting late last night. Is there any sort of sniffing we could try to do on a computer that natively works with the beige label Z-150 to figure out how/why?

Also, maybe if you could point me to what values to play with, and what you think the general threshold may be, I could tweak the timings myself?

It would be great if you can tweak code and test it in quick turnaround.

To get my current working source code repo from github.com run commands below, this is needed just once.
Code: [Select]
git clone -b ibmpc_z150at_fix https://github.com/tmk/tmk_keyboard.git
cd tmk_keyboard/
git submodule update --init
cd converter/ibmpc_usb/

Then, just run 'make' command to build firmware in 'tmk_keyboard/converter/ibmpc_usb/' directory.
Code: [Select]
make
You will find firmware file 'ibmpc_usb.hex' in the directory.

The current firmware should work with Z-150 AT until you press CapsLock, NumLock key.
Let me know one you can get this working on your side.
TMK products:HHKB Alt  ⌨ConvertersAlps64FC660C AltFC980C Alt

Offline acid2000

  • Posts: 18
Re: [REQUEST FOR TEST] TMK IBM PC Keyboard Converter
« Reply #106 on: Wed, 06 May 2020, 03:54:04 »
I bridged J1 in my Pro Micro, very little changed.

Teensy should arrive in the next few days. If it doesnít work with that then itís TMK otherwise it is the Pro Micro.

Offline acid2000

  • Posts: 18
Re: [REQUEST FOR TEST] TMK IBM PC Keyboard Converter
« Reply #107 on: Thu, 07 May 2020, 12:55:16 »
So I got the teensy 2. Wired it up with 1k pull ups and I still have problems.

Iíve attached the results of holding down Q for about 1m. You can see the incorrect key presses at the end.

Given Iíve now changed the hardware can we agree that this is a bug in TMK?

Offline hasu

  • Thread Starter
  • Posts: 3086
  • Location: Tokyo, Japan
  • @tmk
    • tmk keyboard firmware project
Re: [REQUEST FOR TEST] TMK IBM PC Keyboard Converter
« Reply #108 on: Thu, 07 May 2020, 19:36:27 »
So I got the teensy 2. Wired it up with 1k pull ups and I still have problems.

Iíve attached the results of holding down Q for about 1m. You can see the incorrect key presses at the end.

Given Iíve now changed the hardware can we agree that this is a bug in TMK?

Thanks for the test. Can you attach it again or just post it with code tag?

TMK products:HHKB Alt  ⌨ConvertersAlps64FC660C AltFC980C Alt

Online Maledicted

  • Posts: 1031
  • Location: Wisconsin, United States
Re: [REQUEST FOR TEST] TMK IBM PC Keyboard Converter
« Reply #109 on: Thu, 07 May 2020, 23:19:39 »
I haven't touched anything else with TMK yet, but I got one of those Monoprice adapters in. I initially didn't bother trying one since I literally bought every single design that looked different from one another in their listings and tested them previously. None worked, at least 2-3 ended up looking exactly the same as each other even though they didn't in the listing, and the Monoprice one actually looks a lot like most of those ones that matched.

The Monoprice adapter did, in fact, end up working with the beige label Z-150 though. Same thing as the first firmware you got working with it. 100% function other than the lock lights not illuminating.

Offline hasu

  • Thread Starter
  • Posts: 3086
  • Location: Tokyo, Japan
  • @tmk
    • tmk keyboard firmware project
Re: [REQUEST FOR TEST] TMK IBM PC Keyboard Converter
« Reply #110 on: Fri, 08 May 2020, 00:29:23 »
I haven't touched anything else with TMK yet, but I got one of those Monoprice adapters in. I initially didn't bother trying one since I literally bought every single design that looked different from one another in their listings and tested them previously. None worked, at least 2-3 ended up looking exactly the same as each other even though they didn't in the listing, and the Monoprice one actually looks a lot like most of those ones that matched.

The Monoprice adapter did, in fact, end up working with the beige label Z-150 though. Same thing as the first firmware you got working with it. 100% function other than the lock lights not illuminating.

The Monoprice adapter did lock lights for other AT keyboards?
And it can handle F7 key correctly? This post on Deskthority referred the key.

https://github.com/tmk/tmk_keyboard/wiki/IBM-PC-AT-Keyboard-Protocol#monoprice-ps2-converter-bluecube
TMK products:HHKB Alt  ⌨ConvertersAlps64FC660C AltFC980C Alt

Online Maledicted

  • Posts: 1031
  • Location: Wisconsin, United States
Re: [REQUEST FOR TEST] TMK IBM PC Keyboard Converter
« Reply #111 on: Fri, 08 May 2020, 01:23:37 »
I haven't touched anything else with TMK yet, but I got one of those Monoprice adapters in. I initially didn't bother trying one since I literally bought every single design that looked different from one another in their listings and tested them previously. None worked, at least 2-3 ended up looking exactly the same as each other even though they didn't in the listing, and the Monoprice one actually looks a lot like most of those ones that matched.

The Monoprice adapter did, in fact, end up working with the beige label Z-150 though. Same thing as the first firmware you got working with it. 100% function other than the lock lights not illuminating.

The Monoprice adapter did lock lights for other AT keyboards?
And it can handle F7 key correctly? This post on Deskthority referred the key.

https://github.com/tmk/tmk_keyboard/wiki/IBM-PC-AT-Keyboard-Protocol#monoprice-ps2-converter-bluecube

You are a hawk. Good call on F7. It does not work with the Monoprice adapter. I'm pretty sure that it worked with straight ps2 on the HP. The lock lights do work with the NEC APC-H410EA I tested with, and so did F7.

I flashed back to the first TMK firmware that that allowed full function sans the lock lights and confirmed that F7 works fine with the beige label Z-150 that way.

Offline hasu

  • Thread Starter
  • Posts: 3086
  • Location: Tokyo, Japan
  • @tmk
    • tmk keyboard firmware project
Re: [REQUEST FOR TEST] TMK IBM PC Keyboard Converter
« Reply #112 on: Wed, 13 May 2020, 10:17:46 »
Maledicted,

Can you try this firmware with Z-150 AT and post hid_listen log?

https://raw.githubusercontent.com/tmk/tmk_keyboard/80a172448cebce73d232746ea0f8bd05934cb88c/converter/ibmpc_usb/binary/ibmpc_usb_atmega32u4.hex

I like to know if it shows 'PRT:11' instead of 'PRT:10', the firmware can recognize Z-150 AT specific protocol now.
Also press CapsLock to see how it goes in log.


Code: [Select]
Waiting for new device:.......
Listening:


TMK:a709d822/LUFA


USB configured.

Keyboard start.
I428 wFF rFA A1433
PRT:10 ISR:FE90 rAA W1785 R2286
ID:0000(2) S2286 L2286 r29 rF0 r29
TMK products:HHKB Alt  ⌨ConvertersAlps64FC660C AltFC980C Alt

Online Maledicted

  • Posts: 1031
  • Location: Wisconsin, United States
Re: [REQUEST FOR TEST] TMK IBM PC Keyboard Converter
« Reply #113 on: Thu, 14 May 2020, 18:03:02 »
Maledicted,

Can you try this firmware with Z-150 AT and post hid_listen log?

https://raw.githubusercontent.com/tmk/tmk_keyboard/80a172448cebce73d232746ea0f8bd05934cb88c/converter/ibmpc_usb/binary/ibmpc_usb_atmega32u4.hex

I like to know if it shows 'PRT:11' instead of 'PRT:10', the firmware can recognize Z-150 AT specific protocol now.
Also press CapsLock to see how it goes in log.


Code: [Select]
Waiting for new device:.......
Listening:


TMK:a709d822/LUFA


USB configured.

Keyboard start.
I428 wFF rFA A1433
PRT:10 ISR:FE90 rAA W1785 R2286
ID:0000(2) S2286 L2286 r29 rF0 r29

Alright, interesting results with this one. I flashed your new test firmware and now all 3 lock lights flash on, flicker, and then shut off whenever pressing caps lock or scroll lock. Until the lock lights shut off again, the keyboard doesn't respond to key presses, but resumes doing so after they do shut off. It does the same thing, in all regards, if I press l press caps lock on another connected keyboard. Pressing num lock works like the first working firmware in that it toggles num lock, but the lights do not react. I can type immediately after pressing this lock key.

I noticed that, sometimes, pressing caps lock will lock up the whole board and I have had to pres caps lock on another keyboard to return functionality to the Z-150. In these cases, the board doesn't seem to send any output related to having pressed caps lock to the computer until pressing caps lock on another keyboard and pressing a key, in which case it belatedly sends both.

This is the result of connecting the Teensy with the keyboard attached, and then pressing caps lock:

Keyboard start.
I250 wFF A1253
ERR:17 ISR:6A90
PRT:11 ISR:0000 X1755 rAA W2198 R2699
ID:0000(2) S2699 L2699 r58 wED
ERR:11

Offline hasu

  • Thread Starter
  • Posts: 3086
  • Location: Tokyo, Japan
  • @tmk
    • tmk keyboard firmware project
Re: [REQUEST FOR TEST] TMK IBM PC Keyboard Converter
« Reply #114 on: Thu, 14 May 2020, 21:34:50 »
Alright, interesting results with this one. I flashed your new test firmware and now all 3 lock lights flash on, flicker, and then shut off whenever pressing caps lock or scroll lock. Until the lock lights shut off again, the keyboard doesn't respond to key presses, but resumes doing so after they do shut off. It does the same thing, in all regards, if I press l press caps lock on another connected keyboard. Pressing num lock works like the first working firmware in that it toggles num lock, but the lights do not react. I can type immediately after pressing this lock key.

Can you post the whole of log outputs during this process?

I guess the keyboard seems to wait for signal or something after the covnerter tries and fails to send 'set LED' command. I don't know why NumLock  behaves diffrently from other Lock keys, though.

Quote
I noticed that, sometimes, pressing caps lock will lock up the whole board and I have had to pres caps lock on another keyboard to return functionality to the Z-150. In these cases, the board doesn't seem to send any output related to having pressed caps lock to the computer until pressing caps lock on another keyboard and pressing a key, in which case it belatedly sends both.

Another 'set LED' command caused by another keyboard may recovers from lockup somehow.
TMK products:HHKB Alt  ⌨ConvertersAlps64FC660C AltFC980C Alt