Browse Source

Merge pull request #80 from wwarthen/master

Resync
pull/84/head
b1ackmai1er 6 years ago
committed by GitHub
parent
commit
ba29011021
No known key found for this signature in database GPG Key ID: 4AEE18F83AFDEB23
  1. 1
      Makefile
  2. 1
      Source/BPBIOS/Clean.cmd
  3. 7
      Source/BPBIOS/Makefile
  4. 2
      Source/BPBIOS/util.z80
  5. 4
      Source/CPM22/Makefile
  6. 28
      Source/CPM3/Makefile
  7. 42
      Source/CPM3/biosldr.z80
  8. 46
      Source/Images/Makefile
  9. 7
      Source/Makefile
  10. 20
      Source/ZPM3/Makefile
  11. 13
      Source/ZSDOS/Makefile
  12. 11
      Tools/Makefile.inc
  13. 2
      Tools/unix/cpmtools/cpmfs.c
  14. 3
      Tools/unix/zx/config.h.darwin
  15. 1
      Tools/unix/zx/config.h.linux
  16. 4
      Tools/unix/zx/zx.h

1
Makefile

@ -12,6 +12,7 @@ clobber:
cd Tools/unix ; make clobber
cd Source ; make clobber
cd Binary ; make clobber
rm -f typescript
diff:
cd Source ; make diff

1
Source/BPBIOS/Clean.cmd

@ -8,6 +8,7 @@ if exist *.img del *.img
if exist bp*.rel del bp*.rel
if exist zcpr33*.rel del zcpr33*.rel
if exist *.bak del *.bak
if exist def-ww.lib del def-ww.lib
setlocal & cd ZCPR33 && call Clean.cmd & endlocal
setlocal & cd Z34RCP11 && call Clean.cmd & endlocal

7
Source/BPBIOS/Makefile

@ -18,7 +18,12 @@ SUBDIRS = ZCPR33 NZFCP13 Z34RCP11
include $(TOOLS)/Makefile.inc
$(HD0IMG): $(IMGFILES)
$(CPMCP) -f wbw_hd0 $(HD0IMG) $(IMGFILES) $(DISTFILES) 0:
if [ -f $(HD0IMG) ] ; then \
for f in $(IMGFILES) $(DISTFILES) ; do \
$(BINDIR)/cpmrm -f wbw_hd0 $(HD0IMG) 0:$$f ; \
done ; \
$(CPMCP) -f wbw_hd0 $(HD0IMG) $(IMGFILES) $(DISTFILES) 0: ; \
fi
zcpr33n.rel zcpr33t.rel:
(cd ZCPR33 ; make)

2
Source/BPBIOS/util.z80

@ -90,6 +90,8 @@ PC_PRTCHR:
POP AF
RET
NEWLINE2:
CALL NEWLINE
NEWLINE:
CALL PC_CR
CALL PC_LF

4
Source/CPM22/Makefile

@ -6,7 +6,7 @@ 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
cat loader.bin OS2CCP.bin OS3BDOS.bin ../CBIOS/cbios_wbw.bin > $@
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
cat loader.bin OS2CCP.bin OS3BDOS.bin ../CBIOS/cbios_una.bin > $@

28
Source/CPM3/Makefile

