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: MAME 104u5 out - adds multiple mice  (Read 14072 times)

0 Members and 1 Guest are viewing this topic.

Tiger-Heli

  • Trade Count: (0)
  • Full Member
  • ***
  • Offline Offline
  • Posts: 5447
  • Last login:January 03, 2018, 02:19:23 pm
  • Ron Howard? . . . er, I mean . . . Run, Coward!!!
    • Tiger-Heli
MAME 104u5 out - adds multiple mice
« on: March 11, 2006, 08:36:15 am »
Haven't tried it, just saw the whatsnew.txt, but thought you might want to know!!!
It's not what you take when you leave this world behind you, it's what you leave behind you when you go. - R. Travis.
When all is said and done, generally much more is SAID than DONE.

Howard_Casto

  • Idiot Police
  • Trade Count: (+1)
  • Full Member
  • ***
  • Offline Offline
  • Posts: 19400
  • Last login:Yesterday at 10:57:06 pm
  • Your Post's Soul is MINE!!! .......Again??
    • The Dragon King
Re: MAME 104u5 out - adds multiple mice
« Reply #1 on: March 11, 2006, 09:06:33 pm »
I tried it... it's both great and annoying at the same time..............


It's great because it works on low level directinput, which is the best possible way to get input from windows. Think analog mame but less hackish.  Multiple mice are found easily, without hassle.  They work too, without tweaks or hacks. 

The annoying thing is that the mame devs didn't have enough foresight to realize that almost all mice input devices in this day and age are usb, and thus they can be hotswapped.  The code relies on the enumeration number rather than the device name.  What this means is the first mouse to be plugged into your pc is mouse one, the second is mouse two ect.....  This is all well and good, but if you unplug your lightgun and had a third device after it, all your mappings are off.  Also they removed the system mouse, which while sounding good on paper, actually makes defining a mouse 10 times more painful for those of us not using multiple mice at once. No longer does any mouse control the trackball.... by default  trackball 1 is controlled by mouse 1.  This is fine except nearly every mame cab on the planet has a mouse/keyboard combo tucked away somewhere in case of emergencies.  Since it's the first thing windows sees at bootup, your trackball 1 is controlled by your pc mouse, not your trackball. 

I have no clue if ctrlr files can fix that but for now, it seems like a different set of problems in exchange for more functionality. 
« Last Edit: March 11, 2006, 09:08:36 pm by Howard_Casto »

Derrick Renaud

  • Trade Count: (0)
  • Full Member
  • ***
  • Offline Offline
  • Posts: 299
  • Last login:March 30, 2018, 11:06:19 am
Re: MAME 104u5 out - adds multiple mice
« Reply #2 on: March 12, 2006, 01:36:11 pm »
The annoying thing is that the mame devs didn't have enough foresight to realize that almost all mice input devices in this day and age are usb, and thus they can be hotswapped.  The code relies on the enumeration number rather than the device name.  What this means is the first mouse to be plugged into your pc is mouse one, the second is mouse two ect.....  This is all well and good, but if you unplug your lightgun and had a third device after it, all your mappings are off.  Also they removed the system mouse, which while sounding good on paper, actually makes defining a mouse 10 times more painful for those of us not using multiple mice at once. No longer does any mouse control the trackball.... by default  trackball 1 is controlled by mouse 1.  This is fine except nearly every mame cab on the planet has a mouse/keyboard combo tucked away somewhere in case of emergencies.  Since it's the first thing windows sees at bootup, your trackball 1 is controlled by your pc mouse, not your trackball. 

First off I would recommend you learn something about RAWMOUSE support before you state we did not have the foresight.  RAWMOUSE and DX are totally different critters.

RAWMOUSE pretty much blows.  But it is the only way to get multiple mouse support in XP.

RAWMOUSE has no provissions for hot swapping mice.    I would have to re-read the list of devices every time each mouse is polled.  Re-init all the port handing and all sorts of other stuff.  Let's slow MAME down to support a useless feature like hot-swapping during a game.

TELL me any games using DXinput that let you hotwap a joystick and use a different one during game play.  None.  It is the same thing with multiple mice.  Your thinking means they should also make a system joystick.

The system mouse had to be removed.  I do not understand people's fettish for it.  If anyone used pre 104u5 multiple mouse support in Win98/Me they would have found they could not select the indivual mouse.  It would always select Mouse 1 and Mouse X.  So if you set player 1 controls to mouse 1 it would enter Mouse 1 (system mouse) and Mouse 2 (mouse 1 individual data).  When setting player 2's control to mouse 2 you get Mouse 1 (system mouse) and Mouse 3 (mouse 2 individual data).  Completely useless.  No seperate controls that way.

You do realize you can now set the controls so an axis can be Mouse 1 X and Mouse 2 X, by entering each as the default control input.

Think about it.  Each mouse is now considered a seperate control like a joystick.  Once you think that way, you will understand.

As far as enumeration goes, thats windows crappy handling that we can not do anything about.  Windows does not know which mouse is which, so we can certainly not figure it out either.

Also DX on non-XP systems report mice in the order they were first installed.  There is absolutely no way of us knowing the order they are in after hot swapping.  Windows does not know.  Windows only keeps a list in the order they were installed.

XP DX does not report multiple mice.  XP RAWMOUSE reports mice in the reverse order of how they were installed.  So each new mouse becomes mouse 1.  Theres consistency for you.  Again not MAMEdevs fault.  You want to talk about having fore-sight talk to to Microsoft.  Future versions of MAME will reverse the RAWMOUSE list to make life easier.

DX will report a mouse is lost, but RAWMOUSE will not.

