KoKuToru / koku-xinput-wine

Adds xinput support to wine, without changing the source of wine.
BSD 2-Clause "Simplified" License
68 stars 21 forks source link

Problems with Dragon's Dogma Dark Arisen #7

Closed DistantThunder closed 8 years ago

DistantThunder commented 8 years ago

Hi! It's me again :)

This time, DDDA is proving a bit quirky. All of this have been realised on a clean Wine 32bit profile created for the game.

I tried to use the .dll(.so) from the Wine branch like I did the last time with Tales of Zestiria. They seemed to be working everywhere and be the ultimate solution.

Sadly, they didn't work this time. Which is strange because as far as I can tell, this game doesn't use SDL.

wine: Unhandled page fault on read access to 0x7f003e3e at address 0x7e33753b (thread 006b), starting debugger... fixme:advapi:EventRegister {47a9201e-73b0-42ce-9821-7e134361bc6f}, 0x1006cb30, 0x10111468, 0x10111460 fixme:advapi:EventRegister {58a9201e-73b0-42ce-9821-7e134361bc70}, 0x1006cb30, 0x101114a0, 0x10111498 fixme:advapi:EventRegister {3fa9201e-73b0-43fe-9821-7e145359bc6f}, 0x1006cb30, 0x10111430, 0x10111428 fixme:advapi:EventRegister {1432afee-73b0-42ce-9821-7e134361b433}, 0x1006cb30, 0x101114d8, 0x101114d0 fixme:advapi:EventRegister {4372afee-73b0-42ce-9821-7e134361b519}, 0x1006cb30, 0x10111510, 0x10111508 fixme:imm:ImmGetOpenStatus (0x178cc8): semi-stub fixme:ver:GetCurrentPackageId (0x33edf8 (nil)): stub Unhandled exception: page fault on read access to 0x7f003e3e in 32-bit code (0x7e33753b). Register dump: CS:0023 SS:002b DS:002b ES:002b FS:0063 GS:006b EIP:7e33753b ESP:0033cea0 EBP:0033cea4 EFLAGS:00010206( R- -- I - -P- ) EAX:7f003e3e EBX:00000018 ECX:00000000 EDX:7f00355a ESI:00000000 EDI:0033cef0 Stack dump: 0x0033cea0: 00000018 0033cec0 01adadcf 00000000 0x0033ceb0: 00000001 0033cef0 00000000 0b8ab87c 0x0033cec0: 0033ced8 01adad47 7f000a80 00000000 0x0033ced0: 00000001 0033cef0 0b8ab840 00df1e6e 0x0033cee0: 00000000 00000001 0033cef0 0b8ab87c 0x0033cef0: 00000000 0033cf2c 00000000 0b8ab840 Backtrace: =>0 0x7e33753b XInputGetCapabilities+0x15() in xinput1_3 (0x0033cea4) 1 0x01adadcf in gameoverlayrenderer (+0x8adce) (0x0033cec0) 2 0x01adad47 in gameoverlayrenderer (+0x8ad46) (0x0033ced8) 3 0x00df1e6e in ddda (+0x9f1e6d) (0x0b8ab840) 4 0x17acfe60 (0x01428558) 5 0x00c8a390 in ddda (+0x88a38f) (0x00df6b20) 0x7e33753b XInputGetCapabilities+0x15 in xinput1_3: movl 0x0(%eax),%eax Modules: Module Address Debug info Name (133 modules) PE 400000- 1a49000 Export ddda PE 1a50000- 1b9b000 Export gameoverlayrenderer PE 54c0000- 55f7000 Deferred steam PE 10000000-101ff000 Deferred d3dx9_43 PE 30000000-302c1000 Deferred steam2 PE 38000000-389ef000 Deferred steamclient PE 3b400000-3b432000 Deferred steam_api PE 3f000000-3f111000 Deferred tier0_s PE 3f600000-3f653000 Deferred vstdlib_s PE 60000000-60021000 Deferred cserhelper ELF 7a800000-7a930000 Deferred opengl32 -PE 7a820000-7a930000 \ opengl32 ELF 7b800000-7ba68000 Deferred kernel32 -PE 7b810000-7ba68000 \ kernel32 ELF 7bc00000-7bcfe000 Deferred ntdll -PE 7bc20000-7bcfe000 \ ntdll ELF 7bf00000-7bf04000 Deferred ELF 7d3b6000-7d441000 Deferred libgmp.so.10 ELF 7d441000-7d476000 Deferred libhogweed.so.4 ELF 7d476000-7d4b6000 Deferred libnettle.so.6 ELF 7d4b6000-7d4cb000 Deferred libtasn1.so.6 ELF 7d4cb000-7d4ff000 Deferred libidn.so.11 ELF 7d4ff000-7d561000 Deferred libp11-kit.so.0 ELF 7d561000-7d6ad000 Deferred libgnutls.so.30 ELF 7d6f5000-7d6fb000 Deferred libattr.so.1 ELF 7d6fb000-7d715000 Deferred libgcc_s.so.1 ELF 7d715000-7d72e000 Deferred libresolv.so.2 ELF 7d72e000-7d733000 Deferred libcap.so.2 ELF 7d733000-7d754000 Deferred libudev.so.1 ELF 7d754000-7d75a000 Deferred libtxc_dxtn.so ELF 7d75a000-7d765000 Deferred libxcursor.so.1 ELF 7d76c000-7d775000 Deferred libffi.so.6 ELF 7d775000-7d7ad000 Deferred uxtheme -PE 7d780000-7d7ad000 \ uxtheme ELF 7d7fd000-7d826000 Deferred libexpat.so.1 ELF 7d826000-7d862000 Deferred libfontconfig.so.1 ELF 7d862000-7d8d7000 Deferred libpcre.so.1 ELF 7d8d7000-7d9fd000 Deferred libglib-2.0.so.0 ELF 7d9fd000-7da65000 Deferred libharfbuzz.so.0 ELF 7da65000-7daa2000 Deferred libpng16.so.16 ELF 7daa2000-7dab3000 Deferred libbz2.so.1.0 ELF 7dab3000-7db76000 Deferred libfreetype.so.6 ELF 7db76000-7db89000 Deferred libxi.so.6 ELF 7db89000-7db8d000 Deferred libxcomposite.so.1 ELF 7db8d000-7db9a000 Deferred libxrandr.so.2 ELF 7db9a000-7dba6000 Deferred libxrender.so.1 ELF 7dba6000-7dbcd000 Deferred libxcb.so.1 ELF 7dbcd000-7dd1c000 Deferred libx11.so.6 ELF 7dd1d000-7dd23000 Deferred libxfixes.so.3 ELF 7dd64000-7ddf9000 Deferred winex11 -PE 7dd70000-7ddf9000 \ winex11 ELF 7ddf9000-7de23000 Deferred iphlpapi -PE 7de00000-7de23000 \ iphlpapi ELF 7de23000-7de53000 Deferred netapi32 -PE 7de30000-7de53000 \ netapi32 ELF 7de53000-7de7a000 Deferred mpr -PE 7de60000-7de7a000 \ mpr ELF 7de7a000-7de91000 Deferred libz.so.1 ELF 7de92000-7dea7000 Deferred libxext.so.6 ELF 7dea7000-7ded9000 Deferred secur32 -PE 7deb0000-7ded9000 \ secur32 ELF 7ded9000-7df54000 Deferred wininet -PE 7dee0000-7df54000 \ wininet ELF 7df54000-7e055000 Deferred comctl32 -PE 7df60000-7e055000 \ comctl32 ELF 7e055000-7e081000 Deferred msvfw32 -PE 7e060000-7e081000 \ msvfw32 ELF 7e081000-7e13b000 Deferred winmm -PE 7e090000-7e13b000 \ winmm ELF 7e13b000-7e166000 Deferred msacm32 -PE 7e140000-7e166000 \ msacm32 ELF 7e166000-7e1ab000 Deferred avifil32 -PE 7e170000-7e1ab000 \ avifil32 ELF 7e1ab000-7e1b4000 Deferred librt.so.1 ELF 7e1b4000-7e2dd000 Deferred libsdl2-2.0.so.0 ELF 7e2e0000-7e2e7000 Deferred libxxf86vm.so.1 ELF 7e2e7000-7e2eb000 Deferred libxinerama.so.1 ELF 7e2eb000-7e325000 Deferred ws2_32 -PE 7e2f0000-7e325000 \ ws2_32 PE 7e325000-7e33b000 Dwarf xinput1_3 ELF 7e33b000-7e3be000 Deferred rpcrt4 -PE 7e350000-7e3be000 \ rpcrt4 ELF 7e3be000-7e4fd000 Deferred ole32 -PE 7e3e0000-7e4fd000 \ ole32 ELF 7e4fd000-7e519000 Deferred dinput8 -PE 7e500000-7e519000 \ dinput8 ELF 7e519000-7e66d000 Deferred wined3d -PE 7e530000-7e66d000 \ wined3d ELF 7e66d000-7e6ac000 Deferred d3d9 -PE 7e670000-7e6ac000 \ d3d9 ELF 7e6ac000-7e76a000 Deferred msvcrt -PE 7e6c0000-7e76a000 \ msvcrt ELF 7e76a000-7e78e000 Deferred imm32 -PE 7e770000-7e78e000 \ imm32 ELF 7e78e000-7e7a2000 Deferred psapi -PE 7e790000-7e7a2000 \ psapi ELF 7e7a2000-7e8c4000 Deferred gdi32 -PE 7e7b0000-7e8c4000 \ gdi32 ELF 7e8c4000-7ea34000 Deferred user32 -PE 7e8e0000-7ea34000 \ user32 ELF 7ea34000-7eaad000 Deferred shlwapi -PE 7ea40000-7eaad000 \ shlwapi ELF 7eaad000-7ed51000 Deferred shell32 -PE 7eac0000-7ed51000 \ shell32 ELF 7ed51000-7edc8000 Deferred advapi32 -PE 7ed60000-7edc8000 \ advapi32 ELF 7ef58000-7ef6b000 Deferred libnss_files.so.2 ELF 7ef6b000-7efb8000 Deferred libm.so.6 ELF 7efb9000-7efc0000 Deferred libxdmcp.so.6 ELF 7efc0000-7efda000 Deferred version -PE 7efd0000-7efda000 \ version ELF f46b8000-f690d000 Deferred libnvidia-glcore.so.358.16 ELF f690d000-f6a14000 Deferred libgl.so.1 ELF f6d79000-f6dc4000 Deferred dinput -PE f6d80000-f6dc4000 \ dinput ELF f7079000-f707e000 Deferred libnvidia-tls.so.358.16 ELF f70a0000-f710e000 Deferred setupapi -PE f70b0000-f710e000 \ setupapi ELF f710e000-f7244000 Deferred oleaut32 -PE f7130000-f7244000 \ oleaut32 ELF f7244000-f72ad000 Deferred dbghelp -PE f7250000-f72ad000 \ dbghelp ELF f72ad000-f7381000 Deferred crypt32 -PE f72c0000-f7381000 \ crypt32 ELF f7385000-f738a000 Deferred libdl.so.2 ELF f738c000-f7390000 Deferred libxau.so.6 ELF f73b5000-f73d0000 Deferred imagehlp -PE f73c0000-f73d0000 \ imagehlp ELF f73d2000-f758c000 Deferred libc.so.6 ELF f758c000-f75aa000 Deferred libpthread.so.0 ELF f75aa000-f7773000 Dwarf libwine.so.1 ELF f7774000-f7798000 Deferred ld-linux.so.2 ELF f779a000-f779b000 Deferred [vdso].so Threads: process tid prio (all id:s are in hex) 00000008 Steam.exe 00000056 0 00000055 0 00000052 0 00000051 0 00000050 0 0000004e 0 0000004d 0 0000004c 0 0000004b 15 0000004a 0 00000049 0 00000048 0 00000047 0 00000045 0 00000042 0 00000040 0 0000003e 0 0000002d 0 0000002b 0 0000002a 0 00000029 0 00000026 0 00000009 0 0000000e services.exe 00000020 0 0000001f 0 00000016 0 00000012 0 0000000f 0 00000010 explorer.exe 00000025 0 00000024 0 00000023 0 00000011 0 00000014 winedevice.exe 0000001e 0 0000001b 0 0000001a 0 00000015 0 0000001c plugplay.exe 00000022 0 00000021 0 0000001d 0 00000027 steamwebhelper.exe 0000004f 0 0000003f 0 0000003d 0 0000003c 0 0000003b 0 0000003a 0 00000039 0 00000038 0 00000037 0 00000036 0 00000035 0 00000034 0 00000033 0 00000030 0 0000002f 0 0000002e 0 0000002c 0 00000028 0 0000006a (D) E:\GAMING\SteamLibrary\steamapps\common\DDDA\DDDA.exe 00000077 0 00000076 0 00000075 0 00000074 0 00000073 0 00000072 0 00000071 -1 00000070 -1 0000006f -1 0000006e -1 0000006b 0 <== System information: Wine build: wine-1.9.1 (Staging) Platform: i386 Version: Windows XP Host system: Linux Host version: 4.3.3-pf

