fix drive 2 detection (#36)

This commit is contained in:
Peter Ferrie 2021-05-20 08:46:48 -07:00 committed by GitHub
parent 98e587d4d6
commit d3c4100f32
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -57,7 +57,7 @@ tmp = $FC ; byte
cmp #$60 cmp #$60
bne Boot bne Boot
jsr CheckDrive2 jsr CheckDrive2
bne Boot2 bcs Boot2
@showprompt @showprompt
jsr HOME jsr HOME
lda MACHINEID lda MACHINEID
@ -155,25 +155,103 @@ Boot
CheckDrive2 CheckDrive2
lda $C0E9 lda $C0E9
lda $C0EB lda $C0EB
ldy #6 jsr @spinup
-- ldx #$11 jsr @seek
- dex ldx #2
bne - ldy #0
sec --- iny
sbc #1 bne +
clc
dex
bmi @driveoff
+
- lda $C0EC
bpl -
-- cmp #$D5
bne ---
- lda $C0EC
bpl -
cmp #$AA
bne -- bne --
- lda $C0EC
bpl -
cmp #$96
bne --
@driveoff
lda $C0E8
rts
step=$fd
phase=$fe
tmptrk=$ff
tmpsec=$3c
@seek
ldy #0
sty step
sty phase
lda #$44
sta tmptrk
@copy_cur
lda tmptrk
sta tmpsec
sec
sbc phase
beq +++
bcs +
eor #$ff
inc tmptrk
bcc ++
+ sbc #1
dec tmptrk
++ cmp step
bcc +
lda step
+ cmp #8
bcs +
tay
sec
+ jsr ++++
lda step1, y
jsr @delay
lda tmpsec
clc
jsr +++++
lda step2, y
jsr @delay
inc step
bne @copy_cur
+++ jsr @delay
clc
++++ lda tmptrk
+++++ and #3
rol
tax
lda $C0E0, x
rts
@spinup ldy #6
- jsr @delay
dey dey
bpl -- bpl -
lda #$00
ldy #$00 @delay
- eor $C0EC -- ldx #$11
dey - dex
bne - bne -
sta $C0E8 inc tmpsec
cmp #$00 bne +
inc tmpsec+1
+ sec
sbc #1
bne --
@knownret @knownret
rts rts
step1 !byte 1, $30, $28, $24, $20, $1e, $1d, $1c
step2 !byte $70, $2c, $26, $22, $1f, $1e, $1d, $1c
Tracer Tracer
jsr IDBroderbund jsr IDBroderbund
bcc BeginTheBoot bcc BeginTheBoot
@ -223,7 +301,7 @@ BeginTheBoot13
sta $A2 sta $A2
lda #4 lda #4
sta $AC sta $AC
ldx #$B3 ;Sensible Software fix ldx #$33 ;Sensible Software fix
ldy $0300 ldy $0300
jmp $0301 jmp $0301
@ -268,7 +346,7 @@ StringTable
!word @mainmenu !word @mainmenu
@header @header
!text "Anti-M v1.8 by 4am 2020-11-10" !text "Anti-M v1.8pre by 4am 2020-12-27"
!text "________________________________________",$8D !text "________________________________________",$8D
!text $8D,$8D,$8D,$8D,$8D,$8D,$8D,$8D,$00 !text $8D,$8D,$8D,$8D,$8D,$8D,$8D,$8D,$00
@mainmenu @mainmenu