diff options
author | B. Watson <yalhcru@gmail.com> | 2012-12-16 17:42:41 -0500 |
---|---|---|
committer | dsomero <xgizzmo@slackbuilds.org> | 2012-12-23 09:16:20 -0500 |
commit | bacb4b4024a43478bc1fc93003ab77984402e1b8 (patch) | |
tree | 3697e04fb7ce194163a9f156d6b2340033600e0b /games/ztools | |
parent | 072a0aa9aa699dbd02b3f530ff95b66d0922ce0e (diff) |
games/ztools: Added (tools for Infocom and other Z-Code story files)
Signed-off-by: dsomero <xgizzmo@slackbuilds.org>
Diffstat (limited to 'games/ztools')
-rw-r--r-- | games/ztools/README | 16 | ||||
-rw-r--r-- | games/ztools/patches/zcut-compilefix.diff | 14 | ||||
-rw-r--r-- | games/ztools/patches/zcut-floppy_usage.diff | 24 | ||||
-rw-r--r-- | games/ztools/patches/zcut-zversion.diff | 11 | ||||
-rw-r--r-- | games/ztools/patches/zdebugtool-compilefix.diff | 35 | ||||
-rw-r--r-- | games/ztools/patches/ztools-zcheck.diff | 103 | ||||
-rw-r--r-- | games/ztools/slack-desc | 19 | ||||
-rw-r--r-- | games/ztools/zcut.1 | 52 | ||||
-rw-r--r-- | games/ztools/zdebugtool.1 | 126 | ||||
-rw-r--r-- | games/ztools/ztools.SlackBuild | 123 | ||||
-rw-r--r-- | games/ztools/ztools.info | 16 |
11 files changed, 539 insertions, 0 deletions
diff --git a/games/ztools/README b/games/ztools/README new file mode 100644 index 000000000000..2c17e525360b --- /dev/null +++ b/games/ztools/README @@ -0,0 +1,16 @@ +ztools (tools for use with Infocom and other Z-Code story files) + +infodump - data file dumper for infocom format game files +pix2gif - converts infocom MG1/EG1 picture files to separate GIF files +txd - Z code disassembler for Infocom game files +zcheck - integrity checker for infocom format story files +zcut - extract Infocom story files from disk images +zdebugtool - sneak into the depths of INFOCOM adventures +zrename - rename z-code story files according to their z-machine version + +zcheck and zdebugtool have been renamed, as "check" and "debugtool" are +very generic names, likely to conflict with some other package. + +zcut, zdebugtool, and zrename are normally distributed separately. They're +included in this build because they're too small to justify separate +builds, yet too useful for a Z-Code developer to do without. diff --git a/games/ztools/patches/zcut-compilefix.diff b/games/ztools/patches/zcut-compilefix.diff new file mode 100644 index 000000000000..adcee5990142 --- /dev/null +++ b/games/ztools/patches/zcut-compilefix.diff @@ -0,0 +1,14 @@ +diff -Naur a/zcut12.c b/zcut12.c +--- a/zcut12.c 2001-07-24 02:20:32.000000000 -0400 ++++ b/zcut12.c 2012-11-30 14:28:39.000000000 -0500 +@@ -1534,8 +1534,8 @@ + + int disk, n; + +- enum tsystem this_type = UNKNOWN; +- enum tsystem prev_type = UNKNOWN; ++ tsystem this_type = UNKNOWN; ++ tsystem prev_type = UNKNOWN; + + char extension[4], *p; + diff --git a/games/ztools/patches/zcut-floppy_usage.diff b/games/ztools/patches/zcut-floppy_usage.diff new file mode 100644 index 000000000000..1475818ffd2f --- /dev/null +++ b/games/ztools/patches/zcut-floppy_usage.diff @@ -0,0 +1,24 @@ +diff -Naur a/zcut12.c b/zcut12.c +--- a/zcut12.c 2001-07-24 02:20:32.000000000 -0400 ++++ b/zcut12.c 2012-11-30 14:48:28.000000000 -0500 +@@ -1556,13 +1556,17 @@ + "- Atari 800/XL/XE disk images [.ATR]\n" + "- Commodore 64/128 disk images [.D64]\n" + "- Commodore Amiga ADF format (only Deadline so far) [.ADF]\n" +- "- IBM PC bootable disks (MS-DOS version only)\n" ++ "- IBM PC bootable disks or disk images\n" + "- Oric disk images (after conversion through UnMFM) [.DSK]\n" + "- any file if the Z-code is stored in one piece\n" + "\n" + "Usage: zcut input-file-1 [input-file-2...] output-file\n" +- " zcut drive: output-file"); +- ++#if defined( __MSDOS__) || defined(_WINNT_) ++ " zcut drive: output-file" ++#else ++ " zcut /dev/fd0 output-file" ++#endif ++ ); + return EXIT_FAILURE; + + } diff --git a/games/ztools/patches/zcut-zversion.diff b/games/ztools/patches/zcut-zversion.diff new file mode 100644 index 000000000000..1c736b062946 --- /dev/null +++ b/games/ztools/patches/zcut-zversion.diff @@ -0,0 +1,11 @@ +diff -Naur a/zcut12.c b/zcut12.c +--- a/zcut12.c 2001-07-24 02:20:32.000000000 -0400 ++++ b/zcut12.c 2012-11-30 14:58:22.000000000 -0500 +@@ -362,6 +362,7 @@ + if (hiscore < 900) + error ("Could not find story header"); + ++ printf ("Z-Machine version %d\n", (int) GET_BYTE(header,0)); + printf ("Story file release %d ", (int) GET_WORD(header,2)); + printf ("serial %c%c%c%c%c%c.\n", + isprint (GET_BYTE(header,18)) ? GET_BYTE(header,18) : ' ', diff --git a/games/ztools/patches/zdebugtool-compilefix.diff b/games/ztools/patches/zdebugtool-compilefix.diff new file mode 100644 index 000000000000..872eff9b666f --- /dev/null +++ b/games/ztools/patches/zdebugtool-compilefix.diff @@ -0,0 +1,35 @@ +diff -Naur a/Makefile b/Makefile +--- a/Makefile 1992-10-31 21:52:32.000000000 -0500 ++++ b/Makefile 2012-12-01 11:02:49.000000000 -0500 +@@ -1,17 +1,9 @@ +-# Makefile for Infocom Debugging Tool +-# (works with Aztec 5.2a) +- +-CFLAGS = -DAMIGA -ms -so -wlc +- + OBJS = alphabet.o check.o decode.o extern.o header.o macros.o main.o \ + object.o recog.o stuffing.o tree.o vars.o vocab.o + +-all: DebugTool +- +-DebugTool: $(OBJS) +- ln -o DebugTool $(OBJS) -lc ++all: zdebugtool + ++zdebugtool: $(OBJS) ++ $(CC) $(LDFLAGS) -o zdebugtool $(OBJS) + + $(OBJS): frobnitz.h Makefile +- +-# (c) 1992 by Paul David Doherty +diff -Naur a/frobnitz.h b/frobnitz.h +--- a/frobnitz.h 1993-05-06 17:33:42.000000000 -0400 ++++ b/frobnitz.h 2012-12-01 11:03:40.000000000 -0500 +@@ -51,6 +51,7 @@ + + #include <stdio.h> + #include <stdlib.h> ++#include <string.h> + + + /*****************************************************************/ diff --git a/games/ztools/patches/ztools-zcheck.diff b/games/ztools/patches/ztools-zcheck.diff new file mode 100644 index 000000000000..d69c86066e7b --- /dev/null +++ b/games/ztools/patches/ztools-zcheck.diff @@ -0,0 +1,103 @@ +diff -Naru a/check.1 b/check.1 +--- a/check.1 1998-11-07 10:07:02.000000000 -0500 ++++ b/check.1 2012-12-01 10:56:49.000000000 -0500 +@@ -1,18 +1,18 @@ +-.TH "check" 1 "November 1998" "Ztools 7.3.1" ++.TH "zcheck" 1 "November 1998" "Ztools 7.3.1" + .SH NAME +-check \- integrity checker for infocom format story files ++zcheck \- integrity checker for infocom format story files + .SH SYNOPSIS +-.B check ++.B zcheck + story-file + .RB "[ new-story-file ]" + .SH DESCRIPTION +-.B Check ++.B ZCheck + is a program for checking the integrity of Infocom format story files. + It can optionally generate a new story file by trimming the original + to the optimal length. + .SH OPTIONS + There are no command-line options for +-.B check . ++.B zcheck . + .LP + If a second argument is given, + it is treated as the name for the trimmed story file. +@@ -25,4 +25,4 @@ + Mark Howell 7 August 1993 howell_ma@movies.enet.dec.com + .SH CURRENT MAINTAINER + Matthew Russotto russotto@pond.com +-. +\ No newline at end of file ++. +diff -Naru a/infodump.1 b/infodump.1 +--- a/infodump.1 1998-11-07 10:07:36.000000000 -0500 ++++ b/infodump.1 2012-12-01 10:56:30.000000000 -0500 +@@ -60,7 +60,7 @@ + Display symbols from file in object and grammar displays. + Use of this option implies -s. + .SH SEE ALSO +-.BR check (1), ++.BR zcheck (1), + .BR inforead (1), + .BR pix2gif (1), + .BR txd (1) +@@ -68,4 +68,4 @@ + Mark Howell 28 August 1992 howell_ma@movies.enet.dec.com + .SH CURRENT MAINTAINER + Matthew Russotto russotto@pond.com +-. +\ No newline at end of file ++. +diff -Naru a/inforead.1 b/inforead.1 +--- a/inforead.1 1998-11-07 10:06:24.000000000 -0500 ++++ b/inforead.1 2012-12-01 10:56:26.000000000 -0500 +@@ -29,7 +29,7 @@ + not part of the ZTools distribution but available at the Interactive + Fiction Archive (ftp://ftp.gmd.de/if-archive) + .SH SEE ALSO +-.BR check (1), ++.BR zcheck (1), + .BR infodump (1), + .BR pix2gif (1), + .BR txd (1) +@@ -37,4 +37,4 @@ + Mark Howell 13 September 1992 howell_ma@movies.enet.dec.com + .SH CURRENT MAINTAINER + Matthew Russotto russotto@pond.com (but see NOTES) +-. +\ No newline at end of file ++. +diff -Naru a/pix2gif.1 b/pix2gif.1 +--- a/pix2gif.1 1998-11-07 10:08:22.000000000 -0500 ++++ b/pix2gif.1 2012-12-01 10:55:56.000000000 -0500 +@@ -14,7 +14,7 @@ + You must provide exactly one argument: + the name (or path) of an infocom format picture file. + .SH SEE ALSO +-.BR check (1), ++.BR zcheck (1), + .BR infodump (1), + .BR inforead (1), + .BR txd (1) +@@ -22,4 +22,4 @@ + Mark Howell 13 September 1992 howell_ma@movies.enet.dec.com + .SH CURRENT MAINTAINER + Matthew Russotto russotto@pond.com +-. +\ No newline at end of file ++. +diff -Naru a/txd.1 b/txd.1 +--- a/txd.1 1998-11-07 09:57:04.000000000 -0500 ++++ b/txd.1 2012-12-01 10:55:59.000000000 -0500 +@@ -43,7 +43,7 @@ + .B \-S \fIn\fP + Dump high strings only, starting at address \fIn\fP + .SH SEE ALSO +-.BR check (1), ++.BR zcheck (1), + .BR infodump (1), + .BR inforead (1), + .BR pix2gif (1) diff --git a/games/ztools/slack-desc b/games/ztools/slack-desc new file mode 100644 index 000000000000..9e0a04f236a5 --- /dev/null +++ b/games/ztools/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 ':'. + + |-----handy-ruler------------------------------------------------------| +ztools: ztools (tools for use with Infocom and other Z-Code story files) +ztools: +ztools: infodump - data file dumper for infocom format game files +ztools: pix2gif - converts infocom MG1/EG1 picture files to separate GIF files +ztools: txd - Z code disassembler for Infocom game files +ztools: zcheck - integrity checker for infocom format story files +ztools: zcut - extract Infocom story files from disk images +ztools: zdebugtool - sneak into the depths of INFOCOM adventures +ztools: zrename - rename z-code files according to their z-machine version +ztools: +ztools: diff --git a/games/ztools/zcut.1 b/games/ztools/zcut.1 new file mode 100644 index 000000000000..d56563036446 --- /dev/null +++ b/games/ztools/zcut.1 @@ -0,0 +1,52 @@ +.TH ZCUT "1" "December 2012" "SlackBuilds.org" "ZTools" +.SH NAME +zcut \- extract Infocom story files from disk images +.SH SYNOPSIS +.B zcut +\fIinput-file-1 \fR[\fIinput-file-2\fR...] \fIoutput-file\fR +.br +.B zcut +\fI/dev/fd0\fR [\fIoutput\-file\fR] +.br +.B unmfm +[\fIinput\-file\fR] [\fIoutput\-file\fR] +.SH DESCRIPTION +ZCut extracts Infocom story files (aka Z\-code) from +.PP +\- Amstrad CPC disk images [.DSK] +.br +\- Apple ][ disk images [.DSK, .NIB] +.br +\- Atari 800/XL/XE disk images [.ATR] +.br +\- Commodore 64/128 disk images [.D64] +.br +\- Commodore Amiga ADF format (only Deadline so far) [.ADF] +.br +\- IBM PC bootable disks or disk images +.br +\- Oric disk images (after conversion through UnMFM) [.DSK] +.br +\- any file if the Z\-code is stored in one piece +.PP +unmfm preprocesses Oric disk images for use with zcut. It has no +purpose for any other type of disk image. unmfm's output files +are only useful with zcut (not for use with Oric emulators). +.SH SEE ALSO +.BR zdebugtool (1), +.BR zcheck (1), +.BR inforead (1), +.BR pix2gif (1), +.BR txd (1) +.PP +zcut.txt and unmfm.txt, in +/usr/doc/ztools-@VERSION@/ +.SH AUTHORS +1.2 includes changes by the Webulator +.br +1.1 Written by Stefan Jokisch in 1998. +.PP +Based on work by Matthew T. Russotto, +Paul D. Doherty, Stephen Tjasink, Mark Howell and Michael Jenkin. +.PP +This man page created by B. Watson, for SlackBuilds.org diff --git a/games/ztools/zdebugtool.1 b/games/ztools/zdebugtool.1 new file mode 100644 index 000000000000..aa1b352d72c5 --- /dev/null +++ b/games/ztools/zdebugtool.1 @@ -0,0 +1,126 @@ +.TH "ZDEBUGTOOL" 1 "December 2012" "SlackBuilds.org" "ZTools" +.SH NAME +zdebugtool \- sneak into the depths of INFOCOM adventures +.SH SYNOPSIS +.B +zdebugtool +[ \-ghamotvdc ] [ \-0123 ] [ file ] +.SH DESCRIPTION +This little tool gives you an insight into the inner +workings and hidden secrets of the classic INFOCOM (tm) text +adventures. +.PP +It works with every INFOCOM game, whether it is an old +standard one like Zork I or Deadline or one of the newer +graphics games like Shogun or Zork Zero. +.PP +Additionally, it can be used to analyze the save files +of all such games. +.SH OPTIONS +.TP +.B \-g +display name of game +.TP +.B \-h +display game header structure +.TP +.B \-a +display alphabet +.TP +.B \-m +display macros +.TP +.B \-o +display object list +.TP +.B \-t +display object tree +.TP +.B \-v +display (global) variables +.TP +.B \-d +display dictionary +.TP +.B \-c +check data file +.TP +.B \-0 +suppress enumeration +.TP +.B \-1 +suppress attributes +.TP +.B \-2 +decimal enumeration +.TP +.B \-3 +suppress property stuff +.SH AUTHOR +This program was written by me, Paul David Doherty, in +1992. +.PP +Some ideas incorporated in this program came from other +people involved with INFOCOM interpreters and debuggers, +especially Mark Howell, Mike Threepoint, and Paul Smith. +Sascha Wildner sent me some bug reports. Thanks a lot. +.PP +If you want to report any bugs or make any suggestions, +you can contact me via Email. My address: +h0142kdd@rz.hu\-berlin.de +.br +[ +.I note: +this email address is from 1993, it doesn't work any more. \-\- BW ] +.PP +This man page created from PDD's preformatted DebugTool.man by B. Watson, +for SlackBuilds.org. +.SH COPYRIGHTS +This program is freely distributable. However, it is not in +the Public Domain, so please don't distribute modified +versions without notifying me. +.SH BUGS +There are no known bugs. +.PP +However, if you use the \-t option, you should set the +stack to 10000 (because the recursions will eat some +stack). +.PP +Also, as the \-t option performs quite a few jumps in +the file, it can take a long time if the file is on a disk. +It is advisable to put it on your hard disk or into RAM. +.PP COMPATIBILITY +The program is written without using any Amiga\-specific +functions. I have tried to make it work on little\-endian +machines as well as big\-endian ones. However, I had no +possibility to test whether it compiles (and works) on any +system apart from the Amiga. +.SH "VERSION HISTORY " +1.00 (31.5.1992) +.PP +First public release. +.PP +1.01 (18.7.1992) +.PP +Externalised global variables. Made minor changes +concerning the header flags. +.PP +1.02 (25.7.1992) +.PP +Added \-c option. +.PP +1.03 (4.8.1992) +.PP +Minor changes again. +.PP +1.10 (1.11.1992) +.PP +Changed \-v option to \-d. Added (new) \-v option. Added +property stuff (in \-o option) and \-3 option. Changed +attributes format (in \-o and \-t). Expanded \-t option to +seek for closed chains. Added debugging info. Minor +fixes. +.PP +1.11 (6.5.1993) +.PP +Updated header flags and offsets. diff --git a/games/ztools/ztools.SlackBuild b/games/ztools/ztools.SlackBuild new file mode 100644 index 000000000000..a5310b562d72 --- /dev/null +++ b/games/ztools/ztools.SlackBuild @@ -0,0 +1,123 @@ +#!/bin/bash + +# Slackware build script for ztools + +# Written by B. Watson (yalhcru@gmail.com) + +# Licensed under the WTFPL. See http://sam.zoy.org/wtfpl/ for details. + +PRGNAM=ztools +VERSION=${VERSION:-7.3.1} +BUILD=${BUILD:-1} +TAG=${TAG:-_SBo} + +if [ -z "$ARCH" ]; then + case "$( uname -m )" in + i?86) ARCH=i486 ;; + arm*) ARCH=arm ;; + *) ARCH=$( uname -m ) ;; + esac +fi + +CWD=$(pwd) +TMP=${TMP:-/tmp/SBo} +PKG=$TMP/package-$PRGNAM +OUTPUT=${OUTPUT:-/tmp} + +if [ "$ARCH" = "i486" ]; then + SLKCFLAGS="-O2 -march=i486 -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 + +TARVER=${VERSION//./} +ZCUTVER=12 +ZDEBUGVER=111 + +rm -rf $PKG +mkdir -p $TMP $PKG $OUTPUT +cd $TMP +rm -rf $PRGNAM-$VERSION +mkdir -p $PRGNAM-$VERSION +cd $PRGNAM-$VERSION + +# extract 'em all first. None of these have a top-level dir in +# their archive. Also DebugTools was lha'ed on an Amiga, causing +# filename weirdness (Makefile => srcMakefile, etc). +mkdir -p $PRGNAM zcut zdebugtool +( cd $PRGNAM && tar xvf $CWD/$PRGNAM$TARVER.tar.gz ) +( cd zcut && unzip $CWD/zcut$ZCUTVER.zip ) +( cd zdebugtool && lha x $CWD/DebugTool_$ZDEBUGVER.lha && rename src '' src* ) + +chown -R root:root . +find . \ + \( -perm 777 -o -perm 775 -o -perm 711 -o -perm 555 -o -perm 511 \) \ + -exec chmod 755 {} \; -o \ + \( -perm 666 -o -perm 664 -o -perm 600 -o -perm 444 -o -perm 440 -o -perm 400 \) \ + -exec chmod 644 {} \; + +BINDIR=$PKG/usr/bin +DOCDIR=$PKG/usr/doc/$PRGNAM-$VERSION +MANDIR=$PKG/usr/man/man1 +PATCHDIR=$CWD/patches +mkdir -p $BINDIR $DOCDIR $MANDIR + +cd $PRGNAM + patch -p1 < $PATCHDIR/$PRGNAM-zcheck.diff + make CFLAGS="$SLKCFLAGS" + mv check.1 zcheck.1 + mv check zcheck + for bin in zcheck infodump pix2gif txd; do + grep -v inforead < $bin.1 | gzip -9c > $MANDIR/$bin.1.gz + install -m0755 -s $bin $BINDIR + done + cat readme.1st > $DOCDIR/$PRGNAM.txt +cd .. + +cd zcut + patch -p1 < $PATCHDIR/zcut-compilefix.diff + patch -p1 < $PATCHDIR/zcut-floppy_usage.diff + patch -p1 < $PATCHDIR/zcut-zversion.diff + + gcc $SLKCFLAGS -o zcut zcut$ZCUTVER.c + gcc $SLKCFLAGS -o unmfm unmfm.cpp + install -s -m0755 zcut unmfm $BINDIR + + sed 's,\r,,' < ZCUT.TXT > $DOCDIR/zcut.txt + sed 's,\r,,' < unMFM.txt > $DOCDIR/unmfm.txt + + # man page created for this SlackBuild + sed "s,@VERSION@,$VERSION,g" < $CWD/zcut.1 | gzip -9c > $MANDIR/zcut.1.gz + ln -s zcut.1.gz $MANDIR/unmfm.1.gz +cd .. + +cd zdebugtool + patch -p1 < $PATCHDIR/zdebugtool-compilefix.diff + make CFLAGS="$SLKCFLAGS" + install -s -m0755 zdebugtool $BINDIR + # man page reconstituted from preformatted DebugTools.man + gzip -9c < $CWD/zdebugtool.1 > $MANDIR/zdebugtool.1.gz +cd .. + +# Also include my own modest z-code utility. It replaces the zren.exe +# that ships with zcut. +install -m0755 $CWD/zrename $PKG/usr/bin/zrename +perl $CWD/zrename --man | gzip -9c > $MANDIR/zrename.1.gz + +cat $CWD/$PRGNAM.SlackBuild > $PKG/usr/doc/$PRGNAM-$VERSION/$PRGNAM.SlackBuild + +mkdir -p $PKG/install +cat $CWD/slack-desc > $PKG/install/slack-desc + +cd $PKG +/sbin/makepkg -l y -c n $OUTPUT/$PRGNAM-$VERSION-$ARCH-$BUILD$TAG.${PKGTYPE:-tgz} diff --git a/games/ztools/ztools.info b/games/ztools/ztools.info new file mode 100644 index 000000000000..3c0489161a29 --- /dev/null +++ b/games/ztools/ztools.info @@ -0,0 +1,16 @@ +PRGNAM="ztools" +VERSION="7.3.1" +HOMEPAGE="http://ifarchive.org/indexes/if-archiveXinfocomXtoolsXztools.html" +DOWNLOAD="http://ifarchive.org/if-archive/infocom/tools/ztools/ztools731.tar.gz \ + http://www.ifarchive.org/if-archive/infocom/tools/zcut12.zip \ + http://www.ifarchive.org/if-archive/infocom/tools/DebugTool_111.lha \ + http://urchlay.naptime.net/~urchlay/src/zrename" +MD5SUM="f5e6abb7011817e48debee828895a500 \ + c815ced0706fc6454bea18d0046c5afe \ + 8d86a47b23c17bd1243577db99dc8ac8 \ + c96148d83cf062e3c9cb8c889491d88a" +DOWNLOAD_x86_64="" +MD5SUM_x86_64="" +REQUIRES="" +MAINTAINER="B. Watson" +EMAIL="yalhcru@gmail.com" |