The NEW Build Your Own Arcade Controls

Main => Software Forum => Topic started by: Tiger-Heli on March 11, 2006, 08:36:15 am

Title: MAME 104u5 out - adds multiple mice
Post by: Tiger-Heli on March 11, 2006, 08:36:15 am
Haven't tried it, just saw the whatsnew.txt, but thought you might want to know!!!
Title: Re: MAME 104u5 out - adds multiple mice
Post by: Howard_Casto 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. 
Title: Re: MAME 104u5 out - adds multiple mice
Post by: Derrick Renaud 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.
Title: Re: MAME 104u5 out - adds multiple mice
Post by: Grasshopper on March 12, 2006, 01:46:47 pm
Interesting. Is this inability to deal with hot-swapping also a problem in Linux?
Title: Re: MAME 104u5 out - adds multiple mice
Post by: Howard_Casto 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. 
Title: Re: MAME 104u5 out - adds multiple mice
Post by: Derrick Renaud 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.
Title: Re: MAME 104u5 out - adds multiple mice
Post by: Circo 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.
Title: Re: MAME 104u5 out - adds multiple mice
Post by: Howard_Casto 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.  :)
Title: Re: MAME 104u5 out - adds multiple mice
Post by: jerryjanis 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
Title: Re: MAME 104u5 out - adds multiple mice
Post by: Cananas 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...
Title: Re: MAME 104u5 out - adds multiple mice
Post by: Tiger-Heli 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
Title: Re: MAME 104u5 out - adds multiple mice
Post by: Cananas 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.
Title: Re: MAME 104u5 out - adds multiple mice
Post by: jcrouse 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
Title: Re: MAME 104u5 out - adds multiple mice
Post by: Minwah 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.
Title: Re: MAME 104u5 out - adds multiple mice
Post by: Tiger-Heli 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?
Title: Re: MAME 104u5 out - adds multiple mice
Post by: Cananas 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.
Title: Re: MAME 104u5 out - adds multiple mice
Post by: Tiger-Heli 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!!!!
Title: Re: MAME 104u5 out - adds multiple mice
Post by: Derrick Renaud 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.
Title: Re: MAME 104u5 out - adds multiple mice
Post by: Cananas 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.
Title: Re: MAME 104u5 out - adds multiple mice
Post by: Derrick Renaud 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.  ;)
Title: Re: MAME 104u5 out - adds multiple mice
Post by: Lilwolf 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!   
Title: Re: MAME 104u5 out - adds multiple mice
Post by: Howard_Casto 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. 
Title: Re: MAME 104u5 out - adds multiple mice
Post by: jcrouse 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
Title: Re: MAME 104u5 out - adds multiple mice
Post by: Howard_Casto 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. 
Title: Re: MAME 104u5 out - adds multiple mice
Post by: Derrick Renaud 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.
Title: Re: MAME 104u5 out - adds multiple mice
Post by: Derrick Renaud 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.
Title: Re: MAME 104u5 out - adds multiple mice
Post by: Derrick Renaud 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.
Title: Re: MAME 104u5 out - adds multiple mice
Post by: Derrick Renaud 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.
Title: Re: MAME 104u5 out - adds multiple mice
Post by: SirPeale on March 14, 2006, 09:47:18 pm

You're a nana poopoo head.  Bleah!



Nu-uh!  You're a poopoo head!


Fixed.
Title: Re: MAME 104u5 out - adds multiple mice
Post by: btoddkelley 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
Title: Re: MAME 104u5 out - adds multiple mice
Post by: Derrick Renaud 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.
Title: Re: MAME 104u5 out - adds multiple mice
Post by: Derrick Renaud 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.
Title: Re: MAME 104u5 out - adds multiple mice
Post by: rdmustang 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?
Title: Re: MAME 104u5 out - adds multiple mice
Post by: Derrick Renaud 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.
Title: Re: MAME 104u5 out - adds multiple mice
Post by: Farmboy90 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.  :)
Title: Re: MAME 104u5 out - adds multiple mice
Post by: Derrick Renaud 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.
Title: Re: MAME 104u5 out - adds multiple mice
Post by: Derrick Renaud 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.
Title: Re: MAME 104u5 out - adds multiple mice
Post by: krick 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
Title: Re: MAME 104u5 out - adds multiple mice
Post by: Minwah 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...
Title: Re: MAME 104u5 out - adds multiple mice
Post by: Derrick Renaud 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.
Title: Re: MAME 104u5 out - adds multiple mice
Post by: sWampy on March 15, 2006, 08:53:14 am
Damn you guys.   Now I'm going to end up wanting a 2nd trackball for the few games that support 2, and 2 of those new light guns.  You just cost me $150!  :P
Title: Re: MAME 104u5 out - adds multiple mice
Post by: Lilwolf on March 15, 2006, 01:44:00 pm
I currently hotswap (with my tac-strips) the usb itself so with one tac-switch I can use a mouse/keyboard for config.  My trackball control panel.  My spinner control panel.  ect.   