But thanks for bashing what you know nothing about.  It was the "foresight" comment that ticked me off.   >:(

And FYI, my cab does not have a mouse tucked away.  The trackball is the mouse.

D.
« Last Edit: March 12, 2006, 02:38:45 pm by Derrick Renaud »

Grasshopper

  • Trade Count: (+1)
  • Full Member
  • ***
  • Offline Offline
  • Posts: 2380
  • Last login:November 08, 2023, 07:20:31 am
  • life, don't talk to me about life
Re: MAME 104u5 out - adds multiple mice
« Reply #3 on: March 12, 2006, 01:46:47 pm »
Interesting. Is this inability to deal with hot-swapping also a problem in Linux?
"Patriotism is the last refuge of the scoundrel." - Samuel Johnson

Howard_Casto

  • Idiot Police
  • Trade Count: (+1)
  • Full Member
  • ***
  • Offline Offline
  • Posts: 19400
  • Last login:Yesterday at 10:57:06 pm
  • Your Post's Soul is MINE!!! .......Again??
    • The Dragon King
Re: MAME 104u5 out - adds multiple mice
« Reply #4 on: March 12, 2006, 04:28:46 pm »
RAWMOUSE has no provissions for hot swapping mice.    I would have to re-read the list of devices every time each mouse is polled.  Re-init all the port handing and all sorts of other stuff.  Let's slow MAME down to support a useless feature like hot-swapping during a game.

TELL me any games using DXinput that let you hotwap a joystick and use a different one during game play.  None.  It is the same thing with multiple mice.  Your thinking means they should also make a system joystick.

The system mouse had to be removed.  I do not understand people's fettish for it.  If anyone used pre 104u5 multiple mouse support in Win98/Me they would have found they could not select the indivual mouse.  It would always select Mouse 1 and Mouse X.  So if you set player 1 controls to mouse 1 it would enter Mouse 1 (system mouse) and Mouse 2 (mouse 1 individual data).  When setting player 2's control to mouse 2 you get Mouse 1 (system mouse) and Mouse 3 (mouse 2 individual data).  Completely useless.  No seperate controls that way.


I'm sorry if I don't completely understand how rawmouse works but I DO understand how Dx works and considering you just put dx7 back in to help with the rawmouse and dx does allow you to get the device name, I don't see how that is an issue.  The enumeration numbers are the same for both functions so you simply mate the device name found in dx with the enumeration number for rawmouse. 

Who ever mentioned anything about hotswapping during the game?  I was referring to the fact that unlike other ports, usb devices are enumerated by the order that they are detected by the system and that windows doesn't really allow a way to control the order.  So if a person buys a new lightgun/trackball it could potentially be detected as the "middle" device and thus throw all their mappings off.  Also there is the rare instance in which someone plugs in a new purchased device to an already running computer, it is detected as the last device (obviously, since the computer has already booted up), they go through hours of configuring things just the way they want em, only to discover that upon reboot the mappings don't work anymore.  They don't work because due to a usb hub or a system just being crazy, the device is now enumerated at a lower number and thus the settings aren't for that mouse anymore. 


Joysticks are different, I don't know how they got into the conversation.  First off, it's possible to set device priority for joysticks in windows, meaning they don't "move" when you plug and un plug them.  So the problems I talked about for mice don't apply to joysticks.   Secondly, ctrlr files have support for real joystick names, meaning you can optionally type some nonsense like "sidewinder1 button 0" and let dx figure out where the joystick is.  Of course I don't follow every step in mame's development process but it used to.  So in other words "mouse 1" could still be used but "logitec mouse 1" could also be used, assuring that your inputs wouldn't get mixed up the addition removal of other devices.  Again I don't me in game (sheesh what were you thinking?),  I mean over the course of the lifespan of a person's mame install. 

The no separate controls thing was kind of my point.  The removal of the system mouse should be OPTIONAL.  Why?  Believe it or not many people don't need separate mice inputs.  When is the last time you saw a mame cab with two trackballs?  Two lightguns aren't a problem as you poll the mouse position when the appropriate button is pressed (either mouse button 1 or mouse button 3).  I would guess that the majority of mame users don't need or use separate mice inputs and you've just dumped a world of unnecessary configuring on them just for those few people that do. 

So I stand by the point that a lack of foresight was involved in this decision to change the way the mice input has worked for ages, without the option of using the old method to help an extreme minority of people who need separate inputs.  I mean heck, even on your own mamecab you said you just had a trackball.  Even you don't require separate inputs.

In closing don't assume that just because YOU don't understand ME that I don't understand YOU. 
« Last Edit: March 12, 2006, 04:34:02 pm by Howard_Casto »

Derrick Renaud

  • Trade Count: (0)
  • Full Member
  • ***
  • Offline Offline
  • Posts: 299
  • Last login:March 30, 2018, 11:06:19 am
Re: MAME 104u5 out - adds multiple mice
« Reply #5 on: March 12, 2006, 06:11:58 pm »
I'm sorry if I don't completely understand how rawmouse works but I DO understand how Dx works and considering you just put dx7 back in to help with the rawmouse and dx does allow you to get the device name, I don't see how that is an issue.  The enumeration numbers are the same for both functions so you simply mate the device name found in dx with the enumeration number for rawmouse. 

DX has nothing to do with RAWMOUSE.  DX is disabled if MAME is running on XP with multiple mice.  You can not use both.  DX on XP will never report anything but 1 mouse, so you can not enumerate the devices using DX.   If you know better, then code it.

If you read what I said about changing the DX support for nonXP, the removal of the system mouse was necessary.  Try plain MAME104 on Win98/ME.  Hit tab and try to select a mouse button or axis.  It will select the system mouse and the actual mouse.  This is obviously wrong and useless.  If you like it broken then keep using the old version.  I did not just put DX back in to help with RAWMOUSE.  It has been there for a while, I just fixed it.

And once again you can setup your default controls. Set your defaults to mouse 2 so it ignores mouse 1.  My trackball is mouse 1.  My dials are mouse 2.  I have no need for a mouse buried away.  If I want a game to use the trackball or dials I can just tell it to use mouse 1 and 2.  Just like you would do if you wanted the game to use joystick 1 and 2.

That is why I made reference to joysticks.  Mice are now considered along the same lines as joysticks.  They are individual controls.  Nothing is stopping you from mapping them all together.  Why should the MAME code do it automatically.  System Mouse is a useless concept.  There is no System Mouse as far as RAWMOUSE is concerened.  It has to be manually created by adding all mice together.

Who ever mentioned anything about hotswapping during the game?
Umm you did in your original post.

  I was referring to the fact that unlike other ports, usb devices are enumerated by the order that they are detected by the system and that windows doesn't really allow a way to control the order.  So if a person buys a new lightgun/trackball it could potentially be detected as the "middle" device and thus throw all their mappings off.  Also there is the rare instance in which someone plugs in a new purchased device to an already running computer, it is detected as the last device (obviously, since the computer has already booted up), they go through hours of configuring things just the way they want em, only to discover that upon reboot the mappings don't work anymore.  They don't work because due to a usb hub or a system just being crazy, the device is now enumerated at a lower number and thus the settings aren't for that mouse anymore. 

Again completely wrong.  They are always enumerated in the order they were installed.

Follow this example.  On Win98-DX7, because we are talking DX enumeration, and I've told you RAWMOUSE is different and XP DX does not enumerate mice.

Plug in mouse A, then B, then C.  They will enumerate as A=1, B=2, C=3.  Unplug mouse A.  We now get this. B=1, C=2.  Plug back in mouse A.  It will not randomly show up in the middle.  The original list is always maintained.  We will be back to A=1, B=2, C=3.  You have to go into safe mode and remove all mice, then plug then back in to change the order.

For XP, RAWMOUSE does do the list backwards.  Each new device becomes #1, so I have already changed my WIP to reverse the list RAWMOUSE reports.

Could MAME enumerate the names?  Yes, I have previously thought about it.  Would it be a waste of my coding time.  Yes.  As already stated DX is different from RAWMOUSE.  The names will be different.  I am not wasting time adding DX features to a dead OS.  The names will not be compatible between the 2.

And displaying the name that was enumerated by DX or RAWMOUSE would just confuse people.  It is not going to say something pretty like "Microsoft Mouse 2" without writing a lot of code that manually reads the registry.  The standards for this stuff is so loosely followed, that they are useless.  There are all sorts of flags that the manufacturers could set about a device, but most do not bother.

If you want to see the great name used for XP, go into device manager, select a mouse and check it's properties.  On the details page you will see the device instance id.  That is the only name I can get in XP.  Without manually going to the registry and trying to makes sense of the loosely followed non-standard standards.

Joysticks are different, I don't know how they got into the conversation.  First off, it's possible to set device priority for joysticks in windows, meaning they don't "move" when you plug and un plug them.  So the problems I talked about for mice don't apply to joysticks.   Secondly, ctrlr files have support for real joystick names, meaning you can optionally type some nonsense like "sidewinder1 button 0" and let dx figure out where the joystick is.  Of course I don't follow every step in mame's development process but it used to.  So in other words "mouse 1" could still be used but "logitec mouse 1" could also be used, assuring that your inputs wouldn't get mixed up the addition removal of other devices.  Again I don't me in game (sheesh what were you thinking?),  I mean over the course of the lifespan of a person's mame install. 
mouse=joystick.  They are things a player uses to control play.  The point being if a system mouse is so usefull then why not a system joystick.

My point is they are both useless.  If the game is 1 player and you wanted to use both joysticks for it, you would set the controls to use joystick 1 or 2.  The same is now true with the mouse.  People need to stop thinking the mouse is something special.  It is an input just like a joystick.


The no separate controls thing was kind of my point.  The removal of the system mouse should be OPTIONAL.  Why?  Believe it or not many people don't need separate mice inputs.  When is the last time you saw a mame cab with two trackballs?  Two lightguns aren't a problem as you poll the mouse position when the appropriate button is pressed (either mouse button 1 or mouse button 3).  I would guess that the majority of mame users don't need or use separate mice inputs and you've just dumped a world of unnecessary configuring on them just for those few people that do. 
And I will stand by my many points as to why the system mouse is useless.  Do you recommend a system joystick too?

MAME cabs do not have 2 trackballs, because the support was lacking.

Your lightgun comment again shows a lack of knowledge of the current MAME going ons, which was the point of this thread.  Multiple lightguns in the future will be just another mouse.  It can be accessed separately like any other mouse.  It is just not currently done that way.  It can be enumerated just like any other mouse.

When the current lightgun support was added, someone thought lightguns were special, when they are not.  They are just absolute mice.  The absolute data received is different in RAWMOUSE and DX though.  DX is going to be a royal pain in the ---.  Regular mice are relative mice.  This data is the same in RAWMOUSE and DX.  Except you have to keep track of it yourself until the data is needed when using RAWMOUSE.

So I stand by the point that a lack of foresight was involved in this decision to change the way the mice input has worked for ages, without the option of using the old method to help an extreme minority of people who need separate inputs.  I mean heck, even on your own mamecab you said you just had a trackball.  Even you don't require separate inputs.

In closing don't assume that just because YOU don't understand ME that I don't understand YOU. 

We are currently trying to remove as many "-" options as possible.  They just make the code harder to maintain and provide no real benefit.  So adding another switch like -system_mouse would annoy most devs.

Live with the fact that if you cherish the system mouse, you will have to map all your mice together.  If you only have one mouse then it does not matter.  If you have a mouse hidden away, then how hard is it to change the default controls to use mouse 2?  Or go in safe mode, delete all mice, then re-install the hidden mouse second.

And yes I require separate inputs.  Do I want someone playing with the trackball while I am using the rotary controls?  If I had a hidden mouse, would I want it to affect my controls while the cabinet is shaking and moving the hidden mouse during frantic game play?

So we will have to agree to disagree.  My comments are based on fact.  Yours are based on assumptions on how you wished the real world of Windows was.

D.
« Last Edit: March 12, 2006, 06:51:55 pm by Derrick Renaud »

Circo

  • Trade Count: (+1)
  • Full Member
  • ***
  • Offline Offline
  • Posts: 849
  • Last login:May 11, 2020, 03:27:51 am
  • Still using screenshots? Try EmuMovies instead.
    • EmuMovies
Re: MAME 104u5 out - adds multiple mice
« Reply #6 on: March 12, 2006, 06:17:59 pm »
I like the fact that when I roll the trackball with enthusiasm and hit my spinner it will not make the game go all crazy.  So bravo!  It is definitely way better than the old system.
My Websites

Howard_Casto

  • Idiot Police
  • Trade Count: (+1)
  • Full Member
  • ***
  • Offline Offline
  • Posts: 19400
  • Last login:Yesterday at 10:57:06 pm
  • Your Post's Soul is MINE!!! .......Again??
    • The Dragon King
Re: MAME 104u5 out - adds multiple mice
« Reply #7 on: March 12, 2006, 10:13:54 pm »
Derrick all I can say is somehow I offend you in my original post and since then you have ignored everything I've said, only hearing what you want to hear.  I'm sorry if I've offended you in some way.


Unfortuantely that doesn't chagne the fact that you are flat out wrong on some of your assumptions, but since you aren't willing to listen there's no point in me going over them again.  That doesn't mean that I didn't get a few things wrong about how you guys went about it, but considering I haven't even gotten a chance to look at the frikkin source code yet, I'd say I hit it pretty spot on.

I will say, however that rawmouse is not the only, nor the best way to get individual mouse input in windows or even windowsXp.  You can figure the rest out for yourself.  :)

