Setting up a Ipac2
-
@caver01 said in Setting up a Ipac2:
I was thinking of making an infographic to illustrate the abstraction layers
That would be great and really helpful as that challenge will probably be around for the foreseeable future. I had trouble understanding it.
Maybe we could put together a list of conditions like:
Using IPAC2, configured as Keyboard with ALL DEFAULT mapping
2-players, each using : six action buttons, Start, Select and Joystick, Start and Select.
Then say, if this is your setup, here's an example of the controls defined in the all/retroarch.cfg and list the relevant mapping. What do you think?I could see that being helpful also to view a snip-it of the all/retroarch.cfg where modifications would need to be made for a specific example to work from.
I know with the iPAC after going through the initial "keyboard" configuration on bootup I change my
input_enable_hotkey =
&input_exit_emulator =
. I think the default all/retroarch.cfg start is enter and select is rshift. I change start to 1 and select to 5 during the initial config which in MAME are player 1 start and player 1 coin. Then I go back and change my hotkey and exit in retroarch to match MAME as 1 & 2 to exit. It sounds like a lot of hoop jumping but really it only takes a few minutes but that's MAME and not consoles.@battlecat I feel that making an assumption about the setup of the iPac would be useful here. Given that an iPac2 or iPac4 has a specific set of inputs is there a way to publish a opt/retropie/configs/all/retroarch.cfg that is specifically tailored to each device?
Could you explain more here @battlecat? When it comes to these "keyboard" input devices you have to make assumptions from the get go I was thinking. The first thing I did was check the default keys of the iPAC, setup a button layout on my cab/box & then wired the physical buttons to the iPAC knowing button 1 (1SW1) is set to l-ctrl by default. When you boot up RetroPie for the first time and it asks for button A input your probably going to use l-ctrl or whatever your button 1 layout is on the cab which is hardwired to the iPAC's 1SW1 or another input as the default key. Unless you want to change them from the defaults.
My thought is you almost don't need to make assumptions as you have to plan and premeditate when using an iPAC or I might be misunderstanding what you're saying it might be helpful to make an assumption.
I keep wondering do joysticks work with consoles or maybe the early ones like NES, SNES, Atari 2600 (I think was analog but only 8-way?) Were they simple 8 way d-pad inputs or were they "full" analog?
-
@battlecat said in Setting up a Ipac2:
I recently have thrown my hands up when it comes to getting NES to play correctly and simply bought a set of USB controllers for the Retropie.
Sorry you posted between posting. I was slow! :) I don't remember doing anything extra and with the default keys I can play Mario. Bros. on the NES fine.
I cannot figure out how to get things like FBA to exit using the same keyboard combo of P1+P2 or esc like the other mame emulators.
When using Retrorach you might need to verify
input_enable_hotkey =
&input_exit_emulator =
to get Retroarch to match MAME. It's exactly what I do for consistency. That's kind of what I was trying to explain in the example in the other post.@caver01 has the most complex setup I heard of. If he can't walk you through it--no one can! ;)
-
@riverstorm so given the iPac2's P1+P2 exit combo being the same as ESC what do you set "input_enable_hotkey = & input_exit_emulator =" in what file?
Thanks,
BC -
@battlecat you set those in
/opt/retropie/configs/all/retroarch.cfg
-
@caver01 And what do you set them too? :)
-
@battlecat To the keys you want to use them for.
But this is where it becomes different strokes for different folks. For example,
I setinput_exit_emulator = escape
andinput_enable_hotkey = nul
because I used WinIPAC utility to specify a switch on my IPAC4 (I think it was probably Player 3, switch5) to send the ESCAPE key. That is wired to my dedicated exit pushbutton. I don't use hotkeys.However, for many people, they may not want to dedicate a button at extra expense (and inputs used). For them, the hotkeys are great because they allow you to do stuff in RetroArch like save states and so on. So the default would be to have
input_exit_emulator = num1
andinput_enable_hotkey = num5
to correspond with the Player 1 Start and Select (coin) inputs. These keys are the MAME defaults.Just make sure you don't specify the same line twice in the retroarch.cfg, as one would override the other
-
@caver01 said in Setting up a Ipac2:
So the default would be to have input_exit_emulator = num1 and input_enable_hotkey = num5 to correspond with the Player 1 Start and Select (coin) inputs.
It's exactly like @caver01 was saying. Here's where everyone starts tailoring for their specific setup needs. For mine after going through the initial input which defaults to
num1
&num5
I change my hotkey tonum1
and my exit key tonum2
. Pressing Escape on your keyboard exits the game but also when using an iPAC pressing 1 & 2 simultaneously sends the Escape key and exits. By configuring the Retroarch settings to 1 & 2 I am able to exit non-Libretro cores (i.e. mame4all-pi or AdvMAME) by pressing 1 & 2 together which sends escape (their defaults) and to exit Libretro cores (i.e. mame2003, lr-fbalpha or NES) I also press 1 & 2 together. This allows me to exit all emulators by pressing 1 & 2 together.The iPAC has a "shift key" which is similar to Retroarch's hotkey. The default is 1. So pressing 1 plus another key (within a specific time--a second or so) together sends a shifted key sequence (like 1+2 sends Escape). The neat thing about the iPAC is the shift key, normal keys and codes with shifted keys may all be set to whatever you want.
When I built my box I added a player 2 start key for player 2 start but also to exit. When I configure RetroPie on first bootup and it asks me to press a key for select I press 5 (the button I wired to my iPAC for player 1 coins--it's default--MAME defaults). I then can use 5 to add coins in MAME but also for changing from a one player to a two player game in Mario Bros. and hit player 1 start to begin playing.
Normally to exit it would be 1+5 (Libretro cores) but I go and modify the all/retroarch.cfg to make 1+2 my exit keys so it matches non-Libretro cores. This leaves 5 as my select key just not my hotkey then I move my hotkey to 1 and my exit key to 2. It's just a preference but you could also make your hotkey 2 and exit 1. It's mainly to match the iPAC escape sequence to simulate the Escape key for MAME. You may also have a dedicated exit key like @caver01 and disable the Retroarch hotkey but you loose the Retroarch hotkeys for save states, pause, etc. which I do use for some longer arcades games to save and restore if I die to often...which is the case! ;)
Another thing I can't quite remember if it's the iPAC or emulator right now. When exiting some emulators it doesn't seem to register hotkey+exit. So I press them in reverse exit+hotkey. So instead of 1+2 immediately in sequence I press 2+1. Subtle difference.
There are a lot of cool refinements and tweaks for streamlining things once you have this down. They kind of go on and on and they makes things work that much cooler but on the other hand they really aren't needed if you don't want to invest to much time and just get playing.
I get the turn key solution. I remember ripping my music CD's with EAC and using CUETools to verify the pressing offset for an exact bit perfect copy (well as close as you can get--miles of reading the nuances). I didn't want to know the whys or hows in the beginning just the steps to get it done but in the end I ended up learning way more than I cared to know on how to make bit perfect copies of CD's. ;)
-
@caver01 Okay. SO you just said that you are deviating from the standard setup by not using hotkeys. There is no way to predict every possible variation. That is true enough. I somehow doubt that the majority of people who would be seeking this type of basic answer would be as advanced a configuration as you are.
;)
-
@riverstorm Thanks for that detail.
Once more I am suggesting that there should be a baseline default setup for the iPac users that should require no remapping of keys or changes to any text files. I know I seem to be advocating this for those who just want to plug and play and not learn to edit files or remap keys. I understand that there are a lot of hardcore user out there of RetroPie. They may be the majority and yet I do not understand what the big deal is with including default setups for iPac users along side the heavily supported xbox controller user is. -
it’s not simple. first up, what are the default bindings you want to use? what keyboard > retropad binding gives a sensible ipac mapping for all cores? including arcade (fighting game layouts, etc). such a binding doesn’t exist for any controller as the cores aren’t unified in that way. this is a general problem.
“xbox controllers” do not have default mappings. the user has to bind them themselves. i don’t know why an ipac would be special, here.
-
@dankcushions I think that the standard keyboard or keyboard interface user has been left out of the list of controllers on https://retropie.org.uk/docs/
I guess what I want is to be able to have something up there that says hey iPAC users here are your instructions. Here is what you need to do if you are not deviating from the historical keyboard setup for the iPac. Here is what you should do if your iPac has not been changed from its defaults.
-
ok, i'm kind of interested in getting ipac to work with mame2003 by default :) some questions:
- is this an accurate list of the defaults? https://www.arcadeworlduk.com/pages/IPAC-2-Code-Table.html
- is it the same layout for ipac 1 and 2?
- what do things like '1 SW 1' and '1 A', mean? Which one of these would be 'Button 1' in MAME, for example?
i think the first problem i would have to solve is to ignore the 'double press' scenario that @caver01 is very familiar with - if a keyboard key is also a retropad key, we need to somehow stop mame from reading that as two inputs.
-
@battlecat said in Setting up a Ipac2:
Once more I am suggesting that there should be a baseline default setup for the iPac users that should require no remapping of keys or changes to any text files.
When you first boot RetroPie you're asked to configure your input device. If you hold down a button connected to an iPAC it is identified as a keyboard. At this point you're presented with the input configuration (this is configuring Retroarch). All you need to do is press the button you wish to assign to each input. It's straight forward with minimal interaction to get you up and running but gives you the flexibility to choose your keys. You don't need to remap or modify text files. It should work just fine with MAME and consoles too.
Note P1+P2 will most likely not be your exit emulator keys because choosing P1 or P2 for select which will in turn become the hotkey doesn't make sense. P1 and P2 need to be left as is to start games and need to be assigned as such.
If I am understanding you correctly you want this part skipped and the Retroarch default keys to be the iPAC default keys which are in turn the MAME default keys?
I think the iPAC is identified as a keyboard which could actually be many different devices from an actual keyboard, IPAC, GPIO, Xin-Mo, etc. but you want to settle on the IPAC default keys for Retroarch?
One example where this may not work is MAME player 1 button 1 is l-ctrl but assigning l-ctrl to GPIO doesn't work the best as it causes issues in some emulators. It's better to stick to letter keys with GPIO. I am sure there are many others examples why allowing the user to configure the input might be a better option.
I do believe Retroarch does have a set of default keys that you're more than welcome to change. Looking at it in reverse Retroarch already setup default keys and you need to modify the IPAC to match.
- d-pad up - up arrow
- d-pad down - down arrow
- d-pad left - left arrow
- d-pad right - right arrow
- start - enter
- select - rshift
- A - x
- B - z
- X - a
- Y - s
- left bottom - q
- right bottom - w
You either need to convince the Retorarch developers to reassign the default keyboard keys in retroarch.cfg to use the MAME defaults is a better idea or convince the RetroPie developers to identify the IPAC on bootup and modify the retroarch.cfg keyboard input keys to use MAME defaults. Also they will need to configure the hotkey and hotkey functions to what is best for all users. All this because you don't like the idea of pressing a dozen buttons to setup the IPAC on first bootup.
I do see your point where this might have merit but you're going to need to make some assumptions that everyone wants to use the IPAC default keys, a hotkey button and also all the hotkey function keys like reset, save, load, exit, etc. need a key designation.
It doesn't seem like a priority item because you truly want a turn key solution but on the other hand you want flexibility and to make P1+P2 to be your combo exit keys. If you want something different then the defaults during setup you're probably going to need to learn to modify one text file or buy one of the ready made consoles.
I never thought that RetroPie promised a turn key solution that you want but slowly it is getting closer and closer over time. Patience Danielson! I am not sure what to say except maybe make large donations and hope your idea gets moved to the top but no promises it will! ;)
-
@dankcushions said in Setting up a Ipac2:
what do things like '1 SW 1' and '1 A', mean? Which one of these would be 'Button 1' in MAME, for example?
The first number is player. So '1 SW 1' is Player 1, Switch 1. On the older IPAC hardware, there was no '1 A' but it looks like Ultimarc saw fit to use it to better align with gamepad/console emulators.
The Player 1-4, Switches 1-SW8 on the IPAC4, for example (a 4-player, max # of inputs board) were originally supposed to map to MAME defaults. MAME was the only significant emulator going, so it made sense to setup the board defaults to keys that match the MAME inputs. Since MAME maps to Button 1 Button 2, etc, and not ABXYLR like gamepads, this was a good plan. So the basic rule was that, depending on which IPAC model you bought, you were really just picking the number of player inputs you needed. IPAC4 has inputs for 4 players, IPAC2 has inputs for 2. The basic inputs were:
Up, Down, Left, Right.
SW1, SW2, SW3, SW4, SW5, SW6, SW7, SW8
Coin, Startfor each player.
Later, A and B were added (I don't even know what the defaults are for these) and they also added the ability to connect as a game controller or a keyboard--configureable using the WinIPAC utility.
These days, the abstraction layers don't perfectly line up the way they used to. If all we ever used was MAME, it would be OK, but folks like to emulate consoles now (and sometimes more than arcade), so we have to consider how the MAME keys map to a virtual game controller with ABXYLR. So, choices have to be made. Do you go with AB = Sw1 and Sw2, or do you reverse these because of how most controllers are built? It's confusing to say the least, and everyone will have their own idea about what switches map to controller buttons (not to mention the fact that you CAN reconfigure the actual keypresses sent by the board using the WinIPAC utility).
That's why I tend to think about IPAC users as traditional MAME-based cabinet builders that want to use Arcade buttons and joysticks. But the moment they say they want to play consoles, it gets sticky.
i think the first problem i would have to solve is to ignore the 'double press' scenario
As for the double-mapping, you COULD set all retroarch inputs to NUL but this would break any libretro core that does not see RAW keypresses. The fact that it maps two keys at once doesn't really matter unless you are trying to get <CODE_NOT> remapping to work in the MAME GUI. Otherwise, it functions fine.
Oh, and of course, the MAME Coin input can be used as SELECT and Start is Start on console emulators, so at least that works OK. However, the default retroarch mapping for these is RSHIFT and ENTER, which is different than MAME Player 1 Coin and Start (num5, num1).
-
@caver01 said in Setting up a Ipac2:
Later, A and B were added (I don't even know what the defaults are for these)
They are tailored toward MAME also. I do use all 4 of them when I wired my IPAC. There's your dedicated exit button but it doesn't look like they have them on the IPAC4 only the 2! ;)
1A = P
1B = Enter
2A = Tab
2B = EscapeAs for the double-mapping, you COULD set all retroarch inputs to NUL but this would break any libretro core that does not see RAW keypresses.
Are you aware of any as to keep this in mind might be helpful.
The fact that it maps two keys at once doesn't really matter
Right it just looks a bit funny when configuring TAB input and it has double inputs displayed but it still works except <CODE NOT>.
Do you go with AB = Sw1 and Sw2, or do you reverse these because of how most controllers are built?
I use the "Swap A&B buttons in ES" feature even with the IPAC. I reconfigure the keyboard and joystick after. This doesn't affect standalone MAME emulators like mame4all or AdvMAME.
However, the default retroarch mapping for these is RSHIFT and ENTER, which is different than MAME Player 1 Coin and Start (num5, num1).
At the first bootup if you configure the IPAC or keyboard they will be changed to num5 & num1 if shooting for MAME keys. I suppose if you just configure a joystick only they will stay at defaults.
@dankcushions Sorry Dank I thought your questions on IPAC setup were rhetorical in regards to making a point in the discussion with @battlecat and not actually doing it.
-
Yes that list is accurate and it's MAME's official default keys.
-
Yes I think all the input/button designations are the same for the IPAC2 and 4. The 4 has inputs for up to 4 players. MAME's default keys are 100% on the keyboard for all 4 players, even the directional keys. So it's pretty much a 1 to 1 mapping from IPAC to official MAME keys.
I believe Andy from Ultimarc designed the board with MAME specifically in mind. He's easy to talk to and will answer any question you ask him. I even requested an Autocad diagram with the dimensions to do some laser cutting and he was able to create one. The mini and ultimate are more like dupont/jumper type connectors for the budget minded and the mother of all models respectively.
- @caver01 pretty much explained the button scheme. If you wire 1SW1 to button 1, 2SW2 to button 2, 1STRT to player 1 start and 1COIN to player 1 coin, etc. MAME emulators will work right of the box with no modifications due to the IPAC making it's default keys align with official MAME default keys that most MAME emulators use too but the IPAC inputs can be changed to any key you want even mouse clicks or joystick simulated button presses, etc. It's incredibly flexible.
-
-
@riverstorm An interesting point here, I was never able to get mouse clicks to work when I configured my IPAC using the WinIPAC utility. Of course, mine is a very early model. It was not a big deal, as my U-Trak has a mouse button interface too, so I used that--not that it really comes into play.
Are you aware of any as to keep this in mind might be helpful.
So, I don't really know if lr-fbalpha sees raw keypresses. It is quite likely that nothing in that emulator would work without mapping in retroarch.cfg. And this could apply to console emulators too. I would expect most libretro cores are built around the retropad abstraction for inputs--in fact I think that is by design in order to bring consistency to the framework (to keep users out of the business of configuring controls to every single core).
Depending on what cores you plan to run, I would expect that you would NEED to have the keystrokes mapped in retroarch to support most of them. I think we are, in fact, lucky to be able to press TAB and have that raw key recognized by MAME. There are MAME emulator features that work because they are accessible through the MAME GUI menu that simply don't map to core options.
-
@battlecat - I missed this but it looks like you can configure the hotkey when configuring input vs. select being the default hotkey but I would imagine you would still need to modify all/retroarch.cfg or go into the Retroarch menu to modify the hotkey functions (save, load, etc.) if the defaults aren't what you want.
"The ability to configure your own RetroArch hotkey enable button when setting up your gamepad."
One step closer! :)
-
@caver01 said in Setting up a Ipac2:
And this could apply to console emulators too.
Those are some good points when it comes to console emulators. I keep thinking from a MAME point of view as it's my main type also.
If the emulator was built from the ground up as a Libretro core it's sole input might be Retroarch vs. MAME which seems to handle both ways fine hence the double inputs. :) Someone would need to nul the Retroarch inputs and run a console game to know, unless you're the guy that programmed it. It's been a while since I fired mine up when I do I might have to try it.
-
@riverstorm Yeah, this is why it doesn't make sense to set all inputs to NUL. If all you ever do is run lr-mame2003, it would be similar to a stand-alone input strategy. MAME defaults would work as RAW keypresses and you could remap everything in the GUI (but you would not need to). I have considered this approach, but I want other lr-emus to work too (arcade folder). You can do it per-rom as needed. For example, I have a Vindicators zip.cfg file that does just this. I remapped that game's controls to work as a tankstick which was only possible by dropping virtual retropad and relying entirely on MAME raw keypresses.
One thing that I wonder about is this: How does the retropad inputs (A, B, X, Y, L, R) map to MAME inputs. Is RetroPad A -> MAME Button 1? In ES, I basically guessed and got close, but I find I need to remap a few games for my button layout. That's another variable, of course, as everyone builds their panel differently. Some go for a staggered button layout but mine is setup like Street Fighter, with my panel that looks like this:
UP SW1 SW2 SW3 LEFT RIGHT DOWN SW4 SW5 SW6
which for me corresponds to:
UP LCTL LALT SPAC LEFT RIGHT DOWN LSH X C
But I am only guessing that this matches the retropad inputs:
UP A B X LEFT RIGT DOWN Y L R
SO, if I looked at the MAME GUI menu at the mapping for Button 1, I would see "LCTL or Retropad A" but I don't know if that is what is mapped. The question is, does A from Retropad map to button1, B to 2, X to 3, Y to 4, L to 5 and R to 6? Furthermore, is that scheme consistent across all arcade emus? I just don't know.
-
@caver01 I expect there are some criss-crossing for some of the inputs. Mine is further complicated by the fact that Players 3 and 4 are sideways on my system, so up is left if you are sitting on the left vertical position facing the screen. This is just too hard to describe, but on my control panel, the players on the vertical ends are rotated clockwise 90 degrees for player 3 (on the left side) and counter-clockwise for player 4 on the right.
In vertical games, these side positions are remapped to player 1 and 2 respectively so vertical games fill the screen, but in 4-player games like Gauntlet, they get remapped again with the rotation accounted for.
I realize, my panel is unique, and it's one of the reasons why I love the flexibility of these layers (but why my example is not well-suited for the basis of a wiki config).
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.