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: setting config for a single game  (Read 1711 times)

0 Members and 1 Guest are viewing this topic.

RickDIII

  • Trade Count: (0)
  • Full Member
  • ***
  • Offline Offline
  • Posts: 147
  • Last login:June 03, 2007, 10:18:28 pm
  • Finished 1st Cab!
setting config for a single game
« on: June 24, 2006, 12:00:26 am »
Ok, I've searched and read and I'm still confused about this topic.  I want to run pacman, etc. on the 4 way stick I have installed.

I have it mapped as the p3 joy.  I've gone into the cfg directory and changed the pacman.cfg to look like below:

<port type="P3_JOYSTICK_UP" mask="1" defvalue="1" value="1">
</port>
<port type="P3_JOYSTICK_LEFT" mask="2" defvalue="2" value="2">
</port>
<port type="P3_JOYSTICK_RIGHT" mask="4" defvalue="4" value="4">
</port>
<port type="P3_JOYSTICK_DOWN" mask="8" defvalue="8" value="8">
</port>

All the "P3_..." originally said "P1_..."

Shouldn't this tell mame to use the joystick set with those key codes (I,J,L,K respectively)?  I'm sure this a question that has been answered but I haven't found exactly what I'm looking for...

Suggestions?

Thanks,
Rick

u_rebelscum

  • Trade Count: (0)
  • Full Member
  • ***
  • Offline Offline
  • Posts: 3633
  • Last login:April 21, 2010, 03:06:26 pm
  • You rebel scum
    • Mame:Analog+
Re: setting config for a single game
« Reply #1 on: June 24, 2006, 06:00:50 am »
You almost got it, but a little backwards.  The part you changed is telling mame what player in the game.  So your change told mame about the game's player 3 inputs.  But your clip didn't give a new input even for player3.

If you have your 4-way wired to mame's default player 3 keyboard buttons like it sounds:

<port type="P1_JOYSTICK_UP" mask="1" index="1" defvalue="1">
    <newseq type="standard">
        KEYCODE_UP OR KEYCODE_I
    </newseq>
</port>

You want to change the bold part (or add it with the lines above and below if not existing yet).  The above tells mame that for pacman's player 1 input for the game's up dirrection, use either the up key or the I key.  You can put it to whatever you want; I gave the above example to show the OR, but you might just want KEYCODE_I.

Or you can start the game, tab, input (this game), up/down with player 1 stick to the input you want to change, enter, then move the 4-way stick in that direction.  Repeat for each direction.

Things get a little confusing with all the different things "joystick 3" can mean.  There's the original game's joystick 3, the default keys mapped to that game's joystick 3, windows third joystick installed, and in your case the encoder's "joystick 3".  Add that mame can map any input to (basically) any key, and most keybaord encoders can be programmed to send different than default values for each port.  Usually they all line up, but when you want to use the joystick second from the left on the control panel (that 4-way stick) that's wired to the encoder's joy3 to player 1's inputs... ;)

Even the second method I gave is a simplification that works with the default settings, but since they can be changed it doesn't always work.
Robin
Knowledge is Power

RickDIII

  • Trade Count: (0)
  • Full Member
  • ***
  • Offline Offline
  • Posts: 147
  • Last login:June 03, 2007, 10:18:28 pm
  • Finished 1st Cab!
Re: setting config for a single game
« Reply #2 on: June 24, 2006, 08:18:37 am »
u_rebelscum,

PERFECT!   :applaud: Thanks for the answer.  The 4way is up and running!

Thanks!
Rick

miles2912

  • Trade Count: (0)
  • Full Member
  • ***
  • Offline Offline
  • Posts: 706
  • Last login:October 31, 2019, 05:30:24 pm
  • My first Home Game. Fairchild System F.
Re: setting config for a single game
« Reply #3 on: June 24, 2006, 12:29:23 pm »
Wouldn't hitting tab and setting the mapping for 'this game only' be easier?

D-
  Scratch built upright MAME Cab

horseboy

  • Only Saint has those powers.
  • Trade Count: (0)
  • Full Member
  • ***
  • Offline Offline
  • Posts: 1562
  • Last login:March 07, 2021, 02:19:14 pm
  • With my last breath, I curse Zoidberg!
Re: setting config for a single game
« Reply #4 on: June 24, 2006, 01:37:53 pm »
Wouldn't hitting tab and setting the mapping for 'this game only' be easier?

D-

Agreed.


