1
0
mirror of https://github.com/cc65/cc65.git synced 2024-06-17 00:29:31 +00:00

Optimized the code a bit, thanks to Greg for the suggestions/comments.

This commit is contained in:
Marco van den Heuvel 2018-05-01 14:46:57 -07:00
parent b1c3daca3a
commit e88ac62d06
2 changed files with 4 additions and 13 deletions

View File

@ -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

View File

@ -38,18 +38,11 @@
_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