mirror of
https://github.com/cc65/cc65.git
synced 2026-04-22 01:16:54 +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
@@ -95,6 +95,8 @@ COUNT:
|
||||
;
|
||||
|
||||
READJOY:
|
||||
and #JOY_COUNT-1 ; fix joystick number
|
||||
tax ; Joystick number into X
|
||||
asl a
|
||||
asl a
|
||||
asl a
|
||||
@@ -110,5 +112,14 @@ READJOY:
|
||||
asl a
|
||||
ora PORTA ; add position information
|
||||
eor #$1F
|
||||
ldx #0 ; fix X
|
||||
cmp oldval,x
|
||||
beq :+
|
||||
sta oldval,x
|
||||
ldx #0
|
||||
stx ATRACT ; we have interaction, disable "attract mode"
|
||||
: ldx #0 ; fix X
|
||||
rts
|
||||
|
||||
.bss
|
||||
|
||||
oldval: .res JOY_COUNT
|
||||
|
||||
@@ -93,8 +93,8 @@ _400800:
|
||||
;
|
||||
|
||||
READJOY:
|
||||
and #3 ; fix joystick number
|
||||
tax ; Joystick number (0-3) into X
|
||||
and #JOY_COUNT-1 ; fix joystick number
|
||||
tax ; Joystick number into X
|
||||
|
||||
; Read joystick
|
||||
|
||||
@@ -105,5 +105,14 @@ READJOY:
|
||||
asl a
|
||||
ora STICK0,x ; add position information
|
||||
eor #$1F
|
||||
ldx #0 ; fix X
|
||||
cmp oldval,x
|
||||
beq :+
|
||||
sta oldval,x
|
||||
ldx #0
|
||||
stx ATRACT ; we have interaction, disable "attract mode"
|
||||
: ldx #0 ; fix X
|
||||
rts
|
||||
|
||||
.bss
|
||||
|
||||
oldval: .res JOY_COUNT
|
||||
|
||||
Reference in New Issue
Block a user