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: ctrlr.cfg help - neogeo button layout  (Read 2503 times)

0 Members and 1 Guest are viewing this topic.

Dustin Mustangs

  • Trade Count: (0)
  • Full Member
  • ***
  • Offline Offline
  • Posts: 188
  • Last login:September 14, 2017, 11:43:18 am
  • Cut the sheet!
    • My Site
ctrlr.cfg help - neogeo button layout
« on: February 14, 2008, 07:03:56 pm »
I've searched a bit and read the page over at easyemu and still can't get mame to switch to a neogeo style button layout when that type of game starts.  I'm using the seven button cluster so I want p1 button1 - p1 button3 to all bump up one and p1 button4 to become p1 button1.  All of my default button mappings are different from the mame default and when I give the "-ctrlr vidz" command line option (see ctrlr.cfg below) I get all mame default mappings and my default mappings for p1 button1 - p1 button4.  These are obviously the buttons I am trying to change, but they are going to my default, not to my neogeo mappings with my neogeo test game (janshin). 

Why is my ctrlr file effecting the correct button mappings but switching them to the wrong keycodes?

A couple of more related questions...   

To preserve all my default mappings, would I put my <system name="default"> before or after the below <system name="neogeo"> ?

Are there some system names I can use for this same type of change on the 6 button fighting games like the street fighter series??  I have 123 on the bottom which would need to switch to the top and 456 on the bottom.

Mame version:

104u6

My Default Mapping:

fzg
deh

Attempted ctrlr.cfg:

Code: [Select]
<?xml version="1.0"?>
<!-- This file is autogenerated; comments and unknown tags will be stripped -->
<mameconfig version="10">
<system name="neogeo">
        <input>
            <port type="P1_BUTTON1">
                <newseq type="standard">
                    KEYCODE_G
                </newseq>
            </port>
            <port type="P1_BUTTON2">
                <newseq type="standard">
                    KEYCODE_D
                </newseq>
            </port>
            <port type="P1_BUTTON3">
                <newseq type="standard">
                    KEYCODE_E
                </newseq>
            </port>
            <port type="P1_BUTTON4">
                <newseq type="standard">
                    KEYCODE_H
                </newseq>
            </port>
            <port type="P2_BUTTON1">
                <newseq type="standard">
                    KEYCODE_K
                </newseq>
            </port>
            <port type="P2_BUTTON2">
                <newseq type="standard">
                    KEYCODE_A
                </newseq>
            </port>
            <port type="P2_BUTTON3">
                <newseq type="standard">
                    KEYCODE_S
                </newseq>
            </port>
            <port type="P2_BUTTON4">
                <newseq type="standard">
                    KEYCODE_Q
                </newseq>
            </port>
        </input>
    </system>
</mameconfig>

TIA

 :cheers:
« Last Edit: February 14, 2008, 07:08:13 pm by Dustin Mustangs »

Howard_Casto

  • Idiot Police
  • Trade Count: (+1)
  • Full Member
  • ***
  • Offline Offline
  • Posts: 19428
  • Last login:Today at 09:00:39 am
  • Your Post's Soul is MINE!!! .......Again??
    • The Dragon King
Re: ctrlr.cfg help - neogeo button layout
« Reply #1 on: February 15, 2008, 02:25:19 am »
You put it before. 

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: ctrlr.cfg help - neogeo button layout
« Reply #2 on: February 15, 2008, 01:03:13 pm »
...Why is my ctrlr file effecting the correct button mappings but switching them to the wrong keycodes?

...To preserve all my default mappings, would I put my <system name="default"> before or after the below <system name="neogeo"> ?

...Are there some system names I can use for this same type of change on the 6 button fighting games like the street fighter series??

I'm not clear on your CP key layout.  Just for simplicity, I'll pretend the buttons are wired to joysticks 3 & 4 buttons 1 - 6 as follows:

  456
  123
4

So you want:

P1_BUTTON1   joy3 button4
P1_BUTTON2   j3b1
P1_BUTTON3   j3b2
P1_BUTTON4   j3b3
P2_BUTTON1   j4b4
P2_BUTTON2   j4b1
P2_BUTTON3   j4n2
P2_BUTTON4   j4b3

IOW, for the ctrlr file you included to work correctly, your layout should be

  ?x?
  DEH
G

Another thing to look at:
- Is your default you talked about set in the mame input (general) method (IOW, saved in cfg\default.cfg)?  Everything in cfg\default.cfg overrides anything in a ctrlr file, so you need to move what's in cfg\default.cfg into your ctrlr file.  And as Howard mentioned, default needs to come first in the ctrlr file.  Mame just goes straight through the ctrlr file, and asks "does this 'system' apply to this game?", and applies it if it does in the order the system are in the ctrlr file.  So if the system name="default" was last, it would override everything.

