RetroPie forum home
    • Recent
    • Tags
    • Popular
    • Home
    • Docs
    • Register
    • Login

    New Hypseus and lr-Daphne to add on Retropie-Setup

    Scheduled Pinned Locked Moved Ideas and Development
    daphnelaserdischypseusdaphne confighypseus config
    501 Posts 33 Posters 227.1k 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.
    • DirtBagXonD
      DirtBagXon @mitu
      last edited by DirtBagXon

      @mitu said in New Hypseus and lr-Daphne to add on Retropie-Setup:

      @dirtbagxon said in New Hypseus and lr-Daphne to add on Retropie-Setup:

      Ok, so on vanilla v4.7.1 on a Pi3 running (full 32bit) I compiled SDL 2.0.20 as above [...]

      RetroPie doesn't use KMSDRM on a Pi3, only on the Pi4. If you used the 'installer' posted by @Darksavior previously, then this is your issue: the RPI video driver - which gives acceleration on the Pi3) - is not enabled with that.

      I didn't run the 'installer' - I compiled manually from SDL github source.

      With and without arguments in that installer script, so configure will have picked up most things.

      I gave the following arguments when I compiled with them: --enable-video-rpi --enable-video-kmsdrm --disable-video-x11 --disable-video-vulkan

      So what should I add for acceleration on the Pi3 ? I should note that up to 2.0.14 works fine from source.

      2.0.20 has been added (yesterday) in RetroPie - just update your setup and re-test, you don't need to compile SDL manually.

      If I do this, I can't test incremental changes in SDL. Up to 2.0.14 works fine. I assume that RetroPie does nothing special to SDL rather than compile time arguments ?

      Hypseus Singe for RetroPie: https://github.com/DirtBagXon/hypseus-singe
      Hypseus Singe Games: https://github.com/DirtBagXon/hypseus_singe_data
      Hypseus Discord: https://discord.gg/dgCsCfmRfJ

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

        @dirtbagxon said in New Hypseus and lr-Daphne to add on Retropie-Setup:

        I assume that RetroPie does nothing special to SDL rather than compile time arguments ?

        We have a few patches added so it's more than just the compile flags.

        EDIT: are you sure your setup is using the KMSDRM driver ? You would need to modify the config.txt boot configuration file to enable it, it won't work out-of-the-box on a Pi3 with the RetroPie image.

        DirtBagXonD 1 Reply Last reply Reply Quote 0
        • DirtBagXonD
          DirtBagXon @mitu
          last edited by DirtBagXon

          @mitu said in New Hypseus and lr-Daphne to add on Retropie-Setup:

          @dirtbagxon said in New Hypseus and lr-Daphne to add on Retropie-Setup:

          I assume that RetroPie does nothing special to SDL rather than compile time arguments ?

          We have a few patches added so it's more than just the compile flags.

          EDIT: are you sure your setup is using the KMSDRM driver ? You would need to modify the config.txt boot configuration file to enable it, it won't work out-of-the-box on a Pi3 with the RetroPie image.

          Ok, I think I have pretty much seen that it is not necessarily related to KMSDRM, but is related to SDL version and 32bit land.

          I'm not clear how to proceed on this in RetroPie.

          I want to be able to configure various SDL commits from github to trace the issue, so kinda need a means to be able to do this in a controlled manner. In the method I describe above, I can just switch SDL libraries to whatever version I need to test, and back. How can I do this with RetroPie specific changes and have your local patches, and compile flags, available in those libraries easily?

          I am certainly not qualified to tease through all the SDL commits to locate specific changes here.

          Whether I do this on a Pi3 or Pi4 distributions seems mute at this point as they both exhibit the issue in later versions of SDL after the previous 2.0.10 package.

          Edit: I have just tested SDL 2.0.20 libraries against both 32bit and 64bit Windows builds of Hypseues. And the issue isn't there. This is looking implementation specific....

           

          Hypseus Singe for RetroPie: https://github.com/DirtBagXon/hypseus-singe
          Hypseus Singe Games: https://github.com/DirtBagXon/hypseus_singe_data
          Hypseus Discord: https://discord.gg/dgCsCfmRfJ

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

            @dirtbagxon If the issue appears in vanilla SDL, as you tested from 2.0.16 on, then you wouldn't necessarily need the RetroPie patches.
            Regardless, the SDL tree used by RetroPIe is a clone of the main one from github.com/libsdl-org/SDL and you can find it at https://github.com/retropie/sdl. There are separate branches for each version, with the RetroPie patches applied, you can use the 2.0.20 branch and you'll get the tree used in the SDL packages we distribute with RetroPie-Setup.

            DirtBagXonD 1 Reply Last reply Reply Quote 0
            • DirtBagXonD
              DirtBagXon @mitu
              last edited by

              @mitu said in New Hypseus and lr-Daphne to add on Retropie-Setup:

              @dirtbagxon If the issue appears in vanilla SDL, as you tested from 2.0.16 on, then you wouldn't necessarily need the RetroPie patches.

              Sure, I just wanted to get specific, and in-line with your previous comments, on available features that are enabled outside of those auto-detected.

              Regardless, the SDL tree used by RetroPIe is a clone of the main one from github.com/libsdl-org/SDL and you can find it at https://github.com/retropie/sdl. There are separate branches for each version, with the RetroPie patches applied, you can use the 2.0.20 branch and you'll get the tree used in the SDL packages we distribute with RetroPie-Setup.

              Thanks for this, I will take a look.

              I am struggling to get any difference whatsoever by enabled/disabling SDL features in the Window/Renderer/Surface/Texture functions in SDL on this version. CPU utilisation just goes through the roof on 2.0.16.

              Are there any other SDL2 emulators in RetroPie that stream video at this resolution and bitrate in SDL you are aware of?

              I am asking around the Batocera and Recalbox devs to see if they are experiencing any issue after 2.0.16 - it is almost like hardware acceleration has just been halved in RetroPie.

              Weird....

              Hypseus Singe for RetroPie: https://github.com/DirtBagXon/hypseus-singe
              Hypseus Singe Games: https://github.com/DirtBagXon/hypseus_singe_data
              Hypseus Discord: https://discord.gg/dgCsCfmRfJ

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

                @dirtbagxon said in New Hypseus and lr-Daphne to add on Retropie-Setup:

                Are there any other SDL2 emulators in RetroPie that stream video at this resolution and bitrate in SDL you are aware of?

                PPSSPP maybe, but also EmulationStation itself when displaying video in the gamelist - video frames are rendered via VLC and rendered to a GL texture.

                DirtBagXonD 1 Reply Last reply Reply Quote 0
                • DirtBagXonD
                  DirtBagXon @mitu
                  last edited by

                  @mitu said in New Hypseus and lr-Daphne to add on Retropie-Setup:

                  @dirtbagxon said in New Hypseus and lr-Daphne to add on Retropie-Setup:

                  Are there any other SDL2 emulators in RetroPie that stream video at this resolution and bitrate in SDL you are aware of?

                  PPSSPP maybe, but also EmulationStation itself when displaying video in the gamelist - video frames are rendered via VLC and rendered to a GL texture.

                  But these will H.264 and using mmal or v4l/v4l2 I assume?

                  Hypseus Singe for RetroPie: https://github.com/DirtBagXon/hypseus-singe
                  Hypseus Singe Games: https://github.com/DirtBagXon/hypseus_singe_data
                  Hypseus Discord: https://discord.gg/dgCsCfmRfJ

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

                    @dirtbagxon For ES, it's MMAL through libvlc or omxplayer, for PPSSPP I don't know for sure.

                    EDIT: Maybe give it a try also with the current SDL dev branch, just in case of a regression that might have been fixed recently, after the 2.0.20 release.

                    DirtBagXonD 1 Reply Last reply Reply Quote 0
                    • DirtBagXonD
                      DirtBagXon @mitu
                      last edited by DirtBagXon

                      @mitu

                      Ok, so I have located the commit that causes the issue, it was from 2.0.15:

                      https://github.com/libsdl-org/SDL/commit/e87c7940f59db12670089a4ed79c91dfbca92b33

                      If I revert out this "fix" on SDL 2.0.21, i.e. HEAD of libsdl-org/SDL, it all stills works as expected.

                      Executing: /opt/retropie/emulators/hypseus/hypseus.sh "/home/pi/RetroPie/roms/daphne/dle21.daphne"
                      [version] Hypseus Singe: v2.8.1-RPi - SDL(LD): 2.0.21
                      [console] Setting alternate home dir: /opt/retropie/emulators/hypseus
                      [console] Forcing 4:3 aspect ratio.
                      2022-02-13 18:12:06.278 INFO  [27986] [reset_logfile@324] Version v2.8.1-RPi
                      2022-02-13 18:12:06.279 INFO  [27986] [reset_logfile@328] Command line: /opt/retropie/emulators/hypseus/hypseus.bin dle21 vldp -framefile /home/pi/RetroPie/roms/daphne/dle21.daphne/dle21.txt -homedir /opt/retropie/emulators/hypseus -fullscreen -volume_nonvldp 5 -min_seek_delay 600 -blank_searches -blank_skips -force_aspect_ratio 
                      

                      So this detection is obviously not optimal in the the 32bit RetroPie environment. Are you guys able to offer a correction ?

                      I am no dev of SDL, but I see you guys have some experience on the local patches of SDL.

                      Wondering how to proceed on this ?

                       

                      Hypseus Singe for RetroPie: https://github.com/DirtBagXon/hypseus-singe
                      Hypseus Singe Games: https://github.com/DirtBagXon/hypseus_singe_data
                      Hypseus Discord: https://discord.gg/dgCsCfmRfJ

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

                        @dirtbagxon said in New Hypseus and lr-Daphne to add on Retropie-Setup:

                        So this detection is obviously not optimal in the the 32bit RetroPie environment. Are you guys able to offer a correction ?

                        Not sure what correction could we add - the RetroPie environment is just a plain Raspbian Lite (Buster), using the default GL libraries/drivers provided by the OS. Is there any test - from one of the ones provided by SDL - that would help reproduce the bug ?

                        For now we rolled back the 2.0.20 upgrade (due also to https://retropie.org.uk/forum/topic/32209/), so this issue will not affect any more user for now.

                        DirtBagXonD 1 Reply Last reply Reply Quote 0
                        • DirtBagXonD
                          DirtBagXon @mitu
                          last edited by DirtBagXon

                          @mitu said in New Hypseus and lr-Daphne to add on Retropie-Setup:

                          @dirtbagxon said in New Hypseus and lr-Daphne to add on Retropie-Setup:

                          So this detection is obviously not optimal in the the 32bit RetroPie environment. Are you guys able to offer a correction ?

                          Not sure what correction could we add - the RetroPie environment is just a plain Raspbian Lite (Buster), using the default GL libraries/drivers provided by the OS.

                          Yeah, I was hoping you wouldn't say that :)

                          I'm not sure where to go from here. The aarch64 version works obviously with this "fix" and doesn't see the CPU utilisation or video stuttering. So maybe this is a 32bit SDL bug. I am nowhere near the pay-grade to talk to the SDL guys on this topic,

                          Is there any test - from one of the ones provided by SDL - that would help reproduce the bug ?

                          Nothing that looks relevant to me unfortunately...

                          For now we rolled back the 2.0.20 upgrade (due also to https://retropie.org.uk/forum/topic/32209/), so this issue will not affect any more user for now.

                          Ok, but I'm sure this will come up again. I guess we may just need to pull back the package at that time until RetroPie makes the jump to aarch64.

                          The "alternatives", one of which is full 64bit, aren't seeing the issue. The other is 32bit, but using a different drivers I believe, is stating they are not seeing the issue, but I am continuing to investigate on that side too.

                          Edit: From an old SDL dev - "SDL people won't do a fix for 32bit" - guess I'm screwed...... lol

                           

                          Hypseus Singe for RetroPie: https://github.com/DirtBagXon/hypseus-singe
                          Hypseus Singe Games: https://github.com/DirtBagXon/hypseus_singe_data
                          Hypseus Discord: https://discord.gg/dgCsCfmRfJ

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

                            @dirtbagxon said in New Hypseus and lr-Daphne to add on Retropie-Setup:

                            I'm not sure where to go from here. The aarch64 version works obviously with this "fix" and doesn't see the CPU utilisation or video stuttering.

                            The difference between 32/64 is that there are no legacy BRCM drivers for 64bit, regardless of platform (Pi3/Pi4). I don't think it's a 32bit vs 64bit thing, more likely a legacy GLES vs Mesa (mainline) GLES driver thing.

                            The other is 32bit, but using a different drivers I believe, is stating they are not seeing the issue, but I am continuing to investigate on that side too.

                            Yes, it's the legacy Broadcom drivers vs the Mesa driver (enabled with the kms overlay). The Mesa drivers are the default in Bullseye, so that may explain why some users may not see the issue, even on 32bit.

                            EDIT: since the bisected commit points to changes in SDL_CreateTexture, is there a specific code path in Hypseus where this gets used and causes the issue ? I haven't checked the code, so I don't know wether there's multiple uses of SDL_CreateTexture.

                            DirtBagXonD 1 Reply Last reply Reply Quote 0
                            • DirtBagXonD
                              DirtBagXon @mitu
                              last edited by DirtBagXon

                              Yes, it's the legacy Broadcom drivers vs the Mesa driver (enabled with the kms overlay). The Mesa drivers are the default in Bullseye, so that may explain why some users may not see the issue, even on 32bit.

                              Ok, that makes sense. See you do know more about SDL than I.

                              So RetroPie uses the Legacy drivers ?

                              Are there any public intentions on a move from this ?

                              EDIT: since the bisected commit points to changes in SDL_CreateTexture, is there a specific code path in Hypseus where this gets used and causes the issue ? I haven't checked the code, so I don't know wether there's multiple uses of SDL_CreateTexture.

                              I can explore that, but there are two pixel formats that are tied into the Daphne VLDP codebase and overlays, YUV and 8-bit.

                              SDL_PIXELFORMAT_YV12
                              SDL_PIXELFORMAT_RGBA8888

                              I have looked at these in the past and they appear fairly ingrained to the legacy codebase.

                              Fairly basic as far as pixel formats go...

                               

                              Hypseus Singe for RetroPie: https://github.com/DirtBagXon/hypseus-singe
                              Hypseus Singe Games: https://github.com/DirtBagXon/hypseus_singe_data
                              Hypseus Discord: https://discord.gg/dgCsCfmRfJ

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

                                @dirtbagxon said in New Hypseus and lr-Daphne to add on Retropie-Setup:

                                Ok, that makes sense. See you do know more about SDL than I.
                                So RetroPie uses the Legacy drivers ?

                                It uses the RaspiOS's Buster default - on Pi3 and earlier it's the 'legacy' drivers, on Pi4 is the MESA drivers. In RaspiOS Bullseye, the default is MESA drivers only.

                                Are there any public intentions on a move from this ?

                                We'll add support for RaspiOS Bullseye, but we'll see why the pixel format detection doesn't work with the legacy driver.

                                DirtBagXonD 1 Reply Last reply Reply Quote 0
                                • DirtBagXonD
                                  DirtBagXon @mitu
                                  last edited by

                                  @mitu said in New Hypseus and lr-Daphne to add on Retropie-Setup:

                                  We'll add support for RaspiOS Bullseye, but we'll see why the pixel format detection doesn't work with the legacy driver.

                                  Thanks for looking into this.

                                  There is definitely a huge CPU utilisation jump with that commit. I'm not certain what interest the SDL devs are gonna have in fixing legacy driver issues in mainline, if the overall performance is beneficial elsewhere...

                                  Hypseus Singe for RetroPie: https://github.com/DirtBagXon/hypseus-singe
                                  Hypseus Singe Games: https://github.com/DirtBagXon/hypseus_singe_data
                                  Hypseus Discord: https://discord.gg/dgCsCfmRfJ

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

                                    @dirtbagxon said in New Hypseus and lr-Daphne to add on Retropie-Setup:

                                    Thanks for looking into this.

                                    I've run some tests and added my info in an issue. We can discuss it there, without hijacking the main topic.

                                    DirtBagXonD 1 Reply Last reply Reply Quote 0
                                    • DirtBagXonD
                                      DirtBagXon @mitu
                                      last edited by DirtBagXon

                                      @mitu said in New Hypseus and lr-Daphne to add on Retropie-Setup:

                                      I've run some tests and added my info in an issue. We can discuss it there, without hijacking the main topic.

                                      Ok, gottit.

                                      Ok, now seen the correct #issue, not the one in libsdl-org.

                                      So is this issue relating to Aleph One Marathon and eduke32 also ?

                                       

                                      Hypseus Singe for RetroPie: https://github.com/DirtBagXon/hypseus-singe
                                      Hypseus Singe Games: https://github.com/DirtBagXon/hypseus_singe_data
                                      Hypseus Discord: https://discord.gg/dgCsCfmRfJ

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

                                        @dirtbagxon said in New Hypseus and lr-Daphne to add on Retropie-Setup:

                                        So is this issue relating to Aleph One Marathon and eduke32 also ?

                                        No, that's a different problem related to the GL renderer chosen by default (https://github.com/libsdl-org/SDL/issues/5348).

                                        DirtBagXonD 1 Reply Last reply Reply Quote 0
                                        • DirtBagXonD
                                          DirtBagXon @mitu
                                          last edited by DirtBagXon

                                          @mitu said in New Hypseus and lr-Daphne to add on Retropie-Setup:

                                          @dirtbagxon said in New Hypseus and lr-Daphne to add on Retropie-Setup:

                                          So is this issue relating to Aleph One Marathon and eduke32 also ?

                                          No, that's a different problem related to the GL renderer chosen by default

                                          Thanks @mitu for all the help in tracking down the SDL2 regression. I will try and commit the "work-a-round" shortly to the main branches.

                                          As this regression has pretty much reduced the chances of getting ActionMax working effectively with SDL2 on the Pi, I have been working on a little side project.

                                          An "unofficial" RetroPie scriptmodule that uses the SDL1 version of Singe packaged up specifically for ActionMax. SDL1 had better native YUV support so there is less overhead in handling this pixel format. This emulator also supports ABS mouse input , and integrated Sinden borders, for all the lightgun enthusiasts out there.

                                          I have been running this on RPi3 RetroPie with no issues. Although this is SDL1 and has all the inherent issues of this version.

                                          Users with 4:3 monitors may find -ignore_aspect_ratio will provide help in using the full screen real estate.

                                          The intention was to use this Daphne system actionmax emulator as a ROM specific choice in ES. It also uses the standard <game>.commands files for individual customization and has an independent config file, using SDL1 keycodes, as does the original Daphne.

                                           
                                          https://github.com/DirtBagXon/actionmax-pi

                                           

                                          ActionMax

                                          I know a few users who have asked for this, so enjoy.
                                           

                                          Hypseus Singe for RetroPie: https://github.com/DirtBagXon/hypseus-singe
                                          Hypseus Singe Games: https://github.com/DirtBagXon/hypseus_singe_data
                                          Hypseus Discord: https://discord.gg/dgCsCfmRfJ

                                          G 1 Reply Last reply Reply Quote 0
                                          • G
                                            G30FF @DirtBagXon
                                            last edited by G30FF

                                            @dirtbagxon I tried installing the actionmax emulator, and I can boot games just fine. However I'm having a little trouble with the controls. The default singeinput.cfg does not work with my controller, but when I copied the config from my hypinput.cfg file in, the trigger buttons, quit button, and confirm buttons worked, but the direction buttons do not work so I am unable to move the cursor. This is my singeinput.ini (copied from hypinput.ini):

                                            [KEYBOARD]
                                            KEY_UP = SDLK_UP 0 0 -002
                                            KEY_DOWN = SDLK_DOWN 0 0 +002
                                            KEY_LEFT = SDLK_LEFT 0 0 -001
                                            KEY_RIGHT = SDLK_RIGHT 0 0 +001
                                            KEY_COIN1 = SDLK_5 0 9  #SELECT
                                            KEY_COIN2 = SDLK_6 0 0
                                            KEY_START1 = SDLK_1 0 10  #START
                                            KEY_START2 = SDLK_2 0 0
                                            KEY_BUTTON1 = SDLK_LCTRL 0 1  #B
                                            KEY_BUTTON2 = SDLK_LALT 0 3  #Y
                                            KEY_BUTTON3 = SDLK_SPACE 0 2  #A
                                            KEY_SKILL1 = SDLK_LSHIFT 0 4  #X
                                            KEY_SKILL2 = SDLK_z 0 5  #L
                                            KEY_SKILL3 = SDLK_x 0 6  #R
                                            KEY_SERVICE = SDLK_9 0 12  #L3
                                            KEY_TEST = SDLK_F2 0 0
                                            KEY_RESET = SDLK_0 0 13  #R3
                                            KEY_SCREENSHOT = SDLK_F12 0 0
                                            KEY_QUIT = SDLK_ESCAPE 0 0
                                            KEY_PAUSE = SDLK_p 0 0
                                            KEY_CONSOLE = SDLK_BACKSLASH 0 0
                                            KEY_TILT = SDLK_t 0 0
                                            END
                                            

                                            Unless I'm misunderstanding and this emulator is meant for mouse support only, in which case I apologize in advance.

                                            DirtBagXonD 2 Replies 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.