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: Any way to fix the constantly changing controller IDs in MAME?  (Read 5673 times)

0 Members and 1 Guest are viewing this topic.

Shoegazer

  • Trade Count: (0)
  • Full Member
  • ***
  • Offline Offline
  • Posts: 135
  • Last login:May 10, 2015, 10:37:58 am
    • NonMAME - The ultimate site for the OTHER arcade emulators!
Any way to fix the constantly changing controller IDs in MAME?
« on: January 28, 2007, 08:22:00 am »
Hey fellow cab owners,

Anyone here know if there's a way to get MAME to stop assigning seemingly random controller IDs every time I unplug/plug something in?  For example, I have two LCD Topguns that I use with MAME and they keep getting seen as one of "mouse2", "mouse3", "mouse5", "mouse6" etc. and i have to recalibrate MAME games every time i connect/disconnect the USB hub from the PC...

I should mention that these devices are all plugged into a 7-port USB hub, which is connected to a laptop that powers the cabinet.  This is very convenient, since I use the laptop for other purposes and am frequently removing it from the cab, so I can't really change it.  Nevertheless there *should* be a way to get either WinXP (using SP2) or MAME to "lock" device or controller IDs to a specific device.  Right?  Hopefully there's a way to do this either through WinXP Device Manager or MAME that I'm missing due to extreme blindness?  :)

Thanks for your help, everyone!

Shoegazer
« Last Edit: January 28, 2007, 08:54:00 am by Shoegazer »
NonMAME: Your best source for the OTHER arcade emulators!
http://nonmame.retrogames.com

NickG

  • Trade Count: (0)
  • Full Member
  • ***
  • Offline Offline
  • Posts: 586
  • Last login:September 26, 2022, 05:25:23 am
  • Dig.
    • My Projects Page
Re: Any way to fix the constantly changing controller IDs in MAME?
« Reply #1 on: January 28, 2007, 10:34:08 am »
What happens if you turn off "plug and play OS" in the bios (if that's possible in your laptop bios,) plug the hub in while the laptop is completely powered off, then turn the laptop on?  This might let the laptop bios, instead of Windows, configure the devices every time.  Will the bios always do the same thing if Windows will not?  ...or are USB devices not configured at all by the bios/chipset without the OS..?


Aaggh.  nevermind all that, have you tried this one:
Quote from: The Old New Thing url=http://blogs.msdn.com/oldnewthing/archive/2004/11/10/255047.aspx
create a binary key in HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Control\UsbFlags that has the form IgnoreHWSerNumVVVVPPPP. Here VVVV is the 4 hex digits of the vendor id and PPPP is the 4 digits of the product id. Creating this and setting the value to 01 means that windows will ignore the serial number and act as if the device never had one at all. Doing this causes windows to then use the connection number to discriminate between different devices which works fine.

Well, that is really just to get around lockups/reboots for devices that have identical serial numbers,  which is probably not applicable here. 
Nevermind on that one, too.

Have you tried (hot)plugging the separate devices into the same ports in the same order everytime instead of plugging unplugging/plugging the hub; waiting for  the plug and play / hardware wizard / usb device manager thing to completely install each device before plugging in the next device?   
« Last Edit: January 28, 2007, 11:04:01 am by NickG »

Shoegazer

  • Trade Count: (0)
  • Full Member
  • ***
  • Offline Offline
  • Posts: 135
  • Last login:May 10, 2015, 10:37:58 am
    • NonMAME - The ultimate site for the OTHER arcade emulators!
Re: Any way to fix the constantly changing controller IDs in MAME?
« Reply #2 on: January 28, 2007, 11:41:57 am »
Thanks for the help, Nick.

I did contemplate trying to plug in each device separately, but I'd rather not have to reach inside the cab and plug/unplug all seven of my USB cables every time I want to use the cab - which these days, is just about every day.  Right now I've got it so that I just put the whole laptop in the sliding keyboard tray, slap in a few cables, and (aside from this problem) I'm up and running in less than 10 seconds.  Pretty neat, and if I could only fix this annoyance I'd be all set.

Thanks again!

Shoegazer
NonMAME: Your best source for the OTHER arcade emulators!
http://nonmame.retrogames.com

fatfingers

  • Trade Count: (0)
  • Full Member
  • ***
  • Offline Offline
  • Posts: 966
  • Last login:April 17, 2025, 05:26:08 pm
  • Got UltraStiks?™
Re: Any way to fix the constantly changing controller IDs in MAME?
« Reply #3 on: January 28, 2007, 12:06:52 pm »
Is your 7-port USB hub self-powered or powered from your computer?

My DK low scores
-------------------
1) 180700
2) 165000
3) 162900
4) 162600
5) 158500


W.W.P.M.D.?                                       I'm here to help ... I just don't do it. ™

Fozzy The Bear

  • Handbags at dawn in here!!!
  • Trade Count: (+1)
  • Full Member
  • ***
  • Offline Offline
  • Posts: 1831
  • Last login:September 18, 2011, 11:29:59 am
  • It's Been One Of Those Days... Don't Ask!
Re: Any way to fix the constantly changing controller IDs in MAME?
« Reply #4 on: January 28, 2007, 12:11:40 pm »
Anyone here know if there's a way to get MAME to stop assigning seemingly random controller IDs every time I unplug/plug something in?

The short answer is NO!..... The problem with USB controller ID's is not a problem with Mame.

The problem lies with Windows XP.  XP Uses a dynamic controller assignment. So whatever you do XP will always remap all of the USB devices when one of them changes.

The fix for this is not to run the memory hogging thing, slow as a piece of very slow stuff, with extra slow go go juice, designed by Mr Thicky McSlow from Slowville commonly known as Windows XP.

Run Win98SE on your cab and the problems with this will vanish. Newer, in terms of an OS, doesn't necessarily mean better or faster.

Best Regards,
Julian (Fozzy The Bear)
« Last Edit: January 28, 2007, 12:20:34 pm by Fozzy The Bear »
Most bottles and jars contain at least twenty-five percent recycled Pacman.
And research indicates that Space Invaders are strongly attracted to people who have recently eaten meat pies.

Shoegazer

  • Trade Count: (0)
  • Full Member
  • ***
  • Offline Offline
  • Posts: 135
  • Last login:May 10, 2015, 10:37:58 am
    • NonMAME - The ultimate site for the OTHER arcade emulators!
Re: Any way to fix the constantly changing controller IDs in MAME?
« Reply #5 on: January 28, 2007, 12:33:12 pm »
Hah.. thanks for the irreverent post, Foz.  ;)

I figured it had more to do with WinXP than MAME, but I guess I was sorta hoping there would be a way to counteract this within MAME itself.  Otherwise, possibly some way to turn off dynamic assignments on a per-device basis within XP.  Ah well.

I'd go back to Win98 for the cab if it weren't for the fact that I need XP on this laptop for other non-cab reasons.  I wonder if going the opposite direction (i.e. deeper into slowland) by moving to Vista would somehow make things better?  As in, if Vista gave the option to turn off dynamic assignments.  Something makes me doubt that.  Alas.

Shoegazer

p.s. (to Fatfingers): I'm powering the hub by plugging it into a smartstrip.
NonMAME: Your best source for the OTHER arcade emulators!
http://nonmame.retrogames.com

Fozzy The Bear

  • Handbags at dawn in here!!!
  • Trade Count: (+1)
  • Full Member
  • ***
  • Offline Offline
  • Posts: 1831
  • Last login:September 18, 2011, 11:29:59 am
  • It's Been One Of Those Days... Don't Ask!
Re: Any way to fix the constantly changing controller IDs in MAME?
« Reply #6 on: January 28, 2007, 02:13:09 pm »
I wonder if going the opposite direction (i.e. deeper into slowland) by moving to Vista would somehow make things better? 

ROFLMGDAO  :laugh2: :laugh2: :laugh2:

Vista so far looks lika another piece of over bloated over loaded Microstuffed junk.....  Maybe it'll have something in there to improve the situation, but just like you, I somehow doubt it.

Best Regards,
Julian (Fozzy The Bear)
Most bottles and jars contain at least twenty-five percent recycled Pacman.
And research indicates that Space Invaders are strongly attracted to people who have recently eaten meat pies.

Shoegazer

  • Trade Count: (0)
  • Full Member
  • ***
  • Offline Offline
  • Posts: 135
  • Last login:May 10, 2015, 10:37:58 am
    • NonMAME - The ultimate site for the OTHER arcade emulators!
Re: Any way to fix the constantly changing controller IDs in MAME?
« Reply #7 on: January 28, 2007, 11:23:05 pm »
Yep.  Funny thing about that - I was at a Best Buy the other day and saw just how bloated Vista really is.  It was running on a new PC (not sure of specs tho) and just dragging windows around was SLUGGISH.  Go figure.

http://www.joyoftech.com/joyoftech/joyimages/915.gif

;)

Anyway, I guess it's pointless to pursue solving this problem any further.  Sigh.

Shoegazer
NonMAME: Your best source for the OTHER arcade emulators!
http://nonmame.retrogames.com

