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: Stable IDs in MAME .251  (Read 878 times)

0 Members and 1 Guest are viewing this topic.

milhouse

  • Trade Count: (+1)
  • Full Member
  • ***
  • Offline Offline
  • Posts: 177
  • Last login:March 02, 2023, 08:03:32 pm
Stable IDs in MAME .251
« on: February 04, 2023, 05:15:41 pm »
Hi,

I'm having a weird issue with my upgrade from MAME .246 to .251 (technically its GroovyMAME).

I have two Ultra-Sticks on my cab. When running MAME 246 in verbose mode, they showed up as follows:
Code: [Select]
Input: Adding keyboard #0: HID Keyboard Device (device id: \\?\HID#VID_046D&PID_C52B&MI_00#7&326a795d&0&0000#{884b96c3-56ef-11d1-bc8c-00a0c91405dd})
Input: Adding keyboard #1: HID Keyboard Device (device id: \\?\HID#VID_D209&PID_0420&MI_00#7&931efc3&0&0000#{884b96c3-56ef-11d1-bc8c-00a0c91405dd})
....
Input: Adding joystick #0: Ultimarc Ultra-Stik Player 2 (device id: Ultimarc Ultra-Stik Player 2 product_0502d209-0000-0000-0000-504944564944 instance_b5c2d970-fe61-11ea-8005-444553540000)
Input: Adding joystick #1: I-PAC 2 (device id: I-PAC 2 product_0420d209-0000-0000-0000-504944564944 instance_b5c32790-fe61-11ea-8006-444553540000)
Input: Adding joystick #2: Ultimarc Ultra-Stik Player 1 (device id: Ultimarc Ultra-Stik Player 1 product_0501d209-0000-0000-0000-504944564944 instance_ef03c460-fea2-11ea-8001-444553540000)
Input: Adding joystick #3: I-PAC 2 (device id: I-PAC 2 product_0420d209-0000-0000-0000-504944564944 instance_fac41a70-ff6f-11ea-8003-444553540000)

Based on that information, I made a mycontrollers.cfg file in ctrls and added the following:
Code: [Select]
<input>
<mapdevice device="VID_0420&amp;PID_0209" controller="KEYCODE_1" />
<mapdevice device="VID_046D&amp;PID_C52B" controller="KEYCODE_2" />
<mapdevice device="VID_04B4&amp;PID_0201" controller="TRACKBALL_1" />
<mapdevice device="VID_D209&amp;PID_1601" controller="GUNCODE_1" />
<mapdevice device="VID_D209&amp;PID_1602" controller="GUNCODE_2" />
<mapdevice device="ATRAK Device #1" controller="JOYCODE_3" />
<mapdevice device="ATRAK Device #2" controller="JOYCODE_4" />
<mapdevice device="Ultimarc Ultra-Stik Player 1" controller="JOYCODE_1" />
<mapdevice device="Ultimarc Ultra-Stik Player 2" controller="JOYCODE_2" />
<mapdevice device="XInput Player 1" controller="JOYCODE_5" />
<mapdevice device="VID_D209&amp;PID_0420" controller="JOYCODE_6" />
</input>

This worked fine.

