		FROTZ V2.01-PLUS SVGA MODE AND SOUNDBLASTER 16

Hi whoever might read this,

I guess I am not the first person to notice the pretty bad text quality all
existing Infocom interpreters for V6 games, (namely Beyond Zork, Zork Zero,
Shogun, Journey and Arthur) produce on MS-DOS-based systems. The EGA and 
MCGA/Standard VGA that dominated the market when the games were made simply
weren't able to handle multi-colored graphics and high resolutions at the same
time, so none of infocom's own V6 interpreters supports anything better. 

At the moment I believe Setafan Jokisch's FROTZ is the only free interpreter
capable of graphics, at least as far as DOS is concerned.

Since Stefan's code is pretty well documented, I took the freedom to implement
some VESA SVGA routines that, while not enhancing graphics resolution, do a lot
for the text quality.

Since I have only tested them on my own Trident CX 9400 i 1-MB VLB card 
and an older Tseng ET4000 ISA card with UNIVBE.EXE VESA driver I don't
know if the assumptions I make about the card are valid, but I guess they are.
There must be either a 640x400x256 mode or a 640x480x256 mode, in the latter 
case the lower part of the screen simply stays blank. (actually these are VESA 
mode 100h and 101h, the first in the VESA list, so I guess many or most cards
will provide one of those). The window size must be at least 64KB, and the
granularity must be a power of two not higher than 64 KB, which I guess will
be the case on most cards. Nothing exept standard VESA calls and read/write to
video memory is done to the card.

The SVGA code is now complete. The problem of a few spurious pixels appearing
on the screen once in a while has been solved. (I forgot to bank-switch at one
point), and also the problem that in Zork Zero, text printed on top of pictures
often had the wrong background color in the first release.

Compatibility has now been very much improved after I aquired a copy of the
actual VESA specification, the former version (up to Release 2) was based o
pretty incomplete info.

The SVGA code doesn't provide mouse support (yet ?), as most DOS mouse drivers
can only handle standard VGA resolutions. Apart from that, both pictures and
the Beyond Zork character graphics will work correctly.

The two new display modes are -d 5 and -d 6, 5 will use MCGA pictures (which
have more colors and are thus generally prettier) and 6 will use EGA pictures,
which have a higher resolution with less colors. The text font is the currently
active 8x16 font, either ROM or DISPLAY.SYS / MODE CON CP PREP font (or what-
ever other program correctly sets the pointers to the font and keeps a copy of
it outside the video memory itself, as DISPLAY.SYS does.)

! Important : This version auto-selets VESA mode -d 5 for V6 games, if you
! don't have a VESA card (or SVGA + UNIVESA.EXE ) you must chose another
! display mode yourself via the command line. (It won't crash, it just won't
! work either if you don't.)

For the benefit of Palmtop users, a 40x25 text mode (-d 7) has been introduced.
Be aware that some games require a screen width of at least about 65 to display
some ASCII Art though, like the map in "Chistminter". Also some newer Inform
games won't center stuff correctly on anything but an 80 character line.

Apart from that, you can now set the border (overscan) color on EGA or better
cards to something else than black, however the color number for this follows
the EGA 0 to 63 scheme, not the PC or Z-machine scheme which have less colors.
Just experiment a little, for example -E 15 will give a nice light blue that
goes well with black or dark blue text on a white background.
Bear in mind that the DAC registers are modified when you use MCGA or VESA
modes, so the border color will probably look differently then.

The highlighting color has been changed from dark gray to light gray if the
text color is black, as otherwise it is not noticable on a white screen.

Finally, the Mixer of the so-called fully compatible Soundblaster 16 is now
correctly supported, which releases Lurking and Sherlock from their long
silence.

Oh, and post-finally we now use DOS instead of the bios to read the keyboard,
which gives POWER.EXE and the Linux (and probably other systems' as well) time
sharing system a chance to get some system time back for their own purposes.
(Note I am talking of dosemu within Linux, this is not a Linux FROTZ version.)

Another addition in the third Release: there will be no MORE prompt in a line
where a normal ">" prompt is going to appear, since nothing is really scrolled
in this case. The effect can be seen for example on the first screenfull of
"A Mind Forever Voyaging." 

In accordance with Infocom's own interpreters for V1-5 games, we now treat
question marks as spaces in the player's input. Now you can finally ask
Zork I: "what is a grue ?" without being rewarded with "I don't know the word
'?'". Since this addition is not specified in the Standard 0.2 there is a
command line option to override it. (-q)

Also there is a new option (-s) to allow a prog to write into static memory.
Some buggy programs like the version of "Delusions" originally entered into the
1996 IF Competition do so. Be aware that SAVE/RESTORE are not guaranteed to
work correctly if this option is active (though they usually will.)


A Question: It appears that in "Shogun" the prompt at the end of each scene
doesn't work right except in MCGA and VESA-MCGA mode. However, Frotz-Unix shows
the same problem (in Text mode naturally) so I guess it is not my fault, maybe
a bug in "Shogun" itself.  Does anybody know ?

I hope that somebody will find these little additions helpful.


The rest of this archive includes:

1.)  FROTZ.EXE, compiled with BORLAND C++ 2.0, strictly 8086/88 Instructions.
     It is speed optimized as that might help on a PC/XT or slow AT.

2.) FROTZ.DIFF, a Unix-ish unified diff between the old and new code, which
    helps to identify where the changes occur and saves me from uploading
    the whole sourcecode (and you from downloading it ;)

[3.) UNIVESA.EXE, a universal SVGA VESA-bios TSR driver for older SVGA cards
     without onboard VESA functions. I removed it as I guess it isn't legal to
     distribute it after all. It's on the Masterpieces CD in the directory
     \ACRODOS\VESA\UNIVESA.EXE ]

4.) play.bat a short batch file to start the games in my personal favorite
    configuration. Please ignore if you don't like it.

5.) A few nice fonts for the games, freeware 1993 by Tim Sneath. They are
    activated automatically from play.bat, but you must have DISPLAY.SYS
    installed to do so. Put the line
    DEVICEHIGH=C:\DOS\DISPLAY.SYS CON=(EGA,437,(1,1))
    into your config.sys if it's not already in there.


Release history:

First Release:  It mostly works.

Second Release: Fixes the above-mentioned "spurious pixels" and  
                "text-background-sometimes-wrong" bugs.
		UNIVESA.EXE removed due to copyright considerations.
		No more known bugs, if you find any be sure to mail me.

Third Release:  Improved compatibility to VESA standard. Allow 640x480 mode
		if 640x400 is unavailable. No unnecessary MORE prompts.
		Allow 40 characters/line. Better commented code, although
		it also got a bit messier ;)
		


Legal status:	Do with this code what you want, however (as usually) there
		isn't any warranty. If you modify it, your name must appear
		in the INFORMATION that is printed when there are no
		command line parameters.
		In case Stefan Jokisch should tell you to stop using and/or
		distributing the code for some reason, you must do so. 
		He wrote it in the first place after all.



Comments/complaints please to:  Linards Ticmanis,

ticmani@reze-1.rz.rwth-aachen.de

PLEASE DON'T BUG STEFAN ABOUT THIS CODE !!  THE ADDITIONS AR MY FAULT ;)



P.S.: Let's all send Stefan a postcard to help him a bit through his civil
      service year (They actually took him away from the University, ain't that
      a shame ?)
