-
Notifications
You must be signed in to change notification settings - Fork 62
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Half-Life: Alyx fails to boot with modified dll file #55
Comments
Yes, this is known and mentioned in the readme :) |
@fholger it's not about "game doesn't like replacing dll", your DLL simply doesn't have certain functionality. And maybe there actually is a short-term fix: List of symbols in original DLL:
And this is list of symbols in your DLL:
I'm not sure but maybe exporting empty placeholder functions may help. If not, every function from original library must be correctly implemented and exported in new library. |
I am aware of that, but these functions are not part of the source code Valve released for OpenVR, so there is no template for these functions. But since they are not part of the released source, they should also not typically be used by games due to not being exposed in the headers. Of course, it's possible Valve uses a custom build or functionality for HL Alyx, but that most definitely rules out the easy fix. |
Looking at the assembly code of I loaded
This can be translated to C as something like:
So to recreate these functions it would require declaring the constants, the pointers and the functions:
Also, the pointers must be cleared (set to
Will these changes make openvr_fsr work with Half-Life: Alyx? I have no idea, but it might be worth giving it a try. |
Progress report summary: I added the missing functions, they don't seem to be called but the code runs further along anyway. An access violation in Starting Half-Life: Alyx with unpatched openvr_api.dll v. 2.0:
I patched
With this new DLL the game still won't start, but:
Analyzing the exception in the minidump:
So I patched
... and the new
FWIW, the DLL works in another game without issues (Blade Runner 9732). Sorry about the long post. Any ideas? |
There has to be a better way to do this, but I got the game to start by adding this to
With resulting
Edit:
|
Seems to load fine for me. Edit: |
Alyx has dynamic resolution scaling, so depending on the current scene and performance headroom, it may only render to a part of the texture. But the mod isn't aware and will always place the sweet spot as if the whole texture had been rendered to. That's why it's mismatched. Properly supporting this would require some refactoring; given how well Alyx performs compared to most other VR games, I'm not sure it's really worth the effort. Kudos on getting it to work, though. :) |
Using just dummy functions (returning My guess is that this patch could also make FSR work in other games as well. @fholger , would you be interested in adding this patch to your code? If you prefer a pull request, let us know. And BTW, thanks for your work on openvr_fsr! 😄 |
Depends. I have no issue adding a bunch of function stubs, but I would be a bit more sceptical of some of the hacks that have been discussed in this thread :) |
See issue fholger#55 for details.
See issue fholger#55 for details.
See issue fholger#55 for details.
See issue fholger#55 for details.
I wonder is there is a better solution than
Done. |
Since this patch is probably not yet final, if anyone wants to give it a try you can get the patched DLL here and see how well (or not) it works in Half-Life: Alyx for you. |
You can close dynamic resolution scaling with (-console -vconsole +vr_fidelity_level_auto 0 +vr_fidelity_level 6) I guess level 6 for the most ideal resolution %151 - 2689x2988. When dynamic resolution working on medium tier computers, fidelity lvl is around lvl3 in most scenes, which is very annoying. If this works, it could offer a much better quality experience. Maybe it's worth it :)) |
You can disable dynamic resolution scaling in the launch options: Level 3 is 100%, and it's what I use. |
Game doesn't start anymore? |
As the title says, the game fails to boot on my system using the FSR-Enabled openvr_api.dll file, claiming it failed to initialize VR space. RenderScale set to 0.59, all other settings as default.
The text was updated successfully, but these errors were encountered: