Joystick mapping revamp?

https://github.com/MiSTer-devel/Main_MiSTer/wiki

Moderators: Mug UK, Zorro 2, spiny, Greenious, Sorgelig, Moderator Team

jayp76
Atari freak
Atari freak
Posts: 64
Joined: Wed Oct 17, 2018 10:09 am

Re: Joystick mapping revamp?

Post by jayp76 »

Different games, different playstyles. Some games or levels in games are best played with analogue stick. For e.g. fighting games like Street Fighter 2, some prefer Sticks and some prefer Dpad. Like i mentioned, you wouldnt have to remap it, just activate it. It makes sense with the new button mapping revamp system. Yeah, comparisons to other retro systems like retropie are cumbersone, but they have such user friendly features. I understand it is not needed for users which only use arcade sticks, but many MiSTer users use 8bitdo or PS4 or Xbox controllers. I know i can remap it with current mapping system, but it is cumbersome for all cores.
softtest1
Atari User
Atari User
Posts: 34
Joined: Tue Apr 30, 2019 6:37 pm

Re: Joystick mapping revamp?

Post by softtest1 »

You can just enable both the analog stick and the d-pad at the same time and ignore one when the other works better for a particular game. I don't see how the analog stick being there and enabled prevents you from using the d-pad or vice versa. Just don't touch the one you don't want to use in a particular game or level. You only need to map the controls once per core.
jayp76
Atari freak
Atari freak
Posts: 64
Joined: Wed Oct 17, 2018 10:09 am

Re: Joystick mapping revamp?

Post by jayp76 »

Yes, like i wrote before, i can do that, but i am seeking for some plus user friendlyness. The new revamp mapping system was a huge step forward. My suggestion could be a nice and welcomed addition. But i have the impression that you did not quite understand what my intention was. This was only a question to the devs if some feature like this is planned. I don't understand why you keep insisting things i already know and use. If no such feature is planned i am fine with that. I made no demands on this matter.
softtest1
Atari User
Atari User
Posts: 34
Joined: Tue Apr 30, 2019 6:37 pm

Re: Joystick mapping revamp?

Post by softtest1 »

I got the impression that what you wanted to do, was already easy to do, and more elegantly than what you were asking for, so I thought that my comment could help. I will drop it.
Sorgelig
Ultimate Atarian
Ultimate Atarian
Posts: 6348
Joined: Mon Dec 14, 2015 10:51 am
Location: Russia/Taiwan

Re: Joystick mapping revamp?

Post by Sorgelig »

jayp76 wrote:Yes, like i wrote before, i can do that, but i am seeking for some plus user friendlyness. The new revamp mapping system was a huge step forward. My suggestion could be a nice and welcomed addition. But i have the impression that you did not quite understand what my intention was. This was only a question to the devs if some feature like this is planned. I don't understand why you keep insisting things i already know and use. If no such feature is planned i am fine with that. I made no demands on this matter.
As already been said both analog stick and dpad are always working at the same time. So you don't have to switch it in menu. Just use any of them you like. When assigning button in the core you have 2 alternative sets to assign where you are free to assign 2 sets of directional buttons as you like.
There is no point to break through opened door ;)
jayp76
Atari freak
Atari freak
Posts: 64
Joined: Wed Oct 17, 2018 10:09 am

Re: Joystick mapping revamp?

Post by jayp76 »

@Sorgelig.
I don't have my MiSTer currently in reach, so i can't test.
But just to be sure what you wrote. If i start up a core and have no other controller porfiles, do both dpad and analog stick work out of the box at the same time? Without an alternative profile and manual config? In my recent memory this did not work, only the dpad. If it is the later, this is was what i wanted to avoid and asked if such a feature is available.
Sorgelig
Ultimate Atarian
Ultimate Atarian
Posts: 6348
Joined: Mon Dec 14, 2015 10:51 am
Location: Russia/Taiwan

Re: Joystick mapping revamp?

Post by Sorgelig »

jayp76 wrote:@Sorgelig.
I don't have my MiSTer currently in reach, so i can't test.
But just to be sure what you wrote. If i start up a core and have no other controller porfiles, do both dpad and analog stick work out of the box at the same time? Without an alternative profile and manual config? In my recent memory this did not work, only the dpad. If it is the later, this is was what i wanted to avoid and asked if such a feature is available.
yes, both controls work as directional buttons initially.
peepsalot
Atari User
Atari User
Posts: 38
Joined: Wed Jan 01, 2020 6:45 pm

Re: Joystick mapping revamp?

Post by peepsalot »

Hi, I recently went through the main joystick setup using 8bitDo M30 (wired over USB).

On M30 there are the 3 small center buttons: "star", "minus"(select), and "home".
I configured the center minus button to "select", and I wanted to use one of those others as OSD button, but the config menu wouldn't recognize either of them for me. I had to skip that button with keyboard input. Is there some extra setup I need to allow recognizing these two other buttons or is it not possible? Would really like to open menu without swapping to keyboard.
User avatar
Newsdee
Atari God
Atari God
Posts: 1561
Joined: Fri Sep 19, 2014 8:40 am

Re: Joystick mapping revamp?

Post by Newsdee »

peepsalot wrote: Is there some extra setup I need to allow recognizing these two other buttons or is it not possible? Would really like to open menu without swapping to keyboard.
That happened to me when using DInput mode. Try pairing with XInput mode instead.
peepsalot
Atari User
Atari User
Posts: 38
Joined: Wed Jan 01, 2020 6:45 pm

Re: Joystick mapping revamp?

Post by peepsalot »

Ah, thank you! I guess I didn't realize there were different "pairing" modes even for non-bluetooth usage.
I followed instruction from the manual this time for XInput: Hold X & start until LEDs 1&2 flash, then plug in USB cable.
This time I was able to configure the Home button to OSD, so its working better now.

BTW, it still didn't seem to recognize the "star" button after that, but just having home button working is enough for me anyways.
User avatar
Newsdee
Atari God
Atari God
Posts: 1561
Joined: Fri Sep 19, 2014 8:40 am

Re: Joystick mapping revamp?

Post by Newsdee »

I believe the Star button is for setting up autofire, and does not translate into a separate button on the HID USB protocol.
jayp76
Atari freak
Atari freak
Posts: 64
Joined: Wed Oct 17, 2018 10:09 am

Re: Joystick mapping revamp?

Post by jayp76 »

@Sorgelig
I tried on my setup and the Stick did not work. But luckily i found what caused the "issue". I must have mapped the left Stick funktionality with the right Stick when the controller mapping revamp was introduced. So since then i did not notice that both dpad and stick should work. I am glad this works now. Thanks for pointing out that both controller methods work.
Locutus73
Atari Super Hero
Atari Super Hero
Posts: 579
Joined: Wed Feb 07, 2018 6:13 pm

Re: Joystick mapping revamp?

Post by Locutus73 »

I really like the new joystick mapping revamp and I’d like to share some random ideas I had using it… maybe you discussed those already and they are not requests, I know code is there and I can implement what I want… I’m just sharing ideas:

1) I remember that, for a period of time, the mapping wizard popped up automatically when you start to use a new, not mapped joypad. I liked it. Maybe now it’s somehow redundant with the new mapping, but I think it could be useful at least for the main menu mapping. So when you first use a new unmapped pad on main menu the wizard should pop up, but not when you use it in a core (using the main menu to core default map).

2) Maybe it could be useful to map the menu button as the very first thing in the main menu joypad wizard, so that button could be used to skip the subsequent inputs without using the keyboard. This would be useful in conjunction with 1) so we could plug a new pad while in the main menu and complete a mapping wizard without touching the keyboard.

3) In the arcade cores I see we use two different buttons for Player 1 Start and Player 2 Start; they are actually two different buttons in an arcade hardware (just like any Player 1 and Player 2 input), but maybe it would be more user friendly (and using more efficiently joypad buttons) just to define a single Start button: then, when you use two joypads (the first used becomes Player 1, the second used Player 2) when you hit the Start button on Player 1 pad it is automatically mapped to Start 1, while when you hit the same Start button on Player 2 pad it is automatically mapped to Start 2 (just like all other Player 1 and 2 inputs).

Thank you in advance.
Regards.

Locutus73
Sorgelig
Ultimate Atarian
Ultimate Atarian
Posts: 6348
Joined: Mon Dec 14, 2015 10:51 am
Location: Russia/Taiwan

Re: Joystick mapping revamp?

Post by Sorgelig »

Locutus73 wrote:1) I remember that, for a period of time, the mapping wizard popped up automatically when you start to use a new, not mapped joypad. I liked it. Maybe now it’s somehow redundant with the new mapping, but I think it could be useful at least for the main menu mapping. So when you first use a new unmapped pad on main menu the wizard should pop up, but not when you use it in a core (using the main menu to core default map).
There are many weird input devices generating whatever screwed developer mind imagine. This caused such menu to popup thinking there is new unmapped gamepad is plugged while it's not. Also sudden upper of just menu not a good idea in general as usually you continue to press some buttons thinking it's defined already and find yourself in the middle of definitions when several buttons already defined while you pressed the buttons.
All in all, this feature gives more problems than solutions.
If you are not hardware tester with several new controllers every day, it's not a problem to load the Menu core and define the buttons for couple of controllers.
Locutus73 wrote:2) Maybe it could be useful to map the menu button as the very first thing in the main menu joypad wizard, so that button could be used to skip the subsequent inputs without using the keyboard.
May be. I'm thinking about it time after time.
Locutus73 wrote:3) In the arcade cores I see we use two different buttons for Player 1 Start and Player 2 Start; they are actually two different buttons in an arcade hardware (just like any Player 1 and Player 2 input), but maybe it would be more user friendly (and using more efficiently joypad buttons) just to define a single Start button: then, when you use two joypads (the first used becomes Player 1, the second used Player 2) when you hit the Start button on Player 1 pad it is automatically mapped to Start 1, while when you hit the same Start button on Player 2 pad it is automatically mapped to Start 2 (just like all other Player 1 and 2 inputs).
Almost all arcades are single play arcades with player swap. So you don't need 2 controllers to play. So MiSTer arcades designed that way where 2 ppl can play with single gamepad. Arcade cabinet is the last thing i would thing about.
Locutus73
Atari Super Hero
Atari Super Hero
Posts: 579
Joined: Wed Feb 07, 2018 6:13 pm

Re: Joystick mapping revamp?

Post by Locutus73 »

Sorgelig wrote:All in all, this feature gives more problems than solutions.
If you are not hardware tester with several new controllers every day, it's not a problem to load the Menu core and define the buttons for couple of controllers.
I understand and agree.
Sorgelig wrote:
Locutus73 wrote:2) Maybe it could be useful to map the menu button as the very first thing in the main menu joypad wizard, so that button could be used to skip the subsequent inputs without using the keyboard.
May be. I'm thinking about it time after time.
OK
Sorgelig wrote:Almost all arcades are single play arcades with player swap. So you don't need 2 controllers to play. So MiSTer arcades designed that way where 2 ppl can play with single gamepad. Arcade cabinet is the last thing i would thing about.
Ah, ok, the very old alternate 2 players games (I never understood its real functionality).
After all Neo Geo supports two players and already implements the single start button for each Player/Joypad.
With future multiplayer arcade (i.e. CPSx) we will see.

Thank you.
Regards.

Locutus73
Sorgelig
Ultimate Atarian
Ultimate Atarian
Posts: 6348
Joined: Mon Dec 14, 2015 10:51 am
Location: Russia/Taiwan

Re: Joystick mapping revamp?

Post by Sorgelig »

There are already multiplay arcades in MCR and other cores. They work with 2 joysticks.
Locutus73
Atari Super Hero
Atari Super Hero
Posts: 579
Joined: Wed Feb 07, 2018 6:13 pm

Re: Joystick mapping revamp?

Post by Locutus73 »

Sorgelig wrote:There are already multiplay arcades in MCR and other cores. They work with 2 joysticks.
Thanks, I will try them.

Regards.

Locutus73
drj3rk
Atari freak
Atari freak
Posts: 62
Joined: Tue May 14, 2019 10:12 pm

Re: Joystick mapping revamp?

Post by drj3rk »

I don't know that this is necessarily related, but is there a way to free up the configuration a little bit, so that mappings could be more arbitrarily assigned.

