Do Microsoft Game Studios not trust the Windows API?August 22, 2007
Microsoft Game Studios‘ Combat Flight Simulator 3 (CFS3) does not in general run properly on dual core computers running XP or Vista. The reason appears to be that the code by-passes the functionality in the Windows Application Programming Interface (API) for sharing out processing tasks between CPUs. In my case it was a little known AMD utility that saved the day.
I came across the problem because I have just installed a new graphics card on my AMD based system. It’s an MSI 8600GTS (for PCI-E) and replaces the on-board GeForce 6150 chip. The latter was enough to run Vista Aero but nothing to shout about, and it commandeered part of the RAM for video duty. I now have a mid-range factory-overclocked DirectX 10 capable card and my usable RAM is up to a full 1Gb.
I have little time for gaming, but my son Jonny had recently bought CFS3 so I thought I’d give the new card a whirl up in the skies over 1940’s Europe. I’d have asked Jonny to give it a try but he is away in London for a few days.
He had warned me that he’d encountered a problem with a jittery display caused by a conflict between the two processors in our dual-core system, but found a work-around. He hadn’t gone into detail but I knew it had something to do with ensuring the application ran in just one of the processors.
Sure enough, I ran the game on XP with the new MSI card installed and the graphics were intolerably jerky. Googling turned up an answer. This looked like the solution Jonny had mentioned. I followed the instructions and set the CPU affinity so that CFS3 was running on just one of the 2 CPUs. As promised this cured the problem, except that I found you had to keep doing this every time you ran the program. Not acceptable; there had to be a better answer.
Further down the same thread I saw mention of the AMD Dual-Core Optimizer. I installed it and the jitters vanished.
But if you look at what AMD’s utility does …
“The AMD Dual-Core Optimizer can help improve some PC gaming video performance by compensating for those applications that bypass the Windows API for timing by directly using the RDTSC (Read Time Stamp Counter) instruction. Applications that rely on RDTSC do not benefit from the logic in the operating system to properly account for the affect (sic) of power management mechanisms on the rate at which a processor core’s Time Stamp Counter (TSC) is incremented. The AMD Dual-Core Optimizer helps to correct the resulting video performance effects or other incorrect timing effects that these applications may experience on dual-core processor systems, by periodically adjusting the core time-stamp-counters, so that they are synchronized.”
I can only conclude that CFS3 was getting into a tangle because it eschews the facility built into Windows to synchronise the CPUs, tries to go it alone and messes it up because it fails to allow for power-management related effects (presumably this refers to Windows’ own power management).
So what’s going on here? Two divisions of Microsoft that don’t talk to each other? Don’t understand each other’s code? Don’t trust each other’s code?
I can understand that Microsoft Game Studios might believe that direct reading of the CPU time-stamps might avoid some kind of performance overhead. OK, that could be important in a computer game. But did they not test this properly? Why no liaison with the OS division?
Incidentally I found CFS3 equally unreliable in Vista. No jitters this time, it just plain crashed (no pun intended). Again, the AMD Dual-Core Optimizer came to the rescue.
|Share this post :|