ZX Spectrum Recreated Would Work as Bluetooth Keyboard With MiSTer?

akeley
Top Contributor
Posts: 1315
Joined: Mon May 25, 2020 7:54 pm
Has thanked: 426 times
Been thanked: 415 times

Re: ZX Spectrum Recreated Would Work as Bluetooth Keyboard With MiSTer?

Unread post by akeley »

pgimeno wrote: Fri Dec 03, 2021 11:04 pm Note that most PC keyboards will suffer from key jamming, which will mask the ghosting.
Whoa, I had never heard about that before! And I've played quite a lot of PC games using KB+M.

Coincidentially, I was playing Renegade on teh ZX core yesterday using keyboard (instead of my usual DS4-as-Kempston) and could not execute the jump kick-right move (left one was fine). My keys were W/S for Up/Down, O/P for left right and ] for Hit. Could it be because of that "jamming" issue?
User avatar
pgimeno
Top Contributor
Posts: 679
Joined: Thu Jun 11, 2020 9:44 am
Has thanked: 260 times
Been thanked: 210 times

Re: ZX Spectrum Recreated Would Work as Bluetooth Keyboard With MiSTer?

Unread post by pgimeno »

akeley wrote: Tue Dec 07, 2021 7:40 pm Coincidentially, I was playing Renegade on teh ZX core yesterday using keyboard (instead of my usual DS4-as-Kempston) and could not execute the jump kick-right move (left one was fine). My keys were W/S for Up/Down, O/P for left right and ] for Hit. Could it be because of that "jamming" issue?
If it involves three keys, then most probably, yes. You can try to find a combo of keys that you can press at the same time with that keyboard without any jamming. Can't offer advice on that as it's different with every keyboard.

I guess MAME chose Ctrl, Alt and Shift as preferred buttons mainly for that reason - they are usually separate buttons and don't suffer from jamming.
User avatar
_paul_
Posts: 64
Joined: Mon Aug 31, 2020 4:44 pm
Has thanked: 11 times
Been thanked: 16 times

Re: ZX Spectrum Recreated Would Work as Bluetooth Keyboard With MiSTer?

Unread post by _paul_ »

pgimeno wrote: Fri Dec 03, 2021 11:04 pm Okay, so as I said in an earlier post, I wasn't happy about the lack of ghosting in the Recreated keyboard (or in the core in general), so I've added it to the core as an option. I must say that I'm somewhat perplexed that the Recreated keyboard does not suffer from ghosting.
….
I may well be missing something but the tzx version does not work for me; I get this screen.
Attachments
1D3C32DA-B080-4438-A22A-7979294C6E65.jpeg
1D3C32DA-B080-4438-A22A-7979294C6E65.jpeg (152.42 KiB) Viewed 13353 times
Hetzen
Posts: 141
Joined: Thu Oct 14, 2021 1:55 pm
Has thanked: 72 times
Been thanked: 43 times

Re: ZX Spectrum Recreated Would Work as Bluetooth Keyboard With MiSTer?

Unread post by Hetzen »

Did you change the keyboard type in the core menu?
User avatar
pgimeno
Top Contributor
Posts: 679
Joined: Thu Jun 11, 2020 9:44 am
Has thanked: 260 times
Been thanked: 210 times

Re: ZX Spectrum Recreated Would Work as Bluetooth Keyboard With MiSTer?

Unread post by pgimeno »

_paul_ wrote: Fri Dec 10, 2021 7:51 pm I may well be missing something but the tzx version does not work for me; I get this screen.
Sorry but I have absolutely no idea where that may be coming from. It looks like a test pattern of some sort; maybe it's not detecting boot.rom correctly for you and boots from a built-in test ROM that displays that pattern? I haven't found any evidence of such ROM though.
User avatar
_paul_
Posts: 64
Joined: Mon Aug 31, 2020 4:44 pm
Has thanked: 11 times
Been thanked: 16 times

Re: ZX Spectrum Recreated Would Work as Bluetooth Keyboard With MiSTer?

Unread post by _paul_ »

On start-up it always has this screen for me. If I reset the core (with or without making any changes to the core settings) the core boots fine.

Edit: found this in the ZX Spectrum manual
The Spectrum 128 has a built-in TV test screen to ensure that you get the best possible picture and sound. You turn it
on by holding down the [BREAK] key and pressing the reset button or switching on the power. When your TV is
tuned correctly, you will see a multi-coloured pattern and hear an intermittent tone.
I could not trigger this with the default ZX Spectrum core.

With the tzx variant I found that, with the "Normal" keyboard setting in the core settings, a key often gets stuck in auto repeat, both with my normal USB keyboard as well as with the Recreated keyboard set to PC config. It does not do that with the earlier core.

With the Recreated keyboard setting selected in the core options it works fine.
User avatar
pgimeno
Top Contributor
Posts: 679
Joined: Thu Jun 11, 2020 9:44 am
Has thanked: 260 times
Been thanked: 210 times

Re: ZX Spectrum Recreated Would Work as Bluetooth Keyboard With MiSTer?

Unread post by pgimeno »

_paul_ wrote: Sat Dec 11, 2021 8:29 am With the tzx variant I found that, with the "Normal" keyboard setting in the core settings, a key often gets stuck in auto repeat, both with my normal USB keyboard as well as with the Recreated keyboard set to PC config. It does not do that with the earlier core.
I guess it's the ghosting option that is causing problems, then. Does setting/clearing it help in any way? What's it set to by default?

Edit: Never mind, I can reproduce the issue and I think I have identified the cause. Yes, it's about the ghosting option. I'll post the fixed core soon.
User avatar
pgimeno
Top Contributor
Posts: 679
Joined: Thu Jun 11, 2020 9:44 am
Has thanked: 260 times
Been thanked: 210 times

Re: ZX Spectrum Recreated Would Work as Bluetooth Keyboard With MiSTer?

Unread post by pgimeno »

Here's the fixed core and corresponding patch.
Attachments
ZX-Spectrum-recreated-tzx-ghosting.patch.zip
(6.42 KiB) Downloaded 215 times
ZX-Spectrum-recr-tzx.rbf
(3.06 MiB) Downloaded 214 times
User avatar
_paul_
Posts: 64
Joined: Mon Aug 31, 2020 4:44 pm
Has thanked: 11 times
Been thanked: 16 times

Re: ZX Spectrum Recreated Would Work as Bluetooth Keyboard With MiSTer?

Unread post by _paul_ »

pgimeno wrote: Sat Dec 11, 2021 1:21 pm Here's the fixed core and corresponding patch.
Seems to work! I no longer get the test screen and could not reproduce the sticky keys issue.
EeDee
Posts: 244
Joined: Thu Dec 24, 2020 12:33 pm
Has thanked: 10 times
Been thanked: 47 times

Re: ZX Spectrum Recreated Would Work as Bluetooth Keyboard With MiSTer?

Unread post by EeDee »

MiSTer_Kirk wrote: Thu Nov 18, 2021 2:25 pm The beauty of the Mister is that we can finally ditch that god-awful rubber keyboard, and use a modern keyboard....
I also have a few 48k spectrums here, and I try to use the keyboard less, and less. I now use a Comcon Joystick interface that allows keyboard-only games to be mapped to this device - just to avoid that keyboard.
:lol:
Hetzen
Posts: 141
Joined: Thu Oct 14, 2021 1:55 pm
Has thanked: 72 times
Been thanked: 43 times

Re: ZX Spectrum Recreated Would Work as Bluetooth Keyboard With MiSTer?

Unread post by Hetzen »

But if you 'morons' don't use that keyboard, it's not a Spectrum.....

:lol:
MiSTer_Kirk
Posts: 210
Joined: Thu Feb 04, 2021 11:42 pm
Has thanked: 18 times
Been thanked: 46 times

Re: ZX Spectrum Recreated Would Work as Bluetooth Keyboard With MiSTer?

Unread post by MiSTer_Kirk »

