View Single Post
Old 03 September 2014, 14:54   #1
hukka
Wolf-bear thing
 
hukka's Avatar
 
Join Date: Jan 2014
Location: Finland
Age: 41
Posts: 56
Reading the second fire button

I'd like to have my game support the second fire button available on some joypads/joysticks (such as the C button on a Sega Megadrive joypad, which is all I have to test it with.)

To initialize that (along with the right mouse button), I do a
Code:
lea CUSTOM, a6
move.w    #BIT15|BIT14|BIT11|BIT10, POTGO(a6)  ; OUTRY+DATRY+OUTLY+DATLY
and to read,

Code:
btst    #14-8, POTGOR+CUSTOM        ; was secondary fire button hit?
bz    .Fire2                ; yes
However, it only works on WinUAE, and only if I reinitialize the POTGO register each frame. Otherwise the second fire button gets 'stuck' after being pressed once. Is that how it's supposed to work?

The real problem is that it doesn't work at all on my A1200. I'm seeing nothing in POTGOR when pressing the second fire button. The right mouse button is read fine. The pad is in working condition and the second button works in other games that support it. Any pointers please?

Last edited by hukka; 03 September 2014 at 14:59.
hukka is offline  
 
Page generated in 0.09210 seconds with 11 queries