Skip to content
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

Mods cannot find memory signatures when playing on Linux using Proton, etc. #4

Closed
techiew opened this issue Mar 20, 2022 · 4 comments · Fixed by #9
Closed

Mods cannot find memory signatures when playing on Linux using Proton, etc. #4

techiew opened this issue Mar 20, 2022 · 4 comments · Fixed by #9
Labels
good first issue Good for newcomers help wanted Extra attention is needed

Comments

@techiew
Copy link
Owner

techiew commented Mar 20, 2022

The mods will attempt to scan the memory, but will fail to find the signatures.

@techiew techiew changed the title Mods do not find memory signatures when playing on Linux using Proton, etc. Mods cannot find memory signatures when playing on Linux using Proton, etc. Mar 20, 2022
@MaienM
Copy link

MaienM commented Mar 21, 2022

FWIW the skip intro screen mod works just fine on Linux. This doesn't scan memory, but instead has a series of hardcoded offsets that it tries.

From the logs I notice that there are multiple regions that are skipped, and that only 16-17 regions are checked before VirtualQuery fails (87, which is Invalid parameter according to FormatMessage). I don't have Windows logs to compare this with, so I'm not sure if this is anomalous or expected.

@MaienM
Copy link

MaienM commented Mar 21, 2022

The pause mod made by iArtorias also works (the keycode for the keyboard doesn't appear to be picked up correctly, but pausing with the controller binding works fine). That mod also does memory scanning, but it uses a cross-platform library instead of the Windows APIs. Maybe try using that for your memory scanning?

@techiew
Copy link
Owner Author

techiew commented Mar 21, 2022

I'm kind of hesitant to jump ship and abandon my homebrewed code...

I think that the code that needs to be changed to make the memory scanning work on Linux (Proton) is minimal. After all, it does seem to work its way through the memory correctly, but maybe it skips some necessary sections? or the signature checking acts different? I've seen some posts from some years back saying that VirtualQuery did not work correctly in Proton/whatever compatibility layer, I think it's likely that this one is the culprit for me too.

I'll look at this some more in the near future. In the meantime anyone is welcome to investigate (sigscanning code is in ModUtils.h).

@techiew
Copy link
Owner Author

techiew commented May 9, 2022

Should have been fixed by #9

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
good first issue Good for newcomers help wanted Extra attention is needed
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants