Please help me understand what is happening with my button mapping, so confused.
-
Forgive me, I'm new to this, spent the last week searching for answers and coming up even more confused than ever.
So the quick explanation to the problem is that with mame, I seem to have my buttons mapped properly (configured 1st through the retropad), and they appear to be setup in the global config. file, and also verified in the rom config files for a couple games, however, a couple buttons are wrong during gameplay, even though they appear to be mapped properly.newest pre-compiled retropie/attract mode
ipac2 encoder, with the default key configuration.
raspberry pi 3
lr-mame2003button layout is as follows....
Player 1
button1(L-Ctrl), button2(L-Alt), button3(Space)
button4(L-Shift), button5(Z), button6(X)
[IMG]http://i701.photobucket.com/albums/ww13/SlowSL/arcade/20161204_222930.jpg[/IMG][/URL]
[IMG]http://i701.photobucket.com/albums/ww13/SlowSL/arcade/20161204_221357.jpg[/IMG][/URL]As you can see in the below images, these are the mame system mapped keys, all 6 fire buttons match up. (these three images are all of the same settings screen, I had to move the cursor down so that all of the text could be viewed.)
[IMG]http://i701.photobucket.com/albums/ww13/SlowSL/arcade/20161204_221603.jpg[/IMG][/URL]
[IMG]http://i701.photobucket.com/albums/ww13/SlowSL/arcade/20161204_221555.jpg[/IMG][/URL]
[IMG]http://i701.photobucket.com/albums/ww13/SlowSL/arcade/20161204_221606.jpg[/IMG][/URL]Using the 1943 rom as an example, here are the mapped buttons....
button1(L-Ctrl), button2(L-Alt)I would assume button1 would be fire weapons, and button2 would be the special lightning attack,
but in reality, the game buttons are as follows....
button1 = evasive maneuver, button2= lightning attack, button3=not used
button4=fire weapon, button5=not used, button6=not usedAs you can see in these images of the rom specific key mapping, it only provides button1 and button2, so where does button4 come into play and why is it not shown in the key config settings? The original arcade only had two buttons, one for firing weapon, and one for the special attack, but now there is an extra one for an evasive maneuver where the plane rolls up then back down to avoid damage. This is the simpler example as it only deals with 3 buttons.
[IMG]http://i701.photobucket.com/albums/ww13/SlowSL/arcade/20161204_221711.jpg[/IMG][/URL]
[IMG]http://i701.photobucket.com/albums/ww13/SlowSL/arcade/20161204_221706.jpg[/IMG][/URL]2nd example, street fighter 2. I used this rom because it's fairly easy to see the differences in all 6 attack buttons, so that I could ensure they were mapped correctly.
Again, pressing the tab key, going into the rom specific key mapping, they all match up to my ipac keys. I should assume then that it SHOULD be as follows....player1 button1=weak punch, player1 button2=medium punch, player1 button3=hard punch
player1 button4=weak kick, player1 button5=medium kick, player1 button6=hard kickbut when playing the game, here is what I'm getting....
player1 button1=weak punch, player1 button2=medium punch, player1 button3=hard punch
player1 button4=weak punch, player1 button5=medium kick, player1 button6=hard kickbutton4 is weak punch, when it should be weak kick. Why is this? I'm so confused, I can't see straight anymore.
Also should note, on the 2nd player, button6, which should be a heavy kick for 2nd player, instead, it pauses the game. The key assigned to that button is (K), verified in the rom key map settings. It would be great if someone could explain why this is happening.
-Mike -
Please do not post a support request without first reading and following the advice in https://retropie.org.uk/forum/topic/3/read-this-first (You have also been asked this before when posting)
Please also use the preview pane when posting - your markdown/links are broken - http://commonmark.org/help/
-
@SlowSL Also, you don't say which MAME you are using. I have an iPac2. If you are using lr-mame2003 then your retro arch config will determine the function of your switches. But mame is the easiest to configure with an iPac as its default is for this emulator. No configs to alter as it works out of the box. If not then you have wired the switches incorrectly to the labelled connections on the iPac. This is not really a problem though because you can press tab and alter the controls to match your control layout with ease. I do not understand what problem you are having. You mention that button one is not fire. You need to look what is wired to the fire button for that game.
-
@rbaker said in Please help me understand what is happening with my button mapping, so confused.:
@SlowSL Also, you don't say which MAME you are using. I have an iPac2. If you are using lr-mame2003 then your retro arch config will determine the function of your switches. But mame is the easiest to configure with an iPac as its default is for this emulator. No configs to alter as it works out of the box. If not then you have wired the switches incorrectly to the labelled connections on the iPac. This is not really a problem though because you can press tab and alter the controls to match your control layout with ease. I do not understand what problem you are having. You mention that button one is not fire. You need to look what is wired to the fire button for that game.
Sorry, edited to show mame2003 & retropie 3. Photobucket was down, links should be working now. That's what I don't get. The switches are wired correctly, I've triple checked them. I've used a keyboard checker to verify the keystroke on each button. The retropad is setup exactly how it should be, and working fine for all emulated consoles. Each corresponding keystroke is matched up with mame defaults which was set by the retropad setup in the UI....
Button 1 - Left Control
Button 2 - Left Alt
Button 3 - Spacebar
Button 4 - Left Shift
Button 5 - Z
Button 6 - XBut again, I can't wrap my head around example 1 (1943), there are only options for button1 & button2, which are set for left control, and left alt, yet when playing the game, button 4 (left shift) fires. This button 4 is nowhere in the key map tab for the ROM, it shouldn't do anything, but yet it does. It makes no sense to me. I will quadruple check my connections and mapping, but I'm 99.9% sure they are correct.
-
Maybe I can post a video later to show what is going on, I'm terrible at explaining things.
-
@SlowSL said in Please help me understand what is happening with my button mapping, so confused.:
The retropad is setup exactly how it should be
No idea what that is. What is it?
-
@SlowSL also read this thread.....
https://retropie.org.uk/forum/topic/1722/if-you-have-purchased-an-ipac2-and-want-to-save-time -
@rbaker
Looks promising, I will read through all of it later and give it a try. I will say though, when going through the input setup, it DOES recognize my ipac as a keyboard (at least it says keyboard when holding down a button to initiate the setup). Maybe it was fixed from an earlier version of emulation station? After the initial setup, only player 1 was working, I had to get into the config and copy player one, then paste, then change player 1 to player 2, then manually put in all the keyboard maps to get the 2nd player working on my setup. I made sure to match the ipac/mame defaults. Again though, once I get home, I will read through your linked thread and see if anything might stand out. -
@rbaker said in Please help me understand what is happening with my button mapping, so confused.:
@SlowSL said in Please help me understand what is happening with my button mapping, so confused.:
The retropad is setup exactly how it should be
No idea what that is. What is it?
The input setup in EmulationStation, it's called the retropad
configure input - emulationstation
libretro - retropad explained -
@SlowSL The ipac2 does not work with configure input unless you reflash the firmware. See the discussion in my thread as linked.
-
@SlowSL You will be able to do all the things you describe but it will not work because you followed autoconfigure first. Don't ask me why. Now I was on 3.8 when I got in touch with Ultimarc so I don't know about future versions. The 2015 model of the ipac is configured as a joypad even though it presents as a keyboard. Firmware is available that removes this. Further details in the thread.
-
@rbaker
Okay, will try instructions in your post... very strange. -
Okay, didn't work, still the exact same, but I did see something strange that I've overlooked, that is likely the problem. It seems that the retropad keys are somehow getting miss-matched. So, unless I'm mistaken, emulation station requires that an input device be setup initially correct? This input device, (keyboard in my case), determines the retropad keys mapped.
Because of how my arcade buttons are laid out, 6 buttons...
1 2 3
4 5 6This is how I set the retropad (using the keyboard, not the ipac2. It matches MAMES default keys perfectly...
1(L-Ctrl, retropad Y) 2(L-Alt, retropad X) 3(space, retropad Left Shoulder)
4(L-Shift, retropad B) 5(Z, retropad A) 6(X, retropad Right Shoulder)This works perfectly for the emulated consoles, but MAME is the only problem. Now, if I open the global MAME input settings, I was ignoring the retropad inputs at first, only looking at the keyboard keys, but I just noticed that the retropad letters do not match up with the keyboard key that I had assigned them to when initially setting up the input.
In the mame global input dialog box, I get the following....P1 Button 1 LCTRL or RetroPad1 B or RetroMouse1 Left Click
P1 Button 2 LALT or RetroPad1 Y
P1 Button 3 SPACE or RetroPad1 X or RetroMouse1 Right Click
P1 Button 4 LSHIFT or RetroPad1 A
P1 Button 5 z or RetroPad1 L
P1 Button 6 x or RetroPad1 RThe retropad letters have all been mixed around, does this make any sense? I'm going crazy with this. So, I figured I'd just edit the global inputs right in the UI, but don't know how to just remove the reference to the retropad buttons, but leave the keyboard buttons. For example, If I clear out P1 Button 1, then just type the left control button, it automatically includes "or Retropad1 B"..... Any ideas?
-
@SlowSL said in Please help me understand what is happening with my button mapping, so confused.:
how to just remove the reference to the retropad buttons
Still no idea what your problem really is as you can configure controls in mame by just pressing TAB. You then navigate down and up, select a key with ENTER and press one of your switches. That's what I did and I have never had an issue.
-
@SlowSL You haven't mentioned your retroarch.cfg in configs/all. Have you gone in there? It's one thing do the mapping in Emulation Station and to see the buttons behave properly, as you say, for consoles (which, depending on the exact emulator you are using, may or may not be affected by retroarch config). But, since you are using lr-mame2003, you are definitely affected by the mapping that is specified in the retroarch.cfg.
I use an IPAC4. There are essentially three (4?) layers that come into play for lr-mame 2003:
- The actual hardware configuration (what keypresses are triggered by your wired buttons). Use WinIPAC utility to set this (or accept defaults), but recognize what keys get sent by the controller (seems like you have that part squared).
- The Emulation Station mapping to retropad virtual controller (the mapping you setup on first-run)
- The mapping that gets specified in retroarch.cfg file. (should match #2 above, but verify, as this gets used by any/all libretro emulator cores).
- Mapping inside the MAME GUI. (since you are using lr-mame2003, you can press TAB and access the GUI and remap stuff again! It seems like overkill, but this is very handy when yo don't want to change the defaults, but want to do rom-specific changes).
I am curious what you find if you go digging into #3 above, the retroarch.cfg. This is where you might have a keyboard key pointed to a virtual function that is triggering the unwanted game actions you are seeing. It's also where hotkeys are setup and (and Retroarch pause function)--stuff that might interfere with MAME functions, or your IPAC's built-in shift functionality. But we can get into some of that extra stuff after you get your game working correctly.
Also, you might ahve noticed in #4 MAME GUI that both the virtual retropad input AND the raw keystroke input are detected when you manually change things in here. I haven't found this to be an issue unless I am setting up complex boolean configurations (like needing a workaround for configuring a single joystick tank-stick for games like Vindicators). But knowing about the virtual input and the raw keys helps explain what you are seeing when mapping in the MAME GUI.
-
@SlowSL Take a look at mine, comapre it with yours as @caver01 suggests....
input_player1_a = "alt" input_player1_b = "ctrl" input_player1_y = "space" input_player1_x = "x" input_player1_start = "num1" input_player1_select = "num5" input_player1_l = null input_player1_r = null input_player1_left = "left" input_player1_right = "right" input_player1_up = "up" input_player1_down = "down" input_player2_a = "s" input_player2_b = "a" input_player2_y = "q" input_player2_x = "k" input_player2_start = "num2" input_player2_select = "num6" input_player2_l = null input_player2_r = null input_player2_left = "d" input_player2_right = "g" input_player2_up = "r" input_player2_down = "f"
-
Yes, and if you make edits, beware of the infamous "smart quotes" trap. These are not the curly kind in here. ONLY use the true, double-quote key and watch out for auto-correct!
-
@caver01
Yes, thank you, it is starting to make sense now, seems to be a conflict between the retropad and keyboard inputs in mame only. I will check the retroarch.cfg and see what's in there, as well as see why my retropad mapping has gotten scrambled from how I originally set it. It must be a dumb mistake on my part, I don't see this problem anywhere else on the forums. Thanks rbaker, I will compare mine with yours. -
Success!!! Thank you so much guys. I knew there was the global retroarch.cfg, and a separate .cfg for each emulator, as well as for each ROM, and I understood how they all work and relate to each other, and which took priority. What I didn't expect though was that Retroarch/libretro would not at the very least keep the keyboard keys linked to the retropad assigned letter, the way they were setup in the GUI input setup. For example, I assigned my button 1 to L-Ctrl, to match MAMEs default, L-Ctrl for player 1, button 1. In the GUI input setup for the retropad, I wanted my button layout to match the SNES controller obviously, so I assigned the button 1 to retropad Y. This all worked great for the emulated consoles, but in MAME, using my button 1 for the example, does not show "L-Ctrl or retropad1 Y" like I would assume it should, but rather "L-Ctro or retropad1 B" Wait a minute.... I assigned retropad Y to L-Ctrl, why is it now B???? I can only assume there is a default retropad layout for MAME, even though I went through the retropad setup, MAME doesn't care, everything is left as the default, so when my retropad letters are different from the default, there is a conflict between the retropad button and the keyboard button. The retropad button takes priority I've found. That is why when using the in game GUI to check on the key assignments, I was first ignoring the retropad, I saw that my keyboard keys all were there and matched the way they should, but didn't notice the retropad letters were wrong, so there is where the problem was. I WAS able to click enter on player1 button 1, then click my button, and it then shows correctly as "L-Ctrl or retropad1 Y". So, lesson learned. Also, when assigning a key to a mame button in the GUI, is there an easy way to clear out the entry, making it "n/a"? I know how to "null" in the .cfg files, but I'd like to do it in the GUI as well. Right now, it just keeps adding more and more and more buttons, about 6 or so, before it clears the keys and starts fresh. Fore example, if player1 button 1 was assigned "L-Ctrl or retropad1 Y", if I press enter, then click M, it would then show "L-Ctrl or retropad1 Y or M". And keep adding and adding until it finally resets and leaves it as just one "M". I've read conflicting solutions depending on the mame version. One says just press delete before pressing enter, this will clear it out (this does nothing for me). Another says to hit enter, then hit escape, but this just exits the GUI. Any clues? It's lr-mame2003.
-
@SlowSL MAME GUI seems to generate additve "OR" keymaps while you remain on that line for input. If I want to remap a control, I simply move up or down to the next one, then back to the one I want to edit and remap. This always replaces what is there starting with a fresh mapping. If you just keep pressing ENTER on the same line they combine (as you noticed).
Sometimes, I will combine stuff intentionally. For example, I might combine coin drops when playing from the vertical ends of my cabinet (3-sided cocktail design). I might also map multiple action buttons for a game to give the player the option to hit one button or another button for the same function.
Understanding the "null" mapping in per-rom .cfg files is also really useful, as it blocks the retropad mapping and allows just the raw key inputs to reach the MAME GUI. This is necessary if you want to do complex boolean mapping (with "NOT" settings for example to setup a tankstick).
Contributions to the project are always appreciated, so if you would like to support us with a donation you can do so here.
Hosting provided by Mythic-Beasts. See the Hosting Information page for more information.