After upgrading to .251, however, the Device Ids for the Ultrasticks are different.  Now these are the devices listed:
Code: [Select]
Adding keyboard #1: USB Receiver (Logitech) (device id: \\?\HID#VID_046D&PID_C52B&MI_00#7&326a795d&0&0000#{884b96c3-56ef-11d1-bc8c-00a0c91405dd})
Input: Adding keyboard #2: I-PAC 2 (Ultimarc) (device id: \\?\HID#VID_D209&PID_0420&MI_00#7&931efc3&0&0000#{884b96c3-56ef-11d1-bc8c-00a0c91405dd})
Input: Adding mouse #1: EP2 Interrupt (Ultimar) (device id: \\?\HID#VID_04B4&PID_0201&MI_01#7&25acfb7a&0&0000#{378de44c-56ef-11d1-bc8c-00a0c91405dd})
Input: Adding mouse #2: ATRAK Mouse  (Ultimarc) (device id: \\?\HID#VID_D209&PID_1601&MI_02#7&6f69e7b&0&0000#{378de44c-56ef-11d1-bc8c-00a0c91405dd})
Input: Adding mouse #3: ATRAK Mouse  (Ultimarc) (device id: \\?\HID#VID_D209&PID_1602&MI_02#9&2f312172&0&0000#{378de44c-56ef-11d1-bc8c-00a0c91405dd})
Input: Adding mouse #4: I-PAC 2 (Ultimarc) (device id: \\?\HID#VID_D209&PID_0420&MI_01&Col03#7&512f225&0&0002#{378de44c-56ef-11d1-bc8c-00a0c91405dd})
Input: Adding mouse #5:  (Ultimar) (device id: \\?\HID#VID_04B4&PID_0201&MI_00#7&3ab68af&0&0000#{378de44c-56ef-11d1-bc8c-00a0c91405dd})
Input: Adding mouse #6: Ultimarc Ultra-Stik Player 2 (Ultimarc Ultra-Stik) (device id: \\?\HID#VID_D209&PID_0502&MI_01#9&3840d97d&0&0000#{378de44c-56ef-11d1-bc8c-00a0c91405dd})
Input: Adding mouse #7: Ultimarc Ultra-Stik Player 1 (Ultimarc Ultra-Stik) (device id: \\?\HID#VID_D209&PID_0501&MI_01#7&126ec518&0&0000#{378de44c-56ef-11d1-bc8c-00a0c91405dd})
Input: Adding lightgun #1: EP2 Interrupt (Ultimar) (device id: \\?\HID#VID_04B4&PID_0201&MI_01#7&25acfb7a&0&0000#{378de44c-56ef-11d1-bc8c-00a0c91405dd})
Input: Adding lightgun #2: ATRAK Mouse  (Ultimarc) (device id: \\?\HID#VID_D209&PID_1601&MI_02#7&6f69e7b&0&0000#{378de44c-56ef-11d1-bc8c-00a0c91405dd})
Input: Adding lightgun #3: ATRAK Mouse  (Ultimarc) (device id: \\?\HID#VID_D209&PID_1602&MI_02#9&2f312172&0&0000#{378de44c-56ef-11d1-bc8c-00a0c91405dd})
Input: Adding lightgun #4: I-PAC 2 (Ultimarc) (device id: \\?\HID#VID_D209&PID_0420&MI_01&Col03#7&512f225&0&0002#{378de44c-56ef-11d1-bc8c-00a0c91405dd})
Input: Adding lightgun #5:  (Ultimar) (device id: \\?\HID#VID_04B4&PID_0201&MI_00#7&3ab68af&0&0000#{378de44c-56ef-11d1-bc8c-00a0c91405dd})
Input: Adding lightgun #6: Ultimarc Ultra-Stik Player 2 (Ultimarc Ultra-Stik) (device id: \\?\HID#VID_D209&PID_0502&MI_01#9&3840d97d&0&0000#{378de44c-56ef-11d1-bc8c-00a0c91405dd})
Input: Adding lightgun #7: Ultimarc Ultra-Stik Player 1 (Ultimarc Ultra-Stik) (device id: \\?\HID#VID_D209&PID_0501&MI_01#7&126ec518&0&0000#{378de44c-56ef-11d1-bc8c-00a0c91405dd})
Input: Adding joystick #1: ATRAK Device #1 (Ultimarc) (device id: \\?\HID#VID_D209&PID_1601&MI_01#7&2acddc3d&0&0000#{4d1e55b2-f16f-11cf-88cb-001111000030})
Input: Adding joystick #2: ATRAK Device #2 (Ultimarc) (device id: \\?\HID#VID_D209&PID_1602&MI_01#9&b59e3b0&0&0000#{4d1e55b2-f16f-11cf-88cb-001111000030})
Input: Adding joystick #3: I-PAC 2 (Ultimarc) (device id: \\?\HID#VID_D209&PID_0420&MI_03#7&18cf9d3&0&0000#{4d1e55b2-f16f-11cf-88cb-001111000030})
Input: Adding joystick #4: Ultimarc Ultra-Stik Player 2 (Ultimarc Ultra-Stik) (device id: \\?\HID#VID_D209&PID_0502&MI_00#9&2cb254b3&0&0000#{4d1e55b2-f16f-11cf-88cb-001111000030})
Input: Adding joystick #5: Ultimarc Ultra-Stik Player 1 (Ultimarc Ultra-Stik) (device id: \\?\HID#VID_D209&PID_0501&MI_00#7&c15726&0&0000#{4d1e55b2-f16f-11cf-88cb-001111000030})