@ -4,8 +4,8 @@
#
# it does this by overriding OBJECTS in an invoked sub-make
#
OBJECTS = cpmldr.com cpm3res cpm3bnk zpmbios3 cpm3.sys gencpm.dat
OTHERS = cpmldr.rel biosldr.rel cpm3res.sys cpm3bnk.sys zpmbios3.spr
OBJECTS = cpmldr.com cpmldr.sys cpm3res cpm3bnk zpmbios3 cpm3.sys gencpm.dat
OTHERS = cpmldr.rel biosldr.rel cpm3res.sys cpm3bnk.sys zpmbios3.spr loader.bin cpmldr.bin
TOOLS = ../../Tools
include $(TOOLS)/Makefile.inc
@ -51,6 +51,24 @@ zpmbios3:
make OBJECTS=zpmbios3.spr
rm gencpm.dat
cpmldr.bin: biosldrd.rel cpmldr.rel
$(ZXCC) $(TOOLS)/cpm/bin/LINK -CPMLDRD[L100]=CPMLDR,BIOSLDRD
mv cpmldrd.com cpmldr.bin
cpmldr.com: biosldrc.rel cpmldr.rel
$(ZXCC) $(TOOLS)/cpm/bin/LINK -CPMLDRC[L100]=CPMLDR,BIOSLDRC
mv cpmldrc.com cpmldr.com
biosldrc.rel: biosldr.z80 optcmd.lib
cp optcmd.lib ldropts.lib
$(ZXCC) $(TOOLS)/cpm/bin/Z80ASM -BIOSLDR/MF
mv biosldr.rel biosldrc.rel
biosldrd.rel: biosldr.z80 optdsk.lib
cp optdsk.lib ldropts.lib
$(ZXCC) $(TOOLS)/cpm/bin/Z80ASM -BIOSLDR/MF
mv biosldr.rel biosldrd.rel
bios3.spr: $(BIOSOBJS)
$(ZXCC) $(CPM)/LINK -bios3[OS]=$(BIOSNAMES)
@ -60,13 +78,11 @@ bnkbios3.spr: $(BIOSOBJS)
zpmbios3.spr: $(BIOSOBJS)
$(ZXCC) $(TOOLS)/cpm/bin/LINK -zpmbios3[B]=$(BIOSNAMES)
cpmldr.com: cpmldr.rel biosldr.rel
$(ZXCC) $(TOOLS)/cpm/bin/LINK -cpmldr[L100]=cpmldr,biosldr
rm -f cpmldr.sym
cpm3.sys: cpm3$(DEFCPM3).sys
cp cpm3$(DEFCPM3).sys cpm3.sys
gencpm.dat: gen$(DEFCPM3).dat
cp gen$(DEFCPM3).dat gencpm.dat
cpmldr.sys: loader.bin cpmldr.bin
cat loader.bin cpmldr.bin > $@

42
Source/CPM3/biosldr.z80

@ -55,34 +55,47 @@ boot:
if cmdline
boot1:
ld (stksav),sp
ld sp,stack
ld de,prompt
boot1:
ld de,msgunit
call writestr
call cin
push af
call cout
ld de,crlf
call writestr
pop af
ld sp,(stksav)
sub '0'
jr c,boot1
cp 10 ; !!! Need to test against max disk unit num !!!
jr nc,boot1
ld (unit),a
ld de,msgslc
call writestr
call cin
push af
call cout
pop af
sub '0'
jr c,boot1
cp 10
jr nc,boot1
ld (slice),a
ld de,crlf
call writestr
ld sp,(stksav)
ld bc,0F9E0h ; HBIOS func: set boot info
ld d,a ; Unit
ld e,0 ; Slice
ld l,0 ; Bank
ld a,(unit) ; get unit
ld d,a ; put in D
ld a,(slice) ; get slice
ld e,a ; put in E
ld l,0 ; Bank is always zero
call 0FFF0h ; do it
else
@ -331,7 +344,8 @@ mult8_noadd:
djnz mult8_loop
ret
prompt db 13,10,'Boot CP/M 3 from Disk Unit: $'
msgunit db 13,10,13,10,'Boot CP/M 3 from Disk Unit: $'
msgslc db ' Slice: $'
crlf db 13,10,'$'
dpb$start:
@ -506,4 +520,4 @@ dtabuf ds 512 ; sector buffer
stack equ $
stksav dw 0
end
end

46
Source/Images/Makefile

