ZDOOM v1.12
07 Apr 1998 (second release)

Randy Heit (rheit@usa.net)


Contents

  1. Introduction
1-1. Whats new in 1.12?
1-2. Installing Zdoom

  2. Command line arguments

  3. Configuring Zdoom
3-1. The Configure Controls menu
3-2. Changing settings not found in a menu

  4. The Console
4-1. Activating the console
4-2. Using the console

  5. Key bindings

  6. Playing a network game

  7. Known bugs

  8. Credits


1. Introduction
===============

ZDoom is an enhanced port of the official DOOM source code to Win32. As such, it 
not only works with Windows 95/NT 4.0, but it also adds new features not found 
in the version published by id Software. 

As of this writing, I am aware of one other DOOM port for Win32 that is still 
being maintained. This is Bruce Lewis WinDoom. However, the only new feature it 
adds to DOOM is a console, and it does not work with Windows NT. DOOM Legacy, 
DOSDoom, and Boom are all very good enhanced ports for DOS, but in my opinion 
they share one very big shortcoming: They use Allegro for their sound support. 
Allegro doesnt recognize my sound card (a GUS PnP), so I cant get any sound 
from them.

ZDoom may be used and distributed free of charge. No profit may be made from the 
sale of it. These are terms set forth by both the Doom Source Code license and 
the MIDAS Digital Audio System license.


1-1. Whats new in 1.12?
========================

-Some visual enhancements were made such as centering the menus and drawing 
borders around the status bar in higher resolutions.
-Console commands can now be specified on the command line.
-Removed some of DOOM's limits such as VisPlanes, VisSprites, and 2S HOM.
-Rewrote some of the inner loops in assembly. (There was some assembly in 1.11, 
but it never got used.)
-New cvars relating to mouse movement. (invertmouse, m_pitch, m_yaw, etc.)
-Mouse movement doesn't get sluggish in high resolutions.
-Automap colors are customizable.
-Automap overlay and rotation are available.
-Eight crosshairs.
-Shoot up/down.
-Alt-Tab and Pause work properly on all machines now.
-The +jump command now works.
-25% and 75% translucency levels in addition to 50%. The translucency tables now 
get saved to disk, too, so they only need to be calculated once instead of every 
time the game is run.
-The console font is now editable.
-Near complete support for DeHackEd patches. (Only monster infighting and 
changing a few minor text strings are not supported.)
-Sky height and position is now fixed for high resolutions. (It still wraps if 
you look up, but at least now if you look straight ahead, it never will.)
-Weapon sprite is always drawn at the correct location. (It was being drawn too 
low in some resolutions like 400x300.)
-New options menu, which includes a key configuration screen.
-"Stealth" monsters.
-New full-screen HUD.
-And a few other things not worth mentioning separately.


1-2. Installing ZDoom
=====================

To use ZDoom, unzip both zdoom.exe and zdoom.wad into your existing Doom 
directory. (You must already have an existing copy of Doom to use this program.) 
If nothing else, you need to download the shareware Doom, which is available in 
several places on the Net. To truly take advantage of Zdoom, though you need the 
full game. The Depths of Doom Trilogy can be had fairly cheaply and includes 
Ultimate Doom, Doom II, and The Master Levels for Doom II.

ZDoom also requires Microsofts DirectX 3 or later. If you are using Windows 95, 
you can download the latest version from Microsofts website at 
http://www.microsoft.com/directx. If you are using Windows NT 4.0, it is 
included as part of Service Pack 3. (I dont know where to get this, but try 
searching Microsofts site.) 

**IMPORTANT**
If you already installed a previous version of ZDoom, some keys will no longer 
work properly after installing ZDoom 1.12 (specifically, F1-F11 and TAB). This 
is because the actions that were previously associated with these keys are now 
console commands and can be bound to any key. In ZDoom 1.11, they were hard-
coded and could not be changed. To use these keys again go to the console and 
type "binddefaults" without the quotes. This will assign all keys to their 
default bindings without changing the bindings for any keys without defaults.

If ZDoom 1.12 is the first version of Zdoom you have installed, you dont need 
to worry about this.


2. Command line arguments
=========================

Most command line arguments are the same as those from the original Doom, and 
you should refer to the documentation that came with it for those. Only the 
arguments new to ZDoom will be listed here.

-deh <patch.deh>
Loads and installs the specified DeHackEd patch. This must be a text patch; 
binary patches are not supported. (As far as I know, most patches are text 
patches so this shouldnt be too much of a problem.) Also, only patch format 6 
is known to be supported. Other formats may or may not work properly.

-gfixspr    \
-gfixflt    |
-gfixpat    |- Sprites-in-a-pwad bugfix (Thanks to Martin Howe)
-gfixsfp    |  See readme.sprites for more details.
-gignrot    |
-gfixall    /
See readme.sprites.

-heapsize <mb>
This is the size in megabytes of the zone memory managers heap. If set too low, 
problems will almost certainly arise. 6 megabytes is probably a reasonable 
minimum to use for this parameter, although ZDoom wont stop you from using 
something smaller like 0.5 megabytes.

-iwad <iwadfile.wad>
The IWAD file specified after this parameter will be used as the game IWAD file 
instead of the default one.

-net
Starts a network game. This is the same as WinDoom and the original Linux doom. 
See below about network games for more details.

-nommx
Disables MMX support. If your processor doesnt have MMX instructions, MMX 
support is automatically disabled even if you dont specify this parameter. 
Currently, disabling MMX will make no difference in performance in most 
situations. Once high and truecolor modes are supported, MMX ought to have much 
more of an impact on performance.

-nosound
Disables sound effects.

-notrans
Disables all translucency.
-primarysound
Forces MIDAS to use DirectSound's primary buffer for sound mixing. Can lower 
latency but can possibly introduce other problems.

-wavonly
Forces MIDAS to use the Windows wave device for sound instead of DirectSound.

-width <xxx> -height <yyy>
Specifies the desired resolution of the screen. If only one of -width or -height 
is specified, ZDoom will try to guess the other one based on a standard aspect 
ratio. If the specified resolution is not supported by your DirectDraw drivers, 
ZDoom will try various resolutions until it either finds one that works or gives 
up. To determine which resolutions ZDoom can use, use the vid_describemodes 
command from the console once you have started the game.

In addition to the above parameters, any console command can be included on the 
command line by preceding them with a +. If you wish to change a cvar in this 
manner, it is a *very* good idea to use the set command. This is because any set 
commands will be executed just after the config file is loaded, and all other 
commands are executed after every game subsystem has been initialized. For 
example, to turn on the framerate counter when you start ZDoom, use the command 
line:

zdoom +set vid_fps 1

instead of

zdoom +vid_fps 1

For a complete list of console commands and cvars, refer to the commands.txt 
file.


3. Configuring ZDoom
====================

Zdoom now includes a new options menu which can be used to set some of the 
games new options. A new control configuration menu is also included that can 
be used to easily assign some commands to different keys.


3-1. The Configure Controls menu
================================

This menu lists several controls and up to two keys assigned to that control. 
There may be more than two keys assigned to a control, but only two of them will 
be shown at a time. If there are no keys assigned to the given control, this 
will be indicated with ???.

To change the keys assigned to a control, use the up and down arrow keys to 
select the control you wish to change. To assign a new key to the control, press 
Enter and then the key you want to activate this control. If you decide you 
dont want to assign a new key to the control, press Escape. To remove all keys 
for the selected control, press Space instead of Enter.

To return to the Options menu, press Backspace.

This menu only lists a select few commands, but they are the ones that are most 
likely to be used during gameplay. To assign other commands to keys, you can use 
the bind command from the console.


3-2. Changing settings not found in a menu
==========================================

There are many settings (cvars) that arent listed in any menu. To change these 
you need to use the console (see section 4). For a complete list of these, refer 
to the commands.txt file.

Two important cvars that arent listed in a menu are am_usecustomcolors and 
autoaim. If you prefer the original Doom automap colors, you can use them 
instead of the new ones used by ZDoom by typing "am_usecustomcolors 0" in the 
console. If am_usecustomcolors is "1", you can also change the automap colors by 
setting the appropriate cvar. These all begin with "am_", so you can find them 
listed together in the commands.txt file. (Sorry, there is no menu for this 
yet.)

The autoaim cvar controls autoaiming. The larger the value of autoaim, the 
further your aim can be from an enemy vertically, and you will still hit it. A 
value of "20" will be sufficient to produce the original DOOM behavior of 
shooting anything whether youre aiming directly at it or not. Setting this to 
"0" will disable autoaiming entirely. The default value for this cvar is "5". 
**WARNING** Currently, everyone in a netgame must have autoaim set to the same 
value, or the game is likely to get out of sync. This should be fixed in the 
next release of ZDoom.


4. The Console
==============

ZDoom has a console very similar to Quake's. Almost all game settings and 
controls can be accessed from it. For a complete list of console commands and 
cvars, see the commands.txt file.


4-1. Activating the console
===========================

