fix floppy detection

This commit is contained in:
Peter Ferrie 2019-09-10 10:29:49 -07:00
parent 6fa0683eaf
commit 404b7c7ff8

View File

@ -390,8 +390,14 @@ adjpath tya
lsr lsr
tay tay
ldx DEVADR01HI, y ldx DEVADR01HI, y
!if (enable_floppy + allow_extend) > 0 {
cpx #$c8 cpx #$c8
bcc set_slot bcc set_slot
!if enable_floppy = 1 {
lsr
ora #$c0
tax
} else { ;enable_floppy = 0
ldx #$c8 ldx #$c8
- dex - dex
stx blokhi stx blokhi
@ -413,6 +419,8 @@ adjpath tya
ldy #$ff ldy #$ff
lda (bloklo), y lda (bloklo), y
beq - beq -
} ;enable_floppy
} ;enable_floppy or allow_extend
set_slot stx slot + 2 set_slot stx slot + 2
!if allow_extend = 1 { !if allow_extend = 1 {
@ -2948,15 +2956,15 @@ unrentry2 = unrelochdd + (* - reloc)
saveslot saveslot
lda #4 lda #4
sta blokhi sta $49
ldx #0 ldx #0
stx bloklo stx $48
sta unit sta $4a
-- ldy #$78 -- ldy #$78
- lda (bloklo), y - lda ($48), y
pha pha
lda scrn_array, x lda scrn_array, x
initpatch lda (bloklo), y initpatch lda ($48), y
pla pla
sta scrn_array, x sta scrn_array, x
inx inx
@ -2966,8 +2974,8 @@ initpatch lda (bloklo), y
bmi - bmi -
iny iny
bpl - bpl -
inc blokhi inc $49
dec unit dec $4a
bne -- bne --
rts rts
} else { ;swap_scrn = 0 } else { ;swap_scrn = 0