From: cpg Date: Tue, 11 May 2004 19:31:14 +0000 (+0000) Subject: return correct joystick count for XL and newer machines -- patch from X-Git-Tag: V2.12.0~809 X-Git-Url: https://git.sur5r.net/?a=commitdiff_plain;h=86960297c3131b1724083ea580b0476c10a9ca2c;p=cc65 return correct joystick count for XL and newer machines -- patch from Stefan Haubenthal git-svn-id: svn://svn.cc65.org/cc65/trunk@3021 b7a2c559-68d2-44c3-8de9-860c34a00d81 --- diff --git a/libsrc/atari/atari-stdjoy.s b/libsrc/atari/atari-stdjoy.s index c89044b19..54b8d7228 100644 --- a/libsrc/atari/atari-stdjoy.s +++ b/libsrc/atari/atari-stdjoy.s @@ -81,9 +81,14 @@ UNINSTALL: ; COUNT: - lda #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.