jerryjanis

  • Trade Count: (0)
  • Full Member
  • ***
  • Offline Offline
  • Posts: 821
  • Last login:February 02, 2023, 01:56:44 am
  • Skate or Die!!!
    • Jake's Joystick
Re: MAME 104u5 out - adds multiple mice
« Reply #8 on: March 12, 2006, 10:21:51 pm »
mouse=joystick.  They are things a player uses to control play.  The point being if a system mouse is so usefull then why not a system joystick.

My point is they are both useless.  If the game is 1 player and you wanted to use both joysticks for it, you would set the controls to use joystick 1 or 2.  The same is now true with the mouse.  People need to stop thinking the mouse is something special.  It is an input just like a joystick.

And I will stand by my many points as to why the system mouse is useless.  Do you recommend a system joystick too?

Does it follow that keyboard=mouse=joystick?  They are things a player uses to control play.  In Mame, the keyboard is an input just like a joystick.  I haven't tried it, but I'm guessing that raw input can enumerate separate keyboards just as easily as it can with mice.  Does it make sense to have a system keyboard, or is that a useless concept as well?

Jake

Cananas

  • Trade Count: (0)
  • Full Member
  • ***
  • Offline Offline
  • Posts: 299
  • Last login:August 27, 2017, 07:39:03 am
  • and the seventh day... PacMan was created
Re: MAME 104u5 out - adds multiple mice
« Reply #9 on: March 13, 2006, 01:47:44 am »
I will say, however that rawmouse is not the only, nor the best way to get individual mouse input in windows or even windowsXp.  You can figure the rest out for yourself.  :)

We hace been waiting for the multiple mouse since the last release of AnalogMame. Now, a person of MameDev has been included this code into the Mame build. A dream for most of us. So, if you knew another method to use multiple mouse during his time... Why you don't tell us, why you don't release that new code?.

It seems that you are the only person that knows another 'viable' system to get multiple mouse... ;)

Quote
Live with the fact that if you cherish the system mouse, you will have to map all your mice together.  If you only have one mouse then it does not matter.  If you have a mouse hidden away, then how hard is it to change the default controls to use mouse 2?  Or go in safe mode, delete all mice, then re-install the hidden mouse second.

Yes, and after this, howard, you can get two mouse pcb hacks always plugged, and connect the spinner or trackball to those mouse pcb, not use a mouse pcb for each one. with this, you only have to worry about to plug the mouse pcb in the correct order the firts time. So, with one game to can connect the spinner in the mouse 1 pcb and play arkanoid, and then, load marble madness and during the game, disconnect the spinner and connect the trackball in the mouse 1 pcb. This is what I did...
« Last Edit: March 13, 2006, 02:03:33 am by Cananas »

Tiger-Heli

  • Trade Count: (0)
  • Full Member
  • ***
  • Offline Offline
  • Posts: 5447
  • Last login:January 03, 2018, 02:19:23 pm
  • Ron Howard? . . . er, I mean . . . Run, Coward!!!
    • Tiger-Heli
Re: MAME 104u5 out - adds multiple mice
« Reply #10 on: March 13, 2006, 07:17:01 am »
I just want to take a moment again and say thanks to Derrick for adding this feature in.

I have used multiple mice under Mame Analog Plus 0.74, so I am fairly familiar with how they work.

I see very few problems with the way the code has been implemented.

System mouse had some advantages, and some disadvantages.  The code to automatically select between the trackball and spinner with an Opti-Pac is no longer required.  OTOH, you have to set up your mice manually and do a little planning before you start using MAME.  Good!!!

