Main > Main Forum

Optical Control Resolution - Info Needed

<< < (2/3) > >>

Derrick Renaud:

--- Quote from: Kremmit on December 22, 2006, 11:38:16 pm ---I (snip) get you (snip) goodies.

--- End quote ---

Thanks.

This is exactly the info I need.

So for Arkanoid with a count of 486 while using a spinner of 1200 resolution you get this sensitivity.

100 * 486 / 1200 = 40.5
so:
Analog Sensitivity = 41%

And that does work just like I remember arkanoid.

[Dream mode on]
Now if the spinners could be programmed with a drag value, so you could automatically go from a free spinning Tempest spinner to a slow/damped moving arkanoid spinner.  Sounds like a job for programable magnetic damping.  :)

D.

Derrick Renaud:

--- Quote from: crashwg on December 22, 2006, 09:25:10 pm ---I'm not sure I follow exactly what you're doing math for...

--- End quote ---

To automagically set your control to work like the original control, of course.

Lets say you have a spinner with resolution C.  Where C is 4x the tooth count of your spinner.

You also need to know the resolution of the original control used on the game.  Let's call that G.

To set the analog sensitivity, all you need to do is enter this value:
100 * G / C

 8)

So in practice, let say you have a Happ's optical rotary joystick.  It has 24 teeth, connected to a 4x mouse giving a count of 96.  Ikari controls had a full turn count of 12.  So:
100 * 12 / 96 = 12.5

So setting the Analog Sensitivity to 13 in Ikari, makes the Happ's control work similar to the original LS-30 SNK control.



D.

Derrick Renaud:

--- Quote from: u_rebelscum on December 22, 2006, 07:01:34 pm ---The one I know OTTOMH is 720 degrees (not that this info is needed for the current faked inputs):

--- End quote ---

Hey, hey, hey... Slow down, you never know what may happen.  ;)


--- Quote from: u_rebelscum on December 22, 2006, 07:01:34 pm ---720 (skate or die), 360 spinner "joystick", 144 count (72 teeth)

--- End quote ---

And the other input is once per 360?

OT, but, it does amaze me that the old games had already figured out 2x quadrature encoding.  And how long did it take mice?

D.

Xiaou2:

 Derrick,

  How does one "Auto Sence" such a thing?

  If you do some sort of readings in game..  it could fluxuate.. thus changing the
values on the fly, and messing up gameplay as your sensativity rises and falls.  :(

 I think if anything, there would be a special program included with mame
that you run first to determine your encoders resolution... then it makes
an INI file for it or something.

 Also, there are encoders now that can be adjusted in sensativity.  Such as
my logitec laser mouse.

 
 Some other things to consider.. 

 RandyT made the comment about  'Knob Diameter"  effecting how many turns
per degree.

 Simularly, all Shaft Diameters also count too.

  I also wonder how accurate the translated polling times for mame are for each
driver.  For example.. if in marble madness, you have have perfect controller
match and the same encoder resolution.. but mame polls slower than the arcade
did.. then your marble will never be capable of moveing as fast.. or at least cant
accelerate as fast..ect.   Polling too much, I think, can give the player too great
of control, thus giving them an advantage.

 Ohh, and then we are talking windows too..   as I believe that different windows
versions have different polling times..err, checks per time unit.

Derrick Renaud:

--- Quote from: Xiaou2 on December 23, 2006, 09:48:23 am ---  How does one "Auto Sence" such a thing?

  If you do some sort of readings in game..  it could fluxuate.. thus changing the
values on the fly, and messing up gameplay as your sensativity rises and falls.  :(

--- End quote ---

You have to tell it the fixed rate your control works at.  Then MAME would do the math as I have already shown.


--- Quote from: Xiaou2 on December 23, 2006, 09:48:23 am --- I think if anything, there would be a special program included with mame
that you run first to determine your encoders resolution... then it makes
an INI file for it or something.

--- End quote ---

Too complicated, and inaccurate.  It is up to you to find the real resolution of the device you are using.


--- Quote from: Xiaou2 on December 23, 2006, 09:48:23 am --- Also, there are encoders now that can be adjusted in sensativity.  Such as
my logitec laser mouse.

--- End quote ---

Again, MAME can't work magic.  Your controls should use a fixed resolution with no acceleration, etc.  That is all useless as far as emulation goes.  You want to feed the game info similar to what it got on the real machine.

Also, this is not really meant for mice.  It is meant to make spinners, wheels, etc work like the real control.


--- Quote from: Xiaou2 on December 23, 2006, 09:48:23 am --- RandyT made the comment about  'Knob Diameter"  effecting how many turns
per degree.

 Simularly, all Shaft Diameters also count too.

--- End quote ---

Um, as it stated in my first post, this has no bearing on anything as far as MAME goes.  If you take a real Arkanoid game, remove the knob and somehow fit it with a big steering wheel, the game play will "feel" different.  But the resolution is still the same.

So it all depends on how you use the control.  If you grasp a knob and just turn it, the knob size makes little difference.  But if you are rubbing the edge of the knob to turn it, then yes, the resolution changes similar to putting the wrong size tires on your car and finding the speedo is now wrong.

I'm not sure if I could convince the rest of the team that we need to keep track of "Knob Diameter."   :o

I guess it would not hurt to give me the knob/wheel diameter details and I will comment it in the code until we use it.  But, I imagine there may be different sized knobs/wheels depending on if the game is original or a conversion.


--- Quote from: Xiaou2 on December 23, 2006, 09:48:23 am ---  I also wonder how accurate the translated polling times for mame are for each
driver.  For example.. if in marble madness, you have have perfect controller
match and the same encoder resolution.. but mame polls slower than the arcade
did.. then your marble will never be capable of moveing as fast.. or at least cant
accelerate as fast..ect.   Polling too much, I think, can give the player too great
of control, thus giving them an advantage.

 Ohh, and then we are talking windows too..   as I believe that different windows
versions have different polling times..err, checks per time unit.

--- End quote ---

NOTE: the following info really should be placed in an FAQ somewhere so I don't ever have to type it in again.  :)

Polling is a different beast.  It has no real affect on the above, but it is very important.  It affects the ability of the emulated control to match the real control, which would be perceived as smoothness.  There are 2 different polling things in emulation to be aware of.  One is the polling rate of the original game.  Usually done during v-blank.  And the other is the OS's polling rate.

The original game knows nothing about your OS, so it is up to MAME to get the info and feed it to the game when the game asks for it.

So lets say the game polls once each field for a polling rate of 60 times a second.  Now lets say you are using a serial mouse with a polling rate of 40Hz.  That means in every second of polling, 20 samples are missed because the serial mouse can't keep up.  The moral here is... Throw Your Serial Mice Away!

PS/2 mice are the bare minimum you should use.  You should also set the PS/2 sampling to 200Hz in the XP control panel, or by using a utility program such as:
http://www.majorgeeks.com/PS2Rate_Plus_d300.html

Even if you do not use a PS/2 mouse, you NEED this program because it will tell you the polling rate of your mouse.

Now the first thing you find on XP, is that your PS/2 200Hz polling rate, is limited by XP to 125Hz.  (I've said this many times, but here goes again.  Windows input handling blows!)  So you need to also do the USB fix below.

USB mice are the best if you have XP, even though windows limits the polling rate to 125Hz.  That is because you can use this nifty utility to up that rate:
http://www.majorgeeks.com/USB_Mouserate_Switcher_d4469.html

Set a rate of 250 or 500.  1000 is overkill.

One thing I did not mention is why we want an OS sample rate much higher then the original game.  This is so the values can get smoothed out to better simulate what the original control used.  If the original game used 60 and the OS uses 100, then during 40 of the games polls it uses the combined reading of 2 OS polls of the control.  For the other 20 game polls, it uses only 1 OS poll of the control.

For the same 60Hz game, lets say we now use 500Hz OS polling.  So now during 20 of the game polls, the OS supplies 9 polls.  For the other 40 game polls, the OS supplies 8.  From that you can see that the higher the OS poll rate, the closer the OS polling will match the original games polling.

This is also the same reasoning for wanting a high resolution control.  That way it can be scaled down to match the original control.  A lower resolution control can not easily match all games.  It will have a jerky reaction to it because it can not smoothly be scaled to match the original game.

Wow, I need a beer after all that rambling.  ;)

D.

Navigation

[0] Message Index

[#] Next page

[*] Previous page

Go to full version