Main Restorations Software Audio/Jukebox/MP3 Everything Else Buy/Sell/Trade
Project Announcements Monitor/Video GroovyMAME Merit/JVL Touchscreen Meet Up Retail Vendors
Driving & Racing Woodworking Software Support Forums Consoles Project Arcade Reviews
Automated Projects Artwork Frontend Support Forums Pinball Forum Discussion Old Boards
Raspberry Pi & Dev Board controls.dat Linux Miscellaneous Arcade Wiki Discussion Old Archives
Lightguns Arcade1Up Try the site in https mode Site News

Unread posts | New Replies | Recent posts | Rules | Chatroom | Wiki | File Repository | RSS | Submit news

  

Author Topic: Help with configuring mame buttons..  (Read 2217 times)

0 Members and 1 Guest are viewing this topic.

shateredsoul

  • Trade Count: (+4)
  • Full Member
  • ***
  • Offline Offline
  • Posts: 1412
  • Last login:January 25, 2013, 08:23:51 pm
Help with configuring mame buttons..
« on: March 10, 2010, 01:46:15 am »
I was wondering if someone already had set up a hybrid controller.cfg? If so how did you go about doing this?

I'm using left click and right click as the buttons for my 4 way joystick (so I can also use them with the trackball as a mouse)

but i'm having issues wrapping my head around the idea of how to program the buttons for the hybrid layout

so for capcom it would be

123
456  with 1 being left click and 2 being right click

and for neo geo it would be

1234 (again 1 being left click and 2 being right click)

and here is the layout (except it curves)

  OOO
  OOO
O

any ideas of how I could go about setting this up? I'm new to this, so I would appreciate help on how to reconfigure the controller layouts. Even a link.  (do I have to configure every single neo geo game seperately? or can I do one change that would affect all neo geo games? and how could i change so all games see button 1 and 2 as left click and right click

man i'm confused

shateredsoul

  • Trade Count: (+4)
  • Full Member
  • ***
  • Offline Offline
  • Posts: 1412
  • Last login:January 25, 2013, 08:23:51 pm
Re: Help with configuring mame buttons..
« Reply #1 on: March 10, 2010, 02:29:26 am »
As I try to configure the cfg I noticed that

midtunit.c, midyunit.c, were configured.. what systems do these controls belong to? I can figure out cps1,2,3 and neogoe.. but no idea what these mean

romshark

  • Trade Count: (0)
  • Full Member
  • ***
  • Offline Offline
  • Posts: 389
  • Last login:October 16, 2023, 02:50:59 pm
  • Arcade and Robotics enthusiast
Re: Help with configuring mame buttons..
« Reply #2 on: March 10, 2010, 06:41:26 am »
I'm sure there is a way for MAME to automatically map the buttons, but I never figured it out. I just map each game myself.

midtunit.c is the Midway T-unit system, with such games as NBA Jam and some versions of Mortal Kombat.

midyunit.c is the Williams/Midway Y/Z-unit system, running Narc, Smash TV, Terminator 2, and more.


A whole list of "systems" in MAME can be found here. Interesting to see the documented stuff on each system.

shateredsoul

  • Trade Count: (+4)
  • Full Member
  • ***
  • Offline Offline
  • Posts: 1412
  • Last login:January 25, 2013, 08:23:51 pm
Re: Help with configuring mame buttons..
« Reply #3 on: March 10, 2010, 11:18:23 am »
Ahh i see.. well my button layout is nothing like the mortal kombat one, so maybe i'll leave that to match the default. Or what do you guys think about that?

bkenobi

  • Trade Count: (+1)
  • Full Member
  • ***
  • Offline Offline
  • Posts: 1668
  • Last login:August 16, 2021, 10:41:52 pm
Re: Help with configuring mame buttons..
« Reply #4 on: March 10, 2010, 11:51:41 am »
I set both middle buttons of the SF portion as the middle button for MK games.

