summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
author B. Watson <urchlay@slackware.uk>2024-09-24 03:58:12 -0400
committer Willy Sudiarto Raharjo <willysr@slackbuilds.org>2024-09-28 06:54:26 +0700
commit8d795ea4196331bc86d4d9143cbfd398d285f20d (patch)
tree79d4f38dd8a39a7b72db8ec2a3d1d61ed33dff4e
parentc85a8494aeb5f6720c3112cf695672c008f8ab4d (diff)
downloadslackbuilds-8d795ea4196331bc86d4d9143cbfd398d285f20d.tar.gz
slackbuilds-8d795ea4196331bc86d4d9143cbfd398d285f20d.tar.xz
games/jzintv: Updated for version 20200712, add 4-tris ROM.
Signed-off-by: B. Watson <urchlay@slackware.uk> Signed-off-by: Willy Sudiarto Raharjo <willysr@slackbuilds.org>
-rw-r--r--games/jzintv/README40
-rw-r--r--games/jzintv/jzintv.SlackBuild71
-rw-r--r--games/jzintv/jzintv.info14
-rw-r--r--games/jzintv/resolution.diff.gzbin594 -> 0 bytes
-rw-r--r--games/jzintv/rompath.diff.gzbin318 -> 0 bytes
-rw-r--r--games/jzintv/slack-desc10
6 files changed, 100 insertions, 35 deletions
diff --git a/games/jzintv/README b/games/jzintv/README
index 7db13058b2..94fe79555a 100644
--- a/games/jzintv/README
+++ b/games/jzintv/README
@@ -1,8 +1,46 @@
jzintv (Intellivision emulator)
jzintv is an emulator and development environment for the Mattel
-Intellivision game console.
+Intellivision game console. The doc directory includes development
+documentation and sample Intellivision code, for those who want to
+write their own Intellivision games.
The Intellivision console contains code in the form of ROM. jzintv
requires images of these ROMs in order to run. The package includes
the ROM images, so there's no need to search the 'net for them.
+
+The package also includes 4-tris, an Intellivision game written by
+the jzintv author and released under the GPL. To play 4-tris, use
+a command like:
+
+ $ jzintv /usr/share/games/jzintv/rom/4-tris/4-tris.rom
+
+Slackware notes:
+
+- Documentation
+
+There is no man page for jzintv, but you can run "jzintv --help" to
+see the options it supports. Since it's a command-line program, there
+is no .desktop file included.
+
+- Window Size
+
+Without patching, the default window size (or screen size for
+fullscreen with -f1) is 320x200. Since this is usually smaller
+than a pack of playing cards on a modern (1080i or 4k) display, the
+SlackBuild patches the code to use a larger default window size.
+
+The default resolution used by the emulator can be controlled via
+the DEFRES environment variable. This only sets the default, in the
+absence of a -z option. DEFRES can be set to anything that the -z
+option will accept: built-in modes 0 through 7, or WxH. The default is
+"1360x1024", which should be fine on 1080i displays. If you have a 4K
+display, you probably want something larger. Examples:
+
+ # DEFRES=1024x768 sh jzintv.SlackBuild
+
+ # DEFRES=2720x2048 sh jzintv.SlackBuild
+
+The window size should be roughly a 4:3 aspect ratio (since that's
+what the Intellivision displays), and the actual window size may be
+slightly smaller than you set DEFRES to.
diff --git a/games/jzintv/jzintv.SlackBuild b/games/jzintv/jzintv.SlackBuild
index b830b3b65c..58df569f60 100644
--- a/games/jzintv/jzintv.SlackBuild
+++ b/games/jzintv/jzintv.SlackBuild
@@ -6,6 +6,13 @@
# Licensed under the WTFPL. See http://www.wtfpl.net/txt/copying/ for details.
+# 20240919 bkw:
+# - update for v20200712.
+# - add DEFRES to control default window size.
+# - include 4-tris ROM.
+# - new download URL for intv.zip, some residential ISPs block
+# the previous one. lame.
+
# 20230107 bkw: BUILD=3
# - fix permissions in doc dir.
# - go ahead and include the ROMs in the package.
@@ -13,15 +20,15 @@
# 20211023 bkw: BUILD=2
# - fix -current build.
# - binaries in /usr/games.
-# - /usr/share/jzintv/ => /usr/share/game/jzintv
+# - /usr/share/jzintv/ => /usr/share/games/jzintv
# - add patch to make the default window size 1024x768.
# - include ROM images in package, if they exist in the SlackBuild dir.
cd $(dirname $0) ; CWD=$(pwd)
PRGNAM=jzintv
-VERSION=${VERSION:-r1025}
-BUILD=${BUILD:-3}
+VERSION=${VERSION:-20200712}
+BUILD=${BUILD:-1}
TAG=${TAG:-_SBo}
PKGTYPE=${PKGTYPE:-tgz}
@@ -44,46 +51,52 @@ 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
+ZIPNAME=$PRGNAM-$VERSION-src
+
rm -rf $PKG
mkdir -p $TMP $PKG $OUTPUT
cd $TMP
-rm -rf $PRGNAM-$VERSION
-tar xvf $CWD/$PRGNAM-$VERSION.tar.?z*
-cd $PRGNAM-$VERSION
+rm -rf $ZIPNAME
+unzip $CWD/$ZIPNAME.zip
+cd $ZIPNAME
chown -R root:root .
-find . -type f -a -exec chmod 644 {} \+ -o \
- -type d -a -exec chmod 755 {} \+
-# 20211024 bkw: these patches are gzipped because they contain \r\n
-# line endings, and we can't trust git to preserve them.
+# 20240919 bkw: Upstream left .exrc turds in the tarball, this find
+# gets rid of them in addition to fixing the permissions.
+find . -name .exrc -delete -o \
+ -type f -a -exec chmod 644 {} + -o \
+ -type d -a -exec chmod 755 {} +
# Don't see a way to redefine the ROM path on the make command
# line (it's hard-coded to /usr/local/share/jzintv/rom).
-zcat $CWD/rompath.diff.gz | patch -p1
+# 20240924 bkw: Used to be a patch; use sed now. Leave "." in the
+# path, just in case.
+sed -i '/DEFAULT_ROM_PATH/s,".*,".:/usr/share/games/jzintv/rom",' src/config.h
# It's 2021, make the default window size bigger than 320x240.
-# This sets it to 1024x768, and also fixes the --help output to show
-# all the available modes.
-zcat $CWD/resolution.diff.gz | patch -p1
+# 20240919 bkw: Used to do with a patch, now we use sed and can
+# have an environment variable to control the default res.
+DEFRES="${DEFRES:-1360x1024}"
+sed -i '/#define *STR_REPLACE(/aSTR_REPLACE(disp_res, "'"$DEFRES"'");' src/cfg/cfg.c
# Fix for gcc-4.7.x and up.
sed -i '/^LFLAGS/s,$, -lm,' src/Makefile
-make -C src OPT_FLAGS="$SLKCFLAGS -fcommon"
+# 20240919 bkw: No, we do not want a statically-linked binary. Can't
+# anyway, we lack static versions of some of the libs it needs.
+sed -i 's,-static,,' src/Makefile.common
+
+make -C src OPT_FLAGS="$SLKCFLAGS"
# There's no 'make install'
rm -f bin/README* bin/*.dll
@@ -108,21 +121,33 @@ for romfile in exec.bin grom.bin ecs.bin; do
fi
done
+PKGDOC=$PKG/usr/doc/$PRGNAM-$VERSION
+mkdir -p $PKGDOC
+
+if [ -e $CWD/4-tris.zip ]; then
+ mkdir -p $ROMDIR/4-tris $PKGDOC/4-tris
+ unzip $CWD/4-tris.zip 4-tris.rom -d $ROMDIR/4-tris
+ unzip $CWD/4-tris.zip README.txt COPYING.txt -d $PKGDOC/4-tris
+ chmod 644 $ROMDIR/4-tris/* $PKGDOC/4-tris/*
+ chown root:root $ROMDIR/4-tris/* $PKGDOC/4-tris/*
+ ROMS+="4-tris.rom"
+fi
+
if [ "$ROMS" = "" ]; then
ROMS="This package does NOT include ROM images."
else
- ROMS="This package includes ROM images: $ROMS"
+ ROMS="Package includes ROM images: $ROMS"
fi
-PKGDOC=$PKG/usr/doc/$PRGNAM-$VERSION
-mkdir -p $PKGDOC
echo "This directory is empty on purpose" > examples/spacepat/genasm/.dontdelete
cp -r *.txt doc examples rom misc $PKGDOC
cat $CWD/$PRGNAM.SlackBuild > $PKGDOC/$PRGNAM.SlackBuild
cat $CWD/README > $PKGDOC/README_SBo.txt
mkdir -p $PKG/install
-sed "14s/:/: $ROMS/" $CWD/slack-desc > $PKG/install/slack-desc
+sed -e "s/@ROMS@/$ROMS/" \
+ -e "s/@DEFRES@/$DEFRES/" \
+ $CWD/slack-desc > $PKG/install/slack-desc
cd $PKG
/sbin/makepkg -l y -c n $OUTPUT/$PRGNAM-$VERSION-$ARCH-$BUILD$TAG.$PKGTYPE
diff --git a/games/jzintv/jzintv.info b/games/jzintv/jzintv.info
index e92e28d256..acb2ce5338 100644
--- a/games/jzintv/jzintv.info
+++ b/games/jzintv/jzintv.info
@@ -1,12 +1,14 @@
PRGNAM="jzintv"
-VERSION="r1025"
-HOMEPAGE="http://www.intellivision.us/intvgames/jzintv/jzintv.php"
-DOWNLOAD="http://ponce.cc/slackware/sources/repo/jzintv-r1025.tar.xz \
+VERSION="20200712"
+HOMEPAGE="http://spatula-city.org/~im14u2c/intv/"
+DOWNLOAD="http://spatula-city.org/~im14u2c/intv/dl/jzintv-20200712-src.zip \
https://slackware.uk/~urchlay/src/intv_ecs.zip \
- http://cominf0.narod.ru/mess123/intv.zip"
-MD5SUM="6c1a9703c1c3a797aca94a0f98907bcb \
+ https://slackware.uk/~urchlay/src/intv.zip \
+ http://spatula-city.org/~im14u2c/intv/4-tris/4-tris.zip"
+MD5SUM="1720fe71031e1142a60961695d2918a5 \
9391d44477a531668bfd233f0809eebd \
- 84ab0811c5d65b0be1cf16c755ae2dc6"
+ 84ab0811c5d65b0be1cf16c755ae2dc6 \
+ c78d64284d287b95fdfaff5e7890030d"
DOWNLOAD_x86_64=""
MD5SUM_x86_64=""
REQUIRES=""
diff --git a/games/jzintv/resolution.diff.gz b/games/jzintv/resolution.diff.gz
deleted file mode 100644
index 00b5b0db27..0000000000
--- a/games/jzintv/resolution.diff.gz
+++ /dev/null
Binary files differ
diff --git a/games/jzintv/rompath.diff.gz b/games/jzintv/rompath.diff.gz
deleted file mode 100644
index d7f28e9e2b..0000000000
--- a/games/jzintv/rompath.diff.gz
+++ /dev/null
Binary files differ
diff --git a/games/jzintv/slack-desc b/games/jzintv/slack-desc
index 653a811fb8..65df9ab682 100644
--- a/games/jzintv/slack-desc
+++ b/games/jzintv/slack-desc
@@ -9,11 +9,11 @@
jzintv: jzintv (Intellivision emulator)
jzintv:
jzintv: jzintv is an emulator and development environment for the Mattel
-jzintv: Intellivision game console.
-jzintv:
-jzintv:
-jzintv:
-jzintv:
+jzintv: Intellivision game console. The doc directory includes development
+jzintv: documentation and sample Intellivision code, for those who want to
+jzintv: write their own Intellivision games.
jzintv:
+jzintv: @ROMS@
jzintv:
+jzintv: Default resolution: -z @DEFRES@
jzintv: