SC4 Devotion Forum Archives

SimCity 4 General Discussion and Tutorials => Tips, Tricks and Tutorials => Topic started by: HandsOn on June 22, 2008, 07:05:21 PM

Title: Vista, Dual Cores & Other Technicalities..
Post by: HandsOn on June 22, 2008, 07:05:21 PM
Notice & Warning:
This tutorial is NOT for  everyone. Part I is aimed only at folks  with dual-core CPU's who experience random crashes, and even then it is aimed  primarily at Intel CPU's. It is NOT the ultimate solution to all your worries!  If you have a faulty or errant graphics card (older ATI's come  to mind), this will most likely not help. In such cases read the notice at the  end of this tutorial – you are welcome to send  me your details, via PM or email, and I will try and help – no guaranties given. I have a wee bit of  experience with hardware – my first PC was an Osborne running on CPM (anyone  remember that?).

That said, a few folks have successfully applied  this solution – yours truly included – and lived to see game play without CTD's  other than through faulty installations of plug-ins.
You can also download this, in form of a PDF document here.. (http://docrorlach.webng.com/dlTracker.asp?GET=downloads/SC4%20Repacking%20Tutorial.pdf)

Disclaimer:
This information did not grow on my pasture, not at  all. I've read it in someone else's thread, here or elsewhere – I cannot  recall. But it saved me from giving up on SC4 entirely. I would love to give  credit to whoever came up with this solution first but I cannot remember who it  was (although I do "suspect" RippleJet!)

Part I:
The most important step you have to take is to make a backup copy of the SimCity 4.exe!
Make a copy in a different folder! If you do not do that  and you make a mistake during the next steps, you will have to re-install. So,  please make a backup now.
(https://www.sc4devotion.com/forums/proxy.php?request=http%3A%2F%2Fdocrorlach.webng.com%2Ftutorials%2Ffirst_screen.jpg&hash=216ad98e847476ddbef0aef755709502e821eba0)

(https://www.sc4devotion.com/forums/proxy.php?request=http%3A%2F%2Fdocrorlach.webng.com%2Ftutorials%2Fsecond_screen.jpg&hash=91bb8ea0e27a0ead803803f54fb533a0f3a885ea)

For the sake of this tutorial I am assuming  that your SimCity.exe is located in C:\PROGRAM FILES\MAXIS\SIMCITY 4 Deluxe\APPS.  If it is somewhere else, replace the path below with the one applicable in your  case. If it is on a different drive, you will need to switch to that drive  first by typing the drive letter, followed by a colon (:), followed by the  enter key.

The parenthesis  ("") around SimCity 4.exe must be typed as well, otherwise you will get an error  message!

This will set the affinity of SC4 to CPU 0 - the only one it truly "understands". In other words, from here on SC4 will no longer get confused and thus only use the first of your two processors. Having said that, there really is nothing to prevent you from assigning anyone of the two (or four) processors. The parameter 0x1 indicates the first CPU (#0), 0x2 the second, 0x3 the third, 0x4 the fourth. I ma just waiting for someone to come along with an octo-core (and don't think I am kidding).

Wait for a  moment – it does not take long. ImageCFG is re-packaging the EXE.  You will see a series of instructions the  utility is carrying out, looking something (but not exactly) like this:
(https://www.sc4devotion.com/forums/proxy.php?request=http%3A%2F%2Fdocrorlach.webng.com%2Ftutorials%2Fimgconfig.jpg&hash=1c6d05642b5553a1b546172459ae44841bd55d16)

The screen above is ONLY a sample screen of what will be happening: Yours will look slightly different!

Once the process  is complete, you'll be back at the command prompt and you can type Exit to close the DOS Window.

Before  you storm off to play again, please also do the priority fix in Part II, the two work best  together.

If you have problems, delete the fixed  SimCity 4.exe (or rename it) and copy the backup you made at the beginning - you did make one, right? - back to its proper location.

Part II:
The following is an optional addition to the SimCity 4 Shortcut – it works both on Vista as well as on XP, and can be  applied regardless of the CPU – dual core or single core. What it does is to  change the priority the game takes over other stuff that might be running. It  does not automatically put it ahead of everything else, but it will set it to  high, which usually is more than good enough, and happens regardless of the load order.

To do this, right-click on the shortcut you  always use to run the game, then select Properties. The following window (under  Vista – XP is similar) comes up:
(https://www.sc4devotion.com/forums/proxy.php?request=http%3A%2F%2Fdocrorlach.webng.com%2Ftutorials%2Ffourth_screen.jpg&hash=b871b1c3968887989bf4cf147f0d1eee0f1b6163)

In your case it will probably say "C:\.."  instead of my "D:\.." but that is not relevant here. Important is that you put the following text (best copy & paste) BEFORE  whatever it says on that line:
C:\Windows\System32\cmd.exe /c START "high  priority sc4" /high  

Exactly as it is shown here, including the  parenthesis. Thus, the entire line will then read:
C:\Windows\System32\cmd.exe /c START  "high priority sc4" /high "D:\Program Files\Maxis\SimCity 4  Deluxe\Apps\SimCity 4.exe"

(https://www.sc4devotion.com/forums/proxy.php?request=http%3A%2F%2Fdocrorlach.webng.com%2Ftutorials%2Ffifth_screen.jpg&hash=1636a637afa30070316ea7a20cbcae026bfdf282)

All quotation marks (parenthesis) must be  used. If you have any games switches, like -Intro:off or some such, they must come at the very end, after the last quotation mark.
Click "Apply" or "OK" and close the dialog. You are done.

Final Note:
If you still have problems, do email me (see profile), or send me a PM - including all the  details about your computer, your graphics cards, Windows OS, etc., that you  can find. I will try and help, but you'll need to be patient – I am not always  at my PC.

Peter

NB: An alternative to this method - if you don't mind reading the official, eh, lingo, can be found right here - straight from the horses mouth.. (http://support.microsoft.com/default.aspx?scid=KB;en-us;252867)


EDIT 2009/10/04:
Corrected links to images and download
/Tage
Title: Re: Vista, Dual Cores & Other Technicalities..
Post by: CasperVg on June 22, 2008, 08:31:31 PM
Great tutorial, really useful. Is there also a way instead of setting the affinity to one core alone, also isolate SC4 on that core (so that it's the only process running there)
Title: Re: Vista, Dual Cores & Other Technicalities..
Post by: HandsOn on June 22, 2008, 08:36:13 PM
Quote from: caspervg on June 22, 2008, 08:31:31 PM
Great tutorial, really useful. Is there also a way instead of setting the affinity to one core alone, also isolate SC4 on that core (so that it's the only process running there)
Thanks for reminding me - I should have made that clearer: this is exactly what the imageCFG does - when you enter the details on the command line the affinity is set to CPU 0, the only one SC4 will regocnize. Will edit it shortly.

BTW: What are YOU doing up at this wee hour of the morning..???  %wrd
Title: Re: Vista, Dual Cores & Other Technicalities..
Post by: Filasimo on June 22, 2008, 09:36:03 PM
call me a newbie for asking hands on will this also work with amd quad core systems and with people with nvidia cards?  :-[
Title: Re: Vista, Dual Cores & Other Technicalities..
Post by: Shadow Assassin on June 22, 2008, 09:37:03 PM
Question: can it be set to run on CPU 1, rather than CPU 0?
Title: Re: Vista, Dual Cores & Other Technicalities..
Post by: HandsOn on June 22, 2008, 09:54:20 PM
Quote from: Filasimo on June 22, 2008, 09:36:03 PM
call me a newbie for asking hands on will this also work with amd quad core systems and with people with nvidia cards?  :-[

Filasimo : I have never had the chance to try it  :'( (when can I get a quad??) but I see no reason why not. The principle is the same:

Just change the parameter 0x1 to whichever CPU you intend to use. Just remember, CPU's are zero-based 0 is actually 1  $%Grinno$%
0x1 = CPU0 (first logical/physical CPU)
0x2 = CPU1 (second CPU)
0x3 = CPU2 (third CPU)
0x4 = CPU3 (third CPU)

The graphics card does not come into the equation. However, Nvidia's below 8500 series sometimes "lose" their driver momentarily. Your screen goes funky, odd-coloured. All you have to do is to wait (under Vista only) until Windows displays a notification, click that away, and most times normality resumes. Do check with nVidia for driver updates (7300 series was just updated a months ago).

Shadow-Assassin: this should answer your question as well.

Call me an oldie, if you want, but I am reminding you : make a backup of the EXE first!
Title: Re: Vista, Dual Cores & Other Technicalities..
Post by: Filasimo on June 22, 2008, 10:30:15 PM
thanks for the reply hands on and nice find on this tutorial...and yeah wasnt sure if itll work on AMD quad cores as for nvidia i tend to get the 9 series 9600GT to be exact so that wont be a problem...yeah and nvidia did come out with a new driver update which i picked up last month or was it earlier this month  ()what() reason i asked this question is because im going to be building a high end PC by the end of this year so wanted to find out more info on this tutorial....again thanks!  :thumbsup:
Title: Re: Vista, Dual Cores & Other Technicalities..
Post by: HandsOn on June 22, 2008, 10:34:20 PM
Quote from: Filasimo on June 22, 2008, 10:30:15 PM
thanks for the reply hands on and nice find on this tutorial...and yeah wasnt sure if itll work on AMD quad cores as for nvidia i tend to get the 9 series 9600GT to be exact so that wont be a problem...yeah and nvidia did come out with a new driver update which i picked up last month or was it earlier this month  ()what() reason i asked this question is because im going to be building a high end PC by the end of this year so wanted to find out more info on this tutorial....again thanks!  :thumbsup:
'Scuse me? You are going to built a high-end PC? What are you calling your current set-up? Middle of the road????  :shocked2: (sorry, that's just, with a "slight" tinge of envy-green..  $%Grinno$%
Title: Re: Vista, Dual Cores & Other Technicalities..
Post by: Filasimo on June 22, 2008, 11:58:32 PM
Quote'Scuse me? You are going to built a high-end  PC? What are you calling your current set-up? Middle of the road?Huh  shocked2 (sorry, that's just, with a "slight" tinge of envy-green..  Grin No

hehe that made me laugh lol  :D when i built my current one it was 4 years ago and at that time it was high end minus the gfx card...AGP gfx cards were just ridiculously expensive back then compared to now with PCI-E... i tend to build a quad core AMD system with around 4 gigs of RAM and a nvidia 9600GT gfx card....but still its just about high end anyways still doing more extensive research been doing it for the past 2 months but i did get a sweet case and also a 1TB seagate external drive which is awesome...anyways...if youre interested in following my research pm me  :thumbsup:
Title: Re: Vista, Dual Cores & Other Technicalities..
Post by: Shadow Assassin on June 23, 2008, 05:30:38 AM
I'm happy, because I can play SC4 at university on my laptop. :P

Dual core, nVidia 9500m GS, 2GB of RAM... plays most games very well. SC4 runs very well on it, apart from the random crashes, which seem to have been fixed now thanks to this.


[edit: where'd I get 4GB from, I meant 2GB :P]
Title: Re: Vista, Dual Cores & Other Technicalities..
Post by: HandsOn on June 23, 2008, 05:35:18 AM
Quote from: Shadow Assassin on June 23, 2008, 05:30:38 AM
I'm happy, because I can play SC4 at university on my laptop. :P

Dual core, nVidia 9500m GS, 4GB of RAM... plays most games very well. SC4 runs very well on it, apart from the random crashes, which seem to have been fixed now thanks to this.
"Quality", as an agent recently said to me (it was his every fourth or fifth word  ;D - glad we have another success story on our hands.
Title: Re: Vista, Dual Cores & Other Technicalities..
Post by: MassHelper on September 18, 2008, 03:38:00 PM
Don't get it.... Can some1 explain to me or show me some pics of how it works when applying it to SC4...

:( Mass
Title: Re: Vista, Dual Cores & Other Technicalities..
Post by: Lathen on October 28, 2008, 06:03:14 AM
 :thumbsup: Thank you VERY much for this tutorial!!!  I was having tons of CTD's and I thought it was new content I had downloaded.  (Just upgraded to vista 64) This has taken care of the problem completely!  I had a bit of a learning curve with the whole "run as administrator" and "ownership" stuff, but I got it all figured out, my game is running beautifully again!   :satisfied:
Title: Re: Vista, Dual Cores & Other Technicalities..
Post by: Ikarius on December 02, 2008, 11:13:31 PM
A note here- there's an update for simcity distributed on the BAT tool page- http://simcity.ea.com/coolstuff/bat/index.php
(You need to have registered your CD code on the site and be logged in to see or download it, but the link to the update is on the left hand side of the page)

I had already installed that update ( it requires the EP1 update already be installed) because some mod noted it was required for custom content night lighting to work correctly.  Anyhow, when I pointed the imagecfg tool at my "Simcity 4.exe", it told me that my executable is already set to run in uniprocessor mode.  So, it looks like EA snuck out an update which should work correctly on our multi core systems... they just forgot to tell anyone!

Cheers
   Ikarius
Title: Re: Vista, Dual Cores & Other Technicalities..
Post by: Kitsune on December 17, 2008, 08:10:31 PM
How does hyper threading come into play? I remember seeing SC4 back in the pentium 4 days saying HT friendly, or something along to lines. Now once I get back into Canada, my new computer is quad core with hyper threading, so will the hyper threading get in the way of setting this to unicore?
Title: Re: Vista, Dual Cores & Other Technicalities..
Post by: wouanagaine on December 17, 2008, 11:51:28 PM
When you set the core affinity, if the core is HT capable, the game will still use the HT of that only core ( if the game is HT ready )
Title: Re: Vista, Dual Cores & Other Technicalities..
Post by: SimSmokr on January 08, 2009, 08:02:46 PM
Hi.
I am running a P4 3.2 with Hyperthreading and 800FSB, 2GB of DC memory, and a Radeon 3850HD. I've not had SC4 on this computer before, and after installing it, I have CTDs about half the time when zooming out and seemingly random CTDs at other times. In addition, the game loaded slower, seemed less snappy, smoke and fog and factory smog as well as the sims and vehicles were stuttering, and menus were laggy.
I've never had such problems before, and knowing the video card can hardly be to blame, and after finding this thread here, I followed the instructions, and viola!, so far no CTDs, though I've only tried a few times, but still, it would CTD everytime I tried to zoom out on this city until now.
After mucking about a bit, I did get a couple of CTDs on zoom out, and since I have quite a few things running, I changed it to run on x2 instead, and so far, I can't get it to CTD! It also runs so fast and smooth I can't believe it's the same game.
Thankies mucho grande! (No, don't speak Spanish and not Latino, just like the phrase for huge thanks)
Title: Re: Vista, Dual Cores & Other Technicalities..
Post by: Jmouse on January 08, 2009, 09:08:42 PM
Valuable info, HandsOn. My new computer - which still isn't working right - has a an Intel Core-2 Duo and I'm thinking of upgrading to Vista. I'm marking this spot for a return visit when the other issues get fixed. Thanks for posting.

Later...
Joan
Title: Re: Vista, Dual Cores & Other Technicalities..
Post by: SimSmokr on January 09, 2009, 06:27:08 PM
After a night and an evening of play, I've not had a single CTD! After all this time of saving before changing zoom levels, I now can no longer worry about it!
To anyone considering trying this out to help with your SC4 CTDs, I suggest you go for it! I've tried all other things to stop the CTDs, including DatPacker to shrink my plugins folder, sorting and resorting then repacking, and endless other 'tweaks', this thread solved my nearly constant crashing to desktop while changing zoom levels and rotating the view.
In the effort to make sure before I returned to sing the praises of this thread, I loaded my largest, worst, most demanding city, the center large area on London, fully built to stage 8 and filled with Landmarks, piers, NAM and other optional components. Not only did it load fine, which sometimes it did not, it allowed me to zoom out before the buildings were done being drawn (which previously meant a CERTAIN CTD) and I could rotate view and change zoom at the same time! Factory smoke, fog and clouds are all smoothly animated, cars, trucks, trains and planes move smoothly, hovering over a building no longer causes jitter, and best of all, no CTD while waiting for the city to save and exit to region view!
This literally solved every lingering problem! On both HT computers! I imagine this would also solve the same issues on any multiple CPU system.
Thank you!
Title: Re: Vista, Dual Cores & Other Technicalities..
Post by: VeTram on April 09, 2009, 02:52:36 PM
I also tried this , but unfortunately it isn't working ....it displays a message saying.."unable to map and load SimCity 4 .exe"...i have followed exactly the directions in the tutorial , but still it doesnt work...any idea?
thanx
Title: Re: Vista, Dual Cores & Other Technicalities..
Post by: CabraBuitre on June 24, 2009, 07:24:07 PM
Anybody have any tips?  the http://www.robpol86.com/pages/imagecfg.php site isn't working.  I tried it a few days ago when I found out about the fix... but I didn't download the imagecfg at that time.  Now it appears to be gone!
Title: Re: Vista, Dual Cores & Other Technicalities..
Post by: null45 on June 24, 2009, 07:50:47 PM
The Web Archive has a copy at http://web.archive.org/web/20060426043420/http://www.robpol86.com/Files/imagecfg.exe (http://web.archive.org/web/20060426043420/http://www.robpol86.com/Files/imagecfg.exe)
Title: Re: Vista, Dual Cores & Other Technicalities..
Post by: CabraBuitre on June 24, 2009, 07:56:49 PM
AWESOME, thanks Null!  I always check out archive.org for live concerts... but I've never thought to look for old webpages!
Title: Re: Vista, Dual Cores & Other Technicalities..
Post by: CabraBuitre on June 24, 2009, 08:14:06 PM
I'm having an issue running the fix.  Here's a pic of what I get:

(https://www.sc4devotion.com/forums/proxy.php?request=http%3A%2F%2Flh5.ggpht.com%2F_QFpK53LUI-E%2FSkLr-hKAIFI%2FAAAAAAAAAd0%2FVTXS8dt_tMk%2Fs800%2FUntitled1.jpg&hash=ecf7aff628476aa6f221b9e03cccdfde8ec85986)

"IMAGECFG:  unable to map and load oSimCity
IMAGECFG: unable to map and load 4.exeo"

I tried it twice... but to no avail.
Title: Re: Vista, Dual Cores & Other Technicalities..
Post by: u.mueller on September 26, 2009, 03:08:28 AM
Howdy same problem here!

C:\Program Files (x86)\Maxis\SimCity 4 Deluxe\Apps>dir
Datenträger in Laufwerk C: ist Vista
Volumeseriennummer: 3ED8-B2CA

Verzeichnis von C:\Program Files (x86)\Maxis\SimCity 4 Deluxe\Apps

26.09.2009  11:44    <DIR>          .
26.09.2009  11:44    <DIR>          ..
27.08.2003  03:01           153.718 00000000.016
27.08.2003  03:01           308.280 00000000.256
09.07.2003  02:42           486.400 dbghelp.dll
27.08.2003  03:01            41.472 DRVMGT.DLL
11.11.1996  08:00            51.472 IMAGECFG.EXE
27.08.2003  03:01            12.400 SECDRV.SYS
23.09.2003  11:45         7.524.352 SimCity 4.exe
27.08.2003  03:00                47 SimCity 4.ini
               8 Datei(en),      8.578.141 Bytes
               2 Verzeichnis(se), 149.985.206.272 Bytes frei

C:\Program Files (x86)\Maxis\SimCity 4 Deluxe\Apps>IMAGECFG.EXE -a 0x1 "SimCity
4.exe"
IMAGECFG: unable to map and load SimCity 4.exe

C:\Program Files (x86)\Maxis\SimCity 4 Deluxe\Apps>
Title: Re: Vista, Dual Cores & Other Technicalities..
Post by: dragonshardz on September 26, 2009, 09:49:33 PM
Try removing the space between SimCity and 4.
Title: Re: Vista, Dual Cores & Other Technicalities..
Post by: u.mueller on September 27, 2009, 10:50:40 PM
As Simcity just kept on crashing :angrymore:, which is really nagging me, since this new laptop of mine is really a good machine for Simcity, I kept looking into the problem!

The command syntax e.g. Cababuitra and me entered is perfectly in order. The problem in my case was that strangely enough my own user had not full access rights to that specific folder. So here's what you have to check if imagecfg.exe spits out "Unable to map and load "SimCity 4.exe" on you:

1. Go into the "...\Maxis\SimCity 4 Deluxe\Apps" folder and mark "SimCity 4.exe".
2. Right-click the file and select "Properties" (in my case since I have a German OS "Eigenschaften").
3. In "Properties" go to the "Security" tab. You should see some user accounts. Find the one with your Username on it and click on "Edit" to modify your user rights (this should bring up a UAC prompt). Make it so you have full access (read and write). Just for the completeness also do this with the "Administrator" user which is likely to be there.
4. Hit "OK" and now try running the "imagecfg.exe" again.


This should now work! In case of any questions, please just let me know.


Disclaimer: I shall not be hold responsibility for any stuff you do with your own or FWIW with your dad's or elder brother's computer or any repercussions arising thereof nor any penal implications resulting from aforementioned repercussions. Any changes to your copy of SimCity, files related thereto are at your own risk.  :-[ :P :-\
Title: Re: Vista, Dual Cores & Other Technicalities..
Post by: fafalone on February 15, 2010, 08:04:32 PM
If you don't want to modify the EXE, it's possible to set CPU affinity using Process Explorer; a freeware program that's basically a supercharged task manager (it even has an option to replace it when you hit ctr alt del).

HOWEVER,
Is this topic supposed to be specific to Vista? Or all dual core setups?

I used to have frequent CTDs when jumping around without letting buildings loads, zooming too quick, and other random times. I never saw day time lighting effects on the RMIP, or sims standing around, figured it was the graphics settings. but last night i set the -CPUCount flag to 2, and now they show up. And I never get those random crashes anymore.

Could the problem be with dealing with 2 logical CPUs instead of 2 physical units in a system it detects has 2 CPUs? I'm using xp pro 32bit on a dual core intel centrino.
Title: Re: Vista, Dual Cores & Other Technicalities..
Post by: Trooper47 on May 14, 2010, 02:47:54 PM
Strangely enough this is not working for me. I don't know how the line reads in English but it said "this program has stopped working" or something like that (vista error). My antivirus also gives me a warning that SC4.exe is a virus wile I'm running imagecfg....?

Anyhoe, I can change the affinity in the taskmsgr, but quiet frankly, I'm getting tired that I always have to ctrl-alt-delete after I start Sc4 up.
I run a Quad Core under Vista X86. If someone can tell me where to find the bugglog I could give you some more specific information.

Edit: After some research along the internet I found that you can alter your short cut kind of like described in part II. But You type this:
C:\Windows\System32\cmd.exe /c START "SC4" /high/Affinity 8

The affinity can be set to any CPU core by changing the number to the corresponding hex value.
1st core = 1
2nd core = 2
3rd core = 4
4th core = 8
5th core = 10 ( hexadecimal 16 )
6th core = 20 ( hexadecimal 32 )

So in my case I set it to the 4th core.
Example of the complete line: C:\Windows\System32\cmd.exe /c START "SC4" /high/Affinity 8 "C:\Program Files (x86)\Maxis\SimCity 4 Deluxe\Apps\SimCity 4.exe" -Intro:off
The Intro off is to turn off the pre game clips.

Source (http://www.vistax64.com/gaming/197915-setting-processor-affinity-made-easy.html)