SP1: How to Prepare for it and What You Get When You Install It 
A Detailed Look 
by Phil Taylor 
         

FSX SP1, released on May 15th 2007, is a major service pack for FSX that contains a set of code and content fixes as well as performance enhancements. First I am going to discuss how to prepare for SP1. Then I will cover the code and content fixes in SP1, and the performance enhancements. I will conclude with a set of new "tweaks" for SP1 so enthusiasts can tune their own rigs.

Setting up for SP1
SP1 needs a pristine RTM that includes no add-ons. Many third-party add-ons can cause crashes, especially if they load dlls, and will probably have to be refreshed. If you really don't want to do this, then perhaps you can consider running FSX from the command line using:

>fsx /ManualLoad

This provides a dialog for every dll or xml exe that gets loaded so you can track down who is the offender if there is an issue.

However, most people don't know how to run FSX from the command line, so it's safest to uninstall all add-ons.

If you have performed any file modification tweaks, you will need to uninstall or repair RTM, then install SP1, then then start installing your add-ons one by one.

Note:

Uninstalling RTM deletes ALL content in the following folders (including EVERY subfolder & file in that branch):

  • C:\Documents and Settings\All Users\Application Data\Microsoft\FSX
  • C:\Documents and Settings\USERNAME\Application Data\Microsoft\FSX

If you don't back up and save, you will loose config files, flights, logbook, and rewards.

Two files to consider saving:

  • Logbook.bin
  • GrantedRewards.bin

We've published an article that discusses the uninstall scenario in more depth, here. Please take the time to read it.

SP1 Code and Content Fixes
There are a lot of fixes for code and content in SP1, but we still didn't have room to fix everything. I apologize in advance if your favorite FSX issue didn't get addressed. The areas we addressed are "Scenery and Aircraft," "Missions, Multiplayer, and Miscellaneous," and "SDK, SimConnect, and 3rd party Compatibility."

Scenery and Aircraft



Scenery

SCENERY: Night textures not appearing on Vancouver's Canada Place
SCENERY: Drop-out of night textures occurring on many generic buildings
SCENERY:Mission Paris Airshow at LFPB
SCENERY: Nijubashi bridge is on the wrong place.
SCENERY :3 disconnected jetways at airport: EGCC
SCENERY:EGNV airport elevation sloped to the wrong value causing severe visual anomalies
SCENERY: Water sloping and boundary resolution issues Danube River
SCENERY:Water sloping issue (missing data due to export issue) Vistula River (Largest river in Poland)
SCENERY :Water Sloping issue at the Humbar Bridge (UK)
SCENERY :Water Sloping issues with the River Avon
SCENERY :Water Sloping issues with the River Thames
SCENERY: Autogen buildings clipping into Dodger Stadium
SCENERY: Detached shoreline seen snaking through water well offshore for 100 miles near Tijuana
SCENERY: Dodger stadium in Los Angeles is inside of a crater
SCENERY: Elevation of terrain around SAOC (Area De Material) differs by about 1300' from elevation of airport
SCENERY: Elevation of terrain around SAVE (Esquel) differs by about 2500' from elevation of airport
SCENERY: Elevation of terrain around SUSO (Salto Nueva Hesperides Intl) differs significantly from elevation of airport
SCENERY: FVFA (Victoria Falls) is sitting in a hole
SCENERY: Gaps seen in taxiways and apron at KSAV (Savannah/Hilton Head Intl)
SCENERY: Horrendous problems with slivers and slabs of land splitting up the bay in Lisbon, Portugal
SCENERY: Last character ("u") in name of Montreal/Pierre-Elliott-Trudeau airport has been dropped from airport name in the geodatabase
SCENERY: Mismatched elevations on adjacent water polygons near MNSC (San Carlos)
SCENERY: Road comprising Brooklyn Battery Tunnel in New York is not attributed as tunnel, runs across Buttermilk Channel
SCENERY: Runway elevation at MNBL (Bluefields) is significantly higher than the airport flattening polygon
SCENERY: Taxiway B at KSAV (Savannah/Hilton Head Intl) is doing the drunken sailor dance
SCENERY: Water sloping issues in Danube River
SCENERY: Yukon River missing from Galena, AK all the way to the ocean
SCENERY:Havana Harbor in Cuba is missing from FSX.  It was present in FS9
LIVING WORLD: Traffic driving on the wrong side of the road in Japan

 

