z4, z5: remember save-slot to $52

This commit is contained in:
Peter Ferrie 2018-03-22 21:55:00 -07:00
parent 88a666239e
commit 9e11caa63c
2 changed files with 54 additions and 18 deletions

View File

@ -402,8 +402,7 @@ skipupper
dey
bne -
txa
clc
adc #$af
ora #$b0
sta callback3+1
lda $da86
sta loadcall1+1
@ -437,6 +436,12 @@ skipupper
dey
bne -
ldy #slot_end-saveslot
- lda saveslot-1, y
sta $d7e6, y
dey
bne -
lda #<brand
sta $ddf0
lda #>brand
@ -485,6 +490,16 @@ call80 jsr $c300
sta $37
rts
saveslot lda #'P'
sta $50
lda #'D'
sta $51
lda $e3
ora #$30
sta $52
rts
slot_end
brand jsr $dbda
lda #$da
sta $ddf0
@ -543,9 +558,7 @@ hddreaddir1
} else { ;ver_02 = 0
stz adrlo
} ;ver_02
ldy #>hdddirbuf
sty adrhi
jsr hddseekrd
jsr hddreaddirsec
;include volume directory header in count
@ -626,7 +639,12 @@ hddnextent ldy #0
ldx hdddirbuf + NEXT_BLOCK_LO
lda hdddirbuf + NEXT_BLOCK_HI
!if might_exist = 1 {
jsr hddreaddirsec
bcc hddfirstent
} else { ;might_exist
bcs hddreaddir1
} ;might_exist
hddfoundname iny
lda (bloklo), y
@ -1527,16 +1545,16 @@ hddreaddirsel
asl reqcmd
lsr reqcmd
} ;allow_multi
} ;rwts_mode
hddreaddirsec
!if allow_trees = 0 {
!if allow_trees = 0 {
hddreaddirsect ldy #>hdddirbuf
} else { ;allow_trees = 1
} else { ;allow_trees = 1
ldy #>hdddirbuf
hddreaddirsect
} ;allow_trees
} ;allow_trees
sty adrhi
} ;rwts_mode
hddseekrd ldy #cmdread
!if (aligned_read + enable_write) > 1 {
hddseekrdwr sty command

View File

@ -397,8 +397,7 @@ skipupper
dey
bne -
txa
clc
adc #$af
ora #$b0
sta callback3+1
lda $914
sta loadcall1+1
@ -432,6 +431,12 @@ skipupper
dey
bne -
ldy #slot_end-saveslot
- lda saveslot-1, y
sta $d7f2, y
dey
bne -
lda #<brand
sta $ddb6
lda #>brand
@ -485,6 +490,16 @@ call80 jsr $c300
sta $37
rts
saveslot lda #'P'
sta $50
lda #'D'
sta $51
lda $e7
ora #$30
sta $52
rts
slot_end
brand jsr $db5b
lda #$5b
sta $ddb6
@ -543,9 +558,7 @@ hddreaddir1
} else { ;ver_02 = 0
stz adrlo
} ;ver_02
ldy #>hdddirbuf
sty adrhi
jsr hddseekrd
jsr hddreaddirsec
;include volume directory header in count
@ -626,7 +639,12 @@ hddnextent ldy #0
ldx hdddirbuf + NEXT_BLOCK_LO
lda hdddirbuf + NEXT_BLOCK_HI
!if might_exist = 1 {
jsr hddreaddirsec
bcc hddfirstent
} else { ;might_exist
bcs hddreaddir1
} ;might_exist
hddfoundname iny
lda (bloklo), y
@ -1527,16 +1545,16 @@ hddreaddirsel
asl reqcmd
lsr reqcmd
} ;allow_multi
} ;rwts_mode
hddreaddirsec
!if allow_trees = 0 {
!if allow_trees = 0 {
hddreaddirsect ldy #>hdddirbuf
} else { ;allow_trees = 1
} else { ;allow_trees = 1
ldy #>hdddirbuf
hddreaddirsect
} ;allow_trees
} ;allow_trees
sty adrhi
} ;rwts_mode
hddseekrd ldy #cmdread
!if (aligned_read + enable_write) > 1 {
hddseekrdwr sty command