pkgsrc-Changes archive

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]

CVS commit: pkgsrc/emulators



Module Name:    pkgsrc
Committed By:   hauke
Date:           Fri Jul  4 16:30:12 UTC 2025

Modified Files:
        pkgsrc/emulators: Makefile
Added Files:
        pkgsrc/emulators/ntvcm: DESCR Makefile PLIST distinfo
        pkgsrc/emulators/ntvcm/files: ntvcm.1
        pkgsrc/emulators/ntvcm/patches: patch-djl__os.hxx patch-makefile

Log Message:
ntvcm is a tool to run i8080/Z80 .COM binaries in CP/M 2.2 emulation.

Console input/output works for both BIOS and BDOS APIs.

Disk input/output works via the BDOS API. There is no attempt at
emulating physical disks. Applications that use BDOS for disk I/O will
work, but applications that use the BIOS, or assume things about disk
layout, will not.

For example, assuming CP/M 2.2's asm.com and load.com are in the
current directory, this will assemble test.asm and generate test.com
on Windows, Linux, or MacOS:

% ntvcm asm test
& ntvcm load test


To generate a diff of this commit:
cvs rdiff -u -r1.373 -r1.374 pkgsrc/emulators/Makefile
cvs rdiff -u -r0 -r1.1 pkgsrc/emulators/ntvcm/DESCR \
    pkgsrc/emulators/ntvcm/Makefile pkgsrc/emulators/ntvcm/PLIST \
    pkgsrc/emulators/ntvcm/distinfo
cvs rdiff -u -r0 -r1.1 pkgsrc/emulators/ntvcm/files/ntvcm.1
cvs rdiff -u -r0 -r1.1 pkgsrc/emulators/ntvcm/patches/patch-djl__os.hxx \
    pkgsrc/emulators/ntvcm/patches/patch-makefile

Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.

Modified files:

Index: pkgsrc/emulators/Makefile
diff -u pkgsrc/emulators/Makefile:1.373 pkgsrc/emulators/Makefile:1.374
--- pkgsrc/emulators/Makefile:1.373     Wed Jul  2 21:27:00 2025
+++ pkgsrc/emulators/Makefile   Fri Jul  4 16:30:11 2025
@@ -1,4 +1,4 @@
-# $NetBSD: Makefile,v 1.373 2025/07/02 21:27:00 wiz Exp $
+# $NetBSD: Makefile,v 1.374 2025/07/04 16:30:11 hauke Exp $
 #
 
 COMMENT=       Emulators for other machines and systems
@@ -172,6 +172,7 @@ SUBDIR+=    netbsd32_compat30-extras
 SUBDIR+=       netbsd32_compat40
 SUBDIR+=       netbsd32_compat40-extras
 SUBDIR+=       nono
+SUBDIR+=       ntvcm
 SUBDIR+=       open-simh
 SUBDIR+=       openmsx
 SUBDIR+=       or1ksim

Added files:

