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

Ultimate Spider-Man does not work at all. #83

Open
Glewstik opened this issue Jul 7, 2024 · 4 comments
Open

Ultimate Spider-Man does not work at all. #83

Glewstik opened this issue Jul 7, 2024 · 4 comments

Comments

@Glewstik
Copy link

Glewstik commented Jul 7, 2024

I've tried tried every DLL and I also tried all of them with Hookshot and the game does not seem to detect Xidi at all. In game it just shows the default Xbox controller name. I think I have everything installed correctly because other games with Xidi work like Tonic Trouble and Silent Hill 2 Enhanced Edition. I can't seem to get a log to generate with a Xidi.ini either probably doing something wrong.

@Glewstik
Copy link
Author

Glewstik commented Jul 7, 2024

It was putting logs on my desktop didn't see that at first. It seems the logs get created with WinMM whether using Hookshot or not but in game the controller is still showing up as an xbox controller.

Xidi_HookModule__HookshotLauncher_USM.exe_6188.log
Xidi_WinMM_USM.exe_15668.log

@samuelgr
Copy link
Owner

Were you able to capture logs when using the DInput or DInput8 forms of Xidi as well (possibly with the HookModule)? It doesn't look like this game is invoking any game controller functions via WinMM.

@samuelgr
Copy link
Owner

This game needs the DInput8 form of Xidi, but it is a bit complicated. It loads DirectInput by determining on its own what the Windows system path is and then calling LoadLibrary explicitly, so it bypasses the normal method of loading Xidi (by specifying the system path explicitly) and the HookModule method (which only intercepts COM object creation, not direct library loading). All of this happens sometime after the game starts, which means that neither Hookshot nor the HookModule ever get an opportunity to hook the DirectInput calls the game makes. Some new implementation work is needed in both Hookshot and the HookModule to solve this problem.

There are some semi-complex workarounds available in the meantime, but they are fairly complex and I don't recommend trying them. I'll share the easiest one below just for reference on what the game is doing that makes this complicated.

The workaround easiest is to edit the game's executable using a hex editor, by searching for the string "%s\dinput8.dll" and changing it to just "dinput8.dll" - this will prevent the game from asking for the system version of DirectInput, so Xidi's DInput8 form will work and Hookshot isn't required.

@Glewstik
Copy link
Author

Glewstik commented Jan 7, 2025

Sorry for the late replay!
First off I think I was reading the wrong logs initially so that's my bad. What I ended up doing to finish the game was use a program called Gamepad Phoenix which allowed me to make the triggers act correctly. I have also posted this solution on an old reddit post about people getting the triggers working so hopefully that will help some people.

Now as for the hex editor I tried it a couple of minutes ago it took me a minute to figure out how to do it since I've never done it before but after figuring out how to edit the right way I saved out the exe and put the dinput8.dll in again and everything works great now!

unfortunate that at least at the moment this seems like the only way to get it working but I'm glad it works. I much prefer Xidi to something like Gamepad Phoenix since it is unobtrusive and also at least on my machine it was causing frame rate issues with this game when I had the 60 fps patch installed.

Thanks so much for the help and thank you for the hard work you put in!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants