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.
Second, I just received the Act-labs guns, so testing and coding will now commence.
D.