WineHQ

The Sims 2

DVD/CD version of the game.

Application Details:

Version: x
License: Retail
URL: http://thesims2.ea.com
Votes: 179
Latest Rating: Garbage
Latest Wine Version Tested: 1.5.17

Maintainers: About Maintainership

Test Results

Old test results
The test results for this version are very old, and as such they may not represent the current state of Wine. Please consider submitting a new test report.
Selected Test Results

What works

Manual installation and launching the game.

What does not

The game can not load, freezes with an error that says:

Direct3D returned an error: D3DERR_INVALIDCALL! The application will now terminate.

CD detection of second disk failed in install with 4 cd version for me. 

What was not tested

The game play.

Additional Comments

Would be wonderfull if someone could find solution for this problem.
selected in Test Results table below
Operating systemTest dateWine versionInstalls?Runs?RatingSubmitter
CurrentUbuntu 12.04 "Precise" i386 (+ variants like Kubuntu)Nov 17 20121.5.17Yes No Garbagean anonymous user 
ShowArch Linux x86_64Jun 26 20121.5.7Yes No GarbageEmily Marriott 
ShowUbuntu 10.04 "Lucid" amd64 (+ variants like Kubuntu)Apr 06 20121.4Yes No Garbagean anonymous user 
ShowGentoo Linux x86_64Sep 10 20111.3.28Yes No GarbageCharles Simmons 
ShowArch LinuxJul 23 20111.3.24Yes No GarbageShaun 

Known Bugs

Bug # Description Status Resolution Other apps affected
8051 Sims 2 demo exits prematurely NEW View

Show all bugs

HowTo / Notes

The game is playable by patching Wine.

While still far from perfect and prone to unexpected crashes (dependent on hardware), The Sims 2 can work fairly well if you possess later expansion/stuff packs that can update the base game as close to © 2008 as possible.

The infamous D3DERR_INVALIDCALL is due to the fact Wine is hardcoded to supply 256 vertex shaders instead of 1024 that The Sims 2 demands. Patching this constraint, as well as providing "dummy" code for an unimplemented shader interface allows the game to play to surprising results.

There are still some glitches, such as:

  • Sims' portraits turning red to their T pose (in the neighbourhood screen) after saving. 
  • Changing appearance can result in a darker skin tone in the portraits.
  • Glitched animations or rendering.

The game's rendering (lighting?) engine has also changed significantly from it's initial release in 2004, meaning that the latest base game version (EP9, © 2008) plays a lot better then the original base game and earlier expansion packs.

Here's some videos showing the game in action:

  • Base Only - 08/17/2004 Version: https://www.youtube.com/watch?v=j-pFDlEtnC0
  • EP9 - 10/11/2008 Version: https://www.youtube.com/watch?v=h9rZPdNLd6I
  • Another video: https://www.youtube.com/watch?v=nzO4t-5TKhU

Before you start: These steps are provided as-is. Patches may stop working with newer versions of Wine, and please do not submit any test results as this is not a true reflection of vanilla Wine or wine-staging.

Instructions

1) Grab the latest source (confirmed to work with 1.8-rc2 to 1.9) for Wine from: http://dl.winehq.org/wine/source/ 

2) Download comment 124's patch (from bug report) from http://bugs.winehq.org/attachment.cgi?id=52904 and save as a .diff file. For details on what this patch does, see bug report #8051.

Note: This patch hardcodes the shader model to version 2. If you wish to test with SM3 using the registry keys, unpatch directx.c.

3) Open the terminal, cd to the root of the source (wine-xxxx/) and patch: 

$ mv wine-xxxx/ a/

$ patch -p0 < the_patch.diff 

4) Enter the directory to configure and make Wine. I used a 32-bit distro to save the hassle with 64-bit setups: 

$ ./configure 

$ make -j4  (change 4 to your number of cores to speed up compiling)

5) Install/start the game from the source directory:

$ env WINEPREFIX=/path/to/sims2_wine_prefix/ ./wine explorer 

Have fun!

Want it precompiled instead?

If you're impatient, a pre-compiled binary and source is available at https://www.dropbox.com/s/mna97xftkwfved0/wine-1.9.0-patched-sims2.tar.xz (except directx.c was unpatched so shader model versions can be set from the registry)


Adjust your settings accordingly

To prevent the resolution messing up the desktop or causing a crash, a virtual desktop may be essential, but it may work fine without one. When they say Wine can play games better then Windows. This might be true, the shadow bug caused by high settings is not present! (NVIDIA driver bug on Windows).

I also found the game to crash much less on a faster 3.7 GHz processor than at 2.7 GHz. Both ran adequately at both 1024x768 and 1920x1080 (1080p) resolutions.


Acknowledgements

A thank you goes to swswine for discovering the game's major unimplemented undocumented shader interface and for writing the patch to demonstrate.

Once again, please do not submit test results here as this is a hack to get the game running. Continue to submit tests for vanilla Wine or wine-staging (as long as this is explicitly stated), but it seems unlikely we'll see improvements from "Garbage" until the hardcoded limit is raised and there is a solution to adding the missing undocumented shader interface.

Wine patch incompatible with Wine 1.9.7 and newer.

The notes for applying a patch to get the game to play only works for Wine 1.9.6 or older.

