Page 1 of 1

Re: Recreated ZX Spectrum

Posted: Tue Nov 21, 2017 1:28 pm
by Einar Saukas
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.

Re: Recreated ZX Spectrum

Posted: Tue Nov 21, 2017 1:59 pm
by dfzx
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. :)

Re: Recreated ZX Spectrum

Posted: Tue Nov 21, 2017 2:24 pm
by Einar Saukas
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! :)

Re: Recreated ZX Spectrum

Posted: Tue Nov 21, 2017 2:41 pm
by dfzx
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. :)

Re: Recreated ZX Spectrum

Posted: Tue Nov 21, 2017 4:34 pm
by Wall_Axe
the only way to authentically play Manic Miner is with rubber keys

Re: Recreated ZX Spectrum

Posted: Tue Nov 21, 2017 9:19 pm
by Spud
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).