LPmud for MS-DOS 3.1.2 COMPAT_MODE and non-COMPAT_MODE
======================================================

The following file was written by Werner Almesberger for LPmud 3.0.45, 
MSDOS version. Since then, there has been 9 upgrades of LPmud and this is
the latest one for the moment. Since this file explains most of the things
you need to know about when setting up LPmud on your 386/486, I included it
instead of writing my own. After all, I'm using most of the rewrites Werner
used... 8-) Comments made by me in the text below are proceeded by '*'es...
You shouldn't really have to read any other file than \lpmud\doc\readme.1st
though....


--------------- FILE FROM WERNERN ALMESBERGER FOLLOWS -----------------

README of LPmud (3.0.45) for MS-DOS 
===================================

Overview
--------

LPmud for MS-DOS is a version of LPmud 3.0 which has been modified to run
on 386/486-based MS-DOS machines. It has been compiled with DJ Delorie's
excellent port of GNU C++. Sessions on up to ten virtual consoles and both
"standard" serial lines are supported.
*
* This version (3.1.2, COMPAT_MODE & non-COMPAT_MODE) are also compiled with
* DJ Delorie's GCC port.
*

Restrictions
------------

File names have to obey MS-DOS naming conventions. A tool is provided to
convert UNIX MUDLIBs to MS-DOS.

Text files which contain CRs aren't processed correctly. CRLFs are okay.
(This is because of a bug which is burried deep in the run-time library of
the compiler.)

Objects which contain the character RS (30dec) aren't processed correctly.
(This is to work around the CR bug.)

Virtual consoles run synchronously to the game. This means that long
computations (e.g. compilation of a larger object) will cause noticable
delays in input processing.

There is no network support, sorry.

Encrypted passwords are different on UNIX and MS-DOS.


Documentation files
-------------------

  CHANGES    describes all changes to the original LPmud 3.0.45
*
* Not included.
*
  BUILDING   contains a step by step description of what is needed to
             recompile LPmud on MS-DOS
*
* Not included.
*
  README     (this file) describes how to set up an LPmud on MS-DOS


Requirements
------------

LPmud for MS-DOS *requires* a 386SX, 386DX, 486SX, 487SX or 486 CPU.
Anything less than a 386 won't do - don't bother trying.

Memory shouldn't be critical because LPmud can page to disk (and the game
driver implements swapping of unused objects as well), but performance will
drop considerably if LPmud has to page excessively.

You should have about 1 MB of free disk space for LPmud binaries and
support files, at least 1 MB for page/swap files (more if your MUDLIB is
large) and as much space as you need for your MUDLIB.


Installation
------------

