[Coco] Joystick button (peek)
Glen Hewlett
glen.hewlett at sympatico.ca
Thu May 18 19:18:29 EDT 2017
Hi Rietveld,
I think from basic you can read the joystick values from the following:
$15A Left Vertical Joystick value
$15B Left Horizontal Joystick
$15C Right Vertical Joystick value
$15D Right Horizontal Joystick
If you make a little program like this:
10 ?peek(&H15A)
20 goto 10
Run it and click on the buttons I think the values will change maybe setting the higher bits… and you can test for these changes.
Also looking at the unravelled series I found this:
FF00 BIT0 KEYBOARD ROW 1 AND RIGHT JOYSTICK SWITCH 1
BIT1 KEYBOARD ROW 2 AND LEFT JOYSTICK SWITCH 1
BIT2 KEYBOARD ROW 3 AND RIGHT JOYSTICK SWITCH 2
BIT3 KEYBOARD ROW 4 AND LEFT JOYSTICK SWITCH 2
BIT4 KEYBOARD ROW 5
BIT5 KEYBOARD ROW 6
BIT6 KEYBOARD ROW 7
BIT7 JOTSTICK COMPARISON IINPUT
So maybe just doing a peek(&HFF00) will give you the values you are looking for...
I can’t test this myself since I don’t have a working Joystick. I bought one at the last CoCo Fest but when I plug it into my CoCo3 it locks the keyboard up. If I unplug it the keyboard works again. I’ve tried both the left and right joystick ports but the same thing happens. It is a deluxe joystick that someone added an extra button on (it has two buttons). Maybe I’ll take it apart sometime and fight with it.
I hope the little info I gave you helps.
Cheers,
Glen
> On May 18, 2017, at 4:32 PM, Rietveld Rietveld <rietveldh at hotmail.com> wrote:
>
> Does anyone know the 'peek' to check for a 'button(0)' or 'button(1)'
>
> Sent from my BlackBerry 10 smartphone.
>
> --
> Coco mailing list
> Coco at maltedmedia.com
> https://pairlist5.pair.net/mailman/listinfo/coco
More information about the Coco
mailing list