restore Fuji Crowded Speed Way

This commit is contained in:
Peter Ferrie 2020-03-12 12:36:28 -07:00
parent 094cc9fddd
commit 2583b42ed9
6 changed files with 49 additions and 12 deletions

Binary file not shown.

View File

@ -0,0 +1,5 @@
BLOCKCHAIN=Type(06),AuxType(6000),Access(C3)
FUJI.SPEED.WAY=Type(06),AuxType(6000),Access(C3)
OOTW=Type(06),AuxType(6000),Access(C3)
POLLYWOG=Type(06),AuxType(6000),Access(C3)
_FILEINFORMATION.TXT=Type(06),AuxType(6000),Access(C3)

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

View File

@ -1,5 +1,5 @@
;license:MIT
;(c) 2018-9 by 4am & qkumba
;(c) 2018-2020 by 4am & qkumba
;
; ProRWTS2 glue functions
;
@ -57,6 +57,32 @@ LoadFile
jsr LoadFileInternal
jmp SwitchToBank1
;------------------------------------------------------------------------------
; LoadAuxFile
; Load a file into aux memory all at once, using ProRWTS2
;
; supports paths, see note
;
; in: stack contains 6 bytes of parameters:
; +1 [word] address of length-prefixed pathname
; +3 [word] address of length-prefixed filename
; +5 [word] address to load file, or 0 to use file's default address
; out: all flags clobbered
; all registers clobbered
; gPathname clobbered
;------------------------------------------------------------------------------
LoadAuxFile
+PARAMS_ON_STACK 6
+LDPARAM 1
jsr SetPath
+LDPARAM 3
jsr AddToPath
+LDPARAMPTR 5, ldrlo ; set load address
jsr SwitchToBank2
lda #1 ; request aux memory
jsr LoadFileAuxInternal
jmp SwitchToBank1
;------------------------------------------------------------------------------
; LoadDHRFile
; load .A2FC file (uncompressed double hi-res graphics) into memory

View File

@ -1,5 +1,5 @@
;license:MIT
;(c) 2018-9 by 4am & qkumba
;(c) 2018-2020 by 4am & qkumba
;
; ProRWTS2 glue functions
;
@ -8,12 +8,15 @@
; and parse.prefs which handle bank switching for you.
LoadFileInternal
lda #0 ; 0 = read into main memory
LoadFileAuxInternal
sta @auxreq+1 ; call with A=1 to load directly into aux memory
+LDADDR gPathname
+STAY namlo ; set filename
jsr traverse ; go to subdirectory, set up filename for read
lda #cmdread ; read (instead of write)
sta reqcmd
lda #0 ; 0 = read into main memory
lsr
sta auxreq
lda ldrlo+1
bne + ; if caller provided a load address, use it
@ -24,28 +27,30 @@ LoadFileInternal
+STAY ldrlo
+ lda #$FF ; read entire file (ProRWTS2 will figure out exact size)
sta sizehi
@auxreq
lda #0
sta auxreq
JumpOpen
jmp hddopendir ; exit via ProRWTS2
LoadDHRFileInternal
+LDADDR gPathname
+STAY namlo ; set filename
jsr traverse ; go to subdirectory, set up filename for read
lda #$00 ; read first $2000 bytes
sta sizelo
sta ldrlo
lda #$20
sta sizehi
asl
sta ldrhi ; into $4000
lda #1 ; 1 = read into aux memory
sta auxreq
lda #cmdread ; read (instead of write)
sta reqcmd
;;lda #1 ; 1 = read into aux memory
sta auxreq
lsr ; read first $2000 bytes
sta sizelo
sta ldrlo
jsr hddopendir ; call ProRWTS2
lda #$20 ; read next $2000 bytes
sta sizehi
asl
sta ldrhi ; into $4000
dec auxreq ; 0 = read into main memory
clc ; not a subdirectory
jmp hddrdwrpart ; call ProRWTS2
@ -67,4 +72,4 @@ SaveSmallFileInternal
lda #cmdwrite ; write (instead of read)
sta reqcmd
sta sizehi ; 512 bytes
jmp hddopendir ; exit via ProRWTS2 (must re-open the file after query)
bne JumpOpen ; exit via ProRWTS2 (must re-open the file after query)