Menu

#358 Add support for the Recreated ZX Spectrum

v1.3.0
closed-accepted
None
5
2017-08-05
2016-04-24
No

teller on WoS points to this blog hosting a patch that adds support for the Recreated ZX Spectrum with Fuse 1.1.1 for the SDL and GTK+ user interfaces.

I've reattached the patch from that post here.

1 Attachments

Related

Wiki: Fuse 1.3.0 Release Plan

Discussion

  • thrice

    thrice - 2016-08-12

    Can confirm that with a very slight tweak to pick up a header file from the right place this patch works with Fuse 1.2.1 and a Recreated ZX Spectrum purchased from Amazon UK, already unlocked, in August 2016.

     
  • BogDan Vatra

    BogDan Vatra - 2016-08-14

    There are people asking for this support also in Spectacol :)

     
  • Sergio Baldoví

    Sergio Baldoví - 2016-08-14

    The original patch modifies some auto-generated files. The attached patch should be equivalent, hopefully with the header issue fixed.

    I can't test a recreated keyboard, but I see that a normal keyboard is broken and seems that key handling is used differently. IMO needs to be integrated with existing code and add an option to enable the recreated layout.

     
  • thrice

    thrice - 2016-08-15

    The 02 patch applied cleanly and appears to work. I haven't tested every key sequence but typing out a 5 line BASIC program seems OK.

    I don't know anything like enough about Fuse to help code, but I'm happy to apply patches and test with the RZXS hardware.

     
  • Philip Kendall

    Philip Kendall - 2016-08-23

    I've created a branch at branches/patch-358-recreated-zxspectrum for this and applied Sergio's patch, plus a very minor amount of code tidy up.

    I certainly see this patch breaking the "normal" keyhandling (on both GTK+ and SDL) so this definitely needs some work before it can go into trunk.

     
  • Sergio Baldoví

    Sergio Baldoví - 2016-08-23

    Sorry to stick my oar on this, but I have some work in progress:

    • create the --recreated-spectrum option
    • don't use the ambiguous rzx prefix.
    • refactor the keypress detection.
    • disabling the recreated keyboard in SDL UI isn't working.

    It seems desirable that keypresses in widget UIs (especially text entry widgets) should not be filtered through the input layer, allowing Spanish, Czech and cyrillic characters without mapping them. Things could change in a future, maybe towards a solution like [feature-requests:#101] but for the time being, this solution would be sufficient.

     

    Related

    Feature Requests: #101

  • Philip Kendall

    Philip Kendall - 2016-08-24

    Sergio: you're not "sticking your oar in". I'm more than happy for as many people as are interested to work on this -- please feel free to bring the branch up to the state of your patch and we'll work from there. I'm not precious about the code I hacked up last night in any way :-)

     
  • Sergio Baldoví

    Sergio Baldoví - 2016-08-24

    The current tree should work on GTK+, SDL, X11 and win32 UIs. The Recreated ZX Spectrum cannot be disabled on SDL UI from the General Options dialog, though.

     
  • Sergio Baldoví

    Sergio Baldoví - 2016-08-28

    Useful link for those of us wondering about the technical details of the keyboard:
    http://zedcode.blogspot.co.uk/2016/07/notes-on-recreated-zx-spectrum.html

    Looks interesting, thanks. Some thoughts...

    This code supports the Game Layer within an emulated machine, but I guess that interacting with the GUI (e.g., writing filenames with a dot) requires the QWERTY Layer. The user should switch the mode with the keyboard and in the emulator's options for the widget UIs.

    The key M seems sensible to keyboard layouts (UK/US/etc) on Windows/android devices.

    The technical code suggest having an array for tracking keypresses. I wonder if current implementation supports multiple keypresses.

     
  • Philip Kendall

    Philip Kendall - 2016-08-31

    There's a non-trivial amount of interest on some Facebook groups about getting Fuse to support the Recreated Spectrum keyboard, so I'd like to try and get this in for our September release - how feasible do people think that is?

     
    • Sergio Baldoví

      Sergio Baldoví - 2016-09-01

      LGTM

       
  • Philip Kendall

    Philip Kendall - 2016-08-31
    • assigned_to: Sergio Baldoví
    • Group: future --> NextRelease
     
  • Sergio Baldoví

    Sergio Baldoví - 2016-09-09
    • status: open --> pending-accepted
     
  • Sergio Baldoví

    Sergio Baldoví - 2016-09-09

    Thanks all. Merged to trunk from patch-358-recreated-zxspectrum branch in [r5797].

     

    Related

    Commit: [r5797]

  • thrice

    thrice - 2016-09-10

    Windows isn't my thing, but I have an old WIn7 virtual machine to hand, so I ran this up. I found the keyboard enabling option easily, and the keyboard appears to work as expected.

    Except... the C and M keys don't work! All other keys do, but those two produce no response. I tested those keys on a private build of Fuse/358 for Linux (the host of the Win7 VM) and they work fine with that.

    Very odd. It could easily be my set up. Can anyone else test it?

     
  • Sergio Baldoví

    Sergio Baldoví - 2016-09-10

    Thanks for testing. I think your set up is good as both C and M keys are mapped internally from bracket symbols and that's an odd coincidence. In fact, I think it's a bug related to [bugs:#361].

    Do you mind testing again using this build?
    https://www.dropbox.com/s/vb7qpv9rm4t3nmm/fuse-1.2.2-win32-svn5798.zip?dl=1

    If you run "fuse.exe > debug.txt" in a console we will get a file with debugging info. Just press keys A, C and M.

     

    Related

    Bugs: #361

  • thrice

    thrice - 2016-09-10

    OK, I gave that a run on the same VM setup as before. I pressed (and released) A, then, C, then M. The debug output is:

    keypress wparam=0x00000010, lparam=0x002a0001, code=0x00001000, keysyms=0x1000
    keypress wparam=0x0000004f, lparam=0x00180001, code=0x0000006f, char=o, keysyms=0x006f
    keyrelease wparam=0x0000004f, lparam=0xc0180001, code=0x0000006f, char=o, keysyms=0x006f
    keyrelease wparam=0x00000010, lparam=0xc02a0001, code=0x00001000, keysyms=0x1000
    keypress wparam=0x00000010, lparam=0x002a0001, code=0x00001000, keysyms=0x1000
    keypress wparam=0x00000050, lparam=0x00190001, code=0x00000070, char=p, keysyms=0x0070
    keyrelease wparam=0x00000050, lparam=0xc0190001, code=0x00000070, char=p, keysyms=0x0070
    keyrelease wparam=0x00000010, lparam=0xc02a0001, code=0x00001000, keysyms=0x1000
    keypress wparam=0x000000db, lparam=0x001a0001, code=0x0000005b, char=[, keysyms=0x005b
    keyrelease wparam=0x000000db, lparam=0xc01a0001, code=0x0000005b, char=[, keysyms=0x005b
    keypress wparam=0x000000dd, lparam=0x001b0001, code=0x0000005d, char=]
    , keysyms=0x005d
    keyrelease wparam=0x000000dd, lparam=0xc01b0001, code=0x0000005d, char=], keysyms=0x005d
    keypress wparam=0x00000010, lparam=0x002a0001, code=0x00001000, keysyms=0x1000
    keypress wparam=0x000000db, lparam=0x001a0001, code=0x0000005b, char=[, keysyms=0x005b
    keyrelease wparam=0x000000db, lparam=0xc01a0001, code=0x0000005b, char=[, keysyms=0x005b
    keyrelease wparam=0x00000010, lparam=0xc02a0001, code=0x00001000, keysyms=0x1000
    keypress wparam=0x00000010, lparam=0x002a0001, code=0x00001000, keysyms=0x1000
    keypress wparam=0x000000dd, lparam=0x001b0001, code=0x0000005d, char=]
    , keysyms=0x005d
    keyrelease wparam=0x000000dd, lparam=0xc01b0001, code=0x0000005d, char=], keysyms=0x005d
    keyrelease wparam=0x00000010, lparam=0xc02a0001, code=0x00001000, keysyms=0x1000

    Edit: aw cr@p, it just occurred to me that when I did that test I forgot to use the Fuse option to enable the RZXS keyboard! I just repeated the test, enabling the keyboard first, then pressing A, C then M. The debug file was the same as above, and all 3 keys got the expected response from Fuse.

    Just to be sure I repeated the full test I did this morning: testing that Fuse responded to each key in turn. It did so, so it looks like the problem is solved. :)

     

    Last edit: thrice 2016-09-10
  • Sergio Baldoví

    Sergio Baldoví - 2016-09-11

    Thank you. The problem was bracketleft and bracketright characters not being properly detected on win32 UI. Fix committed in [r5800].

     

    Related

    Commit: [r5800]

  • Fredrick Meunier

    • status: pending-accepted --> closed-accepted
     
  • Jonah Naylor

    Jonah Naylor - 2017-08-05

    Hi I just fired up fuse 1.3.8 for a quick go on Werewolves of London. But the Recreated keyboard won't get me in... The welcome screen says press Fire to Start (Fire being Caps Shift). Any ideas why it won't work? Didn't think I needed the patch due to using 1.3.8 but I can apply it if anyone can explain how?

     
    • thrice

      thrice - 2017-08-05

      The RZXS keyboard has been in the main build for a year. I haven't actually tested 1.3.8, but it's working fine with the 1.3.5 build i happen to have on this box in front of me.

      The switch on the back should be in "layer A" mode, and you need to enable it via Options->General->Recreated ZX Spectrum. If you open a regular text editor on your PC and press '1' on the RZXS keyboard you should get "ab" printed.

      If all that matches your setup, ask on the mailing list or open a support ticket.

       

Log in to post a comment.

Want the latest updates on software, tech news, and AI?
Get latest updates about software, tech news, and AI from SourceForge directly in your inbox once a month.