I agree, it would be nice to be able to select "Logitech Mouse" in the ctrlr.cfg files, but if that can't be done easily. . .

Howard - A lot of your comments were valid, but . . .

A MAMEdev adds a feature which was immensely popular in this community and has been missing for the last 30 MAME builds (and was never in a main build before), you start your first comment with "Too bad MAMEdev lacked the foresight . . ."  Later, you drop a hint that there is a better way than raw mouse to get the data but don't provide any additional information.

And then we wonder why MAMEdev is less than friendly towards BYOAC . . . :P
It's not what you take when you leave this world behind you, it's what you leave behind you when you go. - R. Travis.
When all is said and done, generally much more is SAID than DONE.

Cananas

  • Trade Count: (0)
  • Full Member
  • ***
  • Offline Offline
  • Posts: 299
  • Last login:August 27, 2017, 07:39:03 am
  • and the seventh day... PacMan was created
Re: MAME 104u5 out - adds multiple mice
« Reply #11 on: March 13, 2006, 07:30:35 am »
Howard - A lot of your comments were valid, but . . .

A MAMEdev adds a feature which was immensely popular in this community and has been missing for the last 30 MAME builds (and was never in a main build before), you start your first comment with "Too bad MAMEdev lacked the foresight . . ."  Later, you drop a hint that there is a better way than raw mouse to get the data but don't provide any additional information.

And then we wonder why MAMEdev is less than friendly towards BYOAC . . . :P

Absolutely agreed. Nothing more to say. Only, again, thank you, Derrick.

jcrouse

  • Trade Count: (0)
  • Full Member
  • ***
  • Offline Offline
  • Posts: 1027
  • Last login:January 09, 2010, 05:53:51 pm
    • CPViewer
Re: MAME 104u5 out - adds multiple mice
« Reply #12 on: March 13, 2006, 08:08:37 am »
Howard - A lot of your comments were valid, but . . .

A MAMEdev adds a feature which was immensely popular in this community and has been missing for the last 30 MAME builds (and was never in a main build before), you start your first comment with "Too bad MAMEdev lacked the foresight . . ."  Later, you drop a hint that there is a better way than raw mouse to get the data but don't provide any additional information.

And then we wonder why MAMEdev is less than friendly towards BYOAC . . . :P

Absolutely agreed. Nothing more to say. Only, again, thank you, Derrick.

I third that! I think it is awesome to see a DEV gathering feedback from the community.

Thanks Derrick,
John

Minwah

  • Trade Count: (+3)
  • Full Member
  • ***
  • Offline Offline
  • Posts: 7662
  • Last login:January 18, 2019, 05:03:20 am
    • MAMEWAH
Re: MAME 104u5 out - adds multiple mice
« Reply #13 on: March 13, 2006, 08:23:21 am »
After a quick test it does seem to work very well, thanks again Derrick :)

I also don't see any major problems with how it works.  I think I see the point Howard is trying to make, but unless I misunderstand I'm sure it can be got around with having game-specific input mappings.  Given that you know what controls are plugged in when you try to play a game, it should be pretty easy to map the inputs accordingly first...I do this already with a ctrlr file.

Tiger-Heli

  • Trade Count: (0)
  • Full Member
  • ***
  • Offline Offline
  • Posts: 5447
  • Last login:January 03, 2018, 02:19:23 pm
  • Ron Howard? . . . er, I mean . . . Run, Coward!!!
    • Tiger-Heli
Re: MAME 104u5 out - adds multiple mice
« Reply #14 on: March 13, 2006, 09:27:18 am »
Question for Derrick and everyone who has tested this out!

Here is a problem I had with MAME Analog Plus 0.74 and CABAL:

I don't have a MAME cab, but I have two desktop USB trackballs, and I might want to use one or both of them in CABAL.

I plug in both Trackballs and map Player 1 to Mouse 1 and Player 2 to Mouse 2.  The game plays fine.

Now I unplug both Trackballs, plug in only Trackball 1 and play a single player game.  MAME maps Mouse 1 to Player 1, but sets Player 2 as N/A since no Mouse 2 was found.

Now I plug in the second Trackball and restart CABAL.  (Note I did not say hot-swap during the game).  MAME will only work for player 1 b/c Player 2 is mapped to N/A.

I got around this with MAME Analog Plus by making my cabal.ana file read-only after configuring the game with both trackballs connected.

Is this still a problem with 104u5?  And if so, is there a workaround?
It's not what you take when you leave this world behind you, it's what you leave behind you when you go. - R. Travis.
When all is said and done, generally much more is SAID than DONE.

Cananas

  • Trade Count: (0)
  • Full Member
  • ***
  • Offline Offline
  • Posts: 299
  • Last login:August 27, 2017, 07:39:03 am
  • and the seventh day... PacMan was created
Re: MAME 104u5 out - adds multiple mice
« Reply #15 on: March 13, 2006, 10:10:20 am »
I tried Mameplus 104u5 and it seems that when you enable the mouse input, the mouse 1 and mouse 2 and mapped to the player1 input and player2 input by default, even if one of the mice are not connected at all (well I think this is not tottaly true... my touchpad... is here).

But for your question, this version works great.

BTW I tried with Pong. Nothing special, it is the only avaliable game when I installed mameplus.

Tiger-Heli

  • Trade Count: (0)
  • Full Member
  • ***
  • Offline Offline
  • Posts: 5447
  • Last login:January 03, 2018, 02:19:23 pm
  • Ron Howard? . . . er, I mean . . . Run, Coward!!!
    • Tiger-Heli
Re: MAME 104u5 out - adds multiple mice
« Reply #16 on: March 13, 2006, 10:24:28 am »
I tried Mameplus 104u5 and it seems that when you enable the mouse input, the mouse 1 and mouse 2 and mapped to the player1 input and player2 input by default, even if one of the mice are not connected at all (well I think this is not tottaly true... my touchpad... is here).

But for your question, this version works great.

BTW I tried with Pong. Nothing special, it is the only avaliable game when I installed mameplus.
Great! Thanks!!!!
It's not what you take when you leave this world behind you, it's what you leave behind you when you go. - R. Travis.
When all is said and done, generally much more is SAID than DONE.

Derrick Renaud

  • Trade Count: (0)
  • Full Member
  • ***
  • Offline Offline
  • Posts: 299
  • Last login:March 30, 2018, 11:06:19 am
Re: MAME 104u5 out - adds multiple mice
« Reply #17 on: March 13, 2006, 10:33:12 am »
Derrick all I can say is somehow I offend you in my original post and since then you have ignored everything I've said, only hearing what you want to hear.  I'm sorry if I've offended you in some way.
No problem, I am trying to debate facts.  Your original post stating the MAMEdev did not have foresight was wrong, I have tried to correct that.

Unfortuantely that doesn't chagne the fact that you are flat out wrong on some of your assumptions, but since you aren't willing to listen there's no point in me going over them again.  That doesn't mean that I didn't get a few things wrong about how you guys went about it, but considering I haven't even gotten a chance to look at the frikkin source code yet, I'd say I hit it pretty spot on.
Twice now I have given you facts to prove you are wrong.  Your stating for the third time that you are correct without ever providing facts, still does not make you right.  Looking at the source has minimal bearing on the discussion.  We are discussing how windows reports devices.

Lets backtrack to your sidewinder example.  You state that you can use "Sidewinder 2" as the name.  That is great, but do you realize that if you remove Sidewinder 1, then Sidewinder 2 now becomes 1?  Setting joystick priority has no effect on this.  Oddly, that is the exact same behaviour mice now exhibit.

