Re: [cc65] Question on 1351 mouse

From: Greg King <greg.king41verizon.net>
Date: 2010-01-31 18:37:45
From: "Groepaz"; on Sun., Jan. 31, 2010; at 01:41 AM -0500
>
> - rework the interrupt handler, and make it so that the kernal keyboard
> scanner gets called first, before any other "user" handlers (i.e., the
> mouse driver).  [That practically means calling the respective kernal
> routine manually, and end the IRQ in "jmp $ea81" instead of $ea31 or
> sth. :)]

That won't work!  GEOS does that, and it led to the infamous "mouse
jitter" problem (remember that the keyboard scan messes with the POT-lines
electrical switch).  The developers tried to work around that bug by
sticking a delay loop in the mouse driver; but, on old machines, it didn't
delay long enough.

On the other side, mouse drivers that work with the ROM Kernal are called
before the keyboard routine.  They never suffer from jitter; and, they
don't need any delays.  Your "alternative" suggestion, below, is better.

> - now, in the mouse driver, check the button; and if pressed, set $c5
> (number of keys in keyboard buffer) to 0.
>
> (alternative: call mouse driver in IRQ first; and then, at the end of
> IRQ, if button was pressed, simply skip the keyboard scanner,
> by jumping to $ea81 instead of $ea31.)

----------------------------------------------------------------------
To unsubscribe from the list send mail to majordomo@musoftware.de with
the string "unsubscribe cc65" in the body(!) of the mail.
Received on Sun Jan 31 18:41:14 2010

This archive was generated by hypermail 2.1.8 : 2010-01-31 18:41:16 CET