Mame Lightgun Setup

From BYOAC New Wiki
Revision as of 17:26, 26 January 2009 by Urebelscum (talk) (Basic Setup: Some updates.)
Jump to navigation Jump to search

Mame Lightgun Setup - Some Basic Pointers.

A lot of the info on this page has been pulled from Derrick Renauds page on Multiple lightgun setups: http://derrick.mameworld.info/lightgun/Act_Labs_Light_Guns_on_XP.html

Basic Setup

Mame has had its analog input code rewritten in recent times (originally before 0.113, but again before 0.129). This has affected how analog devices including lightguns are configured. Here are some basic pointers. (At the moment this is geared towards Windows XP.)

Mame now treats Lightguns much the same as mice. There are a couple differences between the two though, and different version of mame handle this differently.

Running "mame gamename -verbose" from the command line. tells you what devices MAME finds connected and their numbers.

There are a couple setups that seem to work on different computers, lightgun types, and mame versions:

  • mouse 0, lightgun 1 and dual_lightgun 0. This seems to be one of the top two setups in 0.129.
  • mouse 1, lightgun 1 and dual_lightgun 0. This seems to be one of the top two setups in 0.129.
  • mouse 1, lightgun 0 and dual_lightgun 0. This was the advised setup around 0.113.

NB, If you are using dual lightguns or another another pointing device attached to your system, remember to enable multimouse.

Offscreen Reload

If you are running a game that needs you to shoot off screen, you will still need to use the -offscreen_reload command. This will change the functionality of button 2 to simulate firing off screen, thereby reloading.

NB There may be some issues in some games with offscreen reload. I am not sure that the code currently works with every game.

Running Mame

To use light guns you would use a command similar to this:

mame yourgame -mouse -r 800x600 -refresh 60

yourgame = is the name of the romset you are using

-r 800x600 -refresh 60 = sets the game to use a fixed resolution and refresh. This is so you do not have to constantly re-calibrate your gun.

NB Some guns (e.g. LCD Topgun) are quite resiliant to resolution changes, but it is still probably best to calibrate your guns to one resolution and run all lightgun games in that resolution.

In Game Setup

The test setup shown below is a system with 3 mice and 2 light guns. The mice are Mouse 1, 2 & 3. The light guns are Lightgun 4 & 5. This does not mean that you have 4 or 5 light guns. This is just the mouse position windows assigns them. With light guns, only the X,Y axis data is different then the mouse data, so you will see the buttons reported as mouse 4 & 5 and the X,Y axis are reported as Lightgun 4 & 5. Your mouse and light gun numbers may be different then the numbers show here.


When you are in the game, you will need to select the light gun as a control. Do this by pressing the [TAB] key. You will now see this menu.

Tabbutton1.jpg

Select "Input (this Game)". You will now see a menu similar to this:

Tabbutton2.jpg

Move down so you can select the fire trigger. This is "P1 Button 1". Press enter and it will be ready for input like so:

Tabbutton3.jpg

Press the trigger button on the gun you want to use for player 1. You will now see something similar to this.

Tabbutton4.jpg

It shows "Mouse 4 Button 1" instead of "Lightgun 4 Button 1". This is normal. A light gun is a mouse. Only the X,Y data is different.

Now we need to move on to selecting the light gun axes. Move down to highlight the "Lightgun X Analog". Do not press enter yet.

Tabbutton5.jpg


Before we can proceed we need to position the light gun on the left side of the screen. Point at the position shown here and fire.

Targetleft.jpg

Now press enter to allow selection of the light gun's X axis. We will now move to the right side of the screen and fire at the position shown here.

Targetright.jpg

Try and keep the vertical position close to the same line. You now should have the X-axis selected as shown here:


Tabbutton6.jpg

We will repeat the procedure for the Y-axis. Move down to highlight "Lightgun Y Analog". Do not press enter yet.


Tabbutton7.jpg


Before we can proceed we need to position the light gun on the top half of the screen. Point at the position shown here and fire.

Targettop.jpg


Now press enter to allow selection of the light gun's Y axis. We will now move to the bottom half of the screen and fire at the position shown here.

Targetbottom.jpg

Try and keep the horizontal position close to the same line. You now should have the Y-axis selected.


Tabbutton8.jpg

Repeat the whole procedure for the other players as needed.

You are now ready to play.