games/trs80gp: Added (Various TRS-80 Emulators)

Signed-off-by: bedlam <dave@slackbuilds.org>

Signed-off-by: Willy Sudiarto Raharjo <willysr@slackbuilds.org>
This commit is contained in:
B. Watson 2023-05-26 00:01:51 +01:00 committed by Willy Sudiarto Raharjo
parent 2844794f4c
commit 854ff22d2c
No known key found for this signature in database
GPG key ID: 3F617144D7238786
14 changed files with 346 additions and 0 deletions

21
games/trs80gp/README Normal file
View file

@ -0,0 +1,21 @@
trs80gp (TRS-80 Model 1,2,3,4,12,16,6000,MC-10,DT-1,Videotex Emulator)
trs80gp primarily emulates the "gray" line of TRS-80 computers made by
Tandy in the late 1970s and early 1980s. They are known as the Model
I, Model II, Model III, Model 4, Model 4P, Model 4D, Model 12, Model
16 and Model 6000. Also emulated are the TRS-80 Micro Color Computer
Model MC-10, the TRS-80 DT-1 Data Terminal, TRS-80 Videotex and the
Electric Crayon external colour display.
Unlike many emulators, trs80gp includes the ROMs and boot disk images
for the target systems, built right into the executable. There are
also some extra disk images (mostly of various DOSes) installed to
/usr/share/trs80gp/disks/. These should be usable with other emulators
such as sdltrs or xtrs.
trs80gp is closed-source binary-only software. However, it includes
x86 32-bit, x86_64, and ARM 32-bit and 64-bit (aarch64) executables,
and the appropriate one will be used based on the ARCH variable. The
aarch64 binary has been tested on SARPi 15.0 and appears to work OK.
The 32-bit ARM binary has not been tested; let me know if it works
for you.

9
games/trs80gp/doinst.sh Normal file
View file

@ -0,0 +1,9 @@
if [ -x /usr/bin/update-desktop-database ]; then
/usr/bin/update-desktop-database -q usr/share/applications >/dev/null 2>&1
fi
if [ -e usr/share/icons/hicolor/icon-theme.cache ]; then
if [ -x /usr/bin/gtk-update-icon-cache ]; then
/usr/bin/gtk-update-icon-cache -f usr/share/icons/hicolor >/dev/null 2>&1
fi
fi

BIN
games/trs80gp/icons/16.png Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 112 B

BIN
games/trs80gp/icons/256.png Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.7 KiB

BIN
games/trs80gp/icons/32.png Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 194 B

BIN
games/trs80gp/icons/48.png Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 858 B

BIN
games/trs80gp/icons/64.png Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 843 B

19
games/trs80gp/slack-desc Normal file
View file

@ -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------------------------------------------------------|
trs80gp: trs80gp (TRS-80 Model 1,2,3,4,12,16,6000,MC-10,DT-1,Videotex Emulator)
trs80gp:
trs80gp: trs80gp primarily emulates the "gray" line of TRS-80 computers made by
trs80gp: Tandy in the late 1970s and early 1980s. They are known as the Model
trs80gp: I, Model II, Model III, Model 4, Model 4P, Model 4D, Model 12, Model
trs80gp: 16 and Model 6000. Also emulated are the TRS-80 Micro Color Computer
trs80gp: Model MC-10, the TRS-80 DT-1 Data Terminal, TRS-80 Videotex and the
trs80gp: Electric Crayon external colour display.
trs80gp:
trs80gp:
trs80gp:

69
games/trs80gp/trs80gp.6 Normal file
View file

@ -0,0 +1,69 @@
.\" Man page generated from reStructuredText.
.
.
.nr rst2man-indent-level 0
.
.de1 rstReportMargin
\\$1 \\n[an-margin]
level \\n[rst2man-indent-level]
level margin: \\n[rst2man-indent\\n[rst2man-indent-level]]
-
\\n[rst2man-indent0]
\\n[rst2man-indent1]
\\n[rst2man-indent2]
..
.de1 INDENT
.\" .rstReportMargin pre:
. RS \\$1
. nr rst2man-indent\\n[rst2man-indent-level] \\n[an-margin]
. nr rst2man-indent-level +1
.\" .rstReportMargin post:
..
.de UNINDENT
. RE
.\" indent \\n[an-margin]
.\" old: \\n[rst2man-indent\\n[rst2man-indent-level]]
.nr rst2man-indent-level -1
.\" new: \\n[rst2man-indent\\n[rst2man-indent-level]]
.in \\n[rst2man-indent\\n[rst2man-indent-level]]u
..
.TH "TRS80GP" 6 "2023-05-17" "2.4.11" "SlackBuilds.org"
.SH NAME
trs80gp \- TRS-80 Model 1,2,3,4,12,16,6000,MC-10,DT-1,Videotex Emulator
.\" RST source for trs80gp(1) man page. Convert with:
.
.\" rst2man.py trs80gp.rst > trs80gp.6
.
.\" rst2man.py comes from the SBo development/docutils package.
.
.SH SYNOPSIS
.sp
\fBtrs80gp\fP [\fI\-options\fP]
.SH DESCRIPTION
.sp
\fBtrs80gp\fP primarily emulates the "gray" line of TRS\-80 computers made by
Tandy in the late 1970s and early 1980s. They are known as the Model
I, Model II, Model III, Model 4, Model 4P, Model 4D, Model 12, Model
16 and Model 6000. Also emulated are the TRS\-80 Micro Color Computer
Model MC\-10, the TRS\-80 DT\-1 Data Terminal, TRS\-80 Videotex and the
Electric Crayon external colour display.
.sp
This man page is a stub. The real documentation can be found at:
.sp
/usr/doc/trs80gp\-2.4.11/html/index.html
.sp
You can also run \fBtrs80gp \-\-help\fP to see a summary of command\-line
options.
.SH AUTHORS
.sp
\fBtrs80gp\fP was written by George and Paul Philips.
.sp
This man page written for the SlackBuilds.org project
by B. Watson, and is licensed under the WTFPL.
.SH SEE ALSO
.sp
\fBsdltrs\fP(6), \fBxtrs\fP(6)
.sp
The \fBtrs80gp\fP homepage: \fI\%http://48k.ca/trs80gp.html\fP
.\" Generated by docutils manpage writer.
.

