2010年6月30日星期三

How To: compile Dolphin with SSE2, SSE3, SSE4.1, SSE4.2, and SSSE3 on Windows

General Requirements as suggested by me:


- WindowsXP or higher

- Nothing less than 2.1 GHz core2duo CPU

- No less than 3GB RAM

- No less than 10GB free on your Hard Drive.

-An extra $1400 laying around (no joke, you're actually gonna need this)



NOTE: If you can't afford it, you can get the builds for free from my website. You support me and save time and money.





Step 1: Get the Software

-Visual Studio 2008 Pro (yes PRO. There's no known workaround for Express) ($799)

-Intel C++ Compiler (version 11.1 Update 6 recommended) (Free to Try, $599.00 to buy)

-TortoiseSVN

-Latest DirectX SDK

-Windows SDK *May or may not be needed* (get version that's appropriate for your OS, ie Windows 7 requires Windows 7 SDK)

-Latest .NET Framework







Step 2: Installation

1) Install the latest version of the .NET Framework.



2) Install VS 2008 Pro (NOT Express!)

-FULL INSTALLATION!

-You may or may not need MSDN Library. I chose to install it.



3) Install Intel C++ Compiler

-FULL INSTALLATION (if IA-64 is disabled in the install, that's ok. That's the ONE thing you do not need...Unless you are building for IA-64 (instead of regular 64bit). If that's the case, you'll need VS 2008 Team Suite instead of Pro.)



4) Install Windows SDK, TortoiseSVN, and DirectX SDK



Step 3: Configuration

1) For Visual Studio (open Visual Studio)

-Under Tools > Options > Projects > VC++ Directories Select the Platform you will be building for. Make sure you have the following:

Under Executables: DirectX SDK Folder (Normally located: C:\Program Files\Microsoft DirectX SDK ([month and year released])\Utilities\bin\[x86 OR x64]

Under Includes: DirectX SDK Includes (Normally located: C:\Program Files\Microsoft DirectX SDK ([month and year released])\Include

Under Library: DirectX SDK Library (Normally located: C:\Program Files\Microsoft DirectX SDK ([month and year released])\Lib\[x86 OR x64]

Note: You can go to "Path Fixing" here if you need more detail.



Step 4: Checkout

1) Make a new folder and name it whatever. We'll refer to it as the "Checkout Folder."



2) Right-click the folder and select "SVN Checkout"



3) The URL of repository is "http://dolphin-emu.googlecode.com/svn/trunk/" without quotes.



4) Click OK or choose specific revision under "Revision" and then click OK.



Step 5: RVSN fixes

In your Checkout Folder there are some files we need to change to work with Intel C++ Compiler.



1) "_export" Fix

-Replace all instances of "_export" with "export_" (without quotes) in the following (you can use any text editor):

Checkout Folder\Source\Core\DolphinWX\Src\MemoryCards\WiiSaveCrypted.cpp

Checkout Folder\Source\Core\DolphinWX\Src\MemoryCards\WiiSaveCrypted.h



2) "VCEnd" fix (R5637 and later) Click here for an alternate method of fixing

-Replace all instances of "else (goto VCEnd" with "else (goto finish)" (without quotes) in the following (you can use any text editor):

CheckoutFolder\Source\Core\DolphinWX\DolphinWX.vcproj

CheckoutFolder\Source\Core\Common\Common.vcproj



-Replace all instances of "goto VCEnd" with ":finish" (without quotes) in the following (you can use any text editor):

CheckoutFolder\Source\Core\DolphinWX\DolphinWX.vcproj

CheckoutFolder\Source\Core\Common\Common.vcproj



NOTE: "2)" Must be done in the order shown to work correctly!

NOTE: I find that using NotePad++ to find and replace the code snippets is very quick and easy, as you can replace all instances of a value in all opened documents.













Step 6: Compiling

1) Open CheckoutFolder\Source\Dolphin.sln in VS 2008.



2) Right-click the "Solution 'Dolphin'" and select Intel C++ Compiler Pro -> Use Intel C++...



3) Click OK for any windows that pop-up.



4) Once it has finished converting the solution to use Intel C++, Select the Type of build you want (ie Debug/Release and Win32/x64 ("Release" is recomended))

Note: if you change either of these values after you change the following, you will have to redo the following steps.



5) Select all Projects in the Solution Explorer except DSPSpy, right-click them, and select click "Properties"



6) Under C++ -> Code Generation, you can set the Instruction Set used (ie SSE2, SSE3, SSE4.1, SSE4.2, or SSSE3).

-For Intel processors only: Set "Intel Processor-Specific Optimization"

-For all processors that support SSE instructions: Set "Add Processor-Optimized Code Path"



7) Click OK to apply settings.



8) Select "Plugin_VideoOGL" and all the projects under "Solution Explorer" that start with "wx" (without the quotes).



9) Right-Click and select properties. Under C++ -> Precompiled Headers set "Create/Use Precompiled Header" to "Not Using Precompiled Headers"



10) Right-click "Solution 'Dolphin'" and select "Rebuild"





You should end up with XX Succeeded, 0 failed, and X skipped. If you do not, either you missed one or more instructions in this tutorial, or their are specific settings needed for the revision you are trying to compile.



If you are not using an English OS and get error #13000, go here.





Step 7: Have Fun!

1) Where's my build?!

- It's under CheckoutFolder\Binary\{Win32 OR x64}\

-Just run "Dolphin{}.exe" (the {} stands for various things that may be appended, such as "FS" or "D" or nothing)



NOTE: Now that you know how to do this, you can find out what additional optimizations work for you! You can test your builds against mine to see if yours has a faster, slower, or about the same frame rate (remember to test the same rvsn number builds!)



Final words: (can anyone guess what they are lol) Free builds at my website! Go there, support me! yada yada yada... What better purpose for a tutorial than to advertise one's work lol







...And there you have it. What took 2 weeks of constant research and experimenting for me to learn you have learned in just 10 minutes.

没有评论:

发表评论