more build simplification

This commit is contained in:
4am 2021-06-18 20:50:19 -04:00
parent 2ce68a439a
commit 86692918e7
4 changed files with 82 additions and 98 deletions

View File

@ -31,18 +31,17 @@ asm:
printf "\x20\x00" | cat - build/t00only.tmp > build/t00only.pak
cd src && $(ACME) -r ../build/passport.lst -DFORWARD_DECRUNCHING=1 passport.a 2> ../build/relbase.log
cd src && $(ACME) -DRELBASE=`cat ../build/relbase.log | grep "RELBASE =" | cut -d"=" -f2 | cut -d"(" -f2 | cut -d")" -f1` -DFORWARD_DECRUNCHING=1 passport.a 2> ../build/vars.log
grep "SaveProDOS=" build/vars.log | cut -d":" -f3 | cut -d"(" -f1 > build/vars.a
grep "ThisSlot=" build/vars.log | cut -d":" -f3 | cut -d"(" -f1 >> build/vars.a
grep "PrintByID=" build/vars.log | cut -d":" -f3 | cut -d"(" -f1 >> build/vars.a
grep "WaitForKey=" build/vars.log | cut -d":" -f3 | cut -d"(" -f1 >> build/vars.a
grep "CleanExit=" build/vars.log | cut -d":" -f3 | cut -d"(" -f1 >> build/vars.a
grep "OpenFile=" build/vars.log | cut -d":" -f3 | cut -d"(" -f1 >> build/vars.a
grep "ReadFile=" build/vars.log | cut -d":" -f3 | cut -d"(" -f1 >> build/vars.a
grep "CloseFile=" build/vars.log | cut -d":" -f3 | cut -d"(" -f1 >> build/vars.a
grep "GetVolumeName=" build/vars.log | cut -d":" -f3 | cut -d"(" -f1 >> build/vars.a
grep "GetVolumeInfo=" build/vars.log | cut -d":" -f3 | cut -d"(" -f1 >> build/vars.a
grep "PREFSVER=" build/vars.log | cut -d":" -f3 | cut -d"(" -f1 >> build/vars.a
grep "PREFSFILE=" build/vars.log | cut -d":" -f3 | cut -d"(" -f1 >> build/vars.a
grep "OpenFile=" build/vars.log | cut -d":" -f3 | cut -d"(" -f1 >> build/vars.a
grep "ReadFile=" build/vars.log | cut -d":" -f3 | cut -d"(" -f1 >> build/vars.a
grep "CloseFile=" build/vars.log | cut -d":" -f3 | cut -d"(" -f1 >> build/vars.a
grep "SLOT=" build/vars.log | cut -d":" -f3 | cut -d"(" -f1 >> build/vars.a
grep "DRIVE=" build/vars.log | cut -d":" -f3 | cut -d"(" -f1 >> build/vars.a
$(EXOMIZER) -b build/passport.tmp -o build/passport.pak

View File

@ -107,13 +107,14 @@ CreateFileOnHardDisk
; out: all registers and flags clobbered
; ProDOS is in memory
;-------------------------------
CloseFileOnHardDisk
!macro CloseFileOnHardDisk {
lda gHardDiskRef
beq +
jsr CloseFile
lda #0
sta gHardDiskRef
+ rts
+
}
;-------------------------------
; PrintHardDiskImagePath

View File

