http://bugs.winehq.com/show_bug.cgi?id=1667
------- Additional Comments From Andrew.Talbot@talbotville.com 2003-10-12 04:31 ------- Mike,
OK, here are some results that spoil the party! Because I didn't want to overdo the detail earlier, I deliberately omitted to mention that the Programmable Interval Timer chip is fed from a crystal which oscillates at 3.579545 MHz, (which just happens to be the chroma frequency for NTSC-N). Divide this by three and you get 1.193182 MHz. Now, it was rumoured that some PCs use the 3x clock straight, but I was sceptical - big mistake!
I have just tested five PCs from three different UK manufacturers, ranging from a P2/400MHz to a P4/2.4GHz, most with Windows XP Professional, one with XP Home Edition and, guess what, yep, they *all* show a QPF of 3579545!
I think it is true to say that Microsoft do not state what frequency one is going to get when one uses the High-Performance Counter. So, I am rapidly being drawn to the conclusion that we should forget about the RDTSC instruction completely and just concentrate on getting whatever the PIT chip provides. I gather this 82C54 chip takes the 3.58-MHz signal (as used by XP) and produces a divided-by-three output (1.19 MHz, as used by Win98) and a divided-by-a-further-65536 (18.2 Hz) output.
-- Andy.