Build Your Own Arcade Controls Forum
Main => Main Forum => Topic started by: NoBonus on March 13, 2005, 01:50:18 am
-
A two-fold question: can a mouse-wheel (the wheel between the two buttons) be used in MAME as a spinner? If so, can it be hacked into a spinner?
Thanks!
Andrew
-
well, you woluld like to hack the mouse and attach a spinner? If you need to buy a spinner, well...... or you want to buy a pot? or mount the mouse spinner itself? your best off buying an oscar spinner. You probably can't get the same control off the mouse. but what do i know, i'm drunk.
-
My understanding is that the "scroll wheel", or Z-axis on a mouse has much lower resolution than the x & y axes, so I would think it would work poorly. But I've never tried it, so maybe I should just shut up.
-
My guess would be "no" unless one writes custom mouse drivers. The mouse wheel is not recognized by Windows as mouse movements. Windows will intercept the wheel movements before the application can process them.
Mario
-
My guess would be "no" unless one writes custom mouse drivers. The mouse wheel is not recognized by Windows as mouse movements. Windows will intercept the wheel movements before the application can process them.
Mario
MAME will allow input from the "Z-axis" now, so you could use it. The problem is that the resolution on the scroll wheel is too low.
-
Why would the resolution be any different than the X or Y axis? Any would the resolution really be too bad for mame games? If it can be used, a single mouse-hack could control the spinner and trackball... just a thought.
-
I'm currently in the process of hacking a mouse (MS Intellimouse) & was thinking the same thing...
The mouse wheel is just another optical sensor with a encoder wheel...
Of course it's got lower resolution... It's got fewer teeth on the wheel... Not a problem for a hack though.
I'll have to see what happens... (I don't have a spinner yet, so don't wait on me for anything...)
- tmasman
-
I guess a simple test is in order. Someone should use their wheel-mouse wheel in mame for the spinner function (but while still part of the mouse). Seems like that simple test should tell us if it works or not... right?
-
I guess a simple test is in order. Someone should use their wheel-mouse wheel in mame for the spinner function (but while still part of the mouse). Seems like that simple test should tell us if it works or not... right?
Mame needs 4 lines added for the scroll wheel to work. I just submitted diff to mameDev.
Attatched is a diff. Add same as mame's u# diffs.
-
Why would the resolution be any different than the X or Y axis? Any would the resolution really be too bad for mame games? If it can be used, a single mouse-hack could control the spinner and trackball... just a thought.
As I sit here and view this page, I scroll my mouse wheel back and forth. The page does tend to "jump" rather than glide slowly up and down, but that could well be the physical wheel itself (there seems to be notches or points at which the wheel "clicks" into place) rather than the input resolution of the wheel.
Still, I'll be interested to see what comes of the above diff, and the experiments following.
-
As I sit here and view this page, I scroll my mouse wheel back and forth. The page does tend to "jump" rather than glide slowly up and down, but that could well be the physical wheel itself (there seems to be notches or points at which the wheel "clicks" into place) rather than the input resolution of the wheel.
This is also because the encoder wheel only has half the number of slots in it... The blades & cuts are much wider... So instead of maybe 20 "changes" per revolution, you're only getting 10. The clicking feeling of the wheel is inconsequential to the functionality... It's just that way for the "feel". Some wheels do not have this feel, & actually work much smoother (on-screen).
I'm going to try & finish up my hack tonight... I'll see if I can use the "Z" axis for one of the trackball axis.
- tmasman
-
Mame needs 4 lines added for the scroll wheel to work. I just submitted diff to mameDev.
Attatched is a diff. Add same as mame's u# diffs.
It sounds like you're saying that MAME won't support the "Z" axis out-of-the-box... Say it ain't so...
I'm not too keen on compiling C, or I'd try your diff...
Hm... Must find a way...
This would solve a lot of peoples' problems with spinner & trackball not working together, or having 2 hacks, etc...
-
As I sit here and view this page, I scroll my mouse wheel back and forth. The page does tend to "jump" rather than glide slowly up and down, but that could well be the physical wheel itself (there seems to be notches or points at which the wheel "clicks" into place) rather than the input resolution of the wheel.
Not that simple. The page jumping has to do with a mouse setting on wheel on number lines to jump. (Specific name varies depending on driver.)
Usually, but not always, one wheel's step (click) = one blade & cut (notch) = number of lines jumped as set in mouse setting. But as said, this isn't a set rule, and a few (far too few, IMO) don't click. I scroll so much normally, the non-smooth wheel clicks tire my finger; I very much prefer the smooth rolling wheels.
Also, some wheels are so one click > one notch, while others are the opposite (need multiple clicks for a notch to be sensed).
Then, some drivers are set so it takes multiple notches before it does one of the page scroll jumps.
So it could be the wheel's resolution, the resolution to click ratio, the driver setting, and/or the mouse scroll setting. ;D
It sounds like you're saying that MAME won't support the "Z" axis out-of-the-box... Say it ain't so...
Mame doesn't . . . yet. Hopefully the changes will be included in the next version, and make it ain't so. ;D If you can't get it working on your own by then, no problems.
And adding diffs and compiling is fairly easy. (Hmm, was going to link, but the ones I know are a little out of date; anyone have an up to date one?)
-
I wonder if there are mice with higher resolution wheels? Hmm...
-
I wonder if there are mice with higher resolution wheels? Hmm...
Yes...
There are even mice with 2 scroll wheels... (Horiz & vert)
Wait a second..........
If you patched MAME you could probably even drive 2 trackballs with 1 mouse...
ooooooohhhhh....
-
There are even mice with 2 scroll wheels... (Horiz & vert)
Wait a second..........
If you patched MAME you could probably even drive 2 trackballs with 1 mouse...
But directX directInput (which mame uses) still only has three axes.
I have a cheap compaq optical mouse+trackball (http://www.compusa.com/products/product_info.asp?product_code=317287&pfp=BROWSE) with four axes. I don't know how the fourth (horizontal) axis is handled in normal windows datawise; I don't seem to be able to see it in directInput.
-
But directX directInput (which mame uses) still only has three axes.
I have a cheap compaq optical mouse+trackball (http://www.compusa.com/products/product_info.asp?product_code=317287&pfp=BROWSE) with four axes. I don't know how the fourth (horizontal) axis is handled in normal windows datawise; I don't seem to be able to see it in directInput.
Bummer...
That's what I get for thinking before thinking...
uh... Did that make any sense? ???
-
Mame doesn't . . . yet. Hopefully the changes will be included in the next version, and make it ain't so. ;D If you can't get it working on your own by then, no problems.
I thought for sure I had read somewhere that it was already useable- was it previously enabled in a custom MAME build or something?
-
Mame doesn't . . . yet. Hopefully the changes will be included in the next version, and make it ain't so. ;D If you can't get it working on your own by then, no problems.
I thought for sure I had read somewhere that it was already useable- was it previously enabled in a custom MAME build or something?
I probably said something to the effect, "Mame added some mouse Z axis code, I think it should work" back around 0.84-0.85 when the inputs were changed. :-X
Ah well, it's mote now, Z axis now works as of mame 0.94u3. (tested winXP)
-
I probably said something to the effect, "Mame added some mouse Z axis code, I think it should work" back around 0.84-0.85 when the inputs were changed. :-X
Ah well, it's mote now, Z axis now works as of mame 0.94u3. (tested winXP)
Will the diff you attached above work with older versions of MAME?
-
Will the diff you attached above work with older versions of MAME?
With zero testing, I'm going to guess back until ~0.86 it'll work.
Anything before 0.84 I'm guessing is a no.
I'll test tonight after I get home.
-
I would really like to see the answer for this :) BYO spinner, buy a trackball, only need one mouse :) I also second that smooth mice are better to work with. I had a logitech mouse and the first day I got it, I opened it up and removed the springs and metal crap from inside the wheel. Now it's nice and smooth :D That's gonna be my mouse to hack. For the record, I have my mouse in Windows set so that one click of the wheel jumps three lines.
-
Okay, after some very quick tests, I'm not very pleased with the scroll wheel as an input. However it looks like it might vary on the mouse and the mouse driver; even so, I think it'll be hard to find a good mouse. An other possibility might include some ugly mame hacks. :-\
First off, I tested only three unhacked mice, with their default drivers, and used the "scroll wheel". One wheel had a mechincal encoder, another has a optiomachincal wheel geared so one bump while turning the scroll wheel equaled one gap passing the sensor, the third was a "scroll trackball" with optiomachanical encoder wheels like normal TBs, with "two" scroll directions. I set the mouse settings to scroll 1 line in windows (shouldn't make a difference for most drivers), mame's digital speed to 1, and left the accelleration at default. I tested arkanoid.
On the two normal scroll wheels, the arkanoid paddle jumped quite a bit at each bump. I believe this is due to a default step (or granularity) much greater than one (1) of the normal mouse axes.
The scroll TB was a little different. First, both vertical and horizontal are seen as moving the Z axis in mame. However, in windows I can't scroll diagonally: it's either scroll straight up-down or straight left-right, depending on which of the two the ball is roll the most. So either the driver is splitting and filtering the HorScroll and the VertScroll from a mixed Z axis, or the chip in the mouse is filtering it first and somehow sending on the Z axis a different signal depending on which Vert or Hor it's getting the most of. (I think it's the chip doing the V-H filtering, and the driver decoding.)
Now vertical scrolling the TB jumps just like the wheels.
However, horizontal scrolling acted differently. It would jump forward about 1/2 as far as the other jumps, jump back past the original position, and then jump forward not as far as before, jump not as far, ect for about 3-6 frames, ending about where it should be if it were a normal mouse axis turned as much. IOW, if it didn't wiggle back and forth like it does, it would be perfect. :P
That said, IIRC it might be possible to decrease the step the mice are sending with directInput inside mame, if the mouse and driver let it. Again, this might vary from mouse to mouse and driver to driver.
tmasman,
As for applying the diff, I was able to do it to 0.85, and the code looks like ir should fit, but I don't have the old compile stuff set up anymore, so I wasn't able to compile (didn't get that far). I hope someone else tries it and reports back, instead of me reinstalling the old stuff. Thanks :)
-
Not a problem u_rebel.
I appreciate your efforts.
I'll be playing aroung with my mouse hack when I get a chance... But I'm not holding my breath.
It was a nice thought... no? :-\
I'm still not giving up yet...
-
Did a little more research, and the default is that one notch = 120 movement units on the X and Y axis. "The delta was set to 120 to allow Microsoft or other vendors to build finer-resolution wheels in the future, including perhaps a freely-rotating wheel with no notches." (msdn (http://msdn.microsoft.com/library/default.asp?url=/library/en-us/winui/winui/windowsuserinterface/userinput/mouseinput/mouseinputreference/mouseinputmessages/wm_mousewheel.asp))
So a quick hack could be to divide the z axis by 120 (or 60 or 40 etc). But then the advanced mice with the finer-resolution scroll wheels will lose their finer resolution.
I'll look more into this.