But my guns will be (hopefully) plugged in 24/7 so it shouldn't be an issue for me at all. 

I would love if we could setup a 'all mice inputs' that would allow any mice button 1 to go to all that have any mice button 1.  Nice feature to imitate system mouse. 

But at this point, I'm happy with whatever I can get :)  I kept thinking of looking at analog+mame code and see if I could try merging it over to an updated mame... but I've been considering it for over a year and haven't got time yet...

Thanks Derrick!

Title: Re: MAME 104u5 out - adds multiple mice
Post by: krick on March 15, 2006, 02:00:18 pm
But at this point, I'm happy with whatever I can get :)  I kept thinking of looking at analog+mame code and see if I could try merging it over to an updated mame... but I've been considering it for over a year and haven't got time yet...

You and me both.  I've looked at that analog mame code more times than I can count.  I just couldn't seem to wrap my brain around a good clean way to merge it into the official source.

I think everyone owes Derrick a beer.

As an amusing (at least to me) side note, I loathe XP and refuse to use it on my own computers.  I just wanted to add XP rawmouse support "for the good of the MAME community".

Title: Re: MAME 104u5 out - adds multiple mice
Post by: jcrouse on March 15, 2006, 02:05:30 pm
As an amusing (at least to me) side note, I loathe XP and refuse to use it on my own computers

I am curious why and what you do use.

John
Title: Re: MAME 104u5 out - adds multiple mice
Post by: jerryjanis on March 15, 2006, 02:28:10 pm
As an amusing (at least to me) side note, I loathe XP and refuse to use it on my own computers.  I just wanted to add XP rawmouse support "for the good of the MAME community".

That's funny, me too.  It's not fair for me to have all the multimouse fun while the majority of users are stuck without it because Windows doesn't support it.
Title: Re: MAME 104u5 out - adds multiple mice
Post by: krick on March 15, 2006, 02:38:40 pm
As an amusing (at least to me) side note, I loathe XP and refuse to use it on my own computers

I am curious why and what you do use.


I use Windows 2000 + Unofficial Service Pack 5.1 on my non-MAME computers and
I use Windows 98SE + Unofficial 98SE Service Pack 2.1a on my dedicated MAME machine.

For general use, Windows 2000 is completely adequate for my needs.  There's nothing I do that justifies an upgrade to XP.

There's several things I don't like about Windows XP vs 2000.  First and foremost is product activation.  I do a LOT of hardware upgrading in my household.  I'd really rather not have to call Microsoft every time I do a motherboard upgrade.  Another thing I don't like is the "clown car" color scheme and "improved" UI.  I know that I can turn it off but I don't really see why they did it at all since it looks awful.

For a dedicated MAME computer, I think XP is overkill.  I prefer 98SE because of the much lower resource overhead.  Plus, I find 98SE much easier to customize and tweak for optimal MAME cabinet use.

Of course, 98SE has some limitations...

max 120GB drive size, max 1GB memory, no dual core or hyperthreading support, no PCI express support, no chipset drivers on some chipsets like nForce 4, etc...

But for a MAME cabinet using an ArcadeVGA card, none of these problems really affect me.

DOS and Linux are also appealing alternatives to 98SE that each have their own particular strengths and weaknesses.

I'm sure that people will disagree with my opinion on XP and that's fine.  It's just my opinion.  Everyone is free to use whatever they think is best for their situation.
Title: Re: MAME 104u5 out - adds multiple mice
Post by: jcrouse on March 15, 2006, 02:57:24 pm
Another thing I don't like is the "clown car" color scheme and "improved" UI.  I know that I can turn it off but I don't really see why they did it at all since it looks awful.

We politely refer to that as the "Fisher-Price" interface. Very appropriate.

John
Title: Re: MAME 104u5 out - adds multiple mice
Post by: screaming on March 15, 2006, 06:39:55 pm
Who's polite?
Title: Re: MAME 104u5 out - adds multiple mice
Post by: u_rebelscum on March 15, 2006, 07:19:55 pm
Derrick, a BIG thanks for doing the work I was too lazy buzy to try to do! ;)  (Sounds like I hate RawInput as much as you do.)  And you came up with probably the best solution to the remapping problem with sysmouse.

As far as multiple lightguns go, here's my ~2 year old info on it on actlab lightguns (if you need it):  directX directInput on winME can do lightguns in both relative and absolute mode with the original actlab USB & TV lightguns.  Some games in mame seem to be be accurate in rel mode, other in abs mode.  Of course, this was back when mame's core stored the analog info in ~256 values (-128 to 128), unlike the current 128K. 
(Ignoring system mouse, of course) Abs mode had a ~0-64k range but rel had a max delta of ~[+-]32k, as printed to screen in test code.  However, I had to do some hacks so that (I think) the code was treating the rel mode as if it had a [+-]64k delta, or mame core could store 128 values (-64 to 64 delta); none of the relative stuff made sense to me, but that's what worked.

As you probably know, Jake did virtually all the rawInput code used in Analog+, but I know enough that it used relative mode in the multiple lightgun w/ rawInput function, and translated the input to a -128 to 128 delta and pasted to the core delta.

So MameAnalog+ had four ways to do multiple lightguns: the official mame win32 dual lightgun way, directInput relative way, directInput absolute way, and RI relative way.  As I said, some games were more accurate across the whole sceen and over short distances with absolute, others with relative directInput.  I hope the core changes since than will let you use one or the other directInput mode, and you kill the current win32 API way.


I like the new core analog input stuff added since 0.84, and they look much better suited for multiple lightgun support than the old way; I hope you prove me right.

If you need any more info, or a loan of a pair of old actlab USB, old actlab TV, or the new EMI guns, let me know.  I'll probably be slow in response, though.  (My CRT monitor is in the shop, so I can't test the actlab guns myself ATM.)


Oh, and about Howard: he's abrasive and doesn't know it all the time.  It's not unique to him; you probably heard of all the studies on email and messaging that show that 75%-90% of the emails/messages/posts do not read as the writer expected the reader to see it.  But Howard's very, umm...  Howard.
Title: Re: MAME 104u5 out - adds multiple mice
Post by: u_rebelscum on March 15, 2006, 07:28:09 pm
All right guys who see where Howard's coming from...  What is(are) his point(s)?

I see two:
He wants a name instead of a mouse number, and that saved to cfg & ctrlr files.
He wants the system mouse.
Am I missing any others?

Here's my 2 cents on these two points, starting from the the general, going to the latter issue, then the former.  (Mind that I very much see this from Derrick's view because I've been through this before, abit years ago.)

Both issues are about playability and user interface.  You know what that means: not important to mame's goal.
The code was written by one person, Derrick, based on Jake's code.  Not by "MameDev" as a whole.
I will not address the reasons Howard put forward, as Derrick addressed them already.


System Mouse:
In hindsight, I made a bad choice years ago and should have only allowed sysmouse with singlemouse enabled (or multiplemice disabled, depending on which analog+ version).  The support I had to give to the problems people had because of it, the limited times (aka never) that a person should use sysmouse & another mouse at the same time, the ugly code used because of sysmouse... yech.  IMO, the only time sysmouse should be used is if/when mame is run with a singlemouse option enabled. 
Until then, a ctrlr file with all mouse inputs (dial, trackball, and buttons) set to include mouse1 or mouse2 or mouse3 or .... or mouse8 will do the trick fine.  This does have some limits that with a sysmouse would not, but not very many, and is way more flexible.  (I prefer flexibility over ease, others might feel different.)
Does mame NEED sysmouse or, IMO better, a single mouse option?  No, but a single mouse option would be extra frosting on the cake.  Sysmouse included while multiple mousing should be avoided.


