XT Zenith Z-150 converter?

User avatar
ohaimark
Kingpin

22 Jul 2016, 22:52

The white labels are probably based on the AT protocol, but that doesn't account for their failure to work with TMK and Soarer's converters.

User avatar
paecific.jr

07 Jan 2017, 02:59

ohaimark wrote: So you need to bridge a resistor from the +5v line to the data and clock lines?

Edit: I have the requisite 1/2 watt 1K Ohm resistor.

Edit 2: image.

Edits 3+: fixed image.

First, sorry, very old thread.

Second, when I am looking at this image, what am I looking at (male or female end) and in which direction (Where the pins connect or where I solder to)?

User avatar
ohaimark
Kingpin

07 Jan 2017, 05:54

It's looking at the male side of the connector.

User avatar
paecific.jr

07 Jan 2017, 06:17

Thanks, I figured that out when it didn't work the other way. Hey, my keyboard is a black label and when I plug it in it times out. Any ideas?

User avatar
ohaimark
Kingpin

07 Jan 2017, 09:11

Do the LEDs light up? Does it make any sounds? We need to know more about the failure mode to complete a diagnosis.

User avatar
paecific.jr

07 Jan 2017, 20:11

Sometimes the leds light up. It doesn't make any sounds. When I plug it in HID listen returns R05

User avatar
juryduty

13 Jan 2017, 09:43

Hey, glad you guys are checking this out. I just built a Soarer's converter for my black label Z-150:
- no pullup resistors
- v1.12 firmware
- Teensy 2.0
- Reset line connected

It does work, but drops some keystrokes at a fast speed. Any clues on how to fix...

User avatar
ohaimark
Kingpin

13 Jan 2017, 09:51

paecific.jr: I have no idea. It's difficult to troubleshoot this sort of thing remotely.

juryduty: Once again, no idea. Try some pull up resistors (just because -- they're dirt cheap)?

User avatar
juryduty

14 Jan 2017, 03:27

thanks, am trying that, BTW, is it acceptable to connect the shell ground connector to ground on the Teensy or should it be left not connected?

User avatar
need

21 Jan 2017, 18:33

juryduty wrote: thanks, am trying that, BTW, is it acceptable to connect the shell ground connector to ground on the Teensy or should it be left not connected?
Hey man, have you tried it and does it work now?

User avatar
paecific.jr

25 Jan 2017, 03:49

I tried using a very generic at to ps2 adapter then a blue cube and didn't have any luck. The keyboard lights up the first time you plug it in.

Edit: I was messing with the adapters and if I go from at to ps2 into my ps2 port the keyboard works during post.
Edit 2: It only works for a few moments during post. Eventually it stops beeping.

User avatar
juryduty

28 Jan 2017, 11:29

I hooked up this board to a logic analyzer and it clearly speaks a different protocol. Here's an example.

This is a "normal" XT keystroke with the DATA line held normally low, and CLK normally high. When ready to send a code, 10 CLK falling edges are sent: 2 start bits, 8 data bits, for a total of 10 bits:

Image

This is a keystroke from the Z-150. The DATA line is held normally high (opposite). When ready to send a code, only 9 CLK falling edges are sent for a total of 9 bits. I'm guessing there is only 1 start bit.

Image

Also the RST line handling is different, I have captures of that too.

I'd really like to fixup TMK to support this and it's clearly possible as Soarer's converter partially makes it work (it reads keycodes but has lots of errors R05 and R06), but without Soarer's source code it's kind of tricky.

Anybody got his code? I found some zip file where somebody had reverse engineered it but it is password protected and I don't have the password.

cfraser

28 Jan 2017, 19:41

Huh, I just ordered some parts to do this for my black-label.

Yes, the communications protocol is different between XT and AT. I just had a quick look at the black-label Z-150 KB with a scope to verify voltage levels and ~ timings. For one thing, the data/clock/reset lines have pullups and are normally high. The black-label uses PC/XT format which is straight 8-bit character codes as far as I can see with my quick look, and XT tech. ref. doesn't mention any special comm. protocol (e.g. re start/stop/parity). Whereas the AT format is 11 bits which adds on start/stop/parity bits; I did not verify this yet, this is what the AT Technical manual states.

It is actually a pretty easy conversion, I could have sworn I did this years ago with a "stock" serial protocol converter chip...I bet I re-purposed it for something more needed later. Also, the KB needs a trivial 10-cent fix (already done here) to reset the 8748 micro on power-up otherwise it just doesn't seem to work at all with most things, certainly not with typical USB converters IME.

Haven't decided whether to convert straight to USB (external converter, very small and takes USB power), or to install the converter in the KB case and strictly convert XT->AT comm format...the latter suits me better I think, lots of brand new motherboards still support PS/2 KBs, most of the better ones actually (including my 2017 model mobo).

I also really like this KB, the feel of the green ALPS keys. In many ways I prefer the feel to the clicky Northgate, the greens feel more like my favorite KB which is not so useful for modern systems. Maybe I'll convert that other one (much) later, it'll be a lot more work because I'll have to manually type in all the keycodes (not a "PC" keyboard).

User avatar
juryduty

28 Jan 2017, 21:35

Yeah it's a decent board. I guess my point was that the black label Z-150 is an XT keyboard that does not speak XT. Using a model F as the "standard", the data line (opposite polarity), number of bits (9 vs. 10), and reset line are all different. I'm going to fiddle around with the TMK xt_usb module to try to match what I see on the line, but having somebody's source code would accelerate the effort. That's an interesting tip for the RST line, will google around for that.

cfraser

28 Jan 2017, 22:33

The "original" IBM PC KB seems very similar in theory, if not exact in exceution (chips), to the black-label Z-150. It also has pullups on the reset/data/clock lines, and those resistors are "useless" unless they're normally high for regular (non-OC etc.) TTL. Plus that LS TTL has hugely more drive capability in the low state than in the high, so you'd want the "signal" bits to be active-low.

The reset line for the 8748/8048 only needs an ~10uF cap to ground. This is easily done at the Z-150's cable connector where it bends to go into the PCB: cap + to middle pin, cap - to the connector pin just below it. If you don't have 10, anything somewhat larger is fine, but IIRC anything much smaller is unreliable as-is (i.e. using the built-in pullup 2k on the reset line for the timing).

Where did this 9 and 10 bits come from? I'm not saying it isn't that somewhere, but you need to be careful using a logic analyzer because it doesn't show you exactly what's there, it shows you how the signals are interpreted according to the parameters you specify (i.e. it creates a picture to aid in your interpretation, but it's not "real"). That's why when looking at something I don't know about I throw the scope on, then I can judge how it should be interpeted for the analyzer. I only see *8* clock pulses coming out of the Z-150 (black-label) for each char on the scope, I counted a bunch of times too. The XT ref manual and the H/Z-150 service manuals don't mention anything about there being anything else besides the 8 data bits either. Of course I'll look into it more exactly when I actually have to do the interface...

Edit: There are in fact *9* clock pulses, so much for my counting...actually, more like my trigger setting/view. So I guess you could call that first data that corresponds to the first clock pulse a start bit, or perhaps it's not actually part of the received data frame (why it's not mentioned in the docs) and the first clock pulse notifies the receiver that something is coming i.e. maybe it initializes the keyboard interrupt routine. Oh well, the thing that counts is what the AT keyboard puts out, have to match that. I have a serial data analyzer that I'll break out and check with once I get my converter parts.

User avatar
paecific.jr

29 Jan 2017, 04:29

Good work everyone! I am just starting my program (Computer engineering) and thus don't quite have these skills yet, but soon I hope I can be this helpful

User avatar
need

29 Jan 2017, 05:34

Not sure if this is relevant, but Soarer once said on GH:
I think the most likely problem (if any) is an occasional dropped keystroke - but it might well only happen when a keypress is made WHILE it's processing the idle AND also receiving updated LED state!! Also, if it's not using the XT protocol, it will simply ask the keyboard to resend the missed byte - the only sign that something has gone wrong will be that the LED on the Teensy lights up for a couple of seconds :-) "
My black label Z-150 also has a problem with missing keystrokes, and it happens whenever the LED on the Teensy lights up. I just thought that's similar to what Soarer has described above. The LED lights up every few seconds.

cfraser

29 Jan 2017, 20:42

