From f4fd168578564d9a02431173ee8e5d3d72ba9fc7 Mon Sep 17 00:00:00 2001 From: tv Date: Wed, 12 Aug 1998 22:44:31 +0000 Subject: A pkg for Bob Supnik's simh processor simulator. Can simulate the IBM 1401, Nova, and PDP-{1,4,5,7,8,9,11,15} on both big and little endian processors. (Can run the free binary distribution of V6 and V7.) --- emulators/Makefile | 3 ++- emulators/simh/Makefile | 15 +++++++++++ emulators/simh/files/Makefile | 56 +++++++++++++++++++++++++++++++++++++++++ emulators/simh/files/md5 | 3 +++ emulators/simh/patches/patch-aa | 27 ++++++++++++++++++++ emulators/simh/pkg/COMMENT | 1 + emulators/simh/pkg/DESCR | 2 ++ emulators/simh/pkg/PLIST | 11 ++++++++ 8 files changed, 117 insertions(+), 1 deletion(-) create mode 100644 emulators/simh/Makefile create mode 100644 emulators/simh/files/Makefile create mode 100644 emulators/simh/files/md5 create mode 100644 emulators/simh/patches/patch-aa create mode 100644 emulators/simh/pkg/COMMENT create mode 100644 emulators/simh/pkg/DESCR create mode 100644 emulators/simh/pkg/PLIST diff --git a/emulators/Makefile b/emulators/Makefile index 9d4ba53492a..df7ee97b575 100644 --- a/emulators/Makefile +++ b/emulators/Makefile @@ -1,4 +1,4 @@ -# $NetBSD: Makefile,v 1.10 1998/07/21 11:21:13 frueauf Exp $ +# $NetBSD: Makefile,v 1.11 1998/08/12 22:44:31 tv Exp $ # FreeBSD Id: Makefile,v 1.14 1997/07/31 07:23:58 max Exp # @@ -19,6 +19,7 @@ # SUBDIR += pcemu # SUBDIR += prodosemu # SUBDIR += sim6811 + SUBDIR += simh SUBDIR += spim # SUBDIR += stella # SUBDIR += tkhfs diff --git a/emulators/simh/Makefile b/emulators/simh/Makefile new file mode 100644 index 00000000000..1f93b1733f0 --- /dev/null +++ b/emulators/simh/Makefile @@ -0,0 +1,15 @@ +# $NetBSD: Makefile,v 1.1 1998/08/12 22:44:32 tv Exp $ +# + +DISTNAME= sim_2.3c +PKGNAME= simh-2.3c +CATEGORIES= emulators +MASTER_SITES= ftp://minnie.cs.adfa.oz.au/pub/PDP-11/Sims/Supnik_2.3/sources/ + +MAINTAINER= packages@netbsd.org + +NO_WRKSUBDIR= yes + +MAKEFILE= ${FILESDIR}/Makefile + +.include "../../mk/bsd.pkg.mk" diff --git a/emulators/simh/files/Makefile b/emulators/simh/files/Makefile new file mode 100644 index 00000000000..3055abeeadf --- /dev/null +++ b/emulators/simh/files/Makefile @@ -0,0 +1,56 @@ +PRGS=i1401 nova pdp1 pdp4 pdp7 pdp8 pdp9 pdp11 pdp15 + +all: ${PRGS} + +install: + @for file in ${PRGS}; do \ + ${BSD_INSTALL_PROGRAM} $$file ${PREFIX}/bin/simh-$$file; \ + done + ${BSD_INSTALL_DATA} simh_doc.txt ${PREFIX}/share/doc/ + +.SUFFIXES: .4o .7o .9o .15o +.c.4o: + ${COMPILE.c} -o $@ -DPDP4 $< +.c.7o: + ${COMPILE.c} -o $@ -DPDP7 $< +.c.9o: + ${COMPILE.c} -o $@ -DPDP9 $< +.c.15o: + ${COMPILE.c} -o $@ -DPDP15 $< + +SCP=scp.o scp_tty.o + +i1401: i1401_cd.o i1401_cpu.o i1401_iq.o i1401_lp.o i1401_mt.o i1401_sys.o \ + ${SCP} + ${LINK.c} -o $@ $> + +nova: nova_clk.o nova_cpu.o nova_dkp.o nova_dsk.o nova_lp.o nova_mta.o \ + nova_pt.o nova_sys.o nova_tt.o ${SCP} + ${LINK.c} -o $@ $> -lm + +pdp1: pdp1_cpu.o pdp1_lp.o pdp1_stddev.o pdp1_sys.o ${SCP} + ${LINK.c} -o $@ $> + +pdp4: pdp18b_cpu.4o pdp18b_drm.4o pdp18b_lp.4o pdp18b_mt.4o pdp18b_rf.4o \ + pdp18b_rp.4o pdp18b_stddev.4o pdp18b_sys.4o ${SCP} + ${LINK.c} -o $@ $> -lm + +pdp7: pdp18b_cpu.7o pdp18b_drm.7o pdp18b_lp.7o pdp18b_mt.7o pdp18b_rf.7o \ + pdp18b_rp.7o pdp18b_stddev.7o pdp18b_sys.7o ${SCP} + ${LINK.c} -o $@ $> -lm + +pdp8: pdp8_clk.o pdp8_cpu.o pdp8_lp.o pdp8_mt.o pdp8_pt.o pdp8_rf.o \ + pdp8_rk.o pdp8_rx.o pdp8_sys.o pdp8_tt.o ${SCP} + ${LINK.c} -o $@ $> -lm + +pdp9: pdp18b_cpu.9o pdp18b_drm.9o pdp18b_lp.9o pdp18b_mt.9o pdp18b_rf.9o \ + pdp18b_rp.9o pdp18b_stddev.9o pdp18b_sys.9o ${SCP} + ${LINK.c} -o $@ $> -lm + +pdp11: pdp11_cpu.o pdp11_fp.o pdp11_lp.o pdp11_rk.o pdp11_rl.o pdp11_rp.o \ + pdp11_rx.o pdp11_stddev.o pdp11_sys.o pdp11_tm.o ${SCP} + ${LINK.c} -o $@ $> -lm + +pdp15: pdp18b_cpu.15o pdp18b_drm.15o pdp18b_lp.15o pdp18b_mt.15o pdp18b_rf.15o \ + pdp18b_rp.15o pdp18b_stddev.15o pdp18b_sys.15o ${SCP} + ${LINK.c} -o $@ $> -lm diff --git a/emulators/simh/files/md5 b/emulators/simh/files/md5 new file mode 100644 index 00000000000..aa5f2477dcd --- /dev/null +++ b/emulators/simh/files/md5 @@ -0,0 +1,3 @@ +$NetBSD: md5,v 1.1 1998/08/12 22:44:32 tv Exp $ + +MD5 (sim_2.3c.tar.gz) = baf872e8f1e68e8b4c2dfccadbe9738d diff --git a/emulators/simh/patches/patch-aa b/emulators/simh/patches/patch-aa new file mode 100644 index 00000000000..d7d82dc3698 --- /dev/null +++ b/emulators/simh/patches/patch-aa @@ -0,0 +1,27 @@ +--- scp.c.orig Wed Aug 12 18:21:13 1998 ++++ scp.c Wed Aug 12 18:24:25 1998 +@@ -240,6 +240,7 @@ + + do { printf ("sim> "); /* prompt */ + cptr = read_line (cbuf, CBUFSIZE, stdin); /* read command line */ ++ if (cptr == NULL) break; /* exit on eof */ + stat = SCPE_UNK; + if (cptr == NULL) continue; /* ignore EOF */ + if (*cptr == 0) continue; /* ignore blank */ +@@ -254,6 +255,7 @@ + + detach_all (0); + ttclose (); ++puts(""); + return 0; + } + +@@ -879,7 +881,7 @@ + (UNIT_ATT + UNIT_SEQ)) + fseek (uptr -> fileref, uptr -> pos, SEEK_SET); } } + stop_cpu = 0; +-if ((int) signal (SIGINT, int_handler) == -1) { /* set WRU */ ++if (signal (SIGINT, int_handler) == (void *)-1) { /* set WRU */ + printf ("Simulator interrupt handler setup failed\n"); + return SCPE_OK; } + if (ttrunstate () != SCPE_OK) { /* set console */ diff --git a/emulators/simh/pkg/COMMENT b/emulators/simh/pkg/COMMENT new file mode 100644 index 00000000000..1a9915a47cd --- /dev/null +++ b/emulators/simh/pkg/COMMENT @@ -0,0 +1 @@ +A PDP, IBM 1401, and Nova CPU simulator. diff --git a/emulators/simh/pkg/DESCR b/emulators/simh/pkg/DESCR new file mode 100644 index 00000000000..5d8d35b36ae --- /dev/null +++ b/emulators/simh/pkg/DESCR @@ -0,0 +1,2 @@ +This package includes Bob Supnik's PDP-8, PDP-11, PDP-1, other 18b PDP, +Nova, and IBM 1401 simulators. diff --git a/emulators/simh/pkg/PLIST b/emulators/simh/pkg/PLIST new file mode 100644 index 00000000000..96d77b5fc76 --- /dev/null +++ b/emulators/simh/pkg/PLIST @@ -0,0 +1,11 @@ +@comment $NetBSD: PLIST,v 1.1 1998/08/12 22:44:33 tv Exp $ +bin/simh-i1401 +bin/simh-nova +bin/simh-pdp1 +bin/simh-pdp4 +bin/simh-pdp7 +bin/simh-pdp8 +bin/simh-pdp9 +bin/simh-pdp11 +bin/simh-pdp15 +share/doc/simh_doc.txt -- cgit v1.2.3