The OEM Version of Homeworld (known as Raider Retreat) was originally released to pre-purchasers of Homeworld: Cataclysm in 2000.  Sierra also allowed unrestricted distribution of Homeworld Raider Retreat at that time.  This document describes the process of converting the free Homeworld OEM version to Homeworld version 1.05 (last official version) using freely obtainable files.

Why do this?  I wanted to install Homeworld in a virtualbox virtual machine, but my game CD was at the back of a full storage unit.  I wanted to see if it would be possible to convert the Homeworld OEM version to the final version.

Overview of steps:

1 - install homeworld oem
2 - go in to "C:\Sierra" and rename folder "Homeworld OEM" to
    "Homeworld"
3 - use bigviewer on Update.big.
    select SoundFX, file, save files recursive.
    Close bigviewer.
    Go in to "C:\Sierra\Homeworld\SoundFX" and rename 
    OEM_Music.wxh to HW_Music.wxh.
4 - install patch 1.05
5 - rename OEM_Music.wxd to HW_Music.wxd 
6 - copy cmdline.dll to homeworld folder
7 - Add cmdline.dll to homeworld.exe
8 - Use ollydbg to add patches

I have gathered the files you will need here.
Download the file and unzip it to c:.  Your folder should look like the following picture (except for the screen_shots folder).

Do step #1:
1 - install homeworld oem
Go in to the folder C:\oem\HOMEWORLD_OEM\HOMEWORLDOEM  and double-click on HWSetup.EXE



2 - go in to "C:\Sierra" and rename folder "Homeworld OEM" to

    "Homeworld"
Change this:
To this:


3 - use bigviewer on Update.big.
    select SoundFX, file, save files recursive.
    Close bigviewer.
    Go in to "C:\Sierra\Homeworld\SoundFX" and rename 
    OEM_Music.wxh to HW_Music.wxh.







4 - install patch 1.05
Double-click on C:\oem\homeworld105.exe.


Click on "No" because we don't want to run Homeworld yet.

5 - rename OEM_Music.wxd to HW_Music.wxd


6 - copy cmdline.dll to homeworld folder
Go in to the folder C:\oem\cmdline and copy cmdline.dll to C:\Sierra\Homeworld.


7 - Add cmdline.dll to homeworld.exe.
Go in to the tf23 folder C:\oem\tf23 and double-click on iidking-v2.01.exe. 

Click the "Pick a file" button and select homeworld.exe.  Then, click on the "Click to pick DLL(s)..." button and select cmdline.dll.


Select the three above functions and click the "Add them!" button.

You should see this message:


Click "OK" and close IIDKing.  You should see the file homeworld.exe.txt.

The contents of homeworld.exe.txt should look like this:


8 - Use ollydbg to add patches
Now we will load homeworld.exe in to ollydbg and add a few patches.  These are the patches we will add:
(This looks a little scary.  Don't be scared.  It's not as bad as it looks.)
Go in to C:\oem\odbg110 and double-click on OLLYDBG.EXE to start up ollydbg.  You should see this:

Click "Yes".  Then go  to file, open and find homeworld.exe.



Once olly loads it, you should see something similar to this:

  Now we will begin adding our patches.  First, we will jump over the check for a Homeworld CD.
Open the file C:\oem\cmdline\cmdline.x with notepad.  You should see this:

This is the xblite source code for cmdline.dll.  We will be referencing the comments at the top of the file.
On the third line down, highlight the hex address 00409a69 and press control-c to copy it.

Now go in to ollydbg and right-click in the area where you see the grey cursor bar. A menu should pop up.  Go down to "Go to" and then "Expression"


A window should pop up saying "Enter expression to follow".

Click the mouse in the box so you see the cursor then hit control-v to paste in the address from earlier.

Click ok and you should see this.

We are going to change the assembly instructions at that location to this:

Highlight the "JMP homeworl.00409E63" and press control-c to copy it.  Then go back in to ollydbg.  Press the spacebar and a box should pop up.  Press the delete key to delete the current contents of the box, then press control-v to paste in our new instructions.

Before you click the "Assemble" button, delete the part that says "homeworl."  It should look like the below picture.

Click "Assemble", then click "Cancel" to close the box.  You should see this:

The red text indicates that we made a change to what was originally there.
Now for the next patch.  Right-click near the grey cursor line again like we did for the first patch (or just press control-g).  We will be going to address  00409A74 this time.

Follow along with the pictures:














Copy the above text with control-c.
Then go to address 00409A6E in ollydbg.

Press the spacebar to bring up the "Assemble" window and control-v to paste the command.



Now for the next patch.






The above one was pretty simple.  Now for the map background patch.












Now for the open-gl patch.






Now for the music patch.  The music that comes with the OEM version of Homeworld isn't really meant to be used with the final version (1.05).  This patch will select the right music from the OEM music file that corresponds with the music from the final version.












Ok so we are done adding all of our patches.  Now we need to save our modified version of homeworld.exe.  Right-click near the grey line and go to "Copy to executable" then "All modifications".



Ollydbg will ask "Copy selection to executable file?".  Click the "Copy all" button.



This will open a new window inside of ollydbg like below.



Right-click and select "Save file".



You can't save it as homeworld.exe because the file is loaded by ollydbg.  Name it homeworld2.exe like in the picture below then click "Save".  After you do that, quit ollydbg.



You should see homeworld2.exe in your homeworld folder.



Rename homeworld.exe to homeworld_backup.exe, then rename homeworld2.exe to homeworld.exe.
Now, if you double-click on homeworld.exe you should see this:



Shut down Homeworld.  Copy commandLine.txt from C:\oem\cmdline in to your homeworld folder.  Edit the file to how you want it and save it.  For example:



A few notes about running homeworld in virtualbox:



On my version of virtualbox (4.2) the Caps-lock key doesn't work quite right as the TACTICAL OVERLAY key within Homeworld.  I changed it to the "a" key.

I did this conversion project in a windows xp virtual machine (google microxp) running on top of linux mint.



If you decide to also run Homeworld in virtualbox, you will need to disable mouse integration like this:



If you don't disable mouse integration you will not be able to change the view in a controlled fashion within Homeworld.  Instead, the camera will pan around wildly.

The end.