[Coco] Extended basic 1.1 command?

Bill Pierce ooogalapasooo at aol.com
Tue Nov 20 21:59:54 EST 2012


Looking further into the matter, I think the reason the &H80 is there instead of the other values mentioned is that the program I stole the code from, "CocoDraw" from the Oct, 86 Rainbow, allowed you to press the shift keys with the buttons to "shift" the cursor 4 pixels left or right for more precision of the cursor. So you may very well be right about the other methods. In any case, the "OR&H80" does work.

On the other hand, the ECB manual states to "Peek(65280)" ($FF00) and if the value is 255 or 127 (not OR), no button. If the value is 254 or 126 then it's the right button. If the value is 253 or 125 then it's the left button.

Bill P

Music from the Tandy/Radio Shack Color Computer 2 & 3
https://sites.google.com/site/dabarnstudio/
Bill Pierce
ooogalapasooo at aol.com




-----Original Message-----
From: Harry Hurst <hhos at st-tel.net>
To: coco <coco at maltedmedia.com>
Sent: Tue, Nov 20, 2012 9:05 pm
Subject: Re: [Coco] Extended basic 1.1 command?


> Oops, I get it now:  bit 7 is the joystick comparator bit and must be
> forced to one;  bits 2-6 should already be ones if no keys are down.
> Right?
>

Bits 2-7 don't matter in this case. They all have to be forced to either 0
(AND 3) or 1 (OR &HFC) before you can determine the values on the button
bits, 0 and 1. To do otherwise leaves too many possibilities open, and
invites, if not disaster then at least a headache. If you wanted to also
check some of the other bits you could PIA0= PEEK(&HFF00) and then BUT=
PIA0 AND 3. Then the other bits are still there in PIA0 when you are done
processing the buttons.

HH


--
Coco mailing list
Coco at maltedmedia.com
http://five.pairlist.net/mailman/listinfo/coco

 



More information about the Coco mailing list