Hacker News new | ask | show | jobs
by iggldiggl 1691 days ago
Years ago, Sim City 4 and The Sims 2 had a similar problem – depending on the processor frequency and GPU model they'd automatically enable or disable certain graphics features.

The problem with that was that the processor frequency to high/medium/low-performance class mapping was being done based on Pentium 4 clock speeds, so if you were using an AMD processor (or even one of the first generations of Intel's own Core i-processors if you still happened to be playing those games a few years later) with a lower clock speed but higher IPCs (so a roughly equivalent performance), those games would mistakenly assume your processor was slow and disable various graphics effects and other settings.

Somewhat annoyingly, Maxis/EA never fixed that issue even though AMD processors weren't totally obscure even at that time, either.

The saving grace was that at least things weren't totally hard-coded – there was a rules file in a plain text-based format controlling the various things that should be enabled or disabled based on the detected performance level, and so it was comparatively easy to just change the expected clock speed levels to something more reasonable for a non-Pentium 4 processor.

Later this was also helpful because the GPU detection started having its own issues a few years down the line: When AMD started recycling model numbers for its graphics cards, some newer models were then being mis-identified as some slow, older model that would require various workarounds/lower graphics settings, so again you had to manually edit the rules to fix things.

1 comments

Unreal 1 engine had same issue - modern dynamic clock CPUs confuse it https://forums.beyondunreal.com/threads/ut-goty-and-framerat...

From memory it was something like UT99 running a loop to determine CPU speed at the start when most modern CPUs are running at a lower clock, and when you start actually playing CPU speeds up and game engine goes crazy.

ah found it https://www.vogons.org/viewtopic.php?p=328803#p328803

"UT uses the RDTSC instruction to measure time. This is an assembler instruction that reads the "Cycle Counter" value from your CPU."

> This is an assembler instruction that reads the "Cycle Counter" value from your CPU."

It did that ~10 years ago. On modern CPUs however, that instruction reads a counter which grows at the stock frequency of the CPU (e.g. at 3.6GHz for Ryzen 5 3600), regardless of frequency scaling of any of the cores.