Memory-fix by Harkonnen is out!

lord_graywolfe
Probably some firewall-alike software prevents you from downloading EXE/DLL. So, did you download them or not? Just placing single Harkonnen.ini does nothing at all...
 
V. Soma
So, please reply

1) Have you managed to download zlib1.dll (or python24.dll) and PatchByHarkonnen.dll and place them into Civilization IV folder?

2) If the answer to (1) is YES, did you try 'vid_mem_usage=32', 'insane_mode=0' in Harkonnen.ini to avoid that graphical problem?
 
Well, with settings

vid_mem = 32 and Insane = 1 it seems to be OK so far! :)

Buddhism video was played fine,
and the grid was on pretty fast on a large map.

After playing like 25 turns,
memory usage is 300 MB,
with all graphics set to max (AA 4, all high)
 
This looks like great stuff, Harkonen. Are there some files I need to back up before applying your patch? What if I wish to "uninstall" your patch?

Currently, I run the game on Medium settings, and it runs quite well (small delays here and there, some stuttering video, etc.). Would your patch help me?

My Specs:

AMD Athlon 1900+
512MB PC133 RAM
ATI 8500LE 128MB card
 
Colonel Kraken
Currently there is zlib1.dll being replaced (it's changed only to load PatchByHarkonnen.dll), so you may want to back it up.

A day ago I used python24.dll to perform DLL injection, but that one was much bigger.

If you didn't make a back-up, check http://www.sampo.ru/~headden

There are Python.Original and zlib.Original folders with original versions of those DLLs coming when civ4 is being installed with 1.09 patch.

You may also set 'patch_on = 0' in 'Harkonnen.ini'. In this case my DLL will still load via zlib1.dll (or python24.dll), but it will do nothing at all.

Also note that in case Firaxis releases their next patch soon (and in case my patch won't be in it), you will probably have to replace zlib1.dll again.
 
Mirror kindly provided by phalzyr has been updated with zlib1.dll approach. It's given in updated post #1. No changes to patch itself so far, just replaced 3 files with 1 zip, 48Kb in size.
 
Ok I tried running the game without configureing the setup thing. The opening game loading time doesn't seem to have improved. But the time between turns seems to have cut in half! It used to take 5-10 mintutes between turns now between 2-3. So thanks! I have a few questions though.
First here are my system specs incase you need them.

Intel (R) Pentium(R) 4 CPU 2.93GHz
504mb Ram
160GB hard drive
Directx 9.0c
Intel(R) 82915G/GV/910GL Express chipset

Now my questions are...
1. You say to edit the configuration in the Harkonnen.ini file. The three files I downloaded have the file names python24.dll, PatchByHarkonnen.dll, and Harkonnen. Underneath the Harkonnen one it says Configure setting so I assume that is the one that is supposed to be the ini one. It says access denied and is not able to open in notepad or any other program. Is it incorrectly downloaded? Or what do you think is the problem?

2. Does it matter to your patch whether or not I keep it in windowed mode? Or can I return to full screen? The moving around the map with the control buttons is annoying.

3. While in windowed mode I watch the memory used in Windows task manager and it jumped between 300,000k and 360,000k What does that mean? Is that good or bad?

4. Finally I was going to get some more Ram to boost it up to a gig will that help the loading times for my game?

Thanks Harkonnen for your help!
 
Joebasalt13
1. Probably some antivirus software prevents you from editing 'Harkonnen.ini' or something keeps it open. You may try also download .zip file (check post #1 again, I've modified it several minutes ago).

2. It does not matter, but if you use 'insane_mode = 1' (Harkonnen.ini), you might have problems when alt-tabbing back into game. Most people get black map until it's updated, but I think this can lead to more serious problems. Basically, if you plan to alt-tab oftenly in full-screen mode, you should use 'insane_mode = 0', but this assumes that you can edit it...

3. 360Mb is something maximum when it fits 512Mb without swapping, but later in your game you will probably need more RAM. Also, 'insane_mode = 0' needs 80-100Mb more RAM, so to make 'insane_mode = 0' transition without loosing performance, you will surely need that upgrade. And after all, most games today require 1Gb to play well...
 
Ok I downloaded the ini file again and now realize what the problem was I can edit the file when it is on my desktop but when I place it in my WindowsPrefetch folder (Where my Civilization.exe file is) it won't let me edit it. Anyway As you probobly know My graphics card does not have TnL but I have never had problems with the graphics. I started off played on the highest graphic settings and all animations on and it worked fine. Other then the incredably slow load times. A couple days ago I switched it down to medium hoping it would be faster. My new question is If I wanted to run my game on Full Screen, with either Medium or High settings, Low Res Textures, but all the unit animation ON what would you recommend I set the things to. I don't alt-tab out of it ever I never knew you could. LOL When I want to check how much memory it is using I hit the windows key that opens the start menu.
Anyway thanks for the help.
 
Joebasalt13
Prefetch folder is internal Windows stuff, you are looking for Civilization4 in the wrong place.

Extract all 3 files into folder where you have installed the game. If you do not know where it is, most probably it is located at "C:\Program Files\Sid Meier's Civilization IV\" or something like that. You may also scan your hard drive for 'Civilization4.exe' and pick location which looks like that, but NOT prefetch folder :)

Harkonnen.ini and two DLLs (zlib1.dll or python24.dll) and PatchByHarkonnen.dll should all be placed in that folder, overwriting existing ones.

I recommend trying 'vid_mem_usage=40', 'insane_mode=0' for starters. If it runs fine, you may try changing 'insane_mode=1' - it should become better, but it might impose graphical bugs as well, even without alt-tabbing.

This patch is about memory-usage issues. The fact that it solves black terrain and CTDs is just an unexpected bonus, my aim was to reduce lags in the late game, so that seems what you are looking for... just follow the instructions above :) Good luck!
 
First, ultra-high kudos to you Harkonnen. One of the few real asm coders left, I reckon. God I miss Iczelion!

Second, Joebasalt13: You're in the wrong folder! If Civilization4.exe is in your windows prefetch folder, something is very wrong. The file you *think* is civilization4.exe is probably about 60-80 kb, right? You want one that's 11 megabytes.

If you really want to find anything on a windows box, stop explorer from hiding filename extensions.

Windows Explorer ->Menu "Tools" -> Folder Options -> View -> "Hide extensions for known file types"

UNCHECK THIS.
 
Stone-D
I didn't say that because those who are fluent with manually copying/overwriting files will do so anyway... Those who are not (I don't want to offend anyone), will just get more confused.
 
hark: just a suggestion by since it is so much smaller with zlib why not do rename for us... I.E. include the original also, already renamed :)

Or I guess just put it up as seperate download for when patch time does come we can dload it if we forgot to rename it. ;)
 
Harkonnen, nice job. I finally can play on a huge map w/o huge wait times inbetween turns. At least at the outset of the game, there is only a 1-2 second wait inbetween. Amazing.

CeleryD 2.4
1GB
fx5200
 
phalzyr and all
Post #1 updated. Bottom of the post now contain links to original 'python24.dll' and 'zlib1.dll' in case you want to restore them back.
 
As I understand it, Nvidia SLI cards don't share memory. So in my case, each GPU has 256 MB.

I gave it a shot with vid_mem_usage=400 anyway, just to see what would happen. It ran fine, but there didn't seem to be a difference between that and with vid_mem_usage=180. On one of my save attempts however, I got a memory allocation error (like the one in the "memory leak?" thread). Not sure if that was the cause or not. I'll probably drop back down to vid_mem_usage=180 or 200 and see if that error ever comes up again.
 
Back
Top Bottom