[Coco] CoCo Joystick Poke?

Roger Taylor operator at coco3.com
Sat Aug 4 16:47:12 EDT 2007


At 03:36 PM 8/4/2007, you wrote:
>As far as I know the software that makes use of the joystick maps to the
>specific hardwired joystick ports chosen at the time the software itself was
>developed-written. A careful program (and programmer) would have made use of
>a routine to ask the user to press the fire button of the joystick he/she
>wishes to use and adjust its port reading accordingly... some programs do
>this, some (the most I fear) don't so there you have your joystick swapping.
>
>I think there were some hardware projects that allowed for a switch to
>choose either of the two ports, basically a switchable "Y" cable where you
>plug your lone joystick in a single jack and the two DIN connector cables
>out of the "box" to the two joystick ports in the back of the CoCo, and a
>switch in the Y-cable/box would allow you to flip the joystick between ports
>easily.


To check the joystick axis from BASIC, a JOYSTK(0) read is 
required.  As far as I know, this does a snapshot of all 4 axis.  So, 
reading axis 1-3 will return what was stored there from the axis 0 
read.  I think the author's real purpose for doing this was not to 
save time but to get a snapshot of the current axis positions so even 
if a sloppy BASIC program polled the axis in different areas of the 
code maybe 1/8th of a second apart, there wouldn't be any problems if 
you're moving the stick around quickly.






-- 
Roger Taylor





More information about the Coco mailing list