aboutsummaryrefslogtreecommitdiff
path: root/emulators
diff options
context:
space:
mode:
authorStefan Eßer <se@FreeBSD.org>2021-04-11 19:24:37 +0000
committerStefan Eßer <se@FreeBSD.org>2021-04-11 19:26:59 +0000
commitc9f346ce07f463181c81b885a04508fb9845482a (patch)
tree791a923e4b41f57251f09df9051978f6233e5416 /emulators
parenta2fa05009fd280fcf8e93f1062b554fdcca63c9a (diff)
downloadports-c9f346ce07f463181c81b885a04508fb9845482a.tar.gz
ports-c9f346ce07f463181c81b885a04508fb9845482a.zip
New port: emulators/z80pack Z80 emulator with CP/M-80
This port builds only the generic Z80 emulator and installs various CP/M-80 disk images. The images can be copied into user directories and updated from within the emulation of with the cpmtools programs. The emulation covers CP-NET and MP/M-80 and addition to CP/M-1.4, CP/M-2.2, and CP/M-3.0. The port could be extended to install the full hardware emulation of some classic S-100 bus computers from ALTAIR, IMSAI, and Cromemco (including working emulation of the front panels).
Diffstat (limited to 'emulators')
-rw-r--r--emulators/z80pack/Makefile32
-rw-r--r--emulators/z80pack/distinfo3
-rw-r--r--emulators/z80pack/files/patch-cpmsim_srcsim_Makefile.bsd23
-rw-r--r--emulators/z80pack/files/patch-cpmsim_srctools_Makefile30
-rw-r--r--emulators/z80pack/pkg-descr6
-rw-r--r--emulators/z80pack/pkg-plist30
6 files changed, 124 insertions, 0 deletions
diff --git a/emulators/z80pack/Makefile b/emulators/z80pack/Makefile
new file mode 100644
index 000000000000..50cfc3f9a0d4
--- /dev/null
+++ b/emulators/z80pack/Makefile
@@ -0,0 +1,32 @@
+# $FreeBSD$
+
+PORTNAME= z80pack
+DISTVERSION= 1.37
+CATEGORIES= emulators
+MASTER_SITES= https://www.autometer.de/unix4fun/z80pack/ftp/
+EXTRACT_SUFX= tgz
+
+MAINTAINER= se@FreeBSD.org
+COMMENT= Complete CP/M-80 emulator
+
+LICENSE= MIT
+LICENSE_FILE= ${WRKSRC}/LICENSE
+
+OPTIONS_DEFINE= DOCS
+
+do-build:
+ ${MAKE} -C ${WRKSRC}/cpmsim/srcsim -f Makefile.bsd OPTFLAGS="${CFLAGS}" PREFIX=${PREFIX} all clean
+ ${MAKE} -C ${WRKSRC}/cpmsim/srctools CC="${CC}" CFLAGS="${CFLAGS}"
+
+do-install:
+.for file in mkdskimg bin2hex send receive ptp2bin
+ ${INSTALL_PROGRAM} ${WRKSRC}/cpmsim/srctools/${file} ${STAGEDIR}${PREFIX}/bin
+.endfor
+ ${INSTALL_PROGRAM} ${WRKSRC}/cpmsim/cpmsim ${STAGEDIR}${PREFIX}/bin
+ cd ${WRKSRC}/cpmsim/conf && ${COPYTREE_SHARE} . ${STAGEDIR}${DATADIR}
+ cd ${WRKSRC}/cpmsim/disks/library && ${COPYTREE_SHARE} . ${STAGEDIR}${DATADIR}/disks
+
+do-install-DOCS-on:
+ cd ${WRKSRC}/doc && ${COPYTREE_SHARE} . ${STAGEDIR}${DOCSDIR}
+
+.include <bsd.port.mk>
diff --git a/emulators/z80pack/distinfo b/emulators/z80pack/distinfo
new file mode 100644
index 000000000000..a66190da0813
--- /dev/null
+++ b/emulators/z80pack/distinfo
@@ -0,0 +1,3 @@
+TIMESTAMP = 1618153489
+SHA256 (z80pack-1.37tgz) = 0a4d199c822546e28fb9d8e055b4bf7ca4c1b984b2f707f99d39f00b80c59d2a
+SIZE (z80pack-1.37tgz) = 15674455
diff --git a/emulators/z80pack/files/patch-cpmsim_srcsim_Makefile.bsd b/emulators/z80pack/files/patch-cpmsim_srcsim_Makefile.bsd
new file mode 100644
index 000000000000..a34be0654a9d
--- /dev/null
+++ b/emulators/z80pack/files/patch-cpmsim_srcsim_Makefile.bsd
@@ -0,0 +1,23 @@
+--- cpmsim/srcsim/Makefile.bsd.orig 2021-01-06 16:07:39 UTC
++++ cpmsim/srcsim/Makefile.bsd
+@@ -1,8 +1,8 @@
+ # system wide location for machines configuration files
+-CONF=/usr/local/share/cpmsim/conf
++CONF=${PREFIX}/share/z80pack/conf
+
+ # system wide location for disk images
+-DISKS=/usr/local/share/cpmsim/disks
++DISKS=${PREFIX}/share/z80pack/disks
+
+ CC = cc
+
+@@ -10,7 +10,8 @@ CC = cc
+ #CFLAGS = -O3 -c -Wall -Wextra -Wno-self-assign -fstack-protector-all -D_FORTIFY_SOURCE=2 -DCONFDIR=\"${CONF}\" -DDISKSDIR=\"${DISKS}\"
+
+ # Production
+-CFLAGS = -O3 -c -Wall -Wextra -Wno-self-assign -U_FORTIFY_SOURCE -DCONFDIR=\"${CONF}\" -DDISKSDIR=\"${DISKS}\"
++#CFLAGS = -O3 -c -Wall -Wextra -Wno-self-assign -U_FORTIFY_SOURCE -DCONFDIR=\"${CONF}\" -DDISKSDIR=\"${DISKS}\"
++CFLAGS = ${OPTFLAGS} -c -Wall -Wextra -Wno-self-assign -U_FORTIFY_SOURCE -DCONFDIR=\"${CONF}\" -DDISKSDIR=\"${DISKS}\"
+
+ LFLAGS =
+
diff --git a/emulators/z80pack/files/patch-cpmsim_srctools_Makefile b/emulators/z80pack/files/patch-cpmsim_srctools_Makefile
new file mode 100644
index 000000000000..1d2a75a3e83a
--- /dev/null
+++ b/emulators/z80pack/files/patch-cpmsim_srctools_Makefile
@@ -0,0 +1,30 @@
+--- cpmsim/srctools/Makefile.orig 2021-01-06 16:07:39 UTC
++++ cpmsim/srctools/Makefile
+@@ -1,19 +1,19 @@
+ #
+ # some places where the tools usually are installed
+ #
+-INSTALLDIR=${HOME}/bin
++#INSTALLDIR=${HOME}/bin
+ #INSTALLDIR=/usr/local/bin
+
+ #CC = cc
+-CC = gcc
++#CC = gcc
+
+-CFLAGS= -O3 -Wall
++#CFLAGS= -O3 -Wall
+
+-all: test mkdskimg bin2hex send receive ptp2bin
+- @echo
+- @echo "Done."
+- @echo "Now run make install"
+- @echo
++all: mkdskimg bin2hex send receive ptp2bin
++# @echo
++# @echo "Done."
++# @echo "Now run make install"
++# @echo
+
+ test:
+ @test -d ${INSTALLDIR} || (echo "${INSTALLDIR} doesn't exist, fix INSTALLDIR"; exit 1)
diff --git a/emulators/z80pack/pkg-descr b/emulators/z80pack/pkg-descr
new file mode 100644
index 000000000000..a9893a1a23e1
--- /dev/null
+++ b/emulators/z80pack/pkg-descr
@@ -0,0 +1,6 @@
+z80pack emulates an 8080 or Z80 CPU and provides CP/M-80 and UCSD-Pascal
+environments. Besides emulation of a generic CP/M system, support for
+full emulation of typical ALTAIR or IMSAI systems and their specific
+hardware is possible, including a graphical front-panel.
+
+WWW: https://www.autometer.de/unix4fun/z80pack/
diff --git a/emulators/z80pack/pkg-plist b/emulators/z80pack/pkg-plist
new file mode 100644
index 000000000000..08d2b5e53f95
--- /dev/null
+++ b/emulators/z80pack/pkg-plist
@@ -0,0 +1,30 @@
+bin/bin2hex
+bin/cpmsim
+bin/mkdskimg
+bin/ptp2bin
+bin/receive
+bin/send
+%%PORTDOCS%%%%DOCSDIR%%/CREDITS
+%%PORTDOCS%%%%DOCSDIR%%/FrontPanel_User_Manual_2.0.pdf
+%%PORTDOCS%%%%DOCSDIR%%/README-asm.txt
+%%PORTDOCS%%%%DOCSDIR%%/README-cpm.txt
+%%PORTDOCS%%%%DOCSDIR%%/README-frontpanel.txt
+%%PORTDOCS%%%%DOCSDIR%%/z80-documented.pdf
+%%DATADIR%%/disks/cpm13.dsk
+%%DATADIR%%/disks/cpm14.dsk
+%%DATADIR%%/disks/cpm1975.dsk
+%%DATADIR%%/disks/cpm2-1.dsk
+%%DATADIR%%/disks/cpm2-2.dsk
+%%DATADIR%%/disks/cpm2-62khd.dsk
+%%DATADIR%%/disks/cpm3-1.dsk
+%%DATADIR%%/disks/cpm3-2.dsk
+%%DATADIR%%/disks/cpm3-8080-1.dsk
+%%DATADIR%%/disks/cpm3-8080-2.dsk
+%%DATADIR%%/disks/hd-tools.dsk
+%%DATADIR%%/disks/hd-toolsrc.dsk
+%%DATADIR%%/disks/i8080tests.dsk
+%%DATADIR%%/disks/mpm-1.dsk
+%%DATADIR%%/disks/mpm-2.dsk
+%%DATADIR%%/disks/z80tests.dsk
+%%DATADIR%%/net_client.conf.example
+%%DATADIR%%/net_server.conf.example