This commit is contained in:
4am 2019-06-18 14:56:12 -04:00
commit 1c7d40de87
6 changed files with 68 additions and 4 deletions

View File

@ -2,6 +2,6 @@ a = new ActiveXObject("scripting.filesystemobject")
b = a.opentextfile(WScript.Arguments(0)) b = a.opentextfile(WScript.Arguments(0))
c = b.read(0x40) c = b.read(0x40)
b.skip(0x200) b.skip(0x200)
d = b.read(0x1fff600) d = b.read(a.getfile(WScript.Arguments(0)).size-0x240)
b.close() b.close()
b=a.createtextfile(WScript.Arguments(0), 1).write(c+a.opentextfile(WScript.Arguments(1)).read(512)+d) b=a.createtextfile(WScript.Arguments(0), 1).write(c+a.opentextfile(WScript.Arguments(1)).read(512)+d)

Binary file not shown.

View File

@ -64,6 +64,45 @@ LoadFile
sta reqcmd sta reqcmd
lda #0 ; 0 = read into main memory lda #0 ; 0 = read into main memory
sta auxreq sta auxreq
sta sizelo
sta sizehi ; 0 = query load address
jsr hddopendir ; call ProRWTS2
lda ldrlo2
sta ldrlo
lda ldrhi2
sta ldrhi
dec sizehi ; read entire file (ProRWTS2 will figure out exact size)
jmp hddopendir ; exit via ProRWTS2 (must re-open the file after query)
;------------------------------------------------------------------------------
; LoadFileAt
; Load a file into memory all at once, using ProRWTS2, at the load address
; specified by the passed parameter.
;
; supports paths, see note
;
; in: stack contains 4 bytes of parameters:
; +1 address of filename
; +3 address to load file
; out: all flags clobbered
; all registers clobbered
; filename clobbered (hey, this is important, you can't call this with
; the same filename buffer twice unless you REALLY know what you're
; doing, so you should probably use one of the LOAD_* macros which
; copies the filename to a temporary buffer)
; stack set to next instruction after parameters
;------------------------------------------------------------------------------
LoadFileAt
+PARAMS_ON_STACK 4
+LDPARAM 1
+STAY namlo ; set filename
+LDPARAM 3
+STAY ldrlo ; set load address
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
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 jmp hddopendir ; exit via ProRWTS2
@ -90,8 +129,11 @@ LoadDHRFile
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
sta ldrlo
lda #$20 lda #$20
sta sizehi sta sizehi
asl
sta ldrhi
lda #1 ; 1 = read into aux memory lda #1 ; 1 = read into aux memory
sta auxreq sta auxreq
lda #cmdread ; read (instead of write) lda #cmdread ; read (instead of write)
@ -99,6 +141,8 @@ LoadDHRFile
jsr hddopendir ; call ProRWTS2 jsr hddopendir ; call ProRWTS2
lda #$20 ; read next $2000 bytes lda #$20 ; read next $2000 bytes
sta sizehi sta sizehi
asl
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 jmp hddrdwrpart ; call ProRWTS2
@ -125,9 +169,21 @@ SaveSmallFile
+LDPARAM 3 +LDPARAM 3
+STAY ldrlo ; set data buffer address for ProRWTS2 +STAY ldrlo ; set data buffer address for ProRWTS2
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
lda #cmdread ; read (instead of write)
sta reqcmd
lda #0 ; 0 = read into main memory
sta sizelo
sta sizehi ; 0 = query load address
jsr hddopendir ; call ProRWTS2
lda ldrlo2
sta ldrlo
lda ldrhi2
sta ldrhi
lda #cmdwrite ; write (instead of read) lda #cmdwrite ; write (instead of read)
sta reqcmd sta reqcmd
jmp hddopendir ; exit via ProRWTS2 sta sizelo ; non-zero
jmp hddopendir ; exit via ProRWTS2 (must re-open the file after query)
;------------------------------------------------------------------------------ ;------------------------------------------------------------------------------
; traverse [private] ; traverse [private]

View File

@ -17,7 +17,7 @@ ver_02 = 1
enable_floppy = 0 ;set to 1 to enable floppy drive support enable_floppy = 0 ;set to 1 to enable floppy drive support
poll_drive = 0 ;set to 1 to check if disk is in drive, recommended if allow_multi is enabled poll_drive = 0 ;set to 1 to check if disk is in drive, recommended if allow_multi is enabled
allow_extend = 0 ;enable support for more than four partitions (note: it has overhead) allow_extend = 0 ;enable support for more than four partitions (note: it has overhead)
override_adr = 0 ;set to 1 to require an explicit load address override_adr = 1 ;set to 1 to require an explicit load address
aligned_read = 0 ;set to 1 if all reads can be a multiple of block size aligned_read = 0 ;set to 1 if all reads can be a multiple of block size
enable_readseq=0 ;set to 1 to enable reading multiple sequential times from the same file without seek enable_readseq=0 ;set to 1 to enable reading multiple sequential times from the same file without seek
;(exposes a fixed address that can be called for either floppy or hard disk support) ;(exposes a fixed address that can be called for either floppy or hard disk support)
@ -2222,6 +2222,14 @@ hddfoundname iny
} ;allow_subdir or allow_saplings or allow_trees or not aligned_read } ;allow_subdir or allow_saplings or allow_trees or not aligned_read
} ;override_adr } ;override_adr
;;allow query even in override mode
ldy #AUX_TYPE
lda (bloklo), y
sta ldrlo2
iny
lda (bloklo), y
sta ldrhi2
;cache KEY_POINTER ;cache KEY_POINTER
ldy #KEY_POINTER ldy #KEY_POINTER

View File

@ -99,7 +99,7 @@ cscript /nologo bin\padto.js 512 build\PREFS.CONF
%CADIUS% ADDFILE "build\%DISK%" "/%VOLUME%/" "res\FX.CONF" >>build\log %CADIUS% ADDFILE "build\%DISK%" "/%VOLUME%/" "res\FX.CONF" >>build\log
%CADIUS% ADDFILE "build\%DISK%" "/%VOLUME%/" "res\DFX.CONF" >>build\log %CADIUS% ADDFILE "build\%DISK%" "/%VOLUME%/" "res\DFX.CONF" >>build\log
cscript /nologo bin\rsync.js res\title.hgr\* build\TITLE.HGR >>build\log cscript /nologo bin\rsync.js res\title.hgr\* build\TITLE.HGR >>build\log
cscript /nologo cscript /nologo bin\buildfileinfo.js build\TITLE.HGR "06" "4000" >>build\log cscript /nologo bin\buildfileinfo.js build\TITLE.HGR "06" "4000" >>build\log
%CADIUS% ADDFOLDER "build\%DISK%" "/%VOLUME%/TITLE.HGR" "build\TITLE.HGR" >>build\log %CADIUS% ADDFOLDER "build\%DISK%" "/%VOLUME%/TITLE.HGR" "build\TITLE.HGR" >>build\log
cscript /nologo bin\rsync.js res\title.dhgr\* build\TITLE.DHGR >>build\log cscript /nologo bin\rsync.js res\title.dhgr\* build\TITLE.DHGR >>build\log
cscript /nologo bin\buildfileinfo.js build\TITLE.DHGR "06" "4000" >>build\log cscript /nologo bin\buildfileinfo.js build\TITLE.DHGR "06" "4000" >>build\log