CPU usage is enormous

Looks like this thread got brought back from the dead again. I have a full time job now with MS, so I don't really do much programming outside of work these days. As a result, I probably won't do any more requests for more versions or features, but if any other programmers want to take a stab at it, I'd be happy to provide info about my patch and the tools I use.
 
Would you be able to post that here? That way a fix is more likely to get made, and you don't need to compose multiple emails if more than one person asks for the details.
 
Isn't the Timbatron's patch already for MGE :confused:
Reading this post and what he wroght on is site, I thought so ...

The MGE patch he made fixes the cpu usage only during the human turn. The patch also doesn't seem to apply to the end of the human turn & when you are looking at the city screen (although it does work for the city screen when you open the build options window). The patch that fixes that stuff is only for ToT.
 
Looks like this thread got brought back from the dead again. I have a full time job now with MS, so I don't really do much programming outside of work these days. As a result, I probably won't do any more requests for more versions or features, but if any other programmers want to take a stab at it, I'd be happy to provide info about my patch and the tools I use.

Hi, timbatron.

I would like to use an MGE version (since I cannot easily get my hands on TOT version), tried your patch and it worked as expected. Is there a way you could help me transfer to MGE version all that good work you have done for TOT, so I can play it without fanscreams and CPU overheats?

BTW, Alpha Centauri is great, but seems to have the same issue, so I didn't play it since I bought faster laptop, as the fan sound was too anoying to let me enjoy the game.
 
It's been awhile since I touched that code, so I'm not really sure what works and what doesn't work. Regardless, I'm done working on it for now, sorry.
 
timbatron: Even though you said you're done working on the EXE if you ever do pick it up again that with Hypertransport technology the EXE still in essence is using 100% and although it no longer appears as 100% on the task manager and now 50% the virtual half has no bearing the core temperature.
 
Please, I need help.
I've just installed a complete new CIV2 MGE game which works fine; then I have replaced the civ2.exe by the Timbatron's one (the good one, not the other for ToT).
But now when I launch the game, it crashes on the first screen, like this: http://img528.imageshack.us/my.php?image=civ2crashey9.jpg

Anyone has an idea ?

Thanks.
I had the same problem, oddly on a UK Windows 2000 machine. To fix it I changed the addresses for the !sleep calls (as listed in the civ2hack.txt). To find the addresses you need for your system you'll need a program called 'Dependency Walker' which ships with Visual C++, the process isn't pretty!

Open msvcrt.dll in Depend.exe, you'll find this dll in windows/system or winnt/system32 etc.
Find the Kernel base address, shown on the bottom of the screen
Find the offset of the sleep function in the kernel
Add them together
Swap the addresses in the two sleep calls, subtracting the addresses of the following instructions. The bytes (2 hex digits) in the address are entered in reverse
eg.
7BFD3E53
->533EFD7B

After four crashes I just about understood what was going on ... :crazyeye:
 
Nice job!

The Game Of The Month and some Early Landing games usually run on CivII Classic (2.4.2) because the AI is much more disagreeable in MGE and ToT. Any chance of patching that version as well?


I wrote a small programme that should fix the CPU issue for any version of Civ2. Simply extract it somewhere, edit the start.bat file, and adjust the path to point towards the civ2 executable. Please refer to the README for more information.

As for the requirements, it works on (my version of) WinXP and doesn't work on (my version of) Windows 2000. If there is interest, i can also provide a solution that works on (my version of) Windows 2000.

This is the initial release, so bugs and crashes cannot be ruled out.

EDIT: It can be downloaded here
 
Great, Till!

I always enjoy playing good ol'civ 2 once in a while, always had trouble getting my cpu usage to like 50% and the heat became 50+ degrees. Now it seem it won't happen anymore and that is magnifique. I tried Tim's version but it just appeared then vanished when using the exe. Likely cause I use v 1.1 of Civ2.

Seems that after i tried it it works ok, just can't start any scenarios. Also I can't load anything or start an existing map. Seems maybe the program can't find the location of these maps? Clicking them just nada happens maybe you know anything around this?

Thanks

NY.
 
I have a new and hopefully improved version ready. It should run much faster now, thanks to an alternative slowdown method timbatron pointed out to me. Much obliged!

Nyayr noticed some rather severe compatibility problems with CIV2 MGE, which should be fixed in this version. The new patch was successfully tested on Windows XP and Windows 2k.

According to poster Fifty, the patch also works with Alpha Centauri, by the way!
 

Attachments

  • CPU-Throttle.zip
    164.6 KB · Views: 1,879
Thank you for dealing with that problem,
really appreciating that!

The latest CPU-throttle works perfect!
Just want to add one thing:
I couldnt load nor save any game,
but putting the cpu-throttle-files in the same folder like civ2 does it.
Just in case anybody has the same problem.

So thanks again!
 
This newer version works ok so far I tested. You do have to use c:\games\civ2\civ2.exe as the place where it is located. I mailed Till about it and seems it is likely just a small thing. For now if you want to play Civ2 just use the path as in the readme.

A little thing, seems to work well till so far. :goodjob:

Ny.
 
I'm not much of a hacker, so I had a question about this. A friend of mine helped me to copy my Civ II MGE directory several times over, and overwrite each one for different modpacks I wanted to try, then made several different shortcuts on the desktop to start each modded version (so I could play whichever one I wanted without having to rewrite Civ II each time). So, I was wondering, if I point the start.bat to the civ.exe for the normal Civ II, it would only work for that one, I'm guessing. Which would mean that I would need a separate copy of start.bat that was keyed to the civ.exe for each modpack. Is this a correct assumption in my case?
 
Yes, you need an adjusted copy of start.bat for each programme you wish to launch with CPU throttle enabled.
 
I tried using the program. I rewrote the start.bat path pointing it at civ2.exe, put the full throttle folder in the folder i was using, and it would let me start a new game, but not start a scenario. I was wondering if I did anything wrong.
 
Does the "Ready to roll" messagebox appear? If not then the patch failed to apply itself for some reason. It shouldn't make any difference, but what version of Civ are you running? If it is MGE, do you have the 1.3 patch installed?
 
I am using the 1.3 patch of MPGold, and the Ready to Roll message did appear. I cannot load a scenario, or load a saved game, although it will allow me to start a new game. If I try the other two, the menu screen just blinks.
 
Okay, I was under the assumption that the CPU throttle folder must be in the Cvilization folder to run. It would not let me run a saved game or a scenario from there, altho it did allow me to start a new game. So, just to experiment, I placed the CPU throttle folder in the folder containing the saved games I was playing, and CPU throttle let me open the saved game, and scenarios. I don't know if I can open all save games, but it will let me open the games that are in that folder. I will edit this post later if it allows me to open all saved games.
 
Top Bottom