Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

core option to emulate 4-way joystick #381

Merged
merged 5 commits into from Oct 1, 2018
Merged

core option to emulate 4-way joystick #381

merged 5 commits into from Oct 1, 2018

Conversation

ghost
Copy link

@ghost ghost commented Sep 29, 2018

@robertvb83 test this and see how it runs for you. Two things to keep in mind when testing. A restriction plate never allows you to press two switches so if you select diagonal nothing will happen this isint a mistake it more a mimic a restrictor plates behavior. The direction will only push when that direction is selected.

ie moving from left to up there will be a dead zone like a restriction until up is the direction selected on its own

@ghost

This comment was marked as spam.

@ghost

This comment was marked as spam.

@markwkidd markwkidd changed the title test this code on 8 way joysticks core option to emulate 4-way joystick Oct 1, 2018
@markwkidd
Copy link
Collaborator

Seems like now that this is controllable with a core option it'd be OK for me to merge, are you ready grant?

@ghost

This comment was marked as spam.

@ghost

This comment was marked as spam.

@markwkidd
Copy link
Collaborator

I'm hoping this can be turned on by default, I think it's pretty dang cool. Let me ask two things.

If I understand right, the new code can only be executed when the game itself uses 4-way controls, right? I see mJoy4Way in intport.c and I'm pretty certain I'm looking at input code that is only used with 4-way romsets although I haven't been testing so I want to confirm :) That is my first question.

The second question is: does this mode cause adverse effects for d-pad controllers or any other type of controls? I remember you mentioning a concern about problems with a d-pad in your conversation with Robert, but again I may not have retained the details or you may have moved on from that concern.

@ghost

This comment was marked as spam.

@ghost

This comment was marked as spam.

@markwkidd
Copy link
Collaborator

What if you change it to be defaulting to "disabled" but we ask for some testers to try it with d-pads? If it goes well with d-pads then it can be default to "enabled."

It would be great if this could default to enabled. Lots of people play games like Pac Man, Donky Kong, etc... it would be awesome if they had the improved experience without having to figure out there is a core option.

@markwkidd markwkidd merged commit e3434d0 into libretro:master Oct 1, 2018
@ghost

This comment was marked as spam.

@markwkidd
Copy link
Collaborator

Yeah I noticed that after I hit send, I was looking at a cached copy of this discussion that wasn't auto-updating. Woot! 👍 👍

@Wilstorm
Copy link
Contributor

Wilstorm commented Oct 1, 2018

Just a quick question I always use the option "d-pad to left analog stick" and just use the analog stick to play. I rarely use the actual d-pad but will do some testing. Will this still take advantage of the 4-way enhancement and work ok?

@ghost

This comment was marked as spam.

@ghost

This comment was marked as spam.

@Wilstorm
Copy link
Contributor

Wilstorm commented Oct 1, 2018

@grant2258 - Nice! I think it's an RA option but I am not entirely sure. In the RetroPie setup there's an option that allows you to move the d-pad to either the left or right analog stick so most of the 4-way gaming I do (well all gaming) is on the analog stick and I always get hung up on corners for say Donkey Kong or Burger Time or forever hitting a dead spot in Pac-man. 8-way games are ok I think but I might be missing something to make them better or more authentic. I will do some testing today once I download from source.

Oh and I do actually use XBOX 360 controllers. I can't tell the difference between a crappy d-pad and a good one due to using a 360 for so long but it works ok for me, well at least I thought it was. ;)

@ghost

This comment was marked as spam.

@Wilstorm
Copy link
Contributor

Wilstorm commented Oct 1, 2018

@grant2258 - Thanks for the link, well I guess I could take a Dremel to it. :) I was messing around with the controls on a keyboard to understand them more clearly. In Donkey Kong if I press and hold right to run everything is fine. If I press any other key (left, up or down) he stops until I release one of the keys. Seems to work good.

One thing I was curious about is occasionally I can press right/up and he'll still run right but I have to hit them both just right, possibly at the same exact time? It takes me a few tries usually. Is that a dead spot potentially? I am still messing around testing it though.

@robertvb83
Copy link
Contributor

robertvb83 commented Oct 1, 2018

ok i testet this :-) thanks grant for making this possible!
now have i understood correctly that the nice new feature is enabled by default (option alternative disabled). So when this option is disabled i get the new feature? this is how it seems to me right now!

ok with the option alternative 4way emulation = disabled

Pacman/Puckman/MsPacman: this works great changing into diagonal does the direction switch right away. it feels waaaay more playable then all the deadends i find myself in before!

donkey Kong: awesome, this guy can now climb a ladder from right or left into diagonal right/up or left/up. Super cool!

dynablaster/bomberman: nope this does not work right, it works on some direction changes e.g. from right into diagonals but not in general, there are still lots of blackouts. is this game somehow not recognized as 4way? how is this recognized in general anyway?

any suggested games you want me to test additionally?

@ghost

This comment was marked as spam.

@robertvb83 robertvb83 mentioned this pull request Oct 1, 2018
@robertvb83
Copy link
Contributor

but the whole problem with 8way joysticks is that it is very hard to NOT go into a diagonal accidentially, therefore i guess mame standard is that it will make the direction change directly when movin into a diagonal from a straight direction...
try playing bomberman with an 8way... it is a pain in the ass if the fucker does not move all the time because you hit a diagonal.

a 4way joystick does not have this issue because its not possible to hit the diagonal, so you cannot accidentially hit it

@ghost

This comment was marked as spam.

@ghost

This comment was marked as spam.

@robertvb83
Copy link
Contributor

robertvb83 commented Oct 1, 2018

bombrman and dynablst

But also bbmanw why is this an 8way game? Does not make sense

@ghost

This comment was marked as spam.

@Wilstorm
Copy link
Contributor

Wilstorm commented Oct 1, 2018

@grant2258 - When I was messing around with the keyboard holding right and then pressing left Mario stopped moving. This was with it disabled.

In regular lr-mame2003 if I am holding right and press left he keeps moving right.

Is the toggle option not working possibly and it's on all the time?

@Wilstorm
Copy link
Contributor

Wilstorm commented Oct 1, 2018

It seems the same behavior enabled or disabled. There seems to be a fraction of a second where pac-man pauses on corners, like milliseconds and it seemed to happen both enabled or disabled. I was only using the keyboard for testing because they seem identical to me but I was testing with an analog stick on a controller. I haven't tried a joystick yet.

Using the d-pad well that just plain sucks to be honest regardless of the settings. I guess I am just not a fan of the d-pad.

@ghost

This comment was marked as spam.

@Wilstorm
Copy link
Contributor

Wilstorm commented Oct 1, 2018

I see what you're saying but just to clarify what you're saying is these input changes completely ignore keyboard input, nothing has changed with keyboard at all? lr-mame2003 vs Plus are handing input completely different on keyboard now. I figured when disabled they would be the same but they are not.

Regardless of keyboard I see no difference between enabled and disabled using a controller. It does seem to play very well but I was wondering is it enabled all the time? I am just not feeling the difference when I get into a flow.

I get that pause playing Pac-man enabled or disabled. I am not saying it's bad and it's perfectly playable but the pattern I was looking for was different behavior between enabled and disabled.

I think your example was more illustrative of how it should work? I have never made a conscious thought to pause centered before switching in these old games, that's just certain death at higher levels, playing the elevators at higher levels in Donkey Kong would be impossible. :)

@ghost

This comment was marked as spam.

@Wilstorm
Copy link
Contributor

Wilstorm commented Oct 1, 2018

Yes I know it's for controllers/joysticks and that's what I am testing it on, an XBOX 360 wireless controller. What I am not quite seeing is a difference in the 4-way mapping. Is it on both ways (enabled/disabled) or off both ways? It seems the difference should be more noticeable but maybe not.

All the test information I shared has been from a controller. It was only a side observation that the keyboard acts differently between cores now also.

I am assuming I have the correct current code as I have the enable/disable option in RA you added yesterday?

I guess the part that's confusing me is I use an 8-way Sanwa in my arcade but it's hooked to an IPAC2 which is just mimicking the keyboard input. I also have another 8-way Sanwa that's completely configured through the GPIO pins but it also mimics keyboard input.

So what is everyone using for input controllers for testing arcade joysticks that is working differently then using a keyboard for testing. I always assumed these input controllers were mimicking keyboard arrow keys and buttons but albeit they have a better buffer and can handle way more simultaneous key presses then a real keyboard. I guess I will not benefit from these changes on my arcade setup because of my input setup?

@ghost

This comment was marked as spam.

@Wilstorm
Copy link
Contributor

Wilstorm commented Oct 2, 2018

When I setup my IPAC's I use a keyboard and press the keyboard arrow keys to configure directionals then wire the directionals. What's the difference between the encoder sending the movement key vs the keyboard? Aren't they the same SDL key mappings?

@ghost

This comment was marked as spam.

@markwkidd
Copy link
Collaborator

markwkidd commented Oct 2, 2018 via email

@robertvb83
Copy link
Contributor

maybe i have a weird understanding or we just disagree here... i meant to improve the ingame experience using a 8way joystick for 4way games.
you keep saying that ignoring diagonals mimics a 4way better but with a real 4way restrictor the plate will just guide you in the correct direction, so you will not face the problem "i moved the joystick but nothing happes, because i did not move it far enough.... uh killed" which is exactly the problem for octagonal 8way restrictors. the octagonal restrictor will guide you into a diagonal when you intent to go into one direction. this is why i prefer to change direction immediately on changing into a diagonal.

But this behavior seems to be the mame standard anyway, so for me thats fine. I just thought it would be diffferently because i tested with bomberman and it seems not working right and this again i think is because it is declared as a joy8way which is totally weird... Bomberman is clearly up-down-left-right

@ghost ghost deleted the 4way branch October 14, 2018 08:01
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

3 participants