Recreated ZX Spectrum

For experts to discuss very technical stuff and newbies to ask why the Spectrum they bought off ebay doesn't work.
User avatar
Einar Saukas
Dizzy
Posts: 68
Joined: Wed Nov 15, 2017 2:48 pm

Re: Recreated ZX Spectrum

Post by Einar Saukas » Tue Nov 21, 2017 1:28 pm

This keyboard can report key presses only. It cannot report key releases. Therefore in normal "QWERTY Mode", a game would know when you pressed a key to go down, but it wouldn't know when you stopped pressing it.

The other "Game Mode" is a hack. For instance, whenever you press key "Z", the keyboard will report that "<" was pressed. And whenever you release key "Z", the keyboard will report that ">" was pressed. For each key in the keyboard, there's a corresponding pair of key codes to indicate when the actual key is pressed and when it's released.
0 x

dfzx
Berk
Posts: 14
Joined: Mon Nov 13, 2017 6:55 pm

Re: Recreated ZX Spectrum

Post by dfzx » Tue Nov 21, 2017 1:59 pm

Einar Saukas wrote:
Tue Nov 21, 2017 1:28 pm
This keyboard can report key presses only. It cannot report key releases. Therefore in normal "QWERTY Mode", a game would know when you pressed a key to go down, but it wouldn't know when you stopped pressing it.

The other "Game Mode" is a hack. For instance, whenever you press key "Z", the keyboard will report that "<" was pressed. And whenever you release key "Z", the keyboard will report that ">" was pressed. For each key in the keyboard, there's a corresponding pair of key codes to indicate when the actual key is pressed and when it's released.
I think "hack" is a bit strong. The keyboard generates coded "events", 40 of them to indicate a key going down, and 40 more indicating a key going up. That's always struck me as a perfectly good way for the keyboard to interact with its host. It certainly works, anyway. :)
0 x

User avatar
Einar Saukas
Dizzy
Posts: 68
Joined: Wed Nov 15, 2017 2:48 pm

Re: Recreated ZX Spectrum

Post by Einar Saukas » Tue Nov 21, 2017 2:24 pm

If you press "1", the keyboard will say you pressed "A".

If you press "A", the keyboard will say you pressed "O".

If you press "Z", it will say you pressed "<".

It works, but it's a hack! :)
0 x

dfzx
Berk
Posts: 14
Joined: Mon Nov 13, 2017 6:55 pm

Re: Recreated ZX Spectrum

Post by dfzx » Tue Nov 21, 2017 2:41 pm

Einar Saukas wrote:
Tue Nov 21, 2017 2:24 pm
If you press "1", the keyboard will say you pressed "A".

If you press "A", the keyboard will say you pressed "O".

If you press "Z", it will say you pressed "<".

It works, but it's a hack! :)
If you press "1", the keyboard will generate an event with an encoded 0x41 value... Admittedly it's a keyboard, so the only thing it knows how to "say" is "you pressed..." but that's an overly literal interpretation of the device's communication.

Maybe it's just my UNIX level view of things. In UNIX, as I'm sure you know, everything is either a file or a process. What's coming into the device file which is attached to the USB device is an encoding. I have a USB footpedal device which generates similar events. If you say "it's a keyboard" then yes, I suppose it's saying "you pressed...". My footpedal is therefore a keyboard with 3 keys, none of which are rubber. :)
0 x

Wall_Axe
Dizzy
Posts: 56
Joined: Mon Nov 13, 2017 11:13 pm

Re: Recreated ZX Spectrum

Post by Wall_Axe » Tue Nov 21, 2017 4:34 pm

the only way to authentically play Manic Miner is with rubber keys
0 x

User avatar
Spud
Berk
Posts: 46
Joined: Sun Nov 12, 2017 8:50 pm

Re: Recreated ZX Spectrum

Post by Spud » Tue Nov 21, 2017 9:19 pm

Spud wrote:
Tue Nov 21, 2017 12:59 pm
That's my evening sorted tonight: I'll give it a proper test and try things like BEEP, etc, and also make sure I can do a ". I could be making things up (I hope I am not :oops: )
What a berk!

I can confirm that with querty mode I can neither get a " character, or toggle extend mode.

In Fuse, using speccy mode I can do both.

I think I must have tested the " character in some other application such as Sim Coupé before as it can produce one using symbol shift and 2. That doesn't work in the proper speccy emulators I tested (specemu, zxspin & spectaculator).
0 x

Post Reply