[Coco] [Color Computer] Re: New Basic Games

Arthur Flexser flexser at fiu.edu
Sun Jan 20 00:28:54 EST 2013


Jim, part of Basic's POLCAT keypress input 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.  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 check all columns at once and return
immediately if no key was down in Color Basic 1.2.  This made POLCAT
faster, 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 it doesn't reset the rollover table to account for any keys
having been released since the last time its status was updated by
detecting a keypress.

This was fixed later by the release of Disk Basic 1.1, if I'm
remembering right, so the problem should only occur in cassette
systems or 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 Sun, Jan 20, 2013 at 12:03 AM, jim_gerrie <jimgerrie at ns.sympatico.ca> wrote:
> Thanks.  I've put some pictures up.  I have a new game called Pipe Frenzy which I've submitted to the Coco Coding contest:
> http://cococoding.com/contest/
>
> It works fine on the VCC emulator, and on my unextended 16K Coco 1, but not on my Coco 2.   I noticed that the key rollover table routine I use to check for key presses doesn't seem to work quite right on the real Coco 2.  The peek locations don't seem to reset to 255 as soon as you're not holding down any keys.  It's very strange.  When I run the following on the Coco 1 or VCC I get 255 printed, unless I'm holding down a key.  But on my Coco 2, I get other numbers which just stay, after I stop pressing any of the keys.
>
> 10 PRINT PEEK(345)ANDPEEK(344)ANDPEEK(343)ANDPEEK(342)ANDPEEK(341)
> 20 GOTO 10
>
> Anyone know what gives?
>
> --- In ColorComputer at yahoogroups.com, "abrower"  wrote:
>>
>> That is so very cool!
>> I have been watching ebay for a CoCo3
>> I am going to have to mention this on my http://hippobytes.com site
>>
>> --- In ColorComputer at yahoogroups.com, "jim_gerrie"  wrote:
>> >
>> > I've created Coco and Dragon version of some games originally programmed for the TRS-80 MC-10.  I have submitted these games to the Retrospectiva Basic game contest.  They can be downloaded at:
>> > http://rsp.retrocomputacion.com/games-jim-gerrie-ports-4-of-his-games-to-the-tandy-coco/
>> > I have also created Coco and Dragon versions of some games ported from other systems.  The programs can be found at in the file JGGAMES5.DSK which can be downloaded from my site:
>> > http://www3.ns.sympatico.ca/jimgerrie/jsoft.html
>> > Any feedback will be much appreciated.
>> >
>>
>
>
>
> --
> Coco mailing list
> Coco at maltedmedia.com
> http://five.pairlist.net/mailman/listinfo/coco



More information about the Coco mailing list