Setting up a Ipac2
-
@battlecat https://retropie.org.uk/forum/topic/3/read-this-first
Format your posts! - put small logs in code blocks - see http://commonmark.org/help/ - and put large logs on a pastebin type site like http://paste.ubuntu.com/ http://pastebin.com/ or similar.
you need to put code/configs between a pair of 3 backticks.
eg
` ` ` #my log here ` ` `
(remove the spaces between the backticks to get it to work). i'll edit your posts to do that now.
-
@dankcushions said in Setting up a Ipac2:
tween the backticks to get it to work). i'll edit your posts to do that n
Well that is good info to know. How on Earth did you get that info out of the toolbar on this forum?
-
@caver01 said in Setting up a Ipac2:
Then, as a final suggestion, you may end up with some confusing hotkey stuff. If you really are only using hotkey for exit, you could try these:
input_exit_emulator= "esc"
input_enable_hotkey="nul"I do have those set but not as what you suggested. In my cfg they are:
ALSO I changed these two lines in the file elsewhere: input_exit_emulator= "num2" input_enable_hotkey="num1"
Now these could be set incorrectly.
When I booted last night I was able to do the following:
MAME 37b5 - P1+P2 exited rom
MAME 37b5 - Button input_player1_a = "ctrl" Entered romMAME 0.78 - P2+P1 exited rom (not sure why it reverses)
MAME 0.78 - Button input_player1_a = "ctrl" Entered romNES - P2+P1 exited rom (not sure why it reverses)
NES - P1 Started and Paused games
NES - Button input_player1_a = "ctrl" Entered rom -
@battlecat All I was pointing out was that you wrote:
############################################### # P1 and P2 Buttons # ############################################### # Uses the built in iPac2 Hotkey to give the ESC input_player1_start = "num1" input_player1_select = "num2"
Player 1 Select is actually the same input as Player 1 coin and since the IPAC has COIN to be used the same way, it is
Num5
by default That is how the IPAC is setup and that is how MAME is setup. You haveNum2
which would conflict with MAME Default for Player 2 Start.SO, I thought this was maybe a typo since you have a heading "P1 and P2 Buttons".
IPAC defaults, MAME Defaults, and the best setup for IPAC users in retroarch.cfg for the wiki should be:
input_player1_start = "num1" input_player1_select = "num5" input_player2_start = "num2" input_player2_select = "num6"
This still supports using
P1 Start + P2
Start to sendESC
but it has nothing to do with retroarch. That key combo would trigger the IPAC shift function. -
@battlecat said in Setting up a Ipac2:
I do have those set but not as what you suggested. In my cfg they are:
ALSO I changed these two lines in the file elsewhere:input_exit_emulator= "num2" input_enable_hotkey="num1"
Now these could be set incorrectly.
This will definitely interfere with the IPAC Shift function they way you have
num2
mapped in retroarch. Trust me, you really should haveinput_player1_select = "num5"
andinput_player2_start = "num2"
. -
Going to go home and give this change a try.
Last night I did not experience any issues but that doesn't make my settings correct.
I will get back to you how this works out.
-
@battlecat said in Setting up a Ipac2:
I do not understand your reference to num5. That is a coin insert in MAME and is not used for any default hotkey commands. https://www.ultimarc.com/ipac2.html or http://easyemu.mameworld.info/mameguide/mameguide-controls.html
You're close now. :) Select is neither IPAC nor MAME it's a Retroarch reference. Instead of installing a new button you're re-purposing your MAME player 1 coin button (also the same for the IPAC) for different game options.
Here's part of my Retroarch config pertaining to player 1:
# Keyboard input, Joypad and Joyaxis will all obey the "nul" bind, which disables the bind completely, # rather than relying on a default. 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 = "down" # input_player1_l2 = # input_player1_r2 = # input_player1_l3 = # input_player1_r3 =
When I was referring to keeping Retroarch hotkeys enabled for save games I had to disable some shift inputs on the IPAC but not the shift key itself though. As you still need its exit function. I am able to increase/decrease my save slot number and then load/save games. You could just as easily switch your up/down and left/right if it makes more sense.
It's handy for games like Rastan that allow a finite number of coins to complete the game from beginning to end. If not you start from the beginning.
input_state_slot_increase = "right" input_state_slot_decrease = "left" input_save_state = "up" input_load_state = "down"
Exit works in both MAME standalone and Libretro cores. Basically you're aligning Retroarch to IPAC.
input_exit_emulator = "num2" input_enable_hotkey = "num1"
Re-purposing your player 2 start to hotkey exit is fine as you're only exiting the game and don't need to start a new one. When running a Libretro core 1+2 OR 2+1 should exit. When using a standalone emulator (i.e. mame4all-pi) it needs to be 1+2 as the IPAC is doing the work and not Retroarch.
When pausing with lr-mame2003 you get a blank screen. I'm not sure why. So what I do is set the MAME Pause key from the in-game TAB menu to "None" and use Retorarch's pause which freezes the screen exactly as you're playing like a freeze-frame. It's handy to see where your character is at (hopefully not about to die) before unfreezing a game. :)
You're controllers (if you use them) will be different but still retain all the functionality without interfering with your cabinet/IPAC.
-
@riverstorm said in Setting up a Ipac2:
You're close now. :) Select is neither IPAC nor MAME it's a Retroarch reference. Instead of installing a new button you're re-purposing your MAME player 1 coin button (also the same for the IPAC) for different game options.
Hello:
I do not have a coin button. :(
I have a coin door that takes tokens. :)So I do not have a "MAME player 1 coin button".
How does this affect things?
-
@riverstorm said in Setting up a Ipac2:
It's handy for games like Rastan that allow a finite number of coins to complete the game from beginning to end. If not you start from the beginning.
I guess I do not really care much for save states. I like to play my few tokens and then get back to work. I don't think I have ever used save states on an arcade setup.
Thanks for the info though.
-
@battlecat said in Setting up a Ipac2:
So I do not have a "MAME player 1 coin button".
How does this affect things?You should be fine as it's more say probably for consoles per se. You can reassign functions to whatever you need within MAME TAB.
I guess I do not really care much for save states. I like to play my few tokens and then get back to work. I don't think I have ever used save states on an arcade setup.
It's a recent thing for me as like you the idea of "cheating" never crossed my mind or appealed to me in an arcade but I know I'll never see the end of certain "story" games without some assistance. :) Any arcade type games like Donkey Kong, Galaga, Pac-Man, Frogger, etc. I just run with 3 lives and call it good.
-
@riverstorm said in Setting up a Ipac2:
it's more say probably for cons
A lot of times we have guests over with kids. I like to have it on so that they get an idea of what it was like back in my childhood. Funny enough you can set up all the flashiest game systems you want and at the end of the night they are all fighting over who gets to play the last game of Frogger or Ms Pacman.
-
@battlecat said in Setting up a Ipac2:
I do not have a coin button. :(
I have a coin door that takes tokens. :)So I do not have a "MAME player 1 coin button".
How does this affect things?
Do you have a select button? If so, pressing it will drop coins in MAME.
I think it is cool that you have a coin mech. All MAME is trying to do is accommodate in emulation the inputs that come from a coin mech on a real arcade cabinet. Since many of us don't have the mechanism, we use a pushbutton for dropping coins. That button also serves as SELECT in other emulators (NES, etc), or depending on how you look at it, the SELECT button on gamepads is used to drop coins.
I can see how you might not want to reach down and add a coin just to press a virtual SELECT button, but as @Riverstorm said, there is no "select" function in MAME even though that button does exist on most consoles.
I have seen some interesting ideas from cabinet builders: You could do two wires to the same IPAC input. Wire a P1SELECT button on the control panel AND the coin mechanism to the same IPAC input (two wires from P1COIN, one goes to each). Another idea that I thought was brilliant (this is what I would do with a cabinet build project with a coin mech) was a guy that wired COIN on his IPAC to the REJECT COIN button in his mech, AND the coin drop trigger. In other words, you could put in a real coin and that would trigger the COIN input, or you could push in the red, backlit REJECT COIN part of the mechanism (Coin Return), and this too would trigger the COIN input. I don't know if he had to add a little microswitch to do it, but I loved that because his coin mech would accept tokens or, if you knew about it, you could secretly just push the mech like a button. Very clever.
In any case, COIN=SELECT. Something to keep in mind.
-
@battlecat said in Setting up a Ipac2:
@riverstorm said in Setting up a Ipac2:
it's more say probably for cons
A lot of times we have guests over with kids. I like to have it on so that they get an idea of what it was like back in my childhood. Funny enough you can set up all the flashiest game systems you want and at the end of the night they are all fighting over who gets to play the last game of Frogger or Ms Pacman.
I wish but I don't quite have that issue as I can never rally enough interest most days except for my youngest whose always on board. I am hoping on Thanksgiving I might get a few takers. If I had a real arcade size cabinet it might have more appeal too.
It would probably be a downstairs deal as the wife wouldn't allow it upstairs but right now I have stacks and stacks of music CD's (100's and 100's) pulled out and laying all over that I've ripped with EAC/AccurateRip and verified with CUETools for 100% accuracy. I'm ready to just dump the whole shebang now and redesign the space for gaming. That would probably include Kinect as we have a lot of fun with it and possibly darts as it's something I do miss playing. We used to do a lot of bar league playing in the late 80s early 90s that made for an interesting and fun combo when half popped. The good ol' days. :)
@caver01 - thanks for those tips. If a full sized cabinet ever presents itself my way the hidden coin button is truly clever! :)
-
@caver01 said in Setting up a Ipac2:
Do you have a select button? If so, pressing it will drop coins in MAME.
A select button? Hmm no I do not have one of those.
I have two joysticks each with 6 buttons.
I have a P1 and a P2 button.
I have a coin 1 mech and a coin 2 mech.That is a standard arcade setup.
-
@caver01 said in Setting up a Ipac2:
Another idea that I thought was brilliant (this is what I would do with a cabinet build project with a coin mech) was a guy that wired COIN on his IPAC to the REJECT COIN button in his mech, AND the coin drop trigger. In other words, you could put in a real coin and that would trigger the COIN input, or you could push in the red, backlit REJECT COIN part of the mechanism (Coin Return), and this too would trigger the COIN input. I don't know if he had to add a little microswitch to do it, but I loved that because his coin mech would accept tokens or, if you knew about it, you could secretly just push the mech like a button. Very clever.
That is a neat idea. Of course I don't think that the coin reject button would be a good solution given how much it costs to replace the parts when they wear out and given how many times you need to press it to get a coin it will wear out quickly or just break.
Good idea though.
-
@battlecat said in Setting up a Ipac2:
I have a coin 1 mech and a coin 2 mech
I guess I am not even sure how a real coin op door works. Is it an open relay wired to coin-in and common ground?
That is a neat idea. Of course I don't think that the coin reject button would be a good solution given how much it costs to replace the parts when they wear out and given how many times you need to press it to get a coin it will wear out quickly or just break.
I suppose coin doors probably don't have rep specs like buttons but I don't think Caver meant it as a substitution but more of a supplement it in the way of an Easter egg. Definitely wire your coin door and use that primarily but if you're ever jonesing for a game and you scoured the house to no avail for the last remaining quarter you'll be glad you did it.
-
@riverstorm There are certainly more sophisticated models available now, but in the early arcade days, the coin mechanism was just at tricky piece of mechanical levers that compare a deposited coin to a reference by size and weight, sometimes with a magnet to reject counterfeit slugs. When the proper coin made it through the mechanism with gravity, it landed on a wire which triggered a microswitch before falling into a collection bin. The microswitch was simply a Normally Open switch with poles wired to the COIN input pin on the arcade motherboard and ground. Functionally, this is just like any other digital input. I suppose the switch itself may not have been interchangeable with the switches used for joysticks or buttons, but electronically, they are equivalent.
So, in MAME, emulating COIN insert was no different then a pushbutton input.
I think the challenge @battlecat (and anyone building a true arcade cabinet) is figuring out how to handle the SELECT input. Sure, it is COIN while inside MAME and FBA, but what about navigating Emulation Station menus--not to mention, using SELECT in console emulators. You certainly don't want to deposit a coin so that ES brings up a particular menu. Or worse, to use default hotkey functions to exit a Libretro emulator, you would have to press P1Start with SELECT, which means you would be pressing start AND depositing a coin--just to exit the emulator!
This is messy business, all so you can have that coin mech working like it would in an arcade without an additional COIN/SELECT button. I didn't fully appreciate the problem until @battlecat explained his cabinet controls. It shouldn't be so complicated, but imagine not having a button setup for SELECT. It makes a lot more sense to me now why one might NEED to change the defaults.
However, this is where IPAC shift can be very handy. You can setup Retroarch for EXIT with ESCAPE, and use IPAC Shift functionality to send that keystroke (P1Start+P2Start). You can also drop a coin using IPAC Shift function by pressing P1Start and Button 1. This sends the "5" key by default. Using this, you would probably need to disable the RetroArch hotkeys with "nul" or move it to another input since you would conflict with P1Start.
Thinking out loud, I would probably recommend that people building a true arcade cabinet should think about what they plan to use to trigger SELECT in ES and other emulators, Using the coin mech is fine for triggering real tokens in MAME, but in ES and others, you would have to use IPAC shift function, assuming you are using an IPAC.
-
@caver01 said in Setting up a Ipac2:
You certainly don't want to deposit a coin so that ES brings up a particular menu. Or worse, to use default hotkey functions to exit a Libretro emulator, you would have to press P1Start with SELECT, which means you would be pressing start AND depositing a coin--just to exit the emulator!
That's funny! I thought about a scenario like that last night. If playing Mario Bros. on NES you would need to deposit a coin to select 2 players.
I remember we used to try and tie string around the quarter to see if we could get some free credits but it never worked of course. :)
You can also drop a coin using IPAC Shift function by pressing P1Start and Button 1. This sends the "5" key by default. Using this, you would probably need to disable the RetroArch hotkeys with "nul" or move it to another input since you would conflict with P1Start.
I don't really see a way to utilize the IPAC shift coin-in. Even moving the shift function to another input isn't going to help. I think you would need to disable it altogether.
The first press (P1 Start + Button 1) is fine, the 2nd press is going to start the game, the 3rd is going to have other side effects depending on what's assigned to the shift function.
If you moved the shift key to player 2 start you'd have the same issue as player 1 where a game may start when you don't want it to start. Another side effect is your character is going to be "shooting" or "hopping" while in game due to pressing button 1.
If you move it to the player buttons like "button 1 + button 3" to add coins your character is going to be "shooting" and "hopping" at the same time as your pressing 2 game buttons now.
Move it to the joystick you'll be moving left, right, up or down while entering coins. All these scenarios might get you killed unless you play 1 quarter at a time.
It's not the IPAC as it's aware of itself but Retorarch will immediately enter the first key you press not waiting for the 2nd key press.
You would need a "non-control" button so you might as well add a coin-in button if you have the Retroarch layer in there intercepting keystrokes. I like the idea of wiring it to the coin door to utilize both.
Thinking out loud, I would probably recommend that people building a true arcade cabinet should think about what they plan to use to trigger SELECT in ES and other emulators,
Do you need a shift key if you don't use consoles in a dedicated cabinet? I don't think I ever use it for just MAME. I use button 1 to enter platforms, button 2 to exit back to ES and button 1 to pull up the menu for shutting down, etc. Once in MAME I don't think I use the shift function for anything but I do use the button assigned to it.
-
@riverstorm One thing you are forgetting is that IPAC knows you don't want to send P1Start when using shift function. SO, it does not send the "num1" until you release the button. That way, if you do happen to also press Button1, it sends "Num5" (it is the shift function coin drop). Retroarch will only see "5". This is why you sometimes have to press your retroarch hotkeys in reverse order because while you hold P1Start, nothing is getting sent.
It is fair to say that you probably cannot leverage an IPAC-shifted SELECT as a retroharch hotkey. You would need to dedicate some other input to the hotkey, and using the shift key itself can be problematic because of how the IPAC holds back the input until you let go.
-
@caver01 said in Setting up a Ipac2:
Using this, you would probably need to disable the RetroArch hotkeys with "nul" or move it to another input since you would conflict with P1Start.
Thinking out loud, I would probably recommend that people building a true arcade cabinet should think about what they plan to use to trigger SELECT in ES and other emulators,
Right, as soon as I left for lunch I knew I made a mistake on the input but had to drive across town to install a VMWare server before the end of the day so I couldn't correct it. Following that logic what is the issue with this statement above? That's what had me thinking a different way. I am already doing exactly what you're describing above with the defaults.
My setup is more of a controller with power, HDMI, Ethernet & USB ports on the back with (P1 Start, P2 Start, Coin-in, 6 buttons & joystick) that you connect to a TV or monitor but no different than a full arcade cab.
Retroarch P1 Start & Select should be fine. It seems like you could even remove your dedicated coin-in (5 button) too! I'll test tonight using the IPAC shift key.
Pressing 1 would send
"num1"
to start a game. Pressing 1+1SW1 would send"num5"
for a credit as the IPAC is holding the shift key until a 2nd key is pressed.You could then assign
input_player1_select = "num5"
and you have the select ability without the physical button. This allows your coin door to operate fully but also retain shift functionality without comprising or adding buttons.This is why you sometimes have to press your retroarch hotkeys in reverse order because while you hold P1Start, nothing is getting sent.
Here's whats happening. If you remove the IPAC (or disabling the IPAC shift keys would probably have the same effect) Retroarch doesn't care if you press 1+2 or 2+1. I would guess some type of polling is happening because you can hold either as long as you like then press the other to exit.
Pressing 1+2 sends escape which is fine if you disabled Retroarch hotkeys and set
input_exit_emulator = "escape"
.But with the IPAC shift enabled you have to press 2+1 in Retorarch to exit due to 1+2 is sending escape or you could just disable the IPAC shift keys.
When using a non-Libretro cores you need the IPAC shift keys or a dedicated escape key button due to pressing 1+2 is sending escape (MAME default exit). On the other hand pressing 2+1 well that's doing nothing except sending 2+1 in say mam4all or AdvMAME basically non-Libretro cores.
It is fair to say that you probably cannot leverage an IPAC-shifted SELECT as a retroharch hotkey. You would need to dedicate some other input to the hotkey, and using the shift key itself can be problematic because of how the IPAC holds back the input until you let go.
Agreed. Did you see any scenario where the Retroarch select is used in a dedicated MAME cab setting?
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.