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: Can I create a Button Configuration for a BIOS?  (Read 1416 times)

0 Members and 1 Guest are viewing this topic.

simplygriff

  • Trade Count: (0)
  • Full Member
  • ***
  • Offline Offline
  • Posts: 400
  • Last login:January 10, 2008, 10:05:05 am
    • simplygriff.com
Can I create a Button Configuration for a BIOS?
« on: June 14, 2004, 10:56:57 am »
I'm wondering if thre is an easy way to create a button configuration for the NEO-GEO BIOS.  I don't really want to reconfigure all the games individually since they all use the same 4 buttons.  ANy ideas?  I'm using Mame for Pentium 0.82, MameWah 0.97 & Win XP.
-G
www.simplygriff.com
art : videogames : transformers : life

Live, but Under Heavy Construction

SirPoonga

  • Puck'em Up
  • Global Moderator
  • Trade Count: (+1)
  • Full Member
  • *****
  • Offline Offline
  • Posts: 8188
  • Last login:July 20, 2025, 03:37:24 pm
  • The Bears Still Suck!
Re:Can I create a Button Configuration for a BIOS?
« Reply #1 on: June 14, 2004, 11:39:20 am »
Yes, use the ctrlr files.

I the \mame\ctrlr folder make a folder (say mycabinet)
then copy the std.ini from the crtrl folder to the mycabinet folder and rename to default.ini.  Adjust that file as needed.  Then make neogeo.ini file with the configuration you need.

To use it ther are two ways
mame -ctrlr mycabinet

or in the mame.ini file

ctrlr_directory         ctrlr
ctrlr                 mycabinet


crtrl files are highly recommended over the tab menu.  fyi, the tab menu overrides the ctrlr files.  Plus if you use the ctrlr files exclusively you will be able to use the controls.dat viewer :)

simplygriff

  • Trade Count: (0)
  • Full Member
  • ***
  • Offline Offline
  • Posts: 400
  • Last login:January 10, 2008, 10:05:05 am
    • simplygriff.com
Re:Can I create a Button Configuration for a BIOS?
« Reply #2 on: June 14, 2004, 01:02:05 pm »
That sounds cool.

So can I change the order of my Buttons with this?
Say my buttons show up in XP as

631
245

Can I use this to reorder them as

123
456

???

This would solve a lot of headaches in configuring a whole slew of games.

And if I'm understanding the file correctly I can use that std.ini file by copying the file like you said and deleting the junk at the top and copying and pasting the buttons in the order I want. ???

www.simplygriff.com
art : videogames : transformers : life

Live, but Under Heavy Construction

SirPoonga

  • Puck'em Up
  • Global Moderator
  • Trade Count: (+1)
  • Full Member
  • *****
  • Offline Offline
  • Posts: 8188
  • Last login:July 20, 2025, 03:37:24 pm
  • The Bears Still Suck!
Re:Can I create a Button Configuration for a BIOS?
« Reply #3 on: June 14, 2004, 02:08:24 pm »
Ok, I will use my setup as an example.

Ok, I am going to use numbers and letter differently.  Letters will be what keypress the button is assocciated to on my cabinet, numbers will be what order I want mame to see the buttons.

My cabinet is 2 players with 6 buttons.  Player 1 has this wiring/IPAC setup for keypresses.

ASD
ZXC

Now, for default I want my button order to be

456
123

So my default.ini looks like this


P1_BUTTON1              "KEYCODE_Z | MOUSECODE_1_BUTTON1"
P1_BUTTON2              "KEYCODE_X | MOUSECODE_1_BUTTON2"
P1_BUTTON3              "KEYCODE_C"
P1_BUTTON4              "KEYCODE_A"
P1_BUTTON5              "KEYCODE_S"
P1_BUTTON6              "KEYCODE_D"


Note, yes I use those buttons as mouse buttons once and awhile, hence the mouse button code.

Now, for neogeo I want this layout

004
123

The 0s mean I don't care what button that is.  My neogeo.ini file looks like this:


P1_BUTTON1              "KEYCODE_Z"
P1_BUTTON2              "KEYCODE_X"
P1_BUTTON3              "KEYCODE_C"
P1_BUTTON4              "KEYCODE_D"



