Open vuaieo opened 1 year ago
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.
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.
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.
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)
Same problem with black menus here. Haven't tried CNC-DDraw yet. Intro video played fine though.
Can confirm the menu screen goes black but can still hear the game audio.
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!
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.
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
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
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.
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:
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
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/
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.
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.
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.
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
Proton log: steam-2229850.tar.gz
Game is slow in the menu and crashes when you select New campaign
Observed result: Game menu is slow and eventually crashes Expected result: game doesn't crash
So after using the experimental version of proton I'm able to set the resolution to 1920x1080 and it looks amazing!
I'm still using the cnc-ddraw library though. Also the game no longer feels like it's running at 15fps.
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.
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!
Game freezes if a button is clicked before main menu video loads or after loading shortly after
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
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.
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.
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.
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?
Is there something like 'ldd' that I can run in this wine environment to see what Ra2.exe is loading?
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.
@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
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.
Start either C&C Red Alert 2 or Yuri's Revenge Start either campaign or skirmish or load a savestate
Compatibility Report
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
I confirm:
PROTON_LOG: steam-11467124318811455488.zip
Symptoms
no sound in game which makes this game unplayable since is crucial ...
Reproduction
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