EeDee wrote: Mon Dec 13, 2021 10:18 pm
MiSTer_Kirk wrote: Thu Nov 18, 2021 2:25 pm The beauty of the Mister is that we can finally ditch that god-awful rubber keyboard, and use a modern keyboard....
I also have a few 48k spectrums here, and I try to use the keyboard less, and less. I now use a Comcon Joystick interface that allows keyboard-only games to be mapped to this device - just to avoid that keyboard.
:lol:
Tiny minds, so easily pleased. So I hated the rubber keyboard ? So what ? WTF does that have to do with anything ?
EeDee
Posts: 244
Joined: Thu Dec 24, 2020 12:33 pm
Has thanked: 10 times
Been thanked: 47 times

Re: ZX Spectrum Recreated Would Work as Bluetooth Keyboard With MiSTer?

Unread post by EeDee »

MiSTer_Kirk wrote: Mon Dec 13, 2021 11:32 pm
EeDee wrote: Mon Dec 13, 2021 10:18 pm
MiSTer_Kirk wrote: Thu Nov 18, 2021 2:25 pm The beauty of the Mister is that we can finally ditch that god-awful rubber keyboard, and use a modern keyboard....
I also have a few 48k spectrums here, and I try to use the keyboard less, and less. I now use a Comcon Joystick interface that allows keyboard-only games to be mapped to this device - just to avoid that keyboard.
:lol:
Tiny minds, so easily pleased. So I hated the rubber keyboard ? So what ? WTF does that have to do with anything ?
All I did was laugh at the way you put what I agreed with :cry:
User avatar
pgimeno
Top Contributor
Posts: 679
Joined: Thu Jun 11, 2020 9:44 am
Has thanked: 260 times
Been thanked: 210 times

Re: ZX Spectrum Recreated Would Work as Bluetooth Keyboard With MiSTer?

Unread post by pgimeno »

It wouldn't make sense to add Recreated support to a ZX Next, but it does make sense to add it to the ZX81, which has a very similar layout. So here it is. It also adds ghosting support.

There are a few changes to the normal keyboard, but they are minor and backward compatible. The only incompatible change is that the numeric keypad works as numbers instead of cursor movement, but the normal cursor keys still work as usual. There's a new option to not press Shift when pressing the normal cursor keys (e.g. for games that are controlled with 5,6,7,8). For compatibility with the official core, these keys are shifted by default.

With this change:

  • Both single and double quotes produce double quotes. Previously, you had to press single quote to get double, and pressing double did nothing.
  • Shift+Comma produces less-than. Note that Shift+Period produces a comma, because the period is the raw ZX81 key and in a real ZX81 it produces a comma.
  • The keys in the numeric keypad all work, except for Num Lock which does this weird MiSTer function that I don't understand.
  • Tab is equivalent to Shift Enter (Function mode).
  • Caps Lock is equivalent to Shift 9 (Graph mode).
  • Key 102 in some European keyboards (the one between left shift and Z, if present) produces < and >.

I've also revamped the keyboard handling. It no longer happens that the shift key gets released while you hold it when pressing other keys. For example, in the official core, this combination does not work as expected: press and hold SHIFT, press ":", release ":", press "B". Since SHIFT is still pressed, pressing "B" should produce an asterisk, but we get a B. With this core that's fixed and you get an asterisk, as expected. This or similar problems are common in most cores; it's rare to see a core that gets this right.

In Recreated mode, the normal keyboard keys that aren't incompatible with the Recreated keyboard still work, e.g. the keypad and cursor keys, if you have both keyboards connected at the same time.

Finally, I've created a keyboard test program (also attached) in machine code, to check the keys.

Attachments
ZX81-recr.rbf
(2.73 MiB) Downloaded 206 times
ZX81-recreated.patch.zip
(7.08 KiB) Downloaded 215 times
keytest.p.zip
(398 Bytes) Downloaded 212 times
User avatar
pgimeno
Top Contributor
Posts: 679
Joined: Thu Jun 11, 2020 9:44 am
Has thanked: 260 times
Been thanked: 210 times

Re: ZX Spectrum Recreated Would Work as Bluetooth Keyboard With MiSTer?

Unread post by pgimeno »

Rebased the patch on the latest master, to grab the changes (colour tuning, shadow masks).

