ZX Spectrum Recreated Would Work as Bluetooth Keyboard With MiSTer?

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: 238
Joined: Thu Dec 24, 2020 12:33 pm
Has thanked: 7 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: 669
Joined: Thu Jun 11, 2020 9:44 am
Has thanked: 246 times
Been thanked: 208 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 201 times
ZX81-recreated.patch.zip
(7.08 KiB) Downloaded 209 times
keytest.p.zip
(398 Bytes) Downloaded 203 times
User avatar
pgimeno
Top Contributor
Posts: 669
Joined: Thu Jun 11, 2020 9:44 am
Has thanked: 246 times
Been thanked: 208 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 207 times
User avatar
pgimeno
Top Contributor
Posts: 669
Joined: Thu Jun 11, 2020 9:44 am
Has thanked: 246 times
Been thanked: 208 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 184 times
ZX-Spectrum-recr_20220217.rbf
(3.07 MiB) Downloaded 199 times
rhester72
Top Contributor
Posts: 1107
Joined: Thu Jun 11, 2020 2:31 am
Has thanked: 13 times
Been thanked: 169 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: 277
Joined: Thu Sep 16, 2021 10:54 pm
Has thanked: 720 times
Been thanked: 44 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: 669
Joined: Thu Jun 11, 2020 9:44 am
Has thanked: 246 times
Been thanked: 208 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 160 times
AmintaMister
Posts: 277
Joined: Thu Sep 16, 2021 10:54 pm
Has thanked: 720 times
Been thanked: 44 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: 277
Joined: Thu Sep 16, 2021 10:54 pm
Has thanked: 720 times
Been thanked: 44 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: 669
Joined: Thu Jun 11, 2020 9:44 am
Has thanked: 246 times
Been thanked: 208 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 143 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: 277
Joined: Thu Sep 16, 2021 10:54 pm
Has thanked: 720 times
Been thanked: 44 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: 277
Joined: Thu Sep 16, 2021 10:54 pm
Has thanked: 720 times
Been thanked: 44 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: 669
Joined: Thu Jun 11, 2020 9:44 am
Has thanked: 246 times
Been thanked: 208 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 149 times
User avatar
pgimeno
Top Contributor
Posts: 669
Joined: Thu Jun 11, 2020 9:44 am
Has thanked: 246 times
Been thanked: 208 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: 669
Joined: Thu Jun 11, 2020 9:44 am
Has thanked: 246 times
Been thanked: 208 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 143 times
AmintaMister
Posts: 277
Joined: Thu Sep 16, 2021 10:54 pm
Has thanked: 720 times
Been thanked: 44 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 4129 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: 1160
Joined: Sun May 24, 2020 10:25 pm
Has thanked: 798 times
Been thanked: 257 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: 277
Joined: Thu Sep 16, 2021 10:54 pm
Has thanked: 720 times
Been thanked: 44 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!
User avatar
LamerDeluxe
Top Contributor
Posts: 1160
Joined: Sun May 24, 2020 10:25 pm
Has thanked: 798 times
Been thanked: 257 times

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

Unread post by LamerDeluxe »

AmintaMister wrote: Thu Nov 03, 2022 9:39 am
I've sent MikeS1 a DM about this, hopefully he will have some time to help out.
Thanks!
Just received this build from MikeS1, please test it.
Attachments
ZX-SpectrumRYC_20221103.rbf
(3.11 MiB) Downloaded 140 times
AmintaMister
Posts: 277
Joined: Thu Sep 16, 2021 10:54 pm
Has thanked: 720 times
Been thanked: 44 times

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

Unread post by AmintaMister »

LamerDeluxe wrote: Fri Nov 04, 2022 1:48 pm
AmintaMister wrote: Thu Nov 03, 2022 9:39 am
I've sent MikeS1 a DM about this, hopefully he will have some time to help out.
Thanks!
Just received this build from MikeS1, please test it.
Just tested, it perfectly works, THANKS! Maybe MikeS1 can merge the pgmeno patch in the main code?
User avatar
LamerDeluxe
Top Contributor
Posts: 1160
Joined: Sun May 24, 2020 10:25 pm
Has thanked: 798 times
Been thanked: 257 times

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

Unread post by LamerDeluxe »

AmintaMister wrote: Fri Nov 04, 2022 6:35 pm
LamerDeluxe wrote: Fri Nov 04, 2022 1:48 pm
AmintaMister wrote: Thu Nov 03, 2022 9:39 am

