Giter Club home page Giter Club logo

Comments (10)

DevilBlackDeath avatar DevilBlackDeath commented on August 27, 2024 1

Makes sense ! Plus that would probably not be a good viable long-term solution. Well in all cases, if it can work there's a bunch of games that are gonna go on my Pi. Tests with box86 so far are super promising when it comes to any 2D games with a sub 2-2.1Ghz requirement. Most XNA (the non-FNA ported ones, or even the ones that were ported but didn't recompile the FNA version for Windows, there's actually quite a few in my library that do this) games work out of the box with little performance impact. Anything that runs natively using fairly standard libraries should also work pretty well so I'm looking forward to test that now that I've confirmed controller compatibility on that end.

At least we know that Box86 sees the controller alright and it's only a Wine - Box86 issue so far.

Edit : Ok so I did a bit more digging ! According to this changelog : Wine 3.3
controller support is handled through SDL, and if the changelog is to be trusted (and still valid in 8.0...) winebus is responsible for this ! So it's very likely that winebus (not wineusb) failing is responsible for controllers not getting through.
Edit 2: Wine patchnote from september 2021
This would further indicate that all controller inputs and detection, be it xinput, dinput or HID, are all handled by winebus. This is not 100% but I think everything I found so far leads to winebus being a strong suspect for this particular issue.

from box86.

ptitSeb avatar ptitSeb commented on August 27, 2024

there might be a missing wrapped lib or wrapped function.
Try again uing BOX86_LOG=1 and BOX86_DLSYM_ERROR=1 and see if some lib or function is missing from the generated logs.

from box86.

DevilBlackDeath avatar DevilBlackDeath commented on August 27, 2024

Hey thanks for answering so fast. I ran both commands and that's the log I get.

xinput_log.txt

I haven't used those before so I'm not 100% sure what to look for but I saw nothing that seemed to mention missing symbols or libraries.

Edit : one error I see here and I think I've seen in passing is winebus and wineusb failing to start. Could that be related considering my controller is wired ? (well it's wireless and wired but I always use it in wired mod and I've double checked when connected it actually uses the USB protocol, it's not just for charging). A faw unhandled page faults I've seen but I've seen those on vanilla x86 wine as well and they usually don't prevent apps running !

from box86.

ptitSeb avatar ptitSeb commented on August 27, 2024

Well, the logs doesn't show any missing libs or wrapped function.
The wineusb not starting might explain, but U'm not sure how wine handle joystick, so I'll probably have to check and reproduce myself.

Just to be sure: your joystick is recognise by regular linux apps right? Also, it would be interesting to see if the joystick work with non-wine x86 games too.

from box86.

DevilBlackDeath avatar DevilBlackDeath commented on August 27, 2024

I'll have to get back on you about non-wine x86 games but yeah regular linux apps detect it. I use the Retropie script and lzdoom and emulators detect it fine. I have also run Neurovoider and Celeste using the mono/FNA trick and those detect the controller as well. Do you have any easy to access game in mind to test x86 natives ?

from box86.

ptitSeb avatar ptitSeb commented on August 27, 2024

Not really (but you can try this one: https://www.lexaloffle.com/neko.php I think joystick is supported). The point is more to be sure that current OS sees the Joystick fine (for example, on my current ARM64 test machine running Debian, the Kernel doesn't have any joystick driver, and I cannot use any of them).

from box86.

DevilBlackDeath avatar DevilBlackDeath commented on August 27, 2024

I was actually able to find a game myself on itch.io (didn't expect there to be so many linux native games with gamepad support, though it was a bit more troublesome to find one made for x86/i386. EGGNOGG (Classic) has controller support. Ran it on box86 on my Pi 4 and the controller works perfectly.

So it works with FNA/Mono games, native armhf apps like lzdoom and Retroarch/libretro and it even works on box86 natives apparently. Really comes down to a Wine compatibility issue it would seem. As I said I believe Wine is somewhat able to still detect a xinput controller even without kernel drivers, so I'd say chances are it does something weird with it (then again, FNA/Mono games seem to be able to use even when I don't have drivers installed or running, so they might do the same, except they do it natively).

I know that before Wine added proper xinput support there were a few attempt at adding xinput support through SDL2 and some of the sources are still available ! I'll try and see if those could still work with recent Wine versions, and if so, if that could solve the issue. Will report back on that.

from box86.

DevilBlackDeath avatar DevilBlackDeath commented on August 27, 2024

Ok, so it doesn't seem to properly compile anymore. However the exact project was koku-xinput-wine. Wouldn't it be possible for Box86, since it probably already wraps part of SDL, to use the same techniques to transfer xinput to Wine ?

I'll also try and see if using the controller wireless fixes the issue. Hopefully this would not be handled by wineusb or winebus ? And could further determine the issue.

Edit : I managed to connect my gamepad using bluetooth. xboxdrv for some reason does not see it (maybe because when in bluetooth it doesn't announce itself as an official XBox controller, only an xinput-compatible one). However it still functions in FNA and native games without issues. Wine unfortunately still doesn't see it. I still have an official XBox 360 receiver and gamepad lying around, so I'll test if it's a gamepad compatibility issue !

Edit 2 : Same issues and results with an official XBox360 controller, and using my 8bitdo controller in Direct Input and Switch modes doesn't let wine detect it as a non-xinput controller either. Something is blocking all controllers from being detected !

from box86.

ptitSeb avatar ptitSeb commented on August 27, 2024

I would prefer for the joystick to just work the way if works on x86

from box86.

DevilBlackDeath avatar DevilBlackDeath commented on August 27, 2024

Further research revealed that using box64+wine64 seems to recognize the input. Didn't test in-game yet, but 'wine control joy.cpl' properly lists the gamepad, and the XInput tab recognized all inputs from the gamepad.

This was tested with wine 64 8.4 devel. Whether it is thanks to the 8.4 update (as of yet unavailable for i386) or thanks to box64 itself I don't know (I'd wager it's probably box64 doing something box86 doesn't do yet or does differently). It's worth noting my standard x86/x64 tests were, contrary to what I said (honest mistake sorry), executed in a X64 environment. As a result it could be that wine x86 is simply incapable of detecting gamepads ? I don't have an x86 linux environment readily available so I can't test that unfortunately.

Edit: Also works with wine64 5.5 and 7.1 devel so it's definitely thanks to box64. However any wine64 version above 8 seems to break on my end (both using box64 latest and stable, though at different points). I'll create some logs and create an issue on box64 a bit later.

from box86.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.