*BSD News Article 35947


Return to BSD News archive

Newsgroups: comp.os.386bsd.questions
Path: sserve!newshost.anu.edu.au!harbinger.cc.monash.edu.au!msuinfo!agate!darkstar.UCSC.EDU!news.hal.COM!decwrl!netcomsv!netcom.com!hasty
From: hasty@netcom.com (Amancio Hasty Jr)
Subject: Want to port DOOM ?
Message-ID: <hastyCwCC33.1s8@netcom.com>
Keywords: DOOM
Organization: Netcom Online Communications Services (408-241-9760 login: guest)
Distribution: comp.os.386bsd.questions
Date: Sun, 18 Sep 1994 19:42:39 GMT
Lines: 577


It appears that the easiest way for us to get DOOM to run under FREEBSD
is to for a qualified individual to  sign a NDA agreement with ID
and port DOOM to FreeBSD. I will no do it because I want to leave
the door open for writing a 3D game. If anyone does decide to port
DOOM to FreeBSD, I will more than happy to provide support for sound,
X, OS, etc...

Here is a repost of  QNX's DOOM and FAQ 

	Enjoy,
	Amancio

------------------------------------------------------------------------
The DOOMstone Benchmark

As a realtime OS vendor, QNX Software Systems recognizes that the 
performance of an OS is relevant to applications hosted on that OS.  In 
order to assist realtime application developers with the selection of an 
OS, benchmarking tools are routinely used to measure the performance of the 
OS.  A benchmark that has recently become increasingly significant is the 
DOOMstone.  In order to facilitate the use of this important benchmark 
during performance evaluations of QNX, we are pleased to announce that a 
native port of DOOM to QNX is now available.  This port runs both on the 
VGA console and under the QNX X Window system and is compiled to support 
Pentium-optimization with the Watcom C compiler.  QNX DOOM supports sound 
effects, music, and multiplayer use through network connections, utilizing 
realtime IPC to preserve the video/audio synchronization so important to 
"virtual reality" environments.

DOOM for QNX is available for anonymous ftp from quics.qnx.com.  The files 
needed to install and run DOOM on QNX are:

  /usr/free/doom/qnxdoom.pax.gz - Console and X versions of QNX DOOM
  /usr/free/doom/doom1.wad.gz   - DOOM v1.666 wad file
  /usr/free/doom/qnxdoom.faq    - Installation instructions and other details

We're very grateful to id Software for their support in this important 
matter.

:-)



QNX DOOM v1.666 FAQ
*******************

Version 1.02
September 16, 1994 

Table of Contents
=================

    1. What is DOOM? 
    2. What is QNX?
    3. Where can I get DOOM for QNX? 
    4. QNX DOOM Installation
    5. How do I get sound working under QNX?
    6. How do I run Multi-Player mode under QNX?
    7. It doesn't work!  (Machine/OS Requirements, troubleshooting, etc)
         7.1. It gives an X error in X_CreateWindow! 
         7.2. The window is too small! 
         7.3. Why can't I use the mouse under X? 
    8. Can I run DOOM on one machine and display it on another? 
    9. Can you play SGI vs QNX?  Console Doom vs. X Doom?
    10. Where does it put the configuration file and saved games?
    11. How do I get the other levels? 
    12. How do I register? 
    13. I need to ask id Software a question. 
    14. What are the cheat codes? the secret doors? 
    15. Where is DOOM information on the net? 
    16. Are there DOOM utilities for QNX? 
    17. About this FAQ 


1. What is DOOM?
================

Basically, Doom is a (violent) 3D arcade game where you run around in a 
maze and kill things with shotguns and chainsaws. The 3D action is good 
enough to make some people nauseous, if the animated gore wasn't enough. 
There is a slim plot, if you care about those things. After you get tired 
of killing things, you can run it over a network and kill things together 
with your friends. After you get tired of that, you can kill your friends. 
See the huge faq file that was included in this archive for more details 
(dmfaq58.txt).

DOOM was originally written for MSDOS on the PC by id Software. It was 
tremendously successful because:

   1) Everybody was amazed you could do that on a PC
   2) A playable portion was available as shareware
   3) It was user-extensible
   4) You could play against other people via network or modem dialup
   5) It was an extremely fun game