We could use the un-human-readable device id to select device, but then people who want different joysticks to report as joystick 1 would have to continually change their settings.

My problem with your posts are that you are stating some kind of knowledge about an issue that you do not have.

I will say, however that rawmouse is not the only, nor the best way to get individual mouse input in windows or even windowsXp.  You can figure the rest out for yourself.  :)
Crap, you know I was going to use the easier way, but I said, hell, I prefer it more complicated.

This statement alone proves that you are talking out of the wrong hole.  If there is some other way to read individual mouse data in XP then please enlighten the world.  Reflexive would also like to know for their Mouse Party games.

Just in case you think I am trying to turn people against you, that is not the case.  But you have stated that MAMEdev was wrong, and now have stated that I am wrong.  That is what I have a problem with.  I have not ignored what you have said.  I have read and refuted each of your statements.

If you want to debate FACTS then lets do that.  But quit wasting everyones time stating knowledge you do not have.

I am not pretending to be some all powerfull MAMEdev who people are under the false impression does not listen to anything.  I am just a programmer who will listen to usefull input.

D.
« Last Edit: March 13, 2006, 11:07:47 am by Derrick Renaud »

Cananas

  • Trade Count: (0)
  • Full Member
  • ***
  • Offline Offline
  • Posts: 299
  • Last login:August 27, 2017, 07:39:03 am
  • and the seventh day... PacMan was created
Re: MAME 104u5 out - adds multiple mice
« Reply #18 on: March 13, 2006, 10:48:48 am »
One thing that maybe is not clear in the whatsnew:

For now, You must not enable the use_lightgun in order that the rawmouse can works. I am not saying that you must disable only on lightgun games. For any game that you try, enable_lightgun must be off.

Derrick Renaud

  • Trade Count: (0)
  • Full Member
  • ***
  • Offline Offline
  • Posts: 299
  • Last login:March 30, 2018, 11:06:19 am
Re: MAME 104u5 out - adds multiple mice
« Reply #19 on: March 13, 2006, 11:05:11 am »
One thing that maybe is not clear in the whatsnew:

For now, You must not enable the use_lightgun in order that the rawmouse can works. I am not saying that you must disable only on lightgun games. For any game that you try, enable_lightgun must be off.
Correct, per the whatsnew, nothing gets changed if you use lightgun support.  YET.  ;)
« Last Edit: March 13, 2006, 11:22:07 am by Derrick Renaud »

Lilwolf

  • Trade Count: (+1)
  • Full Member
  • ***
  • Offline Offline
  • Posts: 4946
  • Last login:July 31, 2022, 10:26:34 pm
Re: MAME 104u5 out - adds multiple mice
« Reply #20 on: March 14, 2006, 10:59:37 am »
I see Howards point (yet think it could have been mentioned in a nicer way).

I have 3 control panels that are hot swappable with mice on them.   And will probably have a lot more in the future.  I never do it ingame (because I switch my frontend to show the new control panel, it updates the games and the controls for the frontend... swap the control panel and go from there... ie, I can't select a game without first changing the control panel itself).

Here is the issue...

I have a control panel that plugs in and now 2 trackballs make a connection.  Will they always be recognized in the same order?   I haven't tried but I'm guessing they wont be.  But that might be based on the passive hub. 

And if I ever wanted to add a mouse to my system for debugging (that I leave in the cab) I better do it before I start setting everything up.

But after those things being stated.  I now CAN use MAME+XP and multiple mice.  And that is MUCH better then before.  Analog+ mame is great but very outdated.  And having real support gets me a giddy inside!

Anyway, can't wait to see the updates to the light gun games!   

Howard_Casto

  • Idiot Police
  • Trade Count: (+1)
  • Full Member
  • ***
  • Offline Offline
  • Posts: 19400
  • Last login:Yesterday at 10:57:06 pm
  • Your Post's Soul is MINE!!! .......Again??
    • The Dragon King
Re: MAME 104u5 out - adds multiple mice
« Reply #21 on: March 14, 2006, 06:23:42 pm »
I see Howards point (yet think it could have been mentioned in a nicer way).


I'm not picking on you Lilwolf but how come the ONLY slightly negative thing I said was that the mmame devs were short sighted in the way they went about coding this was precieved as "unnice"?  Especially considering I get insults of my programming competancy, my tone, and that my opinon basically doesn't count, as well as wonderfully mature comments like "you are talking out the wrong end" spit at me just because one individual didn't like the fact that I didn't agree with the way they coded in their contribution. 

Is multiple mice in xp a good thing?  Of course, I'm glad to see it added.  Was it added the "right way"?  To steal a phrase, "oh hell no!"

Bad coding structure is bad coding structure I'm sorry some lower level devs get ther feelings hurt if you question their all-knowing directions with the project. 

jcrouse

  • Trade Count: (0)
  • Full Member
  • ***
  • Offline Offline
  • Posts: 1027
  • Last login:January 09, 2010, 05:53:51 pm
    • CPViewer
Re: MAME 104u5 out - adds multiple mice
« Reply #22 on: March 14, 2006, 06:30:42 pm »
Howard,
      With all due respect, it IS your tone. It is ALWAYS your tone. The same thing you just pointed out to LilWolf you tun around and do to Derrick by calling him a low-level dev. That could be interperted as insulting and a judgement of his knowledge. Remember, we all have a common goal for the betterment of the emulation community.

John

Howard_Casto

  • Idiot Police
  • Trade Count: (+1)
  • Full Member
  • ***
  • Offline Offline
  • Posts: 19400
  • Last login:Yesterday at 10:57:06 pm
  • Your Post's Soul is MINE!!! .......Again??
    • The Dragon King
Re: MAME 104u5 out - adds multiple mice
« Reply #23 on: March 14, 2006, 06:49:26 pm »
Exactly, which is why I'm the ONLY one who speaks up when bad code is being put into a good product. 

And for the record, I was referring to my ORIGINAL tone.  Once someone insults me, the kid gloves come off.  So yes, that was intentional.  So with respect, always look at the original conversation, and not the aftermath of someone trying to disrespect me, because I will put them in their place.  :)

There's no nice way to say something is being done wrong to some who thought they were doing good.  Sad, but true. 

But as a gesture of good faith, I would suggest looking at the cpnmouse api (probably not the best method for mame).  And my personal favorite, hooking the wm_input data at a low level, which you can marry with the direct input function to do things exactly as I described... basically linking direct inputs mouse enumeration with the data functions so you can tell which device, not just with device number.  For that matter you can do it just as easily if not easier with rawmouse, but it isn't being done because our dev has decided he knows what's best for us. 

I know the trend right now is to remove optional flags from the mame code, unfortunately that is a very BAD trend.  The problem with it is that leaving the options in doesn't hurt anything and taking old options out usually throws a good percentage of the population out to the curb, looking for other solutions.  Like when Aaron took out the -list details flag, which several fe devs (including myself) depended upon.  Mind you I found an alternate route to get the data, but it requires a fair bit of hoop jumping and I doubt leaving the very small list details function in the mame source would have been the end of the world. 

Derrick Renaud

  • Trade Count: (0)
  • Full Member
  • ***
  • Offline Offline
  • Posts: 299
  • Last login:March 30, 2018, 11:06:19 am
Re: MAME 104u5 out - adds multiple mice
« Reply #24 on: March 14, 2006, 06:55:58 pm »
mature comments like "you are talking out the wrong end" spit at me just because one individual didn't like the fact that I didn't agree with the way they coded in their contribution. 

