Sandy Keyboard Interface, appeal

The Thor, Aurora, Q40, Q60 & Q68 etc. are discussed here.
User avatar
Chr$
QL Wafer Drive
Posts: 1315
Joined: Mon May 27, 2019 10:03 am
Location: Sachsen, Germany
Contact:

Sandy Keyboard Interface, appeal

Post by Chr$ »

I've put this in a separate thread because it will get lost in my QXT640 thread.

If anyone else has this same Sandy k/b interface that works I'd love to compare notes and get a copy of your ROM data, as my device doesn't work and it would be nice to confirm the ROM. I've attached a dump of my ROM, v 0.06 (note most of the ROM is blank, it seems to just use the top approx 2k).
20230227_124220.jpg
The same interface is also shown on the wiki at the bottom of this page:

https://qlwiki.qlforum.co.uk/doku.php?i ... _interface

I note that that one has some kind of meaty capacitor across 2 of the connections to the AT keyboard. Mine has a transistor mod added, which I think is probably an attempt to rectify whatever issue the capacitor was for.

My issue: With the device plugged in the QL will not boot from power-on, but does boot when then reset. Then a ROM message appears on screen as expected. None of the keys produce the character that they should produce, some produce 2 characters and after a short time the QL locks up. With the connection to the QL k/b connectors removed, it's the same behaviour, so it seems the k/b connection isn't doing anything.

I've checked and reinstated some broken connections. I also discovered a bad 74x chip yesterday and replaced it. Nothing seems to make any difference. For testing I'm using an old known working AT keyboard, but I've also tried a couple of PS/2 keyboards with convertors. Always the same issues.
Attachments
Sandy QXT640 Upgrade v0.06.zip
(1.63 KiB) Downloaded 142 times


https://QXL.WIN
Collector of QL related computers, accessories and QL games/software.
Ask me about felt pads - I can cut them to size and they have proved excellent for mdv data recovery.
martyn_hill
Aurora
Posts: 933
Joined: Sat Oct 25, 2014 9:53 am

Re: Sandy Keyboard Interface, appeal

Post by martyn_hill »

Hey Chris!

Didn't Dave say something about 'with a suitable mod, this interface could work with PS/2 keyboards'?

If I got that right, it suggests that at least the keyboard behaviour once booted might be due to incompatibility with your PS/2 keyboard, until such time as a suitable mod is made to the interface...

As for the boot up problem, that sounds much like generic QL boot up issues when, after testing RAM, the QDOS then attempts to configure the ZX8302 and communicate with the 8049 co-pro. Just can't recall what the usual remedy was, but I've seen it on a couple of my own vanilla QLs before when Ive been messing about with the 2nd ULA...


User avatar
RalfR
Aurora
Posts: 872
Joined: Fri Jun 15, 2018 8:58 pm

Re: Sandy Keyboard Interface, appeal

Post by RalfR »

martyn_hill wrote: Mon Feb 27, 2023 12:53 pmDidn't Dave say something about 'with a suitable mod, this interface could work with PS/2 keyboards'?

If I got that right, it suggests that at least the keyboard behaviour once booted might be due to incompatibility with your PS/2 keyboard, until such time as a suitable mod is made to the interface...
That was my first thought too. As I recall, SPEM's keyboards were connected to the QXT with a ribbon cable.


4E75 7000
User avatar
tofro
Font of All Knowledge
Posts: 2702
Joined: Sun Feb 13, 2011 10:53 pm
Location: SW Germany

Re: Sandy Keyboard Interface, appeal

Post by tofro »

Now that's an interesting keyboard interface!

Some RAM, some ROM (Both way overkill for 128 possible keys), a serial-to parallel chip, a flip-flop, some bus drivers, a PAL, and a multiplexer. And no computational logic at all. The connection to the QL bus is apparently just for power supply (that also means the ROM message you see is unlikely to come from this card).

I guess what happens is the serial bit stream from the keyboard is converted to key states in RAM for all QL-supported keys (according to the received make/break code), and translated by the EPROM to the QL's keyboard matrix output . That would mean the EPROM holds the "keystate-to-matrix" translation and outputs a signal derived from the RAM keystate to the matrix outputs when it sees the proper matrix input from the 8049 (the . Also means the EPROM contents is not something you can easily reconstruct without knowing what's expected from the serial keyboard. I would guess that keyboard needs to be the old, original PC (and PC/XT) type with single-byte scancodes. PS/2 (or AT) keyboards wouldn't work because they send multi-byte sequences as make/break codes that such a simple interface wouldn't be able to translate. There are, however, PS/2 to XT adapters that you can buy.
Last edited by tofro on Mon Feb 27, 2023 2:43 pm, edited 1 time in total.


ʎɐqǝ ɯoɹɟ ǝq oʇ ƃuᴉoƃ ʇou sᴉ pɹɐoqʎǝʞ ʇxǝu ʎɯ 'ɹɐǝp ɥO
User avatar
Chr$
QL Wafer Drive
Posts: 1315
Joined: Mon May 27, 2019 10:03 am
Location: Sachsen, Germany
Contact:

Re: Sandy Keyboard Interface, appeal

Post by Chr$ »

Yes, the previous remark about making it PS/2 friendly is why I was using a real old AT keyboard. I suppose that may not be compatible somehow, perhaps it's fussy with AT keyboards, although the k/b works fine with all manner of old PC motherboards (and it can be switched to XT mode, so also works with an XT). In fact, I could also try the same k/b in XT mode.

As for the boot from power on issue, it only ever happens with this card attached and it happens on JS too, but on JS the screen is simply blank. Just on Minerva the logo appears bottom right and it gets stuck there, unless you reset in that state. Without the card, the QL behaves as it should.

The screen ROM message definitely comes from this card, it shows the QXT Upgrade v0.06 message that also appears in the ROM code.

Be nice to get it working to eventually reverse engineer and then use as a QL to PS/2 interface.


https://QXL.WIN
Collector of QL related computers, accessories and QL games/software.
Ask me about felt pads - I can cut them to size and they have proved excellent for mdv data recovery.
User avatar
Chr$
QL Wafer Drive
Posts: 1315
Joined: Mon May 27, 2019 10:03 am
Location: Sachsen, Germany
Contact:

Re: Sandy Keyboard Interface, appeal

Post by Chr$ »

martyn_hill wrote: Mon Feb 27, 2023 12:53 pm As for the boot up problem, that sounds much like generic QL boot up issues when, after testing RAM, the QDOS then attempts to configure the ZX8302 and communicate with the 8049 co-pro. Just can't recall what the usual remedy was, but I've seen it on a couple of my own vanilla QLs before when Ive been messing about with the 2nd ULA...
I have some spare ZX803's that I could also try out in case the one fitted is borderline.

Oh and by the way, on boot the 3 k/b lights all flash once, which I think is normal. The k/b has an 'on line' light to indicate it has power, and that one stays lit as expected.


https://QXL.WIN
Collector of QL related computers, accessories and QL games/software.
Ask me about felt pads - I can cut them to size and they have proved excellent for mdv data recovery.
User avatar
RalfR
Aurora
Posts: 872
Joined: Fri Jun 15, 2018 8:58 pm

Re: Sandy Keyboard Interface, appeal

Post by RalfR »

Chr$ wrote: Mon Feb 27, 2023 2:40 pmThe screen ROM message definitely comes from this card, it shows the QXT Upgrade v0.06 message that also appears in the ROM code.
Perhaps this is the only reason for beeing connected to the expansion port?


4E75 7000
User avatar
tofro
Font of All Knowledge
Posts: 2702
Joined: Sun Feb 13, 2011 10:53 pm
Location: SW Germany

Re: Sandy Keyboard Interface, appeal

Post by tofro »

Chr$ wrote: Mon Feb 27, 2023 2:40 pm Yes, the previous remark about making it PS/2 friendly is why I was using a real old AT keyboard. I suppose that may not be compatible somehow, perhaps it's fussy with AT keyboards, although the k/b works fine with all manner of old PC motherboards (and it can be switched to XT mode, so also works with an XT). In fact, I could also try the same k/b in XT mode.
I guess this interface will only work with XT keyboards (or, maybe, with you switchable AT keyboard in XT mode). AT sends multi-byte sequences, as I said above, judging by the ICs, I can see no way this interface would be capable of digesting other than 8-bit (rather 7, the upper bit seems to go into the pressed/not pressed flip-flop) make/break codes. What it seems to do is
  1. receive 8-bit make/break code
  2. strip off upper bit into key pressed/not pressed flipflop (which only works on XT keyboards that way. AT Keyboards send xx for a pressed key, something like F0xx for a non-pressed one. This is what seems to confuse your interface)
  3. store that key state in the RAM chip
That produces a table of bytes in the RAM chip (I would guess only 128 bytes are used in that 2K RAM) that represent the key pressed/not pressed state.

The other half of the logic looks at the matrix input states the QL 8049 produces and builds an address in the RAM from that.
The RAM will then provide the proper bit(s) on the matrix output lines at that very same moment to signal the pressed/not pressed state to the 8049.
Chr$ wrote: Mon Feb 27, 2023 2:40 pm As for the boot from power on issue, it only ever happens with this card attached and it happens on JS too, but on JS the screen is simply blank. Just on Minerva the logo appears bottom right and it gets stuck there, unless you reset in that state. Without the card, the QL behaves as it should.

The screen ROM message definitely comes from this card, it shows the QXT Upgrade v0.06 message that also appears in the ROM code.
It's likely the bus connection is needed to reset the keyboard on startup - maybe that's done from the QL ROM. XT keyboards want a reset on power-up to wake up and initiate communications. It could be the ROM makes the QL wait until the keyboard's ready. Without the proper keyboard, that is then unlikely to happen ;)
Chr$ wrote: Mon Feb 27, 2023 2:40 pm Be nice to get it working to eventually reverse engineer and then use as a QL to PS/2 interface.
Wouldn't want to discourage you, but I'd say if you want to make this interface concept PS/2-compatible that you'd have to add so much logic it would be way simpler to use something like an AVR and a bit of chicken food to do the same thing in a much simpler way. That would work with no QL bus connection (and ROM) at all and free a bus slot.


ʎɐqǝ ɯoɹɟ ǝq oʇ ƃuᴉoƃ ʇou sᴉ pɹɐoqʎǝʞ ʇxǝu ʎɯ 'ɹɐǝp ɥO
User avatar
Chr$
QL Wafer Drive
Posts: 1315
Joined: Mon May 27, 2019 10:03 am
Location: Sachsen, Germany
Contact:

Re: Sandy Keyboard Interface, appeal

Post by Chr$ »

Well that was a massive rabbit hole then!

It is indeed designed for an XT keyboard as you correctly surmised tofro. It said 'AT' on the wiki page. I've corrected that now.

I know from PC's that XT/AT are two very different kettles of fish.

With the same k/b switched to XT mode it mainly works so I'll stop there and just be happy with it (would still like to compare ROM data, should another come along). There are still the following issues that make it essentially unusable:

Same behaviour at power on, i.e. it doesn't properly boot but does when you reset after turning on.
Some keys completely freeze the QL, sometimes with a coloured pattern screen (keys noted that do that - the left arrow, number pad '/' and the number pad enter... I didn't try them all).

I have an XT to PS/2 convertor device and tried that just now with a very new PS/2 keyboard - no keys worked at all. With a very old PS/2 k/b attached to the convertor it worked exactly the same as the original XT k/b (with lockups etc).

I wonder if the Sandy keyboard interface simply wasn't widely compatible with different types of XT k/b.


https://QXL.WIN
Collector of QL related computers, accessories and QL games/software.
Ask me about felt pads - I can cut them to size and they have proved excellent for mdv data recovery.
User avatar
tofro
Font of All Knowledge
Posts: 2702
Joined: Sun Feb 13, 2011 10:53 pm
Location: SW Germany

Re: Sandy Keyboard Interface, appeal

Post by tofro »

Chr$ wrote: Mon Feb 27, 2023 3:59 pm
I wonder if the Sandy keyboard interface simply wasn't widely compatible with different types of XT k/b.
Well, that probably has to do with the fact that, at that time, different types of XT keyboards weren't even compatible with each other - "the standard" was just stabilizing. Original PC keyboards use 2 start bits - "compatible" ones tend to use only one. Timing (that is, bit rate) varied widely. Whether they start to operate with or w/o a dedicated reset signal after power-on is also, apparently, pure coincidence. Most vendors simply seemed to assume you'd never replace the keyboard they supplied with your computer. So, it might very well be worth trying some more makes of XT keyboards with your interface.


ʎɐqǝ ɯoɹɟ ǝq oʇ ƃuᴉoƃ ʇou sᴉ pɹɐoqʎǝʞ ʇxǝu ʎɯ 'ɹɐǝp ɥO
Post Reply