Aircraft

A/C  Airbus A321 - Panel - Backup Altimeter: 10,000's digit does not scroll properly
A/C  Airbus A321 - Panel - ECAMS: FF per engine should not be labelled "%", but rather "lbs/hour"
A/C  A321 -  Panel - The wind value is not being displayed correctly on the Nav Display
A/C  Airbus A321 - Panel - PFD: MCP-selected altitude not be displayed fully when 5 digits.  (First digit is cut off)
A/C  C172 - Panel - Middle and Inner marker lights are misaligned when illuminated
A/C  Cessna 172 - Panel - The placard for the call sign is poorly located - covers up screws when there's lots of blank panel space to the right of it
A/C  DeHavilland Beaver - VC elevator trim indicator not in sync with 2D version
A/C  Default Beaver's exterior's doors are just basic plain color.
A/C  Baron 58 G1000: Instrumental panel is not localizable. Need to add panel.cfg
A/C  Boeing 737-800 - Panel - The True Airspeed (TAS) value displayed on the Nav Display is actually Indicated Airspeed (KIAS)
A/C  Maule M7 - VSI has a limit of +/- 1100 fpm
A/C  Maule Flap Initialization
A/C  Get door open and exit sounds working again.
A/C  Sort Order of Aircraft Manufacturers is broken for extended characters

Missions, Multiplayer, and Miscellaneous

Missions

MISSIONS: Monsoon Approach:  Rain is missing
MISSIONS: Swedish Championship Soaring Course:  Thermals are not showing in mission (schematic)
MISSIONS: Swedish Championship Soaring Course: When User gets the Club Record time they are not getting the trophy for it
MISSIONS: Austrian Alpine Soaring Course:  Flight Plan cruising altitudes are extremely high (41,000 feet)
MISSIONS: Austrian Alpine Soaring:  Crossing over the airport (the final checkpoint) does not stop the timer (counter, waypoint)
MISSIONS: Austrian Alpine Soaring: When User passes finish line and successfully lands on runway they fail the mission
MISSIONS: Flour Power gets a green check when Sitka Approach is completed (reward, check mark)
MISSIONS: Caribbean landing reward not being displayed on success
MISSIONS: Mission Compass displays too many directional arrows (pointer)
MISSIONS: 747 Test Flight has ambulances placed incorrectly
MISSIONS: 747 Test flight reveals terrible shadow problems on the compass rose.
MISSIONS: Completing the Oil Rig Rescue mission doesn't result in a "You've Succeeded" status or reward
MISSIONS: Telluride missing the runway without crashing leaves you in unending state

Multiplayer

MP: banned list ineffective in preventing repeated friend request
MP: mp needs boot functionality both in game player and at the host screen
MP: UI: Hard to chat with all these users in the main lobby with a lot of users logging in and out
MPr: Join Friends Game should not be a selectable option with friends who are already in your session.
MP: unexpected error message popup after user logon with gamespy.
MP:Connection errors, including exiting out of session kicks player out of GameSpy and gives "you may have logged in on another computer" error
MP missions: Things are broken when you try to host a session and then end the mission and then host another session
MP:Cannot make a connection: We believe we have reduced the occurrence of this, and we have reports of better success on GameSpy ahead of SP1 so they may have fixed something on their end too.
MP: Shared Cockpit - Reverse Thrust - Reverse Thrust is not a synchronized component

Misc

Thermals : Default thermals as defined in ThermalsDescriptions.xml far too big and strong for most landclasses
ATC: ATIS - Pressure displayed & spoken in inches when Int'l setting is Hybrid (feet, millibars)
DisabledTrafficAirports persist to flights/missions that have no disabled traffic airports