DDDA.exe.xz.zip

I tried to use the old /usr/lib32/koku_xinput_wine.so method but it didn't work either. Here's the debug output:

$> env LD_PRELOAD=/usr/lib32/koku-xinput-wine.so KOKU_XINPUT_DEBUG=1 WINEARCH=win32 WINEPREFIX=$HOME/.wine_game_3_DRAGONS_DOGMA_DA_32/ wine DDDA.exe koku-xinput-wine: [kernel32.dll] wine_dll_load("kernel32.dll", ...); koku-xinput-wine: [steam_api.dll] wine_dll_load("steam_api.dll", ...); koku-xinput-wine: [advapi32.dll] wine_dll_load("advapi32.dll", ...); koku-xinput-wine: [shell32.dll] wine_dll_load("shell32.dll", ...); koku-xinput-wine: [shlwapi.dll] wine_dll_load("shlwapi.dll", ...); koku-xinput-wine: [user32.dll] wine_dll_load("user32.dll", ...); koku-xinput-wine: [gdi32.dll] wine_dll_load("gdi32.dll", ...); koku-xinput-wine: [version.dll] wine_dll_load("version.dll", ...); koku-xinput-wine: [psapi.dll] wine_dll_load("psapi.dll", ...); koku-xinput-wine: [imm32.dll] wine_dll_load("imm32.dll", ...); koku-xinput-wine: [msvcrt.dll] wine_dll_load("msvcrt.dll", ...); koku-xinput-wine: [d3d9.dll] wine_dll_load("d3d9.dll", ...); koku-xinput-wine: [wined3d.dll] wine_dll_load("wined3d.dll", ...); koku-xinput-wine: [opengl32.dll] wine_dll_load("opengl32.dll", ...); koku-xinput-wine: [dinput8.dll] wine_dll_load("dinput8.dll", ...); koku-xinput-wine: [ole32.dll] wine_dll_load("ole32.dll", ...); koku-xinput-wine: [rpcrt4.dll] wine_dll_load("rpcrt4.dll", ...); koku-xinput-wine: search for CoSetProxyBlanket, found, redirect it koku-xinput-wine: [xinput1_3.dll] wine_dll_load("xinput1_3.dll", ...); koku-xinput-wine: found kernel32.dll koku-xinput-wine: found LoadLibrary in kernel32.dll koku-xinput-wine: found GetProcAddress in kernel32.dll koku-xinput-wine: [xinput1_3.dll] search for XInputEnable koku-xinput-wine: [xinput1_3.dll] found XInputEnable, redirect it koku-xinput-wine: [xinput1_3.dll] search for XInputGetAudioDeviceIds koku-xinput-wine: [xinput1_3.dll] search for XInputGetAudioDeviceIds with kernel32.dll koku-xinput-wine: [xinput1_3.dll] search for XInputGetBatteryInformation koku-xinput-wine: [xinput1_3.dll] found XInputGetBatteryInformation, redirect it koku-xinput-wine: [xinput1_3.dll] search for XInputGetCapabilities koku-xinput-wine: [xinput1_3.dll] found XInputGetCapabilities, redirect it koku-xinput-wine: [xinput1_3.dll] search for XInputGetDSoundAudioDeviceGuids koku-xinput-wine: [xinput1_3.dll] found XInputGetDSoundAudioDeviceGuids, redirect it koku-xinput-wine: [xinput1_3.dll] search for XInputGetKeystroke koku-xinput-wine: [xinput1_3.dll] found XInputGetKeystroke, redirect it koku-xinput-wine: [xinput1_3.dll] search for XInputGetState koku-xinput-wine: [xinput1_3.dll] found XInputGetState, redirect it koku-xinput-wine: [xinput1_3.dll] search for XInputSetState koku-xinput-wine: [xinput1_3.dll] found XInputSetState, redirect it koku-xinput-wine: [setupapi.dll] wine_dll_load("setupapi.dll", ...); koku-xinput-wine: [ws2_32.dll] wine_dll_load("ws2_32.dll", ...); koku-xinput-wine: [avifil32.dll] wine_dll_load("avifil32.dll", ...); koku-xinput-wine: [msacm32.dll] wine_dll_load("msacm32.dll", ...); koku-xinput-wine: [winmm.dll] wine_dll_load("winmm.dll", ...); koku-xinput-wine: [msvfw32.dll] wine_dll_load("msvfw32.dll", ...); koku-xinput-wine: [comctl32.dll] wine_dll_load("comctl32.dll", ...); koku-xinput-wine: [wininet.dll] wine_dll_load("wininet.dll", ...); koku-xinput-wine: [mpr.dll] wine_dll_load("mpr.dll", ...); koku-xinput-wine: [secur32.dll] wine_dll_load("secur32.dll", ...); koku-xinput-wine: [netapi32.dll] wine_dll_load("netapi32.dll", ...); koku-xinput-wine: [iphlpapi.dll] wine_dll_load("iphlpapi.dll", ...); koku-xinput-wine: [winex11.drv] wine_dll_load("winex11.drv", ...); koku-xinput-wine: [uxtheme.dll] wine_dll_load("uxtheme.dll", ...); err:winediag:SECUR32_initNTLMSP ntlm_auth was not found or is outdated. Make sure that ntlm_auth >= 3.0.25 is in your path. Usually, you can find it in the winbind package of your distribution. koku-xinput-wine: [steamclient.dll] wine_dll_load("steamclient.dll", ...); koku-xinput-wine: [crypt32.dll] wine_dll_load("crypt32.dll", ...); koku-xinput-wine: [imagehlp.dll] wine_dll_load("imagehlp.dll", ...); koku-xinput-wine: [dbghelp.dll] wine_dll_load("dbghelp.dll", ...); koku-xinput-wine: [oleaut32.dll] wine_dll_load("oleaut32.dll", ...); koku-xinput-wine: [tier0_s.dll] wine_dll_load("tier0_s.dll", ...); koku-xinput-wine: [vstdlib_s.dll] wine_dll_load("vstdlib_s.dll", ...); fixme:advapi:EventRegister {47a9201e-73b0-42ce-9821-7e134361bc6f}, 0x3f006ba0, 0x3f040ce8, 0x3f040ce0 fixme:advapi:EventRegister {58a9201e-73b0-42ce-9821-7e134361bc70}, 0x3f006ba0, 0x3f040d20, 0x3f040d18 fixme:advapi:EventRegister {3fa9201e-73b0-43fe-9821-7e145359bc6f}, 0x3f006ba0, 0x3f040cb0, 0x3f040ca8 fixme:advapi:EventRegister {1432afee-73b0-42ce-9821-7e134361b433}, 0x3f006ba0, 0x3f040d58, 0x3f040d50 fixme:advapi:EventRegister {4372afee-73b0-42ce-9821-7e134361b519}, 0x3f006ba0, 0x3f040d90, 0x3f040d88 fixme:ver:GetCurrentPackageId (0x30e280 (nil)): stub koku-xinput-wine: [rsaenh.dll] wine_dll_load("rsaenh.dll", ...); koku-xinput-wine: [kernel32.dll] wine_dll_load("kernel32.dll", ...); koku-xinput-wine: [ws2_32.dll] wine_dll_load("ws2_32.dll", ...); koku-xinput-wine: [comctl32.dll] wine_dll_load("comctl32.dll", ...); koku-xinput-wine: [user32.dll] wine_dll_load("user32.dll", ...); koku-xinput-wine: [gdi32.dll] wine_dll_load("gdi32.dll", ...); koku-xinput-wine: [advapi32.dll] wine_dll_load("advapi32.dll", ...); koku-xinput-wine: [version.dll] wine_dll_load("version.dll", ...); koku-xinput-wine: [shell32.dll] wine_dll_load("shell32.dll", ...); koku-xinput-wine: [shlwapi.dll] wine_dll_load("shlwapi.dll", ...); koku-xinput-wine: [oleaut32.dll] wine_dll_load("oleaut32.dll", ...); koku-xinput-wine: [ole32.dll] wine_dll_load("ole32.dll", ...); koku-xinput-wine: [rpcrt4.dll] wine_dll_load("rpcrt4.dll", ...); koku-xinput-wine: search for CoSetProxyBlanket, found, redirect it koku-xinput-wine: [imm32.dll] wine_dll_load("imm32.dll", ...); koku-xinput-wine: [winex11.drv] wine_dll_load("winex11.drv", ...); koku-xinput-wine: [uxtheme.dll] wine_dll_load("uxtheme.dll", ...); koku-xinput-wine: [psapi.dll] wine_dll_load("psapi.dll", ...); fixme:ver:GetCurrentPackageId (0x33e410 (nil)): stub fixme:process:ProcessIdToSessionId Unsupported for other processes.

I'm using

$> wine --version wine-1.9.1 (Staging)

And I'm positive Zestiria and other games based on the .dll method are still working.

KoKuToru commented 8 years ago

I see a "gameoverlayrenderer" in the crash .. are you using it with steam ? Try to disable the steam overlay.

DistantThunder commented 8 years ago

@KoKuToru

I disabled the gameoverlay in Steam to no avail. It still crashes.

KoKuToru commented 8 years ago

Sorry for the late response.

So the builtin-dll version still crashes the a Unhandled page fault on read access at =>0 0x7e33753b XInputGetCapabilities+0x15() in xinput1_3 (0x0033cea4) ?

Based on this crash, I would say the game does try to get the game controller from the builtin-dll but somehow crashes...

We could add some debug messages to XInputGetCapabilities maybe we can narrow down the problem..

If you want, I can create a branch for you with the added debug messages

DistantThunder commented 8 years ago

Hi. I apologize for the late response as well.

Yes, I'd like a branch with more debug messages so that we can sort this out and hopefully expand Koku Xinput compatibility.

KoKuToru commented 8 years ago

Well I did add debug messages now into the wine-branch..

While adding the messages.. I might have found the problem .. it crashes with a Unhandled page fault on read access and movl 0x0(%eax),%eax.. so maybe .. pCapabilities == nullptr ?