Index: pkgsrc/emulators/ntvcm/DESCR
diff -u /dev/null pkgsrc/emulators/ntvcm/DESCR:1.1
--- /dev/null   Fri Jul  4 16:30:12 2025
+++ pkgsrc/emulators/ntvcm/DESCR        Fri Jul  4 16:30:11 2025
@@ -0,0 +1,15 @@
+ntvcm is a tool to run i8080/Z80 .COM binaries in CP/M 2.2 emulation.
+
+Console input/output works for both BIOS and BDOS APIs.
+
+Disk input/output works via the BDOS API. There is no attempt at
+emulating physical disks. Applications that use BDOS for disk I/O will
+work, but applications that use the BIOS, or assume things about disk
+layout, will not.
+
+For example, assuming CP/M 2.2's asm.com and load.com are in the
+current directory, this will assemble test.asm and generate test.com
+on Windows, Linux, or MacOS:
+
+% ntvcm asm test
+& ntvcm load test
Index: pkgsrc/emulators/ntvcm/Makefile
diff -u /dev/null pkgsrc/emulators/ntvcm/Makefile:1.1
--- /dev/null   Fri Jul  4 16:30:12 2025
+++ pkgsrc/emulators/ntvcm/Makefile     Fri Jul  4 16:30:11 2025
@@ -0,0 +1,42 @@
+# $NetBSD: Makefile,v 1.1 2025/07/04 16:30:11 hauke Exp $
+
+DISTNAME=      ntvcm
+PKGNAME=       ntvcm-20250704
+CATEGORIES=    emulators
+MASTER_SITES=  ${MASTER_SITE_GITHUB:=davidly/}
+GITHUB_PROJECT=        ntvcm
+GITHUB_TAG=    1ef7d7f7d6a2a80ea177e11543dc8def773fe0bc        # 2025-07-04
+
+MAINTAINER=    hauke%NetBSD.org@localhost
+HOMEPAGE=      https://github.com/davidly/ntvcm?tab=readme-ov-file\#readme
+COMMENT=       Run i8080/Z80 .COM binaries in CP/M 2.2 emulation
+LICENSE=       cc0-1.0-universal
+
+USE_LANGUAGES= c++
+
+WRKSRC=                ${WRKDIR}/${DISTNAME}-${GITHUB_TAG}
+
+USE_TOOLS=     gmake
+MAKE_FILE=     makefile
+
+DOCDIR=                share/doc/ntvcm
+
+INSTALLATION_DIRS+=    bin ${PKGMANDIR}/man1 ${DOCDIR}
+
+do-install:
+       ${INSTALL_DATA} ${WRKSRC}/README.md ${DESTDIR}${PREFIX}/${DOCDIR}
+       ${INSTALL_MAN} ${FILESDIR}/ntvcm.1 ${DESTDIR}${PREFIX}/${PKGMANDIR}/man1
+       ${INSTALL_PROGRAM} ${WRKSRC}/ntvcm ${DESTDIR}${PREFIX}/bin/ntvcm
+
+do-test:
+       cd ${WRKSRC}/tests && ../ntvcm -8 8080EX1.COM
+       cd ${WRKSRC}/tests && ../ntvcm -8 8080EXER.COM
+       cd ${WRKSRC}/tests && ../ntvcm -8 8080PRE.COM
+       cd ${WRKSRC}/tests && ../ntvcm -8 CPUTEST.COM
+       cd ${WRKSRC}/tests && ../ntvcm -8 TEST.COM
+       cd ${WRKSRC}/tests && ../ntvcm -8 TST8080.COM
+       cd ${WRKSRC}/tests && ../ntvcm TST8080.COM
+       cd ${WRKSRC} && ./ntvcm z80test/zexdoc.com
+       cd ${WRKSRC} && ./ntvcm z80test/zexall.com
+
+.include "../../mk/bsd.pkg.mk"
Index: pkgsrc/emulators/ntvcm/PLIST
diff -u /dev/null pkgsrc/emulators/ntvcm/PLIST:1.1
--- /dev/null   Fri Jul  4 16:30:12 2025
+++ pkgsrc/emulators/ntvcm/PLIST        Fri Jul  4 16:30:11 2025
@@ -0,0 +1,4 @@
+@comment $NetBSD: PLIST,v 1.1 2025/07/04 16:30:11 hauke Exp $
+bin/ntvcm
+man/man1/ntvcm.1
+share/doc/ntvcm/README.md
Index: pkgsrc/emulators/ntvcm/distinfo
diff -u /dev/null pkgsrc/emulators/ntvcm/distinfo:1.1
--- /dev/null   Fri Jul  4 16:30:12 2025
+++ pkgsrc/emulators/ntvcm/distinfo     Fri Jul  4 16:30:11 2025
@@ -0,0 +1,7 @@
+$NetBSD: distinfo,v 1.1 2025/07/04 16:30:11 hauke Exp $
+
+BLAKE2s (ntvcm-1ef7d7f7d6a2a80ea177e11543dc8def773fe0bc.tar.gz) = 35598c913f3dbea3b04884fe4a203edfb37b0530b578d8d1b1470d3f2b23826d
+SHA512 (ntvcm-1ef7d7f7d6a2a80ea177e11543dc8def773fe0bc.tar.gz) = 74eafc7b916bc7f1d45f768e7142f9b0e6f88c68dbade77b6a25f4e0e75a2f1db64ce78db4e7e7df1c300ffe340a023851b6e5caae9e1369c97580e08f62efca
+Size (ntvcm-1ef7d7f7d6a2a80ea177e11543dc8def773fe0bc.tar.gz) = 89665 bytes
+SHA1 (patch-djl__os.hxx) = e32f1b9b466b6e5fa763e66a561c487ae2308c42
+SHA1 (patch-makefile) = b89d09ec2c9887c62b3496ecabdc38410d79c2cb