Is multiple mice in xp a good thing?  Of course, I'm glad to see it added.  Was it added the "right way"?  To steal a phrase, "oh hell no!"

Bad coding structure is bad coding structure I'm sorry some lower level devs get ther feelings hurt if you question their all-knowing directions with the project. 

I stand by my "wrong end" statement.  You have stated that both DX and RAWMOUSE are the wrong way to go.  Yet offer nothing.  That is talking out the wrong end my friend.  If you have this magical knowledge about the best way to access individual mice, then put up, or shut up.

I could care less if you like my contribution.  What I don't like is how you state MAMEdev erred, and that I erred in the code.  Offer no proof.  State things that are completely false, have it refuted, and only offer, "I'm still right" as proof.

Any bad coding structure in RAWMOUSE is forced upon you by Microsoft.  Such as how new mice are added as the first item in the list.  But again please enlighten me on my bad coding skill.  But then like all your statements, you just spit them out and can not back them up.

I am always Man enough to admit when I am wrong, and will publically do so once you offer some proof of this better way.

Otherwise, we will have to leave it as differing opinions from someone who has coded something that works.  And someone who possesses great unspoken knowledge.

D.

Derrick Renaud

  • Trade Count: (0)
  • Full Member
  • ***
  • Offline Offline
  • Posts: 299
  • Last login:March 30, 2018, 11:06:19 am
Re: MAME 104u5 out - adds multiple mice
« Reply #25 on: March 14, 2006, 07:18:28 pm »
But as a gesture of good faith, I would suggest looking at the cpnmouse api (probably not the best method for mame).  And my personal favorite, hooking the wm_input data at a low level, which you can marry with the direct input function to do things exactly as I described... basically linking direct inputs mouse enumeration with the data functions so you can tell which device, not just with device number.  For that matter you can do it just as easily if not easier with rawmouse, but it isn't being done because our dev has decided he knows what's best for us. 
of the world. 
You are truly serious.  Wow.   ::)

Your first answer cpnmouse, was correctly answered by yourself.

Your second answer, also answers what I have been saying about your comments all along.    ???  Complete lack of knowledge on the subject.  WM_INPUT is where I get the data.  The only way you get individual mouse data in XP is from the RAW data supplied there.

You do realize that you are telling me that RAWMOUSE is not the best way to do it and your mysterious other way is to use RAWMOUSE?

You do know that there is no RAW support in Win98/ME?  And that DX can NOT enumerate individual mice in XP.  The whole point of this code.

You do know that we want multi-mouse support in Win98/ME and XP, and for it to function the same in all versions?  That we want that support to be automatic without having to compile separate versions?

You do know that MAME used DX for Win98/ME to get access to individual mice.  That I never changed that.  That I added RAWMOUSE to XP if it is available, which is what you now state is the best way, even though you have said all along that it is not?  (Is there a head blowing up emoticon?)

MAME currently stores mouse data in a DIMOUSESTATE structure.  All MAME windows input code reads this structure to find out what the mouse is doing at the point when a game polls the input.  RAWMOUSE sends data at a fixed rate.  It is up to the programmer to keep track of it until needed.  I convert it to the DIMOUSESTATE structure for 3 reasons.

1, because the button info is 100x easier to use in DX state then RAWMOUSE state.

2, because no MAME code will have to be changed to access it.  Otherwise ton's of MAME code needs to be changed to handle the 2 separate cases.  Which is bad coding practice.  ;)

3, the reason I store it in the DI state is because, like I said before, it is up to the programmer to store it somewhere until needed.  What better place then a structure that requires no other code changes?

I was not trying to get into a dick measuring contest with you.  I could care less what anyone thinks of my coding skills.  I do have a problem with people posting incorrect info as fact though.  I tried over and over to clear up incorrect info you have supplied, all the way up to this post.

But it is time to get back to being productive.  Feel free to correct MAME's mouse handling and send in a proper patch.  I do not have any final binding say on submissions.  If it is better then my code, there are plenty better programmers then me on the MAME team, that are always willing to accept better code.

And so everyone sees it here first, let me be the first to admit it...
I am NOT the world's greatest programmer.
I am the world's best Electronic Technician though.   ;D

D.
« Last Edit: March 14, 2006, 09:38:46 pm by Derrick Renaud »

Derrick Renaud

  • Trade Count: (0)
  • Full Member
  • ***
  • Offline Offline
  • Posts: 299
  • Last login:March 30, 2018, 11:06:19 am
Re: MAME 104u5 out - adds multiple mice
« Reply #26 on: March 14, 2006, 07:56:50 pm »
I have 3 control panels that are hot swappable with mice on them.   And will probably have a lot more in the future.  I never do it ingame (because I switch my frontend to show the new control panel, it updates the games and the controls for the frontend... swap the control panel and go from there... ie, I can't select a game without first changing the control panel itself).
First let me tell you how I handle my controls.  I'll answer your real question later.

I have 2 USB mice in the cabinet with the opto-couplers removed.  Each opto-coupler has GND; 5V; IN1, IN2 per axis.  So I re-route GND, 5V, IN1X, IN2X, IN1Y, IN2Y to my control panel.  That way only the optical part is changed and the mouse is never removed from the system.  I use The centronics printer interface connector on the control panel for easy removal.  Actually I use a 50-pin SCSI type, but same diff.

As a side note, I have since determined that a hacked ball-type mouse is not the way to go.  Something like an opti-pac is a better solution.  The polling rate on 5 different usb mice I have tested is too low.  I had some tests done on an opti-pac, and it does not suffer this problem.  More info on this in a few weeks when I get around to making a page showing all the tests of different mouse interfaces.

I have a control panel that plugs in and now 2 trackballs make a connection.  Will they always be recognized in the same order?   I haven't tried but I'm guessing they wont be.  But that might be based on the passive hub. 
Further tests on a third machine show the reporting follows no repeatable pattern.  That's MS's problem.  Not MAME's.  My tests on Win98 and XP show that the mice will always be listed in the order connected.

Install A, then B, then C.  They show up as A,B,C.  Remove B, the list is now A,C.  Put it back in and we have A,B,C.


Well, actually RAWMOUSE reports C,B,A, but my current WIP fixes that.

I highly recommend using the ctrlr files.  I set one up for every panel I have.

I will be adding -verbose support that will show the names of the mice used and what they are plugged into.  But if you use all the same mice, then they will all show the same name.
eg:
Mouse 1: Logitech Cordless
Mouse 2: HID-compliant mouse
Mouse 3: HID-compliant mouse

Adding this support is a pain.  RAWMOUSE has no provisions for this.  I have to ferret out the info from the registry.

D.
« Last Edit: March 18, 2006, 05:15:28 pm by Derrick Renaud »

Derrick Renaud

  • Trade Count: (0)
  • Full Member
  • ***
  • Offline Offline
  • Posts: 299
  • Last login:March 30, 2018, 11:06:19 am
Re: MAME 104u5 out - adds multiple mice
« Reply #27 on: March 14, 2006, 08:26:04 pm »
I quick note about something I did not clear up.

When I added back in DX7 input support, I did not change anything from the pre 104u2 state.

The code always used it.  But after the compile tools changed, the automatic definition of DX7 was removed.  This change happened at 104u2.  The fix applied by someone at the time was to define a base DX version of 5.  They did not notice that in doing so, the current multi-mouse support was disabled for 104u2-104u4.  I just changed it back to what it was before 104u2.

All that involves is telling the input system to try and use DX7 instead of trying DX5 for the base support.  It will fall back to a lower version if DX7 not found.  Just like always.

Doing this was not needed for my code change.  But not doing it would leave multi-mouse support disabled on non-XP systems.

D.

SirPeale

  • Green Mountain Man
  • Global Moderator
  • Trade Count: (+23)
  • Full Member
  • *****
  • Offline Offline
  • Posts: 12963
  • Last login:August 04, 2023, 09:51:57 am
  • Arcade Repair in New England
    • Arcade Game and Other Coin-Op Projects
Re: MAME 104u5 out - adds multiple mice
« Reply #28 on: March 14, 2006, 09:47:18 pm »

btoddkelley

  • Trade Count: (0)
  • Full Member
  • ***
  • Offline Offline
  • Posts: 247
  • Last login:October 20, 2013, 04:52:05 pm
  • I want to Build My Own Arcade Controls!!
Re: MAME 104u5 out - adds multiple mice
« Reply #29 on: March 14, 2006, 10:01:16 pm »
D, my man, you are wasting your time with Howard. The most dangerous man is always one who does not know what he does not understand.
     Thanks for the great work on dual mice support. I am also a fan of your analog sound work. And if you ever do find a "head blowing up emoticon" maybe it can become Howards avatar.

Todd
For it is not enough to have a good mind, rather the main thing is to apply it well.

- Descartes

Derrick Renaud

  • Trade Count: (0)
  • Full Member
  • ***
  • Offline Offline
  • Posts: 299
  • Last login:March 30, 2018, 11:06:19 am
Re: MAME 104u5 out - adds multiple mice
« Reply #30 on: March 14, 2006, 10:22:39 pm »

Nu-uh!  You're a poopoo head!


Fixed.

I thought I went back and deleted that post.  ;)