The patch has applied without conflicts, so I am not including it again because the previous one is good, therefore for source code go to this post: viewtopic.php?p=39308#p39308
Attachments
ZX-Spectrum-recr_20220204.rbf
(3.07 MiB) Downloaded 209 times
User avatar
pgimeno
Top Contributor
Posts: 679
Joined: Thu Jun 11, 2020 9:44 am
Has thanked: 260 times
Been thanked: 210 times

Re: ZX Spectrum Recreated Would Work as Bluetooth Keyboard With MiSTer?

Unread post by pgimeno »

New release, new rebase. The ZX81 core was also updated this time, so it's two of them.

As before, the patches remain intact, so refer to previous posts for the source code of the patches.
Attachments
ZX81-recr_20220217.rbf
(2.72 MiB) Downloaded 186 times
ZX-Spectrum-recr_20220217.rbf
(3.07 MiB) Downloaded 207 times
rhester72
Top Contributor
Posts: 1119
Joined: Thu Jun 11, 2020 2:31 am
Has thanked: 13 times
Been thanked: 171 times

Re: ZX Spectrum Recreated Would Work as Bluetooth Keyboard With MiSTer?

Unread post by rhester72 »

@pgimeno Thank you SO much for continuing to provide these...here's hoping hey somehow make it past the politics into mainline someday!
AmintaMister
Posts: 290
Joined: Thu Sep 16, 2021 10:54 pm
Has thanked: 764 times
Been thanked: 45 times

Re: ZX Spectrum Recreated Would Work as Bluetooth Keyboard With MiSTer?

Unread post by AmintaMister »

Hi! Do you continue to support the ZX Spectrum recreated, @pgimeno?
User avatar
pgimeno
Top Contributor
Posts: 679
Joined: Thu Jun 11, 2020 9:44 am
Has thanked: 260 times
Been thanked: 210 times

Re: ZX Spectrum Recreated Would Work as Bluetooth Keyboard With MiSTer?

Unread post by pgimeno »

Yes, sure. I haven't updated in a while due to RL circumstances, so I missed the June update. Apologies and thanks for pinging.

Due to said circumstances, the core is untested this time, sorry.

I also have plans to allow the Jupiter Ace core to use this keyboard, but I haven't found enough time yet.
Attachments
ZX-Spectrum-recr_220818.rbf
(3.08 MiB) Downloaded 167 times
AmintaMister
Posts: 290
Joined: Thu Sep 16, 2021 10:54 pm
Has thanked: 764 times
Been thanked: 45 times

Re: ZX Spectrum Recreated Would Work as Bluetooth Keyboard With MiSTer?

Unread post by AmintaMister »

pgimeno wrote: Thu Aug 18, 2022 10:20 pm Yes, sure. I haven't updated in a while due to RL circumstances, so I missed the June update. Apologies and thanks for pinging.

Due to said circumstances, the core is untested this time, sorry.

I also have plans to allow the Jupiter Ace core to use this keyboard, but I haven't found enough time yet.
Thanks!!!
AmintaMister
Posts: 290
Joined: Thu Sep 16, 2021 10:54 pm
Has thanked: 764 times
Been thanked: 45 times

Re: ZX Spectrum Recreated Would Work as Bluetooth Keyboard With MiSTer?

Unread post by AmintaMister »

Hi @pgimeno, I've found a ZX Spectrum Recreated Keyboard at last and it work beautifully with your patch. One question: can you also update the latest versione of the MikeS1 core (https://github.com/MikeS11/MiSTerFPGA_YC_Encoder)? Because to use the Zx Spectrum both in composite and with the rubber keyboard would be a dream! By the way, do you think that now that some time is passed would be possible to merge your patch in the main repo?

Still thanks!
User avatar
pgimeno
Top Contributor
Posts: 679
Joined: Thu Jun 11, 2020 9:44 am
Has thanked: 260 times
Been thanked: 210 times

Re: ZX Spectrum Recreated Would Work as Bluetooth Keyboard With MiSTer?

Unread post by pgimeno »

AmintaMister wrote: Mon Oct 31, 2022 11:08 pm Hi @pgimeno, I've found a ZX Spectrum Recreated Keyboard at last and it work beautifully with your patch. One question: can you also update the latest versione of the MikeS1 core (https://github.com/MikeS11/MiSTerFPGA_YC_Encoder)? Because to use the Zx Spectrum both in composite and with the rubber keyboard would be a dream!
Glad you're enjoying it! As for the question, I don't know. I've tried replacing the sys folder with MikeS11's before compiling; there was a problem that the Spectrum core lacked a VGA_DISABLE signal, so I've added it and set it to 1 in the understanding that composite output does not need VGA. That allowed it to compile, but I'm not sure if the result is what you expect, and I have no way to try.
SpectrumYC-recr.rbf
(3.1 MiB) Downloaded 148 times

AmintaMister wrote: Mon Oct 31, 2022 11:08 pm By the way, do you think that now that some time is passed would be possible to merge your patch in the main repo?
I left GitHub for good after Microsoft purchased it and I have no intention to return, and unfortunately there's no alternative for proposing patches other than a GitHub pull request. If someone else wants to submit the patch as a pull request, then yes there's a chance that it will get merged, but if no one submits it, obviously not.
AmintaMister
Posts: 290
Joined: Thu Sep 16, 2021 10:54 pm
Has thanked: 764 times
Been thanked: 45 times

Re: ZX Spectrum Recreated Would Work as Bluetooth Keyboard With MiSTer?

Unread post by AmintaMister »

pgimeno wrote: Tue Nov 01, 2022 12:20 pm
AmintaMister wrote: Mon Oct 31, 2022 11:08 pm Hi @pgimeno, I've found a ZX Spectrum Recreated Keyboard at last and it work beautifully with your patch. One question: can you also update the latest versione of the MikeS1 core (https://github.com/MikeS11/MiSTerFPGA_YC_Encoder)? Because to use the Zx Spectrum both in composite and with the rubber keyboard would be a dream!
Glad you're enjoying it! As for the question, I don't know. I've tried replacing the sys folder with MikeS11's before compiling; there was a problem that the Spectrum core lacked a VGA_DISABLE signal, so I've added it and set it to 1 in the understanding that composite output does not need VGA. That allowed it to compile, but I'm not sure if the result is what you expect, and I have no way to try.




AmintaMister wrote: Mon Oct 31, 2022 11:08 pm By the way, do you think that now that some time is passed would be possible to merge your patch in the main repo?
I left GitHub for good after Microsoft purchased it and I have no intention to return, and unfortunately there's no alternative for proposing patches other than a GitHub pull request. If someone else wants to submit the patch as a pull request, then yes there's a chance that it will get merged, but if no one submits it, obviously not.
Thanks Pgimeno, I will try your build in the afternoon.

If you want, I can propose the patch via GitHub pull request with my Gituhb account, let me know!

Many thanks!!

Davide
AmintaMister
Posts: 290
Joined: Thu Sep 16, 2021 10:54 pm
Has thanked: 764 times
Been thanked: 45 times

Re: ZX Spectrum Recreated Would Work as Bluetooth Keyboard With MiSTer?

Unread post by AmintaMister »

pgimeno wrote: Tue Nov 01, 2022 12:20 pm
AmintaMister wrote: Mon Oct 31, 2022 11:08 pm Hi @pgimeno, I've found a ZX Spectrum Recreated Keyboard at last and it work beautifully with your patch. One question: can you also update the latest versione of the MikeS1 core (https://github.com/MikeS11/MiSTerFPGA_YC_Encoder)? Because to use the Zx Spectrum both in composite and with the rubber keyboard would be a dream!
Glad you're enjoying it! As for the question, I don't know. I've tried replacing the sys folder with MikeS11's before compiling; there was a problem that the Spectrum core lacked a VGA_DISABLE signal, so I've added it and set it to 1 in the understanding that composite output does not need VGA. That allowed it to compile, but I'm not sure if the result is what you expect, and I have no way to try.




AmintaMister wrote: Mon Oct 31, 2022 11:08 pm By the way, do you think that now that some time is passed would be possible to merge your patch in the main repo?
I left GitHub for good after Microsoft purchased it and I have no intention to return, and unfortunately there's no alternative for proposing patches other than a GitHub pull request. If someone else wants to submit the patch as a pull request, then yes there's a chance that it will get merged, but if no one submits it, obviously not.
Unfortunately, it doesn't work: I get only a black screen as result...
User avatar
pgimeno
Top Contributor
Posts: 679
Joined: Thu Jun 11, 2020 9:44 am
Has thanked: 260 times
Been thanked: 210 times