Mouse Name:
I don't think this is a mouse issue.  I think this is a joystick AND mouse issue in the current mame (joystick since 0.84). 
Mame's cfg & ctrlr files save both joystick & mouse with numbers, not their names. 
Both mouse & joy have renumbering problems with two devices that claim to be the exact same device (due to USB boot-time race conditions, not mame). 
Both would have naming numbering problems with any two devices that share the same name. 
(In winXP) Both can use any port-type device (USB, PS/2, gameport, serial, ect).
(In winXP) Joysticks can have one (1) "primary" joystick, the others number in whatever way windows number them.  Mice can't set a primary mouse, but otherwise they're the same.  (Even more so, from what I hear, since setting primary joystick doesn't aways work for everyone.)

Complaining that the new rawInput code doesn't do more than mame's older-but-still-used joystick code misses the real problem.  Especially since the new rawInput code makes each mouse look to a user almost like a joystick.  More especially since rawInput makes names very very hard, compared to directInput & joysticks.  IMO, both the joystick and the mouse naming problem should be addressed together (if possible).


To sum up my 2 cents:
"No sysmouse" has a simple work around, the "no mouse name" shouldn't be even looked at by itself but together with the related joystick issue.
Title: Re: MAME 104u5 out - adds multiple mice
Post by: Silver on March 15, 2006, 08:19:20 pm
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.

May be jumping the gun here, but thought I'd just mention something about the TopGuns:

They have hard-coded co-ordinates. So whatever area/size you calibrate them to they pass:

X Min =  160
X Max =  672
Y Min = 32
Y Max = 224

In Hex:

X Min =  A0
X Max =  2A0
Y Min = 20
Y Max = EO

Also, sorry to hear EMS are not co-operating. What kind of info are you after? If its driver related, then I know Smog has been updating his HID-input Guncon(mouse) driver, and now has a Topgun mode where it uses the above values (I believe). New (14/3/06) Driver is here:

http://xoomer.virgilio.it/smogdragon/ (http://xoomer.virgilio.it/smogdragon/)

Title: Re: MAME 104u5 out - adds multiple mice
Post by: Derrick Renaud on March 15, 2006, 09:59:06 pm
Also, sorry to hear EMS are not co-operating. What kind of info are you after?
When I contacted Act Labs, their response was 'great, how can we help?'  EMS response was 'that's great, good luck with that.'  :)

D.
Title: Re: MAME 104u5 out - adds multiple mice
Post by: Derrick Renaud on March 15, 2006, 10:41:34 pm
Hi Robin,

I wanted to mention you in this thread, but then it went down hill, so I did not want to drag you into it.  ;)

But now that you are here, I want to also extend credit to you for my recent addition.  While I did not look at analog+ for my code, I just used Jake's raw_mouse.c, your code was instrumental in my work.

I'm not sure that everyone knows the current Win98/Me support in MAME is your work.  If it was not there, it would have been harder to add the RAWMOUSE support.  But because it was there, my code just plugged right in.

The rest of your analog+ code that helps with real controls would be nice to salvage one day too.  I have mentioned elsewhere that I would like to create some kind of real-input system for MAME, but that's a long way off.

The code was written by one person, Derrick, based on Jake's code.  Not by "MameDev" as a whole.
I will not address the reasons Howard put forward, as Derrick addressed them already.
And most of his complaints, other the system mouse, had nothing to do with me.  And IMHO nothing to do with MAMEdev.  It is not our fault that handling controls is such a pain in windows.  Why is MAME at fault for not jumping through hoops to patch all of windows little nuances?  Talk to MS.  Anyways, further discussion here will only go downhill.

System Mouse:
In hindsight, I made a bad choice years ago and should have only allowed sysmouse with singlemouse enabled (or multiplemice disabled, depending on which analog+ version).  The support I had to give to the problems people had because of it, the limited times (aka never) that a person should use sysmouse & another mouse at the same time, the ugly code used because of sysmouse... yech.  IMO, the only time sysmouse should be used is if/when mame is run with a singlemouse option enabled. 
Until then, a ctrlr file with all mouse inputs (dial, trackball, and buttons) set to include mouse1 or mouse2 or mouse3 or .... or mouse8 will do the trick fine.  This does have some limits that with a sysmouse would not, but not very many, and is way more flexible.  (I prefer flexibility over ease, others might feel different.)
Does mame NEED sysmouse or, IMO better, a single mouse option?  No, but a single mouse option would be extra frosting on the cake.  Sysmouse included while multiple mousing should be avoided.
Thanks for backing me up on this.  Including sysmouse only complicates the code.  And would make my upcoming lightgun code a pain.  It really is not hard to make a ctrlr file.  And as I have stated before, no one would suggest that all joysticks should be mapped together by default.

