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 43.6k 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

      i just debugged it try this befor doing anything

      it works for me this is for the dragon rise other joysticks will differ im just pasting the up down left right keys. The rest you know how to do

      for analog setup.
      KEY_UP = 273 114 1
      KEY_DOWN = 274 102 1
      KEY_LEFT = 276 100 0
      KEY_RIGHT = 275 103 0

      for digital setup
      KEY_UP = 273 114 1
      KEY_DOWN = 274 102 4
      KEY_LEFT = 276 100 2
      KEY_RIGHT = 275 103 8

      ps only tested on dlair2

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

        @grant2258 that didn't work unfortunately . No matter what I put the left is down . The keyboard arrows change with the config change but the analogue and digital do not. It's like the joysticks have been put together wrong . If the joysticks have a default ud LR and Daphne takes those directions from the first instance . But mine are wrong and the down is facing left etc. This would explain why it's not working . I did read u can't map the joystick in Daphne.

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

          Can't you physically install the joystick rotated at 90 degrees counter-clockwise?

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

            @pjft that is the plan . If I recall it has screws holding the mount to the joystick. I plan on unscrewing it and as you say rotate it. Ill need to remove all the buttons and do the same thing to the other joystick incase they conflict when I re mapping the retro arch keys.

            1 Reply Last reply Reply Quote 1
            • B
              beamquaker
              last edited by

              I rotated the joystick successfully and now it's working fine in Daphne. Thanks for all the help .

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

                Well the first think you need to do is setup your joystick right. Its easy enough to do remove the restrictor rotate the pcb insert pcb put restrictor back on. If you have windows you can test it with that or you can compile sdl-jstest on the pi to test. If you need any help with either let me know.

                Ive been looking at the joystick code on the emulator itself and i have found the problem with the analogue stick. The joystick code is a bit messy its just been patched in and not very well its been hard coded for a . There is a certain truth you cant configure the joystick but it will use the dstick. The analog stick doesnt look to hard to fix ill look at it over the weekend. I will send you a worrking config from looking at the source that ill work for example the quit key wont work

                B mediamogulM 2 Replies Last reply Reply Quote 0
                • B
                  beamquaker @grant2258
                  last edited by

                  @grant2258 it's all done and working fine now thanks . I am able to play dragon's lair 2 properly. Thanks for all the help.

                  1 Reply Last reply Reply Quote 0
                  • mediamogulM
                    mediamogul Global Moderator @grant2258
                    last edited by mediamogul

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

                    The joystick code is a bit messy its just been patched in and not very well its been hard coded for a .

                    Your lips to God's ears. I love Daphne a lot, but even the lead developer has admitted to it having poor joystick support. He's been meaning to revisit it for a while, but it's just never happened. Keyboard support is a lot more flexible and by extension, key-mapping a controller can solve a lot of problems that come up. For example, my particular setup always has my controller being at js1, while Daphne is hard-coded to only ever look at js0. Key-mapping my controller ended up being the only real solution.

                    RetroPie v4.5 • RPi3 Model B • 5.1V 2.5A PSU • 16GB SanDisk microSD • 512GB External Drive

                    1 Reply Last reply Reply Quote 2
                    • B
                      beamquaker
                      last edited by

                      I'm going to find another game and see how much my joystick really works as dragon's lair 2 is to hard to have a real test . So far left and down works and the sword but I can't be sure if right and up work as I suck at it.

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

                        well that would be a problem if its wanting diaginals the source will need updated.Here is the updated config remeber its button number -1 all the names are buttons you can use. I set all the others to 24 leave that as is for now there is a reason. I done this looking at the source so it should all be good.

                        [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

                        KEY_BUTTON3 = start

                        B 1 Reply Last reply Reply Quote 1
                        • B
                          beamquaker @grant2258
                          last edited by

                          @grant2258 I'm going to try this config as I tried Mach 3 and left and right only partially worked . As in u could tap to the left or right but would not scroll. My joysticks are supposed to be dragon rise .

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

                            yea the coin start1 has 4 entries instead of 3 might be that ive cleaned a few bits up but there is a bug in the code it should be picking that kind of error up. ill fix that too unless its something else causing it. I only have space ace what game is causing the problem?

                            Here is the fixed config if you still have problems post you config ill check it

                            [KEYBOARD]
                            KEY_UP = 273 0 24
                            KEY_DOWN = 274 0 24
                            KEY_LEFT = 276 0 24
                            KEY_RIGHT = 275 0 24
                            KEY_BUTTON1 = 306 0 24
                            KEY_BUTTON2 = 308 0 24
                            KEY_BUTTON3 = 32 0 joy_start
                            KEY_START1 = 49 0 24
                            KEY_START2 = 50 0 24
                            KEY_COIN1 = 53 0 joy_coin
                            KEY_COIN2 = 54 0 joy_quit
                            KEY_SKILL1 = 304 0 joy_pause
                            KEY_SKILL2 = 122 0 joy_button1
                            KEY_SKILL3 = 120 0 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 0 24
                            END

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

                              @grant2258 Mach 3. No matter what I change on the joystick directions config it dosent change at all . Dragons lair 2 works alot better using the default Daphne config settings after rotating my joysticks.

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

                                @beamquaker

                                Ok let me try expain whats going on here the code reads the joystick hats (digital mode) or analog for up down left right always not matter what .

                                Changing up down left and right wont change that or add the buttons right because it maps wrong into the code and cause all sorts of problems when you press a button that matches when it comes to directions.

                                Now the joystick code is in need of some work so dont touch any of the other settings accept the ones with joy_ because will map where they say the rest will do random things. so just change the joy_buttons to what you want the rest arent mapped right thats why they have a button number 24 next to them

                                ive started some of the updates to the code I should get it done the weekend

                                ShakzS B 2 Replies Last reply Reply Quote 1
                                • ShakzS
                                  Shakz @grant2258
                                  last edited by Shakz

                                  @grant2258
                                  <threadjack>
                                  Just curious...are you the fella that wrote daphne.sh (the one that sets up joystick) ?
                                  If so I would be willing to take a look at it with you....I absolutely LOVE daphne. Never had the money to play it when I was a kid...those machines were expensive but oh man have I loved playing it on my retropie. Anywho was thinking about setting up some sort of read dialog in the script similar to the recast script but in shell not python. Or seeing if there was a way to logically map the controller based on what is already in the ES controller config file.
                                  </threadjack>

                                  RetroPie tips, tricks, and tweaks: https://www.youtube.com/eazyhax

                                  1 Reply Last reply Reply Quote 1
                                  • B
                                    beamquaker @grant2258
                                    last edited by

                                    @grant2258 I would like to thank you for your patience and all the help you have gave me. Thanks for the explanation as well . It's a good emulator it just needs someone to sort it out.

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

                                      if ok here is fix for the mapping not working properly its a updated binary

                                      https://drive.google.com/file/d/1EkBeWcUCnbJ1PHEEo4uyoCpP6cnqqGqs/view

                                      upload it to your pi
                                      ssh in
                                      type these commands in

                                      unzip daphne.zip
                                      cd daphne
                                      sudo sh install.sh

                                      this fix maps the buttons to the joystick properly from config file properly so you can set any buttons for any function with no voodoo happening.

                                      Just note if you map the button up down left right they will work as buttons but that wont stop the hat working youll just be adding a extra up and down. No i didnt write the sh script mr shakz the first time i used this emulator is when beamquaker started this thread and i like dragons lair when i was a kid.

                                      I will look at the joystick code for the analogue its just getting the time. If you install this update itll work as it should with mapping. If you dont update just stick to them joystick buttons i gave you in the ini

                                      B 1 Reply Last reply Reply Quote 1
                                      • B
                                        beamquaker @grant2258
                                        last edited by

                                        @grant2258 thanks. I have faith in you .

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

                                          that was just a simple change to get you going the way you want and the way it should work

                                          https://github.com/grant2258/daphne-emu/commit/23796d9f764fc1b996906dc1a6723bd891da04d3

                                          i need to learn git hub just use the binary i posted for now if you need more buttons than the ini joy_ provides

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

                                            Well i got a chance to look at the code I need to make a few changes before i get to the joystick. I dont know if ill get the analog joystick done this weekend but the key mapping code should be done soon so you can set the emulator up right. Ill post you instructions of how to update it when im done with the changes.

                                            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.