Hopefully people have found the whole thread at least a little informative and entertaining.  :D

-------------

Just a little WIP mention.

As I have stated elsewhere, I have fixed the list of mice that RAWMOUSE supports, so new mice get added to the end.  Do not base your ctrlr files on the current code.  Blame MS for supplying the list backwards.

I have added the window clipping for RAWMOUSE and fixed the DX window clipping that I broke.  When using RAW mode you have to do everything yourself.  I was hoping not too many people would notice the mouse leaving the game window when running the game in a window.

I now get the DeviceDesc field for the mouse (the mouse name).  I have to manually search the Registry for this, because once again RAW does not provide much functionality.  This is only used by -verbose to list the mice, just like the joystick names.

Removed -dual_lightgun.  It won't be needed.  Sorry, this means you will have to keep using an older version of MAME until I finish the lightgun support.  It had to go before I can cleanly add the new support.

Still waiting for my Act Labs guns before I can go further.

D.

Derrick Renaud

  • Trade Count: (0)
  • Full Member
  • ***
  • Offline Offline
  • Posts: 299
  • Last login:March 30, 2018, 11:06:19 am
Re: MAME 104u5 out - adds multiple mice
« Reply #31 on: March 14, 2006, 10:30:40 pm »
     Thanks for the great work on dual mice support. I am also a fan of your analog sound work. And if you ever do find a "head blowing up emoticon" maybe it can become Howard's avatar.
I just wanted to use it instead of the  ???

The paradox of RAW being both the wrong way of doing it and the mysterious best way of doing it deserves at least a "robot head blowing up" pic.

I in no way meant to infer wanting to see Howard's head blown up.  I meant it in reference to my head.

D.

rdmustang

  • Trade Count: (0)
  • Full Member
  • ***
  • Offline Offline
  • Posts: 46
  • Last login:February 05, 2011, 12:43:31 pm
  • Planning takes so much time :(
Re: MAME 104u5 out - adds multiple mice
« Reply #32 on: March 14, 2006, 11:05:42 pm »

I have a control panel that plugs in and now 2 trackballs make a connection.  Will they always be recognized in the same order?   I haven't tried but I'm guessing they wont be.  But that might be based on the passive hub. 
My tests on Win98 and XP show that the mice will always be listed in the order connected.

Install A, then B, then C.  They show up as A,B,C.  Remove B, the list is now A,C.  Put it back in and we have A,B,C.


I think Lilwolf's question was "when I plug in the control panel will the mice be detected in the same order every time" since both mice are connected simultaneously.  I have a similar question.. when I power up the computer, will Windows detect both of my mice (2 trackballs) in the same order?  Or will I need to boot windows, then manually connect trackball 1, then manually connect trackball 2?

Derrick Renaud

  • Trade Count: (0)
  • Full Member
  • ***
  • Offline Offline
  • Posts: 299
  • Last login:March 30, 2018, 11:06:19 am
Re: MAME 104u5 out - adds multiple mice
« Reply #33 on: March 14, 2006, 11:30:48 pm »
I think Lilwolf's question was "when I plug in the control panel will the mice be detected in the same order every time" since both mice are connected simultaneously.  I have a similar question.. when I power up the computer, will Windows detect both of my mice (2 trackballs) in the same order?  Or will I need to boot windows, then manually connect trackball 1, then manually connect trackball 2?
My testing shows they will maintain the order in which they were first installed.  Turning off the computer will not change that.

Only going into safe mode and deleting all mice, then re-installing them will change the order.

Any mouse you remove while power is off or on or change USB port seems to always return to it's initial place in the list.

Think of it as books stacked alphabetically.  Remove a book and the list gets shorter and the missing book gets skipped.  When you return the book alphabetically it is returned to it's original place.


Unfortunately further testing on a third machine shows what I said is not always true.  There will be no easy solution.  Naming the devices will work, if you have only 1 of each type of device.  But if you have 2+ of a device, there is no easy way of knowing which is which.  Unless it is always plugged into the same USB port.  Adding any support for marrying a device to a MAME input may cause as many problems as it creates.  So I have no interest at the moment.

D.
« Last Edit: March 18, 2006, 04:56:35 pm by Derrick Renaud »

Farmboy90

  • Trade Count: (0)
  • Full Member
  • ***
  • Offline Offline
  • Posts: 294
  • Last login:June 26, 2006, 12:15:04 am
  • My cab is done... Pics coming soon!!
Re: MAME 104u5 out - adds multiple mice
« Reply #34 on: March 14, 2006, 11:31:07 pm »

Removed -dual_lightgun.  It won't be needed.  Sorry, this means you will have to keep using an older version of MAME until I finish the lightgun support.  It had to go before I can cleanly add the new support.

Still waiting for my Act Labs guns before I can go further.

D.

Hey Derrick,

What does this mean for LCD TopGun users?  I am just trying to understnad the impact, so forgive me if if I get some of this incorrect.  

I suppose even with your upcoming light gun fix we will be unaffected?  I mean if we do nothing but upgrade to whatever forthcoming version of mame contains the light gun code, things will work as before.  However if EMS fixes their driver, then we can drop the GunCon2 drivers, use theirs, use the upcoming mame, and have dual tracking guns?  

Is that correct?

Thanks again!

EDIT ****

By the way, if you need someone to test your code with two guns, count me in.  :)
« Last Edit: March 14, 2006, 11:43:50 pm by Farmboy90 »

Derrick Renaud

  • Trade Count: (0)
  • Full Member
  • ***
  • Offline Offline
  • Posts: 299
  • Last login:March 30, 2018, 11:06:19 am
Re: MAME 104u5 out - adds multiple mice
« Reply #35 on: March 14, 2006, 11:57:46 pm »

Removed -dual_lightgun.  It won't be needed.  Sorry, this means you will have to keep using an older version of MAME until I finish the lightgun support.  It had to go before I can cleanly add the new support.

