ValveSoftware / Proton

Compatibility tool for Steam Play based on Wine and additional components
Other
23.86k stars 1.04k forks source link

Shenmue 1 & 2 (758330) #1981

Open NextGenRyo opened 5 years ago

NextGenRyo commented 5 years ago

Compatibility Report

System Information

I confirm:

steam-758330.log

Symptoms

Games Launcher will not start and if I bypass the launcher the game will not save on either shenmue 1 or 2.

kisak-valve commented 5 years ago

err:mscoree:CLRRuntimeInfo_GetRuntimeHost Wine Mono is not installed in the log points towards #18.

NextGenRyo commented 5 years ago

I do have mono installed version 4.7.3 I see it when i run "WINEPREFIX=~/.steam/steam/steamapps/compatdata/758330/pfx/ wine64 uninstaller" in the terminal.

aqxa1 commented 5 years ago

You can workaround the problem with this guide.

Basically, edit the run script to point to the game executable which should keep Steam integration, and therefore, saving.

NextGenRyo commented 5 years ago

Thanks, That was the first place I looked, however I made a mistake because I miss read one bit of it. I had to manually start the "run" script from the terminal and have steam open at the same time for everything to just work. Now the game is running as it should. Now lets just wait for those fixes to get into proton :)

flibitijibibo commented 5 years ago

Seems this got closed, though we still need to deal with the launcher and XAudio2. The latter works with FAudio, the launcher is a .NET issue.

aqxa1 commented 5 years ago

Audio looks to be fixed with Proton 3.16-5 due to FAudio support. The launcher is still broken, however.

EDIT: Never mind, voices are still missing without xaudio2 installed. Suspect a custom version of faudio is needed since IIRC wma is used by the game.

EDIT 2: Okay, it works with faudio compiled with WMA support. However, voices have a decent amount of distortion (worse than native xaudio2). Also, if you use the Proton bundled version of faudio, the game will crash when a voice is played.

Additionally, the ALSA implementation seems to be trying to grab a hardware device and subsequently fails, so only Pulseaudio works. That's beyond the scope of this bug, though.

flibitijibibo commented 5 years ago

Wrote a dumb thing to get past the launcher:

#include <windows.h>

int main(int argc, char **argv)
{
    const char *name, *dir;
    STARTUPINFO startup;
    PROCESS_INFORMATION process;

    /* Any parameter means load Shenmue 2 */
    if (argc > 1)
    {
        name = "sm2/Shenmue2.exe";
        dir = "sm2";
    }
    else
    {
        name = "sm1/Shenmue.exe";
        dir = "sm1";
    }

    ZeroMemory(&startup, sizeof(startup));
    ZeroMemory(&process, sizeof(process));
    startup.cb = sizeof(startup);
    if (CreateProcess(
        name,
        NULL,
        NULL,
        NULL,
        TRUE,
        0,
        NULL,
        dir,
        &startup,
        &process
    )) {
        WaitForSingleObject(process.hProcess, INFINITE);
        CloseHandle(process.hProcess);
        CloseHandle(process.hThread);
    }
    return 0;
}

Build with x86_64-w64-mingw32-gcc flibitSMLaunch.c -o SteamLauncher.exe and the game should jump straight to Shenmue 1. To boot Shenmue 2, throw in a random arbitrary parameter as a Launch Option.

Neodamode commented 5 years ago

The audio gets corrupted with FAudio when being near a Tomato Convenience Store (in both games). Same thing happens when playing some cassette tapes in S1.

Also, all the loading screens flicker with proton 3.16 and 3.16beta. However, they are all right with proton 3.7. I'm on NVIDIA 415.25.

steam-758330.log System information report as gist

kisak-valve commented 5 years ago

Hello @Neodamode, please copy your system information from steam (Steam -> Help -> System Information) and put it in a gist, then include a link to the gist in this issue report.

ghost commented 5 years ago

@flibitijibibo

Thank you this works great you're a genius.

I did need to set xaudio2_7 to native in the prefix with winecfg or else voices and other audio were missing. I think both games work perfectly now though, including controller support.

aqxa1 commented 5 years ago

Regarding the launcher workaround by @flibitijibibo , you can also use winegcc if you have Wine, but not mingw installed: winegcc flibitSMLaunch.c -o SteamLauncher.exe

You'll just need to copy SteamLauncher.exe.so in addition to SteamLauncher.exe

Inglebard commented 5 years ago

@flibitijibibo @thirdeyefunction I don't know why, but with the "flibitSMLaunch.c" workaround, the first time I launch it after a reboot, it crashed steam. The second time it works.

Edit more info :

JS method call Storage.SetString with 3 arguments
GameAction [AppID 758330, ActionID 1] : LaunchApp changed task to ProcessingInstallScript with ""
Proton: Missing or invalid openvrpaths.vrpath file! [Errno 2] No such file or directory: '/home/david/.config/openvr/openvrpaths.vrpath'
Proton: Missing or invalid openvrpaths.vrpath file! [Errno 2] No such file or directory: '/home/david/.config/openvr/openvrpaths.vrpath'
wine: cannot find L"C:\\windows\\system32\\winemenubuilder.exe"
Proton: Missing or invalid openvrpaths.vrpath file! [Errno 2] No such file or directory: '/home/david/.config/openvr/openvrpaths.vrpath'
Proton: Missing or invalid openvrpaths.vrpath file! [Errno 2] No such file or directory: '/home/david/.config/openvr/openvrpaths.vrpath'
../common/pipes.cpp (766) : CClientPipe::BWriteAndReadResult: BWaitResult failed, disconnected
../common/pipes.cpp (766) : Fatal assert failed: ../common/pipes.cpp, line 766.  Application exiting.

crash_20190331230244_1.dmp[2330]: Uploading dump (out-of-process)
/tmp/dumps/crash_20190331230244_1.dmp
assert_20190331230352_2.dmp[2335]: Uploading dump (out-of-process)
/tmp/dumps/assert_20190331230352_2.dmp
assert_20190331230352_2.dmp[2335]: Finished uploading minidump (out-of-process): success = yes
assert_20190331230352_2.dmp[2335]: response: Discarded=1
assert_20190331230352_2.dmp[2335]: file ''/tmp/dumps/assert_20190331230352_2.dmp'', upload yes: ''Discarded=1''
crash_20190331230244_1.dmp[2330]: Finished uploading minidump (out-of-process): success = yes
crash_20190331230244_1.dmp[2330]: response: CrashID=bp-78ef0244-d434-4033-bc09-516dc2190331
crash_20190331230244_1.dmp[2330]: file ''/tmp/dumps/crash_20190331230244_1.dmp'', upload yes: ''CrashID=bp-78ef0244-d434-4033-bc09-516dc2190331''
../common/pipes.cpp (766) : CClientPipe::BWriteAndReadResult: BWaitResult failed, disconnected
../common/pipes.cpp (766) : CClientPipe::BWriteAndReadResult: BWaitResult failed, disconnected
../common/pipes.cpp (766) : Fatal assert failed: ../common/pipes.cpp, line 766.  Application exiting.

../common/pipes.cpp (766) : Fatal assert failed: ../common/pipes.cpp, line 766.  Application exiting.

/home/david/.local/share/Steam/steam.sh : ligne 910 :  2005 Erreur de segmentation  (core dumped)$STEAM_DEBUGGER "$STEAMROOT/$STEAMEXEPATH" "$@"
assert_20190331230355_2.dmp[2356]: Uploading dump (out-of-process)
/tmp/dumps/assert_20190331230355_2.dmp
_ExitOnFatalAssert
assert_20190331230355_2.dmp[2356]: Finished uploading minidump (out-of-process): success = yes
assert_20190331230355_2.dmp[2356]: response: Discarded=1
assert_20190331230355_2.dmp[2356]: file ''/tmp/dumps/assert_20190331230355_2.dmp'', upload yes: ''Discarded=1''
linuxiorr commented 5 years ago

Regarding the launcher workaround by @flibitijibibo , you can also use winegcc if you have Wine, but not mingw installed: winegcc flibitSMLaunch.c -o SteamLauncher.exe

You'll just need to copy SteamLauncher.exe.so in addition to SteamLauncher.exe

I don't have the SteamLauncher.exe.so file - where do I find it and where do I put it? I tried copying SteamLauncher.exe and renaming it to SteamLauncher.exe.so (I put it in the SMLaunch directory), but it didn't work.

After running winegcc flibitSMLaunch.c -o SteamLauncher.exe I got the following output: winegcc: x86_64-solus-linux-gcc failed

Edit: OK, turns out I didn't have GCC installed, after installing it, I now get the following output.

