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

    lr-flycast: Issue with source (likely from upstream change)

    Scheduled Pinned Locked Moved Help and Support
    lr-flycastdreamcastatomiswavenaomiflycast
    10 Posts 3 Posters 610 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.
    • roslofR
      roslof
      last edited by roslof

      Raspberry Pi 4B/4GB; Retropie 4.5.18
      unsupported Pi4B but probably unrelated

      Just a heads-up that using lr-flycast from current source will result in a segfault for Dreamcast, Naomi & Atomiswave games.

      Possibly related to a recent VRAM change made upstream

      From tail of /dev/shm/runcommand.log:

      [libretro INFO] 00:03:922 rend/gles/gles.cpp:414 N[RENDERER]: OpenGL version: (null)
      [libretro ERROR] 00:03:922 libretro/common.cpp:376 E[COMMON]: SIGSEGV @ b4e54ab0 ... (nil) -> was not in vram (dyna code 0)
      [libretro INFO] Fatal error : segfault
       in signal_handler -> core/libretro/common.cpp : 383
      
      [libretro ERROR] 00:03:922 libretro/libretro.cpp:3230 E[COMMON]: DEBUGBREAK!
      [libretro ERROR] 00:03:922 libretro/common.cpp:376 E[COMMON]: SIGSEGV @ acef3e40 ... 0xacef3e40 -> was not in vram (dyna code 0)
      [libretro INFO] Fatal error : segfault
       in signal_handler -> core/libretro/common.cpp : 383
      

      Current work-around is to install from pre-built binary. Will look into this a bit more when I have a chance, building from earlier commits.

      1 Reply Last reply Reply Quote 0
      • roslofR
        roslof
        last edited by roslof

        Spotted a thread regarding the issue:

        flycast no longer works using the gles renderer? #851
        https://github.com/libretro/flycast/issues/851

        1 Reply Last reply Reply Quote 0
        • BuZzB
          BuZz administrators
          last edited by

          Looking into it. Thanks.

          To help us help you - please make sure you read the sticky topics before posting - https://retropie.org.uk/forum/topic/3/read-this-first

          1 Reply Last reply Reply Quote 0
          • roslofR
            roslof
            last edited by roslof

            Np.

            Confirmed that the offending commit is 4cf6c1f [Switch] Initial Port
            The prior commit to master dd4f35d Protect ram and vram when vmem is disabled works fine.

            BuZzB 1 Reply Last reply Reply Quote 0
            • BuZzB
              BuZz administrators @roslof
              last edited by

              @roslof I bisected to the same commit. But then I got the latest code running. Suspect it may have been due to make clean not removing all objects but I'm checking my changes again.

              To help us help you - please make sure you read the sticky topics before posting - https://retropie.org.uk/forum/topic/3/read-this-first

              1 Reply Last reply Reply Quote 0
              • BuZzB
                BuZz administrators
                last edited by

                Please can you build the latest code but set HAVE_LTCG=0 in the makefile or via the RetroPie module script.

                I think link time optimisation fails after that commit so it should be enough to just disable it. I'm just verifying.

                To help us help you - please make sure you read the sticky topics before posting - https://retropie.org.uk/forum/topic/3/read-this-first

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

                  @BuZz Seems to work after that option is added

                   function build_lr-flycast() {
                  -    local params=()
                  +    local params=(HAVE_LTCG=0)
                       make clean
                       if isPlatform "rpi"; then
                           if isPlatform "rpi4"; then
                  
                  1 Reply Last reply Reply Quote 1
                  • BuZzB
                    BuZz administrators
                    last edited by BuZz

                    I'll commit the change. Maybe someone else can update the referenced ticket upstream (short on time). The ticket is another issue I think but might be worth clarifying the cause for the RPI issue.

                    To help us help you - please make sure you read the sticky topics before posting - https://retropie.org.uk/forum/topic/3/read-this-first

                    1 Reply Last reply Reply Quote 0
                    • BuZzB
                      BuZz administrators
                      last edited by BuZz

                      It's could also be due to missing parameters at link time which are needed if using lto. I'm doing a test now, but the Makefile is a bit of a mess really and I don't think it's well tested with lto for most platforms, so it's better to leave it disabled.

                      Eg. I previously added an LDFLAGS+=$(CFLAGS) as it was generating armv6 code with lto enabled as it just used LDFLAGS and missed out all the cpu flags.

                      To help us help you - please make sure you read the sticky topics before posting - https://retropie.org.uk/forum/topic/3/read-this-first

                      1 Reply Last reply Reply Quote 0
                      • roslofR
                        roslof
                        last edited by

                        Updated the script. Works as you'd expect. Thanks BuZz & mitu!

                        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.