JServe02.Exe - Ver 0.2 (BETA) Copyright (C) 1995 James Dement - All Rights Reserved First... lets get the unpleasantries out of the way: ** Disclaimer ** This software was written to do one thing, to play multi-player DooM II Version 1.666+. Although there is no code in the program to intentionally do any damage to your system, the author can not be held liable for any damages that may occur or appear to occurr from it's use. By running it, you acknowledge and accept this agreement. In short, use at your own risk. That being said... ============================================================================== Table of Contents ============================================================================== Note: If you don't read anything else, please read sections 3 and 4 VERY carefully! 1 - Introduction - What is "JServe" anyway? 2 - System Requirements - What kind of hardware do I have to have? 3 - Installation/Configuration - Ok, so how do I set this thing up? 4 - Playing - How do I make this thing work? 5 - Acknowledgments - People I owe a great thanks to. ============================================================================== Introduction - What is "JServe" anyway? ============================================================================== JServe is a serial driver written specifically for the purpose of playing multi-player DOOM II Ver 1.666+. Although fairly easy to use, it was not written with the NOVICE doomer in mind. If you can't get two player DOOM to work with the supplied drivers, you probably won't get it to work with this one either. What makes this driver special is not the fancy GUI (especially since it does not yet have one) or the ability to help set every DOOM parameter under the sun, but its the ability to play 3 and 4 player DOOM using any combination of serial cables and modems. Admittedly, with my hardware 4 players is too slow to be a lot of fun, but 3 works well! And with better hardware, 4 may be fine as well. This is where all you of come in to play. I need help testing this thing on a much wider variety of hardware than I can get my hands on. So I need your help in testing this thing. JServe is a stand alone program. This means it does not require a game server of any kind, and subsequently it does not require $30+ a month for play time. JServe is, more or less, it's own client and it's own server. By daisy chaining computers together you can have a 3 or 4 player death match, play co-operatively, or even team play (2 on 2). JServe, above all else, is BETA. Please remember this if you can't get it to work with your hardware. It is yours to play with under the condition you have to report to me any problems you may have with it. :) Yes, I know, there is always a catch! You are granted permission to use this BETA through October 1995, after this time you should remove it from your system and obtain the upgrade. I hope to have made some improvements by then, time permitting of course, and I don't want old betas floating around. I retain all rights to this program. ============================================================================== System Requirements - What kind of hardware do I have to have? ============================================================================== Well, there are two major requirements, each player must have his/her own computer capable of playing DOOM II, and you must be able to connect them together with either serial cables or modems or a combination of each. Below is an example of a four player setup: +------------+ 4 4 +------------+ 1 2 +------------+ 3 4 +------------+ | Computer A |<---->| Computer B |<---->| Computer C |<---->| Computer D | +------------+ +------------+ +------------+ +------------+ Modems Null Modems The numbers represent the COM ports used on each machine to make the given connection. If there are only three computers, then just hack off computer D from above and you have a three player diagram. Note that the center computer(s) must be able to connect to two other computers. Although you CAN play 3 and sometimes 4 (may be very slow) players with a minimum DOOM II machine, there are some hardware specifications that make multi-player DOOM II a little more tolerable: - 8+ Meg of RAM. - 486DX2-66 CPU or better. - 16550 UARTs are all but mandatory. - A 14.4K or better modem. (9600 may work for 3 players, but I doubt it.) ============================================================================== Installation/Configuration - Ok, so how do I set this thing up? ============================================================================== Installation and configuration is relatively simple. Follow the steps given below: 1. First copy JSERVE02.EXE, JSERVE.CFG, and DPARAM into your DOOM2 directory. This can be accomplished by unzipping the zip file in the DOOM2 directory. 2. The DPARAM file is the DOOM parameter file. This file name is passed to DOOM as an argument, and contains arguments you want to pass to DOOM. Arguments such as -altdeath or -nomonsters. There are many documents and FAQs that can help you find the parameters you want to use. The DPARAM file comes ready to use. As an example, it warps you to level 7 and uses -altdeath. 3. The JSERVE.CFG file contains parameters that JSERVE needs to know about. Edit JSERVE.CFG to match your system. It is important you do this correctly because this beta does not confirm that the values you enter are correct. It ASSUMES you know what you are doing. (yes, I know what happens when you "ASSUME" things, but this IS the first beta!) Before we look at some of the parameters, I would like to discuss "Instances". I wrote this driver in C++. I know, C++ is not the best language to use when speed is of the essence, but I decided that the ease of development outweighed any speed disadvantages that may exist. Each COM port is serviced by an instance of a COM class. Therefore, if you are only using one COM port (i.e. you are an end machine), then you only deal with on COM instance, instance number 0. If you are a center machine and you have to use two COM ports, then you have two COM instances to deal with, instance 0 and instance 1. The number on the end of the parameter name indicates which instance that parameter will effect. For example, "BAUD0" sets the baud rate for COM instance 0, and "BAUD1" sets the baud rate for instance number 1. Don't let this confuse you, it is really very easy. Just look at the parameter discussion below. (Note: The config file has comments at the bottom describing some of the parameters in more detail.) COM0= and COM1= --------------- This parameter specifies what COM port this instance is to use. Sorry, but only standard COM port base addresses and IRQs are supported by this driver. Legal values are 1 through 4. One thing you must be careful not to do, is to use two even or two odd COM ports. Unfortunately, COM 1 and COM 3 use the same IRQ, as does COM 2 and COM 4. This means you must not use 2 and 4 at the same time, or 1 and 3 at the same time. For us poor slobs that have to use a mouse to play DOOM, and our mouse is a serial mouse, this really makes being a center machine, well, um, suck. As a center machine, I have to unplug my mouse from COM 1 and connect the serial cable to COM 1 instead. I can't use my other external serial port, COM 2, because it would interfere with my modem on COM 4. I of course am then instantly toasted in deathmatch because I can't move worth a flip using the keyboard. There is of course a solution for this, buy a bus mouse. A future version of Jserve may allow custom addresses and IRQs to help solve this problem. NOTE: If you are an end machine, you are only using one COM port and so you should disable the second COM port by putting a ";" in front of the COM1= parameter. ISMODEM0= and ISMODEM1= ----------------------- I had to add this parameter to let the driver know whether or not you have a modem on this COM port, or a direct connect serial cable. If there is a modem on this port (instance), set ISMODEM to 1, if not, set it to 0. If there is a modem on the port, I have to disable the port until you make a successful connection to another modem. Otherwise, the modem echos text back and messes up my address mapping. INIT0= and INIT1= ----------------- This is an initialization string that is sent to your modem for initialization purposes. If you are using a direct connect null modem cable, then this string is not used and so it does not matter what you set it to. If you are using a modem however, then it is crucial. The init string should turn off compression and more than likely error correction as well. There are several lists out there that describe the proper init strings for many modems. This driver requires the same settings as any of the other drivers. For the most part, if one of the modems is configured correctly, especially the calling modem, then things will work ok since the modems negotiate parameters. BAUD0= and BAUD1= ----------------- This determines the baud rate used for communication. If at all possible, you should use at least 14.4K baud. If you have powerful enough equipment and 16550 UARTs, then by all means try 28.8K or higher. FLOW0= and FLOW1= ----------------- At present, this parameter should be left set to 0. Hardware flow control is required. If you don't have it enabled on your modem, or have the pins connected in your null modem, you probably won't get this to work. Sorry. DIAL0= and DIAL1= ----------------- If you have a modem on this COM instance, and you will be the dialing end, then you should set this parameter to the correct telephone number. TICDUP= ------- This parameter determines how much data DOOM tries to transmit to other DOOM games. This value should be set to 1 for the smoothest play, but this much data may overload the serial link for more than two players. The higher the value, the less data transmitted, but the choppier the play. I highly recommend a value of 2 for three players. This value works well even with my cheap 250 UARTS and only 4Meg of RAM. For four players, we tried increasing the value all the way to 5. A value of 5 was too choppy for me even when there were only two players. If four player play is too slow or choppy for you with TICDUP=1,2, or 3, then you may just have to play with only three players. Experiment with this value and different baud rates and let me know how they work. :-) Hint: For three player play, set TICDUP=2 and use 14.4K baud for all connections, this is what we used and it worked great. I'm not sure what increasing the baud rate will do for you, with good hardware, it will probably make things better. You can also try TICDUP=1, but this overloaded my cheap UARTS. EXTRATICS= ---------- This value increases the amount of data sent in each packet. The legal values are 0 and 1. My tests showed that this value is best left set to 0. Again, play with it and let me know what you think. EXECUTABLE= ----------- Set this to the executable name of DOOM. I have this parameter in case I decide to make it work with Heretic and maybe DOOM I, but right now it will probably need to be set to "Doom2". ADDRESS= -------- Now this is VERY IMPORTANT. The other drivers I experimented with usually assigned the player number for you. I wanted to decide who would be each player so I included this parameter. The legal values are 0 through 3. For two player DOOM, use 0 and 1. For three players use 0,1, and 2. For four players, use 0,1,2, and 3. For more information on this parameter, see the "Playing" section below. NUMPLAYERS= ----------- Simple enough. Set it to 3 for three players, 4 for four, etc. ============================================================================== Playing - How do I make this thing work? ============================================================================== So you are ready to try and play a multi-player game. I'm going to step you through a typical session using four players. I will refer to the machines as Machines A through D. PLEASE READ ALL STEPS, there are usually important reasons for doing all of them. Reasons that may keep it from working for you if you do not follow them as well. 1- First, I'll describe our setup. Machines B and C are connected together using a serial cable (null modem), and B and C are using modems to attach to machines A and D. The two center machines use one EVEN numbered COM port and one ODD numbered COM port. Remember, do not try and use COM 2 and 4 or COM 1 and 3 at the same time. Also, it is better to have the fastest computers as center machines IF at all possible. (For us, it is not possible.) Our setup is the same as the one shown in the diagram in the "System Requirements" section. 2- We decide ahead of time what player numbers we want to be and who is going to do the calling. In DOOM ][, player 0 is green, player 1 is Indigo, player 2 is Brown, and player 3 is Red. One thing you should definately know, is that player 0 is always the one to start the network communication setup. He is the one that comes up saying, "Sending network start information." All the other players come up listening for this information. They are the ones that say, "Waiting for network start information." We also try to make player 0 be one of the faster machines as well. So, here is the setup: Machine A (Pentium): ADDRESS=1 (Indigo) Machine B (486DX2 ): ADDRESS=3 (My computer) (Red) Machine C (Pentium): ADDRESS=0 (Green) Machine D (Pentium): ADDRESS=2 (Brown) I always get address 3 because I like to be Red. And since I wrote this thing, there are usually no complaints. :) We all agree on what values to use for EXTRATICS and TICDUP as well. EXTRATICS we almost always keep set to 0, and TICDUP works best as 2 for three players. For four players, there doesn't seem to be a satisfactory number, but 3 is probably the best for us. Remember, I have a really sorry machine, 4 Meg Ram, NO local bus video, and cheap 8250 UARTS on both ports. The CPU is the only good thing about this computer. I'm hoping some of you have a little more luck with four players and let me know about it. Since machines A and D are on the end, they put a ";" in front of the COM1= parameter. This disables this instance and prevents it from taking up any memory. VERY IMPORTANT! The JServe.CFG file is read only once and that is during startup of JServe. If you need to change values in this file, you must EXIT Jserve (hanging up all modem connections) and restart from scratch. The DPARAM file, on the other hand, can be modified by shelling out to DOS and making changes to it. This file is read by DOOM, not by JServe. 3- Now we have agreed on the address numbers and that computers B and C will call computers A and D. So, the connection process begins. Computers A and D go immediately into "Answer" mode by typing "Alt-A". They are then prompted for the COM instance that is to answer. Since these are end machines, they only have one instance running, and that instance goes to the modem. So, each player enters "0". Their modems should then accept the initialization string, and begin waiting for the word "RING". IMPORTANT: While waiting for a RING, nothing else can be done. Only the ESC key is active. As you will see for yourself, JServe starts up in "chat" mode. As soon as B and C start JServe, they can chat with each other since they are using a direct connect serial cable. There is no Answer/Dial steps for direct connect. In the JSERVE.CFG file, ISMODEMx is set to 0 to indicate a direct connect. If you can't see each other typing when you first start JServe, something is wrong. Use a terminal package to make sure your serial link is working and make sure ISMODEM is set to 0! So, B and C start up and after some small talk B tells C he is fixing to call A. It is important that C knows this, because: IMPORTANT: When JServe enters DIAL or ANSWER mode, chat is no longer enabled! No other communication should be attempted to a machine that has a COM instance in DIAL or ANSWER mode. In this case, C should sit and wait until B connects to A. So, machine B tells C, "I'm dialing A now, wait until you see us chatting before you do anything else." Machine B then issues the "Alt-D" command. He is prompted for the instance number that is to perform the dial. In this case, B is using the direct connect on instance 0, so the modem is on 1. He responds with a 1. Instance one begins dialing. Remember machine A has entered the ANSWER mode and is waiting for the call. Machine A picks up, the modems negotiate, and if all works well, you return to packet mode. NOTE: Packet mode means you can chat. Byte mode is for talking to modems only. Once A and B have returned to packet mode, all three can chat (A,B, and C). C sees A and B talking, and so he says, "I'm dialing D now, you guys wait till you see me talking to D before you do anything else." Machine C types Alt-D for dial. When prompted for the instance number, he enters 0 because he opted to have his serial connection serviced by instance 1. So instance 0 starts dialing. Machine D, who was in answer mode, answers the modem, and C and D return to packet mode. All four should be able to see each other chatting now. VERY VERY IMPORTANT: I build the address map during the chat mode. So, each player must see some typing from all the other players. We usually sound off once we are connected: "A is here." "B is here." "C is here." "D is here." If each player doesn't see all the other players chatting, then the map is not built properly and DOOM will not start. TIP! If when you try to start DOOM you get a mapping error, return to chat mode and have everyone hit the Alt-R (Reset) command. This zeros out the address map. Everyone should type something again so everyone else can see them. This rebuilds the map. Once we are all chatting, we make sure we have the same parameters in the DPARAM file. This may or may not be necessary, Doom may only use player 0's DPARAM parameters, I don't really know and haven't tried anything else yet. We all put the same thing in DPARAM because we know that works! Once we have established any other rules of battle, we are ready to begin play. VERY IMPORTANT: Player 0 will start sending out network info as soon as he comes up in DOOM. We have found that this transmission overloads slower systems that are still trying to load DOOM, and may cause system lock ups. Well, we all know that I have the slowest machine. So, I make sure they remember to give me a 20 second head start. (Yes, I need at least a 20 second head start to make sure I load DOOM by the time they do.) I remind them to wait 20 seconds, and I hit ALT-G (For Go!) Doom is launched on my system. They probably sit and talk bad about me for about 20 seconds, decide they are going to gang up on me, you know, things like that. Actually, all players other than 0 can start at the same time, they'll just sit and wait for the start info longer. Player 0 has to wait so he won't sit there and flood me with start packets while I'm trying to load DOOM. Once they have waited about 20 seconds, Player 0 instructs the others to go, giving them about a five second head start and then he goes. If all goes well, the fun then begins. IMPORTANT! Make sure the machine that is player 0 is the LAST machine to come up. This insures that the others have loaded DOOM and are ready to accept his packets. TIPS/TRICKS/PROBLEMS -------------------- -Sometimes during game play, DOOM ][ completely hangs for a second or two. In our setup, this is caused by my serial buffer overflowing. The buffer has to be dumped and DOOM has to re-sync itself. This may or may not happen with your systems. -If you have a 28.8K modem, don't set the COM port baud rate to anything less than 28.8k. If you do, then garbage is received when the modem sends responses to JServe. We noticed this when one of our modems wouldn't answer an incoming call. JServe was not instructing the modem to pick up because instead of the word "RING", Jserve was receiving garbage characters. The BAUD0 parameter was set to 14400, but the modem was a 28800. Setting BAUD0=28800 solved the problem. We let the slower modem negotiate the baud rate down. We could have added a command to the init string to force the 28.8k modem to use 14.4k as its maximum value as another solution. -Jserve does not hang up modems when you exit DOOM, so you should all be able to talk to each other again once you have returned from DOOM. You can then start a second DOOM with different parameters in the DPARAM file if you like. All without hanging up or anything. -During play, if one or both of the center players grow tired of playing, they can EXIT DOOM, and the others can keep playing as long as the person who exited remains in JServe in the chat mode. Packets will be directed through his machine, and the rest can keep playing three player DOOM. This proves handy if you just need that other machine so you can have two phone lines and two modems for three player DOOM. Make the four player connection, and have the center guy just exit DOOM and the other three can keep playing. Actually, if the three that want to play Doom configure JServe.CFG as if they were the only three playing, and the other center machine sets PLAYERS=4, then he probably does not have to start DOOM at all. His machine should forward packets properly. (This part has not been tested, whereas the player(s) dropping out of DOOM has been tested.) -Bells. Players can send "beeps" or "bells" during chat mode. This comes in handy when someone decides to get a drink before the game starts or something. When he gets back, he can send beeps by hitting CTRL-G several times and then hitting enter. The packet of ^G's beeps on all machines that receive the packet. -Dial debugging. You can enter your own phone number as the number to dial. The modem should dial and get a busy signal. You can do this to make sure your modem is being controlled properly by JServe without bothering anyone else. -You can also set the number of players equal to 1. Set ADDRESS=0 and PLAYERS=1. This allows you to make sure JServe can launch DOOM properly on your system. It also allows you to have the -altdeath feature while playing single player! :) Unlimited weapons! Yes! ============================================================================== Acknowledgments - People I owe a great thanks to. ============================================================================== First and foremost, I would like to thank the guys at ID. Thank you for an incredible game. Secondly, I would like to thank the following people for putting up with all the inconviences I put them through and for helping me debug and test this driver: Shane Hebert Mike Ford Bryan Douglas Thanks Guys. I would also like to thank Lee Seitz for helping me set up the JServe home page. Actually, he didn't help me, he did it. Thanks Lee. The JServe home page is http://fly.hiwaay.net/~jfdement/jserve ============================================================================== DOOM, DOOM II, the DOOM logos, and DOOM likenesses are Copyright id Software. ==============================================================================