View file

@ -0,0 +1,144 @@
#!/bin/bash
# Slackware build script for trs80gp
# Written by B. Watson (urchlay@slackware.uk)
# Licensed under the WTFPL. See http://www.wtfpl.net/txt/copying/ for details.
# Note: I found no way to use this emulator without PulseAudio. This
# is only a problem for holdouts like me, who hate pulse and
# actively avoid using it. apulse won't work (it doesn't supply
# libpulsecommon-*.so), and the emulator will segfault at startup if
# it can't use pulse. The only workaround is to run "trs80gp -sx", but
# that disables *all* audio, which is not really ideal. Closed source,
# so no patching.
# Dirt hack alert!
#
# The 32-bit x86 binary actually runs fine on Slackware 14.2. But on 15.0,
# it crahes on startup:
#
# trs80gp: cairo-surface.c:1817: cairo_surface_set_device_scale: Assertion `status == CAIRO_STATUS_SUCCESS' failed.
#
# To make it run on 15.0, use the cairo shared libs from 14.2. Amazingly,
# this actually works!
#
# So on i?86, /usr/games/trs80gp is a wrapper script that execs the
# real binary with the old cairo libs preloaded. On all other arches,
# /usr/games/trs80gp is the real binary.
cd $(dirname $0) ; CWD=$(pwd)
PRGNAM=trs80gp
VERSION=${VERSION:-2.4.11}
BUILD=${BUILD:-1}
TAG=${TAG:-_SBo}
PKGTYPE=${PKGTYPE:-tgz}
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}
case "$ARCH" in
i?86) DIR=linux-32 ;;
x86_64) DIR=linux-64 ;;
arm) DIR=rpi-32 ;;
aarch64) DIR=rpi-64 ;;
esac
set -e
rm -rf $PKG
mkdir -p $TMP $PKG $OUTPUT
cd $TMP
rm -rf $PRGNAM-$VERSION
mkdir -p $PRGNAM-$VERSION
cd $PRGNAM-$VERSION
unzip $CWD/$PRGNAM-$VERSION.zip
chown -R root:root .
# reset permissions, please do not revert to template.
find . -type f -a -exec chmod 644 {} + -o -type d -a -exec chmod 755 {} +
# Main binary, one dir per arch. No -s here, it's already stripped.
if [ "$DIR" = "linux-32" ]; then
install -D -m0755 $DIR/$PRGNAM $PKG/usr/libexec/$PRGNAM/$PRGNAM
install -D -m0755 -oroot -groot $CWD/wrapper32.sh $PKG/usr/games/$PRGNAM
mkdir -p $PKG/usr/lib/$PRGNAM
cd $PKG/usr/lib/$PRGNAM
tar xvf $CWD/cairo-1.14.6-i586-2.txz \
--wildcards \
--strip-components=2 \
usr/lib/libcairo\*.so\*
cd -
else
install -D -m0755 $DIR/$PRGNAM $PKG/usr/games/$PRGNAM
fi
# Rest of the goodies are in the Mac app bundle.
PKGDOC=$PKG/usr/doc/$PRGNAM-$VERSION
SFX=$PKG/usr/share/$PRGNAM/sounds
DISKS=$PKG/usr/share/$PRGNAM/disks
RES=mac/trs80gp.app/Contents/Resources
mkdir -p $PKGDOC/html $SFX $DISKS
# The sounds are meant to be used with the -sf option, to have
# the emulator make mechanical disk noises during disk I/O.
# Since it's closed-source, I can't patch it to look in our dir for
# the wav files. They're disabled by default, anyway.
cp -a $RES/*.wav $SFX
# Note: doc.html is identical to help/all.html, don't bother.
# Nothing seems to need $RES/*.png, don't bother.
cp -a $RES/*.txt $PKGDOC
cp -a $RES/help/*.{html,png} $PKGDOC/html
# The emulator ships zipped disk images, but seems to require them
# to be unzipped to actually use them. Takes up 10MB, but gives a
# nice selection of DOSes and blank disks.
for i in $RES/*.zip; do
unzip -LL $i -d $DISKS
done
# Stub man page by SlackBuild author. Just a pointer to the real docs.
mkdir -p $PKG/usr/man/man6
gzip -9c < $CWD/$PRGNAM.6 > $PKG/usr/man/man6/$PRGNAM.6.gz
# Icons converted with icns2png and resized with ImageMagick. Original
# source mac/trs80gp.app/Contents/Resources/AppIcon.icns in the tarball.
HICOLOR=$PKG/usr/share/icons/hicolor
for i in $CWD/icons/*.png; do
px="$( basename $i .png )"
sz="${px}x${px}"
dir=$HICOLOR/$sz/apps
mkdir -p $dir
cat $i > $dir/$PRGNAM.png
done
mkdir -p $PKG/usr/share/pixmaps
ln -s ../icons/hicolor/48x48/apps/$PRGNAM.png $PKG/usr/share/pixmaps/$PRGNAM.png
# .desktop file written by SlackBuild author.
mkdir -p $PKG/usr/share/applications
cat $CWD/$PRGNAM.desktop > $PKG/usr/share/applications/$PRGNAM.desktop
cat $CWD/$PRGNAM.SlackBuild > $PKGDOC/$PRGNAM.SlackBuild
mkdir -p $PKG/install
cat $CWD/slack-desc > $PKG/install/slack-desc
cat $CWD/doinst.sh > $PKG/install/doinst.sh
cd $PKG
/sbin/makepkg -l y -c n $OUTPUT/$PRGNAM-$VERSION-$ARCH-$BUILD$TAG.$PKGTYPE

View file

@ -0,0 +1,8 @@
[Desktop Entry]
Type=Application
Name=TRS80GP
Comment=TRS-80 Model I/II/III/4/4P/etc Emulator
Exec=/usr/games/trs80gp %F
Icon=trs80gp
Terminal=false
Categories=Game;Emulator;

View file

@ -0,0 +1,12 @@
PRGNAM="trs80gp"
VERSION="2.4.11"
HOMEPAGE="http://48k.ca/trs80gp.html"
DOWNLOAD="http://48k.ca/trs80gp-2.4.11.zip \
https://slackware.uk/slackware/slackware-14.2/slackware/l/cairo-1.14.6-i586-2.txz"
MD5SUM="4c1f30ffce7ef6a2316e576fe647c941 \
303c05899a16028d226eaa08adab98f6"
DOWNLOAD_x86_64="http://48k.ca/trs80gp-2.4.11.zip"
MD5SUM_x86_64="4c1f30ffce7ef6a2316e576fe647c941"
REQUIRES=""
MAINTAINER="B. Watson"
EMAIL="urchlay@slackware.uk"

56
games/trs80gp/trs80gp.rst Normal file
View file

@ -0,0 +1,56 @@
.. RST source for trs80gp(1) man page. Convert with:
.. rst2man.py trs80gp.rst > trs80gp.6
.. rst2man.py comes from the SBo development/docutils package.
.. |version| replace:: 2.4.11
.. |date| date::
=======
trs80gp
=======
------------------------------------------------------------
TRS-80 Model 1,2,3,4,12,16,6000,MC-10,DT-1,Videotex Emulator
------------------------------------------------------------
:Manual section: 6
:Manual group: SlackBuilds.org
:Date: |date|
:Version: |version|
SYNOPSIS
========
**trs80gp** [*-options*]
DESCRIPTION
===========
**trs80gp** primarily emulates the "gray" line of TRS-80 computers made by
Tandy in the late 1970s and early 1980s. They are known as the Model
I, Model II, Model III, Model 4, Model 4P, Model 4D, Model 12, Model
16 and Model 6000. Also emulated are the TRS-80 Micro Color Computer
Model MC-10, the TRS-80 DT-1 Data Terminal, TRS-80 Videotex and the
Electric Crayon external colour display.
This man page is a stub. The real documentation can be found at:
/usr/doc/trs80gp-|version|/html/index.html
You can also run **trs80gp --help** to see a summary of command-line
options.
AUTHORS
=======
**trs80gp** was written by George and Paul Philips.
This man page written for the SlackBuilds.org project
by B. Watson, and is licensed under the WTFPL.
SEE ALSO
========
**sdltrs**\(6), **xtrs**\(6)
The **trs80gp** homepage: http://48k.ca/trs80gp.html

View file

@ -0,0 +1,8 @@
#!/bin/sh
# dirty hack alert! use old cairo libs for trs80gp.
L=/usr/lib/trs80gp/libcairo
V=2.11400.6
LD_PRELOAD=$L.so.$V:$L-gobject.so.$V:$L-script-interpreter.so.$V \
exec /usr/libexec/trs80gp/trs80gp "$@"