Anyways please test it when you have time :dancer:

DistantThunder commented 8 years ago

Using your build.sh in the wine branch, I have the following error messages, even though the xinput1_3.dll ends up in bin/.

~/dev/koku-xinput-wine/xinput1_3 ~/dev/koku-xinput-wine
Winemaker 0.8.4
Copyright 2000-2004 François Gouget <fgouget@codeweavers.com> for CodeWeavers
Copyright 2004 Dimitrie O. Paun
Copyright 2009-2012 André Hentschel
Scanning the source directories...
Generating project files...
  .
winegcc -c  -mno-cygwin -m32 -I../include   -o xinput1_3_main.o xinput1_3_main.c
xinput1_3_main.c: In function 'XInputGetCapabilities':
xinput1_3_main.c:251:9: error: expected expression before ':' token
     std::cerr << "koku-xinput-wine:" << "XInputGetCapabilities(" << dwUserIndex << ", " << dwFlags << ", " << (void*) pCapabilities << ") called" << std::endl;
         ^
xinput1_3_main.c:253:9: error: duplicate label 'std'
         std::cerr << "koku-xinput-wine:" << "return ERROR_DEVICE_NOT_CONNECTED" << std::endl;
         ^
xinput1_3_main.c:251:5: note: previous definition of 'std' was here
     std::cerr << "koku-xinput-wine:" << "XInputGetCapabilities(" << dwUserIndex << ", " << dwFlags << ", " << (void*) pCapabilities << ") called" << std::endl;
     ^
