libretro / mame2003-plus-libretro

Updated 2018 version of MAME (0.78) for libretro. with added game support plus many fixes and improvements
Other
191 stars 109 forks source link

4-way-restriction #380

Closed robertvb83 closed 6 years ago

robertvb83 commented 6 years ago

There is a software based attempt to change the behaviour of 8way joysticks @ 4-way games in xboxdrv https://github.com/RetroPie/RetroPie-Setup/wiki/Universal-Controller-Calibration-&-Mapping-Using-xboxdrv

Could something like this be included in mame2003-plus for all the 4-way games as an option?

There has been attempts in mame as discussed in retropie forum https://retropie.org.uk/forum/topic/11931/using-xboxdrv-for-4-way-restrictor-on-complete-rertropie-setup-already-using-dragonrise-usb-controller-setup/20

See especially last few posts

Wilstorm commented 6 years ago

Sorry guys I meant to type Jack Rabbit, not Jazz Rabbit!

ghost commented 6 years ago

well jack rabbit is nothing to do with the 4way at all if its using an 8 way joystick thanks for the listneed more than one game to test on is enough to get me started on my days off.

Wilstorm commented 6 years ago

Yeah, Jack Rabbit is tricky. I think the up/down/left/right are for entering initials for high scores and not during the game which is diagonal only.

I noticed you've commented doing it on your days off, more than once, but I am not sure what it means. Honestly the core has exceeded my expectations and it's incredible. For what's worth I wouldn't expect or demand any work of you, on any feature. When I do things with my time that don't make sense I hate them, in time. I guess I'm saying I would prioritize something low if I felt resent or I was neglecting family or work time or a preferred hobby or something else I consider important.

Any issue ticket is only meant to share findings. If it gets fixed in a day, week, month, year or never I'll be ok either way. Anyway I've never wanted you to feel anything is a demand or required. Thank you for all the work you've put into this core and my gaming experiences have been so much richer for it this past 9 months or so. This may be a good spot to take a breather or something, something.

ghost commented 6 years ago

Well it shouldnt take log to do I usually test my code updates before uploading them so i iron out anything obliviously wrong. I have a 20 minute run when im working if its going to take longer than that wait till i have free time. I think this is something that will benefit playability out of the box and is worth doing.

ghost commented 6 years ago

Ok have put a pull request in for the 4 way 45 degrees rotated.

Initial notes When you use lstick as digital its very hard to hit a diagonal properly. If using a controller use a dpad.

The xbox360 dpad isint the greatest but seems the games are playable. I find the xbox one dpad works great with this.

I see no problems with this on a sanwa with a square restrictor I havent tested yet but cant see any issue as your diaginals will lock properly.

Its an option in the menu for now. We will need to see if its a good solution before auto setting on romname. The code can be added auto selected on rom names if it all works out. Let me know how you guys get on when you get the chance.

as per usual wait for the pull req to be done or grab the pull req and compile yourself

Wilstorm commented 6 years ago

@grant2258 - I tested this and it is working good. The d-pad works as good as you suggested but also once you find your groove on the analog stick it's not to bad. At first I was on regular 4-way and I thought this is a rough go but once set properly to 45 it works like a champ!

ghost commented 6 years ago

so your happy enough with the way this is working. Ill wait a few days if everyone is happy at that point to auto select it on romnames we will go with it. (When I say auto select i mean new 4 way will pick the 45 degree automatically on romname) the original option should remain functional as intended incase someone feels the need to use it. IT works nice on the keyboard as well tbh.

Wilstorm commented 6 years ago

Yeah it's pretty incredible to be honest. On the forums they have an alternative method that involves the Xboxdrv. You load the driver, then get all the values for every button and trigger on your controller. Then assign assign each controller value to a Retroarch input. Then make a list of all 4-way games you're running and finally create an on-start script with every 4-way game and if the conditions true on game start load the driver with the correct settings. Lastly you need an on-exit script to kill the driver process on game exit. It takes several hours the first time through to set everything up. It's incredible you did basically the same thing with a toggle option. That has to make you like a Duke, Earl, Viscount, Baron or something! ;)

ghost commented 6 years ago

Ok has been a few day feedback was ok should be fine leaving it as is. If there high demand to add rotated joysticks automatically when loading the rom that can be done until then will leave as is. Feel free to close this

robertvb83 commented 6 years ago

This turned out very cool thanks alot!