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
Site News

Unread posts | New Replies | Recent posts | Rules | Chatroom | Wiki | File Repository | RSS | Submit news


  

Author Topic: Cannot get GUN#2 recognized in MAME, both guns show up as GUN#1  (Read 2635 times)

0 Members and 1 Guest are viewing this topic.

sevenseal

  • (0)
  • Jr. Member
  • **
  • Offline Offline
  • Posts: 5
  • Tapatalk User
Re: Cannot get GUN#2 recognized in MAME, both guns show up as GUN#1
« Reply #80 on: July 30, 2016, 07:54:26 pm »
i have tried out your compiled of the 175, and it works out great with the dual lightguns...

i tried to apply your diff to 176
does not match what there...
so i tried to add the code manually
could not get it to compiled for 176, too many errors, something seem to be missing code wise

i did a comparsion of the input_rawinput.cpp file you had added with your patch v5 and compared to original input_rawinput.cpp in 175...
the changes dont seem match what is in the input_rawinput.cpp.diff you had made.

so i did a comparsion on 176's input_rawinput.cpp with the your included one... could not make it compile

all i have to say is that your compile seem to work well on 175...
« Last Edit: July 31, 2016, 10:38:23 am by sevenseal »

Sorn

  • (0)
  • Full Member
  • ***
  • Offline Offline
  • Posts: 48
  • I want to build my own arcade controls!
Re: Cannot get GUN#2 recognized in MAME, both guns show up as GUN#1
« Reply #81 on: July 31, 2016, 05:04:39 pm »
Big update today! :)

@argonlefou,

Big thanks to you for your suggestions and help. As you mentioned, my biggest mistake was the use of the GetScreenPos and PointerToScreen functions. This caused a lot of issues. Can you explain quickly the purpose of those?

What I do now, is use the normalize function provided in Mame that is also used in 0171, like this:
Code: [Select]
// update the X/Y positions
lightgun.lX = normalize_absolute_axis(rawinput.data.mouse.lLastX, 0, INPUT_ABSOLUTE_MAX);
lightgun.lY = normalize_absolute_axis(rawinput.data.mouse.lLastY, 0, INPUT_ABSOLUTE_MAX);
         

I didn't have to separate the devices in the different tables. The "process_event" procedure validates if it's a relative or absolute device.

@Sorn,

Can you test this one?

**Very important**, you have to set back the "lightgunprovider" to "auto" in mame.ini (which is best since it's the default)

http://www.filedropper.com/mamearcade64_11

I'm very happy with the result. You'll probably tell me that the pointer in tab menu doesn't follow the crosshair, but I can guarantee you that I'm processing using the real absolute values for the lightgun and relative for mouse. Maybe the UI is using something different, I can't tell. But, for me, the crosshair tracks perfectly the gun.

I also test, 2 mice, 2 lightguns, 1 mouse and 1 lightgun, etc, and it works fine.

Hope you'll get same result.

Thanks for all the testing.

Note this is still based on Mame0175.

Thanks very much all!

Pitou!

CONGRATULATIONS!!!!  :cheers: :notworthy: :applaud: ....You've done it!

" You'll probably tell me that the pointer in tab menu doesn't follow the crosshair" .....

Same thing occurs in 0171. It does not seem to have any effect on the accuracy once in game so who cares ? :)

Testing between v11 and 0171, I can notice NO difference whatsoever. I think any variances at this point are variances that exist within the aimtrak calibration itself, and not from any of your input code!
Really excited that you got it working with the win32 drivers, everything is deadly accurate now. Gun 1/2 shows up as it should, everything is 100% in order.

Would really like to try to compile your source (once you've done 0176) now and get mkchamps no-nag/hiscore working so I can slap this in my setup :)

And lets keep our fingers crossed that your patch will make its way to 0177, that maintainers will keep the input code and that you wont have to do anymore updating! I also responded on the mametesters bug report to confirm that all is well. I think it would probably be best to port it to 0176 to make sure there are no regressions in any code, and they will likely get it merged for 0177!

Out of interest has anyone tried the new mame with dual guns to see if its fixed?
Ime still running .170 for this reason.

I just tested 0176 now, same issue persists. However im sure if you give Pitou a day or so he will port the changes to 0176 and it will be posted here. He can also finally submit his patch through the mametesters bug report I created so we can get his patch added to the official repository!

« Last Edit: July 31, 2016, 05:10:51 pm by Sorn »

Pitou

  • (0)
  • Full Member
  • ***
  • Offline Offline
  • Posts: 89
Re: Cannot get GUN#2 recognized in MAME, both guns show up as GUN#1
« Reply #82 on: July 31, 2016, 09:19:55 pm »
Great news!

Thanks to all for the help. Without you, I don't think I would have make it.

Quote
Same thing occurs in 0171. It does not seem to have any effect on the accuracy once in game so who cares ? :)

Ok I didn't notice. I'm happy to see the behavior is the same. :)

Quote
Really excited that you got it working with the win32 drivers, everything is deadly accurate now. Gun 1/2 shows up as it should, everything is 100% in order.

Actually it's the rawinput API, just to be precise. :)

I'm really glad it works fine as before :)

Now...

Here is an official mame 0.176 64-bit arcade only binary:

http://www.filedropper.com/mamearcade64official

Here is mame 0.176 64-bit arcade only binary with MKChamp patch:

http://www.filedropper.com/mamearcade64mkchamp

Also attached is the patch_v5_0176.zip

Next step is the pull request and merge!

Have fun!

Pitou!
« Last Edit: August 01, 2016, 11:01:33 am by Pitou »

Sorn

  • (0)
  • Full Member
  • ***
  • Offline Offline
  • Posts: 48
  • I want to build my own arcade controls!
Re: Cannot get GUN#2 recognized in MAME, both guns show up as GUN#1
« Reply #83 on: July 31, 2016, 09:49:11 pm »
Great news!

Thanks to all for the help. Without you, I don't think I would have make it.

Quote
Same thing occurs in 0171. It does not seem to have any effect on the accuracy once in game so who cares ? :)

Ok I didn't notice. I'm happy to see the behavior is the same. :)

Quote
Really excited that you got it working with the win32 drivers, everything is deadly accurate now. Gun 1/2 shows up as it should, everything is 100% in order.

Actually it's the rawinput API, just to be precise. :)

I'm really glad it works fine as before :)

Now...

Here is an official mame 0.176 64-bit arcade only binary:

http://www.filedropper.com/mamearcade64official

Here is mame 0.176 64-bit arcade only binary with MKChamp patch:

http://www.filedropper.com/mamearcade64mkchamp

Also attachached is the patch_v5_0176.zip

Next step is the pull request and merge!

Have fun!

Pitou!

YOU'RE THE MAN NOW DOG!

 :cheers:

sevenseal

  • (0)
  • Jr. Member
  • **
  • Offline Offline
  • Posts: 5
  • Tapatalk User
Re: Cannot get GUN#2 recognized in MAME, both guns show up as GUN#1
« Reply #84 on: July 31, 2016, 10:22:58 pm »
Great news!

Thanks to all for the help. Without you, I don't think I would have make it.

Quote
Same thing occurs in 0171. It does not seem to have any effect on the accuracy once in game so who cares ? :)

Ok I didn't notice. I'm happy to see the behavior is the same. :)

Quote
Really excited that you got it working with the win32 drivers, everything is deadly accurate now. Gun 1/2 shows up as it should, everything is 100% in order.

Actually it's the rawinput API, just to be precise. :)

I'm really glad it works fine as before :)

Now...

Here is an official mame 0.176 64-bit arcade only binary:

http://www.filedropper.com/mamearcade64official

Here is mame 0.176 64-bit arcade only binary with MKChamp patch:

http://www.filedropper.com/mamearcade64mkchamp

Also attachached is the patch_v5_0176.zip

Next step is the pull request and merge!

Have fun!

Pitou!

thank you, i will give this a try

Pitou

  • (0)
  • Full Member
  • ***
  • Offline Offline
  • Posts: 89
Re: Cannot get GUN#2 recognized in MAME, both guns show up as GUN#1
« Reply #85 on: August 02, 2016, 12:47:19 am »
Pull request submitted to Mamedev. Let's hope it's gonna make it for 0.177!

Pitou!

justindarc

  • (0)
  • Jr. Member
  • **
  • Offline Offline
  • Posts: 1
  • I want to build my own arcade controls!
Re: Cannot get GUN#2 recognized in MAME, both guns show up as GUN#1
« Reply #86 on: August 02, 2016, 01:30:09 am »
Pull request submitted to Mamedev. Let's hope it's gonna make it for 0.177!

Pitou!

w00t!! Great work Pitou!! Many, many thanks for fixing this \o/

Pitou

  • (0)
  • Full Member
  • ***
  • Offline Offline
  • Posts: 89
Re: Cannot get GUN#2 recognized in MAME, both guns show up as GUN#1
« Reply #87 on: August 02, 2016, 10:54:46 am »
Big thanks to you justindarc for the pull request procedure help.

This was a successful team work effort. Everyone deserve credit! :)

 :cheers:

Pitou!

  
 

Sitemap 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31