Thanks!
Just received this build from MikeS1, please test it.
Just tested, it perfectly works, THANKS! Maybe MikeS1 can merge the pgmeno patch in the main code?
Awesome, great to hear that! Thanks to the quick efforts from MikeS1. I don't know if he would want to do the merge. Otherwise I might have a look to see if I could do it.
User avatar
LamerDeluxe
Top Contributor
Posts: 1160
Joined: Sun May 24, 2020 10:25 pm
Has thanked: 798 times
Been thanked: 257 times

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

Unread post by LamerDeluxe »

I created a pull request to merge this into the official core: https://github.com/MiSTer-devel/ZX-Spec ... er/pull/36
EDIT: Not because MikeS1 didn't want to do it, but because it turned out to be easy to do :)
AmintaMister
Posts: 277
Joined: Thu Sep 16, 2021 10:54 pm
Has thanked: 720 times
Been thanked: 44 times

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

Unread post by AmintaMister »

LamerDeluxe wrote: Fri Nov 04, 2022 7:32 pm I created a pull request to merge this into the official core: https://github.com/MiSTer-devel/ZX-Spec ... er/pull/36
EDIT: Not because MikeS1 didn't want to do it, but because it turned out to be easy to do :)
Sure, it's exactly the right think to do, thanks a lot!!!
rhester72
Top Contributor
Posts: 1107
Joined: Thu Jun 11, 2020 2:31 am
Has thanked: 13 times
Been thanked: 169 times

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

Unread post by rhester72 »

*REALLY* hoping this makes mainline.
User avatar
LamerDeluxe
Top Contributor
Posts: 1160
Joined: Sun May 24, 2020 10:25 pm
Has thanked: 798 times
Been thanked: 257 times

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

Unread post by LamerDeluxe »

Unfortunately Sorgelig is unsure if it is a good idea to add this code. He thinks it might be better if it would stay a separate fork. I asked him what he means with it not working well with other cores.
If it stayed as a forked version, it would mean that it would have to be updated when the main core does.
Well, it's a doubtful change.. It clutter the code a lot while adding some marginal HW which is definitely hard to use with other cores...
Probably it's better to keep it in fork for those couple people who will decide to integrate MiSTer with single ZX core inside that case.
rhester72
Top Contributor
Posts: 1107
Joined: Thu Jun 11, 2020 2:31 am
Has thanked: 13 times
Been thanked: 169 times

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

Unread post by rhester72 »

@Sorgelig I beg you to reconsider. The market for these keyboards may not be huge, but most of us are NOT using MiSTer as a dedicated Speccy solution - that doesn't make a (togglable) input device undesirable or not useful! I don't think anyone advocating for this *wants* to use it with other cores - we just want to use it when we run THIS core! It's a USB keyboard, just mapped very specifically - why can't we have this code and swap keyboards as/when we wish?

NOBODY expects this keyboard to work with ANY other core. We intend to hot-swap it when we use the ZX core, that's all.
AmintaMister
Posts: 277
Joined: Thu Sep 16, 2021 10:54 pm
Has thanked: 720 times
Been thanked: 44 times

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

Unread post by AmintaMister »

rhester72 wrote: Mon Nov 07, 2022 2:00 am @Sorgelig I beg you to reconsider. The market for these keyboards may not be huge, but most of us are NOT using MiSTer as a dedicated Speccy solution - that doesn't make a (togglable) input device undesirable or not useful! I don't think anyone advocating for this *wants* to use it with other cores - we just want to use it when we run THIS core! It's a USB keyboard, just mapped very specifically - why can't we have this code and swap keyboards as/when we wish?

NOBODY expects this keyboard to work with ANY other core. We intend to hot-swap it when we use the ZX core, that's all.
I perfectly agree, this is a core-dedicated keyboard.
User avatar
pgimeno
Top Contributor
Posts: 669
Joined: Thu Jun 11, 2020 9:44 am
Has thanked: 246 times
Been thanked: 208 times

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

Unread post by pgimeno »

Clutters the code? The Recreated code is clearly delimited, it doesn't cause any confusion with non-Recreated code. Part of what was done is a cleanup of the somewhat fishy pre-existing keyboard code. It actually reduces clutter.

The ghosting commit was not kept separate in the PR from the Recreated support commit. That may have caused some confusion. If kept separate, the Recreated support could be reviewed independently of the Ghosting support, and maybe the impression of clutter would be reduced. I separated them because they are functionally different changes. Ghosting support is not that essential, and if keeping it out makes the patch be accepted, I'd be willing to sacrifice it.
Post Reply