Date : Wed, 31 Aug 1994 13:46:37 WET DST
From : Bonfield James <jkb@...>
Subject: Re: Keyboard & T1 interaction
Chris lam writes:
>although i have the keyboard working at the hardware level, i still haven't
>allowed for having 2 keys pressed at once. i also 'fudged' OSBYTE 121/2 to
>work instead of 'properly' emulating the VIA. this will all need to be
>corrected. some games may well have their own code to scan the keyboard.
Now the 2 key at once thing seems curious. Assume we press A and B together.
A == row 4, column 1,
B == row 6, column 4
Now we've pressed B first - that's OK.
We then press A without releasing B. The column scan we detect B (it's in
column 4 and we check in descening order) first. We then check 14, 24, 34 ...,
and find again that 64 is set. But we've missed A completely! I can't see
quite how this is supposed to work. It would appear that the OS then EORs this
with &EC and notices that it's the same key detected twice. Presumably (I
haven't checked this yet) it then scans further to find the real new key
pressed.
Also, when scanning 14, 24, 34 (etc), does the keyboard circuitry ONLY return
when keycode 64 is held down. What about 44? Row 4 is set and so is column 4,
but with different keys. I suspect it's the first of these two methods (ie
only with 64) and hence we need to implement a single large array (16*8)
rather than two small ones (a 16 and an 8).
Finally, people keep referring to the circuit diagrams and appendixes at the
end of the Advances User Guide. My reference is the New Advanced User Guide
which has neither of these. I guess most of the appendix material from the
original has been placed in the appropriate places, however the keyboard
circuit layout most definitely isn't there :-(
James