mirror of
https://github.com/cc65/cc65.git
synced 2026-04-26 13:18:31 +00:00
Atari, Atari5200: disable "attract mode" on mouse or joystick input
Fixes #736.
This commit is contained in:
committed by
Oliver Schmidt
parent
70a131e09a
commit
d199ca1460
@@ -82,6 +82,7 @@ SENSIVITY = 16
|
||||
|
||||
READJOY:
|
||||
and #3 ; put joystick number in range, just in case
|
||||
sta jsnum ; remember joystick number
|
||||
tay
|
||||
asl a
|
||||
tax ; Joystick number * 2 (0-6) into X, index into ZP shadow registers
|
||||
@@ -89,7 +90,7 @@ READJOY:
|
||||
lda #0 ; Initialize return value
|
||||
cmp TRIG0,y
|
||||
bne @notrg
|
||||
lda #$10 ; JOY_BTN
|
||||
ora #$10 ; JOY_BTN
|
||||
|
||||
; Read joystick
|
||||
|
||||
@@ -119,4 +120,15 @@ READJOY:
|
||||
|
||||
ora #2 ; JOY_DOWN
|
||||
|
||||
@done: rts
|
||||
@done: ldx #0
|
||||
ldy jsnum
|
||||
cmp oldval,y
|
||||
beq @ret
|
||||
sta oldval,y
|
||||
stx ATRACT
|
||||
@ret: rts
|
||||
|
||||
.bss
|
||||
|
||||
oldval:.res 4
|
||||
jsnum: .res 1
|
||||
|
||||
Reference in New Issue
Block a user