Skip to content

Conversation

@rbergen
Copy link

@rbergen rbergen commented Jul 26, 2022

The fast keyboard polling code in the IRQ handler currently doesn't skip the waiting cycles as it counts down POLLTGT from POLLRES to 11. Instead, it treats values > 11 as scanning rows. This makes KBDROWPOLL attempt to scan key rows with indices > 9, which don't exist.
I've also moved the decreasing of POLLTGT to just before the evaluation of POLLTGT's value, which means it only needs to be included once in the fast keyboard poll section of the IRQ handler. It is also more consistent with the structure of the slow keyboard polling code.

@ChartreuseK
Copy link
Owner

Looks good! Can't believe I typoed the number in hex when it should be decimal. Wondering if maybe that was a remnant of some of the early fast keyboard scanning attempts I made or just a goof that didn't break anything. I just want to setup my PET again and do a test first myself and then I'll merge.

@rbergen
Copy link
Author

rbergen commented Nov 1, 2022

I actually only noticed the #$11 thing 3 months after making the other changes, myself. :)
And yes, please do test. I have tested the code, but not in the context of PETTERM as such. I extracted the serial driver code from PETTERM for use in a friend's PET project that I contributed to. I discovered and initially fixed the bug in that setting.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants