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
    Sorry about that Wobbegong... you were right that I got consumed with real life :)

    I know I had tried to get the files from you, but I don't I ever actually succeeded, since you were on 56k and the files kept getting bounced. If someone can send me the original iso, or the entire zipped civ2 folder, I promise i'll take a shot at it. If anyone is willing to try to send me the files, they can email it to my gmail address (below) or upload it to my ftp site (ftp.strafenet.com, anonymous upload should be enabled).

    The nocd version of the executable will possibly require a different patch than the other executable, so I might as well just patch the nocd version, so that it becomes the no-cd-no-limits-no-fans patched executable :)

    I'm somewhat busy with school/thesis/job, but I could probably write a patch this weekend if someone can get me the files.

    Again, sorry for never responding to you Wobbegong.
     
  2. Catfish

    Catfish Emperor

    Joined:
    Nov 2, 2003
    Messages:
    1,395
    Location:
    Wollongong, Australia
    No problem, it happens to everyone. :)

    Yeah, I remember I had some difficulty sending the files to that account - about 3 attempts before it didn't bounce. Obviously they still didn't make it through. I don't normally have trouble sending large files, despite my lousy connection speed. Anyway, I've uploaded 'ToT Lite' to your ftp site. It's everything you need to play the Original game, minus the sounds (you can use those from other versions). It even includes the ugly out-of-the-box ToT graphics. If you want to switch to City View, copy city.gif from the MGE version into the main game directory for ToT, otherwise it'll hang.

    I haven't used the no-limits patch; the executable in the Lite pack is the No-CD cracked version of 1.1. Here's the link to the ToT no-limits patch. I've also uploaded the No-CD crack separately (it's only 15 KB), so you can crack the patch.

    Good luck juggling all of those - and the patch, of course. ;)

    Thanks Tim for showing the interest. :goodjob:
    :goodjob: for Mike bumping the thread.
     
  3. timbatron

    timbatron Chieftain

    Joined:
    Nov 19, 2005
    Messages:
    19
    Great, I see the files on my ftp. I'll check them out tommorow and see what I can do. Hopefully I'll remember how I actually did it last time :)
     
  4. timbatron

    timbatron Chieftain

    Joined:
    Nov 19, 2005
    Messages:
    19
    Ok, I've got the initial patch done. This should fix the 100% cpu problem, and the executable here doesnt seem to require the CD to be in. You can get the file at http://tim.strafenet.com/files/civ2-tot-cpu-patch.zip

    It took me about 4 hours, so at my normal consulting rate, I think you guys owe me 160 bucks. Just kidding :)

    I've noticed that it now takes a really long time when you first start a new game. On my computer, it takes about 60-70 seconds to initially start the game. Everything else seems to work okay though. If anyone has any problems, let me know and I'll see what I can do about it.
     
  5. MikeLynch

    MikeLynch Just a Baker Street Muse

    Joined:
    Oct 5, 2003
    Messages:
    540
    Location:
    The Bering Isthmus
    On my desktop and laptop, it seems to reduce overall response time. Example: before the patch, I could hit X twice in rapid succession and get the zoom level I want; now, it only zooms out one notch after two quick key hits, so I have to hit it again.

    Likewise, the units now start moving as I am taking my finger off the key, rather than right after hitting the key.

    BUUUT, I'm no longer hearing the fan scream, and my usage isn't sky-high anymore. So this will be a great boon for those of us who couldn't even play the game before.
     
  6. timbatron

    timbatron Chieftain

    Joined:
    Nov 19, 2005
    Messages:
    19
    Hmm, I see. I understand why that's happening. I'll look at fixing that tonight.
     
  7. timbatron

    timbatron Chieftain

    Joined:
    Nov 19, 2005
    Messages:
    19
    Ok, thanks for the beta-testing Mike. I've got a new version available. You can snag it from here: http://tim.strafenet.com/files/civ2-tot-cpu-patch-v2.zip

    This fixes the long pause when generating a new map, and hopefully fixes the input problems that Mike noticed.

    Let me know how it works for you guys.

    For anyone interested in the technical details, I patched in a call to MsgWaitForMultipleObjectsEx to suspend the thread when there are no messages in the thread message queue. The old version patched in a call to Sleep(1) which seemed to cause problems.
     
  8. Catfish

    Catfish Emperor

    Joined:
    Nov 2, 2003
    Messages:
    1,395
    Location:
    Wollongong, Australia
    Your time's appreciated, mate. If I earned at those rates for the time I'd spent tinkering with computer games, I'd be doing well. :crazyeye:

    I haven't had much time to test. I downloaded the first version this morning and got the same lagginess as Mike. The second one seems OK. It just takes a few seconds to start the game. I guess the real problem is still the length of time it takes to complete the build world phase, especially for multiple-map scenarios, such as the Sci-Fi and Fantasy games (which you don't have installed). With the first version of the patch it took 7 minutes and 20 seconds to build a 4-map world on my Athlon 64 3500+. The second version was a vast improvement: a little over 40 seconds, but that compares with less than 2 seconds for the original unpatched version.

    The CPU usage levels are excellent. Unlike the MGE patch you released last year, usage levels are kept to a minimum even at the end of the player's turn.

    I'll test some more tomorrow night.
     
  9. MikeLynch

    MikeLynch Just a Baker Street Muse

    Joined:
    Oct 5, 2003
    Messages:
    540
    Location:
    The Bering Isthmus
    Well, I tested the second patch, and it was as fast as the out-of-the-box version. :goodjob: World creation took maybe 1.5 seconds tops -- same as before (but then I don't use multi-maps). Moving units, zooming, and giving other commands was great. If there was any lag at all, it was so barely perceptible that I can't be sure I really perceived it.
     
  10. MikeLynch

    MikeLynch Just a Baker Street Muse

    Joined:
    Oct 5, 2003
    Messages:
    540
    Location:
    The Bering Isthmus
    I've now tested the second patch on the faster of my 2 computers and can say categorically that I perceive no lag at all. Well done sir. For those who have rocked ToT's world, we salute you :rockon:
     
  11. timbatron

    timbatron Chieftain

    Joined:
    Nov 19, 2005
    Messages:
    19
    Glad to hear it's working better for you Mike. I'll be taking down the previous files at some point, and the new permenant link for these files will be at this address:

    http://tim.strafenet.com/civ2.html
     
  12. Mercator

    Mercator Emperor

    Joined:
    Mar 9, 2001
    Messages:
    1,069
    I only did some minor testing, but it seems to works perfectly for me as well. I don't notice any lag (I'm on an Athlon XP 1800+)... Thanks!

    One rather weird thing though: it takes a bit longer for ToT to launch and actually tries to access the floppy disk drive while launching. :hmm: After it fails to find a floppy disk, ToT starts as normal.

    Did you change the way the no-CD thing worked as well?

    If you're editing that anyway... :mischief: I think there are some CD checks that haven't been edited out, which cause some delays during the game. For example, when loading a saved game, after clicking OK on the dialog box, the game hangs for a bit before the map shows up. If there's a CD in the drive, or the CD drive is open, the map shows up immediately.
     
  13. timbatron

    timbatron Chieftain

    Joined:
    Nov 19, 2005
    Messages:
    19
    Mercator: I didn't change anything in the way the nocd works. I worked off the 1.1 nocd patch, so nothing should've changed with that, and I don't know why it would try to access your floppy drive. I don't personally have a floppy drive, so I hadn't noticed that with either version.

    As for the other nocd issues... these sorts of things take many hours to find, write, and patch... so if it's just something that happens once in a while, it probably isn't worth fixing :)
     
  14. Mercator

    Mercator Emperor

    Joined:
    Mar 9, 2001
    Messages:
    1,069
    Hmmm, strange then. My floppy drive doesn't even work anymore either. The only reason I keep it in is because I don't have the plastic thingy to cover up the hole if I take it out. Maybe I should just unhook the cables inside.

    And no problem with not fixing the other no-CD issues. Your work is already much appreciated.
     
  15. Titi

    Titi Prince

    Joined:
    Jun 28, 2002
    Messages:
    554
    Location:
    Angola
    I didn't have time to test it over the week-end, but I'll test both versions (original and timbatron's patch) to see if I've got the same results as Mercator.
     
  16. Catfish

    Catfish Emperor

    Joined:
    Nov 2, 2003
    Messages:
    1,395
    Location:
    Wollongong, Australia
    Well I've tested it on my old Athlon 1.33 GHz Thunderbird machine several times now and had no problems with the build world times - all under 2 seconds. The problem's just with my main rig (the Athlon 64 3500+). I've had a mouse issue for a few months, but done nothing about it. At seemingly random intervals the device pauses for 1-2 seconds at a time. It's more of an annoyance than anything. As it turned out, the build times I was getting were quite random and unrelated to the number of maps processed. I don't believe it's a reliable testing machine. This one's a problem for me to solve.

    The 'unpatched' No-CD version does this too, but without the delay. It's only about 10 seconds. I can live with that.

    Excellent work, Tim. :goodjob:
     
  17. ElephantU

    ElephantU Deity

    Joined:
    Aug 19, 2002
    Messages:
    2,272
    Location:
    Phila PA
    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?
     
  18. timbatron

    timbatron Chieftain

    Joined:
    Nov 19, 2005
    Messages:
    19
    Good lord, do you people ever run out of versions? ;-)

    Anyway, I think I have a version of civ 2 classic lying around somewhere, so maybe I'll take a crack at it this weekend. I make no promises though :)

    -Tim
     
  19. Mercator

    Mercator Emperor

    Joined:
    Mar 9, 2001
    Messages:
    1,069
    :hmm: indeed it does. I just downloaded the no-CD patch on your site and that does it too. I have another no-CD patch.

    Interesting. I just did a binary compare between "my" no-CD patched executable, "yours" and the original v1.1 executable. Both patches change completely different bytes.

    I just changed the bytes to match the bytes of the no-CD patch I have.
     
  20. timbatron

    timbatron Chieftain

    Joined:
    Nov 19, 2005
    Messages:
    19
    Mercator,

    So is "your" version of the nocd patch better? If so, I can make a version of the cpu that uses that nocd patch instead.
     

Share This Page