[Driver] mk_arcade_joystick_rpi GPIO Driver
#11
Did you tryed the combine=off tricks in /boot/config.txt?

Even with a 1ms timeout, I am not 100% the input can work fine :S
Reply
#12
We are using HipCat's B/W build w/ Joy-Con sticks that he sent us to inspect and test with, so I'm unsure either. Worst comes to worst, we may have people use your program to get some initial bindings, and then use this script to verify/check the values.
Reply
#13
I totally understand Wink

I have think at some point at the beginning of the program to allow user to remake only the Analog or GPIO part and then update the existing config but I am not good at all when it come to parse text in C/C++

Edit : When speaking with Hipcat, he told me that there was some troubles with start/select (not 100% sure).
Reply
#14
Well, I wrote a bash script to grab some analog values from evtest and it fixed all the analog issues right up. I can post it if you'd like to see it, but the trick was to take the min/max and "reduce" the window by changing them by 10% (multiply by 1.1 for the min, 0.9 for the max). I think you were using the raw values, which made it so you had to basically slam the stick to reproduce the min/maxes you got when setting up the stick.
Reply
#15
It would be great if you can share (ask Ed for my email) Wink

Yes, I use raw. but this souldn't matter since the driver does the same thing.

You need to beware when reducing the window, some emulator like Reicast have a overflow glitch. To try to avoid this, the "fix" I did put in the driver is also to limit the value but this only apply when auto center is enable (mk_arcade_joystick_rpi.c:357).
This emulator also have some games that require you to push analogs to theirs limits (e.g. Star Wars Racer).
Reply
#16
Something I didn't consider until now could be to use ADC_OffsetCenter function when Auto center is enable or not.

Basically input_set_abs_params() compute center by max-min.
The only down side is the dead zone, since ADC_OffsetCenter extrapolate the ADC values, the flat parameter may need to be re-think.

Just add a argument to avoid the centering stuff when not need, this could do the trick but directly into the driver.
I will make some test for this and make a pull request to your Git once done (not sure this will be done today).
Reply
#17
Updated testing driver : https://github.com/porcinus/mk_arcade_jo...tick_rpi.c
Reply
#18
Sorry for late reply, was mostly user error. I was pushing the sticks too far into the edges of their range, so it was nearly impossible to hit them without trying super hard.

I would recommend doing the following before we merge this to the master branch: integrate your readme file into the main one; add a few lines to the config program to make it obvious people should not be pressing the sticks super hard into their edges, just lightly, and only once or twice to avoid making the high/low values too far; add your readme commands to compile to the makefile under a new recipe, probably just joystick_config or something like that.

Other than that, great job. Thanks for doing this for the community and saving us some time.  Heart
Reply
#19
Thanks Wink , the idea came from Hipcat at the first place
No need to apologize, I know you guys are pretty busy Smile

For the program update, do I need to make a pull request on Flavor repository or on yours?

Aside of this, I also updated the driver to change the way it handle the analogs value to "limit" possible problems, tested on my side without problems but it could be great to test in on your side before the pull (with auto center disabled) : https://github.com/porcinus/mk_arcade_jo...tick_rpi.c

Edit: I don't know if I did it the right way :S , re-synced my master branch from yours via a pull request.
To this point :
- mk_joystick_config.cpp: Changed the text for limits : "Slightly move analogs to their edges then press (A)".
- install.sh : added libpthread-stubs0-dev to apt line, problem compile plus check at the end.
- README.md : Readme merged plus version update.
- mk_arcade_joystick_rpi.c : this one need to be tested, I did keep the 2019-05-08 backup.
Reply
#20
Porcinus, I will be traveling all next week. It's also a US holiday on Monday. Please continue to work with Mootikins on this, and maybe I can merge his/yours when I return.

THANKS!
Card Fighters' Clash 2 English Translation ( http://cfc2english.blogspot.com/ )
Neo Geo Pocket Flash Cart and Linker Project ( http://www.flashmasta.com/ )
Avatar art thanks to Trev-Mun ( http://trevmun.deviantart.com/ )
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)