USB key rollover glitch?
snhirsch opened this issue · 7 comments
I'm using a wired Logitech USB keyboard with my Pano Z80. It works fine if I'm careful about hitting exactly one key at a time. However, if I'm a little sloppy and "rollover" to a new key while the previous is still down I get an immediate burst of repeats - sometimes 20-30 - of both characters. This happens much faster than the normal auto-repeat response. Is this particular to my keyboard only?
No it's not! I noticed that occasionally but I never figured out why it was happening (and I didn't know how to reproduce it). I'll bet that's an easy fix. I'll try to see if I can get time to look at it soon, but let me know if you fix it first (hint). The problem is almost certainly in usb_kbd.c.
Ok, let me take a look.
Hi, Skip. I need to build the RISCV32 tool chain, but it isn't clear what options I should use when running 'configure'. Can you elaborate? Alternately, is there a compiled tool chain available for 64-bit Ubuntu 18.04?
There probably is a prebuilt tool change somewhere, but I built mine from sources using these instructions:
https://github.com/cliffordwolf/picorv32#building-a-pure-rv32i-toolchain
I hope you do setup a dev environment as playing with code is great fun, however I just committed what I think is a fix...
The clue about the issue occurring because of N-key roll over was what I needed. Once you know that it's easy to reproduce, just press and hold a key, then press and hold a second key. Before my fix BOTH characters would auto repeat. That's way wrong.
Please try the new release and let me know what you think.
Now that I have this setup again I might try adding a dummy RTC to the BIOS.
Thanks - that seems to have fixed. I was able to build the RISCV compiler suite by following the link from your README.md. Sorry for missing that the first time. I agree this is way cool to tinker with. The NZCOM environment works about 99% properly under your CP/M emulation. Currently using the so-called 'relative' clock (advances at every disk access), but an actual RTC would be terrific. Attached are source and object files for a Z80pack clock driver that can be used by NZCOM.
Super! Thanks for testing the fix so quickly!
I haven't played with NZCOM at I'll give it a try. Please let me know of any other issues you see. If you can find a recipe halt the Z80 I'd be very interested in trying to figure out the issue.
Here's how to trigger a HALT: Install NZCOM and run the environment. Then, run 'nzcpm' to exit back to vanilla CP/M. On my system this triggers an immediate HALT. Let me know if you have any issues finding or installing it?