home *** CD-ROM | disk | FTP | other *** search
- FIX116B: Air Warrior Timing Patch V1.00
- Written by Bob Church CIS:73207,3242
-
- Background
-
- FIX116B is a patching utility for SVGA Air Warrior V1.16B. It makes some
- minor modifications to a timing loop in the joystick routine in the V1.16B
- AIRWAR.EXE file to correct a problem which can occur with some game ports.
- It was also found to be useful in the case of some problems with video sync
- and lost key presses when Air Warrior is running at high frame rates.
-
- The problem with the joystick is one caused by 'Refire Delay'. The routine
- does not allow enough time between the reading of one axis and the next to
- allow all game ports to reset correctly. This will happen on faster machines,
- In the worst case, there will be a point on the Y axis (possibly on the
- rudders and throttle as well), where as you move the stick from full forward
- to full back, the joystick value as displayed by the 'ESC OJ1' command in Air
- Warrior will suddenly drop off by 10 to 20 percent, maybe more. If you have
- a throttle or hat switch, you may need to push them fully forward to observe
- the effect. Try it both ways. It will happen at around the point where the Y
- axis begins generating the highest value of the four joystick inputs as
- reported on most any joystick test program. Lesser effects will generally
- just be a 'jittery' response from the Y axis, perhaps the rudder, and the
- throttle/hat inputs would be affected as well. The X axis would probably not
- show any problems.
-
- The problems with video seem to be related to high frame rates in AW. The
- delay loop that FIX116B adjusts can be used to slow the frame rate down
- slightly, and this has been found to be sufficient to bring the video into
- sync on the system tested. It's worth a try if you're having that sort of
- problem.
-
- What the Patch Does
-
- Basically, there is a loop at the end of the Air Warrior joystick routine
- which waits for a fixed period of time or until the all four axes time out
- before it goes on to read the next stick. The FIX116B patch makes two changes.
- First, it forces the loop to time to conclusion, regardless of whether the
- sticks time out first. This effectively inserts a minimum delay between time
- out and refire which will stabilize the joystick reads. Second, it lets you
- adjust how long the time delay will be, so you can tune it for the optimum
- performance with your system. This delay can also be used to drop the frame
- rate slightly, which appears to circumvent the video sync problems.
-
- System Configurations
-
- How you use FIX116B depends somewhat on how your system is configured. There
- are two basic classes, I'll call them 'fully configured' and 'partially
- configured'. A fully configured system is one which has something connected
- to all four analog inputs on the game card. The system would typically have
- a joystick, rudder pedals, and either an analog throttle or a ThrustMaster FCS
- hat. If your system doesn't meet all these conditions, then it is partially
- configured for the purpose of this discussion. Note that an FCS passed through
- a WCS would provide a fully configured system (assuming you have rudder
- pedals) if either the Red or the Black switch is in Analog Mode. If both
- switches are digital, the system is partially configured.
-
- Fully configured systems are the only ones that are likely to encounter any
- of the problems mentioned above. The reason for this is that any open analog
- input (which is the basic requirement for a partially configured system) will
- cause the existing AW joystick routine to insert a delay of it's own while it
- waits for the open axis to time out. This delay is generally more than enough
- to circumvent the problem with refire.
-
- Partially configured systems can use the patch to make some minor improvements
- in frame rate by limiting the time that AW will wait for the open stick time
- out. The value that AW uses in the unpatched timing loop is 2303, which is
- longer than necessary for most systems, especially if an adjustable game card
- is being used.
-
- Using the Patch
-
- First, if you are running a fully configured system and aren't experiencing
- any problems, the patch won't really accomplish anything and will cause a
- slight drop in frame rate. If your sticks and video are stable, then there's
- nothing to be gained.
-
- Using the patch is straightforward. You should make a copy of the AIRWAR.EXE
- file in case something goes wrong. That is the only file that is actually
- modified. Just put the FIX116B.EXE file in your Air Warrior directory and run
- it with one of it's three command lines.
-
- The first form of the command is simply:
-
- FIX116B<enter>
-
- This will patch AW with a loop value of 1279. This is a good place to start.
- It will add about 6 milliseconds/frame on fully configured DX6 '66 and will
- save about 6 milliseconds/frame on partially configured systems. The change
- will be something less than that on faster machines. This should give plenty
- of refire delay for the joystick, and was sufficient to fix the video sync
- and keypress problem on the system for which the patch was developed.
-
- The second form of the command is:
-
- FIX116B nnnn<enter>
-
- where 'nnnn' is a value between 1 and 65,535. This allows you to set the loop
- value to something besides the 1279 default value. It is primarily useful for
- tuning the value to match your system. Try the default first. If that clears
- the problems, then try the second option and gradually lower the value. This
- will get back some of the lost frame rate. You can keep pushing it down until
- problems reappear. If you go to low, you will definitely run into joystick
- problems at some point, probably when the joystick is back or right of center,
- the right rudder is depressed, the hat is centered, or the throttle is at the
- min throttle position.
-
- If you have a copy of the ThrustMaster TMScope program, you can get an idea of
- the minimum value necessary. Configure your system as it is for AW, including
- your game card settings. Run TMScope and move all the flight controls through
- their full range of travel. Take the highest 'Max' reading from the Raw Data
- display and increase it by about 25%. That should be about optimum for the
- delay value. If you have problems there, then go up with it until they go
- away.
-
- If the default value doesn't work, then increase the value above the default
- and try again. I'm not sure how much delay it might take to correct the video
- sync problem on all systems, so you'll just have to experiment a bit.
-
- The optimum value for a particular system will change if you change game card
- settings or your hardware configuration. If you are using a relatively high
- value, like the default, this is usually not a problem. If you've tweaked the
- value down, though, then changing things can cause problems to reaappear and
- you will need to rerun the patch. You can run it as many times as you need to.
- It isn't necessary to restore the original AIRWAR.EXE file each time.
-
- The third option is:
- FIX116B 0<enter>
-
- Setting a 0 value is seen by FIX116B as a request to remove the patch from
- the AIRWAR.EXE file and restore it to it's standard condition.
-
-
- Distribution, Support, Etc.
-
- I'm releasing this program for free use by anybody that wants to. You may
- distribute it freely, post it wherever you like. If you have questions,
- comments, bug reports, etc., you can reach me via email on Compuserve. My
- ID is at the top of this file. Have fun!
-