C&C Red Alert under WINE on Hardy Heron
Back at the end of August, EA Games helpfully made the original C&C: Red Alert game completely free to celebrate the upcoming release of Red Alert 3. This is great for me, since one of my original RA CDs has a big scratch in it. Naturally, there are some caveats with running it under XP or Vista, but I now use Ubuntu Linux on the desktop.
Here's what I did to make it work under Ubuntu 8/04 Hardy Heron.
Download C&C: Red Alert from here. You'll need both the Allied and Soviet disks, and they're about 1GB in total. They're RAR archives, but fortunately Ubuntu's archive manager can open them. You'll only need to extract CD1_ALLIED_DISC.ISO and CD2_SOVIET_DISC.ISO from within the files you've downloaded.
You have a choice here - either burn them to CD, or mount the ISOs manually. If you burn the ISOs to CD, you won't need to do anything extra to make things work - wine should pick up your CD drive just fine, probably as d:
I didn't want to faff around with CDs, so I mounted the isos directly. You'll need to be root for this.
sudo -s mkdir /mnt/ccra mount -o loop /path/to/CD1_ALLIED_DISC.ISO /mnt/ccra logout
This will mount the ISO image as if it's a CDROM. Next, you need to open up a terminal and run 'winecfg'. Click on the 'drives' tab, and add a new drive letter (probably E:) to the list. Set the path to /mnt/ccra, then click OK. Next, you'll need to 'cd ~/.wine/dosdevices' and create a symlink to the physical media for whichever drive you created. In my case this meant:
ln -s /path/to/CD1_ALLIED_DISC.ISO e::
The double colon is not a mistake, and you'll need to substitute whatever drive letter you used in winecfg.
From your terminal, type:
(or d:\setup.exe if you're installing off CD) and follow the prompts. This will install the game under a fake C: that lives in your .wine directory
Nearly there! To run red alert there are a few gotchas to deal with.
There's a compatibility issue with recent linux versions and wine due to a security feature.
This leads to error messages that look like this:
err:dosmem:setup_dos_mem Cannot use first megabyte for DOS address space, please report err:dosmem:load_winedos Could not load winedos.dll, DOS subsystem unavailable winevdm: unable to exec '--app-name': 16-bit support missing
This is easy enough to disable temporarily while you're playing the game and doesn't have too much of an impact on the security of your computer. Again, you'll need to run this as root, and it will persist until you reboot or reset the value:
sudo sysctl -w vm.mmap_min_addr=0
To reset it once you've finished playing:
sudo sysctl -w vm.mmap_min_addr=65536
If you've got a PC with multiple CPU cores, you'll need to tie wine to a single CPU instance. This is done with schedtool. I've also found you can't launch RA directly, so I use winefile - a clone of the old windows file manager. It's not pretty but it works. To launch the game:
schedtool -a 0x2 -e winefile
Then navigate to C:\WESTWOOD\REDALERT and double click on RA95.exe
The game should play!
If you get warnings about low disk space and are unable to save game progress, it seems to be because you've got too much free disk space. I moved my .wine directory to a partition with less than 32GB of free disk space then symlinked it back into my home directory, and the problem went away.