SDK, SimConnect, and Third party compatibility

Z has a great article on what SP1contains for the SDK, SimConnect, and third-party developers here.

I'd like to point out a few of the key fixes that will affect flyers:

Graphics:

  • Virtual Cockpit Lighting
    Re-enable the ability to define gauge lighting as a single texture mapped 1:1 with the gauge texture map as was available in FS9.
  • Emissive Textures
    The default emissive "Additive" mode was shipped with a bug where these textures would not display during the day. The documentation was also incorrect, in that it indicated this was the mode that should be used to generate nighttime textures. In order to maintain backwards compatibility with FSX RTM, we elected to keep the behavior of "Additive" (now called "AdditiveNightOnly"), and add new modes for "Multiply."
  • Round Earth Corrections
    Made significant progress to try to better map large, legacy add-on scenery to correct for the new round Earth modeling in FSX. NOTE:  There will still be some problems seen with this, but we've done our best to minimize the visual artifacts.
  • Autogen Lighting
    We had a bug in the way roof textures were lit during the night in certain areas. They should now not "glow" like in FSX RTM.
  • Landing Lights
    Back-compat for FS9 style landing lights is fixed, along with better night lighting support for AI aircraft.

Terrain and Scenery:

  • Alpha-blend Threshold
    Fixed problem related to black "lines" around legacy autogen scenery edges. 
  • Runways
    Support for FS8-style "invisible" runways.

SimObjects:

  • Texture.cfg
    Re-enabled support for aliasing SimObject textures.

Performance
Addressing persistent issues with FSX performance was the driving force behind SP1. How did we do that? With a lot of hard work! :) We had two goals: add multi-core support and address the most pressing performance hot spots. So we profiled FSX and we identified some hot spots; and we identified two candidates for multi-core work. That translated to the following work list:

General Performance Work

  1. Performed more work on the LOD system.
  2. Optimized the UI rendering to reduce overhead when the UI is visible.
  3. Front-end texture loader no longer loads loads full mips when it doesn't need to.
  4. Removed redundant elevation queries when scenery complexity is low.
  5. Avoid rasterizing water into the DEM for textures that are all land.
  6. Fixed redundant vertex issue with key Autogen BGLs.
  7. Updated XToMdl tool to leverage same vertex issue, resulting in model vertex reduction on the order of 25-40% for 3rd party developers.

D3D Performance Work

  1. Enabled skinning for more animated objects; which reduces Draw calls.
  2. Batched Autogen objects to reduce Draw calls.
  3. Optimized tree rendering to reduce SetTexture calls.
  4. Coalesced shader state to reduce uploads to the card.
  5. Fixed 3 FS8 AI aircraft in terms of Draw calls. This is the MD-80, Dash-8, and Cherokee. This is a >10x reduction. They are 25% of the worldwide air traffic DB so this can be significant.

Multi-core Performance Work

  1. Moved DEM loading to threads.
  2. Moved terrain texture synthesis to threads.
  3. Moved Autogen batch rebuilds to threads.

That's 15 different work items.  We had five engineers, and the work wasn't spread evenly, but you get the idea that everyone had a lot of work to do. Note, for the terrain texture synthesis the process itself is documented in Adams' Global Terrain Technology for Flight Sim paper, see the bit about the layers and texture synthesis.

How it went together
Now, don't think because we are calling it a "patch" that we are doing binary patches. We are not.

Yes, we use a delta-patching technology in the installer for scenery bgls and the like. Even there some files have changed enough that the delta-patcher cannot handle them and we have to have a "full file" in the patch. The bgl for the Japanese traffic data is an example. We reversed the traffic vectors for the entire country, and almost every byte changed. We tried to put it through the delta-patcher, but it keeled over and gave up, and errored out during setup.

We are rebuilding the binaries from scratch. That's not trying to patch the old binaries, it's replacing them with new files, many of which have quite a bit of new code. The multi-core work, for instance, went through the terrain code stack from top to bottom. That's one reason why SP1 took so long. The multi-core infrastructure is solid, will use up to 256 cores if available, and will continue to be used as we migrate systems to it when it makes sense. Terrain and Autogen are it for now; we'll be evaluating when to do more.

General Performance Work
The general performance work reduced the amount of work we try to do in various scenarios. I want to call out the redundant vertex issue; that's a key thing we fixed in the Autogen bgls (autogen.bgl, vegetation.bgl, and roofs.bgl) as well as in the SDK tool to pass the savings on to all third-party developers when they reauthor with the SP1 SDK.

D3D Performance Work
D3D API usage work was aimed at reducing our Draw and SetTexture API calls. So what are Draw and SetTexture calls? These are the D3D9 API calls that the engine issues to push textures and draw triangles down to the card, the bulk of the work in rendering. We were issuing way too many Draw and SetTexture calls; SP1 is a 35-40% reduction in both. Taking those optimizations is aimed at enabling the app to scale better on GPUs. We took some optimizations on shader state too, which is a nice win. And the 3 FS8 AI aircraft where just horrendous in RTM, so that's another nice fix.

Multi-core Performance Work
Intel is using FSX as one of their prime examples at IDF, so we had a lot of engineering time from one of their threading guys. Intel doesn't do that lightly. We used the time to good benefit.

During loading, we run the DEM loader on threads. You'll see good balanced usage across all cores, as well as about 1/3 faster load times on average.

During flight we spawn threads for Autogen batch rebuilds as well as the terrain texture synthesis. The terrain texture work tends to be a bit bursty; as an area gets generated the load reduces true. But as you fly forward, as you bank, and as the terrain is lighted ( once a minute ) threads are spawned. The terrain grid system is radial around the current viewpoint, and, depending on level of detail, radius can be up to 4.5 tiles in either direction, something like 64 tiles. So there is plenty of work to go around. Autogen is more constant, with a 2km extent being batched.

Even given the bursty nature of the core usage when flying, when there is load, its pretty balanced across the cores. And we got rid of as much of the stutters as we could by going to a lock-free synchronization style. It's solid work that we are deservedly proud of.

As far as practical limits on number of usable cores, currently SetThreadAffinityMask only allows explicit scheduling of threads on 32 cores ( the mask is a dword ) on Win32. So that's our effective limit on number of cores. But as soon as there is a way to explicitly schedule them, we can handle 256 cores.

Performance Final Word 
With all that said, the Draw and SetTexture API call reductions and Autogen size reductions are probably as important for FPS improvements; the multi-core work really shines for load balancing and reducing stutters and blurries. And both are critical for better scaling as CPUs and GPUs get better.

We think SP1 is going to deliver the goods for most users, and will reward users with better hardware the most. We expect that, except in the very, very low-end hardware, all users should see a 20% gain. Some scenarios will see 40%, and some will see a bit more. It's really going to depend on a lot of variables. We hope this enables users to either fly at the same settings with greater FPS, or to bump the sliders up 1 or 2 ticks and still get the same FPS you had.
 
It's going to take time to see if that holds true, but we had good results in our perf lab and with the beta testers.

Performance Note 1:
The vastly improved batching of Autogen was one of the major performance items in SP1 and helps to reach our target reduction of 35-40% for Draw and SetTexure calls. However, it does have an implication that, when coupled with a feature we lost from FS9, you should be aware of.

FSX does not "alpha-fade" Autogen in the distance. This makes for a discernable "pop" of Autogen objects. SP1 batches objects in a 2 km boundary. This, when coupled with the lack of "alpha-fade," does make the Autogen "pop" a little more obvious than in RTM. We think it's a fair tradeoff, though, for the performance gain.

For DX10 we will look at bringing the "alpha-fade" back.

