CPU or framerate limiting on older games

There are some older games that seem to eat up as much CPU as you can produce even if only to render frames that they will drop - or perhaps perform some work that I don't consider necessary (since they were good enough on my machine in the 90s).

Specifically I'd like to limit an old DirectX 5 game: on Windows 7 Fallout 2, as my machine will get warmer and louder than I care for it to while playing Fallout as it maxes my CPU. There are various frame rate controls in the 3rd party patches, but they only seem to apply in certain, cosmetic, situation.

It would be great to know of a control that could be used for any game (something that limits the number of cycles a process can consume for instance).


Solution 1:

Modern CPUs usually change their clock speed based on CPU load in the default setting. You might be able to use the Power item in the Windows Control Panel to switch the power scheme from the default Balanced scheme to Energy Saver. That should lock your CPU to its lowest clock speed.

You can use something like CPU-Z to monitor the clock speed to see if your CPU actually clockspeed changes when you change the powerscheme.

I have actually used this technique to play Commandos. Normally my CPU would switch into performance mode (all 4 cores at 3.2GHz) and the game would run too fast, making it hard to play. After setting the Windows Powerscheme to Energy Saver (all 4 cores on 800Mhz - 1 quarter of full speed) the game would run at the correct speed.

Edit: About using a Virtual Machine:

Virtualbox has the ability to limit the virtual CPU to a percentage of the host CPU, see CPU execution cap in the Processor Settings section. The manual does note that limiting the CPU this way may induce timing problems in the guest, which isn't what you want for older games obviously. Another problem with virtual machines is that hardware acceleration for graphics is still not very well supported, so that limits the usage of VMs for games quite a bit.

I have tried this with Commandos for instance, but the result was not playable. That's when I switched to the technique above to limit the speed of my CPU via Windows Powerscheme.

Solution 2:

DOSBox (http://www.dosbox.com) might work. I know the original Fallout runs under DOS, perhaps Fallout 2 does as well?

The commandline option is cpu = max 50%, where 50% is whatever percentage of your CPU you want it limited to.

Solution 3:

There are a couple of options that can alleviate the issue of older games running way too fast on modern machines;

  • Some games (ie: the original Grand Theft Auto) have built in frame limiters, see if yours does
  • If the game supports a 'Vsync option', control the in game FPS by changing your monitor refresh rate
  • Buy a patched copy of the game from another supplier
  • Use a 'dirty hack' of some description, my personal favourite is using FRAPS in cached record mode to severely hamper FPS

One such piece of VM software that supports assignment of CPU resources is Oracle Virtual Box (which is free) - there are other Virtual Machine hosts which provide more granular control over the resources assigned to the virtual environment but these generally aren't free and vary quite wildly in price.

The options in VirtualBox approach the issue from the point of 'leaving the host operating system functional while the VM is in use' rather than actually specifying the 'Virtual Hardware' that is in the VM;

enter image description here

With this, you can set the number of processor cores available to the Virtual Machine, and the maximum processor usage as a percentage that the VM can utilise. This is not an exact science and will require some trial and error to get the right settings, and even then it is unlikely that the end result will be that smooth to play.

Another option that is available for free, is DOSBox. DOSBox does provide CPU cycle emulation and the ability to change how many CPU cycles are available to the application/game being run within DOSBox. The controls for this are detailed as you start DOSBox up;

enter image description here

The current setting is detailed in the title bar of the window;

enter image description here

Using DOSBox, it is possible to install an older version of Windows (ie: Windows 95 or 98) within DOSBox as detailed in this article. This provides you with another emulation option as it allows you to use DOSBox to run a copy of Windows, and play old Windows games in the environment they were designed to be run in, while still providing control over the number of CPU cycles available in the environment.

As for what to set the number of CPU cycles to, this article suggests the following;

Estimate the CPU power wanted by the game in megahertz. Multiply by 1000, and set it in the cycles= setting in dosbox.conf. For example, if it requires 3 MHz, set cycles=3000. If it requires 120 MHz, set cycles=120000. Use the largest possible value that you think makes the game run more fluently, but not larger. If uncertain, use 40000. This corresponds to an average 486.

Solution 4:

Good Old Games (GOG.com) has a very large selection of older windows DRM-free games, such as Fallout 2 ($5.99), at reasonable prices. These games have been modified to work on newer systems such as Windows 7. Some older copies of games may never be 100% glitch free, so if this could be a pay option to fix your problem.

Personally I think the $5.99 is a reasonable price to play Fallout 2 headache free :p