Quote:
Originally Posted by Toni Wilen
That code is completely broken, sorry
Reading keyboard correctly isn't that simple. (Unfortunately proper way has never been officially documented anywhere)
Check that CIA-A serial port (SP) interrupt is set (or use ports interrupt), if set, read SDR, then set bit 6 in CIA-A CRA, wait at least ~70us, clear bit 6. (this is one method to handle handshake, there is also another one)
This tells keyboard micro controller that key code has been read and new code can be send.
EDIT: this works in emulation because it decides that program is stupid and lets next keycode through if handshake does not come soon enough.
|
What is the other method of handshaking? And do you know if the keyboard will drop any keys if you don't handshake within a certain amount of time, or if the handshake pulse lasts too long?