]> git.sur5r.net Git - cc65/commitdiff
fixed a bug (joy #1 would never be tested)
authorizydorst <izydorst@b7a2c559-68d2-44c3-8de9-860c34a00d81>
Wed, 20 Aug 2003 12:09:39 +0000 (12:09 +0000)
committerizydorst <izydorst@b7a2c559-68d2-44c3-8de9-860c34a00d81>
Wed, 20 Aug 2003 12:09:39 +0000 (12:09 +0000)
git-svn-id: svn://svn.cc65.org/cc65/trunk@2390 b7a2c559-68d2-44c3-8de9-860c34a00d81

libsrc/geos/devel/geos-stdjoy.s

index 56fb3179c9dfd69985e4efdb02569f97e29241e9..d525e7c0530f0587431db873cb2c25725d95a6a0 100644 (file)
@@ -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