1 2 3
4 2 5

shateredsoul

  • Trade Count: (+4)
  • Full Member
  • ***
  • Offline Offline
  • Posts: 1412
  • Last login:January 25, 2013, 08:23:51 pm
Re: Help with configuring mame buttons..
« Reply #5 on: March 10, 2010, 12:01:59 pm »
So this is my configuration so far.. does this make sense? *** I forgot to mention that p3 and p4 are mapped on to xbox 360 controllers**

this is what I'm going to reconfigure the ipac to match

    1  2  3  

mouse0, mouse 1, T

O  4  5  6 <--- where O is the extra button that will only be used for neo geo (note this numbering does not match mame, I just used it to help me
z, U, Y, X,   

player 2

1  2  3

a  s  d

O 4  5  6

q  w  e  r

start 1 = 1
coind 1 = 5
start 2 = 2
coin 2 = 6

escape = esc

1up - q
1down-i
1left-o
1right-p

2up-j
2down-k
2left-L
2right-p

B = Pause

*just added* "G"= genre (hyperspin); "M" = Favorites (for hyperspin and maxmius, will have to edit these)

I chose the letter randomly, but I tried to avoid control, alt, and shift buttons


I have attached the mame.cfg, could someone check over it? Also will these keys work for a ipac? I think so far it looks like it'll be fine and that I haven't overlapped any buttons. this is suppose to be the default configuration), also how can I put in the left,up,right, and down arrow? I accidently mapped it to the config up down left and right to the joystick.

 <!-- X-Arcade Version 1.0 input configuration file -->

          <input>
             <remap origcode="KEYCODE_UP" newcode="KEYCODE_Y" />
             <remap origcode="KEYCODE_DOWN" newcode="KEYCODE_I" />
             <remap origcode="KEYCODE_LEFT" newcode="KEYCODE_O" />
             <remap origcode="KEYCODE_RIGHT" newcode="KEYCODE_P" />

             <port type="UI_UP">
                <newseq type="standard">KEYCODE_Q</newseq>
             </port>
             <port type="UI_DOWN">
                <newseq type="standard">KEYCODE_I</newseq>
             </port>
             <port type="UI_LEFT">
                <newseq type="standard">KEYCODE_O</newseq>
             </port>
             <port type="UI_RIGHT">
                <newseq type="standard">KEYCODE_P</newseq>
             </port>
             <port type="UI_SELECT">
                <newseq type="standard">KEYCODE_ENTER OR KEYCODE_LCONTROL</newseq>
             </port>

             <port type="UI_CONFIGURE">
                <newseq type="standard">KEYCODE_TAB</newseq>
             </port>
             <port type="UI_CANCEL">
                <newseq type="standard">KEYCODE_ESC</newseq>
             </port>

             <port type="START1">
                <newseq type="standard">KEYCODE_1</newseq>
             </port>
             <port type="START2">
                <newseq type="standard">KEYCODE_2</newseq>
             </port>
             <port type="COIN1">
                <newseq type="standard">KEYCODE_5</newseq>
             </port>
             <port type="COIN2">
                <newseq type="standard">KEYCODE_6</newseq>
             </port>
             <port type="COIN3">
                <newseq type="standard">JOYCODE_1_BUTTON7</newseq>        
             </port>        
             <port type="COIN4">
                <newseq type="standard">JOYCODE_2_BUTTON7</newseq>        
             </port>
             <port type="START3">
                <newseq type="standard">JOYCODE_1_BUTTON8</newseq>
             </port>
             <port type="START4">
                <newseq type="standard">JOYCODE_2_BUTTON8</newseq>
             </port>

             <port type="P1_JOYSTICK_UP">
                <newseq type="standard">KEYCODE_Q</newseq>
             </port>
             <port type="P1_JOYSTICK_DOWN">
                <newseq type="standard">KEYCODE_I</newseq>
             </port>
             <port type="P1_JOYSTICK_LEFT">
                <newseq type="standard">KEYCODE_O</newseq>
             </port>
             <port type="P1_JOYSTICK_RIGHT">
                <newseq type="standard">KEYCODE_P</newseq>
             </port>
             <port type="P2_JOYSTICK_UP">
                <newseq type="standard">KEYCODE_J</newseq>
             </port>
             <port type="P2_JOYSTICK_DOWN">
                <newseq type="standard">KEYCODE_K</newseq>
             </port>
             <port type="P2_JOYSTICK_LEFT">
                <newseq type="standard">KEYCODE_L</newseq>
             </port>
             <port type="P2_JOYSTICK_RIGHT">
                <newseq type="standard">KEYCODE_P</newseq>
                              </port>
             <port type="P3_JOYSTICK_UP">
                <newseq type="standard">JOYCODE_1_YAXIS_UP_SWITCH OR JOYCODE_1_HATSWITCHU</newseq>
             </port>
             <port type="P3_JOYSTICK_DOWN">
                <newseq type="standard">JOYCODE_1_YAXIS_DOWN_SWITCH OR JOYCODE_1_HATSWITCHD</newseq>
             </port>
             <port type="P3_JOYSTICK_LEFT">
                <newseq type="standard">JOYCODE_1_XAXIS_LEFT_SWITCH OR JOYCODE_1_HATSWITCHL</newseq>
             </port>
             <port type="P3_JOYSTICK_RIGHT">
                <newseq type="standard">JOYCODE_1_XAXIS_RIGHT_SWITCH OR JOYCODE_1_HATSWITCHR</newseq>        
             </port>        
             <port type="P4_JOYSTICK_UP">
                <newseq type="standard">JOYCODE_2_YAXIS_UP_SWITCH OR JOYCODE_2_HATSWITCHU</newseq>
             </port>
             <port type="P4_JOYSTICK_DOWN">
                <newseq type="standard">JOYCODE_2_YAXIS_DOWN_SWITCH OR JOYCODE_2_HATSWITCHD</newseq>
             </port>
             <port type="P4_JOYSTICK_LEFT">
                <newseq type="standard">JOYCODE_2_XAXIS_LEFT_SWITCH OR JOYCODE_2_HATSWITCHL</newseq>
             </port>
             <port type="P4_JOYSTICK_RIGHT">
                <newseq type="standard">JOYCODE_2_XAXIS_RIGHT_SWITCH OR JOYCODE_2_HATSWITCHR</newseq>
             </port>

             <port type="P1_BUTTON1">
                <newseq type="standard">KEYCODE_LCONTROL OR MOUSECODE_1_BUTTON0</newseq>
             </port>
             <port type="P1_BUTTON2">
                <newseq type="standard">KEYCODE_LALT OR MOUSECODE_1_BUTTON1</newseq>
             </port>
             <port type="P1_BUTTON3">
                <newseq type="standard">KEYCODE_T</newseq>
             </port>
             <port type="P1_BUTTON4">
                <newseq type="standard">KEYCODE_U</newseq>
             </port>
             <port type="P1_BUTTON5">
                <newseq type="standard">KEYCODE_Y</newseq>
             </port>
             <port type="P1_BUTTON6">
                <newseq type="standard">KEYCODE_X</newseq>
             </port>
             <port type="P2_BUTTON1">
                <newseq type="standard">KEYCODE_A</newseq>
             </port>
             <port type="P2_BUTTON2">
                <newseq type="standard">KEYCODE_S</newseq>
             </port>
             <port type="P2_BUTTON3">
                <newseq type="standard">KEYCODE_D</newseq>
             </port>
             <port type="P2_BUTTON4">
                <newseq type="standard">KEYCODE_W</newseq>
             </port>
             <port type="P2_BUTTON5">
                <newseq type="standard">KEYCODE_E</newseq>
             </port>
             <port type="P2_BUTTON6">
                <newseq type="standard">KEYCODE_R</newseq>
             </port>
             <port type="P3_BUTTON1">
                <newseq type="standard">JOYCODE_1_BUTTON3</newseq>
             </port>
             <port type="P3_BUTTON2">
                <newseq type="standard">JOYCODE_1_BUTTON4</newseq>
             </port>
             <port type="P3_BUTTON3">
                <newseq type="standard">JOYCODE_1_BUTTON1</newseq>
             </port>
             <port type="P3_BUTTON4">
                <newseq type="standard">JOYCODE_1_BUTTON2</newseq>
             </port>
             <port type="P4_BUTTON1">
                <newseq type="standard">JOYCODE_2_BUTTON3</newseq>
             </port>
             <port type="P4_BUTTON2">
                <newseq type="standard">JOYCODE_2_BUTTON4</newseq>
             </port>
             <port type="P4_BUTTON3">
                <newseq type="standard">JOYCODE_2_BUTTON1</newseq>
             </port>
             <port type="P4_BUTTON4">
                <newseq type="standard">JOYCODE_2_BUTTON2</newseq>
             </port>
             </input>
       </system>


