[Coco] OS-9 Level1 Version 02.00.00 FYI

William Astle lost at l-w.ca
Fri Apr 17 12:44:42 EDT 2020


On 2020-04-17 10:24 a.m., Allen Huffman wrote:
> But overall, isn’t it better to only check when a key is pressed versus constantly checking?
> 
> You do more work as I am typing but far less when I’m not.

If the interrupt worked usefully, then yes. Which is why I tried it.

I actually had the same system working both ways. The keyboard interrupt 
version was far more finicky, and would occasionally drop key presses 
due to the way the interrupt functions. There was some sort of race 
condition involved. It definitely worked out to be slower for the 
"actually scan the keyboard" case, and only trivially better than 
manually checking the PIA, if it was better at all, in the "no scan" case.

Further, I determined that emulators don't usually get it right. I 
actually compared behaviour on a real Coco3 with MAME and found that 
MAME had serious bugs related to it. In some versions, it doesn't work 
at all. In others, it fires continuously. In still others, its sense is 
completely reversed. (It fires when no keys are down and stops firing 
when a key is pressed.)


More information about the Coco mailing list