@ -1,10 +1,14 @@
#
# this makefile subsumes all the work done in Build.cmd, Build{Hd,Fd}.*
#
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 hd_bp.img
OBJECTS = $(FDIMGS) $(HDIMGS)
SYSTEMS = ../CPM22/cpm_wbw.sys ../ZSDOS/zsys_wbw.sys ../CPM3/cpmldr.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 hd_bp.img
OBJECTS = $(FDIMGS) $(HDIMGS) hd_combo.img
OTHERS = $(SYSTEMS) blank144 blankhd
DEST=../../Binary
@ -12,32 +16,8 @@ DEST=../../Binary
TOOLS = ../../Tools
include $(TOOLS)/Makefile.inc
#
# create the os's, which are the bootloader, ccp, bdos and bios
#
cpm_wbw.sys:
cat $$($(CASEFN) \
../BL/bl.bin \
../CPM22/os2ccp.bin ../CPM22/OS3BDOS.BIN \
../CBIOS/cbios_wbw.bin) > cpm_wbw.sys
cpm_una.sys:
cat $$($(CASEFN) \
../BL/bl.bin \
../CPM22/os2ccp.bin ../CPM22/OS3BDOS.BIN \
../CBIOS/cbios_una.bin) > cpm_una.sys
zsys_wbw.sys:
cat $$($(CASEFN) \
../BL/bl.bin \
../ZCPR-DJ/zcpr.bin ../ZSDOS/ZSDOS.BIN \
../CBIOS/cbios_wbw.bin) > zsys_wbw.sys
zsys_una.sys:
cat $$($(CASEFN) \
../BL/bl.bin \
../ZCPR-DJ/zcpr.bin ../ZSDOS/ZSDOS.BIN \
../CBIOS/cbios_una.bin) > zsys_una.sys
hd_combo.img: $(HDIMGS)
cat $(HDIMGS) > $@
#
# this somewhat impenetrable and fragile code is used to build each of the images
@ -59,7 +39,11 @@ blankhd:
%.img:: $(SYSTEMS) blank144 blankhd
@sys= ; \
case $@ in (*cpm22*) sys=cpm_wbw.sys;; (*zsdos* | *nzcom) sys=zsys_wbw.sys;; esac ; \
case $@ in \
(*cpm22*) sys=../CPM22/cpm_wbw.sys;; \
(*zsdos* | *nzcom*) sys=../ZSDOS/zsys_wbw.sys;; \
(*cpm3* | *zpm3*) sys=../CPM3/cpmldr.sys;; \
esac ; \
if echo $@ | grep -q ^f ; then \
fmt=wbw_fd144 ; type=fd_ ; proto=blank144 ; \
else \

7
Source/Makefile

@ -1,6 +1,11 @@
#
# order is actually important, because of build dependencies
#
NOTDONE = Doc
SUBDIRS = Prop
SUBDIRS += Apps CPM22 ZCPR ZCPR-DJ ZSDOS CBIOS CPM3
SUBDIRS += Apps
SUBDIRS += CBIOS HBIOS
SUBDIRS += CPM22 ZCPR ZCPR-DJ ZSDOS CPM3
SUBDIRS += ZPM3
SUBDIRS += Forth
NOTDONE += Fonts

20
Source/ZPM3/Makefile

@ -1,12 +1,20 @@
OBJECTS = zpmldr.com cpm3.sys zinstal.zpm startzpm.com zccp.com \
setz3.com clrhist.com autotog.com cpmldr.com
OBJECTS = zpmldr.com zpmldr.sys cpm3.sys zinstal.zpm startzpm.com zccp.com \
setz3.com clrhist.com autotog.com
OTHERS = biosldr.rel gencpm.com gencpm.dat bnkbios3.spr
TOOLS =../../Tools
include $(TOOLS)/Makefile.inc
zpmldr.com: zpm3ldr.rel biosldr.rel
$(ZXCC) $(CPM)/LINK -ZPMLDR[L100]=ZPM3LDR,BIOSLDR
zpmldr.bin: zpm3ldr.rel biosldrd.rel
$(ZXCC) $(CPM)/LINK -ZPMLDRD[L100]=ZPM3LDR,BIOSLDRD
mv zpmldrd.com zpmldr.bin
zpmldr.com: zpm3ldr.rel biosldrc.rel
$(ZXCC) $(CPM)/LINK -ZPMLDRC[L100]=ZPM3LDR,BIOSLDRC
mv zpmldrc.com zpmldr.com
zpmldr.sys: zpmldr.bin loader.bin
cat loader.bin zpmldr.bin > $@
cpm3.sys: gencpm.com gencpm.dat bnkbios3.spr
$(ZXCC) gencpm -auto -display
@ -20,10 +28,10 @@ gencpm.dat: ../CPM3/genbnk.dat
gencpm.com: ../CPM3/gencpm.com
cp $< $@
biosldr.rel: ../CPM3/biosldr.rel
biosldrc.rel: ../CPM3/biosldrc.rel
cp $< $@
cpmldr.com: ../CPM3/cpmldr.com
biosldrd.rel: ../CPM3/biosldrd.rel
cp $< $@
zccp.com: ../ZCCP/ccp.com

13
Source/ZSDOS/Makefile

