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 / Dragonrise encoder issues



  • So i have been playing with various 'fixes' to try and get the dragonrise encoders working with daphne, and have read all of the threads i could find on this forum and other places.

    The up and down work no problem, but left and right do not seem to work.

    I'm running the latest build of Retropie on a Pi 3

    I've updated all packages - no change
    I've updated to the latest kernel with rpi-update - no change.

    Works fine on keyboard, but not via joysticks on the Dragonrise encoders.

    I do know about the 'mode' button, but really want is to work without any additional button presses.

    Is it possible?


  • Global Moderator

    @Chillimonster

    There's been some recent discussion of it here. Currently, I believe key-mapping your joystick is the only option.



  • @mediamogul

    Thanks for the link - will have a read of the (long) thread and try and get my head around it.



  • I have found a solution for this annoying Dragon Rise problem by solving another problem.

    Basically, I wanted to play Outrun and the game doesn't see the digital stick for steering. I wired a button up to 'mode' on the encoder, set my controller back up in Emulationstation, pressed'mode' to set the joystick as left analogue (this worked with a previous Venom arcade stick) and thought that would be it.

    Anyway, I tried outrun and it didn't work. Went back to the controller config and where it said "h0leftanalogueleft" , I changed it to "h0left", basically just removing reference to "leftanalogue" from the config. It works fine now when I press my 'mode' button.

    I've just tried this on Daphne as I previously had the leftt/right problem and it works great!! Two birds with one stone.

    I know this is old but I hope it helps all you Dragon Rise people. Just get the 'mode' function wired up and enjoy Daphne!



  • @mekon Which controller config file did you modify?



  • I have fixed this the pull request just hasn't been accepted.

    ill save you huntng for the thread

    grant2258 3 months ago

    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.

    I have no idea why this pull request hasnt been pulled as the analog joystick is fixed and the bad button mapping

    youll notice when your using a ps3 or xbox controller you buttons set right and the analog and digital stick works now its not just a dragon rise fix it just happens the controller is set to analogue by default. The input system was in a right mess



  • @grant2258 Thanks buddy. I think I figured out that rotating the stick "fixes" it...but it breaks my other stuff. I made a thread...https://retropie.org.uk/forum/topic/17844/help-with-xboxdrv-mapping-dragonrise-controller

    I'm hoping someone can shed some light on this.



  • @betadog808 said in Daphne / Dragonrise encoder issues:

    ing

    rotate the stick till its right the re set your inputs in emulation station everything will work. for the button and analogue fixes in daphne youll need to compile from my repo

    this is a vey long thread all youur questions will be answered there it is long though

    https://retropie.org.uk/forum/topic/16464/daphne-arcade-joystick-orientation-wrong/4



  • @grant2258 Thanks very much for the fix, but after updating Daphne from your repository, Daphne won't start anymore. Runcommand.log says:

    Parameters: 
    Executing: /opt/retropie/emulators/daphne/daphne.sh "/home/pi/RetroPie/roms/daphne/lair.daphne"
    ls: cannot access '/proc/kcore': No such file or directory
    /opt/retropie/emulators/daphne/daphne.sh: line 10:   822 Segmentation fault      "/opt/retropie/emulators/daphne/daphne.bin" "$name" vldp -nohwaccel -framefile "$dir/$name.txt" -homedir "/opt/retropie/emulators/daphne" -fullscreen $params
    

    Also, every time after Daphne segfaults, Retropie's tty console is gone. I only get a black screen when I exit Emulation Station or when I select an entry from the Retropie menu (Audio, Bluetooth, Retropie Setup etc.). The only way to fix this that I found is rebooting the Pi via ssh.

    I'm running Retropie 4.4.



  • S
    I'll check it maybe retropie setup has changed have my used it in months



  • ill need to download the daphne roms again arrrg cant find them where is my dragons lair!



  • @Clyde am downloading the roms at the moment what controller are upi using just out of intreset?



  • @grant2258 I'm using DragonRise zero delay encoders. edit: Thank you for your effort!



  • @clyde

    have you tried compiling normal daphne from source as well? never min i tried compiling somethign must have changed ill look into this will get back to you when i found whats caused the issue!



  • @grant2258 Although you seem to know it by now, I can verify that Retropie's Daphne source compiles correctly. Just mentioned to compare our results.



  • @clyde said in Daphne / Dragonrise encoder issues:

    urce

    it does in certain conditions something is going wrong with the ./configure it not generating makefiles properly compiling when you clone the git its either untraceked files or something else it wont even compile properly if you make no changes when cloning it to another git repo something is wrong there. i works fine in retropie 3.3 :)



  • @clyde said in Daphne / Dragonrise encoder issues:

    @grant2258 Although you seem to know it by now, I can verify that Retropie's Daphne source compiles correctly. Just mentioned to compare our results.

    well its fixed i was curios if you compiled from source because it breaks the roms symlink. Im sure you know how to fix this if you have compiled from source so i wont bore you with details on that.

    ok a few changes are needed in the compile function . There was problems with the compile part of the build script nothing major. The segfault was fix too was a missing , when i changed it back to retropie joystick numbering format. I originally had it on original joystick numbers.

    anyway do this
    RetroPie-Setup/
    pico scriptmodules/emulators/daphne.sh

    these functions need changed as such

    function sources_daphne() {
    gitPullOrClone "$md_build" https://github.com/grant2258/daphne-emu.git retropie
    }

    function build_daphne() {
    cd src
    ln -sf Makefile.vars.rp Makefile.vars
    make clean
    cd ..
    cd src/vldp2
    ./configure
    make -f Makefile.rp
    cd ..
    make STATIC_VLDP=1
    }

    press ctrl + x to save

    then just update from setup as normal

    ls -al /opt/retropie/emulators/daphne/roms

    it should display this
    lrwxrwxrwx 1 pi pi 34 May 21 03:03 /opt/retropie/emulators/daphne/roms -> /home/pi/RetroPie/roms/daphne/roms

    like i said the script makes a roms dir instead of the symlink so just point the symlink in the right direction if you have problems. Ive compiled on a retropie 4.4 works

    ps this will let the you control with digital and analogue on any controller before it was just the digital that worked. The buttons are where really messed up for controllers thats fixed up now too



  • @grant2258 said in Daphne / Dragonrise encoder issues:

    compile function this is while there was problems with the compile. The segfault was done too was a missing , when i changed it back to retropie joystick numbering format. I originally

    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/retropie/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.14 || 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 ...
    button:0 mapped to KEY_SCREENSHOT
    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.

    dapinput.ini without the # stuff

    [KEYBOARD]
    KEY_UP = 273 114 2
    KEY_DOWN = 274 102 2
    KEY_LEFT = 276 100 1
    KEY_RIGHT = 275 103 1
    KEY_BUTTON1 = 306 97 5
    KEY_BUTTON2 = 308 115 6
    KEY_BUTTON3 = 32 113 1
    KEY_START1 = 49 0 10
    KEY_START2 = 50 0 1
    KEY_COIN1 = 53 0 2
    KEY_COIN2 = 54 0 1
    KEY_SKILL1 = 304 119 1
    KEY_SKILL2 = 122 105 1
    KEY_SKILL3 = 120 107 1
    KEY_SERVICE = 57 0 1
    KEY_TEST = 283 0 1
    KEY_RESET = 284 0 1
    KEY_SCREENSHOT = 293 0 1
    KEY_QUIT = 27 113 9
    END



  • @grant2258 said in Daphne / Dragonrise encoder issues:

    well its fixed i was curios if you compiled from source because it breaks the roms symlink. Im sure you know how to fix this if you have compiled from source so i wont bore you with details on that.

    Yeah, I selected "update from source" in the setup menu like a pro. ;) Seriously, I can fix a symlink in Linux if I know which one.

    ok a few changes are needed in the compile function . There was problems with the compile part of the build script nothing majot. The segfault was fix too was a missing , when i changed it back to retropie joystick numbering format. I originally had it on original joystick numbers.

    So the segfault was independant from the compilation/symlink problem? I'm asking because your Daphne compiled on my system without the symlink fix, but then crashed with a segfault. So, if it wouldn't have crashed, there would still have been the symlink problem?

    anyway do this
    RetroPie-Setup/
    pico scriptmodules/emulators/daphne.sh

    I think you meant pico RetroPie-Setup/scriptmodules/emulators/daphne.sh ?

    By the way, pico is symlinked to nano on Retropie. So, you may want to use nano in the first place here in the forum to avoid confusion for less experienced users. Just a thought. :)

    these functions need changed as such

    Are they only necessary for your repo or is this a bug that also affects the original version?

    then just update from setup as normal

    It worked! Your Daphne runs now, with all joystick directions enabled. Again, thank you very much. It was important for me to fix it this week, because I have a party next weekend. Now, my guests can play Dragon's Lair 1+2 or Space Ace if they want. :)

    like i said the script makes a roms dir instead of the symlink so just point the symlink in the right direction if you have problems. Ive compiled on a retropie 4.4 works

    How and where exactly did you fix that? Not in the daphne.sh as far as I can see.

    ps this will let the you control with digital and analogue any controller before it was just the digital that worked. The buttons are where really messed up for controllers thats fixed up now too

    My previous button setup seems to work like before. Do I have to mind anything in your version that's different to the original?

    Sorry for all the questions. As always, I take a problem and its solution as an opportunity to learn. :)



  • @clyde said in Daphne / Dragonrise encoder issues:

    @grant2258 said in Daphne / Dragonrise encoder issues:

    well its fixed i was curios if you compiled from source because it breaks the roms symlink. Im sure you know how to fix this if you have compiled from source so i wont bore you with details on that.

    Yeah, I selected "update from source" in the setup menu like a pro. ;) Seriously, I can fix a symlink in Linux if I know which one.

    ok a few changes are needed in the compile function . There was problems with the compile part of the build script nothing majot. The segfault was fix too was a missing , when i changed it back to retropie joystick numbering format. I originally had it on original joystick numbers.

    So the segfault was independant from the compilation/symlink problem? I'm asking because your Daphne compiled on my system without the symlink fix, but then crashed with a segfault. So, if it wouldn't have crashed, there would still have been the symlink problem?

    anyway do this
    RetroPie-Setup/
    pico scriptmodules/emulators/daphne.sh

    I think you meant pico RetroPie-Setup/scriptmodules/emulators/daphne.sh ?

    By the way, pico is symlinked to nano on Retropie. So, you may want to use nano in the first place here in the forum to avoid confusion for less experienced users. Just a thought. :)

    these functions need changed as such

    Are they only necessary for your repo or is this a bug that also affects the original version?

    then just update from setup as normal

    It worked! Your Daphne runs now, with all joystick directions enabled. Again, thank you very much. It was important for me to fix it this week, because I have a party next weekend. Now, my guests can play Dragon's Lair 1+2 or Space Ace if they want. :)

    like i said the script makes a roms dir instead of the symlink so just point the symlink in the right direction if you have problems. Ive compiled on a retropie 4.4 works

    How and where exactly did you fix that? Not in the daphne.sh as far as I can see.

    ps this will let the you control with digital and analogue any controller before it was just the digital that worked. The buttons are where really messed up for controllers thats fixed up now too

    My previous button setup seems to work like before. Do I have to mind anything in your version that's different to the original?

    Sorry for all the questions. As always, I take a problem and its solution as an opportunity to learn. :)

    everything is the same no setup changes needed the changes are here. The problem is the original code was hard coded to joystick was hard coded to the gpx2. I changed all default buttons the to -1 (not set for buttons unless we set them) because there is no way to unset buttons in this m emulator.

    That is why people tried to do magic numbers to get it work to set a button to something else sometimes you would get lucky and get a working config. but it would be pressing more than one button sometimes so it could really be Russian roulette if it worked. the analogue was missing one line of code.

    The changes are here didnt take much to fix it https://github.com/RetroPie/daphne-emu/pull/15/files

    this is a pull req of my changes.

    my code needed a fix for the segfault it was something minor a missing comma was in -1 structure and a if needed extra parentheses round a if statement to compile with optimization on.

    The make clean needed added and symlink moved to the start. just a little shuffle in the order to fix the compile issues that was something separate and you wouldnt notice the errors when the setup screen goes away i didnt compile with the setup menu when testing.

    The original code will compile this way too so its all good ive posted and issue on retropie-setup to get this Daphne compile script fixed.

    the pico command is correct your already in the Retropie-Setup directory but not harm if you want to add the full path



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.