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

    Can't get controller working in Reicast

    Scheduled Pinned Locked Moved Help and Support
    reicastcontroller
    35 Posts 8 Posters 4.5k 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.
    • EfriimE
      Efriim @joelkolb
      last edited by

      @joelkolb
      I'm sorry that hasn't worked for you. Are you making the edits using windows notepad, nano, or a notepad+?

      Windows notepad I think would not save the line break that unix uses.

      J 1 Reply Last reply Reply Quote 0
      • J
        joelkolb @Efriim
        last edited by

        @Efriim I strictly use Notepad++ because it handles the end of line characters correctly.

        EfriimE 1 Reply Last reply Reply Quote 1
        • EfriimE
          Efriim @joelkolb
          last edited by Efriim

          @joelkolb
          try this
          cp /opt/retropie/configs/dreamcast/mappings/controller_RetroFlagWiredController.cfg /home/pi/.local/share/reicast/mappings/RetroFlag\ Wired\ Controller.cfg

          or list this directory to see if there is a already a config here first.
          ls ~/.local/share/reicast/mappings/

          Oh yes, and if you use the configure input in emulationstation it rewrites the configuration with the one that you had previously, from wherever it gets that I don't know.

          J 1 Reply Last reply Reply Quote 0
          • J
            joelkolb @Efriim
            last edited by

            @Efriim /home/pi/.local/share is empty for me. There is no reicast subdirectory. As far as the "Configure input" option in Emulation Station, my understanding is that it takes the node it creates in /opt/retropie/configs/all/emulationstation/es_input.cfg for the controller you just set up and converts it into the format for a Reicast controller config file and saves it to /opt/retropie/configs/dreamcast/mappings/. And yes it will overwrite any previous existing file with the name for that config.

            EfriimE 1 Reply Last reply Reply Quote 0
            • EfriimE
              Efriim @joelkolb
              last edited by

              @joelkolb
              try
              sudo /opt/retropie/emulators/reicast/bin/reicast-joyconfig
              and
              ls -la ~/.local/share/reicast/mappings/
              that folder has normal permissions and is owned by user if you want to create it.

              1 Reply Last reply Reply Quote 0
              • J
                joelkolb
                last edited by joelkolb

                I figured it out and the solution seems kind of nutty and definitely, IMHO, indicates there is a bug in reicast-joyconfig. To solve the problem you must have a controller with an analog stick.

                tl;dr: You must use a controller with an analog stick to run "+Start Reicast" to navigate the Reicast menu and go to Settings/Controls and then remap your buttons on the controller without an analog stick. reicast-joyconfig incorrectly maps exit and start to clicking on the analog sticks. This will cause you to get stuck once you launch a game using a controller without an analog stick. Remapping your buttons in this interface will fix this and get your analog-stick-less controller working in Reicast.

                The long, detailed explanation:
                So the controller that I was using (RetroFlag Wired Controller) has no analog sticks since it is a SNES style controller. This all started with a build I'm making for a friend who only has this controller and I was setting him up with a few Dreamcast games that run well in RetroPie and also don't require analog input (e.g. Capcom vs. SNK, Marvel vs. Capcom, Power Stone, etc.). The problem comes into play because reicast-joyconfig and Emulation station's configure input option both map the exit and start buttons incorrectly. I said earlier I think the bug is in reicast-joyconfig because Emulation Station will map those buttons exactly the same as reicast-joyconfig in the controller config files they both generate so Emulation Station seems to just be following suit with reicast-joyconfig. Actually, I don't know this for sure but rather than mapping es_input.cfg to a Reicast controller config on it's own, it could be possible that after setting up a cconroller in Emulation Station, it could actually run reicast-joyconfig in the cackground, feeding it parameters for the button/stick mappings based on what was just saved in es_input.cfg. This to me would even more strongly indicate that there is a bug in reicast-joyconfig.

                Sorry for the tangent, back to the solution. So the controller I had been using has no analog sticks. On a hunch I set up another controller that does have analog sticks (8BitDo SN30 Pro). After launching a Dreamcast game with this controller and fumbling with the controller for a bit I discovered that the exit and start buttons were incorrectly mapped to clicking down on the left and right analog sticks. Since my RetroFlag Wired Controller has no analog sticks it effectively was mapped with no select or exit buttons. So when a game launches and gets to the title screen or a screen where it prompts you to set up a save slot and you are required to press start to proceed you will be stuck and you can't start the game or exit Reicast back to Emulation Station.

                When I run +Start Reicast I found that even though it is navigated with the D-pad, I could only navigate it using the D-pad on my controller that also has an analog stick. I think this is due to some further weirdness with how the analog stick and D-pad are mapped by reicast-joyconfig. More on that later.

                Once in the Reicast menu, when I go to Settings there is a Controls sub-menu with a Physical Devices section at the bottom with both of my controllers listed and the option to map the buttons and sticks on those controllers. When I went to re-map my 8BitDo controller I found that all the button numbers that were assigned in this interface were totally different from what they were previously listed as (and I assume it got those previous values from the config file generated by reicast-joyconfig). But the most significant of those incorrect mappings were the exit and start buttons. Both before and after remapping, the controller still worked and all the controls worked as expected except for the exit and select buttons.

                So, I then remapped my RetroFlag controller. I experienced the same situation were the the values for all the buttons were different when mapping here. Also odd was that I could not remap the D-pad here. It simply did not recognize any input from it. However, after saving those new values and loading games my RetroFlag controller worked perfectly, now that start and exit were no longer mapped to non-existent analog sticks.

                Also interesting is that performing these remaps in Reicast created the following files.
                evdev_Pro Controller.cfg
                evdev_RetroFlag Wired Controller.cfg

                The previous files:
                controller_ProController.cfg
                controller_RetroFlagWiredController.cfg
                are no longer used and can be deleted.

                Unfortunately, all this means that if you want to use Reicast with a controller that does not have an analog stick, you must first use a controller that does have an analog stick to get the other controller properly configured in Reicast. Fortunately, this is an option for me but may not be an option for others. And either way it seems like a bit of an unnecessary hassle.

                Anyway, I hope this helps someone.

                mituM EfriimE M P 4 Replies Last reply Reply Quote 0
                • mituM
                  mitu Global Moderator @joelkolb
                  last edited by

                  @joelkolb said in Can't get controller working in Reicast:

                  I figured it out and the solution seems kind of nutty and definitely, IMHO, indicates there is a bug in reicast-joyconfig. To solve the problem you must have a controller with an analog stick.
                  ...

                  Emulationstation does run a script to generate a controller config once you've set up a controller, so you don't have to set it up again by starting +Start Reicast.sh. If there is a bug somewhere, then can you please attach the es_input.cfg and the - faulty - generated evdev_RetroFlag Wired Controller.cfg ?

                  J 1 Reply Last reply Reply Quote 0
                  • EfriimE
                    Efriim @joelkolb
                    last edited by Efriim

                    @joelkolb
                    I didn't know there was an option in the reicast menu to change from analog. I didn't know there was a reicast menu, other than the DC bios.

                    There are input settings in the \config\dreamcast\emu.cfg that can point to any mapper file but I've never had to change them, they are somewhat automatic.

                    Though that was confusing. Even if you edited out the analog sticks, it still needed something to point to the mapper file. We could have investigated the emu.cfg maybe reicast just needed a proper shutdown to set the configuration automatically.

                    The default mapper I always get for my DS3 is what would work if I were using the playstation3 sixad driver. The mapped numbers are key events in the 300+ range unlike the button definition in the es_input. I don't know where it gets this file from, or the difference between key events and js events.

                    J 1 Reply Last reply Reply Quote 0
                    • J
                      joelkolb @Efriim
                      last edited by joelkolb

                      @Efriim The ability to go into the Reicast menu seems to have been added with a more recent build. Previously +Start Reicast would just take you to the Dreamcast BIOS. Now it takes you to the Reicast menu where there is the option to boot to the BIOS and many other configuration options.

                      The mapped numbers for both my 8BitDo and RetroFlag controllers were also in the +300 range and far different from what's in es_input.cfg which are single and double digit numbers. However, when remapping my RetroFlag controller in the Reicast menu the numbers changed to the 200+ range.

                      @mitu Sure thing, I will upload the files soon. It might take a few hours though. It's very late where I am and this issue has been keeping me up but now that I've got it licked I really need some sleep. But I definitely want to help figure out if there's a bug in whatever way I can.

                      EfriimE 1 Reply Last reply Reply Quote 0
                      • EfriimE
                        Efriim @joelkolb
                        last edited by

                        @joelkolb
                        That is really cool, I had to update to check it out. I saw it earlier in another post but I thought it was Attract Mode front end or something.

                        1 Reply Last reply Reply Quote 0
                        • J
                          joelkolb @mitu
                          last edited by

                          @mitu OK, decided to stay up a little longer to get this done. I am getting a message from the forum when I try to attach the files saying that I don't have enough privileges so I'm embedding their contents below. I hope that's OK.

                          es_input.cfg

                          <?xml version="1.0"?>
                          <inputList>
                            <inputAction type="onfinish">
                              <command>/opt/retropie/supplementary/emulationstation/scripts/inputconfiguration.sh</command>
                            </inputAction>
                            <inputConfig type="joystick" deviceName="RetroFlag Wired Controller" deviceGUID="03000000830500006020000010010000">
                              <input name="pageup" type="button" id="4" value="1"/>
                              <input name="start" type="button" id="7" value="1"/>
                              <input name="down" type="axis" id="1" value="1"/>
                              <input name="pagedown" type="button" id="5" value="1"/>
                              <input name="right" type="axis" id="0" value="1"/>
                              <input name="select" type="button" id="6" value="1"/>
                              <input name="left" type="axis" id="0" value="-1"/>
                              <input name="up" type="axis" id="1" value="-1"/>
                              <input name="a" type="button" id="0" value="1"/>
                              <input name="b" type="button" id="1" value="1"/>
                              <input name="x" type="button" id="2" value="1"/>
                              <input name="y" type="button" id="3" value="1"/>
                            </inputConfig>
                            <inputConfig type="joystick" deviceName="Pro Controller" deviceGUID="050000007e0500000920000001000000">
                              <input name="rightanalogdown" type="axis" id="3" value="1"/>
                              <input name="rightanalogleft" type="axis" id="2" value="-1"/>
                              <input name="pageup" type="button" id="4" value="1"/>
                              <input name="start" type="button" id="9" value="1"/>
                              <input name="rightanalogup" type="axis" id="3" value="-1"/>
                              <input name="down" type="hat" id="0" value="4"/>
                              <input name="leftanalogright" type="axis" id="0" value="1"/>
                              <input name="pagedown" type="button" id="5" value="1"/>
                              <input name="right" type="hat" id="0" value="2"/>
                              <input name="select" type="button" id="8" value="1"/>
                              <input name="left" type="hat" id="0" value="8"/>
                              <input name="leftanalogup" type="axis" id="1" value="-1"/>
                              <input name="up" type="hat" id="0" value="1"/>
                              <input name="a" type="button" id="1" value="1"/>
                              <input name="b" type="button" id="0" value="1"/>
                              <input name="leftanalogdown" type="axis" id="1" value="1"/>
                              <input name="x" type="button" id="3" value="1"/>
                              <input name="leftanalogleft" type="axis" id="0" value="-1"/>
                              <input name="y" type="button" id="2" value="1"/>
                              <input name="rightanalogright" type="axis" id="2" value="1"/>
                            </inputConfig>
                          </inputList>
                          

                          Below are the faulty files generated by Emulation Station that did not work properly.
                          controller_ProController.cfg

                          [emulator]
                          mapping_name = Pro Controller
                          btn_escape = 296
                          
                          [dreamcast]
                          btn_a = 288
                          btn_b = 289
                          btn_c =
                          btn_d =
                          btn_x = 290
                          btn_y = 291
                          btn_z =
                          btn_start = 297
                          btn_dpad1_left =
                          btn_dpad1_right =
                          btn_dpad1_up =
                          btn_dpad1_down =
                          btn_dpad2_left =
                          btn_dpad2_right =
                          btn_dpad2_up =
                          btn_dpad2_down =
                          axis_x = 0
                          axis_y = 1
                          axis_trigger_left =
                          axis_trigger_right =
                          
                          [compat]
                          btn_trigger_left = 292
                          btn_trigger_right = 293
                          axis_dpad1_x = 2
                          axis_dpad1_y = 3
                          axis_dpad2_x =
                          axis_dpad2_y =
                          axis_x_inverted = no
                          axis_y_inverted = no
                          axis_trigger_left_inverted =
                          axis_trigger_right_inverted =
                          axis_dpad1_y_inverted = no
                          axis_dpad1_x_inverted = no
                          

                          controller_RetroFlagWiredController.cfg

                          [emulator]
                          mapping_name = RetroFlag Wired Controller
                          btn_escape = 294
                          
                          [dreamcast]
                          btn_a = 289
                          btn_b = 288
                          btn_c =
                          btn_d =
                          btn_x = 291
                          btn_y = 290
                          btn_z =
                          btn_start = 295
                          btn_dpad1_left =
                          btn_dpad1_right =
                          btn_dpad1_up =
                          btn_dpad1_down =
                          btn_dpad2_left =
                          btn_dpad2_right =
                          btn_dpad2_up =
                          btn_dpad2_down =
                          axis_x = 0
                          axis_y = 1
                          axis_trigger_left =
                          axis_trigger_right =
                          
                          [compat]
                          btn_trigger_left = 292
                          btn_trigger_right = 293
                          axis_dpad1_x =
                          axis_dpad1_y =
                          axis_dpad2_x =
                          axis_dpad2_y =
                          axis_x_inverted = no
                          axis_y_inverted = no
                          axis_trigger_left_inverted =
                          axis_trigger_right_inverted =
                          

                          Below are the good files generated in Reicast that did work properly
                          evdev_Pro Controller.cfg

                          [compat]
                          axis_dpad1_x = 16
                          axis_dpad1_x_inverted = no
                          axis_dpad1_y = 17
                          axis_dpad1_y_inverted = no
                          axis_dpad2_x = 18
                          axis_dpad2_x_inverted = no
                          axis_trigger_left_inverted = no
                          axis_trigger_right_inverted = no
                          axis_x_inverted = no
                          axis_y_inverted = no
                          btn_trigger_left = 308
                          btn_trigger_right = 309
                          
                          [dreamcast]
                          axis_trigger_left = 2
                          axis_trigger_right = 5
                          axis_x = 0
                          axis_y = 1
                          btn_a = 305
                          btn_b = 304
                          btn_d = 317
                          btn_dpad1_down = 547
                          btn_dpad1_left = 544
                          btn_dpad1_right = 545
                          btn_dpad1_up = 546
                          btn_start = 313
                          btn_x = 307
                          btn_y = 306
                          
                          [emulator]
                          btn_escape = 312
                          mapping_name = Pro Controller mapping
                          

                          evdev_RetroFlag Wired Controller.cfg

                          [compat]
                          axis_dpad1_x = 16
                          axis_dpad1_x_inverted = no
                          axis_dpad1_y = 17
                          axis_dpad1_y_inverted = no
                          axis_dpad2_x = 18
                          axis_dpad2_x_inverted = no
                          axis_trigger_left_inverted = no
                          axis_trigger_right_inverted = no
                          axis_x_inverted = no
                          axis_y_inverted = no
                          btn_trigger_left = 292
                          btn_trigger_right = 293
                          
                          [dreamcast]
                          axis_trigger_left = 2
                          axis_trigger_right = 5
                          axis_x = 0
                          axis_y = 1
                          btn_a = 288
                          btn_b = 289
                          btn_c = 306
                          btn_d = 317
                          btn_dpad1_down = 547
                          btn_dpad1_left = 544
                          btn_dpad1_right = 545
                          btn_dpad1_up = 546
                          btn_start = 295
                          btn_x = 290
                          btn_y = 291
                          btn_z = 309
                          
                          [emulator]
                          btn_escape = 294
                          mapping_name = RetroFlag Wired Controller mapping
                          

                          I hope that is helpful.

                          EfriimE 1 Reply Last reply Reply Quote 0
                          • EfriimE
                            Efriim @joelkolb
                            last edited by Efriim

                            @joelkolb The ones that don't work are really similar to mine that don't work, with only the x and y or a and b being swapped. I tried the gui, it is really good, and the new mapping works alright.

                            1 Reply Last reply Reply Quote 0
                            • J
                              joelkolb
                              last edited by

                              @mitu I never heard back from you. Is what I posted good? Is there anything more I should add?

                              mituM 2 Replies Last reply Reply Quote 0
                              • mituM
                                mitu Global Moderator @joelkolb
                                last edited by

                                @joelkolb Sorry, got sidetracked with other things, but I've saved the info you posted. I'll take a stab at trying to reproduce the issue.
                                One more thing more to ask - when you did the configuration, was your RetroPie version the latest ? I know there was a fix for the Reicast configuration generator some time ago - definitely after the 4.4 image was cast, an year ago.

                                J 1 Reply Last reply Reply Quote 0
                                • J
                                  joelkolb @mitu
                                  last edited by

                                  @mitu Yes, definitely the latest. Just before producing those files I clean flashed a new micro SD card with the 4.4 image and then did a full update to make sure my results were clean. So, it was definitely the absolute latest it could be at the time.

                                  1 Reply Last reply Reply Quote 0
                                  • mituM
                                    mitu Global Moderator @joelkolb
                                    last edited by

                                    @joelkolb I've looked over the scripts involved and can't figure out what's wrong. I have a similar - SNES style - controller and looked to be working fine with the mapping generated by the input scripts, but I don't use Reicast that often and it's mostly for testing.

                                    1 Reply Last reply Reply Quote 0
                                    • funkotron77F
                                      funkotron77
                                      last edited by

                                      I’m having the same problem and I tried using an Xbox controller with an analog stick and getting same thing. Only button that works on wired 360 controller is select which shuts the emulator down. Want to get reicast working because lr-flycast performance isn’t as good. Just updated retropie to 4.5

                                      EfriimE 1 Reply Last reply Reply Quote 0
                                      • EfriimE
                                        Efriim @funkotron77
                                        last edited by Efriim

                                        @funkotron77
                                        configure the controller using Retropie Setup, found in configuration > reicast (keyboard required).

                                        You may have to monkey around with the configs. SSH or Samba and programmer's notepad are most apt.

                                        samba:\\ipaddress\configs\dreamcast\mappings\

                                        I'm still uncertain about the namespace for these controller configs, I also recall there was an alternate(or altogether separate) folder where it loads these configurations from.
                                        (Which might be located in the root filesystem at:
                                        /home/$USER/.config/reicast/)

                                        There should be one for the XBOX controller, and the input numbers (544, 543, 312, etc.) need to match what was displayed when configuring the reicast-input.

                                        Using SSH the reicast-input can be called directly. (excuse if this isn't correctly recalled from memory, use ls "directory" if the file is called something else)
                                        /opt/retropie/emulators/reicast/bin/reicast-input

                                        I think you could also use
                                        evtest /dev/input/event# (the controller event # will be 0-6 depending on whatever it was assigned)
                                        or
                                        jstest /dev/input/js#

                                        sudo apt install evtest if evtest isn't installed.

                                        Using one of the test apps you will be able to read the events from the controller and discern the number that needs to be applied to the controller_~xbox.cfg using pn(programmers notepad).

                                        If simply editing the cfg and saving doesn't work, then the file may have to be renamed to evdev_~xbox.cfg or it may need to be copied to that alternative directory mentioned before, I'm fairly uncertain about this but at least it is thorough monkey business.

                                        If there was an easier way, it would be automatic configuration. And it is possible that all that needed to be done is to once again initialize "Configure Input" from the EmulationStation startmenu after reicast was installed for it to work.

                                        Could also try running the reicast-input with root.
                                        sudo /opt/retropie/emulators/reicast/bin/reicast-input
                                        or
                                        sudo /opt/retropie/emulators/reicast/bin/reicast-config I don't remember.

                                        funkotron77F 1 Reply Last reply Reply Quote 0
                                        • funkotron77F
                                          funkotron77 @Efriim
                                          last edited by

                                          @Efriim thanks for the detailed reply pal. I tried the evtest thing and what is being output seems to match the .cfg file for the joysticks I’m trying to use. I’m going to try resetting the input config from ES and see if that works.

                                          EfriimE 1 Reply Last reply Reply Quote 0
                                          • EfriimE
                                            Efriim @funkotron77
                                            last edited by Efriim

                                            @funkotron77
                                            I have a feeling it is this alternate directory I mentioned.
                                            You should be able to find it by:
                                            sudo find /home/pi -name evdev_*
                                            find /home/pi -name reicast
                                            sudo find /opt/ -name evdev_*
                                            sudo find /etc/ -name evdev_*
                                            sudo find / -name evdev_*
                                            in that order, it is most likely in /home/, but i'm not an expert with using find.

                                            If you find this directory, there should be mappings somewhere and by my postulation you should find an evdev_xbox.cfg with the correct mapping for exit and none others.

                                            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.