rockin_rick

  • Trade Count: (+3)
  • Full Member
  • ***
  • Offline Offline
  • Posts: 495
  • Last login:May 27, 2017, 09:20:20 am
Re: Any way to fix the constantly changing controller IDs in MAME?
« Reply #8 on: February 01, 2007, 11:22:16 pm »

I'd go back to Win98 for the cab if it weren't for the fact that I need XP on this laptop for other non-cab reasons.

Maybe you could dual boot it and install both OS'es.  The only downfall is that (AFAIK) win 98 needs to be installed before XP due to boot sector issues...

Rick
If I do not respond to your post in a timely manner, feel free to PM me.

Minwah

  • Trade Count: (+3)
  • Full Member
  • ***
  • Offline Offline
  • Posts: 7662
  • Last login:January 18, 2019, 05:03:20 am
    • MAMEWAH
Re: Any way to fix the constantly changing controller IDs in MAME?
« Reply #9 on: February 02, 2007, 05:34:58 am »
Run Win98SE on your cab and the problems with this will vanish.

True, but several other problems will probably appear.  I was reluctant to upgrade to XP but when I did it solved all kindof of impossible to explain oddities which occurred with '98.

I won't be moving to Vista in the anywhere near future tho  :P

blueznl

  • Trade Count: (0)
  • Full Member
  • ***
  • Offline Offline
  • Posts: 290
  • Last login:June 16, 2019, 04:50:02 pm
Re: Any way to fix the constantly changing controller IDs in MAME?
« Reply #10 on: February 02, 2007, 07:31:21 am »
In some cases Windows may treat different ports with different priorities. If you have multiple USB ports on your machine that may be a way to fix it (by spreading devices). Another nasty (but very well working :-)) way around this is 'delayed switch on', ie. switch on the hubs or the devices themselves on after XP has booted, and they will get sequentially assigned their ID's.

clockwork

  • Trade Count: (0)
  • Full Member
  • ***
  • Offline Offline
  • Posts: 257
  • Last login:December 11, 2008, 11:15:29 pm
  • Time to play!
Re: Any way to fix the constantly changing controller IDs in MAME?
« Reply #11 on: February 02, 2007, 07:57:13 am »
I wonder if going the opposite direction (i.e. deeper into slowland) by moving to Vista would somehow make things better?

ROFLMGDAO  :laugh2: :laugh2: :laugh2:

Vista so far looks lika another piece of over bloated over loaded Microstuffed junk.....  Maybe it'll have something in there to improve the situation, but just like you, I somehow doubt it.

Vista is what put the final nail in the M$ coffin for me. My MAME machine is Linux (Fedora 6), my office machine is now Linux, and soon my primary machine at home will be Linux. I never want that POS Vista infecting my systems.
Charlie Brown: I'm still hoping that yesterday will get better.

RandyT

  • Trade Count: (+14)
  • Full Member
  • ***
  • Offline Offline
  • Posts: 7014
  • Last login:Yesterday at 11:25:58 am
  • Friends don't let friends hack keyboards.
    • GroovyGameGear.com
Re: Any way to fix the constantly changing controller IDs in MAME?
« Reply #12 on: February 02, 2007, 11:09:34 am »
Vista is what put the final nail in the M$ coffin for me.

Bill's performance on the Daily Show probably drove in a few more.  That was a train wreck..... :dizzy:

RandyT

Derf00

  • Trade Count: (0)
  • Jr. Member
  • **
  • Offline Offline
  • Posts: 6
  • Last login:May 26, 2018, 04:09:03 pm
Re: Any way to fix the constantly changing controller IDs in MAME?
« Reply #13 on: February 02, 2007, 08:36:02 pm »
Information removed voluntarily. Wrong application.

Still looking for something that will address the USB ID changing on you each time. So far only Develper tools look like they may help.
« Last Edit: February 03, 2007, 01:55:17 pm by Derf00 »

JustMichael

  • Trade Count: (+1)
  • Full Member
  • ***
  • Offline Offline
  • Posts: 1438
  • Last login:September 27, 2015, 01:19:40 am
  • Mmmmm!! Cheesecake!!
Re: Any way to fix the constantly changing controller IDs in MAME?
« Reply #14 on: February 03, 2007, 08:07:58 am »
I think I found a site that can help you with your problem.

http://docsrv.sco.com:507/en/man/html.HW/usb.HW.html

Scroll down about mid-way to the "USB Device IDs" heading. Haven't tried this myself but I can see it coming in handy.

I know it's talking about storage devices but then they too suffer from IDs that keep changing on boot-up and can jack a system up that relies on a specific boot sequence. Hope it helps!

Did you know the link is for "SCO OpenServer"?