V42PATCH.COM ver 1.01 By: Ken "Stinger" Richardson [70761,301] The following is a brief report of what research I have done, and what I have found while investigating the COMMS routines in Falcon 3.01.1. If you have read this file before, it would be a good idea to read it again, as some things have changed. Otherwise, before using this patch, please understand that it is only a "Hack", as far as I know it will not cause any problems for any other part of Falcon, but it is not possible to be absolutely sure. It will NOT modify your original installed version of Falcon. It will rename your FALCON3.EXE file to F3ORIGIN.EXE and then create a new FALCON3.EXE file that has the V42 patch installed. To uninstall the V42 patch, simply delete the FALCON3.EXE file and rename the F3ORIGIN.EXE back to FALCON3.EXE. V.42bis modems: V.42bis is a CCITT standard for data compression and error correction. It can give a modem up to 4:1 compression with 100% reliability. A 9600bps V.42bis modem can achieve throughput of up to 38,400bps and a 14.4kbps V.42bis modem can go up to 57,600bps throughput. This is done by the modem by compressing the data it receives from the computer before it sends it across the phone line on it's 9600 or 14.4k bps carrier. The receiving modem decompresses the data before sending it to it's host computer. All data can not be compressed the same amout. For example, text files can be compressed a great amout while ZIP file can't because they are already compressed. Therefore the effective speed of a V.42bis modem can vary from it's carrier speed (9600 or 14.4k bps) all the way up to 4 times it's carrier speed (38.4 or 57.6k bps). The way the data flow is regulated by the modem is with FLOW CONTROL, or more specific harware flow control (CTS/RTS). The CTS (clear to send) line will tell the computer when the modem is ready for data. Your comm port might be set to 57,600bps while the modem is sending data at 15,000cps, obviously the computer must wait for the modem. So as you can see, flow control is absolutely needed when a V.42bis connection is made between two computers with the comm ports set to a bps rate higher than the modem's carrier. Original Falcon 3.01.1 and V42bis modems: What I have found when connecting with Falcon using my modem and V.42bis turned on is severe warping and the occasional hang-up in the sattellite download. My opponent and I would configure our modems to connect at 38,400bps (57,600bps for 14.4kbps modem) with V.42bis turned on. When we decided who would be the caller, we would setup in Falcon and have Falcon connect. After connection we would go on to the sattellite download screens. Occasionally Falcon would hang-up half way through these screens. If we did make it through the sattellite download, we would enter Falcon and start dueling. While in flight, my opponent would be "teleported" from one location in space to another. He would be right in front of me and then all of a sudden he would be 2 miles off to my right, facing a completely different direction. I have had numerous reports from other players noting the same effect. Well, I decided to start "hacking" at Falcon 3.01.1's comms routine. What I discovered is Falcon 3.01.1 ignores the CTS line from the comm port. This makes hardware flow control impossible during a V.42bis connection. Falcon's comms routines don't realize when the modem is ready to accept data, it assumes the modem is ready as soon as the Transfer Holding Register is empty on the selected comm port. This works fine for a direct connection or a straight asynchronous connection using modems (9600bps or 14.4kbps), but not very well at all with a V.42bis modem. Falcon continues to send data even when the modem is not ready, the data send while the CTS is off, is lost. This is where all the problems begin. What V42PATCH.COM does: V42PATCH will make numerous changes to Falcon 3.01.1 to enable Falcon to check the CTS line before it attempts to send data. It will allow data to be trasferred between the two computers error free and up to 57,600bps. It will rename your original FALCON3.EXE file to F3ORIGIN.EXE. Then it will create a new FALCON3.EXE file with the V42 patch installed. You will need 1.3Meg of free disk space. To Install V42PATCH.COM: To install V.42PATCH, simply copy V.42PATCH.COM to your Falcon 3.01.1 directory and type V42PATCH. It will reply with a success or failure message. What to Expect from V42PATCH: 1. After running V42PATCH, your FALCON3.EXE file will be ready for a V.42bis connection. Your original FALCON3.EXE will be renamed F3ORIGIN.EXE. 2. You will still be able to connect with someone who doesn't have the patch but only at the highest mutual raw speed of your modems without V.42bis turned on. Don't attempt a V.42bis connection with someone who is not using this patch. It will give no advantage. 3. You will see less "jittering" in your opponents plane. 4. You will have a 100% error free connection (with V.42 turned on). 5. There will be a 30% increase in cps rate while playing. 6. The Satellite Downlink will be considerably faster if your UART can handle a high speed connection. (See UART consideration) Number 5 and 4 above combined, result in number 3 above. New Features in this Verison (1.01): Changes in this version of V42PATCH include an improved satellite downlink achieved by relaxing Falcon's packet timing slightly to allow for the varying CPS rate caused by a V42 connection. This also makes game play even more steady. I also included a program called CHK_UART written by Marc Genosis. This program detects what type of UART is installed in your computer. You should have at least a 16450 UART for 9600bps and a 16550 UART for 14.4kbps. Otherwise you may be losing data due to overrun errors at the UART. An overrun error occurs when the UART can't present the data to the computer before the next byte is received by the modem. The first byte is lost. (see UART consideration). UART (Universal Asycronosis Receiver/Trasmitter) Consideration: A UART is the "brains" of your COMM port. It receives and sends data to and from the modem, monitors line errors, and monitors modem status. It will interrupt the CPU whenever data is ready so the CPU can read every incoming byte without disrupting program execution. What I have found while testing V42PATCH, is some UARTs are not fast enough to achieve a reliable connection at speeds over 9600 baud. For speeds over 9600 baud you may find that you will need either a 16450 or probally a 16550 UART. These chips are direct replacements for the old 8250 UART and are much faster. If you have an internal modem, you can be sure that your UART is fast enough as it is built into the modem. External modems might have a problem. The UART is not contained in your modem, it is part of your computer, so you may have a 14.4k bps modem and have a weak link betweeen the modem and computer caused by the slow UART. I have included a program called CHK_UART with F3V42. This program will report what type of UART you have installed in your system. You might want to consider upgrading your UART to a 16550. If you are unsure if your UART can handle a high-speed connection, try connecting with your opponent via a communication program using same modem defaults that you intend to use in Falcon. Configure your comm port to the same baud rate you will use in Falcon (38,400 or 57,600). Then try uploading/downloading files to/from each other. If you experience errors, either your UART or your opponent's is to slow. Most comm programs have an option in their setup to enable CTS/RTS (hardware) flow control, this must be on. Tips on Connecting with Falcon using V42PATCH.EXE: When connecting with a patched version of Falcon, you will want to have V.42bis turned on, also you need hardware flow control enabled. Use your comm program to configure your modem for the correct setup and then save your modems configuration in "Stored Profile 0" in your modem's non-volitile memory. I found it is also a good idea to make sure the "Extended V.42 Response Codes" are turned off. After the proper configuration is stored in your modem's memory, your are ready to connect. Go to the comms screen and select 57,600bps and modem connection. Select call or answer, whichever you and your opponent decided on. Use modem defaults when Falcon asks, this is important. If you use defaults, Falcon will use "Stored Profile 0" to make a connection as a result of the ATZ command Falcon will send. This is the configuration you just saved. You should get a connect message and everything else should work fine. Here is an example of how to setup your modem: From TERMINAL mode in your comm program type: AT &F ;Return to factory configuration AT &Q5 ;Enable V.42bis connection AT &K3 ;Enable hardware flow control (CTS/RTS) AT W0 ;Disable extended V.42 response codes AT &W0 ;Store in Profile 0, very important. AT &V ;Display profile. Use this command to double check your setup. Note: Your modem may have different commands than I have listed here, check your modem's manual before you type these commands, especially &Q5 and W0. Some modems use &M5 instead of &Q5. You may even have to change some S-registers. Whateven you must do, make sure the last thing you type is AT &W0 to store it in your modem's memory. If you type an illegal command, your modem should respond with ERROR, otherwise it will respond with OK. I should mention that all 9600 V.42bis modems will not go to 57,600bps, some have a limit of 38,400bps which is fine. Using a 9600bps carrier and V.42bis compression (4 to 1), the maximum throughput will be 9600 * 4 = 38,400bps. So 57,600bps has no advantage when using a 9600bps modem/carrier. When using a 14,400bps V.42bis modem, you should select 57,600bps as all 14.4kbps modems will accept 57,600bps connections. If you have a 14.4kbps modem and your opponent has a 9600bps modem, you will have to connect using a 9600bps carrier. The modems should do this automatically. You can select 57,600bps (although it offers no advantage over 38,400bps over a 9600bps carrier) when in Falcon and your 9600bps opponent can select 38,400bps and you will still have a good connection. Remember, with V.42bis turned on, your computer is connected to your modem, not directly to your opponent's computer. When you select the baud rate in Falcon, what you are doing is telling Falcon how fast you can talk to your modem. The "Flow Control" with regulate the actual data transfer rate between computers. I suggest selecting 38,400 baud when using a 9600bps carrier and 57,600 baud with a 14.4kbps carrier. Recommended Setup: Both players MUST select the same baud rate in Falcon. This is important as it has to do with the internal packet timing. If you connect with a 9600 bps carrier, do not select a baud rate high than 38,400 baud. I recommend you select 38,400 baud if both players UARTs will accept it. If using a 14.4 kbps carrier, select 57,600 baud if both UARTs will accept it. Always remember to select the same baud rate on each end. Results From V42PATCH Tests: The CPS rates stated here were reported by a TSR program I wrote to monitor Falcon as it communicated with my opponent during actual games. Connection Type Avg CPS Highst CPS playing playing ------------------------------------ 9600bps, No V.42 600 656 38.4Kbps, V.42bis 775 1365 (9600bps carrier) Future Versions of V42PATCH: I intend to continually support V42PATCH, upgrading it as future versions of Falcon are released. I may also add more features as the need arises. Note: This patch is not supported by Spectrum Holobyte. If you experience problems, contact me in the ModemGames Forum. Ken "Stinger" Richardson [70761,301] P.S. Have fun!!!