]> git.sur5r.net Git - cc65/commitdiff
Optimized the code a bit, thanks to Greg for the suggestions/comments.
authorMarco van den Heuvel <blackystardust68@yahoo.com>
Tue, 1 May 2018 21:46:57 +0000 (14:46 -0700)
committerMarco van den Heuvel <blackystardust68@yahoo.com>
Tue, 1 May 2018 21:46:57 +0000 (14:46 -0700)
libsrc/c64/acc_detect_turbomaster.s
libsrc/c64/acc_turbomaster_speed.s

index 0af9c3af73706cda5d43796ceb935f659d4f5972..2f8fb2294672b8956dc8f7336f65d921f0911bd6 100755 (executable)
@@ -37,11 +37,9 @@ _detect_turbomaster:
 ; Check for turbo master basic replacement
         ldy     TURBOMASTER_DETECT
         cpy     #$A2
-        bne     not_found
-found:
-        lda     #$01
-        .byte   $24
+        beq     found
 not_found:
         txa
+found:
         rts
 
index 679003b039cc4ffe8245f2a650e73038cd1bab49..7ef6b0540a074c402a2a7e5932c84e0dfe356276 100755 (executable)
 _set_turbomaster_speed:
         tay
         lda     TURBOMASTER_SPEED_REG
+        asl
         cpy     #SPEED_4X
-        bcs     high_speed
-low_speed:
-        and     #$7F
+        ror
 store_speed:
         sta     TURBOMASTER_SPEED_REG
-        jmp     _get_turbomaster_speed
-
-high_speed:
-        ora     #$80
-        bne     store_speed
-
 
 _get_turbomaster_speed:
         ldx     #$00