In file included from /usr/include/wine/windows/windef.h:279,
                 from /usr/include/wine/windows/windows.h:37,
                 from flibitSMLaunch.c:1:
/usr/include/wine/windows/winnt.h:28:10: fatal error: ctype.h: No such file or directory
 #include <ctype.h>
          ^~~~~~~~~
compilation terminated.
winegcc: x86_64-solus-linux-gcc failed
Neodamode commented 5 years ago

@linuxiorr Install glibc-devel and binutils.

ghost commented 5 years ago

Wrote a dumb thing to get past the launcher:

#include <windows.h>

int main(int argc, char **argv)
{
  const char *name, *dir;
  STARTUPINFO startup;
  PROCESS_INFORMATION process;

  /* Any parameter means load Shenmue 2 */
  if (argc > 1)
  {
      name = "sm2/Shenmue2.exe";
      dir = "sm2";
  }
  else
  {
      name = "sm1/Shenmue.exe";
      dir = "sm1";
  }

  ZeroMemory(&startup, sizeof(startup));
  ZeroMemory(&process, sizeof(process));
  startup.cb = sizeof(startup);
  if (CreateProcess(
      name,
      NULL,
      NULL,
      NULL,
      TRUE,
      0,
      NULL,
      dir,
      &startup,
      &process
  )) {
      WaitForSingleObject(process.hProcess, INFINITE);
      CloseHandle(process.hProcess);
      CloseHandle(process.hThread);
  }
  return 0;
}

Build with x86_64-w64-mingw32-gcc flibitSMLaunch.c -o SteamLauncher.exe and the game should jump straight to Shenmue 1. To boot Shenmue 2, throw in a random arbitrary parameter as a Launch Option.

this doesn't work for me every time it tries to compile i just get an error about

ghost commented 5 years ago

@Madserge11 How are you trying to compile it? Seems like you're probably using normal GCC to compile a Linux binary. You need to use mingw or winegcc to compile a Windows binary. Worked for me with just winegcc.

winegcc shenmue.c Then copy a.out.so toSteamLauncher.exe in the Shenmue folder.

ghost commented 5 years ago

@Madserge11 How are you trying to compile it? Seems like you're probably using normal GCC to compile a Linux binary. You need to use mingw or winegcc to compile a Windows binary. Worked for me with just winegcc.

winegcc shenmue.c Then copy a.out.so toSteamLauncher.exe in the Shenmue folder.

i was using winegcc....... @z0z0z

Neodamode commented 5 years ago

Also, all the loading screens flicker with proton 3.16 and 3.16beta. However, they are all right with proton 3.7. I'm on NVIDIA 415.25.

Disabling "Allow Flipping" in nvidia-settings solves this. Proton 3.7 seems to force blitting (whatever that is).

tryton-vanmeer commented 5 years ago

this doesn't work for me every time it tries to compile i just get an error about

I had this issue and fixed by installing the wine dev package.

shoober420 commented 4 years ago

Compatibility Report

System Information

steam-758330.log

Symptoms

Crashes at launch

Reproduction

Open game

I see this is related to .NET, I was just adding my log to possibly help this issue.

soredake commented 3 years ago

Game does not launch with proton-experimental steam-758330.log

soredake commented 3 years ago

Proton 5.13-5, crash on start: steam-758330.log

soredake commented 3 years ago

With proton 5.21-GE-1 + @flibitijibibo game starts and sound works, even mod loader is working (WINEDLLOVERRIDES="xinput1_3=n,b" %command% is needed)

soredake commented 3 years ago

proton-ge 6.1-ge-2, game does not launch

steam-758330.log

NextGenRyo commented 3 years ago

@soredake Just tested with proton 5.13-6 with dotnet462 and faudio installed via protontricks and game runs. I remember using 5.13-5 before and had no problems either. Did you install dotnet462 for the launcher and faudio for sound in game?

soredake commented 3 years ago

@soredake Just tested with proton 5.13-6 with dotnet462 and faudio installed via protontricks and game runs. I remember using 5.13-5 before and had no problems either. Did you install dotnet462 for the launcher and faudio for sound in game?

With dotnet462 launcher crashes after one second.

NextGenRyo commented 3 years ago

@soredake uninstall the game and delete the prefix and any remaining game files and do it all again. I've had issues when I tampered a lot with a game i ended up breaking prefix and had to delete the prefix and on some occasion delete the game files also for a clean install.

