Mac BeebEm Keyboard issues

discuss bbc micro and electron emulators (including mame) here!
Post Reply
stevei2791
Posts: 56
Joined: Sat Aug 29, 2015 1:21 pm
Location: Irchester
Contact:

Mac BeebEm Keyboard issues

Post by stevei2791 »

I'm investigating why the Mac version of BeebEm is not registering all of the key presses. I've added debug code to watch the event handler, the keyboard matrix and this all seems to be working. Even when a key is missed the Event handler has actually triggered.

I've updated the uservia and sysvia code to be in line with the current windows version, but still the same issue. I've also tried different machine emulations so its not the MOS doing something strange.

After and CA2 is triggered, what services the interrupt? I just want to follow this through to see if I can spot any differences between the keystroke appearing and when it does not register.

ta

[[Moved to the correct board - sorry about that]]
User avatar
lurkio
Posts: 3793
Joined: Wed Apr 10, 2013 12:30 am
Location: Doomawangara
Contact:

Re: Mac BeebEm Keyboard issues

Post by lurkio »

I've got a build here of what is (or used to be?) called "Mac BeebEm 5", and, as I've said elsewhere, I've noticed that the keyboard response is a bit sluggish. Is that the issue you're referring to?

If not, is it possible for you to write down a step-by-step procedure that will trigger the issue you're seeing? I'll try and reproduce it here, if it helps.

(Can't really help with the actual question you asked, though! Apologies.)

:?:
stevei2791
Posts: 56
Joined: Sat Aug 29, 2015 1:21 pm
Location: Irchester
Contact:

Re: Mac BeebEm Keyboard issues

Post by stevei2791 »

Yes, thats exactly the issue. I've added debugging code and seen that the event handler in Beebem is actually seeing the keystroke and it appears from this logging that internally the WriteEnable in sysvia is not actually enabled during some key presses.

I've been investigating and it appears to be something around IC32State when a key is pressed but that is just a guess at the moment. It is confusing because I have seen that the response is better directly on my laptop keyboard, and worse on a usb external keyboard.

I'm just trying to understand what happens internally if you press a key, and write enable flag is off, is the keypress deferred (or ignored) until the interrupt handler is due? What happens if you release the key before the interrupt is acknowledged.
stevei2791
Posts: 56
Joined: Sat Aug 29, 2015 1:21 pm
Location: Irchester
Contact:

Re: Mac BeebEm Keyboard issues

Post by stevei2791 »

Well I am feeling particularly sheepish... It appears that it is a usb keyboard issue that was causing most of the trouble now that I've updated the sysvia source used by the Mac Beebem to match the latest windows source. I have press to hold alt/shift and control keys on my home row that were causing interference/timing issues.

The keyboard without the layer stuff getting in the way seems to have fixed my laggy keyboard issue.
User avatar
lurkio
Posts: 3793
Joined: Wed Apr 10, 2013 12:30 am
Location: Doomawangara
Contact:

Re: Mac BeebEm Keyboard issues

Post by lurkio »

stevei2791 wrote:
Mon Aug 09, 2021 6:35 pm
It appears that it is a usb keyboard issue that was causing most of the trouble now that I've updated the sysvia source used by the Mac Beebem to match the latest windows source. I have press to hold alt/shift and control keys on my home row that were causing interference/timing issues.

The keyboard without the layer stuff getting in the way seems to have fixed my laggy keyboard issue.
Hmm. I too sometimes use a USB keyboard.

Could you possibly send me a link to the latest build of your modded version of “Mac BeebEm 5” so that I can try it too? Do you think I would see better performance with your build?

:?:
stevei2791
Posts: 56
Joined: Sat Aug 29, 2015 1:21 pm
Location: Irchester
Contact:

Re: Mac BeebEm Keyboard issues

Post by stevei2791 »

this is the link to the modded version. The SprowCoProcessor option does nothing yet.

https://www.dropbox.com/s/eg2qwos2hpf1r ... 5.dmg?dl=0
julie_m
Posts: 347
Joined: Wed Jul 24, 2019 9:53 pm
Location: Derby, UK
Contact:

Re: Mac BeebEm Keyboard issues

Post by julie_m »

I've also noticed the keyboard on my BeebEm on Mac (v5.0 (1)) sometimes goes unresponsive. Sometimes pressing and releasing left SHIFT is necessary to make certain yes such as "C" and "V" respond, and mis-pressing the `command` key can require a reset of BeebEm to fix. And sometimes the speed drops randomly to about 0.67.

After a wild goose chase with VirtualBox (beautiful but just a touch too slow for comfort), I ended up buying a cheap laptop and putting Ubuntu on it just to develop Beeb stuff on, because I don't know enough about the Mac to be able just to build a program and run the version it built right from the folder it saved it in.
User avatar
CommanderCoder
Posts: 118
Joined: Wed Nov 06, 2019 5:50 pm
Location: Royal Leamington Spa
Contact:

Re: Mac BeebEm Keyboard issues

Post by CommanderCoder »

I've been looking into this and can't really see the problem. Was it the USB keyboard?

I've had the 'CMD' key stick, so to speak, when used with CTRL, SHIFT, OPTION and I've rewritten how BeebEm5 looks for CMD to try to avoid this. I updated SYSVIA too.

I've uploaded a new DMG if anyone wants to try it out. If you can provide a way in which to recreate the sticky/laggy keyboard that'll help me loads.

DMG Here:
https://github.com/CommanderCoder/BeebE ... er/Install
stevei2791
Posts: 56
Joined: Sat Aug 29, 2015 1:21 pm
Location: Irchester
Contact:

Re: Mac BeebEm Keyboard issues

Post by stevei2791 »

In my particular case the lag was really bad for a number of keys, and it was the usb keyboard. There was a timer delay in the firmware of the keyboard itself to allow for chording of keys. Once I created a new layer without the fancy stuff, I still saw lag but it was nothing compared to what I had seen earlier.
Post Reply

Return to “8-bit acorn emulators”