Index: pkgsrc/emulators/ntvcm/files/ntvcm.1
diff -u /dev/null pkgsrc/emulators/ntvcm/files/ntvcm.1:1.1
--- /dev/null   Fri Jul  4 16:30:12 2025
+++ pkgsrc/emulators/ntvcm/files/ntvcm.1        Fri Jul  4 16:30:12 2025
@@ -0,0 +1,231 @@
+.\"    $NetBSD: ntvcm.1,v 1.1 2025/07/04 16:30:12 hauke Exp $
+.\"
+.\" Creative Commons Legal Code
+.\" 
+.\" CC0 1.0 Universal
+.\" 
+.\"     CREATIVE COMMONS CORPORATION IS NOT A LAW FIRM AND DOES NOT PROVIDE
+.\"     LEGAL SERVICES. DISTRIBUTION OF THIS DOCUMENT DOES NOT CREATE AN
+.\"     ATTORNEY-CLIENT RELATIONSHIP. CREATIVE COMMONS PROVIDES THIS
+.\"     INFORMATION ON AN "AS-IS" BASIS. CREATIVE COMMONS MAKES NO WARRANTIES
+.\"     REGARDING THE USE OF THIS DOCUMENT OR THE INFORMATION OR WORKS
+.\"     PROVIDED HEREUNDER, AND DISCLAIMS LIABILITY FOR DAMAGES RESULTING FROM
+.\"     THE USE OF THIS DOCUMENT OR THE INFORMATION OR WORKS PROVIDED
+.\"     HEREUNDER.
+.\" 
+.\" Statement of Purpose
+.\" 
+.\" The laws of most jurisdictions throughout the world automatically confer
+.\" exclusive Copyright and Related Rights (defined below) upon the creator
+.\" and subsequent owner(s) (each and all, an "owner") of an original work of
+.\" authorship and/or a database (each, a "Work").
+.\" 
+.\" Certain owners wish to permanently relinquish those rights to a Work for
+.\" the purpose of contributing to a commons of creative, cultural and
+.\" scientific works ("Commons") that the public can reliably and without fear
+.\" of later claims of infringement build upon, modify, incorporate in other
+.\" works, reuse and redistribute as freely as possible in any form whatsoever
+.\" and for any purposes, including without limitation commercial purposes.
+.\" These owners may contribute to the Commons to promote the ideal of a free
+.\" culture and the further production of creative, cultural and scientific
+.\" works, or to gain reputation or greater distribution for their Work in
+.\" part through the use and efforts of others.
+.\" 
+.\" For these and/or other purposes and motivations, and without any
+.\" expectation of additional consideration or compensation, the person
+.\" associating CC0 with a Work (the "Affirmer"), to the extent that he or she
+.\" is an owner of Copyright and Related Rights in the Work, voluntarily
+.\" elects to apply CC0 to the Work and publicly distribute the Work under its
+.\" terms, with knowledge of his or her Copyright and Related Rights in the
+.\" Work and the meaning and intended legal effect of CC0 on those rights.
+.\" 
+.\" 1. Copyright and Related Rights. A Work made available under CC0 may be
+.\" protected by copyright and related or neighboring rights ("Copyright and
+.\" Related Rights"). Copyright and Related Rights include, but are not
+.\" limited to, the following:
+.\" 
+.\"   i. the right to reproduce, adapt, distribute, perform, display,
+.\"      communicate, and translate a Work;
+.\"  ii. moral rights retained by the original author(s) and/or performer(s);
+.\" iii. publicity and privacy rights pertaining to a person's image or
+.\"      likeness depicted in a Work;
+.\"  iv. rights protecting against unfair competition in regards to a Work,
+.\"      subject to the limitations in paragraph 4(a), below;
+.\"   v. rights protecting the extraction, dissemination, use and reuse of data
+.\"      in a Work;
+.\"  vi. database rights (such as those arising under Directive 96/9/EC of the
+.\"      European Parliament and of the Council of 11 March 1996 on the legal
+.\"      protection of databases, and under any national implementation
+.\"      thereof, including any amended or successor version of such
+.\"      directive); and
+.\" vii. other similar, equivalent or corresponding rights throughout the
+.\"      world based on applicable law or treaty, and any national
+.\"      implementations thereof.
+.\" 
+.\" 2. Waiver. To the greatest extent permitted by, but not in contravention
+.\" of, applicable law, Affirmer hereby overtly, fully, permanently,
+.\" irrevocably and unconditionally waives, abandons, and surrenders all of
+.\" Affirmer's Copyright and Related Rights and associated claims and causes
+.\" of action, whether now known or unknown (including existing as well as
+.\" future claims and causes of action), in the Work (i) in all territories
+.\" worldwide, (ii) for the maximum duration provided by applicable law or
+.\" treaty (including future time extensions), (iii) in any current or future
+.\" medium and for any number of copies, and (iv) for any purpose whatsoever,
+.\" including without limitation commercial, advertising or promotional
+.\" purposes (the "Waiver"). Affirmer makes the Waiver for the benefit of each
+.\" member of the public at large and to the detriment of Affirmer's heirs and
+.\" successors, fully intending that such Waiver shall not be subject to
+.\" revocation, rescission, cancellation, termination, or any other legal or
+.\" equitable action to disrupt the quiet enjoyment of the Work by the public
+.\" as contemplated by Affirmer's express Statement of Purpose.
+.\" 
+.\" 3. Public License Fallback. Should any part of the Waiver for any reason
+.\" be judged legally invalid or ineffective under applicable law, then the
+.\" Waiver shall be preserved to the maximum extent permitted taking into
+.\" account Affirmer's express Statement of Purpose. In addition, to the
+.\" extent the Waiver is so judged Affirmer hereby grants to each affected
+.\" person a royalty-free, non transferable, non sublicensable, non exclusive,
+.\" irrevocable and unconditional license to exercise Affirmer's Copyright and
+.\" Related Rights in the Work (i) in all territories worldwide, (ii) for the
+.\" maximum duration provided by applicable law or treaty (including future
+.\" time extensions), (iii) in any current or future medium and for any number
+.\" of copies, and (iv) for any purpose whatsoever, including without
+.\" limitation commercial, advertising or promotional purposes (the
+.\" "License"). The License shall be deemed effective as of the date CC0 was
+.\" applied by Affirmer to the Work. Should any part of the License for any
+.\" reason be judged legally invalid or ineffective under applicable law, such
+.\" partial invalidity or ineffectiveness shall not invalidate the remainder
+.\" of the License, and in such case Affirmer hereby affirms that he or she
+.\" will not (i) exercise any of his or her remaining Copyright and Related
+.\" Rights in the Work or (ii) assert any associated claims and causes of
+.\" action with respect to the Work, in either case contrary to Affirmer's
+.\" express Statement of Purpose.
+.\" 
+.\" 4. Limitations and Disclaimers.
+.\" 
+.\"  a. No trademark or patent rights held by Affirmer are waived, abandoned,
+.\"     surrendered, licensed or otherwise affected by this document.
+.\"  b. Affirmer offers the Work as-is and makes no representations or
+.\"     warranties of any kind concerning the Work, express, implied,
+.\"     statutory or otherwise, including without limitation warranties of
+.\"     title, merchantability, fitness for a particular purpose, non
+.\"     infringement, or the absence of latent or other defects, accuracy, or
+.\"     the present or absence of errors, whether or not discoverable, all to
+.\"     the greatest extent permissible under applicable law.
+.\"  c. Affirmer disclaims responsibility for clearing rights of other persons
+.\"     that may apply to the Work or any use thereof, including without
+.\"     limitation any person's Copyright and Related Rights in the Work.
+.\"     Further, Affirmer disclaims responsibility for obtaining any necessary
+.\"     consents, permissions or other rights required for any use of the
+.\"     Work.
+.\"  d. Affirmer understands and acknowledges that Creative Commons is not a
+.\"     party to this document and has no duty or obligation with respect to
+.\"     this CC0 or use of the Work.
+.\"
+.Dd July 4th, 2025
+.Dt NTVCM 1
+.Os
+.Sh NAME
+.Nm ntcvm
+.Nd Run i8080/Z80 .COM executables in CP/M 2.2 emulation
+.Sh SYNOPSIS
+.Nm
+.Op Fl bcCdiklnptV8
+.Op Fl f Ar keystrokes
+.Op Fl s Ar clockspeed
+.Op Fl v Ar 5|k
+.Op Fl z Ar mask
+.Op Ar
+.Sh DESCRIPTION
+.Nm
+emulates CP/M 2.2 and the i8080/Z80 on Linux, MacOS, Windows, and
+real-mode DOS to run .COM files.
+.Pp
+Console input/output works for both BIOS and BDOS APIs.
+.Pp
+Disk input/output works via the BDOS API. There is no attempt at
+emulating physical disks. Applications that use BDOS for disk I/O will
+work, while applications that use the BIOS, or assume things about disk
+layout, will not.
+.Pp
+The following options are available:
+.Bl -tag -width indent
+.It Fl b
+backspace/BS/0x08 key sends delete/DEL/0x7f, for use with Turbo Pascal.
+.It Fl c
+never auto-detect ESC characters and change to 80x24 mode
+.It Fl C
+always switch to 80x24 mode
+.It Fl d
+do not clear the display on exit when in 80x24 mode
+.It Fl f:<file>
+specify an input file containing keystrokes
+.It Fl i
+trace 8080/Z80 instructions when tracing with
+.Fl t
+.It Fl k
+translate Kaypro II extended characters into ASCII equivalents
+.It Fl l
+force CP/M filenames to be lowercase
+.It Fl n
+do not sleep for applications in tight BDOS 6 loops, for use with
+applications like nvbasic
+.It Fl p
+show performance information at app exit
+.It Fl s:X
+specify clock speed in X Hz, defaults to 0 which is as fast as possible
+.It Fl t
+enable debug tracing to ntvcm.log
+.It Fl V
+display version and exit
+.It Fl v:X
+translate escape sequences to VT-100 where X can be one of
+.Pp
+.Bl -tag  -compact -width indent
+.It Cm 5
+for vt-52 escape sequences, use e.g. with CalcStar
+.It Cm  k
+for Kaypro II/Lear-Siegler ADM-3A escape sequences, use with strtrk
+.It Cm  z:X
+applies X as a hex mask to SetProcessAffinityMask, e.g.:
+.Bl -tag compact  -width indent 
+.It Cm 11
+2 performance cores on an i7-1280P, or random good cores on a 5950x
+.It Cm 3000
+2 efficiency cores on an i7-1280P
+.El
+.El
+.It Fl 8
+use only i8080 instruction set, not the Z80 extensions
+.Sh EXAMPLES
+To assemble, load, and run test.asm:
+.Pp
+.Nm
+asm.com test
+.Dl
+.Nm
+load.com test
+.Dl
+.Nm
+test.com
+.Pp
+To run test.com at 4MHz:
+.Pp
+.Dl
+.Nm Fl s:4000000
+test
+.Pp
+To run Star Trek in mbasic in 80x24 mode using i8080 emulation:
+.Pp
+.Dl
+.Nm Fl 8 Fl C
+mbasic startrek.bas
+.Pp
+.Sh AUTHORS
+.An 
+David Lee
+.Aq Mt davidly_lee%hotmail.com@localhost
+.Dl
+Man page by Hauke Fath
+.Aq Mt hauke%NetBSD.org@localhost
+.Pp

