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

    Daphne . Arcade joystick orientation wrong.

    Scheduled Pinned Locked Moved Help and Support
    daphnedaphne controll
    164 Posts 28 Posters 45.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.
    • G
      grant2258 Banned
      last edited by grant2258

      @shakz said in Daphne . Arcade joystick orientation wrong.:

      Thanks for your work on this. Mapping

      i posted some info on the github page hope that helps im really having with github though i think im getting there. We can talk on github about this i clarify anything you need to know and will make sure the code doesnt mess with the numbering .system. that was just something i wanted to change for myself ans doesnt have to be done

      G 1 Reply Last reply Reply Quote 1
      • G
        grant2258 Banned @grant2258
        last edited by

        This post is deleted!
        1 Reply Last reply Reply Quote 1
        • G
          grant2258 Banned
          last edited by grant2258

          its all done and fixed all you have to do is accept the pull request. It fixes the analog joystick axis and the extra buttons not getting mapped. i know i see the button 10 buttons thing its intentional i was testing for when you tried to set more buttons that we setup in the code .

          pico /home/pi/RetroPie-Setup/scriptmodules/emulators/daphne.sh

          change
          https://github.com/RetroPie/daphne-emu.git
          to
          https://github.com/grant2258/daphne-emu.git

          just replace RetroPie with grant2258

          then run retropie setup -> manage packages->optional->daphane->update from source if yout having troubles this will get you going

          less /dev/shm/runcommand.log
          Parameters:
          Executing: /opt/retropie/emulators/daphne/daphne.sh "/home/pi/RetroPie/roms/daphne/lair2.daphne"
          ls: cannot access /proc/kcore: No such file or directory
          --DAPHNE version 1.0.13
          --Command line is: /opt/retropie/emulators/daphne/daphne.bin lair2 vldp -nohwaccel -framefile /home/pi/RetroPie/roms/daphne/lair2.daphne/lair2.txt -homedir /opt/retropi
          e/emulators/daphne -fullscreen -nocrc -noissues -nolog -noserversend -latency 950 -x 640 -y 480 -blank_searches -min_seek_delay 1000 -seek_frames_per_ms 20
          --CPU : UnknownCPU 0 MHz || Mem : 0 megs
          --OS : Linux 4.9 || Video : Unknown video
          --OpenGL: Compiled In
          --RGB2YUV Function: C
          --Line Blending Function: C
          --Audio Mixing Function: C
          Setting alternate home dir:
          /opt/retropie/emulators/daphne
          Disabling ROM CRC check...
          Setting Search Latency to 950 milliseconds
          Setting screen width to 640
          Setting screen height to 480
          Set 640x480 at 32 bpp with flags: 20
          Initializing sound system ...
          Joystick #0 was successfully opened
          Remapping input ...
          sorry we only support 10 joystick buttons we could not map button 10 please check your dapinput.ini
          button:0 mapped to KEY_BUTTON3
          button:1 mapped to KEY_COIN1
          button:2 mapped to not set
          button:3 mapped to not set
          button:4 mapped to KEY_BUTTON1
          button:5 mapped to KEY_BUTTON2
          button:6 mapped to not set
          button:7 mapped to not set
          button:8 mapped to KEY_QUIT
          button:9 mapped to KEY_START1
          Loading compressed ROM image dl2_319.bin...65536 bytes read.
          Framefile parse succeeded. Video/Audio directory is: /home/pi/RetroPie/roms/daphne/lair2.daphne/./
          YUV overlay is done in software (ie unaccelerated).
          NOTE : RAM file /opt/retropie/emulators/daphne/ram/lair2_319.gz was not found (it'll be created)
          Play
          Booting ROM ...
          End of audio stream detected!
          WARNING : Unimplemented Sony LDP command received: 0xC
          Search to 722 received

          I 1 Reply Last reply Reply Quote 1
          • I
            itnv @grant2258
            last edited by

            @grant2258 Sorry to resurrect an old thread but I just finished building my machine and I'm having this same problem. I originally set up Daphne with a gamepad and it worked fine. But when I installed my Ultrastick 360 the joystick mapping is wrong. I updated daphne.sh to point to your github and ran the "Update from Source" but the mapping still isn't working. Any suggestions?

            1 Reply Last reply Reply Quote 0
            • G
              grant2258 Banned
              last edited by grant2258

              your joysticks probably oriented wrong plug it in windows and test on there in the control panel

              1 Reply Last reply Reply Quote 0
              • C
                Chillimonster
                last edited by

                When i change anything in daphne.sh, it dissapears from optional packages - What am doing wrong?

                Retropie Stretch 4.4

                1 Reply Last reply Reply Quote 0
                • P
                  pootis spencer
                  last edited by

                  Sorry to bring up an old thread again but I'm having issues regarding the DragonRise joysticks that most people are using in my Arcade 1UP.
                  Here is a rundown of what's happened and where I am at:
                  I had an issue with the mapping of the controls where up was down and vice versa. Left was right and right didn't do anything at all.
                  I came across the fix by @grant2258 and applied that. This worked for the up and down and also left and right except for the left and right are reversed.
                  I have plugged the controller into windows and sure enough the joystick is backwards on both player 1 and 2.
                  I know that the mapping of the controls in emulation station have no effect on the controls in Daphne.
                  My question is that how do I 'rotate' the joystick and turn it around so that it fixes the left and right? Surely rotating it will cause up and down to be reversed?
                  Do I remove the restrictor plate and rotate the PCB 180 degrees?
                  Thanks for any help. I really want to put this problem to bed as its bugging the shit out of me.

                  ClydeC 1 Reply Last reply Reply Quote 0
                  • ClydeC
                    Clyde @pootis spencer
                    last edited by Clyde

                    @pootis-spencer You do have one of these usb encoders, right?

                    https://www.amazon.co.uk/Quimat-Arcade-Encoder-Joystick-Fighting/dp/B06XCTJ1JP

                    They ususally register as "DragonRise" controllers in Retropie.

                    If so, is your joystick connected to the encoder by four wires? Then they should be plugged into the four slots named AU, AD, AR, and AL. The second letters stand for up, down, right, and left. Make sure the corresponding microswitches of your joystick are connected to the right slots, and re-configure the joystick in Emulation station (irrelevant for Daphne, but not for the rest of Retropie).

                    1 Reply Last reply Reply Quote 0
                    • P
                      pootis spencer
                      last edited by

                      This is the one I purchased.
                      https://www.amazon.co.uk/gp/product/B075J882S8/ref=ppx_yo_dt_b_asin_title_o00_s00?ie=UTF8&psc=1
                      The joystick is a 5 wire single connector.

                      1 Reply Last reply Reply Quote 0
                      • S
                        shift
                        last edited by

                        I review this post because I believe it is still the only solution to use the daphne with a Dragonrise Encoder on an 8-key Arcade Stick. The problem that I have not yet solved and that I hope someone has already done is that only the first 10 keys are mapped, that is from 1 to 10. If the keys seen by jstest go beyond the 10th, they are not even considered by the daphne for the setting of the dapintput.ini file. How to solve the problem? Thank you!

                        1 Reply Last reply Reply Quote 0
                        • G
                          grant2258 Banned
                          last edited by grant2258

                          The dragon rise controller is in analog mode by default not digital. Im not sure what your saying here are you using a digital only controller encoder or a dragon rise?

                          1 Reply Last reply Reply Quote 0
                          • S
                            shift
                            last edited by

                            @grant2258 said in Daphne . Arcade joystick orientation wrong.:

                            The dragon rise controller is in analog mode by default not digital. Im not sure what your saying here are you using a digital only controller encoder or a dragon rise?

                            First of all, thanks for the reply. I am using an Arcade Stick mapped to a Dragonrise encoder. I think the "problem" is here: src/io/ input.cpp because I understand that only the first 10 keys are mapped, that is from [1] to [10]. Unfortunately many controllers, even if they have less than 10 keys, the first 10 are not necessarily mapped, in fact, in my case, even if I only have 8 keys, if I use jstest the buttons are: 0, 1, 6, 7, 8, 9, 10, 11 which are then translated by the daphne into: 1, 2, 7, 8, 9, 10, 11, 12. Here, buttons 11 and 12 are not considered absolutations from the dapinput.ini file. If you could modify the package to ensure that the system can see at least 12 keys it would be possible to map the controllers that use the dragonrise encoder.

                            1 Reply Last reply Reply Quote 0
                            • G
                              grant2258 Banned
                              last edited by

                              Well the standalone package has mapping issues I did fix that and it works for the dragon rise on my repo. Like I said before the dragon rise defaults to analog mode and daphne directions work fine. The 10 buttons is plent to map the rest of the keys

                              1 Reply Last reply Reply Quote 0
                              • S
                                shift
                                last edited by

                                The analog stick (which was the main problem) with your package works very well. But, as I said, the buttons are correctly mapped up to the number 10, with this I mean that even if I have 8 buttons to map, but 2 of them are seen by jstest as button11 and button12, in the dapinput.ini file, the latter two buttons are not even considered and therefore cannot be mapped.

                                1 Reply Last reply Reply Quote 0
                                • G
                                  grant2258 Banned
                                  last edited by grant2258

                                  Thats not how its works do you have 18 entries in your dinput file ? you pick the button you want to use in the dinput if you do need more than ten let me know.

                                  edit added up to 18 buttons on the repo for you. I dont see why anyone would set them all on there controller but its done. Just add any extra button defines to your dainput.(youll need to recompile though)

                                  ...
                                  "KEY_UP", "KEY_LEFT", "KEY_DOWN", "KEY_RIGHT", "KEY_START1", "KEY_START2", "KEY_BUTTON1",
                                  "KEY_BUTTON2", "KEY_BUTTON3", "KEY_COIN1", "KEY_COIN2", "KEY_SKILL1", "KEY_SKILL2",
                                  "KEY_SKILL3", "KEY_SERVICE", "KEY_TEST", "KEY_RESET", "KEY_SCREENSHOT", "KEY_QUIT", "KEY_PAUSE",
                                  "KEY_CONSOLE", "KEY_TILT"
                                  ...

                                  is all the button names that can be set currently any 10 can be changed it changed to 18 for you now. I did at one point change the joystick buttons to match the joystick number but had to put it back the way it was for the retropie script that creates the input file

                                  S 1 Reply Last reply Reply Quote 1
                                  • _robert1243_
                                    _robert1243
                                    last edited by

                                    I had that with the exact same controller.
                                    I'd try switching the connectors around to the expected orientation. That worked for me.

                                    1 Reply Last reply Reply Quote 0
                                    • S
                                      superdan
                                      last edited by

                                      Hi all!
                                      My situation with original Daphne RetropPie setup
                                      Joy directions wrong ( i die even if the movement is correct)
                                      Button 1 Correct

                                      So.
                                      @grant2258 i followed these steps:

                                      1 unistalled Daphne at all
                                      2 sudo nano pico /home/pi/RetroPie-Setup/scriptmodules/emulators/daphne.sh
                                      3 replaced RetroPie with grant2258 ( gitPullOrClone "$md_build" https://github.com/grant2258/daphne-emu.git retropie )
                                      4 Re-Installed Daphnefrom source
                                      

                                      My dapinput.ini is

                                      # Daphne cutom keyboard and joystick mapping
                                      #
                                      # Each input is mapped to 2 keyboard keys and one joystick button.
                                      # A joystick's first analog stick is also automatically mapped.
                                      #
                                      # The first two numbers are SDL keyboard codes (or 0 for "none")
                                      # Find keyboard codes here:
                                      # http://www.daphne-emu.com/mediawiki/index.php/KeyList
                                      #
                                      # The third number is the joystick button code (or 0 for "none")
                                      # Since 0 is reserved for special meaning, joystick button 0 is identified
                                      # as 1 here.  Button 1 is identified as 2, and so on.
                                      # 
                                      # Find the button you want to map by running:
                                      # jstest /dev/input/js0
                                      
                                      [KEYBOARD]
                                      KEY_UP = 273 114 24
                                      KEY_DOWN = 274 102 24
                                      KEY_LEFT = 276 100 24
                                      KEY_RIGHT = 275 103 24
                                      KEY_BUTTON1 = 306 97 24
                                      KEY_BUTTON2 = 308 115 24
                                      KEY_BUTTON3 = 32 113 joy start
                                      KEY_START1 = 49 0 10 42
                                      KEY_START2 = 50 0 42
                                      KEY_COIN1 = 53 0 joy coin
                                      KEY_COIN2 = 54 0 joy quit
                                      KEY_SKILL1 = 304 119 joy pause
                                      KEY_SKILL2 = 122 105 joy button1
                                      KEY_SKILL3 = 120 107 joy button2
                                      KEY_SERVICE = 57 0 joy button3
                                      KEY_TEST = 283 0 joy console
                                      KEY_RESET = 284 0 24
                                      KEY_SCREENSHOT = 293 0 24
                                      KEY_QUIT = 27 113 24
                                      END
                                      

                                      Now Joystick movements work like a charm BUT
                                      i lost my BUTTON 1 on my joystick
                                      so no action button at all
                                      My controller is seen as a general usb joystick.

                                      Any help?
                                      Thanks all

                                      1 Reply Last reply Reply Quote 0
                                      • G
                                        grant2258 Banned
                                        last edited by

                                        # The third number is the joystick button code (or 0 for "none")
                                        # Since 0 is reserved for special meaning, joystick button 0 is identified
                                        # as 1 here.  Button 1 is identified as 2, and so on.
                                        
                                        KEY_BUTTON1 = 306 97 1
                                        KEY_BUTTON2 = 308 115 2
                                        KEY_BUTTON3 = 32 113 3
                                        

                                        you will need to use jstest (add one to the value) for what button numbers you want to use for the function

                                        1 Reply Last reply Reply Quote 0
                                        • S
                                          superdan
                                          last edited by

                                          @superdan said in Daphne . Arcade joystick orientation wrong.:

                                          grant2258
                                          GOT IT!
                                          Thanks @grant2258 !!!!

                                          1 Reply Last reply Reply Quote 1
                                          • Z
                                            zack06007
                                            last edited by

                                            Hello, I tried to understand the subject but I also have a left / right inversion. I was on retropie and I just changed to dragon's lair but with Batocera I have the same thing! I am new to trying to understand but what must be done to reverse orders. On my terminal (sticker: Dragon's lair) this is the only game I really want and I have been looking for weeks. I'm ready to cut the wires to reverse the order, that's to say Who can help me I will be grateful. thank you

                                            https://zupimages.net/up/20/22/i7mz.png

                                            For information my arcade machine: https://www.buzz-arcade.com/544-large_default/kit-stickers-borne.jpg

                                            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.