Joystick diagonals not working
-
@capeman said in Joystick diagonals not working:
Oh, another question, which mame emulator are you using?
lr-mame2003 or adv-mame?Sorry: it's lr-mame2003.
-
Looking at your pictures, what is that other board with only blue connectors? Looks like a small iPac, but im not sure why you'd have 2 of them in there.
Sorry if im spamming with questions, but im trying to get a handle on your build.
-
My guess is so he can use it as a USB controller.
-
@capeman It is used to control the lights that are inside our buttons. (All buttons on our cabinet have RGB LEDs.)
-
One test you definitely need to try is whether you can trigger the diagonals by manually actuating the joystick switches. For example, use your hand under the joystick, or first take a pliers to pull off the c-clip and remove the joystick shaft so you can reach two adjacent switches at the same time.
The idea here is that you need to prove that you are not dealing with a mechanical actuator issue.
-
You could also try another emulator like AdvanceMAME. Rather than obtaining another ROMset to make this work, you can run the
advk
utility and see what that emulator would be seeing as you hit the diagonals./opt/retropie/emulators/advmame/bin/advk
Using this utility, you can see what advancemame would be detecting when you hit the corners. It should show relative timing between “keys” (the IPAC is a keyboard controller) and when you are in the corner you should see
[ 2] left[2] up[2]
for example when you push the stick to the upper-left. -
I am not a subject expert here, so I may be completely off track, but I recall an older case here in the forums where this was happening and it was because the joystick writing wasn't set up as intended. Instead of being connected to the correct up/down/left/right it was connected in a way that when you tried to send for instance up and right diagonal it was attempting to send "up" and "down" instead which wouldn't of course work.
I know this is extremely vague, and I don't know if this was the board they were using, but maybe this can help.
Best.
-
@pjft has a good point. For example, it is possible to configure Q-Bert (which expects your joystick to be mounted at a 45 degree angle) such that “UP” in the game is actually UP <and> RIGHT and so on.
@gregmaletic if you are using lr-mame2003 for instance, what happens when you go into the GUI menu and look at an a game’s control mapping? You will have to connect a USB keyboard so you can press TAB to get into the menu.
-
i have seen this on some c64 games, commando for example, would rarely do a diagonal, it was timing based, i could get it to work occasionally.
i havent fully investigated yet -
@gregmaletic said in Joystick diagonals not working:
@capeman said in Joystick diagonals not working:
Is it just mame that is not working with diagonals?
MAME is the only emulator we use, so I'm not sure.
Run a test on a console emulator such as SNES, use Zelda Link to the Past as a test because the character movement would be extremely easy to tell if you are getting diagonal inputs from your hardware.
If the SNES emulator works with diagonals, you can rule out hardware as the issue and focus on your mame settings.
-
Here are my 2 cents:
Sine the very beginning of my gaming career (1984) making diagonal moves with Joysticks always has been a let's-call-it "tricky" issue ( to not use the f*-word............. frustrating). As shown on your photo, movement by a joystick was (and is) always done by 4 switches (left,right,up and down). In early times there have been even Joysticks working with just two pieces of metal per direction, being pressed together by moving the stick. The old Atari joysticks where "working" like this. Later on, the first Joysticks with so-called micro-switches where showing up and the most popular (and reliable) one was the "Competition Pro". With this stick, you where able to win e.g. every obstacle run in the game "Decathlon" and the joystick survived more than one game (and if one of the switches failed, it was an easy one to fix it or replace it by yourself).
Back to topic: When doing a diagonal move, technically two switches should be pressed at the same time by moving the Joystick.
A theory: One of the switches is (in most times) pressed milliseconds earlier then the other. So the program ("Game") is doing e.g. a move to the left instead an "up-and-left" (diagonal) and is not recognizing the sceond button being pressed shortly after the first one. Does this make sense ? Well it became a valid theroy for me after 32 years in gaming.
I remember games (C64 mostly) where diagonal moves are often being the thing costing you your last life before reaching the next savepoint (if there where any).
When I start with playing games in Retropie I soon found out that e.g. the 4-Way "Buffalo SNES" controllers I use, are also having a lack in reflecting diagonal moves. "Super Mario World" (or all 360-degrees games) was one game which is very hard to play with. Jump'n Runs like "Burger Time" or "Loderunner" where doing fine with 4_Ways( no diagonal moves needed so far).I then lend one of the XBOX 360 controllers of my son , connect it to the Retropie and start playing games like "Super Mario World" and "Crash Bandicoot" with the analouge stick of the pad.
What to say: It works like charm !I never liked the Xbox/Playstation controllers neither owned a console, because I grew up with the Atari/Logitech/Competition Pro sticks and 4 (up to 8) directions and two fire buttons for a game where also enough to deal with (in former times).
But with the Retropie, it has become the first time I used this controllers and they make absolute sense for playing 360-degrees -games.
There are still a lot of buttons to learn to deal with, but maybe I have another 32 years to learn :-).So if you have a way to test a Xbox360 controller with your Retropie (after configuring it correctly - may need a little patience), I guess you also will not use any other controller anymore.
Give it a try and let me know the result.
regards,
SK
-
@sutterkane said in Joystick diagonals not working:
A theory: One of the switches is (in most times) pressed milliseconds earlier then the other. So the program ("Game") is doing e.g. a move to the left instead an "up-and-left" (diagonal) and is not recognizing the sceond button being pressed shortly after the first one. Does this make sense ?
Actually, im not sure this does make sense, there's no reason that a diagonal movement needs to be triggered by 2 actuators at the same millisecond. If theres a delay between UP and LEFT for example, the onscreen input will briefly move left before transitioning to up/left. You don't need to let go of a direction input to input another direction on a separate axis, that would make fighting games for example (where you roll the joystick from left to down to input LEFT-LEFT/DOWN-DOWN in succession) completely unplayable. HADOUKEN!
**Note this may not be the case in C64 as you state, i can't speak for that, older computers had limitations that newer consoles don't / but this is definitely IS the case in Mame and popular console emulators.
If left is mapped to the LEFT arrow on a keyboard and up is mapped to the UP arrow, then the diagonal is interpreted by the combination of LEFT and UP keys by the pi. The iPac encoder allows for 52 simultaneous keypresses without ghosting, so there is no hardware driven reason that an up left input should not be received. And if LEFT is being held and UP is added after the fact the direction will transition without needing to release the left input. This is game control at is absolute most basic.
Also im not sure how using an X-box controller will help him fix his joystick/button arcade control setup.
The best test would be to test your current setup with a console emulator to see if other emulators are receiving diagonals, that will rule out a hardware issue.
-
Just thought of something else also, the PC versions of mame do a better job of fixing games that ignore diagonal inputs completely. Pac-Man and Ghouls and Ghosts are notable examples of this.
Pac-Man used a 4way joystick and the original PCB literally could not interpret 2 inputs at the same time. Later versions of mame enabled a fix for this, when the diagonal input in pacman is received, the emulator interprets the second input (if UP is pressed after LEFT) as the intended input and continues to feed the game that input and ignore the first/older simultaneous input. On older versions of mame, the second input is ingored and you would have to let go of left before pressing up for the input to be received. Im not sure if mame 2003 is new enough to include these types of fixes, but i havent had trouble with Pac-man so my guess is that it is there.
Ghouls and ghosts is the opposite example, the game used an 8 way joystick for some reason, but the game was programmed to literally and purposely ignored diagonal input. If you transitioned the joystick from RIGHT to RIGHT/UP mid run, Arthur would literally stop in place until the up actuator was released. Why that game didnt utilize a 4 way joystick is a mystery to this day, but in modern (im not sure about more recent versions) this function has never been tweaked.
There's lots of funny business about mame and diagonals, lots of games suffer from issues on a per game basis.
-
ive noticed it hard to do special moves in street fighter when a diagonal is needed.
Contributions to the project are always appreciated, so if you would like to support us with a donation you can do so here.
Hosting provided by Mythic-Beasts. See the Hosting Information page for more information.