Thursday, May 8, 2008

My Windows Misadventure: Older Games with Dual Core (or More) Processors

Seven months ago I finally got a PC that was capable of playing games from say, oh, the last 7 years. (My last computer had 4 MB VRAM. Yeah.) It's a Dell Inspiron 531 and it came with an AMD64 X2 3800+ 2.0 GHz Dual Core processor, 1 GB of RAM and Vista Home Basic installed, and shortly after getting it I installed a GEFORCE 7300GT video card which is fairly outdated now but it's still not a bad card by any means.

So now I say to myself, "Well, now that I have a relative beast compared to what was needed in the last 15 years, I can play whatever games I want," and for awhile this was true. I had trouble getting some games working properly such Command & Conquer, Red Alert and SHOGO: Mobile Armor Division, and they were certainly far from stable, but with some updates and compatibility mode toggling they ran and I was happy.

More recently PerfectCircle suggested that a few of us at the blog here play Serious Sam: First Encounter together, so I installed First Encounter and when I went to run it, it was chugging/stuttering majorly. So much so that I could barely manage the menus. I poked around on the internet and found a couple forums saying that the first two Serious Sam encounters won't work on Vista, and after months of contemplating it I came to the conclusion that it was finally time to install Windows XP.

What I decided to do was make a partition on my main drive (which involved a lot of tinkering around with settings, see: http://www.howtogeek.com/howto/windows-vista/working-around-windows-vistas-shrink-volume-inadequacy-problems/) so I could install Windows XP and dual boot so that I could keep Vista around, too. Well, that didn't work out too well as the XP install went awry, and I formatted the whole drive thinking that it was some sort of conflict. It wasn't, and I determined that the problem was the XP installation disk, so I had to get another one and that one did work. However, it wasn't smooth sailing after that.

The XP disk had no drivers for my nVidia network controller or my onboard Realtek soundcard, and this is where I delved into Linux head first for the first time. Before I tried dual booting I made an Ubuntu Live CD (Gutsy build, for those curious), and I didn't plan on using it but it really came in handy because running right off the CD I could do everything I needed to including go online and download drivers onto my other hard drive. It was really convenient and saved me the trouble of switching computers and burning those drivers onto a disk. For anyone who hasn't tried Ubuntu, it's really rather impressive how great it is 'out of the box' and can be useful for troubleshooting something that could be wrong in Windows, and I liked it so much that I'm now dual booting Ubuntu and Windows XP instead. Moving on...

So everything's installed, I get XP running and a bunch of the programs that I usually use installed and wow, I am impressed. XP users out there might be wondering why, but after using Windows 2000 for the past 5 years and then jumping to my Vista setup directly, I entirely skipped Windows XP except for when I had to use it at work and at school for mostly non-intensive things. It's not as lightweight as 2000 is, but it runs one hell of a lot faster than Vista did for me.

Anyway, I get around to setting up Serious Sam, and it installs fine, but when I go to play the framerate's jumpy, and it's not nearly as bad as when I installed it on Vista, but bad enough to the point where it hampered gameplay. So what the hell, right? Why wouldn't this work? I've literally spent all this damned time trying to get shit to work and it STILL won't work properly!? I had remained amazingly patient throughout this whole learning experience and process, but goddamn it I wanted things to work right for once. I was all out of answers when Dirkmenace found a forum post that suggested that the reason why the game wouldn't run smoothly was my dual core processor. In order to get it to work properly, what it said to do was hit Ctrl+Shift+Esc during gameplay to bring up Task Manager, right click on the program's .exe process, select Set Affinity and uncheck one of the cores. And...it worked! Hallelujah!! No more stuttering framerate: it was incredibly smooth, it was perfect, huge success, etc.

However, as I moved on to some other games, I noticed that it was pretty much every game that I wanted to play that seemed to have stuttering problems. From both First and Second Encounters of Serious Sam to Call of Duty 2 to even a game as recent as NHL 08 (side note: EA doesn't really care about their PC sports ports), none of them seemed to utilize my dual core processor without any hiccups. It gets kind of annoying to do that process every single time you start up the game, and by chance I discovered a way to make the game's executables start up using one core every single time.

This permanent method (it changes the executable, so be sure to make a backup of the .exe before trying anything) involves using imagecfg.exe. I grabbed it off a site via searching on Google (http://www.google.com/search?q=download+imagecfg) which probably isn't the safest thing to do, but if you want to pull it off certain Windows CDs you can.

What imagecfg.exe does is hardcodes the affinity a program starts up with and uses. Here's how I did it for CoD2 (after backing up the CoD2MP_s.exe and CoD2SP_s.exe files to another location, of course):
1. I copied imagecfg.exe to the main CoD2 folder where the executables for both single player and multiplayer are located.
2. Made 2 new .bat files, one for single player and one for multiplayer. (Right click in the folder, make a new text document, and just save it as something like cod2mp_affinity.bat. The .bat is the important part, and you can name it whatever you want.)
3. I edited those .bat files in Notepad, and inside the multiplayer one I put:
imagecfg -a 0x1 CoD2MP_s.exe
That's it, and saved the changes. The single player one's the same except you change the name of the .exe to CoD2SP_s.exe.
4. I doubleclicked on the newly edited and saved .bat files and just like that my CoD2 executables now load up and run with just one core instead of two.

Basically the imagecfg is what calls the imagecfg.exe in the folder, the -a sets the affinity, 0x1 chooses my first core, and CoD2MP_s.exe is the program this batch file is doing all this to. If you want more information about how this works and what these commands mean, I suggest you look at these links because they explain it pretty well:
After all this, it made me wonder if maybe the problem in Vista was just the dual cores since it was running, although it was far worse in Vista and unplayable unlike in XP. I'll probably reinstall Vista some day but for now I think I'll enjoy my games actually working properly.

EDIT: Seeing as how CoD2 uses the Punkbuster cheating/hack guard, CoD2 prrrobably isn't the best game to change your MP .exe, seeing as it got me booted off the server when I failed the MD5Tools check. So yeah, don't do it.

Labels: , , , , , , , , , ,


This page is powered by Blogger. Isn't yours?

Subscribe to Posts [Atom]