From 0422b260c92138b0fc0c18efeaeef7b96713aa98 Mon Sep 17 00:00:00 2001 From: Peter Ferrie Date: Tue, 15 Jan 2019 21:50:51 -0800 Subject: [PATCH 1/3] sync --- bin/rsync.js | 19 +++++++++++++++++++ winmake.bat | 19 ++++++++++++------- 2 files changed, 31 insertions(+), 7 deletions(-) create mode 100644 bin/rsync.js diff --git a/bin/rsync.js b/bin/rsync.js new file mode 100644 index 000000000..d743abe02 --- /dev/null +++ b/bin/rsync.js @@ -0,0 +1,19 @@ +a = new ActiveXObject("scripting.filesystemobject") +b = WScript.Arguments(0).lastIndexOf('\\') + 1 +c = WScript.Arguments(0).substr(0, b) +d = WScript.Arguments(0).substr(b) +if (d.substr(0, 2) == '*.') +{ + d = d.substr(2) +} +for (b = new Enumerator(a.GetFolder(c).files); !b.atEnd(); b.moveNext()) +{ + if ((d == '*') || (d == a.getextensionname(b.item().name))) + { + e = WScript.Arguments(1) + "\\" + b.item().Name + if (!a.fileexists(e) || (a.getfile(e).datelastmodified < b.item().datelastmodified)) + { + new ActiveXObject("wscript.shell").run('cmd /c copy "' + c + b.item().name + '" ' + WScript.Arguments(1), 0, 1) + } + } +} diff --git a/winmake.bat b/winmake.bat index fe0d997e2..2142eab45 100644 --- a/winmake.bat +++ b/winmake.bat @@ -24,6 +24,7 @@ if "%1" equ "asm" ( 2>nul md build\HGR 2>nul md build\ACTION 2>nul md build\DHGR +2>nul md build\SHR 2>nul md build\SS 2>nul md build\DEMO 2>nul md build\FX @@ -71,6 +72,7 @@ if "%1" equ "asm" ( %ACME% src\fx\fx.hgr.ripple.a %ACME% src\fx\fx.hgr.ripple2.a %ACME% src\fx\fx.hgr.star.a +%ACME% src\fx\fx.shr.fizzle.a goto :EOF ) @@ -95,25 +97,28 @@ cscript /nologo bin/padto.js 512 build\PREFS.CONF %CADIUS% ADDFILE "build\%DISK%" "/%VOLUME%/" "res\ATTRACT.CONF" >>build\log %CADIUS% ADDFILE "build\%DISK%" "/%VOLUME%/" "res\FX.CONF" >>build\log %CADIUS% ADDFILE "build\%DISK%" "/%VOLUME%/" "res\DFX.CONF" >>build\log -1>nul copy /y res\hgr\* build\HGR >>build\log +cscript /nologo bin/rsync.js res\hgr\* build\HGR >>build\log cscript /nologo bin/buildfileinfo.js build\HGR "06" "4000" >>build\log %CADIUS% ADDFOLDER "build\%DISK%" "/%VOLUME%/HGR" "build/HGR" >>build\log -1>nul copy /y res\action\* build\ACTION >>build\log +cscript /nologo bin/rsync.js res\action\* build\ACTION >>build\log cscript /nologo bin/buildfileinfo.js build\ACTION "06" "4000" >>build\log %CADIUS% ADDFOLDER "build\%DISK%" "/%VOLUME%/ACTION" "build/ACTION" >>build\log -1>nul copy /y res\dhgr\* build\DHGR >>build\log +cscript /nologo bin/rsync.js res\dhgr\* build\DHGR >>build\log cscript /nologo bin/buildfileinfo.js build\DHGR "06" "4000" >>build\log %CADIUS% ADDFOLDER "build\%DISK%" "/%VOLUME%/DHGR" "build/DHGR" >>build\log -1>nul copy /y res\ss\* build\SS >>build\log +cscript /nologo bin/rsync.js res\shr\* build\SHR >>build\log +cscript /nologo bin/buildfileinfo.js build\SHR "C1" "2000" >>build\log +%CADIUS% ADDFOLDER "build\%DISK%" "/%VOLUME%/SHR" "build/SHR" >>build/log +cscript /nologo bin/rsync.js res\ss\* build\SS >>build\log cscript /nologo bin/buildfileinfo.js build\SS "04" "4000" >>build\log %CADIUS% ADDFOLDER "build\%DISK%" "/%VOLUME%/SS" "build/SS" >>build\log -1>nul copy /y res\demo\* build\DEMO >>build\log +cscript /nologo bin/rsync.js res\demo\* build\DEMO >>build\log %CADIUS% ADDFOLDER "build\%DISK%" "/%VOLUME%/DEMO" "build/DEMO" >>build\log -1>nul copy /y res\fx\* build\FX >>build\log +cscript /nologo bin/rsync.js res\fx\* build\FX >>build\log %CADIUS% ADDFOLDER "build\%DISK%" "/%VOLUME%/FX" "build/FX" >>build\log %CADIUS% CREATEFOLDER "build\%DISK%" "/%VOLUME%/X/" >>build/log cscript /nologo bin/do2po.js res\dsk build\po -1>nul copy /y res\dsk\*.po build\po +cscript /nologo bin/rsync.js res\dsk\*.po build\po cscript /nologo bin/extract.js build\po >>build/log echo y|1>nul 2>nul del /s build\X\.DS_Store echo y|1>nul 2>nul del /s build\X\PRODOS From 9d104061f4ca3144f33676ad5c3f859f00befb22 Mon Sep 17 00:00:00 2001 From: Peter Ferrie Date: Tue, 15 Jan 2019 21:55:40 -0800 Subject: [PATCH 2/3] fix Tetris 48kb --- src/glue.prorwts2.a | 47 +++++++++++++++++++++++++++++++-------------- 1 file changed, 33 insertions(+), 14 deletions(-) diff --git a/src/glue.prorwts2.a b/src/glue.prorwts2.a index 497cf8fbd..db05f9e95 100644 --- a/src/glue.prorwts2.a +++ b/src/glue.prorwts2.a @@ -524,32 +524,46 @@ ProDOS_enter sta sizehi sta sizelo jsr hddopendir + ldx @handles+1 + lda bleftlo + sta @sizelo-1, x + lda blefthi + sta @sizehi-1, x lda #0 sta blkidx beq @jmp_zp ;always @imp_seek - lda #cmdseek - !byte $2c + ldx @handles+1 + lda @sizelo-1, x + sta bleftlo + lda @sizehi-1, x + sta blefthi + lda #0 + sta blkidx + sta blkofflo + sta blkoffhi + sta reqcmd + jsr @set_rdwrbuff + lda ldrhi + sta sizehi + lda ldrlo + sta sizelo + jsr hddrdwrpart + lda ldrhi + ora ldrlo + bne @jmp_zp + dec blkidx + beq @jmp_zp ;always + @imp_read lda #cmdread !byte $2c @imp_write lda #cmdwrite sta reqcmd - pha jsr @set_rdwrbuff - pla - pha - bne @set_blocks - lda ldrhi - sta sizehi - lda ldrlo - sta sizelo -@set_blocks jsr hddrdwrpart - pla - beq @jmp_zp ;seek doesn't return size ldy #6 lda sizelo2 sta (packet), y @@ -566,7 +580,7 @@ ProDOS_enter iny lda blefthi sta (packet), y - jmp @restore_zp + bcs @restore_zp ;always @imp_close lda @handles+1 @@ -656,5 +670,10 @@ ProDOS_enter @handle !byte 0, 0 ;only up to two handles at a time +@sizelo + !byte 0, 0 ;only up to two files at a time +@sizehi + !byte 0, 0 ;only up to two files at a time + @saved_zp !fill (last_zp - first_zp) + 1 From 329f867fd6ac44ab1a4cfd45372738bfb927542d Mon Sep 17 00:00:00 2001 From: Peter Ferrie Date: Wed, 16 Jan 2019 13:12:57 -0800 Subject: [PATCH 3/3] fix Tetrisk 128k --- src/glue.prorwts2.a | 38 +++++++++++++++++++++----------------- 1 file changed, 21 insertions(+), 17 deletions(-) diff --git a/src/glue.prorwts2.a b/src/glue.prorwts2.a index db05f9e95..e90feefcb 100644 --- a/src/glue.prorwts2.a +++ b/src/glue.prorwts2.a @@ -524,38 +524,47 @@ ProDOS_enter sta sizehi sta sizelo jsr hddopendir - ldx @handles+1 - lda bleftlo - sta @sizelo-1, x - lda blefthi - sta @sizehi-1, x lda #0 sta blkidx beq @jmp_zp ;always @imp_seek - ldx @handles+1 - lda @sizelo-1, x - sta bleftlo - lda @sizehi-1, x - sta blefthi + jsr @set_rdwrbuff lda #0 sta blkidx sta blkofflo sta blkoffhi sta reqcmd - jsr @set_rdwrbuff + jsr @reset + ldx sizelo + beq @seek64 + sta sizehi + sta sizelo + jsr @seekreset + inc ldrlo + bne @seek64 + inc ldrhi + +@seek64 lda ldrhi sta sizehi lda ldrlo sta sizelo - jsr hddrdwrpart + jsr @seekreset lda ldrhi ora ldrlo bne @jmp_zp dec blkidx beq @jmp_zp ;always +@seekreset + jsr hddrdwrpart +@reset + lda #$ff + sta blefthi + sta bleftlo + rts + @imp_read lda #cmdread !byte $2c @@ -670,10 +679,5 @@ ProDOS_enter @handle !byte 0, 0 ;only up to two handles at a time -@sizelo - !byte 0, 0 ;only up to two files at a time -@sizehi - !byte 0, 0 ;only up to two files at a time - @saved_zp !fill (last_zp - first_zp) + 1