Proton icon indicating copy to clipboard operation
Proton copied to clipboard

Command & Conquer: Red Alert 2 and Yuri's Revenge (2229850)

Open vuaieo opened this issue 2 years ago • 15 comments

Compatibility Report

  • Command & Conquer Red Alert 2 yuris revenge on cncnet launcher

hi i installed wine and wine-mono then installed C&C red alert 2 yuris revenge and cncnet launcher to play it online everything works fine if using wine except there is no sound in the game( cant see sound icon on task manager tab too using KDE...)

but if i add the game on steam and using various different proton and GE proton versions then there is music while loading the game but the game never starts , its like stuck on last bit of loading..

System Information Operating System: EndeavourOS KDE Plasma Version: 5.25.5 KDE Frameworks Version: 5.98.0 Qt Version: 5.15.6 Kernel Version: 5.19.12-xanmod1-1-x64v2 (64-bit) Graphics Platform: X11 Processors: 16 × AMD Ryzen 7 5700G with Radeon Graphics Memory: 13,6 GiB of RAM Graphics Processor: NVIDIA GeForce RTX 3080 Ti/PCIe/SSE2 Manufacturer: Micro-Star International Co., Ltd. Product Name: MS-7C56 System Version: 2.0

  • Link to full system information report as Gist: https://gist.github.com/vuaieo/d3c2fabea1b49dbcf5d0e88dc2ec9682
  • Proton version: many different

I confirm:

  • [y] that I haven't found an existing compatibility report for this game.
  • [y] that I have checked whether there are updates for my system available.

PROTON_LOG: steam-11467124318811455488.zip

Symptoms

no sound in game which makes this game unplayable since is crucial ...

Reproduction

  1. install wine and wine-mono
  2. install C&C red alert 2 yuris revenge
  3. install CnCnet launcher https://cncnet.org/yuris-revenge#download 4.go to /home/username/.wine/drive_c/Program Files (x86)/Red Alert 2 Yuri's Revenge/Resources/ and start clientogl.exe, update and restart, play there should be no sound in the game. no effects and no music.
  4. add the clientogl.exe on steam as non steam game. and start the game. it should load while playing the music but never stops loading ( stuck)

this game is one of best strategy fun games still. there tons of people playing every day all the time. it would be very nice to have it playable on linux and especially on steam. please help me to fix it

vuaieo avatar Oct 03 '22 17:10 vuaieo

Hello @vuaieo, the audio issue you're seeing with vanilla wine should be mentioned to the upstream wine devs if it hasn't been already.

kisak-valve avatar Oct 03 '22 17:10 kisak-valve

The game was just put for sale on Steam directly, and I can confirm I run into the issue where the game loads up, the music plays, and my cursor changes, but my screen remains black (and if I click where UI elements would be the screen changes, but not in a way that is remotely usable).

FWIW, these same symptoms are all over the internet for RA2/YR on later versions of Windows, too, but the proposed fixes don't seem to translate to running it through Proton.

g-marconet avatar Mar 07 '24 20:03 g-marconet

steam-2229850.log

using CNC-DDraw i am able to get into the menus but i have audio issues where it will play one moment and then not the next, it seems to crash when it started playing audio again.

breningham avatar Mar 07 '24 22:03 breningham

image it seems to be a little tempermental about where it goes (and losing focus makes the window invisible + sound is playing fine this time though)

breningham avatar Mar 07 '24 22:03 breningham

Same problem with black menus here. Haven't tried CNC-DDraw yet. Intro video played fine though.

riiga avatar Mar 07 '24 22:03 riiga

Can confirm the menu screen goes black but can still hear the game audio.

jabba2324 avatar Mar 07 '24 23:03 jabba2324

Same issue here. Video plays fine, sound works, but the menu just flashes up for one frame and goes black. Tried replacing ddraw.dll with cnc-ddraw (from https://github.com/FunkyFr3sh/cnc-ddraw) but it did not change anything.

I did not set an winecfg override in the proton prefix though. Probably it's required.

Edit: Yes that did the trick!

  1. Extract cnc-ddraw.zip into the game folder.
  2. Override the dll with this launch command:
WINEDLLOVERRIDES="ddraw.dll=n,b" %command%

Edit 2: I also needed to set the game speed to 60 ticks per second. With "Emulate a 60Hz Monitor" the game simulation ran so fast, the enemy did a nuclear launch on me before I unpacked the base vehicle.

lubosz avatar Mar 08 '24 00:03 lubosz

Does anyone know if the steam version even works on Windows out of the box? Surprised to see it released as the EA origin version never worked on anything newer than Win XP

jabba2324 avatar Mar 08 '24 00:03 jabba2324

Does anyone know if the steam version even works on Windows out of the box? Surprised to see it released as the EA origin version never worked on anything newer than Win XP

Yeah, I've just tried on my Wife's Win11 machine, works out of the box

agurenko avatar Mar 08 '24 11:03 agurenko

Replying to https://github.com/ValveSoftware/Proton/issues/6208#issuecomment-1984824906

Thanks a lot @lubosz your override suggestion worked, also somewhat helped Tiberian Sun, but it's still artifacts part of the screen.

agurenko avatar Mar 08 '24 12:03 agurenko

After using cnc-ddraw as per @lubosz's suggestion, I can see the menu and play the game, although some options don't display correctly. I've tried different resolutions with similar results.

Example: Screenshot_20240308_181501

riiga avatar Mar 08 '24 17:03 riiga

Replying to https://github.com/ValveSoftware/Proton/issues/6208#issuecomment-1984824906

Hi, I found that RA2 does not respect the RA2.INI file for GameSpeed=, so likely the issue you were encountering with game simulation was that it's defaulting to GameSpeed=6 instead of 3.

Try checking the gamespeed slider in Skirmish before you start the game.

Also, I had a hand and attempting to write this: https://lutris.net/games/install/32030/view

My learning from that exercise was to use this config for RA2.INI and ddraw.ini:

sed -i '/^\[Video\]/!b;n;/AllowHiResModes=/!{iAllowHiResModes=yes'$'\n''};n;s/^Play=.*/Play=no/;n;s/^ScreenWidth=.*/ScreenWidth=1024/;n;s/^ScreenHeight=.*/ScreenHeight=768/' $HOME/.var/app/com.valvesoftware.Steam/.local/share/Steam/steamapps/common/Command\ \&\ Conquer\ Red\ Alert\ II/RA2.INI
sed -i 's/^fixchilds=.*/fixchilds=3/' $HOME/.var/app/com.valvesoftware.Steam/.local/share/Steam/steamapps/common/Command\ \&\ Conquer\ Red\ Alert\ II/ddraw.ini

The above sed's basically configure it like this:

RA2.INI

[Video]
AllowHiResModes=yes
VideoBackBuffer=yes
ScreenWidth=1024
ScreenHeight=768

ddraw.ini

fixchilds=3

I still haven't figured out why it appears to constantly be running at what feels like 15fps, and why it sometimes just fully locks up. However, when UI elements vanish, I find that bringing up the 'overview' by pressing the Super Key in Gnome will render the missing elements, allowing me to guess where to click the hidden buttons once I fullscreen the application again :D

Also even though we set AllowHiResModes=yes, I don't recommend actually using the higher resolutions because it breaks the UI elements in an odd ways. The highest supported res without AllowHiResModes=yes is 1024x768 and is pretty much flawless in my testing except for the intermittent disappearing that's completely random as far as I can tell.

Would be good if we can isolate the issue and provide a fix upstream here! https://github.com/FunkyFr3sh/cnc-ddraw

That boxing feature in cnc-ddraw for integer scaling looks desirable too...

Edit1: Oh, and for new comers coming along, you need to set

WINEDLLOVERRIDES="ddraw.dll=n,b" %command%

in Steam > Library > 'Right-Click' - Command & Conquer Red Alert II and Yuri's Revenge > Properties.. > General > Launch Options > the input box at the bottom.

This also assumes you have extracted the CONTENTS of https://github.com/FunkyFr3sh/cnc-ddraw/releases/download/v6.2.0.0/cnc-ddraw.zip into <whereEverYouInstalledSteam>/Steam/steamapps/common/Command\ &\ Conquer\ Red\ Alert\ II/ so it looks like

Steam/steamapps/common/Command\ &\ Conquer\ Red\ Alert\ II/ddraw.ini Steam/steamapps/common/Command\ &\ Conquer\ Red\ Alert\ II/ddraw.dll Steam/steamapps/common/Command\ &\ Conquer\ Red\ Alert\ II/cnc-ddraw config.exe Steam/steamapps/common/Command\ &\ Conquer\ Red\ Alert\ II/Shaders/<lotsOfFilesInHere>

Lot's of this 'should' apply also to 'Command & Conquer Tiberian Sun' as well, but I don't see any open issues on this repo mentioning it. Will mention it when someone opens and issue on that game so it links to this info.

osirase avatar Mar 09 '24 01:03 osirase

Some screenshots of it running on Fedora 39 Linux with the Flatpak version of Steam as follows:

RA2.INI

[Video]
AllowHiResModes=yes
VideoBackBuffer=yes
ScreenWidth=1024
ScreenHeight=768

ddraw.ini

fixchilds=3

Screenshot from 2024-03-09 14-21-47 Screenshot from 2024-03-09 14-21-59 Screenshot from 2024-03-09 14-22-10 Screenshot from 2024-03-09 14-23-18 Screenshot from 2024-03-09 14-23-22 Screenshot from 2024-03-09 14-23-26 Screenshot from 2024-03-09 14-23-29

osirase avatar Mar 09 '24 01:03 osirase

ddraw.ini

fixchilds=3

Ideally should be '2', but for some reason it's not scaling the child windows as expected. Probably something to do with the OS's compositor making it clip inappropriately due to scaling. Probably not fixable within cnc-ddraw itself i suspect... I really don't know - It's beyond me.

osirase avatar Mar 09 '24 01:03 osirase

Interesting 'Howto' guide for windows on broken RA2 GUI elements: https://github.com/FunkyFr3sh/cnc-ddraw/wiki/How-to-fix-Red-Alert-2-and-Yuri's-Revenge-UI-glitches

I suppose we need to look at what layers scaling is being applied and we might be able to work around this. Should be easier to test in gamescope. I'm running mutter on a 4k screen with no scaling enabled. So I suppose the scaling might be coming from proton itself somehow? Just thinking outloud.

osirase avatar Mar 09 '24 02:03 osirase

Having weird artifacts here. Game runs fine, however sometimes the frames freeze entirely and leaving game unplayable.

Game is responsive, only 1 frame gets displayed after refocusing window and goes back to the frozen frame. diagnostics.json

UPDATE: Weird black overlay on Wayland, Crashes on X11

korewaChino avatar Mar 20 '24 11:03 korewaChino

Compatibility Report

  • Name of the game with compatibility issues: Command & Conquer Red Alert™ 2 and Yuri’s Revenge™
  • Steam AppID of the game: 2229850

System Information

  • GPU: intel hd 3000
  • Video driver version: Mesa 23.3.6-1
  • Kernel version: 6.7.9
  • Link to full system information report as Gist: report
  • Proton version: 1710947987 experimental-9.0-20240320

I confirm:

  • [x] that I haven't found an existing compatibility report for this game.
  • [x] that I have checked whether there are updates for my system available.

Proton log: steam-2229850.tar.gz

Symptoms

Game is slow in the menu and crashes when you select New campaign

Reproduction

  1. Start Red alert 2
  2. Click Single player
  3. Click New campaign
  4. If game doesn't crash click "back" and repeat previous step a couple times.

Observed result: Game menu is slow and eventually crashes Expected result: game doesn't crash

iodream avatar Mar 21 '24 17:03 iodream

So after using the experimental version of proton I'm able to set the resolution to 1920x1080 and it looks amazing!

Screenshot from 2024-03-23 15-58-03

I'm still using the cnc-ddraw library though. Also the game no longer feels like it's running at 15fps.

osirase avatar Mar 23 '24 03:03 osirase

So I've entirely removed the RA2 installation directory, the dll overides in advanced steam settings and reinstalled it back to default. But now the 15fps slowness and stuttering is back. Visuals look good though. I'll see if I can replicate the setting I tweaked to have it run smoothly.

osirase avatar Mar 23 '24 03:03 osirase

Replying to https://github.com/ValveSoftware/Proton/issues/6208#issuecomment-1986669388

I'm able to replicate the improvement of fps and removal of stuttering by reapply the cnc ddraw files manually following my above guide. The stock ones installed exhibit stuttering and poor fps. Dunno why.

However, if fixchilds=2 I get strange colour artifacts in the menu's; I tried capturing a screenshot of this but it does not reflect in the screenshots... Must be because of exclusive full screen mode. The artifacting also dissapears in Gnome's overview mode via the Super Key.

Setting it to fixchilds=3 again resolves this issue, and the fps/stuttering issues go away.

Very strange!

osirase avatar Mar 23 '24 03:03 osirase

Compatibility Report

  • Name of the game with compatibility issues: Command & Conquer Red Alert™ 2 and Yuri’s Revenge™
  • Steam AppID of the game: 2229850

System Information

  • GPU: intel HD520
  • Video driver version: Mesa 23.3.6
  • Kernel version: 6.7.9-200.fc39.x86_64
  • Link to full system information report as Gist:
  • Proton version: 1710947987 experimental-9.0-20240320

I confirm:

  • [+] that I haven't found an existing compatibility report for this game.
  • [+] that I have checked whether there are updates for my system available.

Symptoms

Game freezes if a button is clicked before main menu video loads or after loading shortly after

Reproduction

Start either C&C Red Alert 2 or Yuri's Revenge Start either click around the menu Either before main menu video loads or shortly after, click menu button

steam-2229850.zip

doomvrr avatar Mar 23 '24 13:03 doomvrr

Another observation, when running a stock RA2 installation via steam with proton experimental - along with the slowdown/speedup stuttering performance issue there is also flicking in-game cursor observed when the cursor is in motion, but fine when static.

osirase avatar Mar 31 '24 23:03 osirase

Ok so I did a sha256sum against my manual method vs what's downloaded and added to the OS level dll's via: https://github.com/Open-Wine-Components/umu-protonfixes/pull/46/commits/883b45e5ab92360fec3c0e63da6b09f46060eb81

They both check out, so we're using the same file... so I'm wondering what's the difference:

❯ sha256sum cnc-ddraw\(4\).zip cnc-ddraw\(5\).zip
c024d0ea42ec2d9708dc0a19342d037de7307c291dc43c01948a7d8f06b4deca  cnc-ddraw(4).zip
c024d0ea42ec2d9708dc0a19342d037de7307c291dc43c01948a7d8f06b4deca  cnc-ddraw(5).zip

By looking at that commit I'm going to take a stab in the dark, I think the file is loaded into the wine windows folder WITHOUT the corresponding .ini file, so it's defaulting to what ever the dll natively defaults to. The only difference after I manually extract cnc-ddraw.dll into the RA2 dir is setting the Steam override to:

WINEDLLOVERRIDES="ddraw.dll=n,b" %command%

For some reason the above makes it use the local manually deployed .dll in the RA2 file (I think). Removing it makes it default to the one deployed via that commit. Some other differences is the one deployed via the commit does some sort of blurry scaling, probably nearest neighbor. When I do the steam WINDLLOVERRIDES it looks like it's doing proper integer scaling. Plus the performance is way better.

osirase avatar Mar 31 '24 23:03 osirase

So I'm reasonably sure it's something to do with the renderer being chosen (gdi, opengl, direct3d9), does anyone know how to check the default ini settings that are being inherited from the Wine environment? I don't even know where the Wine stuff goes in terms of Steam and Flatpak.

osirase avatar Apr 01 '24 00:04 osirase

From this commit, the cnc-ddraw.zip has a sha256 checksum: c024d0ea42ec2d9708dc0a19342d037de7307c291dc43c01948a7d8f06b4deca https://github.com/Open-Wine-Components/umu-protonfixes/pull/46/commits/883b45e5ab92360fec3c0e63da6b09f46060eb81

So I download the same:

❯ sha256sum ~/Downloads/cnc-ddraw.zip
c024d0ea42ec2d9708dc0a19342d037de7307c291dc43c01948a7d8f06b4deca  ~/Downloads/cnc-ddraw.zip

From https://github.com/Open-Wine-Components/umu-protonfixes/pull/46/commits/883b45e5ab92360fec3c0e63da6b09f46060eb81 it looks as if only ddraw.dll is extracted. (And maybe the readme.txt from the Shaders sub directory)

So I extract that file and get the checksum:

❯ sha256sum ddraw.dll
f71bf13e02503f08b1604cfe8b906656417435586188c9b5f1865f55749dd639  ddraw.dll

The above is the .dll from: 2024/03/11 https://github.com/FunkyFr3sh/cnc-ddraw/releases/download/v6.3.0.0/cnc-ddraw.zip

So now we locate the wine environment used by Steam and RA2, which is:

~/.var/app/com.valvesoftware.Steam/.local/share/Steam/steamapps/compatdata/2229850/

In this directory there are two ddraw.dll's (ran from the RA2 install dir(~/.var/app/com.valvesoftware.Steam/.local/share/Steam/steamapps/common/Command & Conquer Red Alert II):

❯ fd ddraw.dll ../../compatdata/2229850
../../compatdata/2229850/pfx/drive_c/windows/system32/ddraw.dll
../../compatdata/2229850/pfx/drive_c/windows/syswow64/ddraw.dll

❯ sha256sum ../../compatdata/2229850/pfx/drive_c/windows/system32/ddraw.dll
23891b4501f0408172824832fb40c01d260beb5649753ba512701ff845d6db2f  ../../compatdata/2229850/pfx/drive_c/windows/system32/ddraw.dll

❯ sha256sum ../../compatdata/2229850/pfx/drive_c/windows/syswow64/ddraw.dll
2ff86657e815d9c8d9bbebce9a7d5c30834f8fd20f2d80631ef9e12c3adad283  ../../compatdata/2229850/pfx/drive_c/windows/syswow64/ddraw.dll

There is also ddraw.dll in the RA2 dir:

❯ sha256sum ddraw.dll
7611747c6383023df64559e4e52ae44cf1ca5329238ed1f63e25172f89d8c9fa  ddraw.dll

So conclusion... I have no idea which ddraw.dll it's using. It does not appear to be the one from https://github.com/Open-Wine-Components/umu-protonfixes/pull/46/commits/883b45e5ab92360fec3c0e63da6b09f46060eb81

Anyone with more experience know how to identify where the ddraw.dll is that RA2 is using?

osirase avatar Apr 01 '24 03:04 osirase

Is there something like 'ldd' that I can run in this wine environment to see what Ra2.exe is loading?

osirase avatar Apr 01 '24 04:04 osirase

Is there something like 'ldd' that I can run in this wine environment to see what Ra2.exe is loading?

I would look in the Proton/Wine log. The default Proton settings should contain +loaddll which will cause the log to contain somewhere an entry to which dll is being loaded by Wine. It'll say whether it's builtin or native and the path.

See also https://wiki.winehq.org/Debug_Channels

For a more direct equivalent to ldd look for something like Dependency Walker.

iodream avatar Apr 01 '24 17:04 iodream

@osirase

Anyone with more experience know how to identify where the ddraw.dll is that RA2 is using?

Steam release of C&C Red Alert 2 uses ddraw dll in this repo: https://github.com/narzoul/DDrawCompat

doomvrr avatar Apr 05 '24 09:04 doomvrr

Compatibility Report

  • Name of the game with compatibility issues: Command & Conquer Red Alert™ 2 and Yuri’s Revenge™
  • Steam AppID of the game: 2229850

System Information

  • GPU: intel HD520
  • Video driver version: Mesa 23.3.6
  • Kernel version: 6.8.4-200.fc39.x86_64
  • Link to full system information report as Gist:
  • Proton version: 1712822178 experimental-9.0-20240411

I confirm:

  • [+] that I haven't found an existing compatibility report for this game.
  • [+] that I have checked whether there are updates for my system available.

Symptoms

Game slows down, whenever you move the cursor, or hover over a building or unit, or when you move it to the edge to move the view of the map, whenever you're doing anything with mouse.

Reproduction

Start either C&C Red Alert 2 or Yuri's Revenge Start either campaign or skirmish or load a savestate

steam-2229850.log

doomvrr avatar Apr 20 '24 09:04 doomvrr