xinput1_3_main.c:253:13: error: expected expression before ':' token
         std::cerr << "koku-xinput-wine:" << "return ERROR_DEVICE_NOT_CONNECTED" << std::endl;
             ^
xinput1_3_main.c:256:5: error: duplicate label 'std'
     std::cerr << "koku-xinput-wine:" << "fill Data";
     ^
xinput1_3_main.c:251:5: note: previous definition of 'std' was here
     std::cerr << "koku-xinput-wine:" << "XInputGetCapabilities(" << dwUserIndex << ", " << dwFlags << ", " << (void*) pCapabilities << ") called" << std::endl;
     ^
xinput1_3_main.c:256:9: error: expected expression before ':' token
     std::cerr << "koku-xinput-wine:" << "fill Data";
         ^
xinput1_3_main.c:277:5: error: duplicate label 'std'
     std::cerr << "koku-xinput-wine:" << "return ERROR_SUCCESS" << std::endl;
     ^
xinput1_3_main.c:251:5: note: previous definition of 'std' was here
     std::cerr << "koku-xinput-wine:" << "XInputGetCapabilities(" << dwUserIndex << ", " << dwFlags << ", " << (void*) pCapabilities << ") called" << std::endl;
     ^
xinput1_3_main.c:277:9: error: expected expression before ':' token
     std::cerr << "koku-xinput-wine:" << "return ERROR_SUCCESS" << std::endl;
         ^