@ -44,11 +44,70 @@ VERBOSE = $00 ; set to $01 to display API label addresses
!source "apidefs.a"
!source "prefs.save.a"
FirstMover
Relocatable
jmp MainMenu
!bin "../build/t00only.pak"
NonRelocatable
!source "strings/en.a"
!source "id/inspect0.a"
!source "id/precheck.a"
!source "id/trace.a"
!source "id/trace33.a"
!source "id/trace32.a"
!source "id/trace8b3.a"
!source "id/trace33p.a"
!source "id/dos33.a"
!source "id/prodos.a"
!source "id/pascal.a"
!source "id/rdos.a"
!source "id/jsr8b3.a"
!source "id/mecc.a"
!source "id/datasoft.a"
!source "id/tsr.a"
!source "id/protecteddos.a"
!source "id/encode44.a"
!source "id/encode53.a"
!source "id/ea.a"
!source "id/milliken.a"
!source "id/daviddos.a"
!source "id/quickdos.a"
!source "id/diversidos.a"
!source "id/prontodos.a"
!source "id/d5d5f7.a"
!source "id/laureate.a"
!source "id/micrograms.a"
!source "id/volumename.a"
!source "id/dinkeydos.a"
!source "id/advent.a"
!source "id/panglosdos.a"
!source "id/davidson.a"
!source "id/holle.a"
!source "id/phoenix.a"
!source "id/555.a"
!source "id/bootfailure.a"
!source "print.a"
!source "compare.a"
!source "modify.a"
!source "memory.a"
!source "sectormap.a"
!source "write.a"
!source "mli.a"
!source "ramdisk.a"
!source "harddisk.a"
!source "slots.a"
!source "prefs.a"
!source "keys.a"
!source "cffa.a"
!source "progress.a"
!source "rwts.a"
!source "wholetrack.a"
!source "standarddelivery.a"
!source "adstyle.a"
!source "universalstyle.a"
!source "crackme.a"
MainMenu
ldx #$FF
txs
@ -241,12 +300,12 @@ Cleanup
lda $C0E8
lda gHardDiskRef
ora gRAMDiskRef
beq +
bne +
rts
jsr SwapProDOS ; ProDOS out -> in
jsr DeleteFileOnRAMDisk
jsr CloseFileOnHardDisk
jsr SwapProDOS ; ProDOS in -> out
+ rts
+CloseFileOnHardDisk
jmp SwapProDOS ; ProDOS in -> out
;-------------------------------
; CleanExit
@ -433,107 +492,33 @@ _byte_hi = * + 2
_byte_skip_hi:
rts
!source "strings/en.a"
!source "id/inspect0.a"
!source "id/precheck.a"
!source "id/trace.a"
!source "id/trace33.a"
!source "id/trace32.a"
!source "id/trace8b3.a"
!source "id/trace33p.a"
!source "id/dos33.a"
!source "id/prodos.a"
!source "id/pascal.a"
!source "id/rdos.a"
!source "id/jsr8b3.a"
!source "id/mecc.a"
!source "id/datasoft.a"
!source "id/tsr.a"
!source "id/protecteddos.a"
!source "id/encode44.a"
!source "id/encode53.a"
!source "id/ea.a"
!source "id/milliken.a"
!source "id/daviddos.a"
!source "id/quickdos.a"
!source "id/diversidos.a"
!source "id/prontodos.a"
!source "id/d5d5f7.a"
!source "id/laureate.a"
!source "id/micrograms.a"
!source "id/volumename.a"
!source "id/dinkeydos.a"
!source "id/advent.a"
!source "id/panglosdos.a"
!source "id/davidson.a"
!source "id/bootfailure.a"
!source "id/holle.a"
!source "id/phoenix.a"
!source "id/555.a"
!source "print.a"
!source "compare.a"
!source "modify.a"
!source "memory.a"
!source "sectormap.a"
!source "write.a"
!source "mli.a"
!source "ramdisk.a"
!source "harddisk.a"
!source "slots.a"
!source "prefs.a"
!source "keys.a"
!source "cffa.a"
!source "progress.a"
!source "rwts.a"
!source "wholetrack.a"
!source "standarddelivery.a"
!source "adstyle.a"
!source "universalstyle.a"
!source "crackme.a"
!source "apicode.a" ; /!\ must be last
!if RELBASE = $2000 {
!ifdef PASS2 {
} else { ;PASS2
!set PASS2=1
!warn "RELBASE = ", HIGHPOINT - (* - FirstMover)
!warn "RELBASE = ", HIGHPOINT - (* - Relocatable)
}
} else {
!if (HIGHPOINT - (* - MainMenu)) < LOWPOINT {
; code between FirstMover and MainMenu is moved and tracked, so it can be below LOWPOINT
!serious "My spoon is too big (", HIGHPOINT - (* - MainMenu), ") is below minimum (", LOWPOINT, ")!"
!if (HIGHPOINT - (* - NonRelocatable)) < LOWPOINT {
; code before NonRelocatable is moved and tracked, so it can be below LOWPOINT
!serious "My spoon is too big (", HIGHPOINT - (* - NonRelocatable), ") is below minimum (", LOWPOINT, ")!"
} else {
!warn "LowPoint=", HIGHPOINT - (* - FirstMover)
!warn "LowPoint=", NonRelocatable
}
!warn "MainMenu=",MainMenu
!warn "CleanExit=",CleanExit
!warn "ThisSlot=",ThisSlot
!warn "PrintByID=",PrintByID
!warn "WaitForKey=",WaitForKey
!warn "CleanExit=",CleanExit
!warn "OpenFile=",OpenFile
!warn "ReadFile=",ReadFile
!warn "CloseFile=",CloseFile
!warn "GetVolumeName=",GetVolumeName
!warn "OnlineReturn=",OnlineReturn
!warn "VolumeName=",VolumeName
!warn "RAMDiskImagePath=",RAMDiskImagePath
!warn "GetVolumeInfo=",GetVolumeInfo
!warn "mliparam=",mliparam
!warn "access=",access
!warn "filetype=",filetype
!warn "auxtype=",auxtype
!warn "blocks=",blocks
!warn "PREFSVER=",PREFSVER
!warn "PREFSFILE=",PREFSFILE
!warn "PREFSBUFFER=",PREFSBUFFER
!warn "PREFSREADLEN=",PREFSREADLEN
!warn "PREFSVER=",PREFSVER
!warn "kForceLower=",kForceLower
!warn "PrintByID=",PrintByID
!warn "DiskIIArray=",DiskIIArray
!warn "HardDiskArray=",HardDiskArray
!warn "ThisSlot=",ThisSlot
!warn "CheckCache=",CheckCache
!warn "IDBootFailure=",IDBootFailure
!warn "PREFSVER=",PREFSVER
!warn "SLOT=",SLOT
!warn "DRIVE=",DRIVE
}

View File

@ -24,18 +24,17 @@ cd ..\src
2>..\build\out.txt %ACME% -DFORWARD_DECRUNCHING=1 passport.a
for /f "tokens=2,3 delims=)" %%q in ('find "RELBASE =" ..\build\out.txt') do set _make=%%q
2>..\build\out.txt %ACME% -r ..\build\passport.lst -DRELBASE=$%_make:~-4% -DFORWARD_DECRUNCHING=1 passport.a
for /f "tokens=4,* delims=:(" %%q in ('find "SaveProDOS=" ..\build\out.txt') do echo %%q > ..\build\vars.a
for /f "tokens=4,* delims=:(" %%q in ('find "ThisSlot=" ..\build\out.txt') do echo %%q >> ..\build\vars.a
for /f "tokens=4,* delims=:(" %%q in ('find "PrintByID=" ..\build\out.txt') do echo %%q >> ..\build\vars.a
for /f "tokens=4,* delims=:(" %%q in ('find "WaitForKey=" ..\build\out.txt') do echo %%q >> ..\build\vars.a
for /f "tokens=4,* delims=:(" %%q in ('find "CleanExit=" ..\build\out.txt') do echo %%q >> ..\build\vars.a
for /f "tokens=4,* delims=:(" %%q in ('find "OpenFile=" ..\build\out.txt') do echo %%q >> ..\build\vars.a
for /f "tokens=4,* delims=:(" %%q in ('find "ReadFile=" ..\build\out.txt') do echo %%q >> ..\build\vars.a
for /f "tokens=4,* delims=:(" %%q in ('find "CloseFile=" ..\build\out.txt') do echo %%q >> ..\build\vars.a
for /f "tokens=4,* delims=:(" %%q in ('find "GetVolumeName=" ..\build\out.txt') do echo %%q >> ..\build\vars.a
for /f "tokens=4,* delims=:(" %%q in ('find "GetVolumeInfo=" ..\build\out.txt') do echo %%q >> ..\build\vars.a
for /f "tokens=4,* delims=:(" %%q in ('find "PREFSVER=" ..\build\out.txt') do echo %%q >> ..\build\vars.a
for /f "tokens=4,* delims=:(" %%q in ('find "PREFSFILE=" ..\build\out.txt') do echo %%q >> ..\build\vars.a
for /f "tokens=4,* delims=:(" %%q in ('find "OpenFile=" ..\build\out.txt') do echo %%q >> ..\build\vars.a
for /f "tokens=4,* delims=:(" %%q in ('find "ReadFile=" ..\build\out.txt') do echo %%q >> ..\build\vars.a
for /f "tokens=4,* delims=:(" %%q in ('find "CloseFile=" ..\build\out.txt') do echo %%q >> ..\build\vars.a
for /f "tokens=4,* delims=:(" %%q in ('find "SLOT=" ..\build\out.txt') do echo %%q >> ..\build\vars.a
for /f "tokens=4,* delims=:(" %%q in ('find "DRIVE=" ..\build\out.txt') do echo %%q >> ..\build\vars.a
cd ..\build