The game is broken and will not start in Wine 1.9.7 or newer builds - with or without a patch.

Comments

The following comments are owned by whoever posted them. WineHQ is not responsible for what they say.

Sims 2 not starting anymore after new graphics card kernel-upgrade and amdgpu
by Katherine Williams on Saturday January 14th 2017, 4:54
I got an RX 480 for Christmas, I upgraded to a newer Linux kernel, installed amdgpu and the newest mesa and now Sims 2 does not start anymore.
It opens a window and then it stays blue, and I have to force quit it after a while.. Which of the changes is the problem and can i make it work again?
Partially Playable Again under Wine 1.8-rc2 (Comment 124 on bug 8051)
by Luke Horwell on Friday December 4th 2015, 10:04
Another user has made an interesting discovery of how shader validation has been failing and is causing "red error eagles" to appear. A patch has been provided that proves this and can be used as a way to troubleshoot and identify any "unimplemented" features. (It's not a fix or a workaround!)

What I've found out is that disabling the game's lighting engine via the console (boolProp lightingEnabled false) while forcing shader version 2 stops these rendering glitches and allows the game to be playable for the first time (without lighting, of course).

Here's a video to demonstrate:
www.youtube.com/watch?v=j-pFDlEtnC0

A pre-compiled source of wine-1.8-rc2 with the patch is provided in the video's description if you'd like to try it for yourself.

I take no credit for the patch, it's great to see this game has potential! :)
How to hack Sims 2 into partial function in Wine 1.1.36
by Robert Showalter on Tuesday January 19th 2010, 15:27
Per discussion in Bug 8051, it should be noted that the main problem appears to be with vertex shaders. Specifically, Sims 2 is requesting 1024 vertex shader constants, but Wine (and current GPUs??) is limited to 256. In the REAL Direct3D 9, it supports up to 8192, and the remainder that are not hardware supported fall into software emulation. Wine currently lacks this.

You CAN get Sims 2 to run somewhat (with graphics errors that generally render it unplayable) in Wine 1.1.36 by doing a couple modifications to the source to override the default maximum. NOTE: This is NOT a FIX, only a hack to get it to function a little for the curious.

Based on part of an old patch -- bugs2.winehq.org/attachment.cgi?id=12615 -- modify dlls/wined3d/device.c and in the function IWineD3DDeviceImpl_SetVertexShaderConstantF, under the TRACE line, add the following block:

---------------

/* FIXME: when doing software vertex processing d3d9 allows up to
* 8192 shader constants. gfx card limits doesn't matter in this case.
* for now just make sure we're not accessing more constants than we have.*/
if(start + count > This->d3d_vshader_constantF) {
WARN("app want more ConstantsF than available: %d (available: %d) - limited to %d\n",
start + count, This->d3d_vshader_constantF, This->d3d_vshader_constantF - start);
count = This->d3d_vshader_constantF - start;
}

---------------

And in dlls/d3d9/d3d9_private.h, change the constant D3D9_MAX_VERTEX_SHADER_CONSTANTF from 256 to 1024.

Doing both of these mods will basically sidestep the actual issue and get the game to start, but there will be severe graphics errors. Specifically, all Sims and some objects will show up in glowing red color (and, from what I've seen, not animate at all and retain a "spread eagle" pose) and seemingly randomly they will also just vanish from view on occasion. The specific cause of the former is beyond me, the latter may be related to the Wine console error "Unsupp depthstencil blit", suggesting a depth stencil isn't being updated correctly and likely causing the disappearance of Sims.

Whether or not performance will improve with a graphics card that DOES support more than 256 shaders in hardware I do not know. There is talk under Bug 8051 that a software vertex shader solution could be implemented but as yet is not a priority. This is all beyond my current knowledge, but if anyone knows something about it, you should look into it.
failed again
by William J May on Sunday January 17th 2010, 5:10
Won't post offical results yet, but installed successfully only to crash on startup. D3D Error:INVALIDCALL
Will try winetricks dx9 later...
Debugger detected
by Robert Showalter on Saturday December 5th 2009, 15:29
Tried Wine 1.1.34 today, stock Sims2.exe is reporting the old "A debugger has been detected" -- "Unload the debugger and try again", though I was not receiving that with Wine 1.1.33 that I tried last night. Using a No-CD cracked executable produced the DirectX 9.0c error. I also was playing with VirtualBox and it was reporting the same DirectX 9.0c error. I wonder if Sims 2 is attempting to discern a supported card by its name or some other strange method?
CD set
by William J May on Tuesday December 1st 2009, 2:57
I have the full version on CD (set of four), and I was stuck on the mounting issue. About to give up, I checked the test results to find 'wine eject'.
Could we maybe reiterate that command to save other ppl some frustration?
Sims 2 DVD on 1.1.15-git
by Daniel Rammelt on Friday February 27th 2009, 13:53
Installs fine from DVD. After changing to Forced desktop and installing directx9, all directx dlls were changed to Native (Winetricks sets several dlls to builtin). This allowed the game to load further than usual. Otherwise I got the same crashes as everyone else.
Now crashes with... wine: Call from 0x11e42ad to unimplemented function GDI32.dll.GdiEntry1, aborting

I dont see anyway to override GDI32.dll so I guess its just a bug in wine?
Back