Tuesday, September 15, 2009

So, I've got the keypress buffer working, it's a 16-deep circular queue. Seems to work OK, but the key scanning is really slow, I miss lots of keys typing at a normal speed. Even after scanning at 60 Hz, I miss events. There must be some kinda design flaw I'm not seeing, since I can't be that slow.

Another point, I don't have a good way to separate keypresses, so there's just a series of repeated scan codes if keys are held down too long.

Oh crap, I just thought of something. The scanning routine takes a while, and the ISR may be restarting before the scan is complete. I really hope that's not the case.

Crap, that's the problem. I ran a test by cutting down the scan to only two columns. In that case, all keys are seen. So I need to redo the scanner to be faster somehow.

One other annoyance. After a few seconds, the screen colors get corrupted. Ocassionally, a sprite will be turned on, I suspect a buffer overflow somewhere.

No comments:

Post a Comment