I've managed to get the USB keyboard mostly working. Using the example on Github it was pretty trivial.
IMG_4536.jpeg
Auto-repeat doesn't work and there's some bounce, which may be caused by the same thing actually.
More worryingly, however, with the keyboard plugged into the Pico I'm getting random memory corruption on the QL. I don't know how this is happening as the Pico board and the QL are independently powered by the same PicoATX power supply which should have ample oomph to power everything on the +5V rail and have about 100 watts to spare.
Re: General Stuff(tm)
Posted: 03 Aug 2025 19:33
by stephen_usher
And... I've fixed the auto-repeat!
But somehow broken the modifier keys, such as shift, alt and control somehow, without touching that bit of the code.
Re: General Stuff(tm)
Posted: 03 Aug 2025 22:40
by stephen_usher
All fixed now!
Re: General Stuff(tm)
Posted: 04 Aug 2025 09:03
by rubber_jonnie
stephen_usher wrote: 03 Aug 2025 22:40
All fixed now!
:girldance:
Re: General Stuff(tm)
Posted: 04 Aug 2025 10:28
by stephen_usher
Now I've just got to clean up the software directory of all the crud, add a bit of documentation and then I can upload to Github.
At some point I may make some firmware for using it with the ZX81 or Spectrum and Memotech MTX.
Re: General Stuff(tm)
Posted: 04 Aug 2025 10:31
by rubber_jonnie
stephen_usher wrote: 04 Aug 2025 10:28
Now I've just got to clean up the software directory of all the crud, add a bit of documentation and then I can upload to Github.
At some point I may make some firmware for using it with the ZX81 or Spectrum and Memotech MTX.
Very nice :)
Re: General Stuff(tm)
Posted: 04 Aug 2025 12:59
by stephen_usher
After hitting my head against a brick wall of Git paranoia I've finally managed to create a repository for this.
An update to Git has made it complain (and fail even though it's a "warning") if a UNC directory on a remote server and connected to as a different user to the local account on your Windows machine is used. It complains that the directory isn't owned by you (d'oh, of course it isn't) and so won't trust it. Trying to add a security exception in git also fails either with effectively "I won't trust it anyway" or "path not absolute".
In the end, after hours of Googling, I tried editing .gitconfig in my home directory and adding a wildcard entry '*' (without the quotes, which is important) as the first trusted directory. Note that I had to put the wildcard without quotes, in violation of the explicit instructions in the documentation saying that you *MUST* use quotes. If you use quotes then it breaks with "path not absolute".
So, a bit of an update on the Pico keyboard matrix emulator thingy, or at least the QL firmware.
Due to discovering that I was missing key presses if using a keyswitch based keyboard I've had to re-write entirely the USB keycode processing routine.
The problem is caused by a previous key switch not necessarily being released before the switch on the next key was being pressed. Due to the way that the tinyusb reports keyboard pressed key data the new key information was being missed as I was only reading the first entry of the six keycode array.
It seems that the tinyusb library puts new key press values into the first free location in the array, zeroing it once the key has been released. This means that the entries are not necessarily contiguous and definitely not sorted by which came first. It also doesn't report how many keys are currently pressed. This means that my code has to scan all six values for changes and then keep a record of which keys were previously pressed and which key was the most recently pressed and send that value to the QL. If I get a report with no keys pressed (the last key has been released) I can clear out the variables.
I also have to deal with the IPC needing modifier keys (shift, crtl and alt) sent on their own preceding any key code using them. I achieve this by putting the key press data into a queue, inserting modifier key values in as separate key presses.
The new firmware has been uploaded to Github.
Re: General Stuff(tm)
Posted: 28 Sep 2025 16:02
by stephen_usher
Well, that's another idea for the November retrofest down the drain.
Anyway, next idea for a display is retro-retro emulators, i.e. 16 bit machines emulating a Spectrum.
I've got the Atari TT running a spectrum emulator well, though it only takes snapshot files which could limit the number of games unless I can generate some new ones somehow, maybe with the Spectrum Next or DivMMC.
I can look at Amiga Spectrum emulators, though it seems that these are far less quick with the fastest seemingly struggling even with a fast accelerator in an A1200.
Re: General Stuff(tm)
Posted: 28 Sep 2025 17:16
by stephen_usher
OK, maybe the TT isn't running the Spectrum emulator as well as I thought. It's a bit slow and the sound isn't great. The music in Trapdoor is obviously doing something strange as it's not working properly at all.