a2audit icon indicating copy to clipboard operation
a2audit copied to clipboard

Keyboard polling test idea

Open xotmatrix opened this issue 7 years ago • 1 comments

The Mr. Xerox crack of Dung Beetles has an irritating keyboard wait routine at the graphical title screen.

033E: 8D 10 C0        STA KBDSTRB
0341: AD 00 C0        LDA KEYBOARD
0344: 10 F8           BPL $33E

Because the keyboard strobe is constantly being cleared, there is scarcely any time to poll the keyboard. This caused me some headaches because I was only polling the keyboard once per frame.

xotmatrix avatar May 28 '17 19:05 xotmatrix

I've been remaking my emulator's keyboard handler and studying schematics and thinking about this code again and wondering how it could reasonably work on real hardware. So I tested it and it's just a bad on the real thing. Often it just not does respond to key presses, as you might expect from looking at it. I don't know what Mr. Xerox was thinking with this code which appears twice in his crack.

My new keyboard emulation is much more accurate despite only running once per frame. If I invoked it at an interval of some multiple of 11 cycles, the length of the loop, I might get in trouble but I don't see any reason why this should be a test.

xotmatrix avatar Dec 26 '18 03:12 xotmatrix