My big example, and I know I've said this before, (so it it's not possible, no big deal) would be the ability to assign controls from multiple devices for a single player. Such that one could use two arcade sticks (player one and player two) to play Robotron or other twin-stick games. Or use two analog axes on one game-pad. (which didn't seem to work on my 8bitdo SN30)

Like I said, not a huge priority, but I am a HUGE Robotron fan, but definitely like two sticks. :D

Edit: Oh, it looks like I didn't finish reading the thread. It appears that maybe this is implemented? I'll give it a whirl when I get home. It's been a while since I tried to do this last. Sorry for the thread clutter.
Sorgelig
Ultimate Atarian
Ultimate Atarian
Posts: 6348
Joined: Mon Dec 14, 2015 10:51 am
Location: Russia/Taiwan

Re: Joystick mapping revamp?

Post by Sorgelig »

drj3rk wrote:Or use two analog axes on one game-pad. (which didn't seem to work on my 8bitdo SN30)
For me it works fine with 2 analog sticks on SN30 Pro.
Many arcade controllers have diagonal of 6 buttons, and 4 of them can be assigned for directional fire. Even pure digital gamepad with dpad and 4 face buttons also perfectly fits Robotron 2084.
drj3rk
Atari freak
Atari freak
Posts: 62
Joined: Tue May 14, 2019 10:12 pm

Re: Joystick mapping revamp?

Post by drj3rk »

Sorgelig wrote:
drj3rk wrote:Or use two analog axes on one game-pad. (which didn't seem to work on my 8bitdo SN30)
For me it works fine with 2 analog sticks on SN30 Pro.
Many arcade controllers have diagonal of 6 buttons, and 4 of them can be assigned for directional fire. Even pure digital gamepad with dpad and 4 face buttons also perfectly fits Robotron 2084.
Thanks for the replies. I will definitely give it another try.
Locutus73
Atari Super Hero
Atari Super Hero
Posts: 579
Joined: Wed Feb 07, 2018 6:13 pm

Re: Joystick mapping revamp?

Post by Locutus73 »

Lately I noticed a weirdness in the mapping.
I use an 8BitDo SN30 Pro+ in dinput mode and I map it in the main menu using the Nintendo/SNES pad logic: so dpad, ABXY, L, R, start and select Nintendo style (which is both MiSTer and 8BitDo style); then I map the 8BitDo logo button to MiSTer menu, left analog stick to MiSTer analog stick, right analog stick to MiSTer mouse, L2 to left mouse button, R2 to right mouse button, R3 to middle mouse button and L3 to sniper button; then I map B to menu OK and A to menu back, western PlayStation style.
All fine...
I launch Dig Dug core and I can correctly use both dpad and left analog to move the character.
Then I launch the joypad mapping wizard for the core with no alternative mapping and, again, I can correctly use both dpad and left analog to move the character.
But if I launch again the mapping wizard and, when asked if I want alternative mapping I answer yes, then I skip left, right and everything except the fire button (I want to use two different buttons for the same function), then I can't use the left analog to move the character anymore: moving right works, but other directions don't.
I tried other arcade cores with the same result; Dig Dug is a good example since the character moves in all four directions.

Thank you in advance.
Regards.

Locutus73
Sorgelig
Ultimate Atarian
Ultimate Atarian
Posts: 6348
Joined: Mon Dec 14, 2015 10:51 am
Location: Russia/Taiwan

Re: Joystick mapping revamp?

Post by Sorgelig »

It's not weird, it's how it supposed to work.
If you press "skip" while defining buttons, you effectively leave this function unmapped.
Default mapping (if you never went to map it manually) is dpad as primary direction control and analog stick (defined as Analog X/Y in Menu core) as alternative direction control.
If you manually map core's buttons in dialog, then you have to map both main and alternative directions if you want to use both dpad and stick for movements.
Locutus73
Atari Super Hero
Atari Super Hero
Posts: 579
Joined: Wed Feb 07, 2018 6:13 pm

Re: Joystick mapping revamp?

Post by Locutus73 »

Sorgelig wrote:It's not weird, it's how it supposed to work.
If you press "skip" while defining buttons, you effectively leave this function unmapped.
Default mapping (if you never went to map it manually) is dpad as primary direction control and analog stick (defined as Analog X/Y in Menu core) as alternative direction control.
If you manually map core's buttons in dialog, then you have to map both main and alternative directions if you want to use both dpad and stick for movements.
Got it, I understand it now.
So in the alternate mapping I have to use the analog stick for the left, right, up and down, which are automatically assigned to analog as alternative if I skip the alternative mapping at all... it makes sense.
But I still see a problem here: in my previous test, when defining the alternative mapping, I skipped all 4 directions, but right direction still worked on analog: basically skipping all 4 directions, some get unmapped (as expected after your explanation), while some remain mapped to the left analog stick. This is weird.

Thank you in advance.
Regards.

Locutus73
Sorgelig
Ultimate Atarian
Ultimate Atarian
Posts: 6348
Joined: Mon Dec 14, 2015 10:51 am
Location: Russia/Taiwan

Re: Joystick mapping revamp?

Post by Sorgelig »

if you skip it, then it left undefined if i remember right. So you won't get alternative control at all.
Locutus73
Atari Super Hero
Atari Super Hero
Posts: 579
Joined: Wed Feb 07, 2018 6:13 pm

Re: Joystick mapping revamp?

Post by Locutus73 »

Sorgelig wrote:if you skip it, then it left undefined if i remember right. So you won't get alternative control at all.
OK, I agree with you, this makes perfect sense, it is 100% coherent with your explanation and it is the result I expect.
But I tried right now MiSTer_20200302, menu_20200115.rbf and DigDug_20200106.rbf. I defined all primary controls, then I defined alternative controls skipping left, right, up and down: left, up and down became undefined, while right was still mapped on tilting right the left analog stick. I tried again assigning left, right, up and down to the left analog stick and all was fine. Then, I tried again and skipped left, right, up and down and, again, left, up and down became undefined, while right was still mapped on tilting right the left analog stick.
This seems to me an inconsistency I wanted to report to you.

Regards.

Locutus73
Locked

Return to “MiSTer”