mirror of
https://github.com/cc65/cc65.git
synced 2024-12-25 17:29:50 +00:00
fixed a bug (joy #1 would never be tested)
git-svn-id: svn://svn.cc65.org/cc65/trunk@2390 b7a2c559-68d2-44c3-8de9-860c34a00d81
This commit is contained in:
parent
e5613ad9eb
commit
e1c6745c9a
@ -89,14 +89,16 @@ COUNT:
|
||||
; READ: Read a particular joystick passed in A.
|
||||
;
|
||||
|
||||
READ: php
|
||||
READ:
|
||||
tax
|
||||
php
|
||||
sei ; disable IRQ
|
||||
lda $01
|
||||
pha
|
||||
lda #$35
|
||||
sta $01 ; enable I/O
|
||||
|
||||
tax ; Joystick number into X
|
||||
txa ; Joystick number into X
|
||||
bne joy2
|
||||
|
||||
; Read joystick 1
|
||||
@ -105,19 +107,19 @@ joy1:
|
||||
lda #$7F
|
||||
sta cia1base
|
||||
lda cia1base+1
|
||||
back: tax
|
||||
back: tay
|
||||
pla
|
||||
sta $01
|
||||
plp
|
||||
txa
|
||||
tya
|
||||
and #$1F
|
||||
eor #$1F
|
||||
ldx #0
|
||||
rts
|
||||
|
||||
; Read joystick 2
|
||||
|
||||
joy2: lda #$E0
|
||||
joy2: ldx #0
|
||||
lda #$E0
|
||||
ldy #$FF
|
||||
sta cia1base+2
|
||||
lda cia1base+1
|
||||
|
Loading…
Reference in New Issue
Block a user