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

    Problems with Dreamcast and ps3 wired controller.

    Scheduled Pinned Locked Moved Help and Support
    12 Posts 3 Posters 6.4k 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.
    • F
      Fluffyhead69
      last edited by

      I have been using retropie for a little while now find on some ps1 and snes games with no issues.

      I just got some dreamcast roms and installed the bios files and it seems to boot up fine but i cant get past the time / date screen

      I know its been covered a million times but i cant seem to figure this one out on my own or with searching.
      I am using a cheap £10 ps3 copy controller and cant seem to get the buttom mapping sorted as i think thats all that is needed. Does anybody have any ideas on how i can do this in laymans terms (i am still a noob to all this)

      Many thanks

      B 1 Reply Last reply Reply Quote 0
      • B
        backstander @Fluffyhead69
        last edited by backstander

        Hello @Fluffyhead69,

        This is kind of a tough one to really tell you how to troubleshoot especially if you don't have prior Linux knowledge but here goes...

        First off I use a wireless Xbox 360 controller. I was able to find out what controller configuration file was being used but yours will be different (I think) because you have a PS3 wired controller so it will probably be a different file name but in the same directory. This file is located in this directory:

        /opt/retropie/configs/dreamcast/mappings/

        You'll need to get to the command prompt either by pressing F4 on your USB keyboard attached to your Pi or by using PuTTY (or whatever) on another desktop/laptop computer connected to your network (as long as the Pi is connected to the same network). I'm not going to go over this but you can find this information elsewhere.

        This is what I typed at the command prompt to edit my config file (yours might be a different filename):

        sudo nano /opt/retropie/configs/dreamcast/mappings/controller_XboxGamepad\(userspacedriver\).cfg

        This is the contents I have for this file:

        [emulator]
        mapping_name = Xbox Gamepad (userspace driver)
        btn_escape = 316
        
        [dreamcast]
        btn_a = 304
        btn_b = 305
        btn_c =
        btn_d =
        btn_x = 307
        btn_y = 308
        btn_z =
        btn_start = 315
        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 = 10
        axis_trigger_right = 9
        
        [compat]
        btn_trigger_left = 312
        btn_trigger_right = 313
        axis_dpad1_x = 16
        axis_dpad1_y = 17
        axis_dpad2_x = 3
        axis_dpad2_y = 4
        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
        

        Now you see where it says "btn_a = 304"? Well that just said I want my Xbox 360 controller's button A (304) to be the same as the Dreamcast's button A. The hard part is finding out what number represents what buttons on your controller.

        I found this on Reddit:
        https://www.reddit.com/r/RetroPie/comments/3ye3f0/cant_manage_to_configure_dreamcast_controls/

        It's the reicast_joyconfig script which I used to find out what buttons do what.
        Here's what I did!

        cd ~/.reicast

        wget https://raw.githubusercontent.com/reicast/reicast-emulator/3ed2985d510733062e295f8d343cc717f158b4c7/shell/linux/tools/reicast-joyconfig.py

        chmod +x reicast-joyconfig.py

        python reicast-joyconfig.py

        After you've gone through each button and figured out what number represents which button, then you edit the controller configuration file I mentioned above.

        When you think you have all the numbers in place, you can test the controller’s buttons with a overlay like this:

        cd ~/.reicast/data

        wget http://i.imgur.com/EPzsm8D.png

        mv EPzsm8D.png buttons.png

        Now when you run the Dreamcast emulator Reicast with any game, you will see the button layout on screen to help with settings up the correct buttons. When you press a button, it shows what button that is bound to on the screen.

        Then to remove the button overlay:

        sudo rm /opt/retropie/configs/dreamcast/data/buttons.png

        And just in case the button overlay is here as well:

        sudo rm ~/.reicast/data/buttons.png

        1 Reply Last reply Reply Quote 0
        • F
          Fluffyhead69
          last edited by

          Thanks for the reply.

          I did go into the config file via the pi itself rather than via a pc and edited the controller config to the following:
          [PLAYSTATION(R)3 Controller]
          button.0=Btn_Z
          button.1=Btn_C
          button.2=Btn_D
          button.3=Btn_Start
          button.4=DPad_Up
          button.5=DPad_Right
          button.6=DPad_Down
          button.7=DPad_Left
          button.8=Axis_LT
          button.9=Axis_RT
          button.10=DPad2_Left
          button.11=DPad2_Right
          button.12=Btn_Y
          button.13=Btn_B
          button.14=Btn_A
          button.15=Btn_X
          button.16=Quit
          axis.0=Axis_X
          axis.1=Axis_Y

          which i found online but im thinking maybe because its not an official controller it may not work the same? Could i potentially get an xbox 360 controller and copy a set up already in place like your own?

          1 Reply Last reply Reply Quote 0
          • F
            Fluffyhead69
            last edited by

            I tried everything i can and im really getting nowhere, my emu.cfg file looks like this:

            [ACRUXUSBGAMEPAD]
            axis.0 = Axis_X
            axis.1 = Axis_Y
            button.0 = Btn_Z
            button.1 = Btn_C
            button.10 = DPad2_Left
            button.11 = DPad2_Right
            button.12 = Btn_Y
            button.13 = Btn_B
            button.14 = Btn_A
            button.15 = Btn_X
            button.16 = Quit
            button.2 = Btn_D
            button.3 = Btn_Start
            button.4 = DPad_Up
            button.5 = DPad_Right
            button.6 = DPad_Down
            button.7 = DPad_Left
            button.8 = Axis_LT
            button.9 = Axis_RT

            [audio]
            disable = 0

            [config]
            Debug.SerialConsoleEnabled = 0
            Dreamcast.Broadcast = 4
            Dreamcast.Cable = 3
            Dreamcast.RTC = 2101838355
            Dreamcast.Region = 3
            Dynarec.Enabled = 1
            Dynarec.idleskip = 1
            Dynarec.unstable-opt = 0
            aica.LimitFPS = 1
            aica.NoBatch = 0
            aica.NoSound = 0
            bios.UseReios = 0
            pvr.MaxThreads = 3
            pvr.Subdivide = 0
            pvr.SynchronousRendering = 0
            pvr.rend = 0
            rend.UseMipmaps = 1
            rend.WideScreen = 0
            ta.skip = 0

            [dispmanx]
            height = 480
            maintain_aspect = yes
            width = 640

            [omx]
            audio_hdmi = yes
            audio_latency = 100

            [reios]
            ElfFile =

            [validate]

            i have no idea what most of it means, the controller info i put in from the wiki page i found on controller setup and changed the ps3 official name to the one the controller registers on pi, im hoping i can get this sorted as i have wasted far too many hours on this now,

            @backstander the link you posted gets this response:
            pi@retropie:~/.reicast $ wget https://raw.githubusercontent.com/reicast/reicast-emulator/3ed2985d510733062e295f8d343cc717f158b4c7/shell/linux/tools/reicast-joyconfig.py
            --2016-08-08 20:04:29-- https://raw.githubusercontent.com/reicast/reicast-emulator/3ed2985d510733062e295f8d343cc717f158b4c7/shell/linux/tools/reicast-joyconfig.py
            Resolving raw.githubusercontent.com (raw.githubusercontent.com)... 62.252.172.241
            Connecting to raw.githubusercontent.com (raw.githubusercontent.com)|62.252.172.241|:443... connected.
            GnuTLS: A TLS fatal alert has been received.
            GnuTLS: received alert [0]: Close notify
            Unable to establish SSL connection.

            1 Reply Last reply Reply Quote 0
            • F
              Fluffyhead69
              last edited by

              [dreamcast]
              btn_a = 306
              btn_b = 305
              btn_x = 307
              btn_y = 304
              btn_start = 313
              axis_x = 0
              axis_y = 1

              [compat]
              axis_dpad1_x = 16
              axis_dpad1_x_inverted = no
              axis_dpad1_y = 17
              axis_dpad1_y_inverted = no
              axis_x_inverted = no
              axis_y_inverted = no

              Managed to get this from doing button mapping, where it used to use the analogue stick now doesnt work at all.

              this is a ball ache

              1 Reply Last reply Reply Quote 0
              • B
                backstander
                last edited by backstander

                The RetroPie-Setup Wiki for the Dreamcast says to make a file named "emu.cfg"

                sudo nano /opt/retropie/configs/dreamcast/emu.cfg

                Here is the contents of this file:

                [input]
                evdev_device_id_1 = 6
                evdev_device_id_2 = -1
                evdev_device_id_3 = -1
                evdev_device_id_4 = -1
                evdev_mapping_1 = /opt/retropie/configs/dreamcast/mappings/controller_XboxGamepad(userspacedriver).cfg
                joystick_device_id = -1
                

                Hmmm...you might also try removing these 2 lines and see if it works again:

                axis_dpad1_x = 16
                axis_dpad1_y = 17
                

                or if it was working before, you might need to re-add these lines that you had in your original file:

                button.4 = DPad_Up
                button.5 = DPad_Right
                button.6 = DPad_Down
                button.7 = DPad_Left
                
                1 Reply Last reply Reply Quote 0
                • R
                  RickyEarl
                  last edited by

                  I had similar issues with the PS3 controller that had to do with reicast's "automatic" config defaulting to the keyboard. I did the steps in the post below, which are basically backstander's post above with an additional step of telling reicast to look to the controller as the primary controller. Might help:

                  https://retropie.org.uk/forum/topic/3029/reicast-keyboard-disables-ps3-controller/2

                  B 1 Reply Last reply Reply Quote 1
                  • F
                    Fluffyhead69
                    last edited by

                    Will give this a go tonight, thanks guys.

                    1 Reply Last reply Reply Quote 0
                    • B
                      backstander @RickyEarl
                      last edited by

                      Thanks @RickyEarl !

                      I knew there was a little bit more to this because I was never able to get a 2nd controller working in reicast but now I have both working at the same time!

                      Someone should update the Dreamcast RetroPie-Setup Wiki with this information ;)

                      1 Reply Last reply Reply Quote 0
                      • R
                        RickyEarl
                        last edited by

                        Now I'm impressed. What did you do to get 2 controllers working? I can get the controller and the keyboard, but that's as far as I go. Did you have to manually add mappings for both and then tell reicast both controller IDs in emu.cfg?

                        1 Reply Last reply Reply Quote 0
                        • B
                          backstander
                          last edited by

                          False alarm. I thought I had got 2 controllers working at the same time but I didn't.

                          I did find this post that shows how to clone reicast's source code and add 1 line then manually compile it:
                          https://retropie.org.uk/forum/topic/144/dreamcast-reicast-and-2-xbox360-controllers

                          I just tried it but got an error when trying to Make it.

                          B 1 Reply Last reply Reply Quote 0
                          • B
                            backstander @backstander
                            last edited by backstander

                            @RickyEarl

                            Okay I guess I did get 2 controllers working at the same time!

                            I'm not exactly sure how I did it but here's what I think did it.

                            The red text are what I typed in the command prompt at the $ sign prompt.
                            The black blocks are the code inside the files that I edited with these changes.
                            If any of these nano commands won't let you save your changes, make sure to add sudo in front of them.

                            nano /opt/retropie/configs/all/autoconf.cfg

                            reicast_input = 0
                            

                            nano /opt/retropie/configs/dreamcast/mappings/controller_XboxGamepad\(userspacedriver\).cfg

                            [emulator]
                            mapping_name = Xbox Gamepad (userspace driver)
                            btn_escape = 316
                            
                            [dreamcast]
                            btn_a = 304
                            btn_b = 305
                            btn_c =
                            btn_d =
                            btn_x = 307
                            btn_y = 308
                            btn_z =
                            btn_start = 315
                            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 = 10
                            axis_trigger_right = 9
                            
                            [compat]
                            btn_trigger_left = 312
                            btn_trigger_right = 313
                            axis_dpad1_x = 16
                            axis_dpad1_y = 17
                            axis_dpad2_x = 3
                            axis_dpad2_y = 4
                            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
                            

                            nano /home/pi/.reicast/emu.cfg

                            [input]
                            evdev_device_id_1 = 8
                            evdev_device_id_2 = 9
                            evdev_device_id_3 = -1
                            evdev_device_id_4 = -1
                            evdev_mapping_1 = /opt/retropie/configs/dreamcast/mappings/controller_XboxGamepad(userspacedriver).cfg
                            evdev_mapping_2 = /opt/retropie/configs/dreamcast/mappings/controller_XboxGamepad(userspacedriver).cfg
                            joystick_device_id = -1
                            
                            [players]
                            nb = 2
                            

                            Now I have 2 wireless Xbox 360 controllers working at the same time. I should note that I also have a USB keyboard and mouse plugged into my Pi so your evdev_device_id_1 & 2 numbers might be different than mine. Without those it might be 6 & 7 instead. To find out you just run evtest at the command prompt this should show you what numbers are actually 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.