mirror of
https://github.com/badvision/lawless-legends.git
synced 2024-09-29 11:55:21 +00:00
Modified ProRWTS to preserve scratchpad space in aux text screen area.
This commit is contained in:
parent
d29ac7ffea
commit
8a5a1e1a65
Binary file not shown.
@ -26,6 +26,10 @@
|
|||||||
;requires load_high to be set for arbitrary memory access
|
;requires load_high to be set for arbitrary memory access
|
||||||
;else driver must be running from same memory target
|
;else driver must be running from same memory target
|
||||||
;i.e. running from main if accessing main, running from aux if accessing aux
|
;i.e. running from main if accessing main, running from aux if accessing aux
|
||||||
|
save_auxscr = 1 ;set to 1 to save and restore the I/O scratchpad registers in aux
|
||||||
|
;e.g. $478,x $4f8,x ... $7f8,x (where x = slot
|
||||||
|
;needed if using the aux text page, and possibly some hard drive controller
|
||||||
|
;cards will be confused if run in aux mem without this
|
||||||
allow_trees = 1 ;enable support for tree files, as opposed to only seedlings and saplings
|
allow_trees = 1 ;enable support for tree files, as opposed to only seedlings and saplings
|
||||||
;requires an additional 512 bytes of RAM
|
;requires an additional 512 bytes of RAM
|
||||||
bounds_check = 0 ;set to 1 to prevent access beyond the end of the file
|
bounds_check = 0 ;set to 1 to prevent access beyond the end of the file
|
||||||
@ -144,6 +148,7 @@
|
|||||||
ROMIN = $c081
|
ROMIN = $c081
|
||||||
LCBANK2 = $c089
|
LCBANK2 = $c089
|
||||||
CLRAUXRD = $c002
|
CLRAUXRD = $c002
|
||||||
|
SETAUXRD = $c003
|
||||||
CLRAUXWR = $c004
|
CLRAUXWR = $c004
|
||||||
SETAUXWR = $c005
|
SETAUXWR = $c005
|
||||||
CLRAUXZP = $c008
|
CLRAUXZP = $c008
|
||||||
@ -1329,13 +1334,24 @@ dataend = nibtbl + 106
|
|||||||
|
|
||||||
unrelochdd
|
unrelochdd
|
||||||
!pseudopc reloc {
|
!pseudopc reloc {
|
||||||
|
hddrdwrpart
|
||||||
!if override_adr = 1 {
|
!if override_adr = 1 {
|
||||||
hddrdwrpart jmp hddrdwrfile
|
!if save_auxscr = 1 {
|
||||||
|
jmp svhddrdwrfile
|
||||||
|
} else { ;save_auxscr
|
||||||
|
jmp hddrdwrfile
|
||||||
|
} ;save_auxscr
|
||||||
} ;override_adr
|
} ;override_adr
|
||||||
;read volume directory key block
|
;read volume directory key block
|
||||||
;self-modified by init code
|
;self-modified by init code
|
||||||
|
|
||||||
hddopendir
|
hddopendir
|
||||||
|
!if save_auxscr = 1 {
|
||||||
|
jsr flipscratch
|
||||||
|
jsr +
|
||||||
|
jmp flipscratch
|
||||||
|
+
|
||||||
|
}
|
||||||
unrhddblocklo = unrelochdd + (* - reloc)
|
unrhddblocklo = unrelochdd + (* - reloc)
|
||||||
ldx #2
|
ldx #2
|
||||||
unrhddblockhi = unrelochdd + (* - reloc)
|
unrhddblockhi = unrelochdd + (* - reloc)
|
||||||
@ -1799,6 +1815,41 @@ hddsetaux sta CLRAUXRD, x
|
|||||||
sta CLRAUXWR, x
|
sta CLRAUXWR, x
|
||||||
} ;allow_aux
|
} ;allow_aux
|
||||||
rts
|
rts
|
||||||
|
!if save_auxscr = 1 {
|
||||||
|
svhddrdwrfile
|
||||||
|
jsr flipscratch
|
||||||
|
jsr hddrdwrfile
|
||||||
|
flipscratch ldx auxreq
|
||||||
|
beq flipdone
|
||||||
|
dex
|
||||||
|
stx adrlo
|
||||||
|
lda #4
|
||||||
|
flipouter sta adrhi
|
||||||
|
pha
|
||||||
|
ldy #$F8
|
||||||
|
flipinner lda (adrlo),y
|
||||||
|
tax
|
||||||
|
sta SETAUXRD
|
||||||
|
sta SETAUXWR
|
||||||
|
lda (adrlo),y
|
||||||
|
pha
|
||||||
|
txa
|
||||||
|
sta (adrlo),y
|
||||||
|
sta CLRAUXWR
|
||||||
|
sta CLRAUXRD
|
||||||
|
pla
|
||||||
|
sta (adrlo),y
|
||||||
|
iny
|
||||||
|
bne flipnext
|
||||||
|
ldy #$78
|
||||||
|
flipnext cpy #$80
|
||||||
|
bne flipinner ; if eq, sets carry
|
||||||
|
pla
|
||||||
|
adc #0 ; carry set above
|
||||||
|
cmp #8
|
||||||
|
bne flipouter
|
||||||
|
flipdone rts
|
||||||
|
}
|
||||||
|
|
||||||
!if aligned_read = 0 {
|
!if aligned_read = 0 {
|
||||||
;cache partial block offset
|
;cache partial block offset
|
||||||
@ -1891,6 +1942,11 @@ unrunit=unrelochdd+(*-reloc)
|
|||||||
lda #$d1
|
lda #$d1
|
||||||
sta unit
|
sta unit
|
||||||
|
|
||||||
|
!if (allow_aux + save_auxscr) > 1 {
|
||||||
|
ldx auxreq
|
||||||
|
jsr hddsetaux
|
||||||
|
} ;allow_aux
|
||||||
|
|
||||||
unrentry=unrelochdd+(*-reloc)
|
unrentry=unrelochdd+(*-reloc)
|
||||||
jmp $d1d1
|
jmp $d1d1
|
||||||
hddcodeend
|
hddcodeend
|
||||||
|
Loading…
Reference in New Issue
Block a user