Import emulators/tnylpo, a utility to run CP/M-80 programs under Unix.

ok benoit@

tnylpo allows the execution of programs written for CP/M-80 version 2.2
under Unixy operating systems. The companion program tnylpo-convert
converts text files to and from the CP/M format.

Features:
* Full Z80 instruction set (including undocumented instructions and
  features)
* All BDOS calls of CP/M 2.2 and a few taken from CP/M 3 (mostly for
  date and time handling)
* All character handling BIOS calls of CP/M 2.2
* Maps CP/M file operations to operations on files in the Unix file
  system
* Allows you to map up to 16 CP/M drives to arbitrary Unix directories
* Built-in curses based emulation of the DEC VT52
* Allows you to combine CP/M programs with Unix shell redirections and
  pipelines

Note that all CP/M program and data file names are expected in lower
case. For example, files called TURBO.COM or L80.COM need to be renamed
to turbo.com and l80.com to be accessible by tnylpo.
This commit is contained in:
bcallah 2020-12-16 16:53:48 +00:00
parent af40a9f377
commit f31a6a1561
5 changed files with 80 additions and 0 deletions

33
emulators/tnylpo/Makefile Normal file
View File

@ -0,0 +1,33 @@
# $OpenBSD: Makefile,v 1.1.1.1 2020/12/16 16:53:48 bcallah Exp $
V = 1.1.2
COMMENT = utility to run CP/M-80 programs under Unix
DISTNAME = tnylpo-${V}
CATEGORIES = emulators
HOMEPAGE = https://gitlab.com/gbrein/tnylpo
MAINTAINER = Brian Callahan <bcallah@openbsd.org>
# BSD
PERMIT_PACKAGE = Yes
WANTLIB += c curses
MASTER_SITES = https://gitlab.com/gbrein/tnylpo/-/archive/${V}/
USE_GMAKE = Yes
MAKE_FILE = makefile
MAKE_FLAGS = CC="${CC}" FLAGS="${CFLAGS}"
NO_TEST = Yes
# No install routine
# Taken from the FreeBSD port
do-install:
${INSTALL_PROGRAM} ${WRKSRC}/tnylpo{,-convert} ${PREFIX}/bin
${INSTALL_MAN} ${WRKSRC}/tnylpo{,-convert}.1 ${PREFIX}/man/man1
${INSTALL_DATA_DIR} ${PREFIX}/share/tnylpo
${INSTALL_DATA} ${WRKSRC}/mine/{README.md,mine.com,mine.conf} \
${PREFIX}/share/tnylpo
.include <bsd.port.mk>

View File

@ -0,0 +1,2 @@
SHA256 (tnylpo-1.1.2.tar.gz) = UDEHxSgCwlisTL4pkz3tfhxEKgGGYbY3WxnfUAcpmGU=
SIZE (tnylpo-1.1.2.tar.gz) = 101274

View File

@ -0,0 +1,16 @@
$OpenBSD: patch-makefile,v 1.1.1.1 2020/12/16 16:53:48 bcallah Exp $
Remove hardcoded optimization flags.
Index: makefile
--- makefile.orig
+++ makefile
@@ -28,7 +28,7 @@
SYSTEM=$(shell uname -s)
-CFLAGS=-std=c99 -pedantic -O3 -Wall
+CFLAGS=${FLAGS} -std=c99 -pedantic -Wall
ifeq ($(SYSTEM),Linux)
CFLAGS+=-D_POSIX_C_SOURCE=200112L -D_XOPEN_SOURCE_EXTENDED
CFLAGS+=-I /usr/include/ncursesw

View File

@ -0,0 +1,20 @@
tnylpo allows the execution of programs written for CP/M-80 version 2.2
under Unixy operating systems. The companion program tnylpo-convert
converts text files to and from the CP/M format.
Features:
* Full Z80 instruction set (including undocumented instructions and
features)
* All BDOS calls of CP/M 2.2 and a few taken from CP/M 3 (mostly for
date and time handling)
* All character handling BIOS calls of CP/M 2.2
* Maps CP/M file operations to operations on files in the Unix file
system
* Allows you to map up to 16 CP/M drives to arbitrary Unix directories
* Built-in curses based emulation of the DEC VT52
* Allows you to combine CP/M programs with Unix shell redirections and
pipelines
Note that all CP/M program and data file names are expected in lower
case. For example, files called TURBO.COM or L80.COM need to be renamed
to turbo.com and l80.com to be accessible by tnylpo.

View File

@ -0,0 +1,9 @@
@comment $OpenBSD: PLIST,v 1.1.1.1 2020/12/16 16:53:48 bcallah Exp $
@bin bin/tnylpo
@bin bin/tnylpo-convert
@man man/man1/tnylpo-convert.1
@man man/man1/tnylpo.1
share/tnylpo/
share/tnylpo/README.md
share/tnylpo/mine.com
share/tnylpo/mine.conf