Main > Main Forum
Ultimarc rotary encoder issues
Rip:
I downloaded the Passmark KB test application to see how long the key
presses are. This shortest keypress I can generate on my kb with the [ and ]
keys is 15ms. The encoder only generates somewhere between 7ms and 15ms
keypresses, usually on the 7-8ms end. Could this be too short for MAME to
recognize?
Rip:
If I take off the throttling in MAME, although the game runs at 5x its speed, every click of the encoder is picked up correctly.
So this is my theory thus far, Derrick maybe you can confirm or correct.
A throttled MAME runs at 60fps max, which is a frame every 16ms. If the encoder is generating 8ms clicks, it is possible that an entire click starts and ends within a frame and is therefore lost.
With throttling off, I am actually getting 300 fps, which is about a frame every 3ms. With this level of granularity, a click of 8ms will always be spread across more than 1 frame and therefore it is always recognized.
Does this make sense?
So the corrective action would be to make the encoder generate > 16ms key-presses, say 30ms, so that they are always recognized at 60 fps. ???
Kremmit:
--- Quote from: MaximRecoil on April 06, 2007, 03:12:29 pm ---Those inconsistencies in policy would probably not be brought up all that often if it were not for all the disciples who preach with fervor the "For Preservation, Not For Gameplay!" gospel.
--- End quote ---
No, this stuff gets brought up so often because there's a very, very large group of MAME users out there that doesn't know what they're talking about.
And for crying out loud, Leave Derrick Alone. He's the one dev that seems really interested in fixing a lot of the controller-specific issues and inconsistencies that we're talking about here in the first place.
MaximRecoil:
--- Quote from: Kremmit on April 07, 2007, 12:54:28 am ---
--- Quote from: MaximRecoil on April 06, 2007, 03:12:29 pm ---Those inconsistencies in policy would probably not be brought up all that often if it were not for all the disciples who preach with fervor the "For Preservation, Not For Gameplay!" gospel.
--- End quote ---
No, this stuff gets brought up so often because there's a very, very large group of MAME users out there that doesn't know what they're talking about.
--- End quote ---
That doesn't preclude what I said. So while your statement is no doubt true, it has no reason to begin with the word "no".
--- Quote ---And for crying out loud, Leave Derrick Alone. He's the one dev that seems really interested in fixing a lot of the controller-specific issues and inconsistencies that we're talking about here in the first place.
--- End quote ---
I didn't say anything against Derrick, or even, about Derrick. I pointed out a common reason for people pointing out inconsistencies in MameDev policies. When you have so many people who rudely respond to any statement or question that even hints that you might be interested in playing a game, with a "For Preservation, Not Gameplay" rant; then of course people are going to point out logical contradictions in that "policy" if they exist. On the other hand, when the stated policy/mission was accompanied with a wink and a grin, like in the early days of Mame (I'm pretty sure that Nicola Salmoria was far more interested in simply playing Pac-Man back in '97 than in any enlightened, altruistic, preservation crusade like gets hammered about so often these days), and not wielded like a weapon; then few people are going to mention inconsistencies in policy, because the policy isn't being slung at them in a confrontational manner in the first place. Like the old proverb says, "Those who live in glass houses shouldn't throw stones."
AndyWarne:
--- Quote from: Rip on April 07, 2007, 12:49:57 am ---If I take off the throttling in MAME, although the game runs at 5x its speed, every click of the encoder is picked up correctly.
So this is my theory thus far, Derrick maybe you can confirm or correct.
A throttled MAME runs at 60fps max, which is a frame every 16ms. If the encoder is generating 8ms clicks, it is possible that an entire click starts and ends within a frame and is therefore lost.
With throttling off, I am actually getting 300 fps, which is about a frame every 3ms. With this level of granularity, a click of 8ms will always be spread across more than 1 frame and therefore it is always recognized.
Does this make sense?
So the corrective action would be to make the encoder generate > 16ms key-presses, say 30ms, so that they are always recognized at 60 fps. ???
--- End quote ---
I can certainly supply a version with longer keypresses for testing. But the maximum keypress rate will decrease of course.
Andy