Jump to content
Jet Set Willy & Manic Miner Community

Emulator key scanning


Norman Sword

Recommended Posts

When running JSW on an emulator, it quickly becomes evident that the emulator has problems scanning the keys.

This problem manifests itself, if the cheat code has been typed in and key combinations are required to jump to rooms.

This can/could be a problem caused by either the host hardware, the emulator, or both. 

This short program will simply display key presses as interpreted by the host machine and passed through the emulator.

I find it fascinating that on one of the emulators I use ("FUSE") has so many problems. 

 

For example Press and hold "F" and "G" ., the rest of the row will now be ignored, except "ENTER".

e.g. "A", "S", "D", "H", "J", "K", "L" will not register

 

A newer version is listed a few posts later. (the update is only a graphic update)

 

key_test.tap

Edited by Norman Sword
removing unneeded blank lines - adding info on updated file
Link to comment
Share on other sites

I do note slight differences between emulators but I have always assumed most of the problem here on an emulator vs a real machine is the way the host is limited in how it reads the keyboard and which multiple keys it can cope with at once. I do not think there is any difference between a USB and a PS2 type, I'm assuming the concern is a legacy one in how the IBM-PC "architecture" (if that's the right word?) was designed

 

It would be interesting to find out if there are actually any differences in this between a PC and a Mac too.

Link to comment
Share on other sites

  • 2 weeks later...

There seems to be a significant difference between a desktop PC and a laptop. Using Norman's program on my laptop i can get it to register up to 8 simultaneous keys on any given row using Spectaculator 8.0, i had the same results with FUSE and SPIN, when i connect a USB keyboard i can only get about 4, however because it's a wireless one i can probably understand why.

 

owing to the fact that my little rubber-keyed friend is on loan at present i have not yet been able to try it out on a real spectrum

 

My theory is that laptops the ZX Spectrum have one thing in common and that is their keyboards are connected to the motherboard via a multi-way membrane  as opposed to a 5 pin PS2 connector or in the case of the modern PC a single data channel (2 if you count data coming out of the system)

 

pressing combinations of keys across the rows such as QW and GH also work but not in every case for example IO and DE won't work, only 3 of the four keys will register

Edited by Metalmickey
Link to comment
Share on other sites

  • 3 years later...

Mentioning the key scanning process, prompted me to edit the  "Key_test.tap" program, mentioned in the first post. Since I can see no means of editing the first post, I can not add the update there.

I have graphically updated the program mentioned "Key_test.tap". I know it is only a utility written in a few hours, but I felt it could look graphically better. This is only a small graphical update.   

Purpose of program:-

Running this program will repeatedly scan the keyboard and display the output as would be scanned by a spectrum. Some keyboards do not enable multiple key presses to be passed through the host machine and into an emulator. This program will display the keys an emulated spectrum would see. 
 

key_test4.png

key_test4.tap

Edited by Norman Sword
Typo
Link to comment
Share on other sites

Thanks Norman 🙂

Appreciate the updated tool.

I've fixed the post issue. For some reason it had (upgrade quirk perhaps) reset the editing time limit to "525600 minutes" , its not really meant to be set that high if a site uses it anyway, typical things are usually a few hours to a few days in my experience if its limited at all.

365 days in effect as 52600 / 60 / 24 = 365 , if my sums are correct! , anyway I've rectified said concern. Apologies for the inconvenience.

 

Link to comment
Share on other sites

I was thinking, I wonder if 128K models are going to be different in some way emulation wise or not and if doing a 48K mode selection (killing in effect all 128 extras) instead of a USR0 (leaving you at 48K mode with paging and sound available) would make any difference. I suspect not.

Although probably not a huge concern, using 'cloned' emulations such as perhaps Scorpion 256 or more common Pentagon 128 could also perhaps effect this, but I suspect this may vary more on emulation program rather than machine type.

^ The above could be complete nonsense.

Link to comment
Share on other sites

 

The first post mentions the inability of my pc to correctly scan the emulated spectrum keyboard. Which prompted me to write the key_test routine. That was way back in 2017. Since then I have moved through several machines and also several operating systems. My present configuration does not exhibit any problems. 

In 2020 I changed my pc and installed windows 10 pro. That pc was originally configured with a new keyboard that had a strange keyboard layout and also a keyboard reset button. That when pressed turned the pc off. Something that I might have reconfigured eventually. I took another path and installed a gaming pc keyboard.  That keyboard when hooked up to my pc and running FUSE which is emulating a ZX spectrum, which is running Key_test4.tap. Shows my gaming pc keyboard can pass any combination of keys through to Key_test4. And when I say any, I have tested as many as 20+ keys at a time. 

I once spent hours reading the technical blurb on the CPC machines. Which outlined the technical reasons why the CPC does have scanning problems. In usage the real and physical  zx spectrum has not given me any keyboard scanning problems. The problems only started with emulation and the convoluted passage of data from keyboard hardware to pc hardware to operating system to emulator to emulated zx hardware to zx program. Where the problem lies is "above my pay grade". But the purchase of a gaming keyboard which is designed to stop key jamming and a host of other problems would seem to indicate to me that the physical keyboard was probably the main culprit of my old problems.

  

Link to comment
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

Loading...
  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...

Important Information

By using this site, you agree to our Terms of Use.