The NEW Build Your Own Arcade Controls

Main => Software Forum => Topic started by: WindyM on January 31, 2005, 03:58:49 pm

Title: Controller Selection when Launching from MAMEWah
Post by: WindyM on January 31, 2005, 03:58:49 pm
I have a collection of MAME games. By default they all use arrow keys/ 4/8 way digital joystick. I have the excellent MAMEWah running which enables me to select and run the games, but it also displays the desired controller such as or 270 degree wheel, analogue joystick, lightgun, 4 or 8 way joystick before the game launches.

Is there a way to use the information displayed to automatically select my USB wheel for games requiring a 270 degree wheel, my USB analogue joystick for games which require one, Act Labs lightgun for lightgun games etc. At present I go into MAME32 and select the parameters in 'right click/controller/properties' on a per game basic, I believe this creates the game.ini file, which command line mame/mamewah then also uses. With a large collection of games this takes an age on a per game basis

What is the best approach used by others (or have I missed something)

Title: Re: Controller Selection when Launching from MAMEWah
Post by: Minwah on January 31, 2005, 04:54:53 pm
Globally enabling mouse & joystick would enable those all the time (that is a quick & dirty way to do it).

Note this has nothing to do with MAMEWAH itself, so do it in MAME.  In MAME32 there should be an 'Input (General)' type option somewhere, or in commandline MAME you need to edit mame.ini.  See www.mameworld.net/easyemu for more detailed info.
Title: Re: Controller Selection when Launching from MAMEWah
Post by: WindyM on February 03, 2005, 04:08:30 am
Thanks. This is a major step forward. I used MAME -cc to create a default mame ini file, and changed the input device parameters to 1 to globally enable.

### Input device options ###
mouse                   1
joystick                1
lightgun                1
dual_lightgun           0
offscreen_reload        0
steadykey               0
keyboard_leds           1
led_mode                ps/2
a2d_deadzone            0.300000
# ctrlr                 <NULL> (not set)
paddle_device           keyboard
adstick_device          keyboard
pedal_device            keyboard
dial_device             keyboard
trackball_device        keyboard
lightgun_device         keyboard
digital                 none

How does mame determine which joystick to use as the value is only set to true.  - I have several analogue controllers, a wheel, PS2 joystick 1 & 2, and will get a traditional analogue joystick. How can I ensure that the tradional joystick will be selected by mame and used for general analogue games, but the steering wheel will be used for racing type games, and the PS2 sticks not used at all by mame.

Is this what section starting 'paddle_device           keyboard' is for. If so how do I identify the device name to specifiy

Thanks
Title: Re: Controller Selection when Launching from MAMEWah
Post by: Minwah on February 03, 2005, 05:09:30 am
So, ideally your analog stick will be used for analog stick (adstick) games, and your wheel (I'm assuming it's pot-based) for driving games (these will be a mixture of adstick and paddle games).  Here's what you can do:

paddle_device joystick
adstick_device joystick

This will enable all joystick input for all paddle & adstick games.

Next you'll need to tell MAME which controller to use by mapping the controls either in the Tab menu or ctrlr file.  The best way to do this is probably on a per-game basis, but for ease you could probably just map the controls globally so that either analog stick or wheel works for all adstick/paddle games.  The downside is that eg if someone moves the stick while you are using the wheel it will interfere...

BTW I see you're not using a ctrlr file - there is a new tutorial on this at www.mameworld.net/easyemu .  Ctrlr files are *very* handy (if a bit of a pain to create) ;)