1. We have added a Gift Upgrades feature that allows you to gift an account upgrade to another member, just in time for the holiday season. You can see the gift option when going to the Account Upgrades screen, or on any user profile screen.
    Dismiss Notice

CPU usage is enormous

Discussion in 'Civ2 - Technical Support' started by prepareforwar, Feb 14, 2005.

  1. timbatron

    timbatron Chieftain

    Joined:
    Nov 19, 2005
    Messages:
    19
    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.
     
  2. ctc5

    ctc5 Chieftain

    Joined:
    Sep 1, 2007
    Messages:
    5
    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.
     
  3. timbatron

    timbatron Chieftain

    Joined:
    Nov 19, 2005
    Messages:
    19
    No, sorry. I'd rather not publish anything like that due to legal issues.
     
  4. ctc5

    ctc5 Chieftain

    Joined:
    Sep 1, 2007
    Messages:
    5
    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.
     
  5. ctc5

    ctc5 Chieftain

    Joined:
    Sep 1, 2007
    Messages:
    5
    OK, fair enough. :)
     
  6. haznfefer

    haznfefer Chieftain

    Joined:
    Sep 17, 2007
    Messages:
    1
    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.
     
  7. timbatron

    timbatron Chieftain

    Joined:
    Nov 19, 2005
    Messages:
    19
    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.
     
  8. skuzzy

    skuzzy Chieftain

    Joined:
    Aug 13, 2003
    Messages:
    1
    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.
     
  9. Dagobert

    Dagobert Chieftain

    Joined:
    Mar 23, 2008
    Messages:
    1
    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:
     
  10. Till

    Till Adventurer

    Joined:
    Aug 20, 2005
    Messages:
    4,170
    Location:
    Background Noise

    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
     
  11. Nyayr

    Nyayr Chieftain

    Joined:
    May 14, 2008
    Messages:
    250
    Location:
    Holland
    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.
     
  12. Till

    Till Adventurer

    Joined:
    Aug 20, 2005
    Messages:
    4,170
    Location:
    Background Noise
    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!
     

    Attached Files:

  13. qwertas

    qwertas Chieftain

    Joined:
    May 18, 2008
    Messages:
    4
    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!
     
  14. Nyayr

    Nyayr Chieftain

    Joined:
    May 14, 2008
    Messages:
    250
    Location:
    Holland
    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.
     
  15. chieflookout

    chieflookout Chieftain

    Joined:
    Sep 13, 2007
    Messages:
    48
    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?
     
  16. Till

    Till Adventurer

    Joined:
    Aug 20, 2005
    Messages:
    4,170
    Location:
    Background Noise
    Yes, you need an adjusted copy of start.bat for each programme you wish to launch with CPU throttle enabled.
     
  17. chieflookout

    chieflookout Chieftain

    Joined:
    Sep 13, 2007
    Messages:
    48
    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.
     
  18. Till

    Till Adventurer

    Joined:
    Aug 20, 2005
    Messages:
    4,170
    Location:
    Background Noise
    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?
     
  19. chieflookout

    chieflookout Chieftain

    Joined:
    Sep 13, 2007
    Messages:
    48
    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.
     
  20. chieflookout

    chieflookout Chieftain

    Joined:
    Sep 13, 2007
    Messages:
    48
    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.
     

Share This Page