From e1c6745c9a35ff60b0a892f9ea4096784170cc4d Mon Sep 17 00:00:00 2001 From: izydorst Date: Wed, 20 Aug 2003 12:09:39 +0000 Subject: [PATCH] fixed a bug (joy #1 would never be tested) git-svn-id: svn://svn.cc65.org/cc65/trunk@2390 b7a2c559-68d2-44c3-8de9-860c34a00d81 --- libsrc/geos/devel/geos-stdjoy.s | 14 ++++++++------ 1 file changed, 8 insertions(+), 6 deletions(-) diff --git a/libsrc/geos/devel/geos-stdjoy.s b/libsrc/geos/devel/geos-stdjoy.s index 56fb3179c..d525e7c05 100644 --- a/libsrc/geos/devel/geos-stdjoy.s +++ b/libsrc/geos/devel/geos-stdjoy.s @@ -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 -- 2.39.5