[SOLVED] PiMAME and iPAC2
  • i have a model B and have to connect the iPAC2.
    Do i need install drivers for this? or how can i configure this hardware?
    any ideas?
  • The I-PAC2 emulates a usb keyboard, so you can just plug it in. However, if you've used advmenu with any other keyboard, the ipac will probably show up as a second keyboard. You'll have to edit the key mappings in advmenu.rc to set up the controls.

    I'm running a mini-pac from the same company, and it's working well once I did the above.

    Jim
  • thank you jim!
    but do i have to edit the key mappings or is this hardware solved?
  • It depends on what you mean by hardware mapped. The I-PAC comes pre-programmed to match buttons to the standard mame key assignments, so that is what it sends out via usb.

    If you want to map different buttons connected to the I-Pac to different keys, the I-Pac website has a programmer for that.

    When you connect the I-Pac to the Pi, Advmame gets the standard Mame key commands. As far as the Pi and Advmame are concerned, your controller is a standard keyboard.

    Where the difficulty comes in, is when you have a regular keyboard and your I-Pac connect at the same time. As near as I can figure it out, Advmame sees two keyboards, and assigns the second one it saw to Player 2. Thus none of the player 2 controls work on the I-Pac Buttons.

    On my system, since I had a regular keyboard hooked up before the I-Pac, none of the player 1 controls, or function keys worked on the controller. On the Pi, in linux, the first keyboard found is assigned as keyboard 0, and the second one as keyboard 1. In Advmame, these are keyboard 1 and 2!

    So, I have to edit a file called advmame.rc (which is basically a text file) found in the .advance hidden directory. For example, where it called for a button to be on keyboard 1, I edited it to use keyboard 1 or 2. So far this has been working well for me.

    As an example, the original line...

    input_map[p1_button1] keyboard[1,lcontrol]

    I changed to..

    input_map[p1_button1] keyboard[0,lcontrol] or keyboard[1,lcontrol]

    To figure out what the I-Pac controller was seen as, I fired up a game, used tab to get into the options menu, and went into edit the player controls. By selecting a control, (eg player 1 coin), and then pressing my player 1 coin button, I was able to see what the Advmame program was seeing it as. In the same manner, pressing the equivalent keyboard button on the keyboard, I was able to see what Advmame thought that was. I could then edit the advmame.rc file accordingly.

    This very useful post on Tankstick configuration, http://blog.sheasilverman.com/2013/02/pimame-advancemame-and-advancemenu-tankstick-configuration/#more-772 gives a great start, and will probably work as is. I didn't edit the /etc/rc.local file, as numlock was not an issue.

    Hope this isn't too confusing, and of some help!

    Jim
This discussion has been closed.
All Discussions

Howdy, Stranger!

It looks like you're new here. If you want to get involved, click one of these buttons!