soredake commented 3 years ago

@soredake uninstall the game and delete the prefix and any remaining game files and do it all again. I've had issues when I tampered a lot with a game i ended up breaking prefix and had to delete the prefix and on some occasion delete the game files also for a clean install.

I've removing prefix and checking files every time i test new version of proton, so broken prefix is not the case.

NextGenRyo commented 3 years ago

@soredake Hmm. Dont check the files just delete them all. I tried with another game to repair file and it kept saying all is fine, but still didnt work. I completely deleted any trace of that game and downloaded and installed again, it then worked fine. Did you try also dotnet4.5 or 4.0? Also I know that dotnet install is borked on latest wine version over 5.10 or something ( don't remember exact version ) so it might be the same for proton Maybe?

Try the older dotnet versions first. If no luck switch to older proton version for testing. If nothing then keep the older proton version and try installing dotnet462 in that. If it worked then you should be able to switch proton to the latest 5.13-6.

s3rg3 commented 3 years ago

Tried it with proton 6.3.1 since it was in the list of new playable games from the change log.

The game launch fine but with my 7.1 audio setup, it produce a buz all the time.

Setting stereo or 5.1 with pulseaudio make the buz disapear, but there is no voice in the intro videos, other sound are playing fine.

flibitijibibo commented 3 years ago

It looks like the WMA data hasn't been processed - in addition to hunting for sailors you'll also have to hunt for the dialog, because I don't think any of it has been fossilized yet.

For the 7.1 audio it almost sounds like it's upmixing artifacts? FAudio supports 7.1 but unless you pass SDL_AUDIO_CHANNELS=8 it might be doing 2->5.1->7.1 and causing a bunch of noise. The channel detection will be fixed in SDL 2.0.16 but the upmixing probably won't be... EDIT: Oh dear

s3rg3 commented 3 years ago

Yes probably upmixing artifacts i don't really know, i have a very loud buz and you can hear the other sound but they are lower.

i tried with SDL_AUDIO_CHANNELS=8 %command% but still have the loud noise.

i noticed that setting stereo with pulseaudio icons on my audio receiver is 7.1(probably means that it is upmixed despite setting it to 2.0) and with 5.1 from pulseaudio icons are 5.1.

in alsoft.rc : channels = surround71

in bash_profile : export PULSE_LATENCY_MSEC=60

flibitijibibo commented 3 years ago

Oh, weird... wish I knew more about Pulse, but at this point I'm already halfway to Pipewire and that probably works completely different despite being binary compatible.

WINEDEBUG=+xaudio2 might shine some light on what kind of device they're making - PCGW suggests they make 3.0 contexts for SM1 and 5.0 for SM2:

https://www.pcgamingwiki.com/wiki/Shenmue_I_%26_II#Audio_settings

That would be a little bit weird because most games just use whatever device defaults are provided, but would explain why there are upmixing artifacts even when we have the correct channel count in SDL.

s3rg3 commented 3 years ago

i got this one : fixme:dsound:DSOUND_MixerVol There is no support for 8 channels

The buz is starting with the launcher, probably nothing to do with the game itself

flibitijibibo commented 3 years ago

Ah, got it - yeah I think they just use MediaFoundation or something to play an mp3 file in the root folder, if I remember correctly. So that might actually be one of the Wine audio engines?

s3rg3 commented 3 years ago

i can't tell you, i am a pure newbie :)

here is the log with the launcher only: https://pastebin.com/sqnYKc4c

flibitijibibo commented 3 years ago

Looks like the launcher avoids XAudio2 entirely - so it's someone else's problem then, hooray :P

s3rg3 commented 3 years ago

it could be some Wine regression, i had the same thing on some other games while testing them with proton in the past.

madewokherd commented 3 years ago

The launcher uses WPF, and it was most likely fixed by this commit: https://github.com/madewokherd/wpf/commit/072b750f8f93d7c611f5da5f809e51ff61b77b79

So I guess it's probably using Windows Media Player API's via WPF.

madewokherd commented 3 years ago

Well, by "fixed" I mean that it started to run. My test machine is a mile away and has no speakers, so I had no way of knowing what the audio was doing.

Does the launcher continue to run after the game starts?

s3rg3 commented 3 years ago

After the game is launched, i can't see it in windowed mode, but when closing shenmue the launcher is back again.