winegcc: gcc failed
Makefile:89: recipe for target 'xinput1_3_main.o' failed
make: *** [xinput1_3_main.o] Error 2
~/dev/koku-xinput-wine

~/dev/koku-xinput-wine/xinput1_4 ~/dev/koku-xinput-wine
Winemaker 0.8.4
Copyright 2000-2004 François Gouget <fgouget@codeweavers.com> for CodeWeavers
Copyright 2004 Dimitrie O. Paun
Copyright 2009-2012 André Hentschel
Scanning the source directories...
Generating project files...
  .
make: Nothing to be done for 'all'.
~/dev/koku-xinput-wine

all done, files are in bin-folder

And so, upon launching the game, it crashes:

http://hastebin.com/uqadajopin.avrasm

KoKuToru commented 8 years ago

lol, my console window was too small and I didn't see that compile error ..

I commited a fix

EDIT: the fix is in the wine-branch

DistantThunder commented 8 years ago

There's progress! I tried it. Now, the game does detect an additional "legit" X360 controller but it seems some nonsense is still occurring:

Though the mapping is better achieved (I now have LT/RT), it seems the kernel driver is still interfering somehow, and I get an endless camera motion that turns and turns and turns, just like it happened in Tales of Zestiria for example, prior to the solution you found there.

In addition, the game shows me the "random gamepad" buttons (1 2 3 ...) instead of the 360 gamepad one, which it does have on Windows.

However, I suspect the game itself may not be well coded in this regard:

https://steamcommunity.com/app/367500/discussions/0/451850849185557418/

Thanks again for your efforts.

EDIT: P.S.: Trying to fiddle with xboxdrv to try and stop the interference, I noticed my kernel lacks the uinput module. I'll recompile my kernel including that module and see if it works.

EDIT2: Also wondering if I should install dinput8. Afraid it could screw the game...

DistantThunder commented 8 years ago

Alright:

  • If I use just the kernel drivers (xpad, uinput, joydev), when I get into the game, it detects and expose an official XBOX 360 gamepad and the two additional jsx, and uevent gamepads.

However, it displays generic gamepad buttons and in-game the mappings are screwed.

  • If I activate xboxdrv userspace driver, detaching the kernel driver, the game still detects the official XBOX 360 gamepad and now displays the corresponding buttons! Yet ingame, the mappings are still screwed, but in a different way/layout.
  • If I activate xboxdrv userspace driver, detaching the kernel driver AND not using uinput, the game detects no gamepad at all.
  • Leaving kernel drivers loaded (xpad, joydev, uinput), installing winetricks dinput8, playing the game with the files from the wine branch in the game directory: intended behaviour. Official XBOX 360 pad is detected, its buttons show in the interfaces and all the mappings are correct.

I think this is solved. Thanks a lot for your help! :dancer: