Can I make ZSNES ignore my controller's analog stick?
Moderator: ZSNES Mods
Can I make ZSNES ignore my controller's analog stick?
My stick on my controller is stuck to the right. Using most of my other emulators, like epsxe or virtuanes, I can just set the directions to my d-pad and it works perfectly. But I can't do that in ZSNES because d-pad right is the same as analog right. Is there a way to turn the analog off completely in my games?
This is a big issue for me. I have the latest WIP. In my case my gamepad is a Logitech WingMan. There doesn't seem to be anything wrong with the analog stick itself, though not having used it in a while, I could be wrong. The stick is calibrated correctly. The WingMan has a "mode" button. When it's set one way, the D-pad is the x and y axis, and the analog stick acts as the POV hat; when it's set the other way, it's the other way around.
What happens for me is that the analog stick registers "jitters" to the left. This rarely happens, but when it does, it's as annoying as all hell and will usually go on for some time before it stops. In the meantime the game is absolutely unplayable if it's a standard action-type game. I just stopped playing Jurassic Park 2 out of frustration because the problem got so bad, even though I'd been playing an hour to get to where I was. (Maybe I should have made a save state, but I usually don't use them, since it's like "cheating". I guess this would be a special exception, though.)
I don't know if the problem is within ZSNES, with the drivers, with the controller, or what. Using the analog stick to control my character doesn't solve the problem; it will still register random jitters to the left even when I hold it firmly to the right. The dead zone works fine, too: if I gently move the joystick around in the dead zone, nothing happens. Pressing the "mode" button on my controller to switch which is x/y and which is the POV doesn't help either.
Anyway, it'd be a pretty simple solution to just add a switch to ignore the POV hat, wouldn't it? It'd solve the problem for me and probably anybody else who wishes they could disable their analog stick in ZSNES.
- Kef
What happens for me is that the analog stick registers "jitters" to the left. This rarely happens, but when it does, it's as annoying as all hell and will usually go on for some time before it stops. In the meantime the game is absolutely unplayable if it's a standard action-type game. I just stopped playing Jurassic Park 2 out of frustration because the problem got so bad, even though I'd been playing an hour to get to where I was. (Maybe I should have made a save state, but I usually don't use them, since it's like "cheating". I guess this would be a special exception, though.)
I don't know if the problem is within ZSNES, with the drivers, with the controller, or what. Using the analog stick to control my character doesn't solve the problem; it will still register random jitters to the left even when I hold it firmly to the right. The dead zone works fine, too: if I gently move the joystick around in the dead zone, nothing happens. Pressing the "mode" button on my controller to switch which is x/y and which is the POV doesn't help either.
Anyway, it'd be a pretty simple solution to just add a switch to ignore the POV hat, wouldn't it? It'd solve the problem for me and probably anybody else who wishes they could disable their analog stick in ZSNES.
- Kef
[url=http://gameinfo.wikicities.com]gameinfo wiki[/url] - Like GameFAQs, but [size=50]it will eventually be[/size] better
-
- Buzzkill Gil
- Posts: 4295
- Joined: Wed Jan 12, 2005 7:14 pm
Which WingMan, just out of curiosity?furrykef wrote:In my case my gamepad is a Logitech WingMan.
WingMan's a catchall label. It's Logitech's brand for ALL their gaming products.
It's in the controller, unless it's a gameport device. Then it could be in the soundcard or the wiring too.I don't know if the problem is within ZSNES, with the drivers, with the controller, or what.
I know where you're coming from though. I had a machine with a flaky gameport for a while. Couldn't use the joystick in anything because it kept snapping left and back to center.
You're right. I meant to say Logitech WingMan Action. It doesn't have a more specific name, though, if that can also refer to multiple controllers.Gil_Hamilton wrote:Which WingMan, just out of curiosity?furrykef wrote:In my case my gamepad is a Logitech WingMan.
WingMan's a catchall label. It's Logitech's brand for ALL their gaming products.
Nope, it's USB.It's in the controller, unless it's a gameport device. Then it could be in the soundcard or the wiring too.I don't know if the problem is within ZSNES, with the drivers, with the controller, or what.
- Kef
[url=http://gameinfo.wikicities.com]gameinfo wiki[/url] - Like GameFAQs, but [size=50]it will eventually be[/size] better
-
- Buzzkill Gil
- Posts: 4295
- Joined: Wed Jan 12, 2005 7:14 pm
Nope. Only one sublabel.furrykef wrote:You're right. I meant to say Logitech WingMan Action. It doesn't have a more specific name, though, if that can also refer to multiple controllers.Gil_Hamilton wrote:Which WingMan, just out of curiosity?furrykef wrote:In my case my gamepad is a Logitech WingMan.
WingMan's a catchall label. It's Logitech's brand for ALL their gaming products.
I used to have an Action.
Nope, it's USB.It's in the controller, unless it's a gameport device. Then it could be in the soundcard or the wiring too.I don't know if the problem is within ZSNES, with the drivers, with the controller, or what.
- Kef[/quote]Then it's a controller issue, as all the analog is processed in there.
Can't really say exactly where the problem lies, though.
Maybe a loose solder connection is causing the resistance to spike intermittently? *shrugs*
Yeah, I hate this damn controller. Not only the analog stick issue, but the D-pad feels unnatural, and I have problems with buttons being sticky. Still, even though the problem's with my controller, I really think ZSNES needs a switch to tell it to ignore any secondary directional inputs. Almost all other programs ignore them by default, so this is the "standard" way of doing things and I think ZSNES should support that standard.
Maybe I should just download the CVS sources and patch it in myself.
- Kef
Maybe I should just download the CVS sources and patch it in myself.
- Kef
[url=http://gameinfo.wikicities.com]gameinfo wiki[/url] - Like GameFAQs, but [size=50]it will eventually be[/size] better
I will add an option to ignore analog inputs. It will be a checkbox located on the input # screen. The only problem with doing this is it will only work if your gamepad returns a hat state for the digital. If it uses axis this is probably shared with the analog stick so there is no way to detect which axis are digital.
Actually, that'd cause the opposite behavior with my particular controller. When my controller is in "digital" mode, the D-pad has the axes and the analog is the hat. When it's in "analog" mode, the D-pad is the hat and the analog stick has the axes. So the controller would behave the opposite of what is specified: I'd have to set it to analog mode to use the D-pad. Your way of doing it may well be the correct choice for other controllers, though.
If this is so, I suggest having two checkboxes, one being "ignore axes" and another being "ignore hat" (I guess you'd have to think of better names...
), and selecting one disables the other. That way the user can always have the behavior most consistent with his controller's design.
- Kef
If this is so, I suggest having two checkboxes, one being "ignore axes" and another being "ignore hat" (I guess you'd have to think of better names...

- Kef
[url=http://gameinfo.wikicities.com]gameinfo wiki[/url] - Like GameFAQs, but [size=50]it will eventually be[/size] better
-
- Buzzkill Gil
- Posts: 4295
- Joined: Wed Jan 12, 2005 7:14 pm
What PF is saying that it will only work if your hat switch(the digital directional) claims to be a hat switch, and not if the d-pad just mirrors the thumbstick.furrykef wrote:Actually, that'd cause the opposite behavior with my particular controller. When my controller is in "digital" mode, the D-pad has the axes and the analog is the hat. When it's in "analog" mode, the D-pad is the hat and the analog stick has the axes. So the controller would behave the opposite of what is specified: I'd have to set it to analog mode to use the D-pad. Your way of doing it may well be the correct choice for other controllers, though.
If this is so, I suggest having two checkboxes, one being "ignore axes" and another being "ignore hat" (I guess you'd have to think of better names...), and selecting one disables the other. That way the user can always have the behavior most consistent with his controller's design.
- Kef
As you noted, he Action matches the requirements when set to "analog" mode.
I've never seen a pad where the d-pad mirrors the thumbstick, which is where PF's solution would fail, but I suppose it's a possibility.
And let me be the first to say I heart PF. This feature's long overdue.
...
Thinking of other possible issues, though... if it ignores all analog axes, XBox/Dreamcast-style analog trigger buttons won't work while it's enabled. On the upside, the throttle slider issue will be laid to rest that way.
If it ignores only X and Y, analog triggers continue to function, but the throttle issue persists.
I understood that. I'm just saying that the D-pad isn't going to be a hat switch when my gamepad's in digital mode, it's going to be the axes. It's the analog stick that's the hat switch in that mode. (At least, this is what the gamepad configuration window reports.)Gil_Hamilton wrote:What PF is saying that it will only work if your hat switch(the digital directional) claims to be a hat switch, and not if the d-pad just mirrors the thumbstick.
- Kef
[url=http://gameinfo.wikicities.com]gameinfo wiki[/url] - Like GameFAQs, but [size=50]it will eventually be[/size] better
-
- Buzzkill Gil
- Posts: 4295
- Joined: Wed Jan 12, 2005 7:14 pm
It sounded like you were saying the feature wouldn't work and that you needed an "ignore hat switch" option.furrykef wrote:I understood that. I'm just saying that the D-pad isn't going to be a hat switch when my gamepad's in digital mode, it's going to be the axes. It's the analog stick that's the hat switch in that mode. (At least, this is what the gamepad configuration window reports.)Gil_Hamilton wrote:What PF is saying that it will only work if your hat switch(the digital directional) claims to be a hat switch, and not if the d-pad just mirrors the thumbstick.
- Kef
Quibling because PF isn't accounting for reversed labeling when the pad is swapping the hat switches and analog axes on the few gamepads that have an option to swap the 2 to start with is just silly.
Not really. From a casual user's perspective, what's silly is setting your controller to D-pad mode and playing Doom, FCE Ultra, NBA Jam, insert-favorite-game here, and so on, then starting ZSNES and finding that the D-pad doesn't work because this is the one program that gets it backwards and now you have to hit the button (which you have to remember to hit again when you get back to those other programs). It may be a quibble, but it's a valid quibble. I don't think it would be any harder to have it set either way, so I think the user should be able to.Gil_Hamilton wrote:Quibling because PF isn't accounting for reversed labeling when the pad is swapping the hat switches and analog axes on the few gamepads that have an option to swap the 2 to start with is just silly.
- Kef
[url=http://gameinfo.wikicities.com]gameinfo wiki[/url] - Like GameFAQs, but [size=50]it will eventually be[/size] better
-
- Buzzkill Gil
- Posts: 4295
- Joined: Wed Jan 12, 2005 7:14 pm
ZSNES doesn't get anything backwards.furrykef wrote:Not really. From a casual user's perspective, what's silly is setting your controller to D-pad mode and playing Doom, FCE Ultra, NBA Jam, insert-favorite-game here, and so on, then starting ZSNES and finding that the D-pad doesn't work because this is the one program that gets it backwards and now you have to hit the button (which you have to remember to hit again when you get back to those other programs). It may be a quibble, but it's a valid quibble. I don't think it would be any harder to have it set either way, so I think the user should be able to.Gil_Hamilton wrote:Quibling because PF isn't accounting for reversed labeling when the pad is swapping the hat switches and analog axes on the few gamepads that have an option to swap the 2 to start with is just silly.
- Kef
If the user is actively swapping controller functions, the user is responsible for knowing what mode their gamepad is in.
Personally speaking, I set everything I can to work with the hat switch for digital controls because every time I turn my computer on the gamepad is in normal mode, and I dislike having to hit the "mode" button on my controller every time I go to play. Reconfiguring the software is a permanent solution, and invariably better than making the hardware lie.
Yes, but if ZSNES treats one mode as if it were the other mode for my controller, then it's "getting it backwards". It's not a matter of knowing what mode my gamepad is in. I'm saying if it were implemented exactly as pagefault said it (i.e., ignoring the axes and using only the hat), then ZSNES would interpret my gamepad the opposite of the way it's supposed to. There's no confusion about what mode my gamepad is in; the confusion would be in ZSNES' interpretation of what it means when my gamepad is in "digital" mode.Gil_Hamilton wrote:ZSNES doesn't get anything backwards.
If the user is actively swapping controller functions, the user is responsible for knowing what mode their gamepad is in.
I suppose a little more research needs to be done in this area. That is, how other controllers with a digital/analog toggle switch handle it. I wouldn't be surprised if they did it like mine, where if the controller is in D-pad mode, the D-pad mode has the axes and the analog stick has the hat, and if there's no switch, how it's handled then. My guess -- I am by no means experienced in this area -- is that the D-pad isn't actually represented as a hat all that often.
- Kef
[url=http://gameinfo.wikicities.com]gameinfo wiki[/url] - Like GameFAQs, but [size=50]it will eventually be[/size] better
-
- Buzzkill Gil
- Posts: 4295
- Joined: Wed Jan 12, 2005 7:14 pm
ZSNES doesn't treat it like it's in ANY "mode." No emulator does, and no game does.furrykef wrote:Yes, but if ZSNES treats one mode as if it were the other mode for my controller, then it's "getting it backwards".Gil_Hamilton wrote:ZSNES doesn't get anything backwards.
If the user is actively swapping controller functions, the user is responsible for knowing what mode their gamepad is in.
With the exception of the maunufacturer-supplied gamepad drivers and utilities, no software can see controller "mode."
As far as applications are concerned, your controller consists solely of a pile of switches and a couple of potentiometers. There's no case, no buttons, no thumbsticks, just dissociated parts. It neither knows nor cares where those parts are, and if the controller lies and claims a pair of switches is actually a pot, the application just takes it's word for it.
I would argue that it's behaving exactly as it should. Only accepting inputs identified by the controller as digital, and ignoring those which it is told are analog.It's not a matter of knowing what mode my gamepad is in. I'm saying if it were implemented exactly as pagefault said it (i.e., ignoring the axes and using only the hat), then ZSNES would interpret my gamepad the opposite of the way it's supposed to.
Whether they actually ARE digital or analog is not the emulator's problem, as it is the gamepad's responsibility to accurately report it's capabilities.
ZSNES' interpretation would imply it was POSSIBLE for ZSNES to know what mode your gamepad was in.There's no confusion about what mode my gamepad is in; the confusion would be in ZSNES' interpretation of what it means when my gamepad is in "digital" mode.
It isn't.
ZSNES can't tell, MAME can't tell, Doom3 can't tell, NOTHING can tell except the gamepad's drivers. As far as everything is concerned, your gamepad has no mode switch.
Yes. All PC mode switches behave that way. Because the entire point of the "mode" button is so people can use the d-pad to play games that only recognize the analog axes for directional input.I suppose a little more research needs to be done in this area. That is, how other controllers with a digital/analog toggle switch handle it. I wouldn't be surprised if they did it like mine, where if the controller is in D-pad mode, the D-pad mode has the axes and the analog stick has the hat,
It is a mildly clever hardware hack to work around limited software support.
It's a useful hack, certainly. But a hack is all it is.
No switch = no hack.and if there's no switch, how it's handled then.
In a pad with no analog sticks, the d-pad is viewed as axes. This is because the original IBM PC gameport only provided for analog directional input, and it is still the standard on PCs today. Any controller which lacks an X and Y axis is, by default, garbage.
In a pad with sticks and a d-pad, the d-pad is a hat switch. It would be completely insane to build them the other way around, as it would only cripple the controller and make those expensive pots under the thumbstick totally worthless.
In the modern era, you'd be wrong.My guess -- I am by no means experienced in this area -- is that the D-pad isn't actually represented as a hat all that often.
The default state of every PC pad with both a d-pad and thumbsticks is d-pad = hat switch, left thumbstick = x and y axes.
It is also the ONLY state in which such a pad has full functionality, as when the d-pad and thumbstick are swapped you lose analog input on your X and Y axes.
The only situations where a d-pad is viewed as analog axes are ...
1. Gamepads with no analog sticks. In these pads the designers chose to emulate the standard primary input for PC game devices to ensure maximum compatibility. The number of these being sold is increasingly slim, as the design is incredibly dated.
2. When the "d-pad as axes" hack is explicitly activated by the end user.
This should only be done to force compatibility with software that, while using digital motion, doesn't like hat switches as primary input. If hat switches are supported, the d-pad should be used in it's native mode. If analog motion is supported, the thumbstick should be used.
Mode switches are great, don't get me wrong.
But adding additional hacks to software for the sake of users that think they NEED to have the mode switch hack activated is just absurd.
There is no rational reason to ignore a hat switch within ZSNES. Digital is exactly the kind of input an SNES wants, and the preferred form of input for an SNES emulator.
There are a handful of reasons to ignore analog axes, the primary one being that ZSNES has never handled non-centering analog inputs very well.
There is one very good reason to make ignoring analog axes optional, and that's that analog is the PC standard and the only guaranteed capability on a PC controller is an analog X and Y axis.
Your problem with flakey hat switch inputs is a combination of faulty hardware and a controller hack you intentionally activate.
The behavior of defective controllers isn't be the responsibility of application authors.
-
- Veteran
- Posts: 970
- Joined: Fri Jan 21, 2005 11:15 am
- Location: Montana, United States
Counterpoint: why should I buy a new gamepad when the only program it doesn't work well with is ZSNES? :pSquareHead wrote:Can I ask the question that has not been asked? Why the hell does he not just buy a new gamepad?
I think you're getting condescending. I am aware of this, and of everything you said (other than how other modern controllers handle things). All I want is for ZSNES' behavior with the controller to be consistent with that of other programs. It is not like this would take an entire week to implement, nor would it be terribly unclean. If having options to ignore the axes and to ignore the hat would clutter up the GUI, you can just do it with a command line switch and/or a zsnesw.cfg option. I don't see a problem here. If nobody else wants to do it, I can download the sources from CVS and just do it myself. Why are you so firmly opposed to the idea when it can't really hurt anything?Gil_Hamilton wrote:ZSNES doesn't treat it like it's in ANY "mode." No emulator does, and no game does.
- Kef
[url=http://gameinfo.wikicities.com]gameinfo wiki[/url] - Like GameFAQs, but [size=50]it will eventually be[/size] better
-
- Buzzkill Gil
- Posts: 4295
- Joined: Wed Jan 12, 2005 7:14 pm
It certainly doesn't SOUND like you're aware.furrykef wrote:I think you're getting condescending. I am aware of this, and of everything you said (other than how other modern controllers handle things).Gil_Hamilton wrote:ZSNES doesn't treat it like it's in ANY "mode." No emulator does, and no game does.
Not really.All I want is for ZSNES' behavior with the controller to be consistent with that of other programs.
It doesn't make ZSNES behave like anything except for a few emulators that lack the ability to read a hat switch.
What WOULD make ZSNES act like every other program is to not have the hat switch permanently crosswired with the analog X and Y axes, so the left thumbstick and d-pad actually read as seperate devices.
That's a better solution than adding "ignore feature x" checkboxes. I believe the corsswiring was originally a quick way to add hat-switch support.
Ignoring analog axes is still useful for killing throttles and analog triggers, though. Which is the only reason I think it's a good idea.
Because it's STUPID.It is not like this would take an entire week to implement, nor would it be terribly unclean. If having options to ignore the axes and to ignore the hat would clutter up the GUI, you can just do it with a command line switch and/or a zsnesw.cfg option. I don't see a problem here. If nobody else wants to do it, I can download the sources from CVS and just do it myself. Why are you so firmly opposed to the idea when it can't really hurt anything?
- Kef
It's only purpose is to get around the fact that a single user is mis-using his defective controller.
I don't see anywhere where, for example, I've made the suggestion that ZSNES is supposed to know what mode my controller is in or anything like that. After all, I always phrased my suggestion in terms of ignoring the hat switch instead of detecting what mode my controller is in, because I know that's impossible. You just assume I'm ignorant because you think my suggestion is stupid. Maybe my suggestion is stupid, but that doesn't mean I don't know how DirectInput (or whatever ZSNES uses) works. A stupid suggestion doesn't necessarily come from a stupid person.Gil_Hamilton wrote:It certainly doesn't SOUND like you're aware.furrykef wrote:I think you're getting condescending. I am aware of this, and of everything you said (other than how other modern controllers handle things).Gil_Hamilton wrote:ZSNES doesn't treat it like it's in ANY "mode." No emulator does, and no game does.

Anyway, continuing to argue the question of whether or not ZSNES should have an "ignore hat" option is purposeless, since we've both obviously have our minds made up on the subject, and I don't think either of us are going to come up with a point that the other hasn't considered already. In the end, it's just going to be whether or not the big guy thinks it's a good idea. Probably not, but I was just raising a point so that it could be considered.
Here, I'll apologize for making such a stupid suggestion if you apologize for assuming I'm an idiot, all right?

- Kef
[url=http://gameinfo.wikicities.com]gameinfo wiki[/url] - Like GameFAQs, but [size=50]it will eventually be[/size] better
-
- Buzzkill Gil
- Posts: 4295
- Joined: Wed Jan 12, 2005 7:14 pm
I never meant to even imply you were an idiot.furrykef wrote: Here, I'll apologize for making such a stupid suggestion if you apologize for assuming I'm an idiot, all right?
- Kef
I assumed you were merely unknowledgable. That's not the same thing at all.
But it WAS reading like you had some misconceptions about pad behavior, though that was apparently a misinterpretation on my part.
You did, indirectly, raise a good point.
There's not much reason for the hat switch and X/Y axes to be crosswired, and it IS odd controller behavior(though a convenient oddity more often than not).
-
- Buzzkill Gil
- Posts: 4295
- Joined: Wed Jan 12, 2005 7:14 pm
From what I've seen, most gamepads come with such software.furrykef wrote:That sounds like a good solution, and if all controllers like mine have an app like that, I suppose it would be a good compromise.
- Kef
By necessity, really. Because PC games tend to have weak gaming device support, the ability to do keyboard mapping is a requirement for effective PC usage.