Re: ZX Spectrum Recreated Would Work as Bluetooth Keyboard With MiSTer?

Unread post by pgimeno »

Same thing but with the VGA_DISABLE line set to 0. Please give it a try as well. If this doesn't work then I'll give up for now because I have no idea how to compile the files. You may be luckier by submitting my patch to that repo and asking the author if it can be included as part of the Spectrum build.
Attachments
SpectrumYC-recr.rbf
(3.15 MiB) Downloaded 154 times
User avatar
pgimeno
Top Contributor
Posts: 679
Joined: Thu Jun 11, 2020 9:44 am
Has thanked: 260 times
Been thanked: 210 times

Re: ZX Spectrum Recreated Would Work as Bluetooth Keyboard With MiSTer?

Unread post by pgimeno »

AmintaMister wrote: Tue Nov 01, 2022 12:27 pm If you want, I can propose the patch via GitHub pull request with my Gituhb account, let me know!
If you have git skills, sure. I've uploaded the patch to https://codeberg.org/pgimeno/ZX-Spectru ... created-zx to make it simpler.

It seems I missed another sys update. I'll recompile with it ASAP.
User avatar
pgimeno
Top Contributor
Posts: 679
Joined: Thu Jun 11, 2020 9:44 am
Has thanked: 260 times
Been thanked: 210 times

Re: ZX Spectrum Recreated Would Work as Bluetooth Keyboard With MiSTer?

Unread post by pgimeno »

Here it is (the regular core, not the composite one) with the latest framework changes and the rebased patch. Not sure what's new, but apparently the VGA_DISABLE thing was part of that update.
Attachments
ZX-Spectrum-recr_20221102.rbf
(3.12 MiB) Downloaded 149 times
AmintaMister
Posts: 290
Joined: Thu Sep 16, 2021 10:54 pm
Has thanked: 764 times
Been thanked: 45 times

Re: ZX Spectrum Recreated Would Work as Bluetooth Keyboard With MiSTer?

Unread post by AmintaMister »

pgimeno wrote: Wed Nov 02, 2022 9:19 pm

Here it is (the regular core, not the composite one) with the latest framework changes and the rebased patch. Not sure what's new, but apparently the VGA_DISABLE thing was part of that update.

Hi! Pgimeno! Your core works perfectly in the regular one version; in the composite version it starts correctly but it lacks, in the menu, the two options to activate composite that you can see here below:

IMG_0339.jpeg
IMG_0339.jpeg (1.46 MiB) Viewed 4402 times

About Git, I'm a web developer so I can use it, as soon I have time I will fork it in Github and I will make a PR, thanks!

User avatar
LamerDeluxe
Top Contributor
Posts: 1181
Joined: Sun May 24, 2020 10:25 pm
Has thanked: 828 times
Been thanked: 266 times

Re: ZX Spectrum Recreated Would Work as Bluetooth Keyboard With MiSTer?

Unread post by LamerDeluxe »

AmintaMister wrote: Wed Nov 02, 2022 11:05 pm
pgimeno wrote: Wed Nov 02, 2022 9:19 pm

Here it is (the regular core, not the composite one) with the latest framework changes and the rebased patch. Not sure what's new, but apparently the VGA_DISABLE thing was part of that update.

Hi! Pgimeno! Your core works perfectly in the regular one version; in the composite version it starts correctly but it lacks, in the menu, the two options to activate composite that you can see here below:

About Git, I'm a web developer so I can use it, as soon I have time I will fork it in Github and I will make a PR, thanks!

I've sent MikeS1 a DM about this, hopefully he will have some time to help out.

AmintaMister
Posts: 290
Joined: Thu Sep 16, 2021 10:54 pm
Has thanked: 764 times
Been thanked: 45 times

Re: ZX Spectrum Recreated Would Work as Bluetooth Keyboard With MiSTer?

Unread post by AmintaMister »

I've sent MikeS1 a DM about this, hopefully he will have some time to help out.
Thanks!
Post Reply