>> What do you want to do with Spectrum programs that test keyboard
>> with 0 in high byte?
> 
>Hi byte is 0 mostly for a PRESS 'ANY KEY' test.
>I would map row SPACE SS M N B as the first row to scan.
>So one of these keys can be pressed in a ANY KEY situation.

Hmmm... the way Martin and I came up for doing this was this:

Take a Z80 processor (any speed), and an 8K eprom, plus a few gates to 
handle I/O with the keyboard. (any I/O port becomes keyboard access).

Program the Z80 to read the clocked serial data in (dead easy) from the 
keyboard, decode the scan codes (scan mode 3 is the best one to use -- 
it gives single code lookups for every possible key combination, IIRC -- 
check the Zilog keyboard controller site for more details).

Put these scan codes into a 255 byte buffer, doing all the necessary 
combinatorics. (255 byte, as the last one is not reading any key data, 
IIRC, so you just float high).

Hey presto! A little wait-state logic, and you're sorted.

We had a prototype at one point -- worked quite well. I had the keyboard 
LED's cycling and everything...

Simon

______________________________________________________
Get Your Private, Free Email at http://www.hotmail.com

Reply via email to