Closed r2rX closed 4 years ago
This is reproducible in the freely-available Soul Reaver 2 demo version as well. I'll have to do some digging.
@samuelgr Sorry about that. Accidentally closed the issue.
Looking forward to the progress/results. Cheers!
I have a build of Xidi that appears to work properly with this game. I do not anticipate it will be much longer before this bug is fixed completely.
There were essentially two issues:
Xidi was rejecting a request from the game to configure a controller in a way Xidi supports but had no effect. Changing this behavior fixed the crash-to-desktop issue.
There are other small mismatches in expected behaviors between Xidi and the game, all but one of which have been properly fixed. The last one concerns how controller elements (buttons, thumbsticks, etc) are identified to the game when it requests controller state updates. My test build just does what the game expects (which is why it works), but I need to dig into what DirectInput does natively in order to produce a proper fix.
Should be fixed in v1.0.2. Please give it a try.
Hey @samuelgr . I am glad to report that it's working! The game boots fine, the options menu recognizes the pad and the throttle buttons (LT/RT) are finally assignable AND the right analog stick works for camera control.
On behalf of all Soul Reaver 2 fans (and future generations), thank you very, very much! Despite the fact that it's working, I look forward to the "proper" fix and shall test it when ready.
Glad to hear it worked! Just to be clear, v1.0.2 is the proper fix.
Glad to hear it worked! Just to be clear, v1.0.2 is the proper fix.
Haha. I stand corrected then. Thanks alot, @samuelgr !
Hate to be the bearer of bad news @samuelgr but the crash bug in Soul Reaver 2 seems to be back, as of 4.0.1. I'm able to repro it both natively on Windows and through Wine/Proton.
Strangely, this seems to be happening on 1.0.2 as well. Maybe there's something different in the Steam release of SR2?
Edit: When using dinputto8 to forward the dinput7 API to dinput8 and using the dinput8 Xidi, it works under Windows. I have not figured out the right configuration to get it working on Proton. I think the game uses dinput for all game input and maybe window events for menus.
I am not able to reproduce this issue with the GOG version on Windows 11 using the dinput.dll
form of Xidi v4.0.1. Could you please attach a debug log?
Hate to be the bearer of bad news @samuelgr but the crash bug in Soul Reaver 2 seems to be back, as of 4.0.1. I'm able to repro it both natively on Windows and through Wine/Proton.
Strangely, this seems to be happening on 1.0.2 as well. Maybe there's something different in the Steam release of SR2?
Edit: When using dinputto8 to forward the dinput7 API to dinput8 and using the dinput8 Xidi, it works under Windows. I have not figured out the right configuration to get it working on Proton. I think the game uses dinput for all game input and maybe window events for menus.
Just wanted to chime in. I just tested Soul Reaver 2 in Windows 11 and Linux (manually installed through Lutris & GE-Proton 7.22) with an Xbox One Controller. FYI, only mouse and keyboard works for the game menu. Once in-game, the controller works fine.
Linux:
Xidi 1.0.2 works perfectly fine using the 32bit dinput.dll (to ensure the prefix refers to Xidi's dinput.dll, open the WINE configuration window for the prefix the game is installed with (winecfg), go to the 'Libraries' tab and add 'dinput'; make sure it's set to 'Native'). To help access winecfg for the Proton prefix, you can use Protontricks and the following command in a terminal: protontricks gameid winecfg
(in this case, protontricks 224940 winecfg
)
Xidi 4.0.1 crashes the game on launch (Despite the VC++ 2015-2019 redist installed, WINE outputs an error related to an unimplemented function for _msvcp140_atomic_wait.dll_).
Windows: Xidi 1.0.2 works perfectly fine using the 32bit dinput.dll.
Xidi 4.0.1 works perfectly fine with the 32bit version of both .dll's. (The only note to make is that the button number assignments are slightly different between v1.0.2 and 4.0.1 but functions fine ultimately).
@samuelgr and @HybridEidolon , I have some good feedback to share. :)
I tested Soul Reaver 2 and LOK Defiance on both Linux (through WINE) and Windows.
Linux: Soul Reaver 2: Xidi 4.0.2 & Hookshot 1.2.0 works flawlessly! (Make sure to add 'dinput' - native to Libraries in Winecfg & install VC Redist 2022 in Prefix)
LOK Defiance: Xidi 4.0.2 & Hookshot 1.2.0 works flawlessly and, despite the Vibration toggle being greyed out and set to off, Force Feedback is actually working! (Make sure to add 'dinput8' - native to Libraries in Winecfg & install VC Redist 2022 in Prefix)
Windows: Soul Reaver 2: Xidi 4.0.2 & Hookshot 1.2.0 works flawlessly! (use 32bit files if running in 64bit OS)
LOK Defiance: Couldn't test as the game would launch to a black screen and the first few seconds of the video sound keeps looping (could be a Windows 11 & AMD driver issue) but I don't see why it wouldn't work. I really wanted to test if Vibration worked as well. :)
Wonderful news, thank you for the update @r2rX! In light of force feedback working in Defiance, I guess it is safe to say #23 is a nonissue.
One additional note: in my own testing I found that Hookshot is not necessary for SR2. Just dinput.dll
is sufficient.
One additional note: in my own testing I found that Hookshot is not necessary for SR2. Just
dinput.dll
is sufficient.
Good to know! At least we know conclusively that both methods work.
@r2rX
Xidi 4.0.1 crashes the game on launch (Despite the VC++ 2015-2019 redist installed, WINE outputs an error related to an unimplemented function for msvcp140_atomic_wait.dll).
When I installed vcrun2019 in my Proton prefix to work around this issue, Xidi 4.0.1 worked in Soul Reaver 2 but only if I piped it through dinputto8 to use Xidi dinput8. I could double-check to see if just using dinput xidi directly works for me in Linux via Proton, but it did not under Windows.
Are you using the 2019 version of the Visual Studio runtime? If so, could you try installing the later 2022 version and seeing if that helps?
I was not able to get the 2022 runtime working when running the installer directly with Protontricks, which doesn't have it listed as a built-in option yet; I will try again when I set up Defiance to run in Proton, since I figure it will probably be needed there too.
Thought, it is completely possible I haven't installed runtime 2022 on my Windows desktop, hence the crash... I'll give that a try this afternoon too.
Sounds good. If the crash persists then please post a debug log or, if the game does not load to the point that a log is produced, any other error messages that are shown would also be helpful.
@r2rX
Xidi 4.0.1 crashes the game on launch (Despite the VC++ 2015-2019 redist installed, WINE outputs an error related to an unimplemented function for msvcp140_atomic_wait.dll).
When I installed vcrun2019 in my Proton prefix to work around this issue, Xidi 4.0.1 worked in Soul Reaver 2 but only if I piped it through dinputto8 to use Xidi dinput8. I could double-check to see if just using dinput xidi directly works for me in Linux via Proton, but it did not under Windows.
@HybridEidolon , with the dinput.dll from Xidi 4.0.2, you shouldn't require dinputto8 or any other file. If I understand correctly, VC Redist 2022 is only necessary for Hookshot (is that correct, @samuelgr ?) If so, it's only necessary for Defiance as it requires Hookshot. Soul Reaver 2 works with just the dinput.dll.
I was not able to get the 2022 runtime working when running the installer directly with Protontricks
Try installing it via this command line (replace < appid > with ID of Soul Reaver 2 / Defiance on Steam):
WINEFSYNC=1 protontricks --no-bwrap -c 'wine /location/of/file/vcredist.exe' <appid>
Both Xidi and Hookshot are built with and linked against the 2022 version of the runtime, so both would require that the 2022 version be installed. I updated the documentation a while ago to reflect this fact.
Both Xidi and Hookshot are built with and linked against the 2022 version of the runtime, so both would require that the 2022 version be installed. I updated the documentation a while ago to reflect this fact.
Haha. Fair enough. I'll remember that for future use (and a lesson to RTM :) )
Yep, okay, Hookshot works with Defiance on both Windows and Proton, and dinput Xidi works directly with Soul Reaver 2 on both as well (with only vcrun2019 no less). I must have missed something when I was setting this all up.
Great, I am glad to hear everything works after all. Thank you for the update.
Greetings,
Firstly, great work on this project!
Just wanted to report an issue between Xidi and Soul Reaver 2 (GOG version). If I place the dinput.dll into the Soul Reaver 2 folder and run the game, it immediately crashes to desktop (when the dinput.dll is removed, the title launches properly). The testing is done with an Xbox One controller on Windows 10.
I'm happy to do further testing, in order to help pinpoint the issue. :)