As for system names, default, soucrefile name, parent name, and game name are all valid.  The system name="neogeo" is an example of using the sourcefile name.  To find the sourcefile name of a game, "mame -ls gamename" or "mame -listsource gamename", or look at the source files, or mame -listxml, or maws.  Note that this will apply to all games in that driver source file.  So for streetfight games, you have multiple sourcefiles that also have non-6 button layouts.  Depending what games you play in e, it might be easier to copy the 6button flip accross the parent level, or do the 6button on the soucrefile level and remap back the other games to the default on the parent level.

Does this help?
Robin
Knowledge is Power

Dustin Mustangs

  • Trade Count: (0)
  • Full Member
  • ***
  • Offline Offline
  • Posts: 188
  • Last login:September 14, 2017, 11:43:18 am
  • Cut the sheet!
    • My Site
Re: ctrlr.cfg help - neogeo button layout
« Reply #3 on: February 15, 2008, 04:19:27 pm »
Ok, I think this is starting to make sense to me.  You we're right about all your assumptions rebel.  I was previously changing mappings using the tab menu, so I need to get rid of my default.cfg in my cfg folder and add that 'default' info to my ctrlr.cfg file.  This default entry in my ctrlr file needs to come before any of my neogeo type entries which will only need to contain the keycodes that are different from the default (like the code I posted).  Correct?

Do I need to get rid of the game specific cfg's in the cfg folder for this to work??   

Somewhat related, can I still edit my mappings on a per game basis using the tab menu > Input (this game)??

Thanks a ton for the help on this!

 ;D
« Last Edit: February 15, 2008, 04:22:58 pm by Dustin Mustangs »

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: ctrlr.cfg help - neogeo button layout
« Reply #4 on: February 15, 2008, 06:16:03 pm »
I was previously changing mappings using the tab menu, so I need to get rid of my default.cfg in my cfg folder and add that 'default' info to my ctrlr.cfg file.  This default entry in my ctrlr file needs to come before any of my neogeo type entries which will only need to contain the keycodes that are different from the default (like the code I posted).  Correct?

Do I need to get rid of the game specific cfg's in the cfg folder for this to work??   

Somewhat related, can I still edit my mappings on a per game basis using the tab menu > Input (this game)??

All cfg files, default.cfg and game specific, override ctrlr files (one exception*), so yes, you'll have to move the default.cfg data into the ctrlr file if you want to neogeo with ctrlr file.  (Which IMO is way easier than setting 50 game specific cfg files with same mapping.)  OTOH, game specific cfg files override any prior mapping, ctrlr file & default.cfg included, and there's nothing wrong with that.  One of the main reasons the game specific cfg files is to hold non-default mapping, and they are editted through the tab menu > Input (this game).

IMO, the best way to make ctrlr file is through using the default.cfg via tab > Input (general).  The idea is to start with overall default mapping, move the system to ctrlr file, then repeat for the source file level and then parent level (and then maybe game level).  By copying the default.cfg to the ctrlr (and renaming as needed) as you go along makes sure only the differences are in the ctrlr file.  Details:

  • Delete (or backup) all files in the cfg folder
  • Start a game in mame and enter tab menu > Input (general)
  • Make all default input changes
  • Exit mame
  • Move cfg/default.cfg to ctrlr folder.  Rename to whatever you want.
  • Set up mame to use that ctrlr file
  • Start a game in mame and enter tab menu > Input (general)
  • Make any needed input changes for a desired source file grouped set of games (eg: neogeo)
  • Exit mame
  • Move or copy the <system..> ... </system> from the default.cfg file into near the end of the ctrlr file, just before the "</mameconfig>"
  • Rename the system name to the sourcefile driver name in the section you just moved to the ctrlr file.  For example, for the neogeo system, change it to "<system name="neogeo">"
  • Delete the cfg/default.cfg
  • Repeat the last six steps above for each sourcefile set.  Continue putting the changes at the end of the ctrlr file, and naming to the sourcefile set.
  • Repeat for each parent set.  Continue putting the changes at the end of the ctrlr file, and naming to the parent name.
  • (Optional) repeat for specific games, again putting at the end of the ctrlr file and renaming.
  • (Optional) if you didn't ctrlr-ize the specific games and backed up the old cfg game specific cfg files, move the old cfg files back to the cfg folder.

Notes:
- If you don't do in the specific order as above (example, a new sourcefile set comes along you want to add to the ctrlr file), make sre the default system remains first, the sourcefile groups before any parents within that sourcefile group, and all parents before any of its clones.

- You can keep the order a couple ways (or mix and match them as wanted):

As described in instructions above:
Code: [Select]
default
source group AAA
source group BBB
source group CCC
parent AAA111
parent AAA222
parent CCC111
game specific zzz
game specific AAA111xxx
game specific AAA111yyy

or:

Grouped by clones, parents, and sourcefile groups
Code: [Select]
default
game specific zzz
source group AAA
parent AAA111
game specific AAA111xxx
game specific AAA111yyy
parent AAA222
source group BBB
source group CCC
parent CCC111

