Arcade control panel mapping questions
-
@sammylj Well with an ipac you can assign any function you like to any switch you have as the ipac is basically appearing as a keyboard. So for me:
input_player1_start = "num1" input_player1_select = "num5"
So here, coin is essentially 5 on a keyboard - the MAME default. Now this whole thing can either be simple to you and it works or you will have issues. I suggest that you read this. It's a good overview.
-
@sammylj Also, if you look at the code table, you will learn about the ipac built in shift feature. So if you hold Player 1 Start and flick your joystick to the right, it's TAB.
-
Thanks for taking the time to help!
So I had read that before and I have used the "5" as player 1 coin and I also have 1 as player 1 start.I guess where i'm getting confused is not so much the individual player buttons but more so the extra function buttons. So across the top of my control panel I have 4 buttons. Enter - Pause - Exit - Settings
I would like to use these to navigate the anything not in game. I used WinIPAC from Ultimarc to code Enter as Enter, Pause as p, Exit as escape and Settings as TAB. So can I code it so that the enter button does that menu selecting function instead of A.Also in retroarch, can I just delete the lines that have programming for buttons I do not have IE: L2, R2, L3, R3
-
@rbaker right but instead of using the shift function can I just use my "settings" button on my control panel that has been programmed in WinIPAC as TAB.
maybe my brain isn't wrapped around this exactly. So here how I thought it out.
Settings button on control panel is wired to P3SW8 on the IPAC
P3SW8 is programmed to TAB in Ultimarc -
-
@rbaker its a control panel designer to assign buttons
now here's a strange twist. I just tried the game 1943 and my 4 menu buttons worked but my player buttons did not. I had to go into the menu and program player one and two player buttons.
so when I hit my exit button on the top of the control panel it exits out of the game. but when I get back to the list of roms in the MAME section, the only button that does anything is enter which pulls up the "Main menu" with scraper, sounds settings, ui settings etc etc.exit still does nothing. -
@sammylj I use IPAC4 with dedicated buttons for Pause and Exit. We should definitely be able to get you sorted, but we need more detail from you to make sure we are all on the same page. For example, what we are talking about are RetroArch key mapping. This is only applicable to libretro core emulators. What EXACT emulator are you using? For instance, if you are using lr-mame2003, then let's proceed. Otherwise, there are other factors. Standalone emulators don't use retroarch keymaps at all, so we would be wasting our time. Can you confirm what EXACT emulator you are using? By that, I mean, you cannot just say MAME, as there are like nine MAMEs in RetroPie.
-
@sammylj Assuming we are on the same page, it is important to understand that SELECT = COIN. You won't find a 'coin' input in retroarch, but for emulators that use coins, it is the SELECT input that gets used. SELECT is obviously an important button on home consoles (e.g NES) and you will need to press it to do certain menu functions in Emulation Station, but if we are talking arcade games, you will need a way to drop coins, and SELECT is what gets used for that input. This is why Select should be mapped as
input_player1_select = "num5"
and on your IPAC, it should be wired to Player1COIN. Number 5 is the MAME default for Player 1 insert coins, so this should be how the IPAC is configured by default.Also, make sure you are wiring your player buttons to SW1 through SW6. This will correspond to MAME defaults for what RetroArch calls 'A,B,X,Y,L,R'. Don't use the IPACs AB buttons for player buttons. You could use them for your dedicated admin functions at the top however, as they are usually setup for those inputs by default anyway.
You could leave l2,l3,r2,r3 empty in retroarch, or better yet, set them
= "nul"
to explicitly NOT map them.Finally, since you already have your admin buttons setup to use Enter, P for pause, Esc, and TAB, you just need to decide how you want to use them in the emulator. lr-mame2003 will see raw key inputs AND it will see the retroarch inputs as virtual gamepad inputs. This is a but hard to understand at first but imagine every time you push UP, MAME sees the UP key getting sent by the IPAC, and MAME also sees a virtual joystick UP getting sent from your retroarch mapping AT THE SAME TIME. It is like you are controlling two joysticks together as one. These dual inputs are not normally a problem. The admin functions are a little different. For example, if you press TAB (via your corresponding admin button) MAME will see the raw TAB key, and nothing else. Retroarch does not send any inputs in this case because TAB is not mapped to anything in RetroArch. Pause on the other hand is a little more confusing. If you set
input_pause_toggle = p
in Retroarch, pressing your pause button will send the RAW "P" key to MAME from the IPAC which should tell MAME to pause, but Retroarch will also attempt to pause the emulator itself. Which pause function wins? Well, it is confusing, because they will compete. First one will pause, then pressing it again will unpause one but let the other pause work finally, then press it again and it will unpause one but pause the other, etc. It is a bit unpredictable as MAME and Retroarch both try to pause. I would recommend either setting theinput_pause_toggle = "nul"
and leaving it to MAME to interpret your raw keyboard key, or leave the retroarch pause as P and remap the pause function inside MAME using the TAB menu to some key you are not using (like a numeric keypad key using an external keyboard). That is what I did because I want to use the RetroArch pause feature in case I am going to try to pause another libretro core emulator. I also like how RetroArch dims the screen and freezes the action as opposed to MAME which seems to just blackout.Finally, Escape for exit might be double mapped as well. This is not as big of an issue because each case will get you out of the emulator, but since you have the dedicated button like me, you might consider looking for these retroarch settings:
input_exit_emulator = escape # input_enable_hotkey = # input_enable_hotkey_btn =
With the second two lines commented out with # in front this disables hotkeys. Maybe you still want them for save states or something, but I have hotkeys disabled. This way, a press of your exit button sends ESCAPE and the first line here tells any libretro core to exit.
Or, if you want to be explicit about disabling hotkeys, uncomment them and set to "nul".
One more thing you might do is go through the entire retroarch.cfg file and see if any functions are mapped to keys that conflict with your setup. If I recall, I had a handful of functions like a turbo feature, or rewind, or next/prev shader that were set to keys I needed for player 3 or 4 controls. You can remap these to other keys on the keyboard that are unused, or set them to "nul" if you don' care.
-
@caver01 I downloaded the mame 0.78 romset. As far as which emulator I am using, im not sure. I can tell you that I have tried the roms in both the arcade folder and the mame-libretro folder. The roms work in both folders but once I open the rom I have to edit the inputs for each game. I have tried the Input(general) UI cancel to my escape but once I get into the game I cant get out.
I wish I could give you a more definitive answer on the emulator question. -
@caver01 here's what I have. Of course this could all be for not if i'm using the wrong emulator.
input_player1_a = "b"
input_player1_b = "a"
input_player1_y = "y"
input_player1_x = "x"
input_player1_start = "1"
input_player1_select = "5"
input_player1_l = "z"
input_player1_r = "c"
input_player1_left = "left"
input_player1_right = "right"
input_player1_up = "up"
input_player1_down = "down"
input_player1_l2 = "nul"
input_player1_r2 = "nul"
input_player1_l3 = "nul"
input_player1_r3 = "nul"
input_player2_a = "n"
input_player2_b = "o"
input_player2_y = "k"
input_player2_x = "l"
input_player2_start = "2"
input_player2_select = "6"
input_player2_l = "m"
input_player2_r = "q"
input_player2_left = "i"
input_player2_right = "j"
input_player2_up = "g"
input_player2_down = "h"
input_player3_a = "nul"
input_player3_b = "e"
input_player3_y = "d"
input_player3_x = "f"
input_player3_start = "3"
input_player3_select = "lshift"
input_player3_l = "nul"
input_player3_r = "nul"
input_player3_left = "t"
input_player3_right = "u"
input_player3_up = "r"
input_player3_down = "s"
input_player4_a = "nul"
input_player4_b = "9"
input_player4_y = "7"
input_player4_x = "8"
input_player4_start = "4"
input_player4_select = "lctrl"
input_player4_l = "nul"
input_player4_r = "nul"
input_player4_left = "rshift"
input_player4_right = "space"
input_player4_up = "v"
input_player4_down = "w"
menu_swap_ok_cancel_buttons = "false"
input_state_slot_increase = "right"
input_state_slot_decrease = "left"
input_exit_emulator = "escape"
input_reset = "b"
input_menu_toggle = "tab"
input_pause_toggle = "p" -
@sammylj input_menu_toggle = "tab" is a bad idea I think. It will conflict with the MAME GUI menu.
You need to read the documentation my friend. It will explain details about which emulator you are using. Look at Runcommand.
-
@caver01 ok so I have found that there are 9 emulators that run mame in retropie. I'm not completely computer literate so where is the runcommand that I should be looking for? Being that the roms are version .78, is there a emulator that I should specifically be using? Also is that decided by what folder the roms go in? I figure we should get that sorted before I worry about controls.
-
@sammylj https://retropie.org.uk/docs/Arcade/ should get you started. The lr-mame2003 core is the one that supports this romset version. The Runcommand is documented in the Getting Started part of the docs - https://retropie.org.uk/docs/Runcommand/.
-
@sammylj I was on my phone when I responded last. Thanks @mitu for adding links. The reason the TAB mapping you setup would conflict is that the input menu toggle you specified is for retroarch, and you probably want access to MAME's GUI menu instead with the TAB key.
You mappings have some mistakes. They should all conform to the acceptable inputs that are listed in the retroarch.cfg:
# Keyboard input. Will recognize letters ("a" to "z") and the following special keys (where "kp_" # is for keypad keys): # # left, right, up, down, enter, kp_enter, tab, insert, del, end, home, # rshift, shift, ctrl, alt, space, escape, add, subtract, kp_plus, kp_minus, # f1, f2, f3, f4, f5, f6, f7, f8, f9, f10, f11, f12, # num0, num1, num2, num3, num4, num5, num6, num7, num8, num9, pageup, pagedown, # keypad0, keypad1, keypad2, keypad3, keypad4, keypad5, keypad6, keypad7, keypad8, keypad9, # period, capslock, numlock, backspace, multiply, divide, print_screen, scroll_lock, # tilde, backquote, pause, quote, comma, minus, slash, semicolon, equals, leftbracket, # backslash, rightbracket, kp_period, kp_equals, rctrl, ralt
for example, you have
input_player3_select = "lshift"
which is not in the list. make it just "shift". Each of your numbers should be "num1", "num2", etc. instead of "1", "2", and so on. While the bare numerals might work, I don't know that every core will respond properly.Also, your mapping seems to have deviated away from IPAC/MAME defaults. While you can use whatever keys you want, it makes way more sense to follow the MAME defaults, especially if you are going to try using non retroarch emulators like AdvanceMAME. This is probably why you find yourself having to remap everything inside MAME.
-
@mitu thanks for the help, the reading helped understand a bit more
-
@caver01 ok just so I make sure that I am understanding correctly...
programming retroarch is like programming a gamepad essentially. Retroarch is used for in game whereas "mame gui" is the overall menu configuration. So what I should do is remap to the ipac/mame defaults so that less is being confused back and forth.
If I revert back to the original retroarch.cfg file the /all folder(which I saved a coy of) that should start me over. Then will I need to reprogram my IPAC board with the Ultimarc program to match?to verify that I am running lr-mame2003 for my 0.78 roms I should see it on the runcommand(load screen) before the game starts and if it is incorrect then press 0 to open the menu and select lr-mame2003 as the default emulator for that specific rom.
as far as saved states go, the only thing I ever want saved is the high scores.
-
-
@mitu will do, thanks
rebuild a car engine, no problem
build a house, no problem
wrap my noodle around computer programming, error -
@sammylj I think you have the right approach, but just to clarify the frameworks:
I recommend using Ultimarc defaults. The IPAC ships with keys assigned to the switches to match MAME, so you can use the board on anything and it should work with MAME out of the box so to speak.
In retropie, we have a lot of emulator choices, but it helps to think of the emulators as living in two categories. The first is Retroarch/Libretro framework, and the second are standalone emulators. Standalone are easier to understand, but not usually the default in RetroPie. Our conversation focuses on the Retroarch framework.
Think of Retroarch as a kind of emulator playground. You can configure one set of inputs, and these will work in a variety of emulators--some for arcade and some for home consoles etc. Each libretro "core" inside Retroarch is essentially an entire emulator, each for running different systems, but they can all share the same input mapping choices and the same video effects and so on. The retroarch.cfg files are used to store the overall configurations for retroarch, naturally, and they are setup so that the one in /all can apply globally, and other versions of the file can apply to individual cores or types of cores. Features like Save States, or the use of HotKeys--these are retroarch concepts. The key mapping we are discussing above refer to the keys that will trigger inputs across all libretro cores. You must understand also that retroarch itself has an interface. There is a retroarch GUI menu that can be invoked to make changes to the retroarch.cfg files. This has nothing to do with the MAME GUI that you are probably familiar with when you hit TAB.
So, we have Retroarch, and inside that, we have a core called lr-mame2003 which is the default arcade emulator. When you add ROMS to mame-libretro, this is your main choice of emulator (same for arcade).
Ok, so far? So, here is where it gets complicated. MAME is built to accept inputs from a keyboard. But not everyone has a keyboard. Many people have gamepads. So, the retroarch framework allows gamepad users to map their joysticks and buttons and lr-mame2003 core has been coded to accept the RetroArch inputs AND to accept keyboard inputs at the same time.
Because you happen to use a keyboard interface (IPAC), you technically don't need to map ANYTHING in Retroarch because your IPAC defaults would match MAME's defaults and should work out of the box so to speak. But the reality is that some users want to try other cores, for example, Final Burn Alpha. The Final Burn libretro core is different than MAME in that it only accepts the retroarch inputs. No raw keyboard commands will work. Consequently, we keyboard (ipac) users find ourselves mapping keys in retroarch.cfg anyway to cover the bases.
Ok, so you can reset the IPAC to defaults, then map these in RetroArch.cfg to match, like described here. Disable hotkeys, set exit to ESC.
At that point, you should be able to run games in lr-mame2003, but you have an additional gotcha. You reamapped some games using the MAME GUI (TAB). These are MAME keymaps that get stored in separate files per game ROM. They are located next to your ROMs inside a mame2003/cfg/ folder. They happen to be .cfg files but these ones are different than retroarch.cfg and cannot be edited. If you have them for a game you were already messing with, you can just delete it. You can also delete one called default.cfg here. That will clear any remapping you did in the MAME GUI for ALL GAMES.
It gets really confusing because keys get mapped, then remapped in so many places and they all matter because one uses the next which uses the next and so on, in this order:
- Ultimarc IPAC -- this is the first, and most important, as this defines what raw keystrokes your switches generate.
- retroarch.cfg the one in the configs/all defines the global mapping for the typical inputs we think of for home consoles (a,b,x,y etc.). These get forwarded to the libertro cores as virtual gamepad inputs. You are basically setting up a virtual gamepad here that can accept keyboard keys as buttons and joystick movements.
- MAME GUI -- If you leave the defaults, gamepad users probably don't need to mess with this, but keyboard users end up with two sets of inputs going through here, the virtual gamepad setup on #2 above, and the raw keyboard keys. It is better if they simply match. You can, as needed do a final remap here (something I do all the time because my vertical games get played sideways with different controls).
-
@caver01 WOW let me start by thanking you for your time and patience.
Ultimarc IPAC - reset
Since the basic panel designer does not have My Enter - Pause - Exit - Settings(Menu) buttons, I've had to add them. I programmed escape to be exit and pause to be p. BUT, Enter is already programmed, by default to be 3sw3. Should I change that around? Also, since you've suggested we move away from tab being the settings keystroke, what should we use instead.retroarch is setup as such
input_enable_hotkey = "nul"
input_pause_toggle = p
input_exit_emulator = "escape"input_player1_a = alt
input_player1_b = ctrl
input_player1_y = shift
input_player1_x = space
input_player1_start = num1
input_player1_select = num5
input_player1_l = z
input_player1_r = x
input_player1_left = left
input_player1_right = right
input_player1_up = up
input_player1_down = downinput_player2_a = s
input_player2_b = a
input_player2_y = w
input_player2_x = q
input_player2_start = num2
input_player2_select = num6
input_player2_l = i
input_player2_r = k
input_player2_left = d
input_player2_right = g
input_player2_up = r
input_player2_down = finput_player3_a = enter
input_player3_b = rctrl
input_player3_y = rshift
input_player3_start = num3
input_player3_select = num7
input_player3_left = j
input_player3_right = l
input_player3_up = i
input_player3_down = kinput_player4_a = e
input_player4_b = b
input_player4_y = h
input_player4_start = num4
input_player4_select = num8
input_player4_left = v
input_player4_right = u
input_player4_up = y
input_player4_down = nhow we looking so far?
so last thing would just be the enter button on the panel.
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.