mirror of
https://github.com/a2-4am/4cade.git
synced 2025-01-27 09:34:09 +00:00
move ProRWTS to LC2
This commit is contained in:
parent
2cfcbe9a10
commit
04968b7c49
@ -79,6 +79,6 @@ LastMover
|
|||||||
!ifdef PASS2 {
|
!ifdef PASS2 {
|
||||||
} else { ;PASS2
|
} else { ;PASS2
|
||||||
!set PASS2=1
|
!set PASS2=1
|
||||||
!warn "RELBASE = ", $FE00 - (LastMover - FirstMover)
|
!warn "RELBASE = ", $FFFC - (LastMover - FirstMover)
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -72,6 +72,7 @@ OneTimeSetup
|
|||||||
sta holepatch ; enable restoring of copy from now on
|
sta holepatch ; enable restoring of copy from now on
|
||||||
lda hddopendir+1 ; save current directory as 'root'
|
lda hddopendir+1 ; save current directory as 'root'
|
||||||
ldy hddopendir+3
|
ldy hddopendir+3
|
||||||
|
+READ_RAM1_WRITE_RAM1
|
||||||
+STAY gRootDirectory
|
+STAY gRootDirectory
|
||||||
|
|
||||||
lda $43
|
lda $43
|
||||||
|
@ -54,6 +54,7 @@ gRootDirectory
|
|||||||
LoadFile
|
LoadFile
|
||||||
+LDADDR gPathname
|
+LDADDR gPathname
|
||||||
+STAY namlo ; set filename
|
+STAY namlo ; set filename
|
||||||
|
+READ_RAM2_WRITE_RAM2
|
||||||
jsr traverse ; go to subdirectory, set up filename for read
|
jsr traverse ; go to subdirectory, set up filename for read
|
||||||
lda #cmdread ; read (instead of write)
|
lda #cmdread ; read (instead of write)
|
||||||
sta reqcmd
|
sta reqcmd
|
||||||
@ -67,7 +68,9 @@ LoadFile
|
|||||||
lda ldrhi2
|
lda ldrhi2
|
||||||
sta ldrhi
|
sta ldrhi
|
||||||
dec sizehi ; read entire file (ProRWTS2 will figure out exact size)
|
dec sizehi ; read entire file (ProRWTS2 will figure out exact size)
|
||||||
jmp hddopendir ; exit via ProRWTS2 (must re-open the file after query)
|
jsr hddopendir ; exit via ProRWTS2 (must re-open the file after query)
|
||||||
|
+READ_RAM1_WRITE_RAM1
|
||||||
|
rts
|
||||||
|
|
||||||
;------------------------------------------------------------------------------
|
;------------------------------------------------------------------------------
|
||||||
; LoadFileAt
|
; LoadFileAt
|
||||||
@ -90,6 +93,7 @@ LoadFileAt
|
|||||||
+STAY ldrlo ; set load address
|
+STAY ldrlo ; set load address
|
||||||
+LDADDR gPathname
|
+LDADDR gPathname
|
||||||
+STAY namlo ; set filename
|
+STAY namlo ; set filename
|
||||||
|
+READ_RAM2_WRITE_RAM2
|
||||||
jsr traverse ; go to subdirectory, set up filename for read
|
jsr traverse ; go to subdirectory, set up filename for read
|
||||||
lda #cmdread ; read (instead of write)
|
lda #cmdread ; read (instead of write)
|
||||||
sta reqcmd
|
sta reqcmd
|
||||||
@ -97,7 +101,9 @@ LoadFileAt
|
|||||||
sta auxreq
|
sta auxreq
|
||||||
lda #$FF ; read entire file (ProRWTS2 will figure out exact size)
|
lda #$FF ; read entire file (ProRWTS2 will figure out exact size)
|
||||||
sta sizehi
|
sta sizehi
|
||||||
jmp hddopendir ; exit via ProRWTS2
|
jsr hddopendir ; exit via ProRWTS2
|
||||||
|
+READ_RAM1_WRITE_RAM1
|
||||||
|
rts
|
||||||
|
|
||||||
;------------------------------------------------------------------------------
|
;------------------------------------------------------------------------------
|
||||||
; LoadDHRFile
|
; LoadDHRFile
|
||||||
@ -116,6 +122,7 @@ LoadFileAt
|
|||||||
LoadDHRFile
|
LoadDHRFile
|
||||||
+LDADDR gPathname
|
+LDADDR gPathname
|
||||||
+STAY namlo ; set filename
|
+STAY namlo ; set filename
|
||||||
|
+READ_RAM2_WRITE_RAM2
|
||||||
jsr traverse ; go to subdirectory, set up filename for read
|
jsr traverse ; go to subdirectory, set up filename for read
|
||||||
lda #$00 ; read first $2000 bytes
|
lda #$00 ; read first $2000 bytes
|
||||||
sta sizelo
|
sta sizelo
|
||||||
@ -135,7 +142,9 @@ LoadDHRFile
|
|||||||
sta ldrhi
|
sta ldrhi
|
||||||
dec auxreq ; 0 = read into main memory
|
dec auxreq ; 0 = read into main memory
|
||||||
clc ; not a subdirectory
|
clc ; not a subdirectory
|
||||||
jmp hddrdwrpart ; call ProRWTS2
|
jsr hddrdwrpart ; call ProRWTS2
|
||||||
|
+READ_RAM1_WRITE_RAM1
|
||||||
|
rts
|
||||||
|
|
||||||
;------------------------------------------------------------------------------
|
;------------------------------------------------------------------------------
|
||||||
; SaveSmallFile
|
; SaveSmallFile
|
||||||
@ -157,6 +166,7 @@ SaveSmallFile
|
|||||||
+STAY ldrlo ; set data buffer address for ProRWTS2
|
+STAY ldrlo ; set data buffer address for ProRWTS2
|
||||||
+LDADDR gPathname
|
+LDADDR gPathname
|
||||||
+STAY namlo ; set filename for ProRWTS2
|
+STAY namlo ; set filename for ProRWTS2
|
||||||
|
+READ_RAM2_WRITE_RAM2
|
||||||
jsr traverse ; go to subdirectory, set up filename for read
|
jsr traverse ; go to subdirectory, set up filename for read
|
||||||
;;if the write address is always a fixed value then we can discard the query
|
;;if the write address is always a fixed value then we can discard the query
|
||||||
lda #cmdread ; read (instead of write)
|
lda #cmdread ; read (instead of write)
|
||||||
@ -172,7 +182,9 @@ SaveSmallFile
|
|||||||
lda #cmdwrite ; write (instead of read)
|
lda #cmdwrite ; write (instead of read)
|
||||||
sta reqcmd
|
sta reqcmd
|
||||||
sta sizelo ; non-zero
|
sta sizelo ; non-zero
|
||||||
jmp hddopendir ; exit via ProRWTS2 (must re-open the file after query)
|
jsr hddopendir ; exit via ProRWTS2 (must re-open the file after query)
|
||||||
|
+READ_RAM1_WRITE_RAM1
|
||||||
|
rts
|
||||||
|
|
||||||
;------------------------------------------------------------------------------
|
;------------------------------------------------------------------------------
|
||||||
; traverse [private]
|
; traverse [private]
|
||||||
@ -288,7 +300,6 @@ traverse
|
|||||||
|
|
||||||
pla
|
pla
|
||||||
sta (namlo), y
|
sta (namlo), y
|
||||||
lda $c08b
|
|
||||||
@go
|
@go
|
||||||
rts
|
rts
|
||||||
|
|
||||||
@ -311,8 +322,7 @@ promote
|
|||||||
rts ;clock interface, must be RTS on real ProDOS if program uses $20x
|
rts ;clock interface, must be RTS on real ProDOS if program uses $20x
|
||||||
|
|
||||||
lda $c011
|
lda $c011
|
||||||
bit $c08b
|
+READ_RAM2_WRITE_RAM2
|
||||||
bit $c08b
|
|
||||||
;$bf10
|
;$bf10
|
||||||
jmp ProDOS_enter
|
jmp ProDOS_enter
|
||||||
!byte $c1
|
!byte $c1
|
||||||
|
@ -73,6 +73,11 @@
|
|||||||
bit $C08B
|
bit $C08B
|
||||||
}
|
}
|
||||||
|
|
||||||
|
!macro READ_RAM2_WRITE_RAM2 {
|
||||||
|
bit $C083
|
||||||
|
bit $C083
|
||||||
|
}
|
||||||
|
|
||||||
!macro READ_ROM_WRITE_RAM1 {
|
!macro READ_ROM_WRITE_RAM1 {
|
||||||
bit $C089
|
bit $C089
|
||||||
bit $C089
|
bit $C089
|
||||||
|
@ -54,10 +54,10 @@ ver_02 = 1
|
|||||||
;use unique volume numbers to distinguish between images in the same file
|
;use unique volume numbers to distinguish between images in the same file
|
||||||
;requires override_adr, enable_seek, allow_trees, always_trees
|
;requires override_adr, enable_seek, allow_trees, always_trees
|
||||||
;not compatible with enable_floppy, aligned_read, allow_subdir, might_exist, bounds_check
|
;not compatible with enable_floppy, aligned_read, allow_subdir, might_exist, bounds_check
|
||||||
load_high = 1 ;set to 1 to load to top of RAM (either main or banked, enables a himem check)
|
load_high = 0 ;set to 1 to load to top of RAM (either main or banked, enables a himem check)
|
||||||
load_aux = 0 ;load to aux memory
|
load_aux = 0 ;load to aux memory
|
||||||
load_banked = 1 ;set to 1 to load into banked RAM instead of main RAM (can be combined with load_aux for aux banked)
|
load_banked = 1 ;set to 1 to load into banked RAM instead of main RAM (can be combined with load_aux for aux banked)
|
||||||
lc_bank = 1 ;load into specified bank (1 or 2) if load_banked=1
|
lc_bank = 2 ;load into specified bank (1 or 2) if load_banked=1
|
||||||
one_page = 0 ;set to 1 if verbose mode says that you should (smaller code)
|
one_page = 0 ;set to 1 if verbose mode says that you should (smaller code)
|
||||||
|
|
||||||
;user-defined driver load address
|
;user-defined driver load address
|
||||||
@ -68,7 +68,7 @@ ver_02 = 1
|
|||||||
reloc = $fe00 ;page-aligned, as high as possible, the ideal value will be shown on mismatch
|
reloc = $fe00 ;page-aligned, as high as possible, the ideal value will be shown on mismatch
|
||||||
} ;PASS2
|
} ;PASS2
|
||||||
} else { ;load_high = 0
|
} else { ;load_high = 0
|
||||||
reloc = $d000 ;page-aligned, but otherwise wherever you want
|
reloc = $d400 ;page-aligned, but otherwise wherever you want
|
||||||
} ;load_high
|
} ;load_high
|
||||||
} else { ;load_banked = 0
|
} else { ;load_banked = 0
|
||||||
!if load_high = 1 {
|
!if load_high = 1 {
|
||||||
@ -2684,7 +2684,6 @@ hddresparse
|
|||||||
bne hddrdwrloop
|
bne hddrdwrloop
|
||||||
} ;aligned_read
|
} ;aligned_read
|
||||||
hddrdwrdone
|
hddrdwrdone
|
||||||
bit $c08b ;restore banks
|
|
||||||
!if allow_aux = 1 {
|
!if allow_aux = 1 {
|
||||||
ldx #0
|
ldx #0
|
||||||
hddsetaux sta CLRAUXWR, x
|
hddsetaux sta CLRAUXWR, x
|
||||||
@ -2823,7 +2822,6 @@ hddseekrdwr
|
|||||||
|
|
||||||
stx bloklo
|
stx bloklo
|
||||||
sta blokhi
|
sta blokhi
|
||||||
bit $c083 ;switch banks
|
|
||||||
|
|
||||||
unrunit1 = unrelochdd + (* - reloc)
|
unrunit1 = unrelochdd + (* - reloc)
|
||||||
lda #$d1
|
lda #$d1
|
||||||
@ -2997,7 +2995,7 @@ hdddataend
|
|||||||
!warn "initial reloc too low, adjust to ", (0 - (((hdddataend + $ff) & -256) - reloc)) & $ffff
|
!warn "initial reloc too low, adjust to ", (0 - (((hdddataend + $ff) & -256) - reloc)) & $ffff
|
||||||
} ;hdddataend
|
} ;hdddataend
|
||||||
} ;enable_floppy
|
} ;enable_floppy
|
||||||
hdddirbuf = $d200
|
hdddirbuf = reloc - $200
|
||||||
!if aligned_read = 0 {
|
!if aligned_read = 0 {
|
||||||
hddencbuf = hdddirbuf - $200
|
hddencbuf = hdddirbuf - $200
|
||||||
} ;aligned_read
|
} ;aligned_read
|
||||||
@ -3010,7 +3008,7 @@ hdddataend
|
|||||||
} ;allow_trees
|
} ;allow_trees
|
||||||
} else { ;load_high = 0
|
} else { ;load_high = 0
|
||||||
!pseudopc ((hdddataend + $ff) & -256) {
|
!pseudopc ((hdddataend + $ff) & -256) {
|
||||||
hdddirbuf = *
|
hdddirbuf = $d000
|
||||||
}
|
}
|
||||||
!if aligned_read = 0 {
|
!if aligned_read = 0 {
|
||||||
hddencbuf = hdddirbuf + $200
|
hddencbuf = hdddirbuf + $200
|
||||||
|
Loading…
x
Reference in New Issue
Block a user