Posted: Tue Jan 28, 2020 11:37 am
By the way, the ARM buttons (FIRE2) use a different port. Here's some sample code from the AGD mentioned above:
Code: Select all
; Joystick 1.
joy1 in a,($2e) ; read joystick1
call readjoy ; convert to joyval
in a,($2d) ; Read arm button joystick1
and $10
jr z, joy1a
res 5,e ; Not pressed, carry clear
jr joy1b
joy1a set 5,e ; Pressed, carry set
joy1b jr joyke1; Joystick 2.
joy2 in a,($2b) ; read joystick2
call readjoy ; convert to joyval
in a,($27) ; Read arm button joystick1
and $10
jr z, joy2a
res 5,e ; Not pressed, carry clear
jr joy2b
joy2a set 5,e ; Pressed, carry set
joy2b jr joyke1