Tabs are just to graphically show the different levels.  The latter is a little easier to read, as it keeps the clones near the parents, and the parents near the source.  The reason to keep the ctrlr file either way is to make it easier to keep the correct order so all games stay mapped as you want.

- *(the exception noted above) If an input is code mapped to a non-default input in the source code, you must remap the input back to, literally, "default" so the ctrlr file mapping work for that input on that game.  To set it "default", start that game, tab, Input (this game), and go to the input (it will be highlighted to show it's non-default.  Press enter, esc, (wait till mame says None), enter, esc.  When you move off the input, it should not be hightlighted anymore and show as the ctrlr file mapped.  Example, the rotary left & right in Ikari and related games are source coded mapped to non-default inputs.

- Which is better for game specific mapping, ctrlr or cfg files?  IMO, it's a wash.  Cfg files are a little quicker to do, and are pretty good at being cross versions.  Ctrlr files are a set once and forget, are a little better at being cross version compatable, and are not editted each time mame starts.


Hmmm, am I missing anything?   ;D
Robin
Knowledge is Power

Dustin Mustangs

  • Trade Count: (0)
  • Full Member
  • ***
  • Offline Offline
  • Posts: 188
  • Last login:September 14, 2017, 11:43:18 am
  • Cut the sheet!
    • My Site
Re: ctrlr.cfg help - neogeo button layout
« Reply #5 on: February 18, 2008, 09:10:19 am »
Well, I've got it working great now.  Thanks again for all the help rebel.  Now all I need is for the maws site to come back online so I can set this up for a few more systems.

For anyone else trying to get this to work, this thread is loaded with great info that, when combined with the mame ctrlr page over at easyemu, should be everything you need to set this up. 

 :applaud:

 :cheers:






lcddream

  • Trade Count: (+1)
  • Full Member
  • ***
  • Offline Offline
  • Posts: 498
  • Last login:December 04, 2024, 03:59:31 pm
  • Say goodbye to gravity...
Re: ctrlr.cfg help - neogeo button layout
« Reply #6 on: April 06, 2008, 03:50:15 pm »
Is there any way to alter non default mappings for a game on the fly?

For instance I would like to be able to change this:
Quote
         <port type="P1_DIAL" mask="255" defvalue="0" value="0" keydelta="15" centerdelta="15" sensitivity="30" reverse="no">
         </port>
         <port type="P2_DIAL" mask="255" defvalue="0" value="0" keydelta="15" centerdelta="15" sensitivity="30" reverse="yes">
         </port>

to this depending on which ctrlr file is loaded

Quote
         <port type="P1_DIAL" mask="255" defvalue="0" value="0" keydelta="15" centerdelta="15" sensitivity="30" reverse="yes">
         </port>
         <port type="P2_DIAL" mask="255" defvalue="0" value="0" keydelta="15" centerdelta="15" sensitivity="30" reverse="no">
         </port>

When I attempt the instructions above none of my keys or the spinner seems to work. I understand that maybe the reason is I am trying to change non-default settings.

The only other way I could come up with is having a second cfg folder which is specified at the command line. This works however I would then need to keep the two folders synced.

The reason I need to do this is because I am using MaLa with a cocktail table.

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: ctrlr.cfg help - neogeo button layout
« Reply #7 on: April 07, 2008, 07:19:07 pm »
Is there any way to alter non default mappings for a game on the fly?

Short answer: No. :(


Long answer:

Quote
For instance I would like to be able to change this:
Quote
         <port type="P1_DIAL" mask="255" defvalue="0" value="0" keydelta="15" centerdelta="15" sensitivity="30" reverse="no">
         </port>

...When I attempt the instructions above none of my keys or the spinner seems to work. I understand that maybe the reason is I am trying to change non-default settings.

The ctrlr file ignores the glowing info.  So if you're trying to change that in ctrlr file, it's being ignored.  However the keys should be still working AFAIK.

Hmm...testing... Okay, if I cut and paste your edits into my ctrlr, no problem: Keys and mouse work fine (but the reverse don't change, of course).

Unless there's an error somewhere else in the ctrlr file....  :dunno

Quote
The only other way I could come up with is having a second cfg folder which is specified at the command line. This works however I would then need to keep the two folders synced.

The reason I need to do this is because I am using MaLa with a cocktail table.

That's how I think you'll have to do it.  :(
Robin
Knowledge is Power

lcddream

  • Trade Count: (+1)
  • Full Member
  • ***
  • Offline Offline
  • Posts: 498
  • Last login:December 04, 2024, 03:59:31 pm
  • Say goodbye to gravity...
Re: ctrlr.cfg help - neogeo button layout
« Reply #8 on: April 07, 2008, 09:55:15 pm »
:(

o well at least now I know it can't be done that way.