                                COMW v2.20
                            Communications Wait
                              by John Ericson
INTRODUCTION

I  originally  intended COMW to connect to my friend's system  due  to  the
number  of  errors  we were having using SERSETUP.  I completed  this  task
after a few evenings.  Then I thought that this would be a good opportunity
to  transfer COMW updates and/or WAD files and added a streaming mode  file
transfer.  By this time I had found the source for SERSETUP on  a  BBS.   I
felt I could modify the protocol to make the communications faster and more
reliable.   After a few more days of programming and many days  of  testing
and playing, I arrived at what you see now.

OPERATIONS

Start COMW from the command line using the syntax of

     COMW SECTION1 SECTION2 SECTION3 ...

You  may  specify  one or more section names for COMW to execute  from  the
COMW.INI file.  If you do not specify any section names, COMW will use  the
DEFAULT section name.  Please note:  the section COMMON is always executed.

COMW.INI FORMAT

The COMW.INI file uses the following format:

[section name] comment
keyword=data
keyword=data
keyword=data
keyword=data
keyword=data
keyword=data
[section name] comment
keyword=data
keyword=data
keyword=data
keyword=data

Section  names and keywords are not case sensitive.  You may not  have  any
spaces  before the `=`.  You may use section names more than  once.   Blank
lines  and  lines with invalid keywords are ignored.  COMW will not  report
invalid  keywords or invalid keyword data.  COMW will process all  selected
sections  twice.  The first pass is to configure all the parameters  before
COMW  opens the communications port.  The second pass is for all activities
using the open port.

KEYWORDS
                                First pass

com=n
Default: 1
Valid values: 1, 2, 3, or 4

This keyword specifies the communications port.  COMW only uses COM1, COM2,
COM3, and COM4 at the standard address and hardware interrupts.

port=n
Default: none
Valid values: not validated

This  keyword specifies the nonstandard communications port address in  hex
(i.e.  COM1 is 3f8, COM2 is 2f8).  When this keyword is specified you  must
specify a IRQ setting.  An invalid address can crash your system.

irq=n
Default: none
Valid values: not validated

This   keyword  specifies  the  nonstandard  communications  port  hardward
interrupt (I.E. COM1 is 4, COM2 is 3).  When this keyword is specified  you
must  specify a PORT setting.  An invalid interrupt can crash your  system.
IRQ settings of 3 through 15 are supported.

baud=n
Default: 2400
Valid values: speeds supported by the 8250 or 16550 UARTs

This  keyword  specifies  the communications speed for  the  communications
port.   I have tested the assembler communications driver routine a  speeds
from 300 to 115200 with RTS/CTS and XON/XOFF flow control.

buffer=n
default: 2048
Valid values: 1024-8192

This keyword specifies the number of bytes for the input and output buffers
each.

flow=string
Default: rdy
Valid values: none, xon, rdy

This  keyword specifies the bi-directional flow control COMW uses with  the
communications  port.  `none' means no flow control.  `xon' means  XON/XOFF
flow control.  `rdy' means RTS/CTS or Ready/Busy flow control.

color=n
Default: 112 (black on white)
Valid values: 0-255

This  keyword  specifies the normal screen colors COMW uses  in  the  popup
display.  The color values use the standard CGA color scheme (i.e.  1=blue,
2=green,  3=cyan,  4=red, 5=magenta, 6=yellow, 7=white, 8=high  intensity).
Multiply the color by 16 to get the background colors.  Example: 1(blue)  *
16  + 8(high intensity) + 7(white) = 31.  Note: COMW enables high intensity
background colors (blinking is disabled).

bcolor=n
Default: 240 (black on high intensity white)
Valid values: 0-255

This  keyword  specifies  the boarder color used  by  COMW  for  the  popup
display.

scolor=n
Default: 128 (black on high intensity black[dark gray])
Valid values: 0-255

This keyword specifies the shadow color used by COMW for the popup display.

dsr=string
Default: off
Valid values: on, off

This  keyword  specifies whether COMW will wait for the  modem  for  remote
computer to assert the DSR signal before processing keywords on the  second
pass.

meblock=n
Default: 1012
Valid values: 128-8192

This  keyword specifies the MEMODEM file transfer block size.   Each  block
has a 12 byte header including a crc32 checksum.

mestream=string
Default: off
Valid values: on, off

This  keyword specifies the MEMODEM files transfer mode.  MEMODEM  supports
paced and streaming modes.

merestart=string
Default: off
Valid values: on, off

This  keyword specifies the MEMODEM receive restart mode.  MEMODEM supports
restarting at the beginning (off) or after the last valid block (on).

meblkdelay=n
Default: 0
Valid values: not validated

This  keyword  specifies the MEMODEM delay (in 100th  of  a  second)  place
between blocks.

medown=string
Default: current

Valid  values:  any  existing DOS directory path (not checked)This  keyword
specifies the default DOS directory for incoming MEMODEM file transfers.

meup=string
Default: current
Valid  values:  any  existing DOS directory path (not checked)This  keyword
specifies the default DOS directory for outgoing MEMODEM file transfers.

                                Second Pass

flush

This keyword instructs COMW to wait for the output buffer to empty.

fifo=n
Default: 16
Valid values: 0, 1, 4, 8, 16

This keyword instructs COMW to set the fifo mode of a 16550 UART.

leave

This keyword instructs COMW to leave DTR and RTS on when the program exits.
Normally these are turned off when COMW closes the communications port.

delay=n
Default: 0
Valid Values: not validated

This  keyword  instructs  COMW  to leave delay  (in  milliseconds)  between
characters  transmitted.   This  options  allow  you  to  slow   down   the
transmissions for modems in command mode.  This delay should be  set  to  0
after the modems connect.

out=string

This keyword instructs COMW to transmit the characters of the string.   The
contents   of  the  string  wil  be  explained  later.   Note:   characters
transmitted will not be echoed to the popup display.

echo=string

This  keyword  instructs COMW to send the characters of the string  to  the
popup display.

wait=string

This  keyword  instructs COMW to wait for a string from the  communications
port (i.e. `ok' or `connect').  COMW compares only the number of characters
in  the  string.   This allows for generic modem responses (i.e.  `connect'
matches `connect 9600' or `connect 9600/ARQ').

