[Coco] Coco3 under MESS and joysticks

Robert Gault robert.gault at att.net
Sun Apr 10 15:33:01 EDT 2016


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





More information about the Coco mailing list