shave some bytes

This commit is contained in:
Peter Ferrie 2021-06-16 22:03:03 -07:00
parent b8242457ff
commit 3ee3ce6689
2 changed files with 13 additions and 28 deletions

View File

@ -391,11 +391,6 @@
bcc +
jmp .trybox
+ sta .cmp1+1
sta .cmp2+1
sta .cmp3+1
sta .cmp4+1
sta .cmp5+1
sta .cmp6+1
pha
adc #BASEPAGE
sta .page1+2
@ -464,8 +459,7 @@
txa
adc #9
tax
.cmp2
lda #$D1
lda .cmp1+1
pha
ldy #5
jsr compare
@ -505,8 +499,7 @@
sec
bne .bcsexit4
+ inx
.cmp3
lda #$D1
lda .cmp1+1
ldy #11
jsr compare
!byte $8C,$F4,$B7 ;STY $B7F4
@ -519,8 +512,7 @@
txa
adc #11
tax
.cmp4
lda #$D1
lda .cmp1+1
pha
ldy #2
jsr compare
@ -540,8 +532,7 @@
bcs .bcsexit6
+ inx
inx
.cmp5
lda #$D1
lda .cmp1+1
pha
ldy #3
jsr compare
@ -568,8 +559,7 @@
pla
adc #4
sta .tryalt+1
.cmp6
lda #$D1
lda .cmp1+1
pha
ldy #3
jsr compare

View File

@ -88,23 +88,19 @@ IsF7F6
bne -
sec
beq @driveoff
+ jsr ReadNib
cmp #$F6
bne @restart
jsr ReadNib
cmp #$EF
bne @restart
jsr ReadNib
cmp #$EE
bne @restart
jsr ReadNib
cmp #$AB
+ ldx #3
- jsr ReadNib
cmp @f7f6_sequence,x
bne @restart
dex
bpl -
clc
@driveoff
lda $C0E8
rts
@f7f6_sequence
!byte $AB,$E,$EF,$F6
;-------------------------------
; SetupF7F6SecondRound
;
@ -202,6 +198,7 @@ IsUnformatted
;
; Timing-sensitive code! Cycle counts in margin for worst case path
;
clc
@reset ldy #$00
@loop ldx $C0EC ; 4
bpl @loop ; 2 when not taken
@ -217,9 +214,7 @@ IsUnformatted
iny ; 2
bne @loop ; 3 when taken
sec
!byte $24
@unformatted
clc
lda $C0E8
lda #$3F