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: lightgun buttons not working in mame  (Read 3293 times)

0 Members and 1 Guest are viewing this topic.

severdhed

  • Trade Count: (0)
  • Full Member
  • ***
  • Offline Offline
  • Posts: 2975
  • Last login:December 14, 2024, 05:01:52 pm
  • RIP Dinosaur Hippo
lightgun buttons not working in mame
« on: September 30, 2010, 11:41:06 pm »
hey guys, since my showcase mame setup is using a CRT TV over component video as a display, it seemed like a no brainer to try to get my guncon2 guns working.  i have the official namco gun, so i installed wingun (from what i read, it is the only one that works with the namco branded guns).  i got the gun to move the mouse in windows and i can right and left click.  i set my mame.ini up so that lightgun =1 and i get the gun to move the crosshairs around.  however i can't seem to get it to recognize the buttons on the gun.  i have to press p1button1 to shoot.  i tried hitting tab and going to the control settings for that specific game (tried a few to make sure it wasn't something wrong with the game) for this example, lets use police trainer.  anyway, when i go to button1 and hit enter to define it, when i press the trigger, it doesnt recognize it.  i tried both pointing at the screen and away.  the screen flashes when i pull the trigger, but i cant use it to shoot, nor can i use any of the other buttons in the game.

how to i get this working?

i am using mame .124 on windows xp if that makes a difference.

thanks

Current Projects:      Zak-Man | TMNT Pedestal | SNES Pi | N64 Odroid
Former Projects:     4 Player Showcase | Donkey Kong | iCade

JustMichael

  • Trade Count: (+1)
  • Full Member
  • ***
  • Offline Offline
  • Posts: 1438
  • Last login:September 27, 2015, 01:19:40 am
  • Mmmmm!! Cheesecake!!
Re: lightgun buttons not working in mame
« Reply #1 on: September 30, 2010, 11:52:08 pm »
First off I do not have guncon2 guns so if I get something wrong I apologize.  You said in windows you can left click and right click so I am guessing that you are doing this with the gun buttons?  If this is the case is mouse set to 1 in the Mame.ini?

severdhed

  • Trade Count: (0)
  • Full Member
  • ***
  • Offline Offline
  • Posts: 2975
  • Last login:December 14, 2024, 05:01:52 pm
  • RIP Dinosaur Hippo
Re: lightgun buttons not working in mame
« Reply #2 on: September 30, 2010, 11:59:03 pm »
yeah, i can click around windows using the gun buttons, just not in mame.  here is my mame.ini file:


<UNADORNED0>             

#
# CORE CONFIGURATION OPTIONS
#
readconfig              1

#
# CORE SEARCH PATH OPTIONS
#
rompath                 roms
samplepath              samples
artpath                   artwork
ctrlrpath                 ctrlr
inipath                 ini
fontpath                  .

#
# CORE OUTPUT DIRECTORY OPTIONS
#
cfg_directory           cfg
nvram_directory         nvram
memcard_directory       memcard
input_directory         inp
state_directory         sta
snapshot_directory      snap
diff_directory          diff
comment_directory         comments

#
# CORE FILENAME OPTIONS
#
cheat_file              cheat.dat
hiscore_directory       hi

#
# CORE STATE/PLAYBACK OPTIONS
#
state                     
autosave                  0
playback                 
record                   
mngwrite                 
wavwrite                 

#
# CORE PERFORMANCE OPTIONS
#
autoframeskip           0
frameskip               0
seconds_to_run            0
throttle                1
sleep                   1
speed                     1.0
refreshspeed              0

#
# CORE ROTATION OPTIONS
#
rotate                    1
ror                     0
rol                     0
autoror                 0
autorol                 0
flipx                   0
flipy                   0

#
# CORE ARTWORK OPTIONS
#
artwork_crop            1
use_backdrops           1
use_overlays            1
use_bezels              0

#
# CORE SCREEN OPTIONS
#
brightness              1.00
contrast                  1.0
gamma                   1.00
pause_brightness        0.65

#
# CORE VECTOR OPTIONS
#
antialias               1
beam                    1.00
flicker                 0.00

#
# CORE SOUND OPTIONS
#
sound                   1
samplerate              48000
samples                 1
volume                  0

#
# CORE INPUT OPTIONS
#
# ctrlr                 <NULL> (not set)
mouse                   1
joystick                1
lightgun                1
multikeyboard             0
multimouse                1
steadykey               0
offscreen_reload        1
joystick_map              auto
joystick_deadzone         0.3
joystick_saturation       0.85

#
# CORE INPUT AUTOMATIC ENABLE OPTIONS
#
paddle_device           mouse
adstick_device          joystick
pedal_device            joystick
dial_device             mouse
trackball_device        mouse
lightgun_device         lightgun
positional_device         keyboard
mouse_device              mouse

#
# CORE DEBUGGING OPTIONS
#
log                     0
verbose                 0
update_in_pause           0

#
# CORE MISC OPTIONS
#
bios                      default
cheat                   1
skip_gameinfo           0

#
# WINDOWS DEBUGGING OPTIONS
#
oslog                   0

#
# WINDOWS PERFORMANCE OPTIONS
#
priority                  0
multithreading            0

#
# WINDOWS VIDEO OPTIONS
#
video                     d3d
numscreens                1
window                  0
maximize                1
keepaspect              1
prescale                  1
effect                  none
waitvsync               0
syncrefresh             0

#
# DIRECTDRAW-SPECIFIC OPTIONS
#
hwstretch               1

#
# DIRECT3D-SPECIFIC OPTIONS
#
d3dversion                9
filter                    1

#
# PER-WINDOW VIDEO OPTIONS
#
screen                    auto
aspect                    auto
resolution              640x432
view                      auto
screen0                   auto
aspect0                   auto
resolution0               auto
view0                     auto
screen1                   auto
aspect1                   auto
resolution1               auto
view1                     auto
screen2                   auto
aspect2                   auto
resolution2               auto
view2                     auto
screen3                   auto
aspect3                   auto
resolution3               auto
view3                     auto

#
# FULL SCREEN OPTIONS
#
triplebuffer            1
switchres               1
full_screen_brightness  1.00
full_screen_contrast      1.0
full_screen_gamma         1.0

#
# WINDOWS SOUND OPTIONS
#
audio_latency           2

#
# INPUT DEVICE OPTIONS
#
dual_lightgun           0
Current Projects:      Zak-Man | TMNT Pedestal | SNES Pi | N64 Odroid
Former Projects:     4 Player Showcase | Donkey Kong | iCade

Marsupial

  • Trade Count: (0)
  • Full Member
  • ***
  • Offline Offline
  • Posts: 511
  • Last login:April 17, 2024, 09:00:56 pm
  • I am teh Mars!
Re: lightgun buttons not working in mame
« Reply #3 on: October 01, 2010, 12:16:58 am »
if it is anything like my act labs gun, you need to enable mouse AND gun in MAME. Then you need to calibrate. then it should work.

I suggest using the "2nd button offscreen reload" as more games needs that than a 2nd button.
-Mars

bkenobi

  • Trade Count: (+1)
  • Full Member
  • ***
  • Offline Offline
  • Posts: 1668
  • Last login:August 16, 2021, 10:41:52 pm
Re: lightgun buttons not working in mame
« Reply #4 on: October 01, 2010, 02:13:40 am »
Make sure you set up the buttons correctly in the Wingun driver.  If I remember correctly, if you don't set them up to output certain buttons to certain mouse buttons, MAME won't recognize the button presses.