]> git.sur5r.net Git - cc65/commitdiff
Removed the port parameter from mouse_init
authorcuz <cuz@b7a2c559-68d2-44c3-8de9-860c34a00d81>
Thu, 13 Sep 2001 16:00:55 +0000 (16:00 +0000)
committercuz <cuz@b7a2c559-68d2-44c3-8de9-860c34a00d81>
Thu, 13 Sep 2001 16:00:55 +0000 (16:00 +0000)
git-svn-id: svn://svn.cc65.org/cc65/trunk@906 b7a2c559-68d2-44c3-8de9-860c34a00d81

libsrc/atari/mouse.s
libsrc/c64/mouse.s
libsrc/geos/mousesprite/mouse.s

index a6eb380faf1d2b289c50281e43e51363e369a6a4..9c722b49ce56686e40ebc37a8344c0e4e36449b0 100644 (file)
@@ -16,7 +16,7 @@
        .export         _mouse_buttons, _mouse_pos, _mouse_info
        .constructor    initmouse,27
 
-       .import         popa,popax
+       .import         popax
        .importzp       ptr1
 
        .include "atari.inc"
@@ -56,15 +56,10 @@ initmouse:
 
 ;--------------------------------------------------------------------
 ; Initialize mouse routines
-; void __fastcall__ mouse_init (unsigned char port, unsigned char type);
+; void __fastcall__ mouse_init (unsigned char type);
 
 _mouse_init:
-       pha                     ; remember mouse type
-       jsr     popa
-       sta     port_nr
-       pla                     ; get mouse type again
-
-       cmp     #MAX_TYPE+1
+       cmp     #MAX_TYPE+1     ; Check for a valid type
        bcc     setup
 
 ifail: lda     #0              ; init. failed
@@ -203,16 +198,14 @@ _mouse_hide:
 ; unsigned char mouse_buttons(void)
 
 _mouse_buttons:
-       ldx     port_nr
-       lda     STRIG0,x
+       ldx     #0
+       lda     STRIG0
        bne     nobut
 ;      lda     #14
 ;???   sta     COLOR1
-       ldx     #0
        lda     #1
        rts
-nobut: ldx     #0
-       txa
+nobut: txa
        rts
 
 ;--------------------------------------------------------------------
@@ -379,28 +372,15 @@ nyami:    tya
 t1_vec: tya
        pha
        txa
-       pha
+       pha     
 
 .ifdef DEBUG
        lda     RANDOM
        sta     COLBK           ; debug
 .endif
 
-       lda     port_nr
-       lsr                     ; even number 0/2
+       lda     PORTA
        tay
-       lda     PORTA,y
-       ldy     port_nr
-       cpy     #0
-       beq     oddp
-       cpy     #2
-       beq     oddp
-
-        lsr
-       lsr
-       lsr
-       lsr
-oddp:  tay
 
 mouse_vec:
         jsr     st_check        ; will be modified; won't be ROMmable
@@ -592,7 +572,5 @@ omy:        .res 1          ; old y pos
 
 mouse_off:
        .res 1
-port_nr:
-       .res 1
 mouse_pm0:
        .res 1
index 5886fc8c10120489f15d511d84e84e4fc516a5fd..c65c6e2e7c23485eba4c03679e9f3f54c7e73ea6 100644 (file)
@@ -12,7 +12,7 @@
        .export         _mouse_buttons, _mouse_info
 
        .import         _readjoy
-               .import         popa, popax, addysp1
+               .import         popax, addysp1
        .importzp       ptr1, sp, sreg
 
        .include        "c64.inc"
@@ -35,13 +35,10 @@ XCORR               = SPRITE_WIDTH
 
 ; --------------------------------------------------------------------------
 ;
-; unsigned char __fastcall__ mouse_init (unsigned char port,
-;                                       unsigned char type);
+; unsigned char __fastcall__ mouse_init (unsigned char type);
 ;
 
 _mouse_init:
-       jsr     popa                    ; Ignore type and port
-
                lda     OldIRQ+1                ; Already initialized?
                bne     AlreadyInitialized      ; Jump if yes
 
index 5bf1f1e75494e36101b475b9b42da0456f978964..9fb22714ae7621f4d327adc49e54d55f906f826d 100644 (file)
@@ -5,14 +5,14 @@
 ;
 ; Wrapper for GEOS standard input device interface
 ;
-
+                                        
        .export         _mouse_init, _mouse_done
        .export         _mouse_hide, _mouse_show
        .export         _mouse_box
        .export         _mouse_pos, _mouse_info
        .export         _mouse_move, _mouse_buttons
 
-               .import         popa, popsreg, addysp1
+               .import         popsreg, addysp1
        .importzp       sp, sreg, ptr1
 
        .include "../inc/const.inc"
 
 ; --------------------------------------------------------------------------
 ;
-; unsigned char __fastcall__ mouse_init (unsigned char port,
-;                                       unsigned char type);
+; unsigned char __fastcall__ mouse_init (unsigned char type);
 ;
 
 _mouse_init:
-       jsr     popa                    ; ignore all parameters
-
        jsr     StartMouseMode
        jsr     MouseOff