Mapping Rawinput Device Numbers to PIDs or Similar, ala MAME

Discuss Supermodel and your favorite Model 3 games. Show off your latest threads, this is the place to see and be seen.
Forum rules
Keep it classy!

  • No ROM requests or links.
  • Do not ask to be a play tester.
  • Do not ask about release dates.
  • No drama!

Mapping Rawinput Device Numbers to PIDs or Similar, ala MAME

Postby ldolse » Sun Apr 18, 2021 2:07 am

I've been playing with Supermodel for the past week or so getting it set up with dual lightguns and raw input. When set up correctly it works really well, so kudos to the dev team. The issue is it's impossible to keep it set up correctly due to the way USB devices are enumerated on Windows.

I can see from the code that Supermodel enumerates the devices in the order Windows returns them, and they get assigned an integer number, and I think that's it. If the enumerated number matches the mouse number in Supermodel.ini then it's great but once the enumeration changes you need to determine the new numbering and update the ini - ~16 different config lines across the three two player games.

MAME works the same way as Supermodel in the vanilla setup, but it has a 'mapdevice' capability to map the device PID to a specific Mouse index (though it's called a guncode in Mame terminology). The MAME docs describe their solution here.

This is a really common problem for Lightgun fans, but I see most of the support requests around this are people trying to find workarounds on other forums, I didn't see anyone chiming in here to ask if this could be implemented by the project maintainers. I'm not a C++ dev, so can't contribute directly, but thanks for the consideration. If it's preferred for someone else to contribute changes I can try to find support elsewhere. I think there is a lot more interest in this in the community at large with the new Sinden Lightguns, but this would help users with IR Lightguns like Aimtraks/Wiimotes too.
ldolse
 
Posts: 1
Joined: Thu Apr 15, 2021 5:37 pm

Re: Mapping Rawinput Device Numbers to PIDs or Similar, ala

Postby Bart » Sat Apr 24, 2021 6:35 pm

Moved to general forum (Dev forum is not appropriate for feature requests). If someone would like to submit a patch for this feature, that would be great.
User avatar
Bart
Site Admin
 
Posts: 3086
Joined: Thu Sep 01, 2011 2:13 pm
Location: Reno, Nevada

Re: Mapping Rawinput Device Numbers to PIDs or Similar, ala

Postby xbrunox » Sun Apr 25, 2021 10:50 am

I don't remember who. But someone on discord already post that have made something similar and use usb idfor set the device... Unfortunally haven't post the code. M
xbrunox
 
Posts: 35
Joined: Wed Nov 29, 2017 12:33 am


Return to The Catwalk

Who is online

Users browsing this forum: No registered users and 1 guest