[comp.sys.amiga.tech] reading keys from the keyboard

edp367s@monu6.cc.monash.edu.au (Rik Harris) (12/10/90)

***WARNING   If you are one of those squeamish people who don't
believe in ever accessing hardware without Exec's permission, then
don't read this article.

I have been spending some time trying to read keys from the amiga
keyboard.

As far as I can tell, I have set up everything required (as written in
the 1.3 version of the hardware reference manual), ie:
  a hook on the CIA interrupt vector
  enable CIA ints
  enable keyboard ints
  setup timer A (CIA) for handshaking

I read the key, setup the CIA for output clocked by timer A, and then
wait for the second interrupt to turn the line back around for another
key.

The problem is: once I hit a key, I get constant interrupts from then
on (on vector 3, the CIA vector).

I have looked at the MINIX code, and my code appears to be fuctionally
similar, but I can't see what the problem is.

If someone has done this, could you please send me email, so I can
discuss it. (or even post/mail some example code :-)

Any help greatly appreciated

Rik.
-- 
Rik Harris - edp367s@monu6.cc.monash.edu.au           | Build a system that
new address!  rik@sola.fcit.monash.edu.au             | even a fool can use,
Faculty of Computing and Information Technology,      | and only a fool will 
Monash University, Caulfield Campus, Australia        | want to use it.

peterk@cbmger.UUCP (Peter Kittel GERMANY) (12/11/90)

In article <1990Dec10.113212.2038@monu6.cc.monash.edu.au> edp367s@monu6.cc.monash.edu.au (Rik Harris) writes:
>
>***WARNING   If you are one of those squeamish people who don't
>believe in ever accessing hardware without Exec's permission, then
>don't read this article.
>
>I have been spending some time trying to read keys from the amiga
>keyboard.

Ah, one of those guys! PLEASE, when you read the keyboard, then
TAKE NOTICE that the majority of sold Amigas does NOT use the
US layout of the keyboard but different keymaps! If you don't
consider this, then you're lost for over 1 million Amiga owners!
OK?
(BTW, I hate Uedit. Why? It doesn't know keymaps. Shame on it, trash.)

-- 
Best regards, Dr. Peter Kittel  // E-Mail to  \\  Only my personal opinions... 
Commodore Frankfurt, Germany  \X/ {uunet|pyramid|rutgers}!cbmvax!cbmger!peterk

edp367s@monu6.cc.monash.edu.au (Rik Harris) (12/12/90)

peterk@cbmger.UUCP (Peter Kittel GERMANY) writes:

>In article <1990Dec10.113212.2038@monu6.cc.monash.edu.au> edp367s@monu6.cc.monash.edu.au (Rik Harris) writes:
>>
>>***WARNING   If you are one of those squeamish people who don't
>>believe in ever accessing hardware without Exec's permission, then
>>don't read this article.
>>
>>I have been spending some time trying to read keys from the amiga
>>keyboard.

>Ah, one of those guys! PLEASE, when you read the keyboard, then
>TAKE NOTICE that the majority of sold Amigas does NOT use the
>US layout of the keyboard but different keymaps! If you don't
>consider this, then you're lost for over 1 million Amiga owners!
>OK?
>(BTW, I hate Uedit. Why? It doesn't know keymaps. Shame on it, trash.)

Take a close look at my address, and you will find that I come from 
Australia (shock!).
At this stage, I *know* my programs will not work properly on US
machines, as they use that horrible NTSC ``standard'' (erk!).

Besides, I would have to have a pretty large ego if I thought my
OS would be distributed overseas :-)

Thank-you for the advice, though.  Does anyone else have any
particular annoyances (such as PAL/NTSC checking...I don't want
another flame war, though :-) that should be taken into account for
compatability.  (eg, are the hardware registers described in the
hardware RKM the same for a 3000????)

(btw, I hate Uedit too.  Why?   'cause it's not vi!!   :-)

>Best regards, Dr. Peter Kittel  // E-Mail to  \\  Only my personal opinions... 
>Commodore Frankfurt, Germany  \X/ {uunet|pyramid|rutgers}!cbmvax!cbmger!peterk
-- 
Rik Harris - edp367s@monu6.cc.monash.edu.au           | Build a system that
new address!  rik@sola.fcit.monash.edu.au             | even a fool can use,
Faculty of Computing and Information Technology,      | and only a fool will 
Monash University, Caulfield Campus, Australia        | want to use it.