GEM DZIP 2.12 version 0.12 by Steve "Dosius" Nickolas <steve@dosius.zzn.com>

Based on DZIP 2.12, John Holder's JZIP 2.1, and  ultimately on Mark Howell's
ZIP 2.0 interpreter.  As far as I know this is the first specially GEM-based
Z-code interpreter.  See below for IMPORTANT setup information.

This program is  a HACK!  It is also not  complete, although it  should play
most games just fine.  All attributes  are mapped to color; the color opcode
is not supported and games are told that they cannot use color.  This is the
binary release of GEM DZIP, because I'm  a little hesitant to keep posting a
mound of sources repeatedly.  I  do plan to post the sources later or on the
immediate next version.  A hacked version of Heinz Rath's "TW" was used, and
a GEM sample app provided the  bindings to the file selector.  Being a HACK,
it isn't pure GEM, but close (it does not use GEM calls to read the keyboard
yet).  Despite its limitation, rest assured that GEM DZIP is complete enough
that Beyond Zork, Freefall, et al. all run correctly.

GEM DZIP is tested with GEM 1.2, 2.0, FreeGEM/3 (= GEM 3.15), FreeGEM/XM b4,
and ViewMAX/1 (!) and will run on all of them with the following issues:

  * In GEM/1, GEM/2 and FreeGEM/XM: Why this  is  I  have no clue.  When you
    exit, the GEM menus  and windows  no longer have their black outline.  A
    restart of GEM is the only solution I know of.  (Not too infeasible, GEM
    starts and stops rather quickly, and only one app is ever running at any
    given time.)
  * In FreeGEM/XM:  Do not switch applications.  DZIP will continue to think
    it has the run of the system, and will trample the Desktop window or any
    other program which is open.  In addition the keyboard reading code uses
    direct BIOS access (!) as that is all I know how to do right now.  Thus,
    DZIP will try to read the keyboard WHILE IN THE BACKGROUND.
  * In ViewMAX/1 (It WILL NOT run on later versions of ViewMAX!):  DZIP does
    not always behave properly at startup; sometimes it will lock when items
    in the file dialog are clicked; sometimes it will not get its whole name
    from DOS to re-run itself (and go into an infinite loop, I really *must*
    fix that).  Also the left of the window loses a couple pixels, but every
    character should be legible, or at least most of them.
  * Since it is designed for - and tested primarily with FreeGEM/3 - and DRI
    GEM/3 bindings were used - it should work perfectly with GEM/3, but what
    is perfect?  No reason why it shouldn't work on any version of GEM, from
    2.0 on up - and I'd really like to know if it works with 1.2, heh.
  * Occasionally the game-open dialog tends  to glitch, not sure why.  As if
    not all of the parameters from execl() make it to the program...not like
    I  send  a  lot, just  the  filename (or failing  that, (!) a default of
    "dzip.app") and the  name of the  game to run...besides, it's a standard
    DOS call, not a GEM call (!).  So if it keeps popping up the open dialog
    or it gets to the "cannot execute myself" dialog, you may be in trouble.
    Try putting your games in the current directory.  (I have been known, in
    ViewMAX/1, to cause the COMMAND.COM resident area to become trampled but
    I have no idea *why*.)

By reading the MZ header to get the offset of the overlay, I finally fixed a
strange and obscure bug in GEM DZIP 0.10 and 0.11 where standalone .APP game
files would not  work properly.  (Don't use them on ViewMAX/1; they will not
work correctly.)

To set up the GEM Desktop to run DZIP:

(New in 0.11, you don't need to do this.  GEM DZIP 0.11 will display a file
 open dialog.)

Select the  DZIP.APP  file, and "Options\Configure Application" in the menu.
Assign the  extensions DAT, Z3, Z5 and Z8 to it, and any icon pair you wish;
then select OK.  You should  be able to run a  game by double-clicking it in
the desktop.  You will not need to run DZIP.APP directly.

Configuration of the following options is supported  in the GEMDZIP.CFG file
which must be  located in your PATH.  Place one command per line.  These are
the same as the switches, essentially.  Case matters (as  with the switches)
but they are all lowercase (now)...just do  not put space on the LEFT of the
command.

  x            - Alternate display (Z1-Z3 only), starts  screen at  top with
                 the abbreviated score display that ITF, INF and the Infocom
                 Apple II and C-64 emulators use.  Although this is strictly
                 a violation of the Standard, it is the traditional behavior
                 of many of Infocom's interpreters, and more consistent with
                 the later Z5 and Z6 techniques.
  l n          - Sets the number of lines, max 22 (now).  This should be set
                 specifically to a lower value (I suggest 19) for a CGA; but
                 the default seems to be sufficient for  EGA, at least under
                 ViewMAX/1, and I don't see  any reason why it wouldn't work
                 under "true" GEM.
  c n          - Sets the number of columns, max 80.
  r n          - Sets the text right margin.
  t n          - Sets the text top margin.  (I really must find a way to get
                 the window to be movable, especially for ViewMAX/1.)
  k nnnnn      - Size of the command  history buffer.  There are  some minor
                 bugs in the  history mode, perhaps  because of the method I
                 have used to fake the  cursor (I don't know how to draw one
                 in GEM yet).  Default is 1024, max is 16384 (16K).
  i nn         - Set the  interpreter number.  14 is default, but  Infocom's
                 "Beyond Zork" looks better  with 2 (Apple //e) set instead.
                 Alternatively a good setting (and the default for the other
                 versions of DZIP and JZIP) is 6 (IBM).  The default mode is
                 recognized by newer Usocon games such as "WARP!", and works
                 in Infocom games although it says "Interpreter 14".
                   - 1 = DEC TOPS20 (which was the mainframe used by Infocom
                         to debug their games)
                   - 2 = Apple //e
                   - 3 = Macintosh
                   - 4 = Amiga
                   - 5 = Atari ST "Jackintosh" running TOS
                   - 6 = IBM PC or compatible running DOS
                   - 7 = Commodore C-128
                   - 8 = Commodore C-64
                   - 9 = Apple //c, with MouseText
                   - 10 = Apple IIgs (running ProDOS 16 or GS/OS?)
                   - 11 = Tandy Color Computer ("CoCo") (were there *any* Z4
                          or Z5 games for this system?)
                   - 14 = IBM PC or compatible  running GEM/FreeGEM (this is
                          a DZIP 2.12 nonstandard extension)
                 Other interpreters are undefined.
  y            - Enable the "Tandy bit" for Z3 games.  This for example will
                 censor "The Witness" and make most  versions of Z3 "ZORK I"
                 oblivious to the  existence of  a sequel.  Some Z3 games do
                 not use the bit for anything, however...
  s            - STRICTZ reporting level, 0-3, 0=ignore, 3=all fatal...

Other utilities included (for use in DOS): JZEXE (make standalone games) and
CKIFZS (sanity check for save states).