Mouse Name:
I don't think this is a mouse issue.  I think this is a joystick AND mouse issue in the current mame (joystick since 0.84). 
Mame's cfg & ctrlr files save both joystick & mouse with numbers, not their names. 
Both mouse & joy have renumbering problems with two devices that claim to be the exact same device (due to USB boot-time race conditions, not mame). 
Both would have naming numbering problems with any two devices that share the same name. 
(In winXP) Both can use any port-type device (USB, PS/2, gameport, serial, ect).
(In winXP) Joysticks can have one (1) "primary" joystick, the others number in whatever way windows number them.  Mice can't set a primary mouse, but otherwise they're the same.  (Even more so, from what I hear, since setting primary joystick doesn't aways work for everyone.)

Complaining that the new rawInput code doesn't do more than mame's older-but-still-used joystick code misses the real problem.  Especially since the new rawInput code makes each mouse look to a user almost like a joystick.  More especially since rawInput makes names very very hard, compared to directInput & joysticks.  IMO, both the joystick and the mouse naming problem should be addressed together (if possible).
Thanks.  This is what started my rant, because someone is under the false impression that all of this is MAMEdev's fault.  Maybe if the huge MS corp had made this easier and less buggy to do, the the small hobbyist of MAMEdev would not have to waste their time trying to make stuff work in all circumstances.

I know people think MAMEdev is some huge conglomerate whose only goal is to annoy the masses, but it really is just hobbyist.  How many times must people be told that we are not there to serve their whims.  If they have great ideas that must be in MAME, then code them and submit them like everyone else.  Oops I'm starting to rant.

Anyways, I have added code that uses the RAWMOUSE name to look up the real mouse device name in the registry.  Of course this does nothing other then to report the names in -verbose mode just like the joysticks.  But it is even worse in XP because, most mice just rely on windows\inf\input.inf for their name which makes them show all as "HID-compatible mouse."

I now have to convince the lightgun makers to supply an inf that names their device.  Or someone could maintain an input.inf file with all the known lightguns, mice and joysticks named.  Any takers?  This would be easier then trying to get all the companies on-board.  EDIT- Have found where the name is stored.

As for marrying an input device to a MAME input, there is more then just the name needed.  You really need to use the guidInstance field.  That is the only unique way of doing it.  And of course it is MAMEdev's fault that the GUID reported for a device in the registry has no bearing on the GUID reported by RAWMOUSE.   ;)

To sum up my 2 cents:
"No sysmouse" has a simple work around, the "no mouse name" shouldn't be even looked at by itself but together with the related joystick issue.
Sanity prevails.

Lets finish up with some good news.  First people won't be hearing much from me for a while.   ;D  Second, I just received the Act-labs guns, so testing and coding will now commence.

D.
Title: Re: MAME 104u5 out - adds multiple mice
Post by: MKChamp on March 15, 2006, 10:42:21 pm
I wouldn't necessarily mean that they wouldn't help. From my emails with them, it is very apparent English is not their native language...
Title: Re: MAME 104u5 out - adds multiple mice
Post by: Derrick Renaud on March 15, 2006, 11:14:23 pm
I wouldn't necessarily mean that they wouldn't help. From my emails with them, it is very apparent English is not their native language...
I agree about the English part.  But it is quite clear that their policy is to just help users getting the guns working as is.  I'm on my own if I want to improve things.  They did state that they are working on a proper driver, but it will be a while.  But their policy forbids supporting me.  Even though they promote their guns to be used with MAME.

So my priority is to improve the Actlabs support, allowing them to use as many guns as you want without -dual_lightgun.  If that helps the topgun, then that is just a side effect at the moment.

That is all I will say on the subject.  But I will state one last time, don't worry about it at this point.  With their supplied drivers, it will never be plug and play with MAME.  They only begin to work when using 3rd party drivers.

D.
Title: Re: MAME 104u5 out - adds multiple mice
Post by: dabone on March 16, 2006, 12:23:59 am
Derrick, I would like to say one thing about your work...


THANK YOU.



(I've had 2 USB guns for over 2 years now, and it's going to be great to not have to argue with older versions of analog mame... (No offence urebel))

I could care less about names/raw mouse/etc just as long as mame can tell what mouse is pulling the *(*^(^&*%*&%*& trigger..

Thanks again for your hard work.


Later,
dabone
Title: Re: MAME 104u5 out - adds multiple mice
Post by: Derrick Renaud on March 16, 2006, 10:31:01 am
I tried a third computer and the mice positions in the installed list jump around on it.  Way to go MS.

Not a high priority to fix MS bugs though.
Title: Re: MAME 104u5 out - adds multiple mice
Post by: sWampy on March 16, 2006, 11:01:09 am
I wouldn't necessarily mean that they wouldn't help. From my emails with them, it is very apparent English is not their native language...
So my priority is to improve the Actlabs support, allowing them to use as many guns as you want without -dual_lightgun.  If that helps the topgun, then that is just a side effect at the moment.

This is sort of sad news, I was hoping that the topgun guns would quickly work as well or better than the act guns to give act a little competition so maybe the price would drop from the absurd price of $169 a pair.
Title: Re: MAME 104u5 out - adds multiple mice
Post by: Minwah on March 16, 2006, 11:04:54 am
This is sort of sad news, I was hoping that the topgun guns would quickly work as well or better than the act guns to give act a little competition so maybe the price would drop from the absurd price of $169 a pair.

I don't think Derrick should have to worry about it.  Let's not forget Acorn & Smog's drivers were not intended for the LCDTopGun (it wasn't even released).  I'm sure in time all will be well.
Title: Re: MAME 104u5 out - adds multiple mice
Post by: whammoed on March 16, 2006, 11:08:46 am
I tried a third computer and the mice positions in the installed list jump around on it.  Way to go MS.

Not a high priority to fix MS bugs though.


The order can change in Linux too.  I've seen my mouse order change based on whether I have another device (keyboard) plugged in or not.  ::)
In advmame in linux using the event interface, it first sorts by device name and then by system order.  This works real nice of course when you have either different mice or sequentially named units like groovygamegears optiwiz and other usb devices RandyT sells.  As long as you keep things plugged in, they will always be in the correct order in mame and everything stays mapped just right.

Anyway, great job on adding that functionality.  Its nice to have options.
Title: Re: MAME 104u5 out - adds multiple mice
Post by: sWampy on March 16, 2006, 05:43:18 pm
This is sort of sad news, I was hoping that the topgun guns would quickly work as well or better than the act guns to give act a little competition so maybe the price would drop from the absurd price of $169 a pair.

I don't think Derrick should have to worry about it.  Let's not forget Acorn & Smog's drivers were not intended for the LCDTopGun (it wasn't even released).  I'm sure in time all will be well.

I don't think he should worry, I was just babbling.   I just hope someone will ship a pallet or 2 of these lcdtopguns to the US/UK so the price shipped can get down to around $35 each, to help drive the price of the act-labs guns down close to that level.   I'm just a little afraid if they don't work near perfect in mame, nobody will put up the money to ship enough of them over here at once to get the price down, causing act to rethink their pricing.   With the LCDtopGuns at $50+ shipped and not working as well as the act ones, act has no reason at all to go down.
Title: Re: MAME 104u5 out - adds multiple mice
Post by: Farmboy90 on March 16, 2006, 05:53:11 pm
With the LCDtopGuns at $50+ shipped and not working as well as the act ones, act has no reason at all to go down.

I disagree.  I don't know anyone who has been able to make dual act lab guns work with MAME.  And I don't know anyone with two LCD TopGuns who isn't playing mame wonderfully with them.  Those guns ROCK.  And it was only $94 for two of them, shipped.  So the price is only $47 per gun.

You are right though that someone should import a huge ass pallet of them.  Because I would have loved to pay only $35 or so for them.
Title: Re: MAME 104u5 out - adds multiple mice
Post by: sWampy on March 16, 2006, 06:01:22 pm
With the LCDtopGuns at $50+ shipped and not working as well as the act ones, act has no reason at all to go down.

I disagree.  I don't know anyone who has been able to make dual act lab guns work with MAME.  And I don't know anyone with two LCD TopGuns who isn't playing mame wonderfully with them.  Those guns ROCK.  And it was only $94 for two of them, shipped.  So the price is only $47 per gun.

Well with Derrick working to make the act guns work correctly in mame, soon the act guns should work better than the lcd topguns, I was hoping the would soon both be working equally well, so they would be put in a head to head price war.

$47 is pretty close to $50 and if you buy just one they cost more than $50 ;-P
Title: Re: MAME 104u5 out - adds multiple mice
Post by: BASSOFeeSH on March 16, 2006, 06:14:26 pm
(Is there a head blowing up emoticon?)
(http://img458.imageshack.us/img458/3431/explodehead5dk.gif)
Title: Re: MAME 104u5 out - adds multiple mice
Post by: Cananas on March 17, 2006, 01:27:16 am
Well with Derrick working to make the act guns work correctly in mame, soon the act guns should work better than the lcd topguns, I was hoping the would soon both be working equally well, so they would be put in a head to head price war.

I am absolutely disagreed.

Derrick is working in a new driver for the lightgun. He asked for support to ActLabs and EMS, and he got support only from ActLabs. But Smog can help him with the LCDTopGun (it is a Guncon2 compatible) and Guncon2. Derrick is not working only for ActLabs guns. I am sure if thenew driver works with the ActLabs guns, it will work with the LCDTopGun and the Guncon2 gun.

****EDIT ****
Don't Panic, please.

BTW, I have 2 pairs of ActLabs gun (2 PC USB and 2 TV USB) and 3 LCDTopGuns, and those last one are definitely the best guns.
Title: Re: MAME 104u5 out - adds multiple mice
Post by: sWampy on March 17, 2006, 09:49:48 am
Well with Derrick working to make the act guns work correctly in mame, soon the act guns should work better than the lcd topguns, I was hoping the would soon both be working equally well, so they would be put in a head to head price war.

I am absolutely disagreed.

Derrick is working in a new driver for the lightgun. He asked for support to ActLabs and EMS, and he got support only from ActLabs. But Smog can help him with the LCDTopGun (it is a Guncon2 compatible) and Guncon2. Derrick is not working only for ActLabs guns. I am sure if thenew driver works with the ActLabs guns, it will work with the LCDTopGun and the Guncon2 gun.


But if you read his comments he pretty much said act was working with him,  ems could blow chunks, if the new mame code worked with them ok, if it didn't so what.   Bottom line is if the lcdtopguns easily work as good as or better than the act guns when this is over, someone will buy a pallet of the guns bring them over here, and their price will drop to $35 or so each shipped.   If this happens, act will have to drop their price.
Title: Re: MAME 104u5 out - adds multiple mice
Post by: Cananas on March 17, 2006, 09:58:45 am
Well with Derrick working to make the act guns work correctly in mame, soon the act guns should work better than the lcd topguns, I was hoping the would soon both be working equally well, so they would be put in a head to head price war.

I am absolutely disagreed.

Derrick is working in a new driver for the lightgun. He asked for support to ActLabs and EMS, and he got support only from ActLabs. But Smog can help him with the LCDTopGun (it is a Guncon2 compatible) and Guncon2. Derrick is not working only for ActLabs guns. I am sure if thenew driver works with the ActLabs guns, it will work with the LCDTopGun and the Guncon2 gun.


But if you read his comments he pretty much said act was working with him,  ems could blow chunks, if the new mame code worked with them ok, if it didn't so what.   Bottom line is if the lcdtopguns easily work as good as or better than the act guns when this is over, someone will buy a pallet of the guns bring them over here, and their price will drop to $35 or so each shipped.   If this happens, act will have to drop their price.

I understood your point of view. But I think EMS would help Derrick, but at this moment we are working in a new version of EMS driver and (I think) they don't know where they are going to... They have got lost.

 If it not the case, EMS must help Derrick if we want to sell a LDCTopGun for PC.
Title: Re: MAME 104u5 out - adds multiple mice
Post by: Tiger-Heli on March 17, 2006, 10:06:30 am
Judging by the fact that there is a 27-page thread about them here, there WILL be support for dual LCD TopGuns in MAME. . .

Whether that will happen due to Derrick's next code fix, revised EMS drivers, Smog or Acorn writing new drivers, or Silver or MikeQ revising MAME to work with whichever drivers work best with them, one way or another it WILL happen.

There is too much interest in them for it NOT to happen.
Title: Re: MAME 104u5 out - adds multiple mice
Post by: Cananas on March 17, 2006, 10:22:35 am
Judging by the fact that there is a 27-page thread about them here, there WILL be support for dual LCD TopGuns in MAME. . .

Whether that will happen due to Derrick's next code fix, revised EMS drivers, Smog or Acorn writing new drivers, or Silver or MikeQ revising MAME to work with whichever drivers work best with them, one way or another it WILL happen.

There is too much interest in them for it NOT to happen.

I have wrote an e-mail to EMS Henry asking him to help and support to Derrick and MAME.
Title: Re: MAME 104u5 out - adds multiple mice
Post by: Derrick Renaud on March 17, 2006, 11:01:08 am
Judging by the fact that there is a 27-page thread about them here, there WILL be support for dual LCD TopGuns in MAME. . .

Whether that will happen due to Derrick's next code fix, revised EMS drivers, Smog or Acorn writing new drivers, or Silver or MikeQ revising MAME to work with whichever drivers work best with them, one way or another it WILL happen.

There is too much interest in them for it NOT to happen.

I have wrote an e-mail to EMS Henry asking him to help and support to Derrick and MAME.

Once again, don't worry about things that are not done yet per this post:
That is all I will say on the subject.  But I will state one last time, don't worry about it at this point.  With their supplied drivers, it will never be plug and play with MAME.  They only begin to work when using 3rd party drivers.

D.
Title: Re: MAME 104u5 out - adds multiple mice
Post by: Grasshopper on March 18, 2006, 04:48:57 pm
I have to confess I didn't fully understand all the technical stuff earlier in this thread, and maybe what I'm about to suggest isn't even possible, but FWIW this is how I would approach the handling of USB devices in MAME.

First of all I'd provide a command line switch which would simply list all the USB HID devices connected to the computer, the ports they're connected to, their device IDs and any other useful info.

After a bit of plugging and unplugging this switch would enable all the device IDs, and the numbering of the USB ports to be determined.

Then armed with this info the user could add commands such as the following to the MAME configuration file.

Joystick1 = usb_device_whose_id_is(n)

Joystick2 = usb_device_connected_to_port(m)

etc.

Obviously the actual syntax would be a bit less clumsy.

The mapping process would normally only take place once when MAME was first run. However, there would be an option within the tab menu to enable the devices to be remapped if you wanted to plug and unplug things during a game.

Title: Re: MAME 104u5 out - adds multiple mice
Post by: Santoro on March 23, 2006, 10:43:43 pm
It's nice to see Mamedev participation here even if it's to defend against accusations.  Derrick, thanks to you are the rest of the devs.  Most of us appreciate your work incredibly.
Title: Re: MAME 104u5 out - adds multiple mice
Post by: Smog on March 26, 2006, 10:03:40 am
Quote
When I contacted Act Labs, their response was 'great, how can we help?'  EMS response was 'that's great, good luck with that.'   

LOL :D Derrick .. I hate to say "I told you" :D
However, I've realized that I've never thank you for your work on the lightgun topic, and probably I'll never do much as you owe ... If there is anything I can do for you (I guess you solved the issue, with the location name ... ) I'll be happy to help as soon as I finish to set up my new PC.
Title: Re: MAME 104u5 out - adds multiple mice
Post by: Derrick Renaud on March 26, 2006, 11:42:30 am
Quote
When I contacted Act Labs, their response was 'great, how can we help?'  EMS response was 'that's great, good luck with that.'   

LOL :D Derrick .. I hate to say "I told you" :D
However, I've realized that I've never thank you for your work on the lightgun topic, and probably I'll never do much as you owe ... If there is anything I can do for you (I guess you solved the issue, with the location name ... ) I'll be happy to help as soon as I finish to set up my new PC.

I sent you an e-mail last night to the contact name on your smogdragon site.

As for the LocationName, it is not really solved, but I don't think it is something you can do anything about.  When the gun is first plugged in, the parent USB device sends a name from the device to be used by the parent HID USB driver.  That is the LocationName it uses.  And it seems that EMS used a name of "USB Device".

In XP device manager, just look at the HID devices, on the general info page, near the top is a field called Location:.  That is the field that the USB device supplies to the driver.

use the MAME -verbose command to see mouse names.  In XP, I have to search the registry for the same info that DX usually supplies.

D.