The NEW Build Your Own Arcade Controls
Main => Software Forum => Topic started by: Derrick Renaud on November 28, 2006, 11:17:06 pm
-
I dread to delve back into the mouse handling code, but here goes.
First (yes cananas, finally)
I will be submitting support in MAME for more then 4 mouse buttons. Which goes like this:
Win98/Me less then DX7 = 4 buttons
Win98/Me DX7 or better = 8 buttons
XP with 1 mouse device = 8 buttons
XP with more then 1 mouse device = 5 buttons
That's the way Windows works. Don't blame me.
Secondly and what I need feedback on is:
Does anyone use Win98/Me and need multi-lightgun support similar to whats available on XP. Meaning 2 or more, real time tracking lightguns?
Do Smog's divers even work on Win98/Me? I don't think I ever got them working on those OSes.
Third
Is anyone using Win2000/NT for their lightgun setup? That would be the only reason to keep the -lightgun option if I went ahead and added Win98/Me lightgun support.
D.
-
Secondly and what I need feedback on is
Does anyone use Win98/Me and need multi-lightgun support similar to whats available on XP. Meaning 2 or more, real time tracking lightguns?
Yes Please!! Support for the LCD Topguns would be appreciated.
Do Smog's divers even work on Win98/Me? I don't think I ever got them working on those OSes.
Unfortunately... No they don't.... The only drivers I can get to work at all properly on win98 are the ones that the manufacturer of the guns EMS provide. To be honest they're a very good driver on Win98 I don't have any problems with them. Except multi gun support in Mame.
Best Regards,
Julian (Fozzy The Bear)
-
This is why I was wondering if it was worth the effort to force 98/Me to properly support absolute mice (lightguns.)
TopGun has still not released a proper mouse driver, and if Smog's driver does not work for 98/Me, then my adding suppport will have no effect. Actually it would make the TopGuns no longer work because I would remove the -lightgun option if proper support was added.
So I guess I will not bother at the moment, until someone can get Smog's driver's working in 98/Me.
D.
-
Derrick, has something else changed recently in MAME in regards to mouse/lightgun input? I find that many games are not playable anymore (the aiming is off the further to the right of the screen you point). Particularly Hogan's Alley and Duck Hunt. They worked fine a few versions back, but now you can't shoot the right most part of the screen (and you can't even move the crosshair over there with the mouse, so I know it's not a lightgun only issue).
Thanks for all your work on MAME mouse functionality! :)
-
I take it you mean the PlayChoice versions?
Looks like the crosshairs were not updated when multi-monitor support was added.
Fixed. I'll submit it with my mouse update.
D.
-
I think what I use is outside of the box a little, but I'd give my left you-know-what to have this supported well in base mame. I'm still using NoNameMame 0.82 (yes, 0.82!!!) for my lightgun games, because no other emulator since that version has properly supported 2 s-video tv-out lightguns, windows 2000 unofficial service pack 5, nvidia geforce fx5200 128mb
Thanks for the interest, I thought the whole world had left me behind!
Chemame
-
I guess the actlab guns don't have big enough following?
(I'm not using mine ever since my CRT died, two weeks after getting a "secondary" LCD. 13 days of dual screens and then :cry:.)
-
I think what I use is outside of the box a little, but I'd give my left you-know-what to have this supported well in base mame. I'm still using NoNameMame 0.82 (yes, 0.82!!!) for my lightgun games, because no other emulator since that version has properly supported 2 s-video tv-out lightguns, windows 2000 unofficial service pack 5, nvidia geforce fx5200 128mb
Bad news. I never liked NT or 2000. The CDs are buried in the closet somewhere. And I have no intention of re-installing them.
To make matters worse, they do not support multiple mice at all. So the only choice is to use the -lightgun option. This should still work the same in .110 as it does in .82. So I will leave the -lightgun option in for the NT/2000 users.
D.
-
I guess the actlab guns don't have big enough following?
It's a lot of aggravation to force Win98/Me to use the mice in control panel mode to get the true, "non-windows-screwed-up" absolute info. Adding absolute mouse support similar to the XP support to 98/Me would only allow more then 2 Act Labs guns to work and not make any other noticeable difference. They do not update in real time.
So most Act Labs users would never know anything changed other then they don't need to use -lightgun anymore.
Seeing how Top Gun users have to use the TopGun supplied driver for 98/Me forcing them to use the -lightgun option, I might as well leave things be.
D.
-
Fixed. I'll submit it with my mouse update.
:notworthy: :notworthy: :notworthy:
It's nice to see a dev who cares about fixing regression problems.
-
It's a lot of aggravation to force Win98/Me to use the mice in control panel mode to get the true, "non-windows-screwed-up" absolute info. Adding absolute mouse support similar to the XP support to 98/Me would only allow more then 2 Act Labs guns to work and not make any other noticeable difference. They do not update in real time.
"Control panel mode"? Can you point me toward something describing this (Google isn't helping) as it sounds like this may have something to do with why I can't get touchscreens to work properly in WinCab on Win98/2000 (seems like a touchscreen and an Act Labs lightgun would behave very similarly)...
Thanks!
--Chris
-
"Control panel mode"? Can you point me toward something describing this (Google isn't helping) as it sounds like this may have something to do with why I can't get touchscreens to work properly in WinCab on Win98/2000 (seems like a touchscreen and an Act Labs lightgun would behave very similarly)...
You need the DX7 docs for full info. Here's the just of it:
When you setup your devices using: IDirectInputDevice7::SetProperty
use a rguidProp of DIPROPCALIBRATIONMODE_RAW
This forces windows to give you the actual data before it decides to totally bugger it up. For absolute mice you will now get absolute values between 0 and 0x3fff.
IIRC you have to do this while the mouse is not acquired.
Hard to believe DX has gone through so many versions and the input system still blows.
D.
-
First (yes cananas, finally)
I will be submitting support in MAME for more then 4 mouse buttons. Which goes like this:
Win98/Me less then DX7 = 4 buttons
Win98/Me DX7 or better = 8 buttons
XP with 1 mouse device = 8 buttons
XP with more then 1 mouse device = 5 buttons
That's the way Windows works. Don't blame me.
Sorry, Derrick, I missed this topic. Thank you for complete the code adding support for all DirectX versions so that it could be aceppted by the MAMETeam. ;)
-
Hi Derrick,
I posted this in another topic but it is probably better here.
Is possible to get rotary games like Ikari Warriors to respond to the mouse wheel so that we can use this as a rotary feature?
I have tried on Ikari in mame version 73 without success.
The reson I ask is I might try mounting one to the top of a joystick for a homemade rotary.
Cheers
Muzland
-
Is possible to get rotary games like Ikari Warriors to respond to the mouse wheel so that we can use this as a rotary feature?
I have tried on Ikari in mame version 73 without success.
73?
Please try 110. It should work with multiple mice. In the mean time I will check that it works with DX, when I do some other input cleanup I am working on.
[UPDATE]
I modified the code so that it scales the mouse-Z-axis by 120. This will make it work in most cases. Some freak mice may use other scale factors which means they won't work on Z-Axis. But hey, they don't work now either.
So MAME 111 should do what you need.
[UPDATE2]
I changed the scaling factor to 30. I think Robin had said that some mice use that. What that means is that for most mice a sensitivity of 25% will give 1 step for each click of the mouse wheel.
One thing to remember is that it is a little hard to select the Z-Axis in the Player Controls menu. You have to give it a good spin for it to be accepted. Our just use a ctrlr file.
D.
-
This topic reminded me of a question I had regarding Direct Input codes for mice.
I use MameWah as a front end. In the config file, functions are assigned to keystrokes by their direct input codes ("K" = DIK_K, "Enter" = DIK_RETURN, etc.)
Are there also codes to assign mouse button presses? If so, what are they?
Thanks
-
When you setup your devices using: IDirectInputDevice7::SetProperty
use a rguidProp of DIPROPCALIBRATIONMODE_RAW
This forces windows to give you the actual data before it decides to totally bugger it up. For absolute mice you will now get absolute values between 0 and 0x3fff.
This is a huge help.... Thanks!
--Chris
-
This topic reminded me of a question I had regarding Direct Input codes for mice.
I use MameWah as a front end. In the config file, functions are assigned to keystrokes by their direct input codes ("K" = DIK_K, "Enter" = DIK_RETURN, etc.)
Are there also codes to assign mouse button presses? If so, what are they?
You will have to ask the MameWah guys. I do not use front ends.
But as far as coding goes, Mice, keyboards and joysticks are all separate devices and handled differently. Mice do not use DIK_ commands. Or anything similar. Mouse buttons are stored in a DIMOUSESTATE structure.
D.
-
When you setup your devices using: IDirectInputDevice7::SetProperty
use a rguidProp of DIPROPCALIBRATIONMODE_RAW
This forces windows to give you the actual data before it decides to totally bugger it up. For absolute mice you will now get absolute values between 0 and 0x3fff.
This is a huge help.... Thanks!
--Chris
You may also have to set DIPROP_AXISMODE to DIPROPAXISMODE_ABS. It's been a while, and I've misplaced the code I was working on. :) But DIPROPAXISMODE_ABS definitely produces nothing but garbage on it's own.
D.
-
You may also have to set DIPROP_AXISMODE to DIPROPAXISMODE_ABS. It's been a while, and I've misplaced the code I was working on. :) But DIPROPAXISMODE_ABS definitely produces nothing but garbage on it's own.
D.
It's not exactly garbage, and needs "decoding".
IIRC, DIPROPAXISMODE_ABS outputs a 32 bit value with no "real" zero point (unless the mouse driver is absolute in win9x with non-system USB mice devices, aka lightguns). The funny thing is the absolute value is the total from the time windows (and mouse) was installed, and the system mouse is the sum of all mouse devices. (Err, that's my guess, and it seems that way for at least new USB mice in win9x, and the one winXP I got to see the DIPROPAXISMODE_ABS values right after installing and then a month later.) So most of the time you aren't going to be even close to zero, but in the billions.
Now, If you take the value at enum, and call that is the "zero point" (subtract it from subsequent "current" values), you can get valid readings for a while. Until the mouse pointer goes of the edge and you can't see how far off, or the exact direction unless exactly above/below/left/right. Then you need to re-set the "zero point". (That's basically one of the two directInput ways "lightguns" were handled in analog+.)
It is possible to write code to move the "zero point" to cover the inevitable move off screen instead of the way I did it, but that's just re-undoing what the OS and directX is doing to put it into DIPROPAXISMODE_ABS.
But the hack that messed me the most was the mode needed to be set, IIRC, after the enum function, but while not acquired. I hacked it into the pause acquire/unacquire code to get it to work.
These observations are from (system & individual USB mice) win98, winME, & (system mouse only) winXP systems back when analog+ was still active.
-
[It's not exactly garbage, and needs "decoding".
Hi Robin,
Close enough to garbage. How about severely mangled. :)
RAWMOUSE always gives values between 0 & 0xffff. Nice and pretty for use.
For DX, if you use DIPROPCALIBRATIONMODE_RAW, you always get values between 0 and 0x3fff. No muss, no fuss, reliable, the kind of data you would expect from an interface that worked. Of course you shouldn't have to do that, because if you ask for DIPROPAXISMODE_ABS, you would think you would get the absolute data you request, not relative to something absolute.
To change topics a little. Did you see my other post about adding Digital Speed = 0? It has to be a couple years since I first mentioned it and now finally got around to coding it. :)
D.
-
This topic reminded me of a question I had regarding Direct Input codes for mice.
I use MameWah as a front end. In the config file, functions are assigned to keystrokes by their direct input codes ("K" = DIK_K, "Enter" = DIK_RETURN, etc.)
Are there also codes to assign mouse button presses? If so, what are they?
For Mamewah (from http://mamewah.mameworld.net/docs/ctrlr.txt):
'Mouse Inputs:
MOUSE_LEFT
MOUSE_RIGHT
MOUSE_UP
MOUSE_DOWN
MOUSE_SCROLLUP
MOUSE_SCROLLDOWN
MOUSE_BUTTON0
MOUSE_BUTTON1
MOUSE_BUTTON2
MOUSE_BUTTON3
BUT NOTE this is *only* for Mamewah...I invented these codes just to keep things simple...same goes for the joystick codes.
-
My driver was supposed to work on win 98 .. I had a lot of troubles with the driver control panel (this means you probably cannot configure buttons) but it should work ... I'll try to give it a look in next days.
-
Hey Derrick...I just tried the latest MAME (v0.111) and Hogan's Alley and Duck Hunt are still messed up. I then realized it was the Vs versions I was trying, not the Playchoice ones (sry about that). You still can't move the mouse cursor or lightgun to the far right of the screen. Is this the same problem as the Playchoice thing you just fixed?
-
Hey Derrick...I just tried the latest MAME (v0.111) and Hogan's Alley and Duck Hunt are still messed up. I then realized it was the Vs versions I was trying, not the Playchoice ones (sry about that). You still can't move the mouse cursor or lightgun to the far right of the screen. Is this the same problem as the Playchoice thing you just fixed?
They worked for me last time I checked. I only saw a problem with the dual screen update. Won't get a chance to look at it till after the holidays.
Does anyone else report the same problem?
D.