The original purpose of this repository is to collate a collection of patches to describe how The Sims 2 can work under the Wine Compatibility Layer.
Thanks to the bug busters who have patched the source and found workarounds. For players, The Sims 2 is playable with the odd glitch! For developers, there's some interesting things to uncover. This repository will maintain notes and mirror patches and Wine binaries where available for you to test, debug or play.
See the Releases page for the compiled binaries, which can be downloaded and used as-is, or added to front-ends such as PlayOnLinux or PlayOnMac.
The binaries are currently compiled without 64-bit support (SysWOW64), meaning they require a 32-bit Wine prefix.
Package | Compiler OS | Compiler Arch | Wine Prefix | Notes |
---|---|---|---|---|
linux-x86 |
Ubuntu 16.04 | i386 | 32-bit | |
mac-x86 |
macOS 10.14.2 | amd64 | 32-bit | macOS 10.15 will deprecate 32-bit support. |
macOS builds are considered experimental.
Wine can be built on GNU/Linux and macOS.
-
Clone this repository to acquire the patches.
git clone https://github.com/lah7/sims-2-wine-patches.git
-
Download a copy of the Wine source code from https://dl.winehq.org/wine/source/
-
Install the dependencies.
https://wiki.winehq.org/Building_Wine#Satisfying_Build_Dependencies
-
Patch the source and build:
tar -xvf wine-XXX.tar.bz2 ln -s wine-XXX a patch -p0 < /path/to/file.patch cd wine-XXX/ ./configure --prefix=/path/to/build/ make install -j4
To speed up compiling, change -j4
to the number of processor cores you have.
If running via make
only, you can use the wine
script to run the build.
Comment | Author | Notes |
---|---|---|
124 | swswine | Initial patch and discovery |
160 | Robert Walker | Updated to Wine 3.5. |
161 | Alexandr Oleynikov | Updated to Wine 3.7 with staging patches. |
164 | Paul Gofman | Updated to Wine 3.18, works with newer drivers. |
See bug report 8051 on Wine's bug tracker for development discussions.
Thank you to Alexandr Oleynikov for suggesting mod workarounds and maintaining the Lutris installer.
The Sims 2 requests 1024 vertex shader constants, but Wine has a hardcoded limit of 256. Direct3D 9 normally supports up to 8192, using hardware shaders first (where available), followed by software emulation. Software emulation is currently not supported in Wine.
The developers of The Sims 2 used some obscure features of Direct3D 9 as discovered in the bug report discussion. Some of these will require implementation in Wine which are quite the task:
- Remove hardcoded vertex shader limit - see D3D9_MAX_VERTEX_SHADER_CONSTANTF in d3d9_private.h
- The game expects at least 1024.
- Suggestion: Via registry?
- Add ProcessVertices with shader support (#46742)
- Add support for undocumented Direct3DShaderValidatorCreate9() implementation (#46735)
Shader Model 2 and Shader Model 3 reveal differences, particularly in the original release (no patches, no expansions). Newer expansion packs use an improved rendering engine with fewer differences between SM2 and SM3.
Shader Model 2 with useShaders false |
Shader Model 2 with useShaders true |
Shader Model 3 with useShaders false |
Shader Model 3 with useShaders true |
---|---|---|---|
The Shader Model version can be set via Wine's registry:
HKEY_CURRENT_USER\Software\Wine\Direct3D\MaxShaderModelPS
HKEY_CURRENT_USER\Software\Wine\Direct3D\MaxShaderModelVS
REG_DWORD => 2
By opening the cheat console (CTRL+SHIFT+C), you can toggle between parameters that will effect rendering in-game:
boolProp useShaders false
boolProp lightingEnabled false
In order to play earlier versions of the game, you will need to force Shader Model 2 via the registry, turn on shaders and disable the lighting engine. Write the following:
boolProp useShaders true
boolProp lightingEnabled false
And save to:
C:\users\<YOURNAME>\My Documents\EA Games\The Sims 2\Config\userStartup.cheat
This is not necessary when using newer versions of the game and expansion packs. Results may differ on different graphic cards and drivers.
Note: Previous Wine patches/binaries mentioned in bug reports and this repository forced Shader Model 2 in the source code, but this is no longer the case.
If you have the Seasons expansion pack, you may experience blue snow outside the lot, you can workaround this by forcing Shader Model 2 via the registry.
The 'red eagle' pose appears on the neighbourhood screen and during loading screens.
The only exception is when a new default neighbourhood is loaded for the first time in which the thumbnails were already pre-rendered.
This can be fixed by installing a modified no-censor mod by @tannisroot. This disables the anti-censoring functionality which happens to fix the thumbnails when saving.
You can download thumbnails_fix.package from this archive.
A Sims' skin colour may not match between their head and body.
This can be fixed by running this cheat code prior to entering the household:
boolProp skipTangentsInVertexData true
Icons above a Sim's head (like the one when you get a new friend) can appear glitchy.
Changing resolution while in a household can sometimes result in a black screen.
This can be fixed by running this cheat code:
boolProp createNVidiaWorkaroundTexture false
Alternately, you may set the Wine prefix to run inside a virtual desktop.
This also happens under the NVIDIA driver on Windows. This previously did not happen with earlier versions of the NVIDIA driver (around 396.x and before) and the original Wine patches.
This can be fixed by installing the Sim Shadow Fix (v0.4) mod.
As the patches expose a lot of FIXMEs in Wine. This can fill up to many hundreds of MBs, causing potential slowdown.
- If there are any technical explainations, feel free to create a pull request or issue.
- Please do not submit test reports to AppDB when using patched copies of Wine as the test results do not reflect "vanilla" Wine or wine-staging.
- To view FPS and shader version in-game, press CTRL + SHIFT + S
- There are some engine differences/improvements between the original release, later expansion packs and the Origin version.
The aforementioned workarounds are either cheat codes that are entered via the CTRL + SHIFT + C cheat console while playing, or saved to this file to run when the game starts:
C:\users\<YOURNAME>\My Documents\EA Games\The Sims 2\Config\userStartup.cheat
Note that some rendering cheat codes require you to re-enter the household to take effect.
Mods (custom content) are saved in this directory:
C:\Users\<YOURNAME>\My Documents\EA Games\The Sims 2\Downloads
If you've installed The Sims 2 via Lutris, these mods are already included.
Developers and hackers, these are the bug reports on WineHQ Bugzilla: