diff --git a/Binary/Apps/.gitignore b/Binary/Apps/.gitignore new file mode 100644 index 00000000..44b2d93d --- /dev/null +++ b/Binary/Apps/.gitignore @@ -0,0 +1,2 @@ +*.com +*.COM diff --git a/Binary/Apps/Tunes/.gitignore b/Binary/Apps/Tunes/.gitignore new file mode 100644 index 00000000..2e691325 --- /dev/null +++ b/Binary/Apps/Tunes/.gitignore @@ -0,0 +1,2 @@ +*.pt* +*.mym diff --git a/Source/Apps/Makefile b/Source/Apps/Makefile index 99803081..dad2f4ce 100644 --- a/Source/Apps/Makefile +++ b/Source/Apps/Makefile @@ -1,6 +1,6 @@ OBJECTS = SysGen.com Survey.com \ - SysCopy.COM Assign.COM Format.COM Talk.COM OSLdr.COM Mode.COM RTC.COM \ - Timer.COM IntTest.COM + SysCopy.com Assign.com Format.com Talk.com OSLdr.com Mode.com RTC.com \ + Timer.com IntTest.com OTHERS = *.hex *.com SUBDIRS = XM FDU FAT # Tune - left out for now @@ -9,6 +9,7 @@ TOOLS =../../Tools include $(TOOLS)/Makefile.inc -%.COM: %.asm - $(TASM) $< $@ +USETASM = 1 + +Survey.com: USETASM=0 diff --git a/Source/Apps/XM/Makefile b/Source/Apps/XM/Makefile index e7fab9e4..72aed531 100644 --- a/Source/Apps/XM/Makefile +++ b/Source/Apps/XM/Makefile @@ -5,8 +5,8 @@ OTHERS = *.hex include $(TOOLS)/Makefile.inc -xm.com: xmdm125.HEX xmhb.HEX +xm.com: xmdm125.hex xmhb.hex $(ZXCC) $(CPM)/MLOAD25 XM=xmdm125,xmhb -xmuf.com: xmdm125.HEX xmuf.HEX +xmuf.com: xmdm125.hex xmuf.hex $(ZXCC) $(CPM)/MLOAD25 XMUF=xmdm125,xmuf diff --git a/Source/BPBIOS/Makefile b/Source/BPBIOS/Makefile index a5e31b8a..ba1e2694 100644 --- a/Source/BPBIOS/Makefile +++ b/Source/BPBIOS/Makefile @@ -5,7 +5,7 @@ VERSIONS = \ 34n 34nbnk \ 41tbnk 41nbnk -HD0IMG = ../../Binary/hd0.img +HD0IMG = ../../Binary/hd_bp.img IMGFILES = $(foreach ver,$(VERSIONS),bp$(ver).img) DISTFILES = *.zex *.rel myterm.z3t diff --git a/Source/CPM22/.gitignore b/Source/CPM22/.gitignore index c41f07b8..461ebf40 100644 --- a/Source/CPM22/.gitignore +++ b/Source/CPM22/.gitignore @@ -1,3 +1,4 @@ *.bin *.hex *.lst +*.sys diff --git a/Source/CPM22/Makefile b/Source/CPM22/Makefile index 6c58b3c7..d13a30cc 100644 --- a/Source/CPM22/Makefile +++ b/Source/CPM22/Makefile @@ -1,6 +1,12 @@ -OBJECTS = CCP.BIN BDOS.BIN CCP22.BIN BDOS22.BIN OS2CCP.BIN OS3BDOS.BIN \ - ccpb03.bin bdosb01.bin +SYSFILES = cpm_wbw.sys cpm_una.sys +OBJECTS = CCP.bin BDOS.bin CCP22.bin BDOS22.bin OS2CCP.bin OS3BDOS.bin \ + ccpb03.bin bdosb01.bin loader.bin $(SYSFILES) OTHERS = *.hex TOOLS = ../../Tools include $(TOOLS)/Makefile.inc +cpm_wbw.sys: loader.bin OS2CCP.bin OS3BDOS.bin ../CBIOS/cbios_wbw.bin + cat loader.bin OS2CCP.bin OS3BDOS.bin ../CBIOS/cbios_wbw.bin > cpm_wbw.sys + +cpm_una.sys: loader.bin OS2CCP.bin OS3BDOS.bin ../CBIOS/cbios_una.bin + cat loader.bin OS2CCP.bin OS3BDOS.bin ../CBIOS/cbios_una.bin > cpm_una.sys diff --git a/Source/Images/.gitignore b/Source/Images/.gitignore index a5b5c746..ea0c4b19 100644 --- a/Source/Images/.gitignore +++ b/Source/Images/.gitignore @@ -1,2 +1,4 @@ +*.sys +*.img blank144 blankhd diff --git a/Source/Images/Makefile b/Source/Images/Makefile index 9860c396..d9b71123 100644 --- a/Source/Images/Makefile +++ b/Source/Images/Makefile @@ -3,9 +3,9 @@ # SYSTEMS = cpm_wbw.sys cpm_una.sys zsys_wbw.sys zsys_una.sys FDIMGS = fd_cpm22.img fd_zsdos.img fd_nzcom.img fd_cpm3.img fd_zpm3.img fd_ws4.img -HDIMGS = hd_cpm22.img hd_zsdos.img hd_nzcom.img hd_cpm3.img hd_zpm3.img hd_ws4.img +HDIMGS = hd_cpm22.img hd_zsdos.img hd_nzcom.img hd_cpm3.img hd_zpm3.img hd_ws4.img hd_bp.img OBJECTS = $(FDIMGS) $(HDIMGS) -OTHERS = $(SYSTEMS) +OTHERS = $(SYSTEMS) blank144 blankhd DEST=../../Binary @@ -48,13 +48,17 @@ zsys_una.sys: # an OS at the start of each image # blank144: - LANG=en_US.US-ASCII tr '\000' '\345' /dev/null + +HDSIZE := $(shell expr 128 '*' 65) blankhd: - LANG=en_US.US-ASCII tr '\000' '\345' /dev/null %.img:: $(SYSTEMS) blank144 blankhd - sys= ; \ + @sys= ; \ case $@ in (*cpm22*) sys=cpm_wbw.sys;; (*zsdos* | *nzcom) sys=zsys_wbw.sys;; esac ; \ if echo $@ | grep -q ^f ; then \ fmt=wbw_fd144 ; type=fd_ ; proto=blank144 ; \ @@ -62,25 +66,29 @@ blankhd: fmt=wbw_hd0 ; type=hd_ ; proto=blankhd ; \ fi ; \ d=$$(echo $(basename $@) | sed s/$$type//) ; \ - echo $@ $$d $$type $$fmt $$sys $$proto ; \ + echo Generating $@ ; \ cp $$proto $@ ; \ for u in $$(seq 0 15) ; do \ dir=d_$$d/u$$u ; \ if [ -d $$dir ] ; then \ - echo $(CPMCP) -f $$fmt $@ $$($(CASEFN) $$dir/*.*) $$u: ; \ + echo " " copying directory $$dir ; \ $(CPMCP) -f $$fmt $@ $$($(CASEFN) $$dir/*.*) $$u: ; \ fi ; \ done ; \ if [ -f d_$$d.txt ] ; then \ + echo " " copying files from d_$$d.txt ; \ grep -v ^# d_$$d.txt | tr -d '\r' | while read file user ; do \ - echo $$file $$user ; \ - echo $(CPMCP) -f $$fmt $@ $$($(CASEFN) $$file) $$user ; \ - $(CPMCP) -f $$fmt $@ $$($(CASEFN) $$file) $$user ; \ + rf=$$($(CASEFN) $$file) ; \ + if [ "$$rf" == nofile ] ; then \ + echo " " $$file missing ; \ + else \ + $(CPMCP) -f $$fmt $@ $$rf $$user ; \ + fi ; \ done ; \ fi ; \ if [ "$$sys" ] ; then \ echo copying system $$sys to $@ ; \ - dd if=$$sys of=$@ conv=notrunc ; \ + dd if=$$sys of=$@ conv=notrunc 2>/dev/null ; \ fi install:: diff --git a/Source/Makefile b/Source/Makefile index 66476f19..ff89e1e7 100644 --- a/Source/Makefile +++ b/Source/Makefile @@ -4,7 +4,6 @@ SUBDIRS += Apps CPM22 ZCPR ZCPR-DJ ZSDOS CBIOS CPM3 SUBDIRS += ZPM3 SUBDIRS += Forth NOTDONE += Fonts -SUBDIRS += BL SUBDIRS += BPBIOS SUBDIRS += HBIOS TOOLS = ../Tools diff --git a/Tools/.gitignore b/Tools/.gitignore new file mode 100644 index 00000000..24a162b6 --- /dev/null +++ b/Tools/.gitignore @@ -0,0 +1,2 @@ +Darwin +Linux diff --git a/Tools/Makefile.inc b/Tools/Makefile.inc index 7f4dc708..fc006d59 100644 --- a/Tools/Makefile.inc +++ b/Tools/Makefile.inc @@ -6,8 +6,7 @@ # make is very much case-sensitive, so we use this. if your underlying # filesystem is not case-preserving, forget it. # -# .asm: TASM sources, except ZCPR, where they are MAC. -# .ASM: MAC or RMAC sources +# .asm: TASM sources, except somewheres it is MAC or RMAC # .z80: Z80ASM sources, except ZSDOS, where they are ZMAC # .azm: zsm sources # @@ -44,20 +43,25 @@ CPMCP=$(TOOLS)/$(UNAME)/cpmcp # CPM=$(TOOLS)/cpm/bin -%.HEX: %.asm +%.com: %.asm + if [ "$(USETASM)" = 1 ] ; then \ + $(TASM) $< $@ ; \ + else \ + $(ZXCC) $(CPM)/MAC -$< -$$PO ; \ + $(ZXCC) $(CPM)/MLOAD25 -tmp.bin=$*.hex ; \ + mv tmp.bin $@ ; \ + rm -f $$($(CASEFN) $*.hex) ; \ + fi + +%.bin: %.ASM $(ZXCC) $(CPM)/MAC -$< -$$PO - -%.HEX: %.ASM - $(ZXCC) $(CPM)/MAC -$< -$$PO - -%.BIN: %.HEX - $(ZXCC) $(CPM)/MLOAD25 -$@=$< - -%.com: %.HEX - $(ZXCC) $(CPM)/MLOAD25 -$@=$< + $(ZXCC) $(CPM)/MLOAD25 -tmp.bin=$*.hex + mv tmp.bin $@ + rm -f $$($(CASEFN) $*.hex) %.com: %.z80 - $(ZXCC) $(CPM)/Z80ASM -$(basename $<)/F + $(ZXCC) $(CPM)/Z80ASM -$(basename $<)/F ; \ + mv $$($(CASEFN) $@) tmp.com ; mv tmp.com $@ %.bin: %.asm $(TASM) $< $@ @@ -68,7 +72,7 @@ CPM=$(TOOLS)/cpm/bin %.rel: %.z80 $(ZXCC) $(CPM)/Z80ASM -$(basename $<)/MF -%.HEX: %.180 +%.hex: %.180 $(ZXCC) $(CPM)/SLR180 -$(basename $<)/HF %.rel: %.azm @@ -109,16 +113,16 @@ clean:: done install:: all - @for file in $(OBJECTS) ; do \ + @if [ "$(DEST)" ] ; then for file in $(OBJECTS) ; do \ mkdir -p $(DEST) ; \ echo copy $$file to $(DEST) ; \ cp $$($(CASEFN) $$file) $(DEST) ; \ - done - @for file in $(DOCS) ; do \ + done ; fi + @if [ "$(DOCDEST)" ] ; then for file in $(DOCS) ; do \ mkdir -p $(DOCDEST) ; \ echo copy $$file to $(DOCDEST) ; \ cp $$($(CASEFN) $$file) $(DOCDEST) ; \ - done + done ; fi @for dir in $(SUBDIRS) ; do \ ( echo "install in `pwd`/$$dir" ; cd "$$dir" ; make install ) ; \ done