SGI loaned David Taylor of id Software an Indy workstation and he ported it 
to UNIX and the X Window system.  id Software made this source available to 
us (QNX Software Systems), and we ported the X version to QNX, and also 
ported the direct console code as well to create both X and console 
versions of DOOM for QNX.  Both versions support both TCP/IP and POSIX 
message queues across the QNX LAN for multiplayer, networked games.

Thanks to the excellent job David Taylor at id Software did on the SGI 
port, we had the X Window version running on QNX 40 minutes after unpacking 
the source, and the sound effects working 30 minutes later.  Networking, 
console support, mouse support, and other features took another weekend or 
two.  :-)    Many thanks to Dave Taylor and the rest of the team at id for 
answering the questions we had.

A note:  We (QNX Software Systems Ltd.) did this for fun.  It doesn't 
generate revenue.  Please don't bother our QA group with bug reports.  :-)

2. What is QNX?
===============

QNX is a realtime, POSIX-certified, microkernel, network-distributed OS for 
x86-based machines.  It has the ability to merge a number of QNX machines 
on a network into a single, logical machine and also supports multiple, 
fault tolerant LAN links between nodes.  QNX can be scaled down to a small, 
stand-alone, ROM-based embedded system, or scaled up to a full X Window, 
TCP/IP, NFS, etc. equipped workstation OS, or scaled out to encompass 
several hundred nodes on a network acting as a single machine.  QNX sees 
significant use in applications such as process control, factory 
automation, financial transaction processing, point of sale, medical 
instrumentation and data communications.  It now supports DOOM as well. :-)

For technical information, some QNX papers can be ftp'ed from 
quics.qnx.com:/pub/papers (198.231.78.1) and ftp.cse.ucsc.edu:/pub/qnx 
(128.114.134.19). Some of the papers are:

   qnx-paper.ps.Z  An Architectural Overview of QNX
   qnx-embed.ps.Z  A Microkernel POSIX OS for Realtime Embedded Systems
   qnx-pen.ps.Z    QNX: Microkernel Technology for Open Systems Handheld Computing
   newtech.ps.Z    QNX Microkernel Technology: A Scalable Approach to Realtime
                      Distributed and Embedded Systems
   xhib.ps.Z       Efficient X Server Connections in a Realtime Message-
                      Passing Environment

Additional information can be obtained by sending email to info@qnx.com or
by contacting QNX Software Systems at 1-613-591-0931.


3. Where can I get DOOM for QNX?
================================

