summaryrefslogtreecommitdiffstats
path: root/misc
diff options
context:
space:
mode:
author Damian Perticone2022-04-09 06:59:45 +0200
committer Willy Sudiarto Raharjo2022-04-09 10:45:53 +0200
commitc1d257b630edec24659e61bcd84706979673a26f (patch)
tree44c79826d946cc6333e2e55c531d5adc09d95526 /misc
parent5639480c1872795e76c286c93ccc986d77f97f1e (diff)
downloadslackbuilds-c1d257b630edec24659e61bcd84706979673a26f.tar.gz
misc/simh-classic (SimH Simulator).
Signed-off-by: Willy Sudiarto Raharjo <willysr@slackbuilds.org>
Diffstat (limited to 'misc')
-rw-r--r--misc/simh-classic/README28
-rw-r--r--misc/simh-classic/doinst.sh90
-rw-r--r--misc/simh-classic/pdp11_defs.h.patch23
-rw-r--r--misc/simh-classic/simh-classic.SlackBuild130
-rw-r--r--misc/simh-classic/simh-classic.info10
-rw-r--r--misc/simh-classic/slack-desc19
6 files changed, 300 insertions, 0 deletions
diff --git a/misc/simh-classic/README b/misc/simh-classic/README
new file mode 100644
index 0000000000..304c40d607
--- /dev/null
+++ b/misc/simh-classic/README
@@ -0,0 +1,28 @@
+SimH (History Simulator) is a collection of simulators for historically
+significant or just plain interesting computer hardware and software
+from the past. The goal of the project is to create highly portable
+system simulators and to publish them as freeware on the Internet,
+with freely available copies of significant or representative software.
+
+SimH implements simulators for:
+
+- Data General Nova, Eclipse
+- Digital Equipment Corporation PDP-1, PDP-4, PDP-7, PDP-8, PDP-9,
+ PDP-10, PDP-11, PDP-15 (and UC15), VAX11/780, VAX3900
+- GRI Corporation GRI-909, GRI-99
+- IBM 1401, 1620, 7090/7094, System 3
+- Interdata (Perkin-Elmer) 16b and 32b systems
+- Hewlett-Packard 2114, 2115, 2116, 2100, 21MX, 1000, 3000
+- Honeywell H316/H516
+- MITS Altair 8800, 8080 only
+- Royal-Mcbee LGP-30, LGP-21
+- Scientific Data Systems SDS 940
+- Xerox Data Systems Sigma 32b systems
+
+This package contains the "classic" version of SimH, the 3.X stream.
+This version is simpler than the 4.X stream, which can be found in
+Github.
+
+Note: Please add /opt/simh-classic/bin to your $PATH or simply
+ invoke each simulator with simh-classic-"name".
+ Example: simh-classic-vax
diff --git a/misc/simh-classic/doinst.sh b/misc/simh-classic/doinst.sh
new file mode 100644
index 0000000000..90be7733e6
--- /dev/null
+++ b/misc/simh-classic/doinst.sh
@@ -0,0 +1,90 @@
+#if [ -x /usr/bin/update-desktop-database ]; then
+# /usr/bin/update-desktop-database -q usr/share/applications >/dev/null 2>&1
+#fi
+#
+#if [ -x /usr/bin/update-mime-database ]; then
+# /usr/bin/update-mime-database usr/share/mime >/dev/null 2>&1
+#fi
+#
+#if [ -e usr/share/icons/gnome/icon-theme.cache ]; then
+# if [ -x /usr/bin/gtk-update-icon-cache ]; then
+# /usr/bin/gtk-update-icon-cache -f usr/share/icons/gnome >/dev/null 2>&1
+# fi
+#fi
+
+( cd /usr/local/bin ; rm -rf simh-classic-altair )
+( cd /usr/local/bin ; ln -sf /opt/simh-classic/bin/altair simh-classic-altair )
+
+( cd /usr/local/bin ; rm -rf simh-classic-eclipse )
+( cd /usr/local/bin ; ln -sf /opt/simh-classic/bin/eclipse simh-classic-eclipse )
+
+( cd /usr/local/bin ; rm -rf simh-classic-gri )
+( cd /usr/local/bin ; ln -sf /opt/simh-classic/bin/gri simh-classic-gri )
+
+( cd /usr/local/bin ; rm -rf simh-classic-h316 )
+( cd /usr/local/bin ; ln -sf /opt/simh-classic/bin/h316 simh-classic-h316 )
+
+( cd /usr/local/bin ; rm -rf simh-classic-i1401 )
+( cd /usr/local/bin ; ln -sf /opt/simh-classic/bin/i1401 simh-classic-i1401 )
+
+( cd /usr/local/bin ; rm -rf simh-classic-i1620 )
+( cd /usr/local/bin ; ln -sf /opt/simh-classic/bin/i1620 simh-classic-i1620 )
+
+( cd /usr/local/bin ; rm -rf simh-classic-i7094 )
+( cd /usr/local/bin ; ln -sf /opt/simh-classic/bin/i7094 simh-classic-i7094 )
+
+( cd /usr/local/bin ; rm -rf simh-classic-id16 )
+( cd /usr/local/bin ; ln -sf /opt/simh-classic/bin/id16 simh-classic-id16 )
+
+( cd /usr/local/bin ; rm -rf simh-classic-id32 )
+( cd /usr/local/bin ; ln -sf /opt/simh-classic/bin/id32 simh-classic-id32 )
+
+( cd /usr/local/bin ; rm -rf simh-classic-lgp )
+( cd /usr/local/bin ; ln -sf /opt/simh-classic/bin/lgp simh-classic-lgp )
+
+( cd /usr/local/bin ; rm -rf simh-classic-nova )
+( cd /usr/local/bin ; ln -sf /opt/simh-classic/bin/nova simh-classic-nova )
+
+( cd /usr/local/bin ; rm -rf simh-classic-pdp1 )
+( cd /usr/local/bin ; ln -sf /opt/simh-classic/bin/pdp1 simh-classic-pdp1 )
+
+( cd /usr/local/bin ; rm -rf simh-classic-pdp10 )
+( cd /usr/local/bin ; ln -sf /opt/simh-classic/bin/pdp10 simh-classic-pdp10 )
+
+( cd /usr/local/bin ; rm -rf simh-classic-pdp11 )
+( cd /usr/local/bin ; ln -sf /opt/simh-classic/bin/pdp11 simh-classic-pdp11 )
+
+( cd /usr/local/bin ; rm -rf simh-classic-pdp15 )
+( cd /usr/local/bin ; ln -sf /opt/simh-classic/bin/pdp15 simh-classic-pdp15 )
+
+( cd /usr/local/bin ; rm -rf simh-classic-pdp4 )
+( cd /usr/local/bin ; ln -sf /opt/simh-classic/bin/pdp4 simh-classic-pdp4 )
+
+( cd /usr/local/bin ; rm -rf simh-classic-pdp7 )
+( cd /usr/local/bin ; ln -sf /opt/simh-classic/bin/pdp7 simh-classic-pdp7 )
+
+( cd /usr/local/bin ; rm -rf simh-classic-pdp8 )
+( cd /usr/local/bin ; ln -sf /opt/simh-classic/bin/pdp8 simh-classic-pdp8 )
+
+( cd /usr/local/bin ; rm -rf simh-classic-pdp9 )
+( cd /usr/local/bin ; ln -sf /opt/simh-classic/bin/pdp9 simh-classic-pdp9 )
+
+( cd /usr/local/bin ; rm -rf simh-classic-s3 )
+( cd /usr/local/bin ; ln -sf /opt/simh-classic/bin/s3 simh-classic-s3 )
+
+( cd /usr/local/bin ; rm -rf simh-classic-sds )
+( cd /usr/local/bin ; ln -sf /opt/simh-classic/bin/sds simh-classic-sds )
+
+( cd /usr/local/bin ; rm -rf simh-classic-sigma )
+( cd /usr/local/bin ; ln -sf /opt/simh-classic/bin/sigma simh-classic-sigma )
+
+( cd /usr/local/bin ; rm -rf simh-classic-uc15 )
+( cd /usr/local/bin ; ln -sf /opt/simh-classic/bin/uc15 simh-classic-uc15 )
+
+( cd /usr/local/bin ; rm -rf simh-classic-vax )
+( cd /usr/local/bin ; ln -sf /opt/simh-classic/bin/vax simh-classic-vax )
+
+( cd /usr/local/bin ; rm -rf simh-classic-vax780 )
+( cd /usr/local/bin ; ln -sf /opt/simh-classic/bin/vax780 simh-classic-vax780 )
+
+
diff --git a/misc/simh-classic/pdp11_defs.h.patch b/misc/simh-classic/pdp11_defs.h.patch
new file mode 100644
index 0000000000..b5e7a9a235
--- /dev/null
+++ b/misc/simh-classic/pdp11_defs.h.patch
@@ -0,0 +1,23 @@
+--- PDP11/pdp11_defs.h 2017-02-10 15:31:48.000000000 +0000
++++ PDP11/.new/pdp11_defs.h 2022-02-07 20:45:14.270208500 +0000
+@@ -900,13 +900,13 @@
+ #define WrMemW(pa,d) uc15_WrMemW (pa, d)
+ #define WrMemB(pa, d) uc15_WrMemB (pa, d)
+
+-uint32 uc15_memsize;
+-int32 uc15_RdMemW (int32 pa);
+-int32 uc15_RdMemB (int32 pa);
+-void uc15_WrMemW (int32 pa, int32 d);
+-void uc15_WrMemB (int32 pa, int32 d);
+-int32 Map_Read18 (uint32 ba, int32 bc, uint32 *buf);
+-int32 Map_Write18 (uint32 ba, int32 bc, uint32 *buf);
++extern uint32 uc15_memsize;
++extern int32 uc15_RdMemW (int32 pa);
++extern int32 uc15_RdMemB (int32 pa);
++extern void uc15_WrMemW (int32 pa, int32 d);
++extern void uc15_WrMemB (int32 pa, int32 d);
++extern int32 Map_Read18 (uint32 ba, int32 bc, uint32 *buf);
++extern int32 Map_Write18 (uint32 ba, int32 bc, uint32 *buf);
+
+ #else /* PDP-11 */
+
diff --git a/misc/simh-classic/simh-classic.SlackBuild b/misc/simh-classic/simh-classic.SlackBuild
new file mode 100644
index 0000000000..8e89ca4fb0
--- /dev/null
+++ b/misc/simh-classic/simh-classic.SlackBuild
@@ -0,0 +1,130 @@
+#!/bin/bash
+
+# Slackware build script for the SimH 3.X classic stream
+
+# Copyright 2022 Antonio Leal, Lisbon, Portugal
+# All rights reserved.
+#
+# Redistribution and use of this script, with or without modification, is
+# permitted provided that the following conditions are met:
+#
+# 1. Redistributions of this script must retain the above copyright
+# notice, this list of conditions and the following disclaimer.
+#
+# THIS SOFTWARE IS PROVIDED BY THE AUTHOR "AS IS" AND ANY EXPRESS OR IMPLIED
+# WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF
+# MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO
+# EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
+# SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO,
+# PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS;
+# OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY,
+# WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR
+# OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF
+# ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+
+cd $(dirname $0) ; CWD=$(pwd)
+
+PRGNAM=simh-classic
+VERSION=${VERSION:-3.11_0}
+BUILD=${BUILD:-1}
+TAG=${TAG:-_SBo}
+PKGTYPE=${PKGTYPE:-tgz}
+BASENAME=${BASENAME:-simhv311-0}
+
+if [ -z "$ARCH" ]; then
+ case "$( uname -m )" in
+ i?86) ARCH=i586 ;;
+ arm*) ARCH=arm ;;
+ *) ARCH=$( uname -m ) ;;
+ esac
+fi
+
+if [ ! -z "${PRINT_PACKAGE_NAME}" ]; then
+ echo "$PRGNAM-$VERSION-$ARCH-$BUILD$TAG.$PKGTYPE"
+ exit 0
+fi
+
+TMP=${TMP:-/tmp/SBo}
+PKG=$TMP/package-$PRGNAM
+OUTPUT=${OUTPUT:-/tmp}
+
+if [ "$ARCH" = "i586" ]; then
+ SLKCFLAGS="-O2 -march=i586 -mtune=i686"
+ LIBDIRSUFFIX=""
+elif [ "$ARCH" = "i686" ]; then
+ SLKCFLAGS="-O2 -march=i686 -mtune=i686"
+ LIBDIRSUFFIX=""
+elif [ "$ARCH" = "x86_64" ]; then
+ SLKCFLAGS="-O2 -fPIC"
+ LIBDIRSUFFIX="64"
+else
+ SLKCFLAGS="-O2"
+ LIBDIRSUFFIX=""
+fi
+
+set -e
+
+set -e
+CWD=$(pwd)
+TMP=${TMP:-/tmp/SBo}
+PKG=$TMP/package-$PRGNAM
+OUTPUT=${OUTPUT:-/tmp}
+
+rm -rf $PKG
+mkdir -p $TMP $PKG $OUTPUT
+cd $PKG
+
+if [ -e $CWD/$BASENAME.zip ]; then
+ unzip $CWD/$BASENAME.zip
+ mv sim/* .
+ rmdir sim
+ echo
+else
+ echo "Could not find file "$CWD/$BASENAME.zip
+ echo "Aborting..."
+ exit 1
+fi
+
+# Patch the sources in order for uc15 to compile...
+patch PDP11/pdp11_defs.h $CWD/pdp11_defs.h.patch
+
+
+chown -R root:root .
+find -L . \
+ \( -perm 777 -o -perm 775 -o -perm 750 -o -perm 711 -o -perm 555 \
+ -o -perm 511 \) -exec chmod 755 {} \; -o \
+ \( -perm 666 -o -perm 664 -o -perm 640 -o -perm 600 -o -perm 444 \
+ -o -perm 440 -o -perm 400 \) -exec chmod 644 {} \;
+
+chmod 0755 .
+
+# make the simulators
+make all
+
+mkdir -p $PKG/slackbuild/opt/$PRGNAM/bin
+mv BIN/* $PKG/slackbuild/opt/$PRGNAM/bin
+
+# Don't ship .la files:
+rm -f $PKG/{,usr/}lib${LIBDIRSUFFIX}/*.la
+
+find $PKG -print0 | xargs -0 file | grep -e "executable" -e "shared object" | grep ELF \
+ | cut -f 1 -d : | xargs strip --strip-unneeded 2> /dev/null || true
+
+mkdir -p $PKG/slackbuild/usr/doc/$PRGNAM-$VERSION
+cp -a \
+ doc/* \
+ $PKG/slackbuild/usr/doc/$PRGNAM-$VERSION
+cat $CWD/$PRGNAM.SlackBuild > $PKG/slackbuild/usr/doc/$PRGNAM-$VERSION/$PRGNAM.SlackBuild
+cp $CWD/pdp11_defs.h.patch $PKG/slackbuild/usr/doc/$PRGNAM-$VERSION/pdp11_defs.h.patch
+
+mkdir -p $PKG/slackbuild/opt/$PRGNAM/doc/$PRGNAM-$VERSION
+cp -a doc/* $PKG/slackbuild/opt/$PRGNAM/doc/
+cat $CWD/$PRGNAM.SlackBuild > $PKG/slackbuild/opt/$PRGNAM/doc/$PRGNAM-$VERSION/$PRGNAM.SlackBuild
+
+
+mkdir -p $PKG/slackbuild/install
+cat $CWD/slack-desc > $PKG/slackbuild/install/slack-desc
+cat $CWD/doinst.sh > $PKG/slackbuild/install/doinst.sh
+
+cd $PKG/slackbuild/
+/sbin/makepkg -l y -c n $OUTPUT/$PRGNAM-$VERSION-$ARCH-$BUILD$TAG.$PKGTYPE
diff --git a/misc/simh-classic/simh-classic.info b/misc/simh-classic/simh-classic.info
new file mode 100644
index 0000000000..7fe67004df
--- /dev/null
+++ b/misc/simh-classic/simh-classic.info
@@ -0,0 +1,10 @@
+PRGNAM="simh-classic"
+VERSION="3.11_0"
+HOMEPAGE="http://simh.trailing-edge.com/"
+DOWNLOAD="UNSUPPORTED"
+MD5SUM=""
+DOWNLOAD_x86_64="http://simh.trailing-edge.com/sources/simhv311-0.zip"
+MD5SUM_x86_64="154f87096722a72ce71ea66c7ea3bb24"
+REQUIRES=""
+MAINTAINER="Antonio Leal"
+EMAIL="antonioleal@yahoo.com"
diff --git a/misc/simh-classic/slack-desc b/misc/simh-classic/slack-desc
new file mode 100644
index 0000000000..059bda8965
--- /dev/null
+++ b/misc/simh-classic/slack-desc
@@ -0,0 +1,19 @@
+# HOW TO EDIT THIS FILE:
+# The "handy ruler" below makes it easier to edit a package description.
+# Line up the first '|' above the ':' following the base package name, and
+# the '|' on the right side marks the last column you can put a character in.
+# You must make exactly 11 lines for the formatting to be correct. It's also
+# customary to leave one space after the ':' except on otherwise blank lines.
+
+ |-----handy-ruler------------------------------------------------------|
+simh-classic: simh-classic (3.X Classic Version)
+simh-classic:
+simh-classic: SimH (History Simulator) is a collection of simulators for
+simh-classic: historically significant or just plain interesting computer hardware
+simh-classic: and software from the past. The goal of the project is to create
+simh-classic: highly portable system simulators and to publish them as freeware on
+simh-classic: the Internet, with freely available copies of significant or
+simh-classic: representative software.
+simh-classic:
+simh-classic: : Homepage: http://simh.trailing-edge.com/
+simh-classic: