[Coco] [Color Computer] Keyboard Rollover differences between coco2 and coco1 and 3s

Arthur Flexser flexser at fiu.edu
Thu Jan 24 01:51:24 EST 2013


Jim, you apparently overlooked my earlier (4 days ago) reply to you about this:

------------------------------------------------------------------
Jim, part of Basic's POLCAT keypress detection routine was rewritten in
Color Basic 1.2 and that's what's causing the problem.
Originally, POLCAT checked each keyboard column one by one for a
keypress, and identified which key, if any, was being pressed.  This
caused a slight slowdown of Basic programs on account
of the break key check after each line.  So someone at Microsoft got
the good idea of having POLCAT start by checking all columns
simultaneously and having it return
immediately if no key was down in Color Basic 1.2.

This made POLCAT much
faster if no key was down, but caused a compatibility problem with
some Basic software
that checks for a key by peeking at the keyboard rollover locations in
low memory.  The faster version of POLCAT doesn't affect the rollover
table if it does its fast return on account of no key being down.
That means POLCAT doesn't reset the rollover table in response to any keys
having been released since the last time the table's status was updated.

This was fixed later by the release of Disk (yes, *Disk*) Basic 1.1, if I'm
remembering right, so the problem should only occur in cassette
systems with Color Basic 1.2 or disk-equipped CoCo's running Disk Basic 1.0.

Anyway, from the standpoint of Basic programming, there's a simple workaround:
put a statement like Y$=INKEY$ right before you peek at the rollover
table to cause the table's status to be updated.

Art
-------------------------------------------------------------------

On Wed, Jan 23, 2013 at 8:25 PM, jim_gerrie <jimgerrie at ns.sympatico.ca> wrote:
> Can someone tell me why the keyboard rollover table starting as 338 resets to 255 when no keys are pressed on coco1 and 3s, but not on coco 2s?  Is there some other means (peek) for knowing if a key is being pressed or not?  How does continuous key input get done on a coco 2 in basic without having to poke all the keyboard rollover locations with 255s, or is that the only way?
>
>
> --
> Coco mailing list
> Coco at maltedmedia.com
> http://five.pairlist.net/mailman/listinfo/coco



More information about the Coco mailing list