argonlefou / DemulShooter

Enable dual lightgun play in arcade games and emulator
104 stars 14 forks source link

Demulshooterx64 system windows under wine/linux #196

Closed zoo-prod closed 3 months ago

zoo-prod commented 3 months ago

I know it's not made for that usage, but I'm taking my chance here. I can't make demulshooterx64 to work under linux ( with wine proton ge in batocera v39) and windows games (ie operation wolf).

I've been succesful to make it work with namco / tc5 and quite all the games that i could succesfully launch, mostly with demulshooter(x86) (under batocera v39 and wine proton GE).

It seems that only windows games with x64 refuse to hook - it remains red (in the log file it says that it can't find the program, even though it is launched and run normaly).

Any idea why operation wolf return is refusing to work ? I've tried a lot of things, the issue seems to be that it just can't find the program's window, only on windows games using the x64 version

Edit : I could make house of the dead arcade plugin work by rooting winhttp.dll vi winecfg, however it doesn't work for operation wolf. Maybe some others DLL need to be rooted ?

zoo-prod commented 3 months ago

Adding the log file just in case : 23:56:54.060806 : 23:56:54.069325 : ---------------- Program Start -- DemulShooterX64 v12.0.0.0 ---------------- 23:56:54.069915 : Cmdline arg 0 : -target=windows 23:56:54.070157 : Cmdline arg 1 : -rom=opwolfr 23:56:54.070329 : Cmdline arg 2 : -v 23:56:54.080916 : Running as Administrator : True 23:56:54.094861 : Error: Impossible to get Output Value Capabilities for device \?\HID#VID_0079&PID_0006&IG_00#272&03000000790000000600000010010000.0&0&0&1#{4d1e55b2-f16f-11cf-88cb-001111000030} 23:56:54.095723 : Error: Impossible to get Output Value Capabilities for device \?\HID#VID_0079&PID_0006&IG_00#272&03000000790000000600000010010000.1&0&1&1#{4d1e55b2-f16f-11cf-88cb-001111000030} 23:56:54.096027 : Found 3 available RawInput devices : 23:56:54.099188 : + [RIM_TYPEMOUSE] \?\HID#VID_845E&PID_0001#0&0000&0&0&0#{378de44c-56ef-11d1-bc8c-00a0c91405dd} 23:56:54.099382 : + [RIM_TYPEHID] \?\HID#VID_0079&PID_0006&IG_00#272&03000000790000000600000010010000.0&0&0&1#{4d1e55b2-f16f-11cf-88cb-001111000030} 23:56:54.099543 : + [RIM_TYPEHID] \?\HID#VID_0079&PID_0006&IG_00#272&03000000790000000600000010010000.1&0&1&1#{4d1e55b2-f16f-11cf-88cb-001111000030} 23:56:54.114408 : Configuration file succesfuly loaded 23:56:54.114674 : P1 mode = RAWINPUT 23:56:54.114860 : P1 device = \?\HID#VID_845E&PID_0001#0&0000&0&0&0#{378de44c-56ef-11d1-bc8c-00a0c91405dd} 23:56:54.116076 : P1 device plugged and found, Handle = 0x1 23:56:54.116252 : P2 mode = RAWINPUT 23:56:54.116409 : P2 device = 23:56:54.116566 : P3 mode = RAWINPUT 23:56:54.116722 : P3 device = 23:56:54.116877 : P4 mode = RAWINPUT 23:56:54.117034 : P4 device = 23:56:54.119728 : Starting Output daemon... 23:56:54.119921 : Creating Window Message Output Helper... 23:56:54.153008 : LowLevelMouseHook installed ! 23:56:54.153519 : LowLevel-KeyboardHook installed ! 23:56:54.154833 : Windows screen scaling : 100% (HorizontalDPI=96, VerticalDPI=96) 23:56:54.161556 : Waiting for Coastal opwolfr game to hook..... 23:56:54.737976 : Game Window not found 23:56:55.233577 : Game Window not found 23:56:55.748084 : Game Window not found 23:56:56.267853 : Game Window not found 23:56:56.743197 : Game Window not found 23:56:57.281093 : Game Window not found 23:56:57.768190 : Game Window not found 23:56:58.264967 : Game Window not found 23:56:58.786428 : Game Window not found 23:56:59.282687 : Game Window not found 23:56:59.841749 : Game Window not found .....

argonlefou commented 3 months ago

Hello,

Unfortunatelly I have no control on how WINE is emulating the games rendering.

There are big difference between x86 and x64 program on Windows (and that's one of the reasons why a specific DemulShooter is needed) to start with....so I can't imagine the mess with WINE

On top of that, the game you are refering to (op wolf return) is a Unity game, adding one more coding layer for the game to run.

To find the game windows, DS is just looking at the requires process name in the process list, and then is searching for the required window by it's title. For that game, it's : "Operation Wolf Returns: First Mission"

Now to find what and why the window is not found.... I won't be able to help you more (I'm not using WINE and lack knowledge)

zoo-prod commented 3 months ago

Hi,

Thank you for taking the time to answer to my question. I totally understand, to be honnest, I didn't expected much, but you never know ! For the record, after more enquiries I've discovered that the unity games wouldn't work under Wine with demulshooter (nighthunter2 does the same thing, even though I can use the mouse configuration and then it works). Too many layers as you said, maybe. We can't use it for multiguns anyway as wine override the peripheral ID and just map everything as a unique mouse. However I could make quite a few games work with lightguns under batocera/linux because of your software and that's great ! Thank you for your work it's greatly appreciated !