Index: pkgsrc/emulators/ntvcm/patches/patch-djl__os.hxx
diff -u /dev/null pkgsrc/emulators/ntvcm/patches/patch-djl__os.hxx:1.1
--- /dev/null   Fri Jul  4 16:30:12 2025
+++ pkgsrc/emulators/ntvcm/patches/patch-djl__os.hxx    Fri Jul  4 16:30:12 2025
@@ -0,0 +1,15 @@
+$NetBSD: patch-djl__os.hxx,v 1.1 2025/07/04 16:30:12 hauke Exp $
+
+NetBSD does not have sched_setaffinity()
+
+--- djl_os.hxx.orig    2025-07-02 22:41:46.000000000 +0000
++++ djl_os.hxx
+@@ -87,7 +87,7 @@ extern "C" int nanosleep( const struct t
+ 
+     inline void set_process_affinity( uint64_t processAffinityMask )
+     {
+-#if !defined(__APPLE__) && !defined( OLDGCC ) && !defined( M68K )
++#if !defined(__APPLE__) && !defined( OLDGCC ) && !defined( M68K ) && !defined( __NetBSD__ )
+         cpu_set_t mask;
+         CPU_ZERO( &mask );
+ 
Index: pkgsrc/emulators/ntvcm/patches/patch-makefile
diff -u /dev/null pkgsrc/emulators/ntvcm/patches/patch-makefile:1.1
--- /dev/null   Fri Jul  4 16:30:12 2025
+++ pkgsrc/emulators/ntvcm/patches/patch-makefile       Fri Jul  4 16:30:12 2025
@@ -0,0 +1,60 @@
+$NetBSD: patch-makefile,v 1.1 2025/07/04 16:30:12 hauke Exp $
+
+Make LFLAGS and CFLAGS overridable
+
+Drop optimization from CFLAGS, pkgsrc does that
+
+Remove ls(1) call, GNU long opts are not portable
+
+Print compiler command lines always
+
+--- makefile.orig      2025-07-02 22:41:46.000000000 +0000
++++ makefile
+@@ -27,14 +27,15 @@ FILES      = *.cxx *.hxx LICENSE README.md ma
+ OBJECTS       = $(SOURCES:.cxx=.o)
+ OUTPUT        = $(PROGRAM).out
+ LANG  = LANG_$(shell (echo $$LANG | cut -f 1 -d '_'))
+-COMMIT        != git log -1 HEAD --format=%h 2> /dev/null
+-BUILD != printf "%04d" $(shell git rev-list --count HEAD 2> /dev/null)
++#COMMIT       != git log -1 HEAD --format=%h 2> /dev/null
++#BUILD        != printf "%04d" $(shell git rev-list --count HEAD 2> /dev/null)
+ UNAME != uname
+ CC    = g++
+ 
+-LIBS  = 
+-LFLAGS        = -static
+-CFLAGS        = -ggdb -fno-builtin -I .
++#LIBS = 
++
++LFLAGS        += -static
++CFLAGS        += -ggdb -fno-builtin -I .
+ 
+ ifndef VERBOSE
+ VERBOSE       = 0
+@@ -48,7 +49,7 @@ ifneq ($(BUILD),)
+ CFLAGS        += -DBUILD='".$(BUILD)"'
+ endif
+ 
+-all: CFLAGS   += -flto -Ofast -D NDEBUG
++all: CFLAGS   += -flto -D NDEBUG
+ all: $(PROGRAM) $(OBJECTS)
+ 
+ $(PROGRAM): $(OBJECTS)
+@@ -57,15 +58,14 @@ ifneq ($(VERBOSE),0)
+       @echo $(CC) $(LFLAGS) $(OBJECTS) -o $@ $(LIBS)
+       @echo
+ endif
+-      @$(CC) $(LFLAGS) $(OBJECTS) -o $@ $(LIBS)
+-      @ls --color $@  
++      $(CC) $(LFLAGS) $(OBJECTS) -o $@ $(LIBS)
+ 
+ $(OBJECTS) : $(SOURCES)
+ ifneq ($(VERBOSE),0)
+       @echo 
+       @echo $(CC) $(CFLAGS) -c $(SOURCES)
+ endif
+-      @$(CC) $(CFLAGS) -c $(SOURCES)
++      $(CC) $(CFLAGS) -c $(SOURCES)
+ 
+ release: clean
+ release: all



Home | Main Index | Thread Index | Old Index