Linux tip, Fedora tip / howto: playing Colin McRae Rally 2 under Wine, Multiplayer

back to notes and tips index

Try my online puzzle page with Calcudoku, Killer Sudoku and online Sudoku.

playing Colin McRae Rally 2 under Wine, Multiplayer

Back in 2001 I bought this great rally game, and played it a lot, especially the Arcade tracks in network play.

It turns out CMR2 plays fine using Wine under Linux (Fedora 8 in my case, wine version 1.1.9. It also runs under version 1.1.29), including the hosting of a multiplayer game!

Do let me know (using the form below) if you have any comments, or if something doesn't work (or if you're happy it works :-).

To install Wine: yum install wine. If you'd like to compile the latest version, follow the instructions on this page.

Next, run setup.exe from the install CD (so wine setup.exe). After it's installed, a few more fixes are necessary:

  • cd ~/.wine/drive_c/Program\ Files/Codemasters/Colin\ McRae\ Rally\ 2
  • cp Ms* ~/.wine/drive_c/windows/system32
  • run winecfg and select the "Libraries" tab
  • in the "New override for library" dropdown, type:
    • msvcrt and click "Add"
    • msvcrt40 and click "Add"
    • msadp32.acm and click "Add"

Skipping the intro videos

Now you can run the game, but unfortunately you can't skip the intro movie. To fix this:
  • from the CMR2 directory (see the cd command above):
    cd FrontEnd/Videos
    mv cm.bik cm_prev.bik
    mv intro.bik intro_prev.bik
    touch cm.bik
    touch intro.bik
  • at startup, you'll get two error messages in a "Retry - Cancel" window: simply select Cancel both times (press the right arrow key and then Enter)
Alternatively, here is a one second black .bik (Bink video) file which you can copy into that directory as cm.bik and intro.bik

Enabling multiplayer games

This turned out to be trickier. If you don't have DirectPlay support, you'll get errors like:
err:dplay:DP_InitializeDPSP DP SP Initialization failed: DPERR_UNSUPPORTED
as soon as you start doing anything network related. Most of the info I got from this page on DirectPlay. The winetricks script didn't work for me.

  • download directx_mar2009_redist.exe from this page (92.4 MB)
  • then run:
    wine ./directx_mar2009_redist.exe /T:Z:/tmp/directxcabs /C
  • create a temporary directory:
    mkdir temp; cd temp
    cabextract /tmp/directxcabs/
    (run yum install cabextract if you don't have it yet)
  • copy four DLLs to your windows/system32:
    cp dplayx.dll ~/.wine/drive_c/windows/system32
    cp dpnet.dll ~/.wine/drive_c/windows/system32
    cp dpnhpast.dll ~/.wine/drive_c/windows/system32
    cp dpwsockx.dll ~/.wine/drive_c/windows/system32
  • copy one executable to your windows/system:
    cp dplaysvr.exe ~/.wine/drive_c/windows/system
  • register three of the DLLs:
    cd ~/.wine/drive_c/windows/system32
    wine regsvr32 dplayx.dll
    wine regsvr32 dpnet.dll
    wine regsvr32 dpnhpast.dll
  • run winecfg and select the "Libraries" tab
  • in the "New override for library" dropdown, type:
    • dplayx and click "Add"
    • dpnet and click "Add"
    • dpnhpast and click "Add"
    • dpwsockx and click "Add"

Setting firewall rules for multiplayer games (DirectPlay)

To host a race on the internet, you need to update your Linux firewall, and probably also your router firewall.

First, the Linux (Fedora, iptables) firewall (run iptables as root):

iptables -I RH-Firewall-1-INPUT -p tcp --dport 2300:2400 -j ACCEPT
iptables -I RH-Firewall-1-INPUT -p udp --dport 2300:2400 -j ACCEPT
iptables -I RH-Firewall-1-INPUT -p tcp --dport 47624 -j ACCEPT
iptables -I RH-Firewall-1-INPUT -p udp --dport 47624 -j ACCEPT
iptables -I RH-Firewall-1-INPUT -p tcp --dport 6073 -j ACCEPT
iptables -I RH-Firewall-1-INPUT -p udp --dport 6073 -j ACCEPT

If you're connecting to the Internet through a router, you'll have to open the same ports there. You can typically access your router at or at (and/or https:).

To give you an idea, the steps for a BT Home Hub:

  • select "Settings" and type the administrator password
  • click "Advanced Settings", then "Continue to Advanced Settings"
  • click "Application Sharing", then "Supported Applications"
  • click "Add new game or Application"
  • for the name, you could enter "DirectPlay" (or "CMR2", you choose :-)
  • At "Copy an existing game/application" select "No"
  • Now enter the same port ranges as listed above (so the range 2300-2400, and single ports 47624 and 6073), with separate entries for TCP and UDP. You can leave "Trigger Port" empty
  • when done, click "Configuration", and assign the new ruleset to your PC

Running CMR2

By searching Google for something like "colin mcrae rally no cd" you can find a modified version of cmr2.exe that doesn't require you to keep the CD ROM in the drive.

As the Windows version (run winecfg, then the "Applications" tab) I have "Windows 2000" selected. My guess is XP will work too.

When I run CMR2 fullscreen under Wine, it doesn't respond to key presses. It does in windowed mode: run winecfg, select the "Graphics" tab, and enable "Emulate a virtual desktop". I have the dimensions at 1280x1024, although CMR2 does switch back to 640x480 (in the Graphics options you can later increase it).

To measure frame rates under Wine:
setenv WINEDEBUG +fps
(if you're using bash: WINEDEBUG=+fps; export WINEDEBUG).

For a good frame rate on my relatively old GeForce4 Ti 4200, I had to turn off Environment mapping, Shadow mapping, and Mip mapping (in the advanced graphics options). Still, with the draw distance at 6, all detail levels set to "high", and a 1024x768x16 window, the game managed between 20 fps (with 5 other cars nearby) and 50 fps (with no cars nearby).

When hosting a network game, for some reason when selecting the "Host" menu option, the game image moves to the bottom left. You can see it again by maximizing the wine window. Let me know if you find a fix for this. The network game does work though :-)


Sound works fine if you have Alsa selected as your output driver (winecfg, Audio tab), except when running a networked game (!). Then I got the error:
ALSA lib pcm_dmix.c:996:(snd_pcm_dmix_open) unable to open slave
fixme:dsalsa:IDsDriverImpl_Open Failed to open device: Device or resource busy (wine 1.1.9)
err:wave:wodOpen Error open: Device or resource busy (wine 1.1.29)

After messing forever with dmix, my ~/.asoundrc file, pulseaudio, etc., I found that changing the output driver to OSS made it work...

Some links

The Colin McRae Rally 2 cheat codes.

A page with record times of me and some of my friends (I had userid min).

An interesting interview about the artificial intelligence techniques used in CMR2.

A CMR2 fan page.

Some Wine Appdb test results for Colin McRae Rally 2 are here.

← back to notes and tips index
Please do not copy the text of this tip (© Patrick Min) to your web site.