From 854ff22d2c4b5b2acfa7f612acfbe4bb11ccba23 Mon Sep 17 00:00:00 2001 From: "B. Watson" Date: Fri, 26 May 2023 00:01:51 +0100 Subject: [PATCH] games/trs80gp: Added (Various TRS-80 Emulators) Signed-off-by: bedlam Signed-off-by: Willy Sudiarto Raharjo --- games/trs80gp/README | 21 +++++ games/trs80gp/doinst.sh | 9 ++ games/trs80gp/icons/16.png | Bin 0 -> 112 bytes games/trs80gp/icons/256.png | Bin 0 -> 1764 bytes games/trs80gp/icons/32.png | Bin 0 -> 194 bytes games/trs80gp/icons/48.png | Bin 0 -> 858 bytes games/trs80gp/icons/64.png | Bin 0 -> 843 bytes games/trs80gp/slack-desc | 19 ++++ games/trs80gp/trs80gp.6 | 69 +++++++++++++++ games/trs80gp/trs80gp.SlackBuild | 144 +++++++++++++++++++++++++++++++ games/trs80gp/trs80gp.desktop | 8 ++ games/trs80gp/trs80gp.info | 12 +++ games/trs80gp/trs80gp.rst | 56 ++++++++++++ games/trs80gp/wrapper32.sh | 8 ++ 14 files changed, 346 insertions(+) create mode 100644 games/trs80gp/README create mode 100644 games/trs80gp/doinst.sh create mode 100644 games/trs80gp/icons/16.png create mode 100644 games/trs80gp/icons/256.png create mode 100644 games/trs80gp/icons/32.png create mode 100644 games/trs80gp/icons/48.png create mode 100644 games/trs80gp/icons/64.png create mode 100644 games/trs80gp/slack-desc create mode 100644 games/trs80gp/trs80gp.6 create mode 100644 games/trs80gp/trs80gp.SlackBuild create mode 100644 games/trs80gp/trs80gp.desktop create mode 100644 games/trs80gp/trs80gp.info create mode 100644 games/trs80gp/trs80gp.rst create mode 100644 games/trs80gp/wrapper32.sh diff --git a/games/trs80gp/README b/games/trs80gp/README new file mode 100644 index 0000000000..abc2b27998 --- /dev/null +++ b/games/trs80gp/README @@ -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. diff --git a/games/trs80gp/doinst.sh b/games/trs80gp/doinst.sh new file mode 100644 index 0000000000..65c7e2eeb9 --- /dev/null +++ b/games/trs80gp/doinst.sh @@ -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 diff --git a/games/trs80gp/icons/16.png b/games/trs80gp/icons/16.png new file mode 100644 index 0000000000000000000000000000000000000000..4bef014d6b2e5d70ae44c30eba0e6f629a94f721 GIT binary patch literal 112 zcmeAS@N?(olHy`uVBq!ia0vp^0wB!61|;P_|4#%`=AJH&Ar`&K85tQr{5jJc9vT=3 zv~HAgSd&)b%r=oxq@D5TMu!t_i}p6GlbHVS%J)MVPErS2SQwTU?G$kRzUe;D2nJ7A KKbLh*2~7Zv93&H_wXOH6t>i4C)<3zsw2>xlX|HKsBr%&JSdo?sVz5na z|J+e1`e4Ba5iGguLt|((D}*M6dOI6@@FD6IF|PKsyHd)<9Os^%dwaXHyW?6KELbWh z=HbhCm>C#;zxm8}-cB6a*A{#@2mom7>+R_WfbfO{*wEtH&>PdQ0?;zk*V8?4>U`zL zUGKg!*xu9KnSU!fm!Tfo^Kb+CTE2g0-nE!C99lW`Is_s%ZzAz((NpQhp zJHVM$bOda=r0pZ()Bl(}&Jf@FGyN=gnkV=2`@?Z6(Og)aN z&?=-kWqfg#%j)K8cpBUo&Rwr-b5YvyZsIwjLD^s0BbYk2>T0?1NJ8t z8p3Q5yOx2+)3xxGRGOx%axE`H8e+NiJeF>?+ExZmYP#cC4jfkPKqsxrAzM!gnkH*l z_myI!rVom$P?}&k$YLS18>g2-4V~n=lrlm(;_{M74T+KvX_U=jMG+KSCcoy?-$|BP zqzi`SvW`nfMqNKl!A{;XkR|^4MhAu!R)*+pv8oGwY-3qz@*pwu2id;)7l-B}3 z>mYHGL+qn`I9x3&hHe*)y6V!(NrgMwfvXR))ygxho{ekrenR}&H7Y%|wcd+?%Tuaq4 wKrTjR?j6B*WzOxeJ}m+sJ~;+*>!lipuRMSFDg8*s`@KNli-&q<_l#uz1nnq0i~s-t literal 0 HcmV?d00001 diff --git a/games/trs80gp/icons/32.png b/games/trs80gp/icons/32.png new file mode 100644 index 0000000000000000000000000000000000000000..7543457e3b36799148f55a97d3ce8359bcac1f92 GIT binary patch literal 194 zcmeAS@N?(olHy`uVBq!ia0vp^3LwnE1|*BCs=ffJPEQxdkcif|Q)2lJC~!1am*nk> zU7%2Sc+v^x&iaYxqZ($~o;tvA!F7R35JTumTaGzC=M>l$h&SA6(LJ@nRe2JF!Oob+ zER)>QFRAq$yZ7%E-}ig^3>RP5GoSD{d2Zv+ZA_9YRpS*H6FyZ5M28kwX*6sR4OjiH tP+;`)5;L;``-IsWTqU<c)I$ztaD0e0sy5rNu&S( literal 0 HcmV?d00001 diff --git a/games/trs80gp/icons/48.png b/games/trs80gp/icons/48.png new file mode 100644 index 0000000000000000000000000000000000000000..bc73118d1f6b5bc3e3e01f9b9d184c1a12150639 GIT binary patch literal 858 zcmeAS@N?(olHy`uVBq!ia0vp^1|ZANS%G|oWRD45dJguM!v-tY$DUh!@P+6=(yLU`q0KcVYP7-hXC4kjGx) z>Fdh=oK=vW+dzHO!A~H0PZ!4!kK=DceEo$3MQpztzTKlZw@=q2W$~Az4kmSh3CgC4 zYd3`bZ`j{_|De3Wn$qK3Q(0$CJGO$mb*1!b!>&Ui0X-_0}d?2sA~-={J5?cN)sdCuXTUz*K@yM>yXn%xUqPHt&Wd~=_nW?KZ?BFhb2vv0=E zE*DX6I2G|bTI|rA9pP6xo-vrERn0eM`25{{;uMySN2N2DE`79M+Jfa;k+SX|4T7>v z1sQl7G(?L_Rx?iMn8POUu1#Uu)%AKeR(Xl7<6ioRT{DM8eGc1-@83H9-Z^siT3933 z^y9^Ks~M&GkMw-_Eqz|Dq)$iDJb3S~kKdY|ULQZaJNW#LEpc%(v-5qu83fkH=`25| ze?DD>$3cWM#geCRA&dTnc8$%GetKj#rcZy!TGJs^u;TH-#)CXB;@{kyR#0$YvKM=- z!;NWg4{p{~D^Lkv>@V|E`cRzQdE2_ZZMPQPxT{tscQ(HA)lF@2>&z<*3_qpc&fm6F z_NYkCdA~4Dqx*Tj%<^^9|FI=RR$u>e=FY{XT{mhfeKi?wk%kne&tH$B(V1izVE70TQsTa+1Ja&WkxniaY} zy4&d5okMZ8`3sZu)cm4Y8Q#toI~3=bVXrUPHo-{K?RS(2i$IG(YWzLb>q}?6dg5`D zO(J1w$*=Bt>rd%e$4^~;^?&?op#u-{Y?#*`zHyUftDnm{r-UW|;H6#- literal 0 HcmV?d00001 diff --git a/games/trs80gp/icons/64.png b/games/trs80gp/icons/64.png new file mode 100644 index 0000000000000000000000000000000000000000..781baf07b74a336651642647a47ab086e8672551 GIT binary patch literal 843 zcmeAS@N?(olHy`uVBq!ia0vp^4j{|{BpCXc^q7DYOS+@4BLl<6e(pbstU$g(vPY0F z14ES>14Ba#1H&(%P{RubhEf9thF1v;3|2E37{m+a><(%-&)xpO%h2z9 zJGRYXyz=AohV>J+ zzRuQ_TyUI^FXsDSuTv9ly?q$4d*3u8c7|w~ifZfc=5Kjc-km2f?f)oVu z)3oliWY=Dhjc>K#y_p~sqc+bc=-j@kOFx7%_#Ssq==f^F;$VH9(}GX_Ma*>J$+}DP zXLbr_DRC}L^k{J8Ve&X|$WiR{sc^=uJpmSnptqVWvk2-yno}ikYXEj)UyCm{)i-)-2Gi?TB!?@MU+VXRb}py;I!_x^BkB{#0SunChl3 zc#1cBm7w_@PoI5LAFN}@urj(O9(}kq*yXvE&vA!<*V6L$ly1deYhh<#IN7mHxFo@W zY1aOXPh1YY*YD4IRPOZg$hwc3Erlz&Z5bG%->FVI*wV%+SoBg*v-rOPOJnC}Q!>*kQ8buY85vp`nL;$MTfL|PYGCkm^>bP0 Hl+XkKD0f 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. +. diff --git a/games/trs80gp/trs80gp.SlackBuild b/games/trs80gp/trs80gp.SlackBuild new file mode 100644 index 0000000000..330e8d2ac8 --- /dev/null +++ b/games/trs80gp/trs80gp.SlackBuild @@ -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 diff --git a/games/trs80gp/trs80gp.desktop b/games/trs80gp/trs80gp.desktop new file mode 100644 index 0000000000..889577241d --- /dev/null +++ b/games/trs80gp/trs80gp.desktop @@ -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; diff --git a/games/trs80gp/trs80gp.info b/games/trs80gp/trs80gp.info new file mode 100644 index 0000000000..0ae0384ab3 --- /dev/null +++ b/games/trs80gp/trs80gp.info @@ -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" diff --git a/games/trs80gp/trs80gp.rst b/games/trs80gp/trs80gp.rst new file mode 100644 index 0000000000..a95676e439 --- /dev/null +++ b/games/trs80gp/trs80gp.rst @@ -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 diff --git a/games/trs80gp/wrapper32.sh b/games/trs80gp/wrapper32.sh new file mode 100644 index 0000000000..1c1d05fbc1 --- /dev/null +++ b/games/trs80gp/wrapper32.sh @@ -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 "$@"