You can get the QNX version of DOOM via anonymous ftp from Quics (the QNX 
User's Interactive Conferencing System).  The ftp path is:

   quics.qnx.com:/usr/free/doom/qnxdoom.pax.gz

   --or--

   ftp://ftp.caprica.com/pub/qnx/doom/

You can also dial into 1-613-591-0934 to download this file.  The file(s) 
will probably appear on other ftp sites as well.  Note that this pax file does 
not contain the DOOM v1.666 shareware wad file.  If you don't already have 
the DOOM wadfile, you can download it as:

   quics.qnx.com:/usr/free/doom/doom1.wad.gz

or from ftp.caprica.com as well.  While connected to our ftp server, you 
might also want to get copies of the following:

    /usr/free/archivers/gzip: The archiver needed to unzip the doom files.
    /updates/qnx42/mqueue.tar.F: A POSIX realtime message queue manager.  
                                 Needed for network games if you don't have
                                 QNX TCP/IP installed.

4. QNX DOOM Installation
========================

Once you have the qnxdoom.pax.gz and doom1.wad.gz files, create a /usr/doom 
directory, put the doom files there and execute the commands:

             gzip -d <qnxdoom.pax.gz | pax -rv
             gzip -d doom1.wad.gz

These commands will decompress the files into your /usr/doom directory.  
Make sure that the cdoom and musserver files are owned by root, and setuid. 
By executing these commands, as root userid, you can make sure of the file 
permissions:

chown root /usr/doom/cdoom /usr/doom/musserver
chmod u+s /usr/doom/cdoom /usr/doom/musserver

You probably also want to move the "/usr/doom/doom" shell script into 
/usr/local/bin so that you can invoke doom from your user directory without 
modifying your path.

Final step: Read the qnxdoom.faq (which you're reading right now).

After unzipping the qnxdoom.tar.gz archive into /usr/doom, the following 
files will be present:

cdoom - A version of doom which runs directly on a QNX console. Do not run 
        this version under a windowing system. Both keyboard and mouse 
        input are supported. You need to be running the Mouse driver for 
        mouse input.  The joystick is not supported. This program must
        be setuid to root or run as root since it hits hardware ports
        on the VGA like crazy.

xdoom - A version of doom which runs under the X Window system. Keyboard
        support is supported by default, and with the -grabmouse option,
        the mouse is "stolen" from X for use by DOOM.

doom -  A shell script used to start DOOM.  It will recognize which 
        environment you're running in (text mode at the console or X) and 
        automatically launch the correct version of DOOM.  You may wish to 
        move this shell script into /usr/local/bin, or some other directory 
        in your $PATH.  Once installed, just type "doom" and have fun!

sndserver - Required for sound effects. The sound server makes use of the 
			QNX Audio manager, which is currently in beta test.  The 
			sndserver process is started by doom automatically. NOTE: The 
			game may slow down if there are lots of sounds active at once. 
			Updating to Proc32.421H or later will fix this. Don't ask why, 
			its a secret and DOOM is the first test of it.

musserver - Required for music. The sound server makes use of the QNX Audio 
			manager, which is currently in beta test.  The musserver 
			process is started by doom automatically. Note that this 
			program will try and set your tick size to 1 msec if it is 
			slower than this. This program is setuid to root to 
			successfully do this.

Audio     - The sound manager needed to hear music and sound effects. This 
			may not be redistributed or used for any purpose other than 
			playing doom. See the Audio.readme for more information.

doom1.wad - The shareware version of the datafile. It contains level one of 
			the game. The cdoom and xdoom executables look for this file in 
			/usr/doom. You can override this by setting the DOOMWADDIR 
			environment variable to point at another directory.  If you've 
			purchased the registered version of DOOM, you can install it on 
			QNX using Rundos (or on a native-DOS machine) and copy the 
			doom.wad from that installation into your /usr/doom directory. 
			DOOM will automatically switch to using the registered doom.wad 
			if it detects it.  In the same manner, if you've purchased the 
			commercial release of DOOM (DOOM2), you can copy the doom2.wad 
			file into your /usr/doom directory to have it be automatically 
			used instead of the shareware or registered versions.

qnxdoom.faq - This file.

manual.txt - The command line options for the doom program, and a list of
             the cheat keys.

readme.txt - The documentation for how to play DOOM, and an introductory
             description of the DOOM scenario.  This text comes from the
             README.EXE file in the DOS shareware version.

dmfaq58.txt - The frequently asked questions about DOOM posted to the 
              internet. This file has not been edited for QNX so it may say 
              things which don't necessarily apply to QNX.

order.frm -  The order form for purchasing the registered version from id 
             Software.

5. How do I get sound working under QNX?
========================================

To truly appreciate DOOM you will want a sound card supported by the QNX 
audio manager.  The Audio manager should be started before running doom.  
For example:

  Audio sb -b 0x220 -i 7 -d 1 &    Sound Blaster on port 220, interrupt 7
                                   using DMA channel 1.

We have included an alpha of the Audio manager with doom. If you wish to 
develope your own audio applications you will need to join the beta program 
for Audio.

Note that QNX DOOM does not support the PC speaker for sound effects - 
sound effects will only be generated on a PC sound card.  Unlike the LINUX 
or SGI port of DOOM, which only support sound effects, QNX DOOM (just like 
the DOS version) also supports music. The doom engine will start up 
sndserver and musserver to handle sound effects and music, respectively. 
The sound server outputs to /dev/dsp and the music server converts an 
internal MUS format into midi which is passed to /dev/fm.  You will need 
the QNX Audio driver which accepts midi sequences on /dev/fm (obtainable on 
Quics). If you don't hear anything, you probably need a newer Audio 
manager. You can pass -midi as an argument to doom which will cause 
musserver to open /dev/midi instead of /dev/fm. If you have two machines 
physically adjacent on the network, one with a Sound Blaster and one with a 
Roland SCC-1, you can pass an argument to -midi to force it to open a midi 
port on a remote machine. For example, "-midi //8/dev/midi" will open a 
midi port on node 8 (this is routine QNX network transparency).  Note that 
our handling of the midi music may not be quite 100% yet, so if the music 
bugs you, you can disable it with -nomusic. If you want to know if the 
Audio manager supports your soundcard, type "use Audio".

6. How do I run Multi-Player mode under QNX?
============================================

QNX DOOM will support up to 4 players on the network. Multiple independant 
games may be active on the network at the same time. Although early 
versions of DOOM have a reputation for consuming a lot of network bandwidth 
due to the use of broadcast packets, current versions of DOOM are no longer 
"network hungry" and use direct node-to-node packet transmission. DOOM's 
network bandwidth requirements are quite modest.

The two forms of networking supported by DOOM under QNX are TCP/IP and 
POSIX 1003.1b (formerly 1003.4) message queues. For more than two players 
you will see better performance using TCP/IP, since DOOM was designed for a 
non-blocking, non-reliable transport protocol (UDP). The mqueue support is 
a quick hack for those who do not have the QNX TCP/IP. Modem support is not 
available, nor is it planned.

To play a network game, one player assumes the role of master and defines, 
via command line arguments, the level to be played and the degree of 
nastyness for the bad guys. Everyone else will slave to these settings as 
they connect to the master. Once everyone is synchronized, peer-to-peer 
play begins. To start a network game you provide one of two arguments to 
doom.

doom -net player# hostname ...               <-- Use TCP/IP 

doom -mqueue player# nid ...                 <-- Use POSIX message queues

Where player# may be 1 to 4, player 1 being the master.  Everyone should 
agree on different player#'s and you should pack them, ie: if there are 
only 2 players make them 1 and 2, not 1 and 3.  For example, assume a 3 
player game with nodes 1, 4 and 7 with hosts names of node1, node4 and 
node7.  To use TCP/IP networking, each player would enter:

 On node 1             On node 4             On node 7
 -net 1 node4 node7    -net 2 node1 node7    -net 3 node1 node4

For POSIX message queue networking, they would enter:

 -mqueue 1 4 7         -mqueue 2 1 7         -mqueue 3 1 4

Note that each node participating will have to be running either 
Socket/Socklet for TCP/IP, or mqueue for message queues.

Perhaps someone will write a nice interactive program to allow multiple 
users to join a game via a simple interface which figures all this out and 
invokes DOOM for you.

7. It doesn't work!  (Machine/OS Requirements, troubleshooting, etc)
====================================================================

7.1. It gives an X error in X_CreateWindow! 

Your Xserver is probably running in TrueColor mode. It should be running in 
PseudoColor mode. Check /usr/lib/X11/Metro/Xconfig.<nodenumber> or use the 
command xdpyinfo to see. If it is, restart your Xserver in PseudoColor mode 
(8 bits/pixel).

7.2. The window is too small! 

The X version supports -2 and -3 options to double and triple the screen 
size.  Note that our X Window product is currently in beta and does not yet 
support the MIT shared memory extensions.  As a result, the display update 
rate will drop significantly as you enable doubling and tripling.  Once 
we've implemented the MIT shared memory extensions, the performance of DOOM 
under our X will improve.  For the best screen update rate, run the console 
version (cdoom).

7.3. Why can't I use the mouse under X? 

To use the mouse with the X version of DOOM you must specify the -grabmouse
command line option to DOOM.  With this option in effect, X will no longer
have control of the mouse, so you'll have to use the keyboard to exit from
DOOM (Escape key) and pass mouse control back to X.

8. Can I run DOOM under X on one machine and display it on another?
===================================================================

Yes, but you may not want to.  Depending on your network speed, it will 
probably be much slower, and unless you're careful, the console of the 
originating machine will thunder with gunfire and screams :-).

Then again, if you're running with 100 Mbit FDDI or TCNS between your QNX 
machines, or running a couple processors in a Ziatech STD32 card cage 
(which uses the backplane bus as the inter-processor LAN), the network 
between the machines may not slow you down at all.

9. Can you play SGI vs QNX?  Console Doom vs. X Doom?
=====================================================

Probably - the data format of the packets should be compatible.  Both the 
console and X version implement both TCP/IP and POSIX message queues, so 
they should be able to inter-operate as well.

10. Where does QNX DOOM put the configuration file and saved games?
===================================================================

When you run DOOM it will create a .doom directory in your home directory 
($HOME/.doom). You must have a $HOME environment variable set (which is 
usually created for you by default). The configuration file is called 
.doomrc.

11. How do I get the other levels?
==================================

You first need a registered version of DOOM. Buy the DOS version of DOOM 
(see below).  The QNX DOOM engine is version 1.666, make sure that the 
commercial version you're buying is also v1.666.

The registration magic is inside the new, 10 Mbyte doom.wad file you'll 
get. Install the new version with Rundos and Dosfsys (or under DOS), and 
then copy the doom.wad file from your DOS partition into your /usr/doom 
directory. When the DOOM executable sees the doom.wad file, it will 
automatically use it instead of the shareware doom1.wad file.  Once you've 
bought the commercial DOOM 2 release, you can copy the doom2.wad file into 
the /usr/doom directory as well.

Having the registered version also enables features like the -file argument 
to use the incredible variety of homemade wad (PWAD) files.  When DOOM runs 
these wad files, it does so by first loading the registered wad file, and 
then "overloading" it with the additional components defined by the 
after-market wad files.

12. How do I register?
======================

It costs $40 to register DOOM. From the README:

To register the entire DOOM trilogy call 1-800-IDGAMES. If you live outside 
of the USA, or if you wish to purchase DOOM with a check or money order 
please refer to the text file, (ORDER.FRM) located in your DOOM directory. 

If you don't have an ORDER.FRM, download a DOS shareware version to get 
one.

13. I need to ask id Software a question.
=========================================

Please don't mail them bug reports or ask for help about the QNX version.  
That's why this FAQ exists.  If the answer to your question is not here, 
post to alt.games.doom and then email me the answer so I can include it in 
this file.

If you want release information, try "finger help@idsoftware.com". If you 
must ask them a question about the DOS version, their email address is 
help@idsoftware.com.

14. What are the cheat codes? the secret doors?
===============================================

They are all the same as the DOS version. See the manual.txt file in the
QNX distribution.

15. Where is DOOM information on the net?
=========================================

    o WWW sites 
       o Original Unofficial Doom Site (VHhold's DOOM Web Node) 
       o Pherion's DOOM Web Node 
       o Sven's DOOM Web Node 
       o Tim's DOOM Web Node 
       o Piotr's Doom Web Node 
       o DOOM Home Page 
    o finger help@idsoftware.com for the latest on DOOM releases 
    o alt.games.doom, alt.games.doom.newplayers, alt.games.doom.announce,
        alt.binaries.doom 
    o anonymous ftp. The main ftp site is
      ftp://infant2.sphs.indiana.edu/pub/doom (also fsp, port 21);
      infant2 is mirrored at ftp.uwp.edu, ftp.orst.edu,
      ftp.uni-erlangen.de, and aurora.bld189.jccbi.gov; other sites
      are ftp.uwp.edu/pub/games/id, ftp.uml.edu/msdos/Games/ID, and
      wuarchive.wustl.edu/pub/MSDOS_UPLOADS/games/doomstuff
    o A huge FAQ is available.  Excerpted from the FAQ: 

         The "Official" DOOM FAQ is posted every two weeks (or earlier
      if a new version is released) on the following Usenet groups.
              (1) comp.sys.ibm.pc.games.action
              (2) comp.sys.ibm.pc.games.announce
              (3) comp.sys.ibm.pc.games.misc
              (4) alt.games.doom
         The "Subject:" line of the post will be "'Official' DOOM FAQ v??.??"
      where "??.??" is the version number of the FAQ.
         New releases of the "Official" DOOM FAQ are uploaded to the
      following Internet FTP sites.
              (1) ftp.uwp.edu              IN /pub/incoming/id
                                           IN /pub/msdos/games/id/home-brew/doom
              (2) infant2.sphs.indiana.edu IN /pub/doom/incoming
                                           IN /pub/doom/text
              (3) wuarchive.wustl.edu      IN /pub/MSDOS_UPLOADS/games/doomstuff
         The file name of the upload will be "doom??.faq" where "??" is the
      version number of the FAQ.

16. Are there DOOM utilities for QNX?
=====================================

Obviously, you can't use any patches for DOS on your QNX executable. You 
can use people's homemade wad files once you own a registered copy of DOOM. 
Since a LINUX port of DOOM is now out, many of the wad editors, etc., are 
being ported to LINUX, so QNX ports will be easy. Look around the ftp 
sites; some of the utilities may come with code; port them yourself and 
then announce them! 

A UNIX port of id's BSP node builder (which is a port of Ron Rossbach's 
port to DOS) is available via anonymous ftp from ftp.isy.liu.se in 
/pub/colour/doom/bsp_unix.tar.Z In the same directory there's also 
wadgc.zip which contains some other UNIX programs for editing DOOM .WAD 
files.  These should probably port to QNX without much effort.

A DOOM map editor which has been ported to Linux is DEU 5.21.  It was 
ported by Brad Hawthorne (u9c192@ugrad.cs.ubc.ca) and Sam Lantinga 
(slouken@cs.ucdavis.edu).  Here's part of a posting by Raphael Quinet 
(eedraq@chapelle.ericsson.se or quinet@montefiore.ulg.ac.be):

>I strongly suggest that you get the original (DOS) version of DEU 5.21 too.
>Only the original version contains the demo WADs, the tutorial and full docs.
>This has been done in order to save downloading time for experienced DEU users
>who already have the demos from the original version.
>
>- The two official sites for distribution of DEU are:
>   * infant2.sphs.indiana.edu (Indiana, USA) in /pub/doom/deu
>   * ftp2.montefiore.ulg.ac.be (Belgium) in /pub/doom/deu
>   * ftp.uwp.edu (Wisconsin, USA) in /pub/games/id/home-brew/doom/deu
>   * ftp.cdrom.com (California, USA) in /pub/doom/deu
>   * ftp.iglou.com (Kentucky, USA) in doom/deu
>   * ftp.uni-erlangen.de (Germany) in /pub/pc/msdos/games/ID/doom-stuff/deu
>   * nctuccca.edu.tw (Taiwan) in /PC/games/doom/deu
>   * ftp.luth.se (Sweden) in /pub/msdos/games/doom/deu
> There is also an experimental Linux site which distributes the Linux version
> of DEU (but you will have to connect to the other sites to get the original
> version with docs and demos):
>  * dewdrop.water.ca.gov (USA) in /pub/doom/deu-linux
>
>- The names of the files containing the Linux version of DEU are:
>   * deu521linux.txt         - informations about this version of DEU
>   * deu521linux.src.tgz     - the sources of the program
>   * deu521linux.bin.tgz     - the pre-compiled program and libraries
>
>- If you don't know how to extract the files from a ".tgz" or ".tar.gz" file,
>  here is how:
>     gunzip -c deu521linux.src.tgz | tar -xvf -  (using standard tar)
>  or:
>     tar -xzvf deu521linux.src.tgz               (using GNU tar)
>  If you only want to see what is in the archive before unpacking the files,
>  just replace "tar -xvf -" by "tar -tvf -".
>  Of course, this assumes that you have a working UN*X system...


17. About this FAQ
==================

This is a frequently-asked questions file for the QNX version of the game 
DOOM, originally written for DOS by id Software.  We (QNX) have put this 
together as a service since id offers no technical support on this port. 

Much of the information in this FAQ comes from the excellent SGI faq by 
John Troyer <troyer@cgl.ucsf.edu>.  Here's a quote from his FAQ:

"Some of this information is from the net.  Unfortunately I didn't save 
people's names. If you feel you should be credited for some piece of 
information, or would like to be listed here in the acknowledgements, just 
email me and I'll add you.  Among many others, thanks to Lan Dang, Sean 
Langston, Bill Lorton, Robert Teller, Patrick Tufts, and T.J. Kelly and the 
DOOMWeb guys."

You can mail me, Dan Hildebrand, at danh@qnx.com. Corrections and 
suggestions appreciated.

Dan Hildebrand <danh@qnx.com>


-- 
Dan Hildebrand      danh@qnx.com         QNX Software Systems, Ltd.   
phone: (613) 591-0931 x204 (voice)       175 Terence Matthews          
       (613) 591-3579      (fax)         Kanata, Ontario, Canada K2M 1W8





-- 
FREE unix, gcc, tcp/ip, X, open-look, netaudio,  tcl/tk, MIME, 
midi,sound at  freebsd.cdrom.com:/pub/FreeBSD
	Amancio Hasty,  Consultant 
	Home: (415) 495-3046       
	e-mail hasty@netcom.com