There are two ways to activate the console: From the Options menu, and with the 
toggleconsole command. The console can always be activated by selecting "Go to 
console" from the Options menu. While playing a game, pressing a key bound to 
the toggleconsole command can also activate the console. By default, this is the 
` key, but it can be changed to any key.


4-2. Using the console
======================

Using the console is fairly. Just type in commands and press Enter to execute 
them. To scroll around in the consoles text buffer, you can use the Page Up and 
Page Down keys. Pressing Shift-Page Up scrolls to the top of the buffer, while 
pressing Shift-Page Down scrolls to the bottom. Without pressing Shift, these 
keys will scroll one line at a time in the corresponding direction.

To deactivate the console, you can press either ` or Escape. This will also 
erase any text you might have been typing at the time.


5. Key bindings
===============

ZDoom now supports Quake-style controls as opposed to those of the original 
Doom. To bind a command to a key, use the bind command followed by the key to 
bind and the command(s) to bind to it. Multiple commands should be separated by 
semicolons (;) and if there are any spaces in the commands, they need to be 
enclosed in quotation marks (").

For example, to make the Page Up key cause the player to look up, use the 
command:

bind pgup +lookup

From now on, pressing Page Up will cause you to look up. Since this is also an 
action command (it begins with a '+'), releasing Page Up will also execute the 
-lookup command, which will cause you to stop looking up.

You can also refer to keys by scancodes instead of names. For instance,

bind #3 "echo I don't like my pistol."

and

bind 2 "echo I don't like my pistol."

will both do the same thing, since 3 is the scancode for the "2" key.

All key bindings are automatically saved in the config.cfg file when the game 
quits.

The following special keys as well as the alphanumeric keys are named and can be 
bound. These are the same keys displayed in the Configure Controls menu:

backspace
tab
enter
ctrl
shift
kp*		* on the numeric keypad
alt		Either the left or right Alt key
space
capslock
numlock
scroll		Scroll Lock
kp7		7 on the numeric keypad
kp8		8 on the numeric keypad
kp9		9 on the numeric keypad
kp-		- on the numeric keypad
kp4		4 on the numeric keypad
kp5		5 on the numeric keypad
kp6		6 on the numeric keypad
kp+		+ on the numeric keypad
kp1		1 on the numeric keypad
kp2		2 on the numeric keypad
kp3		3 on the numeric keypad
kp0		0 on the numeric keypad
kp.		. on the numeric keypad
kana
convert
noconvert
yen
kp=		= on some numeric keypads
circumflex
kanji
stop
ax
unlabeled
kp,		, on some numeric keypads
kp/		/ on the numeric keypad
sysrq
home
uparrow
pgup
leftarrow
rightarrow
end
downarrow
pgdn
ins
del
lwin		The left Windows key
rwin		The right Windows key
apps		The application menu key
pause		Pause (only limited support at this time)
mouse1		The left mouse button
mouse2		The right mouse button
mouse3		The middle mouse button
mouse4		A fourth mouse button for any mice that actually have one.
joy1 - joy32	All 32 joystick buttons supported by Windows.

Note that i_remapkeypad must be "0" for kp0, kp., kp1, kp2, kp3, kp4, kp6, kp7, 
kp8, and kp9 to be treated as distinct keys.


6. Playing a network game
=========================

Due to changes ZDoom has made to the message format of network games, you will 
definitely not be able to play a network game between zDoom and another Doom 
port unless someone else makes those same changes. Since zDoom uses the TCP/IP 
protocol for networking, it is possible to play a game on the Internet, although 
it probably won't play very well on anything other than a LAN.

The following has been copied directly from the WinDoom documentation with only 
minor modifications, since it has very good instructions on starting a network 
game:

  The parameter to start a network game is "-net" (without the quotes).  You 
  then follow the -net command with the player number your machine is going to 
  be (1 to 4) and the IP addresses or hostnames of the OTHER systems you will 
  be playing with. The IP addresses MUST be preceded by a period ".". If you 
  leave off the leading period, the game will think that the IP address is a 
  hostname and try to resolve it into an IP address (and die on you).

  Sample command lines for two players would look like this:

  machine 1: (hostname: rimmer IP address: 192.168.1.5)
  zdoom -net 1 holly -deathmatch -nomonsters
  OR
  zdoom -net 1 .192.168.1.4 -deathmatch -nomonsters

  machine 2: (hostname: holly IP address: 192.168.1.4)
  zdoom -net 2 rimmer -deathmatch -nomonsters
  OR
  zdoom -net 2 .192.168.1.5 -deathmatch -nomonsters

  In order to use hostnames rather than IP addresses you must either have DNS 
  setup or have a valid hosts file.

  If you add a third or fourth machine to the game you need to add the IP 
  addresses of the OTHER machines to the command line on each machine. You do 
  not put your own machine's IP address on the command line.  You also do not 
  put how many machines are in the game after the -net command.  Only which 
  player, out of the 4, you are.

  The player numbers must be contiguous.  You can't have players 1,2 and 4.  
  Also, one player MUST be player 1. Player 1 is the KEY player and that 
  machine coordinates all the other systems.

  The number of players in the game is determined by how many IP addresses you 
  put on the command line plus your machine.

  The command line on the KEY player's machine in a four player game might look 
  like this:

  zdoom -net 1 .192.168.1.3 .192.168.1.4 .192.168.1.5 -deathmatch -nomonsters
  OR
  zdoom -net 1 cat holly rimmer -deathmatch -nomonsters

  The other player's command lines in the same game might look like this:

  zdoom -net 2 lister holly rimmer -deathmatch -nomonsters
  OR
  zdoom -net 2 .192.168.1.2 .192.168.1.4 .192.168.1.5 -deathmatch -nomonsters

  zdoom -net 3 lister cat rimmer -deathmatch -nomonsters
  OR
  zdoom -net 3 .192.168.1.2 .192.168.1.3 .192.168.1.5 -deathmatch -nomonsters

  zdoom -net 4 lister cat holly -deathmatch -nomonsters
  OR
  zdoom -net 4 .192.168.1.2 .192.168.1.3 .192.168.1.4 -deathmatch -nomonsters


7. Known Bugs
=============

* I cant access the automap anymore! See Section 1-2 (Installing ZDoom) above.
  This is not a bug, but I imagine there are some people who wont bother to
  read about it if they don't find it here.
* Opening a key door that stays open removes the highlighting of the line used 
  in the automap. This is not really a bug, just an unimplemented feature.
* Keyboard control in NT 4.0 is sluggish, and the mouse is jerky. This may 
  just be a problem with NT that I can't easily get around, since the same 
  code works without any problems under 95.
* Demos from other versions of Doom can quickly get out of sync. I suspect 
  this is a Visual C++ bug, since the problem is worse with the release build 
  than it is with the debug build. It will, however, play it's own demos 
  properly, so I'm not really concerned about fixing this. If anyone else with 
  VC++ 5.0 can provide a fix for this, I will try and implement it, but I'm 
  not going to waste any more time personally on it.


8. Credits
==========
(in no particular order)

Doom was originally written by id Software and is still copyrighted by them. All 
I have done is make some changes to the source code that they generously 
released. If you like ZDoom and are among the few who dont already own Doom, 
please go out and buy it. If you have problems with ZDoom, please do *not* 
contact them, since they will not be able to help you and will probably get very 
upset if you ask them for help with it.

I have also used some of the functions from id's Quake2 source release in zDoom 
as well. Most of these are simple functions that just make my life easier as I 
add new features.

qmus2mid (C) 1995,96 Sebastien Bacquet (bacquet@iie.cnam.fr) was used to convert 
MUS lumps to MIDIs, since Windows can't play MUS files directly. I got the 
source for this from NTDOOM.

Keyboard, mouse, and joystick code is from Andy Bay's WinDoom port, although I 
have touched it so much in same places that portions of it no longer resemble 
his very much. I don't know where to get the latest version of his port, but you 
can try his homepage: http://members.aol.com/imarvintpa.

The MIDAS Digital Audio System 1.1.2 is used for all sound effects and MOD music 
and is copyright 1996,1997 Housemarque Inc. The latest version can be found at 
http://www.s2.org/midas/.

Most of the sound code was taken from NTDOOM by Peterri Kangaslampi with a few 
modifications to support my needs. I also borrowed the assembly inner-loop for 
the DrawSpan function from it. The latest version can be found at 
http://www.s2.org/ntdoom/.

Andy Baker developed the code for the stealth monsters. His homepage is at 
http://website.lineone.net/~acbaker and his e-mail address is 
acbaker@lineone.net.

DeHackEd was written by Greg Lewis, and its source code was used to get the 
DeHackEd support working properly.

The sprites, flats, and patches fix was written by Martin Howe and borrowed from
DOSDoom.

The instructions for starting a netgame are from WinDoom by Bruce Lewis, the 
latest version of which can be found at http://www.frag.com/doom/. I also used 
his MIDI code as an example to write my own.

DOSDoom was used for some ideas, although very little code was actually borrowed 
from it. Its homepage is at http://www.frag.com/dosdoom/.

Doom Legacy by Fab and Boris was used to provide some guidance as I worked on 
getting the look up/down and aspect ratio correction code working properly. It
can be found at http://www.frag.com/doomlegacy/. 
