RetroPie forum home
    • Recent
    • Tags
    • Popular
    • Home
    • Docs
    • Register
    • Login
    Please do not post a support request without first reading and following the advice in https://retropie.org.uk/forum/topic/3/read-this-first

    Joystick diagonals not working

    Scheduled Pinned Locked Moved Help and Support
    joystick mappin
    20 Posts 7 Posters 11.7k Views
    Loading More Posts
    • Oldest to Newest
    • Newest to Oldest
    • Most Votes
    Reply
    • Reply as topic
    Log in to reply
    This topic has been deleted. Only users with topic management privileges can see it.
    • caver01C
      caver01 @gregmaletic
      last edited by

      @gregmaletic How is anyone supposed to give reasonable help when you give no details about your setup? Can you please provide the requested info from here? Otherwise, we are guessing.

      For example, here's my guess, likely wrong, but I have little to go on:

      You have a 4-way arcade joystick with a restrictor plate that is blocking your diagonals. Remove the plate.

      My 4-player cocktail style cabinet built as a custom "roadcase"

      G 1 Reply Last reply Reply Quote 0
      • G
        gregmaletic @caver01
        last edited by

        @caver01 Thanks. I don't see a restrictor plate on this joystick. (This is the MAME cabinet we have at work; I didn't build it.)

        Restating my question: joystick diagonals aren't working in any MAME games. Diagonals used to work when we had a Windows PC driving the cabinet. Now we've got the Raspberry Pi 3…and no diagonals. If anyone has any suggestions, please let me know!

        Here's some basic info, along with photos.

        Pi Model or other hardware:
        Raspberry Pi 3

        RetroPie Version Used:
        Build 7aa68d4, April 1 2017. https://github.com/RetroPie/RetroPie-Setup/commit/7aa68d4e8d2dccca02ed935fc019056058518914
        (If there is a way to figure out a version number for this, let me know. I couldn’t.)

        Built From:
        Pre-made SD image on RetroPie web site

        USB Devices connected:
        iPAC Board

        Controller used:
        iPAC Board with 8-way arcade joysticks, no restrictor plates that I can see.

        0_1499817480755_IMG_3707 (1).jpg

        1_1499817480756_IMG_3709 (1).jpg

        2_1499817480756_IMG_3712 (1).jpg !

        1 Reply Last reply Reply Quote 0
        • CapemanC
          Capeman
          last edited by

          Is it just mame that is not working with diagonals? Are you getting the same effect on console emulators? Also, did you setup your ipac using the retropie joypad config or did you map everything manually in retroarch.cfg.

          Feel free to post your retroarch.cfg file, it would be interesting to see how you have your buttons mapped to the keyboard keys. I have an iPac2 and do not experience this issue with any emulator.

          ALSO, side note, what kind of buttons are you using, those look like leaf style actuators, i havent seen those in buttons before, those must feel nice!

          Vector Artist, Designer and Maker of Stuff: Laser Cut Atari / Pixel Theme Bartop

          G 1 Reply Last reply Reply Quote 0
          • G
            gregmaletic @Capeman
            last edited by

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

            Also, did you setup your ipac using the retropie joypad config or did you map everything manually in retroarch.cfg.

            All done in EmulationStation, if that makes any sense. I don't see a retroarch.cfg file anywhere…

            ALSO, side note, what kind of buttons are you using, those look like leaf style actuators, i havent seen those in buttons before, those must feel nice!

            They do look like leaf-switch buttons, and… yeah, they're not bad…? Not super-clicky, which is nice.

            CapemanC 1 Reply Last reply Reply Quote 0
            • CapemanC
              Capeman
              last edited by

              Oh, another question, which mame emulator are you using?
              lr-mame2003 or adv-mame?

              Vector Artist, Designer and Maker of Stuff: Laser Cut Atari / Pixel Theme Bartop

              G 1 Reply Last reply Reply Quote 0
              • G
                gregmaletic @Capeman
                last edited by

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

                1 Reply Last reply Reply Quote 0
                • CapemanC
                  Capeman
                  last edited by Capeman

                  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.

                  Vector Artist, Designer and Maker of Stuff: Laser Cut Atari / Pixel Theme Bartop

                  G 1 Reply Last reply Reply Quote 0
                  • EcksE
                    Ecks
                    last edited by

                    My guess is so he can use it as a USB controller.

                    1 Reply Last reply Reply Quote 0
                    • G
                      gregmaletic @Capeman
                      last edited by

                      @capeman It is used to control the lights that are inside our buttons. (All buttons on our cabinet have RGB LEDs.)

                      1 Reply Last reply Reply Quote 0
                      • caver01C
                        caver01
                        last edited by

                        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.

                        My 4-player cocktail style cabinet built as a custom "roadcase"

                        1 Reply Last reply Reply Quote 0
                        • caver01C
                          caver01
                          last edited by

                          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.

                          My 4-player cocktail style cabinet built as a custom "roadcase"

                          1 Reply Last reply Reply Quote 0
                          • pjftP
                            pjft
                            last edited by

                            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.

                            1 Reply Last reply Reply Quote 0
                            • caver01C
                              caver01
                              last edited by

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

                              My 4-player cocktail style cabinet built as a custom "roadcase"

                              1 Reply Last reply Reply Quote 0
                              • spruce_m00seS
                                spruce_m00se
                                last edited by

                                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

                                1 Reply Last reply Reply Quote 0
                                • CapemanC
                                  Capeman @gregmaletic
                                  last edited by Capeman

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

                                  Vector Artist, Designer and Maker of Stuff: Laser Cut Atari / Pixel Theme Bartop

                                  1 Reply Last reply Reply Quote 0
                                  • SutterKaneS
                                    SutterKane
                                    last edited by

                                    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

                                    CapemanC 1 Reply Last reply Reply Quote 0
                                    • CapemanC
                                      Capeman @SutterKane
                                      last edited by Capeman

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

                                      Vector Artist, Designer and Maker of Stuff: Laser Cut Atari / Pixel Theme Bartop

                                      1 Reply Last reply Reply Quote 0
                                      • CapemanC
                                        Capeman
                                        last edited by Capeman

                                        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.

                                        Vector Artist, Designer and Maker of Stuff: Laser Cut Atari / Pixel Theme Bartop

                                        1 Reply Last reply Reply Quote 0
                                        • spruce_m00seS
                                          spruce_m00se
                                          last edited by

                                          ive noticed it hard to do special moves in street fighter when a diagonal is needed.

                                          1 Reply Last reply Reply Quote 0
                                          • First post
                                            Last post

                                          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.