Performance Note 2:
We changed our bucketing code in SP1, so if you use "Restore Defaults" from the UI, you may see different default settings. What did we do? Well, RTM only detected up to 512m of memory and used that as the "Ultra High" setting. With the 768m 8800 card out, there was no way to stratify that above the 512m 7950s. So we detect 640m of graphics memory and treat 640m and greater as "Ultra-High".

There is an issue on Vista, where on some cards it can report a "shared" memory value larger than the physical value and that confuses our bucketing code. If you don't have a DX10 card and you are getting bucketed "Ultra-High", change your settings down. We'll take a look at this again in DX10 to adjust the Vista bucketing

Tweaks
Tweaks, or special settings in various config files, are a time-honored Flight Simulator tradition and SP1 is no different.  Here are the new tweaks for SP1:

For the fsx.cfg config file:

There is a tweak to control scheduling of threads on cores.

It is not recommended to change these settings unless you have a performance reduction and/or maxed out CPU loads in the PerfMonitor. The tweak is

[JOBSCHEDULER]
AffinityMask=n

where

 n  num of cores scheduled   processor bit mask
 1  = 1 core  0001
 3  = 2 cores   0011
 7  = 3 cores   0111
 15  = 4 cores  1111

The processor bitmask shows you what cores will be enabled ( 1 ) and what cores will be disabled ( 0 ), primarily to allow you to see the pattern and be able to pick a bitmask for 8 and 16 cores or more when they are available.

There is additional code to reduce blurries. If you get random texture tiles that appear in a solid color this may help. In some cases, the textures generated from this code can get throttled and will be timed out.  The time out config value is

[TERRAIN]
SWAP_WAIT_TIMEOUT=<number_of_frames>
The default is 30 frames.

There are new config items to control VSYNC for fullscreen and windowed separately:

[DISPLAY]
ForceFullScreenVSync, default is TRUE
ForceVSync, default is FALSE

We have seen cases where, when VSYNC is on in fullscreen it causes major fluctuations in frame rate, especially when setting the rate limiter above 45.  If you run into widely fluctuating FPS in fullscreen when aiming for above 45, try turning VSYNC off or reducing the rate limiter below 40.

For the dusk/dawn textures some people feel that the result is too dark or too light. There are 2 items that allow the transition time to be changed:

[GRAPHICS]
DAY_THRESHOLD
NIGHT_THRESHOLD

Acceptable values are 0 to 65535. 

Defaults:
DAY: 32768
NIGHT: 4096

These represent the amount of "ambient" light at the ends of the day/night blend threshold. Zero is perfect dark, 65535 is full day sun at noon in the summer.

There is a tweak that helps with panel updates, especially the glass panel. If you use the glass panel and notice very slow updates, there is a two-part tweak:

[GRAPHICS]
DirtyRegionUpdateLimit=<integer>

By default this is UINT32_MAX (four billion or so) so it has no effect.
Setting it to zero effectively forces full texture updates instead.

Setting it to smaller numbers (1-1000) might improve performance if the card is slow at full texture updates and does not have a high overhead for incremental updates.

[GRAPHICS]
MergeDirtyRegionUpdates=<0/1>

By default this is 0 (disabled), so it has no effect. Setting it to 1 (enabled) causes us to merge all of the dirty rects into a single large dirty rect. This means that we will only do a single partial texture update.

This may work well if the card is slow at full texture updates and does have high overhead for incremental updates.

There is a scenery tweak to eliminate very small objects, which can reduce render time:

[SCENERY]
SmallPartRejectRadius=<pixels>

Basically this culls out small model parts (such as air conditioners on roofs of buildings, or aircraft doors) if their radius would occupy less than the specified number of screen pixels.

The default is 1.0 (1 pixel). We advise that you use 2 and 4 as the next 2 settings. This can significantly improve performance, but may cause "popping" of small objects.

Conclusion
You can see there is a lot in SP1 from a code and content fix perspective, as well as a performance enhancement perspective. And there are some tweaks for the enthusiast. We are excited about SP1 and how it is going to enhance the experience for the FSX community!