Quote from: saint
saint is all powerful.

Apparently he is.

RickDIII

  • Trade Count: (0)
  • Full Member
  • ***
  • Offline Offline
  • Posts: 147
  • Last login:June 03, 2007, 10:18:28 pm
  • Finished 1st Cab!
Re: setting config for a single game
« Reply #5 on: June 24, 2006, 02:42:08 pm »
Wouldn't hitting tab and setting the mapping for 'this game only' be easier?

D-

Agreed.

I'm all about things being easier.  Can you explain this?   I'm not familiar with it...

Thanks,
Rick

horseboy

  • Only Saint has those powers.
  • Trade Count: (0)
  • Full Member
  • ***
  • Offline Offline
  • Posts: 1562
  • Last login:March 07, 2021, 02:19:14 pm
  • With my last breath, I curse Zoidberg!
Re: setting config for a single game
« Reply #6 on: June 24, 2006, 04:17:46 pm »
You just enter a game and hit tab. A menu pops up showing you what buttons to what. You can scroll to a specific function (i.e. button 1) and then push whatever button you want to control that function. Super easy, but I am not sure if it just a Mame32 thing or not.


Quote from: saint
saint is all powerful.

Apparently he is.

mahuti

  • Wiki Master
  • Trade Count: (0)
  • Full Member
  • *****
  • Offline Offline
  • Posts: 2757
  • Last login:September 18, 2024, 01:16:22 pm
  • I dare anything! I am Skeletor!
Re: setting config for a single game
« Reply #7 on: June 24, 2006, 11:08:38 pm »
all versions of mame work like this.
Raspberry Pi, AttractMode, and Skeletor enthusiast.

RickDIII

  • Trade Count: (0)
  • Full Member
  • ***
  • Offline Offline
  • Posts: 147
  • Last login:June 03, 2007, 10:18:28 pm
  • Finished 1st Cab!
Re: setting config for a single game
« Reply #8 on: June 24, 2006, 11:19:38 pm »
You just enter a game and hit tab. A menu pops up showing you what buttons to what. You can scroll to a specific function (i.e. button 1) and then push whatever button you want to control that function. Super easy, but I am not sure if it just a Mame32 thing or not.

I'll give it a try...thanks!  I thought I was going to have to edit all the cfg files by hand!

 :cheers:

u_rebelscum

  • Trade Count: (0)
  • Full Member
  • ***
  • Offline Offline
  • Posts: 3633
  • Last login:April 21, 2010, 03:06:26 pm
  • You rebel scum
    • Mame:Analog+
Re: setting config for a single game
« Reply #9 on: June 25, 2006, 12:33:59 am »
Wouldn't hitting tab and setting the mapping for 'this game only' be easier?

It's easier to start with, and I did mention it in passing on my original post.

But I like messing with the ctrlr file instead of the cfg files, and learning how the cfg files work shows how the ctrlr file works.  Sort like getting under the hood vs looking looking in the manual to see how many horses it's got.  I'll help people interested in hand editting the cfg files with more enthusaism and details than people asking FAQs.  I'm not against people who ask FAQs, but I enjoy answering stuff that I enjoy more than other questions I'm not interested in.  But no, you don't need to hand edit them.

Robin
Knowledge is Power

RickDIII

  • Trade Count: (0)
  • Full Member
  • ***
  • Offline Offline
  • Posts: 147
  • Last login:June 03, 2007, 10:18:28 pm
  • Finished 1st Cab!
Re: setting config for a single game
« Reply #10 on: June 25, 2006, 02:01:10 pm »
It's kinda' like this.  I've been concentrating for a long time on the construction of the machine, and getting the games running, etc. Now that I have finally reached that goal I need to brush up on all the mame shortcuts, mamewah stuff, etc. 

Thanks for all the help!  I'm sure there will be more noob questions later.  Although I always try to figure it out on my own first - sometimes there is so much information it becomes hard to filter.

 :cheers:

Spaz Monkey

  • Trade Count: (+1)
  • Full Member
  • ***
  • Offline Offline
  • Posts: 381
  • Last login:February 15, 2011, 11:33:55 pm
  • Hit me with a chicken quesadilla and a Coke.
Re: setting config for a single game
« Reply #11 on: June 25, 2006, 06:06:26 pm »
Here's a link that talks about the MAME Controler .ini files.  It should help.

http://www.mameworld.net/easyemu/mameguide/mamecontrolini.htm