Take the 2-minute tour ×
Super User is a question and answer site for computer enthusiasts and power users. It's 100% free, no registration required.

We have some older programs (no source code anymore) that run too fast on CPUs with faster clock speeds. I'm guessing that they were written using software delays ('X' number of CPU instructions per loop) - instead of sleeps and hardware timers. On new PCs, these apps no longer wait long enough for events to occur; so they no longer work. We can't change the applications - so we're trying to figure out how to make them believe that they are running at a slower clock speed.

I've written an app that eats-up processor time on a PC... effectively slowing it down enough for these old apps to run. But that "solution" affects all programs on the PC - (and user interaction, etc.).

I've found a couple of "program slow-down" products that are able to target individual executables - (Mo'Slo and Asoftech Speeder). They do NOT affect the overall system - just the individually targeted applications. In fact, each application can see a different clock speed. But it is cost prohibitive to purchase enough seats of those products for the number of users that we have.

(FYI... Gamers use these products to slow down clock speeds for older games so they will run correctly on new, faster processors).

I'm wondering if anyone can explain how these products are able to affect the clock speeds that individual applications see?

It would be best to always tell an application that it sees an absolute clock speed of 'N' - (run App1 at 'N' MHz). But it would also be usable if all that we can do is tell an app that it sees 'N'% of clock speed of host PC - (run App2 at 30% of host clock speed).

I can code it if I can figure out how it is done.

share|improve this question

migrated from stackoverflow.com Jan 1 '12 at 0:26

This question came from our site for professional and enthusiast programmers.

2  
So you're looking for Turbo button? –  Cody Gray Dec 30 '11 at 10:02
    
@Code Gray - wow that's soooo true!!!!! –  Preet Sangha Dec 30 '11 at 10:06
    
Actually, looking for "Turbo Off" button... –  CBruce Dec 30 '11 at 10:25
    
That's what the turbo button was.... –  Preet Sangha Dec 30 '11 at 10:33
add comment

2 Answers

If you can determine the API that the games are using to count ticks, then you may be able to apply a hook to divert the API for the program in question. However without platform specific details this is just conjecture.

For example in windows, when running 16 bit programs, I've written some assembler thunks that intercepted api (DOS) calls and diverted them to my own code, do something other than what windows provided.

Edit: Can you use virtualising technology like QEMU to control the CPU sent to the app?

share|improve this answer
    
We don't see any timer related API calls. That is why I suspect that they are just using roll-your-own timers. Old method was to write a for/next loop with something like x = 0; x += 1 in it. Then you figure out how many iterations of that loop is necessary to get you the delay that you want. That method ONLY works for a specific clock speed. –  CBruce Dec 30 '11 at 10:29
    
Note: I did mention that gamers use the slow-down products, but our problem is a bunch of old enterprise apps that we are still tied to. Our other problem is that the original author has passed on. So we have to re-write these apps to get them working correctly. –  CBruce Dec 30 '11 at 10:36
add comment

Considering the age of software that dosen't use halt instructions, i'm assuming they run on dos, and one option would be to run them on dosbox, which has an option to slow down software. Its FOSS so you can probably peek at the code.

share|improve this answer
add comment

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.