exit

This  keyword instructs COMW to exit back to DOS with an errorlevel  of  0.
COMW closes the communications port and restores the screen under the popup
display.

mesendf=string

This keyword instructs COMW to start a MEMODEM file transfer send using the
string  as  a  DOS path for a file.  Note: MEMODEM transfer  requests  only
contain  the  DOS  file name, not the complete path.  COMW  on  the  remote
system uses the `medown' keyword to determine where to place the file.

megetf=string

This keyword instructs COMW to start a MEMODEM file transfer get using  the
string  as  a  DOS path for a file.  Note: MEMODEM transfer  requests  only
contain  the  DOS  file name, not the complete path.  COMW  on  the  remote
system  uses  the `meup' keyword to determine where to place look  for  the
file.

doom=string

This  keyword  instructs COMW to start ID's DOOM v1.2 using the  string  as
command  line parameters for the game.  COMW will allow you any  speed  and
modem  settings you like.  This will allow you to experiment.  The  buffers
size used by the communications routine is set to 528 bytes and can not  be
changed.  I have obtained the best performance using the maximum speed  the
modems  will  connect using no compression or block protocol (i.e.  MNP  or
V.32bis).  PLEASE NOTE: the communications protocol used by COMW  for  DOOM
is  not compatible with SERSETUP.  Therefore both sides must use COMW.  The
lowlevel communications routine are written in "heads down" assembler.   Do
NOT use XON/XOFF flow control, this will interfere with the protocol.

         DOOM, the DOOM logo and DOOM likenesses are trademarks of
                        id Software, inc.,(C)1993.

player=n
Default: 0
Valid values: 0, 1

This keyword instructs COMW to start the DOOM player negotiations with  the
specified  player number.  Player zero becomes the console for the  network
game  and  should  be  the  player with the faster  computer/communications
port(i.e. 16550 UART).

ticdup=n
Default: 1
Valid values: 1-5

This  keyword  instructs COMW to set the corresponding value  in  the  DOOM
communications block.  I included this setting for testing purposes and did
not  remove  it  when I was done.  I recommend leaving it  at  the  default
setting.

extratics=n
Default: 0
Valid values: 0, 1

This  keyword  instructs COMW to set the corresponding value  in  the  DOOM
communications block. I included this setting for testing purposes and  did
not  remove  it  when I was done.  I recommend leaving it  at  the  default
setting.

KEYBOARD

Standard  ASCII  characters  entered  at  the  keyboard  are  sent  to  the
communications port.  The ESCAPE key however, will cause COMW to exit  back
to  DOS  with an errorlevel of 1.  COMW closes the communications port  and
restores  the screen under the popup display.  In chat mode, the characters
entered  at the keyboard will be echoed in the popup display and COMW  will
add  the  LINE  FEED character after each ENTER character.  The  Alt-c  key
combination will toggle in and out of chat mode.

OUT & ECHO STRINGS

COMW will perform special functions for the following characters:

#
This character will cause COMW to drop the DTR and RTS signals to the modem
for one second (out keyword only).

^
This character will cause COMW to interpret the next character as a control
character  (i.e.  ^m  or  ^M  represents the  enter  character;  ^j  or  ^J
represents the line feed character).

~
This character will cause COMW to delay for 2 tenths of a second.

`
This character will cause COMW to transmit it's program ID string.