So my thought was to make a new mycontrollers.cfg file with the following:
Code: [Select]
<mameconfig version="10">
<system name="default">
<input>
<mapdevice device="VID_0420&amp;PID_0209" controller="KEYCODE_1" />
<mapdevice device="VID_046D&amp;PID_C52B" controller="KEYCODE_2" />
<mapdevice device="VID_04B4&amp;PID_0201" controller="TRACKBALL_1" />
<mapdevice device="VID_D209&amp;PID_1601" controller="GUNCODE_1" />
<mapdevice device="VID_D209&amp;PID_1602" controller="GUNCODE_2" />
<mapdevice device="ATRAK Device #1" controller="JOYCODE_3" />
<mapdevice device="ATRAK Device #2" controller="JOYCODE_4" />
<mapdevice device="VID_D209&amp;PID_0501" controller="JOYCODE_1" />
<mapdevice device="VID_D209&amp;PID_0502" controller="JOYCODE_2" />
<mapdevice device="XInput Player 1" controller="JOYCODE_5" />
<mapdevice device="VID_D209&amp;PID_0420" controller="JOYCODE_6" />
</input>
</system>
</mameconfig>

That doesn't work. The controllers file is read and a keyboard is remapped, (I see it in the log) but the sticks aren't.

Any suggestions? Could it have to do with the multiple identical entries for the Ultra-Sticks in .251 using HIP and PID (as mice, lightguns, and joysticks), vs a unique name for the Joystick Device ID in .246?

Thanks.


milhouse

  • Trade Count: (+1)
  • Full Member
  • ***
  • Offline Offline
  • Posts: 177
  • Last login:March 02, 2023, 08:03:32 pm
Re: Stable IDs in MAME .251
« Reply #1 on: February 05, 2023, 07:24:49 am »
In case anyone else has this issue (or more likely, I have this issue in 5 years and can't remember how I solved it), I used the attached file as my ctrlr file, the devreorderutility, and set joystickprovider to dinput in mame.ini.


Ginsonic

  • Trade Count: (+1)
  • Full Member
  • ***
  • Offline Offline
  • Posts: 96
  • Last login:October 09, 2023, 12:56:04 pm
  • Arcade enthusiast !
Re: Stable IDs in MAME .251
« Reply #2 on: February 06, 2023, 03:39:50 am »

Any suggestions? Could it have to do with the multiple identical entries for the Ultra-Sticks in .251 using HIP and PID (as mice, lightguns, and joysticks), vs a unique name for the Joystick Device ID in .246?

Most likely, Yes! If a device has multiple HID properties (Mouse, Joystick, Keyboard), you have to insert the exact VID/PID combination of the desired HID device,
so try: <mapdevice device="VID_D2094&amp;PID_05014&amp;MI_00" controller="JOYCODE_1" /> instead of "<mapdevice device="Ultimarc Ultra-Stik Player 1" controller="JOYCODE_1" />"

milhouse

  • Trade Count: (+1)
  • Full Member
  • ***
  • Offline Offline
  • Posts: 177
  • Last login:March 02, 2023, 08:03:32 pm
Re: Stable IDs in MAME .251
« Reply #3 on: February 11, 2023, 08:04:20 pm »
I couldn't get VID_D2094&amp;PID_05014&amp;MI_00 (updated for mine, oif course) to work, but did get it to work using the actual name of the stick (Ultra-Mark Ultra Stik 1" etc.)