CONFIG.SYS and AUTOEXEC.BAT should be stripped down as much as possible.
Especially memory managers, RAM disks, disk caches, FPU emulators and other
programs which use special 386/486 features should be avoided. (QEMM and
VDISK should work, but this hasn't been tested.) It's a good idea to main-
tain two sets of config/autoexec files: one with all your TSRs for normal
operation and one which gives the 'raw' machine to LPmud.

The only programs that really should go into AUTOEXEC.BAT are DOS' file
sharing support SHARE.EXE, the serial communication drivers (see below) and
possibly keyboard and disk drivers.

AUTOEXEC.BAT has to define the following variables:

   COMSPEC      has to point to a valid COMMAND.COM
   PATH         has to include \LPMUD\BIN
   GO32TMP      c:/tmp    (this is a slash, _not_ a backslash)
   GO32         emu c:\lpmud\bin\emu387
   SERIAL       c:/lpmud/lines    (again, a slashes)
   HOME         has to point to a directory which contains the file
                indent.pro (or to any other valid directory if indent.pro
                isn't used, i.e. c:/ ).

*
* The c: in the above variables can be any drive-letter (should be a hard
* disk though 8-)
*
(The emulator isn't necessary if a 387SX, 387DX, 487SX or 486 is
available but this hasn't been tested.)
 
LPmud files should go to the following directories (on C:):

    \LPMUD         LINES
* 
* CONVERT.245 was included with the old one. Not needed unless you convert
* a UNIX mudlib.
*
    \LPMUD\BIN     PARSE.EXE, INDENT.EXE, TARPAT.EXE, EMU387, COMDRV.COM
*
* PARSE.EXE was the 3.0.45 version, PARS312.EXE and PARS312C.EXE are the
* new ones compiled by me. (*C.EXE for COMPAT_MODE)
*
    \LPMUD\DOC     all documentation files
    \LPMUD\MUDLIB  your MUDLIB (see below)
    \LPMUD\SRC     LPmud source

To unpack the binary distribution, just create a directory \LPMUD, CD to
it, get PKUNZIP and type  PKUNZIP -d LPMUD386

*
* Or PKUNZIP -d MSDOS312.ZIP as this one is called...
*

Create a directory C:\TMP. The page file of the virtual memory system will
go there.

Here's what you have to be careful of if you want to move directories
around: the variable SERIAL has to point to the file LINES. PARSE.EXE, ...,
COMDRV.COM have to be in the PATH. GO32TMP has to point to an existing
directory. The location of the MUDLIB (\LPMUD\MUDLIB) is hard-coded in the
game driver.

If you plan to support connections over serial lines, you have to load a
communications driver for each port. The following command loads a driver
for COM2 with local line editing (79 characters buffer) enabled:

    \LPMUD\BIN\COMDRV -C2 -E79

In addition to that, \LPMUD\LINES has to be edited to reflect the configu-
ration, e.g.:

    # line bps carrier
    1     2400 y
    2    38400 n

\LPMUD\LINES has to be present and the environment variable SERIAL has to
point to it even if no serial lines support is desired. Lines can be
commented out by prefixing them with a '#'.

*
* I'm not currently using the serial facilities, so my \lpmud\lines file
* has only got the line '# This is a file' in it, nothing more.
*

MUDLIB
------

Almost any MUDLIB which works with vanilla LPmud on UNIX can be used on
MS-DOS. There's only one major restriction: file names have to obey MS-DOS
naming conventions. These are the most important ones:

  - the following names aren't valid base names for directories and files:
    AUX COM1 COM2 COM3 COM4 CON LPT1 LPT2 LPT3 LPT4 NUL PRN
  - names must not contain more than one dot (e.g. monster.shout.c)
  - names must not start with a dot (e.g. .foorc)

A further requirement is that the names of different files must map to
different MS-DOS file names (e.g. south_forest10.c and south_forest41.c be-
come both SOUTH_FO.C).

While those restrictions rarely affect directory names and files which are
created by the MUDLIB, they usually cause problems with a large number of
the files which constitute the MUDLIB. Their names and all references to
them have to be changed to transform a UNIX MUDLIB to an MS-DOS MUDLIB.

Tarpat, a tool which automates most of this process, is included in the bi-
nary distribution and its source is available in a separate file. See the
CONVERT file for details. A sample set of conversion rules for the "core"
2.4.5 MUDLIB is included. The MUDLIB can be built in the following steps:

  - obtain the 2.4.5 MUDLIB as a TAR archive. Let's assume its name is
    245.tar
  - create a directory LPMUD\MUDLIB and CHDIR to it (or to a directory
    above it, if the TAR file contains a directory prefix)
  - type  tarpat xvvfms 245.tar ..\245.cvt
    (x = extract, vv = be verbose, f = file name follows, m = modifications
     file name follows, s = do in-text name substitutions)

*
* I wiped my 245.cvt, didn't need it anymore... If you need it, contact
* Almesberger or look around for one of the several mudlibs that has already
* been converted to MSDOS.
*

File which contain CRs without LFs aren't read correctly because of a bug
in the run-time library. To work around the most common occurence of isola-
ted CRs, NLs in objects are dumped as RS' (0x1e). Unfortunately, this
breaks objects which contain RS characters.

You need to have a least one wizard character in order to be able to shoot
the game down smoothly once you're brought it up. Because encrypted pass-
words are different between LPmuds on MS-DOS and UNIX, you have to edit a
player file (e.g. \lpmud\mudlib\players\wizard.o) manually and change the
password line. E.g. to set the password to "public", change it to:

    password "VYZyqH8P"

It is highly recommended that you change the password immediately after
bringing up the game if you plan to allow outside access to the game !

The final step to build a 2.4.5 MUDLIB is to copy the file MASTER.C from
\LPMUD to \LPMUD\MUDLIB\OBJ.
*
* This is only true when using a 2.* MUDLIB!!!
* See the README.1ST for further explanations about this...
*

Running LPmud
-------------

BEFORE you start LPmud, make sure you've loaded SHARE and - if you want to
allow logins from the serial lines - the communication driver(s).

If you're using an LPmud 2 MUDLIB, type  PARSE -o >>\LPMUD\LOG
If you're using an LPmud 3 MUDLIB, type  PARSE >>\LPMUD\LOG
*
* This is obsolete, the COMPAT_MODE is now decided on compile-time.
* The new commands should be:
* If using LPmud MUDLIB 2.*, type PARS312C >>\LPMUD\LOG
* If using LPmud MUDLIB 3.*, type PARS312 >>\LPMUD\LOG
*

After a few seconds, LPmud will begin to pre-compile a few objects and a
virtual console will pop up. Hit [Enter] to connect to the game driver. (It
takes a few seconds until LPmud shows the login prompt.)

*
* A few seconds... Make that 10-20 depending on hardware and mudlib.
*
The following keys are interpreted by the console driver:

   F1 ... F10   switch to the respective console
   Alt-H        ("hangup") disconnects the currently active console
   Alt-S        suspends LPmud and spawns a DOS shell. EXIT returns to
                LPmud.

The game is shut down with the  shutdown  command which can be issued by
any wizard.

The  people  command shows the connection type in the "IP address":

    0.0.0.100 to 0.0.0.109  are virtual consoles
    0.0.0.110 to 0.0.0.113  are COM1 ... COM4


Bugs and such
-------------

If you think you've found a bug in the MS-DOS specific parts of LPmud,
please send mail to  almesber@nessie.cs.id.ethz.ch

*
* Let me know as well, address in the README.1ST file.
*