« Last Edit: March 10, 2010, 12:20:50 pm by shateredsoul »

shateredsoul

  • Trade Count: (+4)
  • Full Member
  • ***
  • Offline Offline
  • Posts: 1412
  • Last login:January 25, 2013, 08:23:51 pm
Re: Help with configuring mame buttons..
« Reply #6 on: March 10, 2010, 12:04:45 pm »
and this is the configuration neogeo games first then for cps1, 2 and 3 games (I have it set up so you can also use the xbox 360 controllers as player 1 and 2 for these games.. there's no 4 player neo geo or cps games right?.. wait.. neo geo may have a few)

       <system name="neogeo">
          <input>
             <port type="P1_BUTTON1">
                <newseq type="standard">KEYCODE_Z         OR JOYCODE_1_BUTTON1</newseq>
             </port>
             <port type="P1_BUTTON2">
                <newseq type="standard">KEYCODE_U      OR JOYCODE_1_BUTTON2</newseq>
             </port>
             <port type="P1_BUTTON3">
                <newseq type="standard">KEYCODE_Y         OR JOYCODE_1_BUTTON3</newseq>
             </port>
             <port type="P1_BUTTON4">
                <newseq type="standard">KEYCODE_X          OR JOYCODE_1_BUTTON4</newseq>
             </port>
             <port type="P1_BUTTON5">
                <newseq type="standard">NONE</newseq>
             </port>
             <port type="P1_BUTTON6">
                <newseq type="standard">NONE</newseq>
             </port>
             <port type="P1_BUTTON7">
                <newseq type="standard">NONE</newseq>
             </port>
             <port type="P1_BUTTON8">
                <newseq type="standard">NONE</newseq>
             </port>
             <port type="P2_BUTTON1">
                <newseq type="standard">KEYCODE_Q OR JOYCODE_2_BUTTON1</newseq>
             </port>
             <port type="P2_BUTTON2">
                <newseq type="standard">KEYCODE_W          OR JOYCODE_2_BUTTON2</newseq>
             </port>
             <port type="P2_BUTTON3">
                <newseq type="standard">KEYCODE_E          OR JOYCODE_2_BUTTON3</newseq>
             </port>
             <port type="P2_BUTTON4">
                <newseq type="standard">KEYCODE_R  OR JOYCODE_2_BUTTON4</newseq>
             </port>
             <port type="P2_BUTTON5">
                <newseq type="standard">NONE</newseq>
             </port>
             <port type="P2_BUTTON6">
                <newseq type="standard">NONE</newseq>
             </port>
             <port type="P2_BUTTON7">
                <newseq type="standard">NONE</newseq>
             </port>
             <port type="P2_BUTTON8">
                <newseq type="standard">NONE</newseq>
             </port>
          </input>
       </system>

<system name="cps3.c">
          <input>
             <port type="P1_BUTTON1">
                <newseq type="standard">JOYCODE_1_BUTTON3 OR MOUSECODE_1_BUTTON0</newseq>
             </port>
             <port type="P1_BUTTON2">
                <newseq type="standard">JOYCODE_1_BUTTON4 OR MOUSECODE_1_BUTTON1</newseq>
             </port>
             <port type="P1_BUTTON3">
                <newseq type="standard">JOYCODE_1_BUTTON6 OR KEYCODE_T</newseq>
             </port>
             <port type="P1_BUTTON4">
                <newseq type="standard">JOYCODE_1_BUTTON1 OR KEYCODE_U</newseq>
             </port>
             <port type="P1_BUTTON5">
                <newseq type="standard">JOYCODE_1_BUTTON2 OR KEYCODE_Y</newseq>
             </port>
             <port type="P1_BUTTON6">
                <newseq type="standard">JOYCODE_1_BUTTON5 OR KEYCODE_X</newseq>
             </port>
             <port type="P1_BUTTON7">
                <newseq type="standard">NONE</newseq>
             </port>
             <port type="P1_BUTTON8">
                <newseq type="standard">NONE</newseq>
             </port>
             <port type="P2_BUTTON1">
                <newseq type="standard">JOYCODE_2_BUTTON3OR KEYCODE_A</newseq>
             </port>
             <port type="P2_BUTTON2">
                <newseq type="standard">JOYCODE_2_BUTTON4 OR KEYCODE_S</newseq>
             </port>
             <port type="P2_BUTTON3">
                <newseq type="standard">JOYCODE_2_BUTTON6 OR KEYCODE_D</newseq>
             </port>
             <port type="P2_BUTTON4">
                <newseq type="standard">JOYCODE_2_BUTTON1 OR KEYCODE_W</newseq>
             </port>
             <port type="P2_BUTTON5">
                <newseq type="standard">JOYCODE_2_BUTTON2 OR KEYCODE_E</newseq>
             </port>
             <port type="P2_BUTTON6">
                <newseq type="standard">JOYCODE_2_BUTTON5 OR KEYCODE_R</newseq>
             </port>
             <port type="P2_BUTTON7">
                <newseq type="standard">NONE</newseq>
             </port>
             <port type="P2_BUTTON8">
                <newseq type="standard">NONE</newseq>
             </port>
          </input>
       </system>

massive88

  • Trade Count: (+2)
  • Full Member
  • ***
  • Offline Offline
  • Posts: 938
  • Last login:February 26, 2024, 02:21:01 pm
Re: Help with configuring mame buttons..
« Reply #7 on: March 10, 2010, 01:53:01 pm »
Best answer to this, is usually covered by u_rebelscum.

Heres his response when I asked - http://forum.arcadecontrols.com/index.php?topic=78362.msg817195#msg817195

shateredsoul

  • Trade Count: (+4)
  • Full Member
  • ***
  • Offline Offline
  • Posts: 1412
  • Last login:January 25, 2013, 08:23:51 pm
Re: Help with configuring mame buttons..
« Reply #8 on: March 10, 2010, 04:56:38 pm »
so i'm doing it right then?

massive88

  • Trade Count: (+2)
  • Full Member
  • ***
  • Offline Offline
  • Posts: 938
  • Last login:February 26, 2024, 02:21:01 pm
Re: Help with configuring mame buttons..
« Reply #9 on: March 10, 2010, 05:56:36 pm »
so i'm doing it right then?

I didnt read all through your code, but it looks like it!    :cheers:

shateredsoul

  • Trade Count: (+4)
  • Full Member
  • ***
  • Offline Offline
  • Posts: 1412
  • Last login:January 25, 2013, 08:23:51 pm
Re: Help with configuring mame buttons..
« Reply #10 on: March 10, 2010, 06:46:34 pm »
Thanks!