now, what will happen is mame runs throught he ctrlr file heirarchy when loading these files.  It will load the most general file first (the default.ini) and work it's way down the control types, driver, parents, then specific game and over write the more general config with the specific.  So in this case it will load the default.ini and my button config would be

456
123

Then it will load the neogeo.ini which will overwrite my config giving me this

454
123

If I had a mslug.ini file then that mapped th top row to 123 then that would over the contronl config and you'd end up with

123
123

Turn verbose on (in the mame.ini file) and it will show you what ctrlr files it loaded for a particular game.

Howard_Casto

  • Idiot Police
  • Trade Count: (+1)
  • Full Member
  • ***
  • Offline Offline
  • Posts: 19428
  • Last login:Today at 01:14:11 am
  • Your Post's Soul is MINE!!! .......Again??
    • The Dragon King
Re:Can I create a Button Configuration for a BIOS?
« Reply #4 on: June 14, 2004, 02:57:00 pm »
Just something to clarify for future reference.  In answer to your question, technically the answer is no.  Mame doesn't read bios specific files but it does read driver specific files, which are just as good.  :)

simplygriff

  • Trade Count: (0)
  • Full Member
  • ***
  • Offline Offline
  • Posts: 400
  • Last login:January 10, 2008, 10:05:05 am
    • simplygriff.com
Re:Can I create a Button Configuration for a BIOS?
« Reply #5 on: June 14, 2004, 02:59:13 pm »
Wow thanks for the reply.  I know that took a lot of typing.  Thanks!

So to change this
631
245

to

123
456

I should change this
P1_BUTTON1     "KEYCODE_Z | MOUSECODE_1_BUTTON1"
P1_BUTTON2     "KEYCODE_X | MOUSECODE_1_BUTTON2"
etc.

to this

P1_BUTTON1     "JOYCODE_6"  
P1_BUTTON2     "JOYCODE_3"
etc.

This is using Mame's built in Joystick support.  Is this right?  Thanks so much for your help.
www.simplygriff.com
art : videogames : transformers : life

Live, but Under Heavy Construction

SirPoonga

  • Puck'em Up
  • Global Moderator
  • Trade Count: (+1)
  • Full Member
  • *****
  • Offline Offline
  • Posts: 8188
  • Last login:July 20, 2025, 03:37:24 pm
  • The Bears Still Suck!
Re:Can I create a Button Configuration for a BIOS?
« Reply #6 on: June 14, 2004, 03:55:02 pm »
Close, you are on the right track.  the ini file's joycode actually goes like this (fromt he std.ini file

P1_JOYSTICKRIGHT_UP     "KEYCODE_I | JOYCODE_1_BUTTON2"
P1_JOYSTICKRIGHT_DOWN   "KEYCODE_K | JOYCODE_1_BUTTON3"
P1_JOYSTICKRIGHT_LEFT   "KEYCODE_J | JOYCODE_1_BUTTON1"
P1_JOYSTICKRIGHT_RIGHT  "KEYCODE_L | JOYCODE_1_BUTTON4"
P2_BUTTON1              "KEYCODE_A | JOYCODE_2_BUTTON1"
P2_BUTTON2              "KEYCODE_S | JOYCODE_2_BUTTON2"
P2_BUTTON3              "KEYCODE_Q | JOYCODE_2_BUTTON3"
P2_BUTTON4              "KEYCODE_W | JOYCODE_2_BUTTON4"


You have designate which joystick you have connected to your computer :)

Oh yeah, and what HC said.  Though in general the driver is the same name as the bios.
« Last Edit: June 14, 2004, 03:58:09 pm by SirPoonga »

simplygriff

  • Trade Count: (0)
  • Full Member
  • ***
  • Offline Offline
  • Posts: 400
  • Last login:January 10, 2008, 10:05:05 am
    • simplygriff.com
Re:Can I create a Button Configuration for a BIOS?
« Reply #7 on: June 15, 2004, 12:19:51 pm »
Awesome!!!
I will try this out tonight.  You have no idea how much this will help me for configurations.  Thanks so much!
-G
« Last Edit: June 15, 2004, 12:20:34 pm by simplygriff »
www.simplygriff.com
art : videogames : transformers : life

Live, but Under Heavy Construction