@ -1,6 +1,9 @@
OBJECTS = zsdos.bin
OTHERS = zsdos.rel zsdos.err
SYSFILES = zsys_wbw.sys zsys_una.sys
OBJECTS = $(SYSFILES)
OTHERS = zsdos.rel zsdos.err loader.bin
TOOLS = ../../Tools
CCP = ../ZCPR-DJ/zcpr.bin
include $(TOOLS)/Makefile.inc
zsdos.rel: zsdos.z80
@ -9,3 +12,9 @@ zsdos.rel: zsdos.z80
zsdos.bin: zsdos.rel
$(ZXCC) $(CPM)/LINK -$@=$<[LD800]
zsys_wbw.sys: loader.bin $(CCP) zsdos.bin ../CBIOS/cbios_wbw.bin
cat loader.bin $(CCP) zsdos.bin ../CBIOS/cbios_wbw.bin > $@
zsys_una.sys: loader.bin $(CCP) zsdos.bin ../CBIOS/cbios_una.bin
cat loader.bin $(CCP) zsdos.bin ../CBIOS/cbios_una.bin > $@

11
Tools/Makefile.inc

@ -11,6 +11,7 @@
# .azm: zsm sources
#
UNAME := $(shell uname)
BINDIR = $(TOOLS)/$(UNAME)
#
# since this file is included from below, it's handy to have an idea
@ -32,11 +33,11 @@ DIFFPATH := $(DIFFTO)/$(RELPATH)
#
CASEFN = $(TOOLS)/unix/casefn.sh
ZXCC=$(TOOLS)/$(UNAME)/zx
TASM=$(TOOLS)/$(UNAME)/uz80as
OPENSPIN=$(TOOLS)/$(UNAME)/openspin
BSTC=$(TOOLS)/$(UNAME)/bstc
CPMCP=$(TOOLS)/$(UNAME)/cpmcp
ZXCC=$(BINDIR)/zx
TASM=$(BINDIR)/uz80as
OPENSPIN=$(BINDIR)/openspin
BSTC=$(BINDIR)//bstc
CPMCP=$(BINDIR)/cpmcp
#
# directory containing cpm binaries

2
Tools/unix/cpmtools/cpmfs.c

@ -681,7 +681,7 @@ static int diskdefReadSuper(struct cpmSuperBlock *d, const char *format)
d->type=0;
if (
(fp=fopen("diskdefs","r"))==(FILE*)0 &&
(ddenv && ((fp=fopen(DISKDEFS,"r"))==(FILE*)0)) &&
(ddenv && ((fp=fopen(ddenv,"r"))==(FILE*)0)) &&
(fp=fopen(DISKDEFS,"r"))==(FILE*)0)
{
fprintf(stderr,"%s: Neither `diskdefs' nor `" DISKDEFS "' could be opened.\n",cmd);

3
Tools/unix/zx/config.h.darwin

@ -2,10 +2,11 @@
#define HAVE_DIRENT_H
#define HAVE_UTIME_H
#define HAVE_FCNTL_H
#define HAVE_UNISTD_H
#define BINDIR80 getenv("ZXBINDIR")
#define LIBDIR80 getenv("ZXLIBDIR")
#define INCDIR80 getenv("ZXINCDIR")
#define LINUX
#define DARWIN
#include <sys/param.h>
#include <sys/mount.h>
#define _S_IFDIR S_IFDIR

1
Tools/unix/zx/config.h.linux

@ -3,6 +3,7 @@
#define HAVE_UTIME_H
#define HAVE_FCNTL_H
#define HAVE_SYS_VFS_H
#define HAVE_UNISTD_H
#define BINDIR80 getenv("ZXBINDIR")
#define LIBDIR80 getenv("ZXLIBDIR")
#define INCDIR80 getenv("ZXINCDIR")

4
Tools/unix/zx/zx.h

@ -31,7 +31,7 @@
#include <sys/types.h>
#include <sys/stat.h>
#include <fcntl.h>
#ifdef LINUX
#if defined(LINUX) || defined(DARWIN)
#include <unistd.h>
#define _isatty(a) isatty(a)
#define _fileno(a) fileno(a)
@ -87,7 +87,7 @@ extern char **argv;
extern int argc;
extern byte RAM[65536]; /* The Z80's address space */
extern usestdio;
extern int usestdio;
/* Z80 CPU emulation */

Loading…
Cancel
Save