[Coco] Coco3 under MESS and joysticks

Mark McDougall msmcdoug at iinet.net.au
Sun Apr 10 17:31:14 EDT 2016


I'm not sure if I'm not explaining my problem incorrectly or whether I'm 
not the only one confused.

I don't have an issue detecting the buttons; I'm using the exact procedure 
you describe for reading buttons.

I don't have an issue with buttons and space pressed at the same time 
either. The problem is pressing button 2 on either joystick both result in 
a space being detected (on MESS). Surely only one of them can cause that. 
Furthermore it's my understanding - and this is where i might, as you put 
it,  be having problems with coco hardware - you can't just "turn off" the 
buttons. I've certainly read as much on the topic, though I'll be more than 
happy if you have evidence to the contrary.

All this could probably be resolved in an hour or so if i had a physical 
2-button joystick. :(

I should probably study the coco3 schematic before going any further...

Sent with AquaMail for Android
http://www.aqua-mail.com


On 11 April 2016 5:33:44 am Robert Gault <robert.gault at att.net> wrote:

> Mark McDougall wrote:
>><snip>
>>> Exactly what were you doing when you got "a phantom <SPACE>", whatever
>>> that is? How do you have MESS configured regards joysticks 1 & 2?
>>
>> If code on the Coco is checking for a <SPACE> and you press Right Joystick
>> Button 2, then it will detect it because that button is on row#3 of the 
>> keyboard
>> matrix, regardless of the column strobe. This is also why you can't mask
>> joystick buttons on GIME keyboard interrupts.
>>
>> Since only one of the buttons is on row#3, then only one of the buttons should
>> generate the 'phantom' <SPACE>. The others will cause similar issues on other
>> rows. But I get *both* doing it.
>>
>> I have, at various times, disabled input for one or the other joystick in MESS
>> by selecting <NONE> for the input mapping. Otherwise it's the default numeric
>> keypad mappings.
>>
>> John mentions the issue is his blog
>>
>> <http://retrotinker.blogspot.com.au/2013_01_01_archive.html>
>>
>> Regards,
>>
>
> Right. It's difficult to tell if you have more issues with the Coco hardware or
> MESS implementation. :)
>
> Regards confusing joystick buttons with keys, that is easy to take care of and
> already exists in the NitrOS-9 LevelII code. Look at the source code for
> Keydrv_cc3.asm. You will see that first the keyboard is scanned with $FF02 set
> to $FF which turns off all of the keyboard. Then $FF00 is read, inverted, and
> ANDed with %00001111 so only button info is left.
> Now if both <SPACE> and left button 2 are pressed at the same time (which 
> is not
> likely) all you would need to do is adjust $FF01 & $FF03 so that the left
> joystick is turned off and check if a key is still showing. If ON then a 
> key was
> pressed, if OFF the button was pressed. You would need to treat the other
> button/key_rows similarly.
>
> Robert
>
>
>
>
> --
> Coco mailing list
> Coco at maltedmedia.com
> https://pairlist5.pair.net/mailman/listinfo/coco




More information about the Coco mailing list