]> git.sur5r.net Git - cc65/commitdiff
return correct joystick count for XL and newer machines -- patch from
authorcpg <cpg@b7a2c559-68d2-44c3-8de9-860c34a00d81>
Tue, 11 May 2004 19:31:14 +0000 (19:31 +0000)
committercpg <cpg@b7a2c559-68d2-44c3-8de9-860c34a00d81>
Tue, 11 May 2004 19:31:14 +0000 (19:31 +0000)
Stefan Haubenthal

git-svn-id: svn://svn.cc65.org/cc65/trunk@3021 b7a2c559-68d2-44c3-8de9-860c34a00d81

libsrc/atari/atari-stdjoy.s

index c89044b19cae4e6a9596bf0d5ab3d04dd2582847..54b8d7228e8f6d98b4b60cec197515a61a0bfb89 100644 (file)
@@ -81,9 +81,14 @@ UNINSTALL:
 ;
 
 COUNT:
-        lda     #<JOY_COUNT
-        ldx     #>JOY_COUNT
-        rts
+       lda     #JOY_COUNT
+       ldx     $fcd8
+       cpx     #$a2
+       beq     _400800
+       lsr     a               ; XL and newer machines only have 2 ports
+_400800:
+       ldx     #0
+       rts
 
 ; ------------------------------------------------------------------------
 ; READ: Read a particular joystick passed in A.