]> git.sur5r.net Git - cc65/commitdiff
readjoy() is no longer available
authorcuz <cuz@b7a2c559-68d2-44c3-8de9-860c34a00d81>
Thu, 26 Dec 2002 15:59:49 +0000 (15:59 +0000)
committercuz <cuz@b7a2c559-68d2-44c3-8de9-860c34a00d81>
Thu, 26 Dec 2002 15:59:49 +0000 (15:59 +0000)
git-svn-id: svn://svn.cc65.org/cc65/trunk@1849 b7a2c559-68d2-44c3-8de9-860c34a00d81

libsrc/c128/mouse.s
libsrc/c64/mouse.s

index 05628a54d043f270b5bd9aa398d788d0bb41d051..a1871e462024abdbf832cb8f50d448fca69e71b2 100644 (file)
@@ -12,7 +12,6 @@
        .export         _mouse_buttons, _mouse_info
        .condes         MouseIRQ, 2
 
-       .import         _readjoy
                .import         popax, addysp1
        .importzp       ptr1, sp
 
@@ -309,8 +308,15 @@ mddone: rts
 
 .proc  _mouse_buttons
 
-       lda     #$00                    ; Use port #0
-       jmp     _readjoy                ; Same as joystick
+        lda    #$7F
+       sei
+       sta     CIA1_PRA
+       lda     CIA1_PRB                ; Read joystick #0
+       cli
+        ldx     #0
+       and     #$1F
+       eor     #$1F
+        rts
 
 .endproc
 
index 23c228a7bc85b242e0385db1bae41c2cdae982e7..b5ecb18aeb8ec262db712a28c1892ad74975d046 100644 (file)
@@ -11,7 +11,6 @@
        .export         _mouse_move, _mouse_pos
        .export         _mouse_buttons, _mouse_info
 
-       .import         _readjoy
                .import         popax, addysp1
        .importzp       ptr1, sp
 
@@ -288,9 +287,19 @@ _mouse_move:
 ; unsigned char mouse_buttons (void);
 ;
 
-_mouse_buttons:
-       lda     #$00                    ; Use port #0
-       jmp     _readjoy                ; Same as joystick
+.proc  _mouse_buttons
+
+        lda    #$7F
+       sei
+       sta     CIA1_PRA
+       lda     CIA1_PRB                ; Read joystick #0
+       cli
+        ldx     #0
+       and     #$1F
+       eor     #$1F
+        rts
+
+.endproc
 
 ; --------------------------------------------------------------------------
 ;