Still waiting for my Act Labs guns before I can go further.

D.

Hey Derrick,

What does this mean for LCD TopGun users?  I am just trying to understnad the impact, so forgive me if if I get some of this incorrect.  

I suppose even with your upcoming light gun fix we will be unaffected?  I mean if we do nothing but upgrade to whatever forthcoming version of mame contains the light gun code, things will work as before.  However if EMS fixes their driver and they get the guns to be reported as mice, then we can drop the GunCon2 drivers, use theirs, use the upcoming mame, and have dual tracking guns?  
ay, if you need someone to test your code with two guns, count me in.  :)

Correct, except for 1 small thing.

Act Labs is being a lot more co-operative then EMS.  So my main concern is to get multiple (2+) guns working for them.  If it works for TopGun down the road, then great.

Removing -dual_lightgun will have no affect on you.

In the meantime don't get worked up over it until I get the Act Labs guns and have the code fully tested.  The Act Labs guns should work automatically with the new code in multi-gun mode.

D.

Derrick Renaud

  • Trade Count: (0)
  • Full Member
  • ***
  • Offline Offline
  • Posts: 299
  • Last login:March 30, 2018, 11:06:19 am
Re: MAME 104u5 out - adds multiple mice
« Reply #36 on: March 15, 2006, 12:32:23 am »
not the best method for mame).  And my personal favorite, hooking the wm_input data at a low level, which you can marry with the direct input function to do things exactly as I described... basically linking direct inputs mouse enumeration with the data functions so you can tell which device, not just with device number.  For that matter you can do it just as easily if not easier with rawmouse, but it isn't being done because our dev has decided he knows what's best for us. 

I'll try not to stir the pot again much, but let me delve into this closer.

You can not link the DX enumeration with the RAW stuff, because DX does not enumerate mice in XP.  But instead of going on about how wrong everything you state here is, I will pull out what you are trying to get at.

You want to use the GUID.  The device independent number that individually tracks a control device.  First off, this number is valid only for the current install and will change if you have to re-install your OS or change motherboards whatever.  So keep that in mind.

Just using the DeviceDesc is not good enough.  If you have 2 identical mice they will be reported the same.
Mouse 1: Logitech Mouse
Mouse 2: Logitech Mouse

So the only way to do what you say is to use the GUID which is not a userfriendly thing to see.  Think hash code.  And this can change as I mentioned.

Now if we marry the GUID to the selected control, you will still have to set up your controls no different then now.  It is just 6 of one and a half dozen of the other.

Say a person has 2 styles of joystick that he wants to be able to change.  Using GUID he would have to pick the one he wants to use only or setup the controls to use both.  Without using GUID, he just plugs the joystick in and it works as player 1 no matter which joystick he uses.

No matter which way you go about it you have to set up your controls.  GUID is no magical answer, and it will annoy as many people as those who might like it to be used.

So now the cry goes up that says, well we could code it to do both, add all sorts of options, etc.

Well, I'm not interested in coding it, because the current way will work for 99% of the users.  So we leave this where we leave all wondrous ideas.  Code it, and submit it.  Unless something interests someone enough to code it themselves it won't get done.  And before anyone asks, adding a -use_GUID won't fly.

Also remember acessing the mouse GUID is different on XP then other versions of windows.  But not hard to figure out if the coder knows anything about DX and RAW support.

D.
« Last Edit: March 15, 2006, 12:42:38 am by Derrick Renaud »

krick

  • Trade Count: (+1)
  • Full Member
  • ***
  • Offline Offline
  • Posts: 2006
  • Last login:February 08, 2023, 08:30:27 pm
  • Gotta have blue hair.
Re: MAME 104u5 out - adds multiple mice
« Reply #37 on: March 15, 2006, 12:48:25 am »
I think Lilwolf's question was "when I plug in the control panel will the mice be detected in the same order every time" since both mice are connected simultaneously.  I have a similar question.. when I power up the computer, will Windows detect both of my mice (2 trackballs) in the same order?  Or will I need to boot windows, then manually connect trackball 1, then manually connect trackball 2?
My testing shows they will maintain the order in which they were first installed.  Turning off the computer will not change that.

Only going into safe mode and deleting all mice, then re-installing them will change the order.

Any mouse you remove while power is off or on or change USB port seems to always return to it's initial place in the list.


There have been many reports of USB input devices (mainly gamepads) with the same name and ID swapping in windows.

In fact, some of the interface vendors actually offer devices with different USB IDs in case you want to use two (or more) on the same machine...

http://dave.bit2000.com/aki.html
http://groovygamegear.com/webstore/index.php?main_page=product_info&cPath=76_81&products_id=234

So it definitely *can* happen.  But no guarantees that it *will*.

This has been discussed quite a bit and there are ways to minimize or eliminate the problem that are lovingly documented by Tigerheli...

http://www.mameworld.net/tigerheli/encoder/main.htm#USB_Device_IDs
Hantarex Polo 15KHz
Sapphire Radeon HD 7750 2GB (GCN)
GroovyMAME 0.197.017h_d3d9ex
CRT Emudriver & CRT Tools 2.0 beta 13 (Crimson 16.2.1 for GCN cards)
Windows 7 Home Premium 64-bit
Intel Core i7-4790K @ 4.8GHz
ASUS Z87M-PLUS Motherboard

Minwah

  • Trade Count: (+3)
  • Full Member
  • ***
  • Offline Offline
  • Posts: 7662
  • Last login:January 18, 2019, 05:03:20 am
    • MAMEWAH
Re: MAME 104u5 out - adds multiple mice
« Reply #38 on: March 15, 2006, 05:14:41 am »
I have 2 USB mice in the cabinet with the opto-couplers removed.  Each opto-coupler has GND; 5V; IN1, IN2 per axis.  So I re-route GND, 5V, IN1X, IN2X, IN1Y, IN2Y to my control panel.  That way only the optical part is changed and the mouse is never removed from the system.  I use The centronics printer interface connector on the control panel for easy removal.  Actually I use a 50-pin SCSI type, but same diff.

Just curious...I have never done this because I was worried unplugging/plugging the optics to a mouse (plugged in with the pc switched on) might be bad, or could damamge the USB port.  I gather since you do it this is not the case, or do you switch off first?

Also, I thought the ordering of device's in XP is alphanumerical based on device name?  I can't really test this atm, so I could well be wrong...

Derrick Renaud

  • Trade Count: (0)
  • Full Member
  • ***
  • Offline Offline
  • Posts: 299
  • Last login:March 30, 2018, 11:06:19 am
Re: MAME 104u5 out - adds multiple mice
« Reply #39 on: March 15, 2006, 08:32:12 am »
I have 2 USB mice in the cabinet with the opto-couplers removed.  Each opto-coupler has GND; 5V; IN1, IN2 per axis.  So I re-route GND, 5V, IN1X, IN2X, IN1Y, IN2Y to my control panel.  That way only the optical part is changed and the mouse is never removed from the system.  I use The centronics printer interface connector on the control panel for easy removal.  Actually I use a 50-pin SCSI type, but same diff.

Just curious...I have never done this because I was worried unplugging/plugging the optics to a mouse (plugged in with the pc switched on) might be bad, or could damamge the USB port.  I gather since you do it this is not the case, or do you switch off first?
No problems changing the optics while powered.  But as always, care sould be taken not to short things out.  Just use a good connector.

Also, I thought the ordering of device's in XP is alphanumerical based on device name?  I can't really test this atm, so I could well be wrong...
My tests show that it works as I have described. 2 computers with 2 OS each.