Sorn
Posts: 1
Joined: Wed Apr 13, 2016 6:15 pm

GUN#2 seen as GUN#1 in MAME, resulting in duplicate displays

I've exhausted the help provided by Andy at ULTIMARC, who cannot seem to resolve the issue, and it does appear to be MAME related. MAME wont see GUN#2, it just see's both guns as GUN#1, when I point both at the screen both of them produce blue (player 1) crosshairs at the same time.

Im testing on the latest mame, but older versions (I think my main set is .158) produce the same issue.

Here is my verbose output-

C:\Users\Media\Desktop\mame172>mame64.exe ptblank2 -verbose
Video: Monitor 0000000008c74708 = "\\.\DISPLAY1" (primary)
Direct3D: Using Direct3D 9
Physical width 1920, height 1080
Direct3D: Configuring adapter #0 = AMD Radeon HD 5450
Direct3D: Using dynamic textures
Direct3D: YUV format = RGB
Direct3D: Max texture size = 16384x16384
Direct3D: Device created at 1920x1080
Value 1 not supported for option sound - falling back to auto
RawInput: APIs detected
RawInput: APIs detected
DirectInput: Using DirectInput 8
DirectSound: Primary buffer: 48000 Hz, 16 bits, 2 channels
Input: Adding Kbd #0: HID Keyboard Device
Input: Adding Mouse #0: HID-compliant mouse
Input: Adding Mouse #1: HID-compliant mouse
Input: Adding Mouse #2: HID-compliant mouse
Input: Adding Gun #0: Win32 Gun 1
Input: Adding Joy #0: Controller (XBOX 360 For Windows)
Input: Adding Joy #1: Controller (XBOX 360 For Windows)
Input: Adding Joy #2: THT Arcade console 2P USB Player
Input: Adding Joy #3: THT Arcade console 2P USB Player
Input: Adding Joy #4: THT Arcade console 2P USB Player
Input: Adding Joy #5: THT Arcade console 2P USB Player
Input: Adding Joy #6: ATRAK Device #1
Input: Adding Joy #7: ATRAK Device #8

Here are the options I've put in my mame.ini -

coin_lockout 1
ctrlr
mouse 1
joystick 1
lightgun 1
multikeyboard 0
multimouse 1
steadykey 0
ui_active 0
offscreen_reload 1
joystick_map auto
joystick_deadzone 0.3
joystick_saturation 0.85
natural 0
joystick_contradictory 0
coin_impulse 0

paddle_device keyboard
adstick_device keyboard
pedal_device keyboard
dial_device keyboard
trackball_device keyboard
lightgun_device lightgun
positional_device keyboard
mouse_device mouse

global_inputs 0
dual_lightgun 0


And as you can see from the verbose output, my AimTrak devices have been registered with different ID's (#1 and #8) .....so as far as I can figure out they SHOULD be seen as GUN#1 and GUN#2, but MAME does not see GUN#2 . It also see's all 3 mouse devices, which 2 of those are the guns, so it should be able to assign both to GUN1 and GUN2?

Im testing on point blank, a 2 player shooter.


Any help is greatly appreciated, these guns are very expensive and I've had them for a week and cannot get player 2 gun working. Im so excited to play with friends/girfriend but cannot get past this problem
User avatar
Tafoid
Posts: 351
Joined: Thu Nov 06, 2014 12:50 pm
Location: USA
Contact: Website

Re: GUN#2 seen as GUN#1 in MAME, resulting in duplicate displays

Apologies for not replying earlier. This forum isn't truly open to the public yet.
I see you have finally posted your issue to MAMETesters, so it can be explored there.
http://mametesters.org/view.php?id=6185

Tafoid
Pitou
Posts: 4
Joined: Thu Jun 30, 2016 3:52 pm

Re: GUN#2 seen as GUN#1 in MAME, resulting in duplicate displays

Hello,

Here is a patch I did for Mame 0.175 to fix the Gun #2 issue.

Actually, this enable a rawinput provider for lightgun. you can set it to "rawinput" or leave it to "auto" in mame.ini

It might be important to set the differents axis and buttons in the config file as the assignation from the GUI might not give the expected results.

Offscreen reload works as long as it is set to 0 in mame.ini

This was tested partially with the EMS LCD TopGun II on Windows 10.

If someone could try it with the AimTrak lightguns, that would be appreciated.

Please keep in mind that this is my first attempt working on Mame. This could work as a temporary fix. I'll let an official Mame developer do it right.

I'm providing the diff files. You can apply them using patch and compile. Also included are the full files for you to replace.

Here is the path for each:

osd\modules\input\input_rawinput.cpp
osd\modules\lib\osdobj_common.cpp

If needed, I can compile some binaries for you.

Feel free to give any feedback!

Thank you.

Pitou!
Attachments
patch.zip
(15.01 KiB) Downloaded 319 times
Pitou
Posts: 4
Joined: Thu Jun 30, 2016 3:52 pm

Re: GUN#2 seen as GUN#1 in MAME, resulting in duplicate displays

There is a compile error with my first patch. Use this one instead. (patch_v2.zip).

Thing is it was compiling fine with MS Visual Studio, but not with MinGW. I did the correction in patch_v2.zip

Sorry for that.

Pitou!
Attachments
patch_v2.zip
(15.13 KiB) Downloaded 300 times
Pitou
Posts: 4
Joined: Thu Jun 30, 2016 3:52 pm

Re: GUN#2 seen as GUN#1 in MAME, resulting in duplicate displays

Issue should be fixed now. Please refer to bug #6185 Mametesters for details.

Pitou!

Return to “MAME Discussion”