[Coco] Fw: Joystick button (peek)
Rietveld Rietveld
rietveldh at hotmail.com
Thu May 18 20:40:25 EDT 2017
Sent from my BlackBerry 10 smartphone.
Original Message
From: Rietveld Rietveld <rietveldh at hotmail.com>
Sent: Thursday, May 18, 2017 8:34 PM
To: L. Curtis Boyle
Subject: Re: [Coco] Joystick button (peek)
I noticed something strange with the cocoflash. When I use the 'button' command in the menu program, independent of the flash cartridge, it generates a 0 or 1 as expected. When using the same line in the same menu program, but running from the flash Pak, it fails to generate anything other than a zero value regardless of button position . As a result of this quirk I have been forced to peek the 'f1' and 'f2' keys, looking for a 191 value, and using this in place of the joystick button. I was hoping that peeking the button value might prove to be more acceptable to the Flash cart. Regardless of this the joystick still navigates the menu perfectly and allows very fast and easy scrolling thru the menu
Sent from my BlackBerry 10 smartphone.
Original Message
From: L. Curtis Boyle
Sent: Thursday, May 18, 2017 7:59 PM
To: CoCoList for Color Computer Enthusiasts
Reply To: CoCoList for Color Computer Enthusiasts
Subject: Re: [Coco] Joystick button (peek)
The joystick buttons share the same PIA pins as the keyboard - so if your keyboard locks up when you plug the joystick in, that means that a joystick button(s) is being pressed immediately. I would check the buttons on the joystick itself - it seems one (or both) of them is staying clicked.
L. Curtis Boyle
curtisboyle at sasktel.net
> On May 18, 2017, at 5:18 PM, Glen Hewlett <glen.hewlett at sympatico.ca> wrote:
>
> 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
>
>
> --
> Coco mailing list
> Coco at maltedmedia.com
> https://pairlist5.pair.net/mailman/listinfo/coco
>
--
Coco mailing list
Coco at maltedmedia.com
https://pairlist5.pair.net/mailman/listinfo/coco
More information about the Coco
mailing list