Can I make ZSNES ignore my controller's analog stick?

Gamepad acting up? Keyboard not responding properly? Can't get that other user to work? Read and post about it here.

Moderator: ZSNES Mods

gandalf85

Can I make ZSNES ignore my controller's analog stick?

Post by gandalf85 »

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?
whicker
Trooper
Posts: 479
Joined: Sat Nov 27, 2004 4:33 am

Post by whicker »

to be blunt: no.

Are you using the latest WIP from ipher's site? (Hint: google ipher)

There is code in ZSNES that should ignore the input if a particular analog direction is outside of the dead-zone when ZSNES starts up, but with your comment it appears to not be working.
furrykef
Rookie
Posts: 13
Joined: Mon Aug 02, 2004 3:17 am

Post by furrykef »

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
[url=http://gameinfo.wikicities.com]gameinfo wiki[/url] - Like GameFAQs, but [size=50]it will eventually be[/size] better
Gil_Hamilton
Buzzkill Gil
Posts: 4295
Joined: Wed Jan 12, 2005 7:14 pm

Post by Gil_Hamilton »

furrykef wrote:In my case my gamepad is a Logitech WingMan.
Which WingMan, just out of curiosity?
WingMan's a catchall label. It's Logitech's brand for ALL their gaming products.

I don't know if the problem is within ZSNES, with the drivers, with the controller, or what.
It's in the controller, unless it's a gameport device. Then it could be in the soundcard or the wiring too.


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.
furrykef
Rookie
Posts: 13
Joined: Mon Aug 02, 2004 3:17 am

Post by furrykef »

Gil_Hamilton wrote:
furrykef wrote:In my case my gamepad is a Logitech WingMan.
Which WingMan, just out of curiosity?
WingMan's a catchall label. It's Logitech's brand for ALL their gaming products.
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.
I don't know if the problem is within ZSNES, with the drivers, with the controller, or what.
It's in the controller, unless it's a gameport device. Then it could be in the soundcard or the wiring too.
Nope, it's USB.

- Kef
[url=http://gameinfo.wikicities.com]gameinfo wiki[/url] - Like GameFAQs, but [size=50]it will eventually be[/size] better
Gil_Hamilton
Buzzkill Gil
Posts: 4295
Joined: Wed Jan 12, 2005 7:14 pm

Post by Gil_Hamilton »

furrykef wrote:
Gil_Hamilton wrote:
furrykef wrote:In my case my gamepad is a Logitech WingMan.
Which WingMan, just out of curiosity?
WingMan's a catchall label. It's Logitech's brand for ALL their gaming products.
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.
Nope. Only one sublabel.

I used to have an Action.

I don't know if the problem is within ZSNES, with the drivers, with the controller, or what.
It's in the controller, unless it's a gameport device. Then it could be in the soundcard or the wiring too.
Nope, it's USB.

- 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*
furrykef
Rookie
Posts: 13
Joined: Mon Aug 02, 2004 3:17 am

Post by furrykef »

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
[url=http://gameinfo.wikicities.com]gameinfo wiki[/url] - Like GameFAQs, but [size=50]it will eventually be[/size] better
pagefault
ZSNES Developer
ZSNES Developer
Posts: 812
Joined: Tue Aug 17, 2004 5:24 am
Location: In your garden

Post by pagefault »

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.
furrykef
Rookie
Posts: 13
Joined: Mon Aug 02, 2004 3:17 am

Post by furrykef »

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
[url=http://gameinfo.wikicities.com]gameinfo wiki[/url] - Like GameFAQs, but [size=50]it will eventually be[/size] better
Gil_Hamilton
Buzzkill Gil
Posts: 4295
Joined: Wed Jan 12, 2005 7:14 pm

Post by Gil_Hamilton »

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
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.
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.
furrykef
Rookie
Posts: 13
Joined: Mon Aug 02, 2004 3:17 am

Post by furrykef »

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.
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.)

- Kef
[url=http://gameinfo.wikicities.com]gameinfo wiki[/url] - Like GameFAQs, but [size=50]it will eventually be[/size] better
rumrum
Rookie
Posts: 43
Joined: Fri Sep 16, 2005 10:55 pm

Post by rumrum »

I actually prefer the analog stick on all of my SNES games. :oops:

Makes playing the fighting and rpgs easyer. :wink:
BLARGH!
Gil_Hamilton
Buzzkill Gil
Posts: 4295
Joined: Wed Jan 12, 2005 7:14 pm

Post by Gil_Hamilton »

furrykef wrote:
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.
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.)

- Kef
It sounded like you were saying the feature wouldn't work and that you needed an "ignore hat switch" option.

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.
furrykef
Rookie
Posts: 13
Joined: Mon Aug 02, 2004 3:17 am

Post by furrykef »

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.
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.

- Kef
[url=http://gameinfo.wikicities.com]gameinfo wiki[/url] - Like GameFAQs, but [size=50]it will eventually be[/size] better
Gil_Hamilton
Buzzkill Gil
Posts: 4295
Joined: Wed Jan 12, 2005 7:14 pm

Post by Gil_Hamilton »

furrykef wrote:
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.
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.

- Kef
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.


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.
furrykef
Rookie
Posts: 13
Joined: Mon Aug 02, 2004 3:17 am

Post by furrykef »

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.
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.

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
Gil_Hamilton
Buzzkill Gil
Posts: 4295
Joined: Wed Jan 12, 2005 7:14 pm

Post by Gil_Hamilton »

furrykef wrote:
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.
Yes, but if ZSNES treats one mode as if it were the other mode for my controller, then it's "getting it backwards".
ZSNES doesn't treat it like it's in ANY "mode." No emulator does, and no game does.
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.

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.
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.
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.

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.
ZSNES' interpretation would imply it was POSSIBLE for ZSNES to know what mode your gamepad was in.
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.
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,
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.
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.
and if there's no switch, how it's handled then.
No switch = no hack.


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.
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.
In the modern era, you'd be wrong.

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.
SquareHead
Veteran
Posts: 970
Joined: Fri Jan 21, 2005 11:15 am
Location: Montana, United States

Post by SquareHead »

Can I ask the question that has not been asked? Why the hell does he not just buy a new gamepad?
furrykef
Rookie
Posts: 13
Joined: Mon Aug 02, 2004 3:17 am

Post by furrykef »

SquareHead wrote:Can I ask the question that has not been asked? Why the hell does he not just buy a new gamepad?
Counterpoint: why should I buy a new gamepad when the only program it doesn't work well with is ZSNES? :p
Gil_Hamilton wrote:ZSNES doesn't treat it like it's in ANY "mode." No emulator does, and no game does.
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?

- Kef
[url=http://gameinfo.wikicities.com]gameinfo wiki[/url] - Like GameFAQs, but [size=50]it will eventually be[/size] better
Gil_Hamilton
Buzzkill Gil
Posts: 4295
Joined: Wed Jan 12, 2005 7:14 pm

Post by Gil_Hamilton »

furrykef wrote:
Gil_Hamilton wrote:ZSNES doesn't treat it like it's in ANY "mode." No emulator does, and no game does.
I think you're getting condescending. I am aware of this, and of everything you said (other than how other modern controllers handle things).
It certainly doesn't SOUND like you're aware.
All I want is for ZSNES' behavior with the controller to be consistent with that of other programs.
Not really.
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.

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
Because it's STUPID.
It's only purpose is to get around the fact that a single user is mis-using his defective controller.
furrykef
Rookie
Posts: 13
Joined: Mon Aug 02, 2004 3:17 am

Post by furrykef »

Gil_Hamilton wrote:
furrykef wrote:
Gil_Hamilton wrote:ZSNES doesn't treat it like it's in ANY "mode." No emulator does, and no game does.
I think you're getting condescending. I am aware of this, and of everything you said (other than how other modern controllers handle things).
It certainly doesn't SOUND like you're aware.
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. :P

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
Gil_Hamilton
Buzzkill Gil
Posts: 4295
Joined: Wed Jan 12, 2005 7:14 pm

Post by Gil_Hamilton »

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 never meant to even imply you were an idiot.
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).
tetsuo55
Regular
Posts: 307
Joined: Sat Mar 04, 2006 3:17 pm

Post by tetsuo55 »

i did not read the whole thread

but i used the logitech app to make a profile for emulators, which disables all the analogue controls
furrykef
Rookie
Posts: 13
Joined: Mon Aug 02, 2004 3:17 am

Post by furrykef »

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
[url=http://gameinfo.wikicities.com]gameinfo wiki[/url] - Like GameFAQs, but [size=50]it will eventually be[/size] better
Gil_Hamilton
Buzzkill Gil
Posts: 4295
Joined: Wed Jan 12, 2005 7:14 pm

Post by Gil_Hamilton »

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
From what I've seen, most gamepads come with such software.
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.
Post Reply