paecific.jr wrote: Good work everyone! I am just starting my program (Computer engineering) and thus don't quite have these skills yet, but soon I hope I can be this helpful
While I was pondering what to do with the Z-150 KB, if anything, I thought this would be a great first year engineering project. A lot of aspects to it, you get to use some instruments, build a little bit, do some interfacing, and though not necessary for a learning project, end up with something "useful". I always like the interfacing aspect of electronics the best. This could easily be done with an e.g. Arduino Nano, so it's something popular/modern/nice to know, and you could handily pass on the results. I'll probably go that way myself since I already have a bunch of Arduino stuff, haven't decided for sure (since a "dumb" 8-pin Atmel chip might do the job too, and would be easier to install in the KB), but having marks/deadline would spur me...

User avatar
juryduty

06 Feb 2017, 08:36

OK guys, here's a .hex file for the Teensy 2.0 that works perfectly for the Zenith Z-150 black label. I added a few fixes and it finally works great without dropping any keystrokes. Please test it on your own Z-150 and post feedback here.
Attachments
xt_usb_zenith_z150.zip
(20.06 KiB) Downloaded 73 times

User avatar
need

06 Feb 2017, 16:38

juryduty wrote: OK guys, here's a .hex file for the Teensy 2.0 that works perfectly for the Zenith Z-150 black label. I added a few fixes and it finally works great without dropping any keystrokes. Please test it on your own Z-150 and post feedback here.
Thanks, this is great news! Can I upload this directly to a Soarer converter? Wiring will remain the same right?

If I do this, can I still use it for other PS/2 keyboards?

User avatar
Chyros

06 Feb 2017, 19:13

Yeah, could one upload it to an Orihalcon's and would that make it work, supposedly?

User avatar
juryduty

06 Feb 2017, 19:20

At the moment, this is a Z-150 only build that probably does not work with other boards.

Wiring is the same, but make sure you have the reset line wired to pin B7 (also same as Soarer's converter).

You can use an existing Soarer's converter but only if it is based on the Teensy 2.0, I can post other builds by request.

EDIT: Not sure about Orihalcon's because I don't know the hardware it's based on.

User avatar
need

06 Feb 2017, 19:32

juryduty wrote: At the moment, this is a Z-150 only build that probably does not work with other boards.

Wiring is the same, but make sure you have the reset line wired to pin B7 (also same as Soarer's converter).

You can use an existing Soarer's converter but only if it is based on the Teensy 2.0, I can post other builds by request.

Not sure about Orihalcon's because I don't know the hardware it's based on.
Thank you so much for this. Can't wait to test this out !

EDIT: It works beautifully!!!!!!!!!!

User avatar
paecific.jr

07 Feb 2017, 15:02

I'll test it for you tonight.

User avatar
juryduty

08 Feb 2017, 09:23

Thanks for testing it responding back. It's great to have this keyboard working without having to butcher it!

User avatar
paecific.jr

09 Feb 2017, 01:50

I would like to test this hex file on a Orihalcon's converter. How would I load a hex onto it?

User avatar
paecific.jr

09 Feb 2017, 04:49

I'm working on my Soarer's Converter right now and using scinfo doesn't detect a converter. I loaded the hex file onto my teensy.

User avatar
paecific.jr

11 Feb 2017, 05:03

I got it working! I had my converter wired wrong. Time to adapt to this keyboard now. I'm mostly a clicky person so this is a unique change. I'm assuming that for remapping and such we are just going with autohotkey?

User avatar
Chyros

11 Feb 2017, 20:02

So is there a way to get this working with an Orihalcon's converter? I'm really not very knowledgeable on the whole converter thing xD . I can't seem to upload the file to my Orihalcon's though.

User avatar
hasu

13 Feb 2017, 01:31

Did anyone try this keyboard with original IBM PC/XT or HAGSTROM XT converter? I like to know if this keyboard is compatible to XT or not.
https://www.hagstromelectronics.com/pro ... xtusb.html

After I looked into keyboard interface schematic and BIOS codes of XT tech reference, waveforms of XT keyboards and other resources, it seems to me like this keyboard is XT compatible somehow, its signals are strange and different from original XT keyboard, though.
http://www.reenigne.org/crtc/PC-XT.pdf
https://www.cs.cmu.edu/~jmcm/info/key2.txt
keyboards-f2/xt-zenith-z-150-converter- ... ml#p354189
https://geekhack.org/index.php?topic=62 ... msg1469706

I'm curious about whether Soarer's and TMK miss something to support XT protocol or the Zenith keyboard is just incompatible.

Post Reply

Return to “Keyboards”