How to Run Rise of Nations with Wine

I spent quite a while last night getting Rise of Nations Golden Edition running on Ubuntu Ibex. Here's what it took:

Part 1: Make CD images using Cdrdao

Cdrdao is used for dumping images of CDs in .bin/.toc format. Normally dd is enough to make an image. But, for copy-protected discs like RoN, you need something a little stronger. Here's the command I used to make images of both discs:
$ cdrdao read-cd --read-raw --datafile image.bin \
--device /dev/cdrw2 --driver generic-mmc-raw image.toc
Be sure to replace /dev/cdrw2 with your CDROM device.

Part 2: Mount the images using CDemu

Windows users are probably familiar with DAEMON Tools. CDemu is the equivalent for Linux. There are nice Debian packages available. Download and install, in order:
  • vhba-dkms
  • libmirage
  • cdemu-daemon
  • cdemu-client
Mounting the images after installing CDemu is simple.
$ cdemu load 0 image.toc

Part 3: Update and configure Wine

The standard Ubuntu repositories do not have the most up-to-date version of Wine. For that, you need to add Wine's own repository. They have directions for major distributions on their download page.

Next, get winetricks. After installation, simply execute winetricks to display the winetricks GUI. Then install directx9 and mfc42.

Finally, we need to touch some settings in Wine. Open winecfg and click the graphics tab. Uncheck the boxes for "Allow the window manager to decorate the windows" and "Allow the window manager to control the windows." Now click the Audio tab. If you haven't configured Wine's audio previously, Wine will display a message indicating it has now done so for you. The defaults should be fine, so now click the Libraries tab. To get sound working in RoN, change dsound from builtin to native.

Part 4: Install RoN

Normally this would be fairly straight forward. But for RoN, there's a few tricks. First, copy pidgen.dll from the first disc to ~/.wine/drive_c/windows/system32. Now, start installing RoN.
$ cd /media/RONGOLD1
$ wine setup.exe
The second trick is to convince the installer you've inserted the second disc when it asks. To do this, I had to manually change the symlinks in ~/.wine/dosdevices. Change whichever drive symlink points to RONGOLD1 so that it points to RONGOLD2. Also, be sure to change the symlink that points to the actually device as well (it will have the same name as the drive letter but with an extra colon). Click "OK" in the install window and it should finish up the installation. Once it's done, be sure to change the symlinks in dosdevices to point back to RONGOLD1.

Part 5: Configure RoN

I'm not sure these configurations are necessary, but they work for me. Edit /home/damonkohler/.wine/drive_c/windows/profiles/.../Application\ Data/Microsoft\ Games/Rise\ of\ Nations/rise2.ini to look like this:
[RISE OF NATIONS]
Windowed Width=1024
Windowed Height=768
FullScreen=1
VSync=1
AllowAllResolutions=1
IgnoreMinimizeOnTabOut=0
ConfigDatabase=BHGVidCardConfig.txt
ESCKeyGoesToMenu=1
ClickDragTiming=5
ClickDragLowSensitive=20
ClickDragHighSensitive=64
ClickDragRightSensitive=6
SkipIntroMovies=1
ForceHardwareCursor=1
ForceGDICursor=0
ForceBWCursor=0
ForceStaticCursor=0
ForceAGPVBs=0
Don't Allow Texture Compression=0
SYS_grade_override(A-F or AUTO)=AUTO
MEM_grade_override(A-F or AUTO)=AUTO
CPU_grade_override(A-F or AUTO)=AUTO
GPU_grade_override(A-F or AUTO)=AUTO
TEXTURE_grade_override(FULL, HALF, QUARTER, AUTO)=AUTO
UseAltColors=0
Console Coord Mode=0
Console Name Mode=2
Sound Enabled=1
BackVidAsSlideShow=0
UseVTUNEDLL=0
TestDelayRenderAMin=0
TestDelayRenderBMin=0
TestDelayRenderAMax=0
TestDelayRenderBMax=0
RebuildBalance=0
Force Profile Menu=0
ForceLowCPUBackgroundVid=1
EnableGraphicsToggles=0
UseNetworkSimulator=0
TPModsDirectory=.\Mods
ScenarioDirectory=\Scenarios
StandaloneScriptsDirectory=Stand-alone Scripts
DefaultScenarioDirectory=.\scenario\Custom\
DefaultScriptDirectory=.\scenario\Scripts\
GameFrameTestDelayMin=0
GameFrameTestDelayMax=0
RenderMinimap=1
Part 6: Play the game!

Woot! You're done!

18 comments:

  1. Thank you very much!

    Muchas gracias!

    :D

    ReplyDelete
  2. You're welcome! It seemed to me that the documentation on how to do this was rather spread out.

    ReplyDelete
  3. Nice, happen to try network play?

    ReplyDelete
  4. Yes, I was able to play over the network. However, I had to be the host for it to work.

    ReplyDelete
  5. Multiplayer does not work on Wine 1.1.21 on Debian. No matter what I do (install MS DirectPlay, edit /etc/hosts to resolve my LAN IP as my hostname, ...) I'm getting "Unable to establish a network connection. Please check your network connection and try again." Does RoN multiplayer still work for you? Any ideas?

    ReplyDelete
  6. @Ivan I did get it to work at one time. I haven't tried again in quite a while. Like I said above though, I had to be the host for it to work.

    ReplyDelete
  7. This comment has been removed by the author.

    ReplyDelete
  8. Hi, I'm a Ubuntu user from Argentina, and this guide was very helpful, thank you very much!*




    *I think this is the way of say it. Sorry if my english is bad.

    ReplyDelete
  9. Hi Damon, I am a mac user and have a windows RON golden edition.Can I use wine to play mac-to-pc multiplayer? If yes, will this same procedure you mentioned work?

    ReplyDelete
  10. @kuchbhi I'm not sure. But, if you give it a try, please post your results here.

    ReplyDelete
  11. Thanks for posting this. I'm the author of
    winetricks, and I have a new script called
    wisotool ( wiki.winehq.org/wisotool )
    where I'm trying to capture this kind
    of knowledge (i.e. making it easy to install
    games). Your tip may come in handy.

    ReplyDelete
  12. Hi,

    I got the game starting under wine1.2, but framerate is '0', sound is fine. Any idea the problem? Which wine version are you using?

    Thanks

    ReplyDelete
  13. Never mind. Forgot to install the Nvidia provided graphics driver. Gameplay is smooth, but all moving objects are animated weirdly. Have tried a Quick Game and loaded the Cold War campaign. Also Alt + Right Click(Seige attack) does not seem to work.

    ReplyDelete
  14. I've installed RON1 using Wine 1.2.2 - everything works fine except network. I get "Unable to establish a network connection." even after configuring /etc/init.d/hostname.

    I saw on another thread that apparently the last wine version to allow networking was 1.1.20. Something was 'fixed' in the 1.1.21 that brakes networking.

    BTW, I needed to do all that disk copying stuff in order to install the game, and still need the physicial disk in the drive to run it.

    ReplyDelete
  15. Hello,

    I tried to install RoN Gold into Wineskin with wrapper 2.3 and WS7Wine1.3.22. I did this on a MacBook Pro Late 2008 (Model-id MacBookPro5,1) running Snow Leopard 10.6.7 fully patched.

    I followed most of the guide, except:
    -I skipped the symlink tricks because my RoN Gold is on a single DVD image (iso).
    -I could not recreate the edits to rise2.ini because I don't have a profiles directory

    The install went fine.
    When I run the game it crashes after switching to fullscreen but before drawing anything (mostly black screen with just some artifacts).

    If anyone here has any clue, I'd love to try again with whatever recommendations show up:)

    This the LastRunWine.log:
    fixme:imm:ImmDisableTextFrameService Stub
    fixme:imm:ImmReleaseContext (0x2002a, 0x126bb0): stub
    fixme:imm:NotifyIME NI_CLOSECANDIDATE
    fixme:imm:ImmGetOpenStatus (0x126bb0): semi-stub
    fixme:d3d:init_driver_info Unable to find a driver/device info for vendor_id=0x10de device_id=0x863 for driver_model=2
    fixme:win:EnumDisplayDevicesW ((null),0,0xe4ed40,0x00000000), stub!
    fixme:msctf:LangBarMgr_GetShowFloatingStatus STUB:(0x198b80)
    fixme:msctf:LangBarMgr_ShowFloating STUB:(0x198b80)
    err:ole:COMPOBJ_DllList_Add couldn't load in-process dll L"C:\\windows\\system32\\quartz.dll"
    err:ole:CoGetClassObject no class object {e436ebb3-524f-11ce-9f53-0020af0ba770} could be created for context 0x1
    err:ole:COMPOBJ_DllList_Add couldn't load in-process dll L"C:\\windows\\system32\\quartz.dll"
    err:ole:CoGetClassObject no class object {e436ebb3-524f-11ce-9f53-0020af0ba770} could be created for context 0x1
    err:ole:COMPOBJ_DllList_Add couldn't load in-process dll L"C:\\windows\\system32\\quartz.dll"
    err:ole:CoGetClassObject no class object {e436ebb3-524f-11ce-9f53-0020af0ba770} could be created for context 0x1
    fixme:d3d:init_driver_info Unable to find a driver/device info for vendor_id=0x10de device_id=0x863 for driver_model=2
    fixme:win:EnumDisplayDevicesW ((null),0,0xe4eb00,0x00000000), stub!
    fixme:d3d:swapchain_init Add OpenGL context recreation support to context_validate_onscreen_formats
    fixme:d3d:resource_check_usage Unhandled usage flags 0x8.
    fixme:d3d:resource_check_usage Unhandled usage flags 0x8.
    fixme:d3d:resource_check_usage Unhandled usage flags 0x8.
    fixme:d3d:resource_check_usage Unhandled usage flags 0x8.
    fixme:d3d:resource_check_usage Unhandled usage flags 0x8.
    fixme:d3d:resource_check_usage Unhandled usage flags 0x8.
    fixme:d3d:resource_check_usage Unhandled usage flags 0x8.
    fixme:d3d:resource_check_usage Unhandled usage flags 0x8.
    err:ole:COMPOBJ_DllList_Add couldn't load in-process dll L"C:\\windows\\system32\\dmloader.dll"
    err:ole:CoGetClassObject no class object {d2ac2892-b39b-11d1-8704-00600893b1bd} could be created for context 0x3
    err:ole:COMPOBJ_DllList_Add couldn't load in-process dll L"C:\\windows\\system32\\dmime.dll"
    err:ole:CoGetClassObject no class object {d2ac2881-b39b-11d1-8704-00600893b1bd} could be created for context 0x3
    wine: cannot find L"C:\\windows\\system32\\dxdiag.exe"
    fixme:msctf:LangBarMgr_GetShowFloatingStatus STUB:(0x2032af0)
    fixme:msctf:LangBarMgr_ShowFloating STUB:(0x2032af0)
    fixme:imm:ImmDisableIME (-1): stub
    fixme:advapi:RegisterEventSourceW ((null),L"Rise of Nations"): stub
    fixme:advapi:ReportEventA (0xcafe4242,0x0001,0x0000,0x000003e8,0x0,0x0005,0x00000058,0x5de47c,0x5de034): stub
    fixme:advapi:ReportEventW (0xcafe4242,0x0001,0x0000,0x000003e8,0x0,0x0005,0x00000058,0x1228e8,0x5de034): stub
    err:eventlog:ReportEventW L"patriots.exe"
    err:eventlog:ReportEventW L"3.2.3.2901"
    err:eventlog:ReportEventW L"dssl.dll"
    err:eventlog:ReportEventW L"3.2.3.2901"
    err:eventlog:ReportEventW L"00001346"
    fixme:advapi:DeregisterEventSource (0xcafe4242) stub

    ReplyDelete
  16. thanks for this guide! Really appreciate it! can you givw some directions to install Rise of legends too?

    ReplyDelete
  17. My RoN in the multiplayer when try to create says unable to stabblish a session. Any Ideas?
    I apreciate that very much!

    ReplyDelete
  18. Im from the city of Montevideo, in Uruguay. Thanks a lot, i can run Rise of nations with your help.

    ReplyDelete