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 230.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 @roslof
      last edited by DirtBagXon

      @roslof 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:

      Check/Edit your .singe files.

      Will give it a go now, thanks again!

      When you say give it a go, I assume you meant altering the .singe files ?

      I made no changes.

      Doesn't make sense from my side.

      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

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

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

        @DirtBagXon just noticed that for any Singe game, the longer a video plays after a LaserDisc seek, the further the audio gets out of sync. This wasn't as obvious at first with Time Gal, but it does occur. Was MUCH more obvious with either of the Mad Dog McCree games. Doesn't take long before the video drifts away from the audio.

        Are you seeing/hearing similar? FWIW: I played around a bit with the -sound_buffer command-line, but it didn't have an impact on this issue.

        FWIW: Audio/Video is fine with any of the Daphne/Hypseus games.

        Cheers!
        -Ros

        This may be a weird LUA os_clock timing issue, I have seen it before on the previous Singe.

        In the file src/game/singe.cpp - locate the line that reads:

        g_ldp->think_delay(15);
        

        Try altering this value up or down, it will need a recompile (make) and reinstall (cp) after each change I'm afraid.
        But the recompile will be very fast as only one file has changed.

        The value is in micro seconds.

        '15' works well on x86_64.

        Let me know what value works best on the Pi.

        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

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

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

          When you say give it a go, I assume you meant altering the .singe files ?
          I made no changes.
          Doesn't make sense from my side.

          Yes, exactly -- just played around with the three (3) settings (SOLID, SHADED & BLENDED). It's interesting how things line up better with SHADED & BLENDED, but the odd outline appears. Still, better then SOLID, which looks like it was made with a 70's typewriter. :) Also played around with font size. No matter how large the font, the alignment is still wrong with SOLID.

          Again, I completely understand this was inherited and I hope you don't think that I'm asking you to fix anything. This is really amazing (and kind of fun) having these games run on Pi's.

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

            @roslof 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:

            Again, I completely understand this was inherited and I hope you don't think that I'm asking you to fix anything. This is really amazing (and kind of fun) having these games run on Pi's.

            It's fun diving into the source code too :)

            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 1
            • roslofR
              roslof @DirtBagXon
              last edited by

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

              Try altering this value up or down, it will need a recompile (make) and reinstall after each change I'm afraid.
              The value is in micro seconds.
              '15' works well on x86_64.
              Let me know what value works best on the Pi.

              Happy to help. Will play around (edit, build, test, weep softly, repeat). Catch you in about... 13 weeks. :)

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

                @roslof 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:

                Try altering this value up or down, it will need a recompile (make) and reinstall after each change I'm afraid.
                The value is in micro seconds.
                '15' works well on x86_64.
                Let me know what value works best on the Pi.

                Happy to help. Will play around (edit, build, test, weep softly, repeat). Catch you in about... 13 weeks. :)

                g_ldp->think_delay(30); seems to work fine... Will need to play around a lot and make sure, but so far, all games sync perfectly.

                EDIT: Played quite a lot, and with multiple games. No unusual issues with this setting. All long videos sync fine.

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

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

                  @roslof 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:

                  Try altering this value up or down, it will need a recompile (make) and reinstall after each change I'm afraid.
                  The value is in micro seconds.
                  '15' works well on x86_64.
                  Let me know what value works best on the Pi.

                  Happy to help. Will play around (edit, build, test, weep softly, repeat). Catch you in about... 13 weeks. :)

                  g_ldp->think_delay(30); seems to work fine... Will need to play around a lot and make sure, but so far, all games sync perfectly.

                  EDIT: Played quite a lot, and with multiple games. No unusual issues with this setting. All long videos sync fine.

                  @roslof you are a star.

                  Exactly double, interesting - wonder if this is a 32/64bit size_t  related.

                  I will do a check at compile time which will set this according to what architecture it is compiled on - many thanks for testing that :)

                   

                  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

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

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

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

                    @roslof 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:

                    Try altering this value up or down, it will need a recompile (make) and reinstall after each change I'm afraid.
                    The value is in micro seconds.
                    '15' works well on x86_64.
                    Let me know what value works best on the Pi.

                    Happy to help. Will play around (edit, build, test, weep softly, repeat). Catch you in about... 13 weeks. :)

                    g_ldp->think_delay(30); seems to work fine... Will need to play around a lot and make sure, but so far, all games sync perfectly.

                    EDIT: Played quite a lot, and with multiple games. No unusual issues with this setting. All long videos sync fine.

                    @roslof you are a star.

                    Exactly double, interesting - wonder if this is a 32/64bit related.

                    I will do a check at compile time which will set this according to what architecture it is compiled on - many thanks for testing that :)

                     

                    I actually made it a run-time check, but hopeful fix pushed to RetroPie branch.

                     
                    Could you test and confirm latest merge fixes it without modifications ?

                     
                    To revert your local file changes, do this as update order:

                    git checkout src/game/singe.cpp
                    
                    git pull origin RetroPie
                    

                    You are using the 64bit kernel and 32bit userland, so let's see if the check on sizeof(size_t)  in the fix, works in this environment....

                     

                    Edit: Just to give me an ideas of what the clock() environment is in this 64/32 mixup, could you also grab this utility:

                    wget https://raw.githubusercontent.com/DirtBagXon/singe/master/src/debug_utils/clock_debug.c -O clock_debug.c
                    

                    Compile it cc -o clock_debug clock_debug.c -Wno-format on the Pi and run it:

                    ./clock_debug

                    Then let me see the results.

                     

                    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

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

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

                      Could you test and confirm latest merge fixes it without modifications ?

                      Done. Works perfectly.

                      Compile it cc -o clock_debug clock_debug.c -Wno-format on the Pi and run it:
                      ./clock_debug
                      Then let me see the results.

                      No trouble (good instructions).

                      Ran it using the 32bit and 64bit kernel. Funny, but for 64-bit, even though the kernel reads as aarch64, "System" shows up as 32-bit with the tool... Must be based on userland and not kernel.

                      32bit:

                      Linux retropie 5.10.17-v7l+ #1403 SMP Mon Feb 22 11:33:35 GMT 2021 armv7l GNU/Linux

                      System: 32bit
                      
                      sizeof(clock_t)=4, CLOCKS_PER_SEC=1000000
                      sizeof(size_t)=4, sizeof(int)=4
                      
                      clock()
                      C Native:     1987
                      C Multiplier: 3974       (x2)
                      C Multiplier: 7948       (x4)
                      C Multiplier: 11922      (x6)
                      C Multiplier: 15896      (x8)
                      C Multiplier: 19870      (x10)
                      
                      One sec sleep: 2025 - 1987 = 38
                      

                      64bit:

                      Linux retropie 5.10.17-v8+ #1403 SMP PREEMPT Mon Feb 22 11:37:54 GMT 2021 aarch64 GNU/Linux

                      System: 32bit
                      
                      sizeof(clock_t)=4, CLOCKS_PER_SEC=1000000
                      sizeof(size_t)=4, sizeof(int)=4
                      
                      clock()
                      C Native:     1968
                      C Multiplier: 3936       (x2)
                      C Multiplier: 7872       (x4)
                      C Multiplier: 11808      (x6)
                      C Multiplier: 15744      (x8)
                      C Multiplier: 19680      (x10)
                      
                      One sec sleep: 2000 - 1968 = 32
                      
                      DirtBagXonD 1 Reply Last reply Reply Quote 0
                      • DirtBagXonD
                        DirtBagXon @roslof
                        last edited by DirtBagXon

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

                        Ran it using the 32bit and 64bit kernel. Funny, but for 64-bit, even though the kernel reads as aarch64, "System" shows up as 32-bit with the tool... Must be based on userland and not kernel.

                        Exactly what I was checking - cool.

                        Fix should be working fine.

                        Thanks again.

                        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

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

                          Undocumented hypseus features:

                          • Alt-Enter: Toggle fullscreen

                          You will not see the TTF blending advantages in this switch, unless initiated with the -fullscreen argument.

                          • Scoreboard toggle on/off  via 'spacebar' or 'button 3' (SDLK_SPACE).

                          As @roslof commented above. I now enforce the LED scoreboard on startup for DL games in order for video to render.
                          This can override that choice.

                           

                          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

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

                            Ok, so I have released current (so far known ) working commits as Hypseus Singe v2.0.2 .

                            Made the jump to v2 as I think the addition of Singe warrants it.

                            Attempted to correspond with the original author (h0tw1r3 ) of Hypseus, but haven't had an answer. Guess he didn't like my hacky code, but also hasn't done much with it in a while - big thanks to him for all the SDL2 groundwork.

                            Also big thanks to @SaturnX for getting me onto the idea of playing with hypseus for SDL2 port. I hope you can pickup on getting some documentation sorted.

                            And massive thanks to @roslof for all the testing and feedback.

                            For the moment putting this to bed, dunno where I found the time, but was fun....

                            Enjoy guys.

                            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

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

                              Hypseus-Singe is now a drop-in replacement for the standard Daphne plugin on RetroPie:

                               
                              Instructions here:

                              https://github.com/DirtBagXon/hypseus-singe/blob/master/src/3rdparty/retropie/RETROPIE.md

                              (One last small commit [2.0.2.1 ] for this, which ignores obsolete arguments in the original RetroPie plugin scripts - ensure you grab it!)

                               

                              As @SaturnX asked for a drop-in replacement thought I would enable that.
                              I'll let you guys figure the best RetroPie scripting to utilise the Singe extension, but should be straightforward from here....

                               

                              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

                              DarksaviorD 1 Reply Last reply Reply Quote 3
                              • DarksaviorD
                                Darksavior @DirtBagXon
                                last edited by Darksavior

                                @dirtbagxon Great work! Some questions:
                                How do I remove the scoreboard? It pops up in space ace and dragons lair 1 . If this is a dipswitch setting then I'll take a look at that later.
                                How do I get singe games working? I tried the daphne rom config ../roms/daphne/timegal.daphnebut that doesn't seem to work: [console] ERROR: Unknown game type specified : [console] timegal
                                Btw, the pi2 and newer are quad core so most people can use make -j 4

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

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

                                  @dirtbagxon Great work! Some questions:

                                  How do I remove the scoreboard?

                                  You can't turn it off on startup, due to the way the overlays are setup in SDL2, otherwise the underlying video will not appear.
                                  However see below...

                                   

                                  It pops up in space ace and dragons lair 1 .

                                  Scoreboard toggle on/off via 'spacebar' or 'button 3' (SDLK_SPACE).

                                   

                                  How do I get singe games working? I tried the daphne rom config ../roms/daphne/timegal.daphnebut that doesn't seem to work: [console] ERROR: Unknown game type specified : [console] timegal

                                  This I didn't tackle, I hope someone who has written RetroPie scripts can elaborate. For Singe the game type will always be singe and an extra argument of -script is needed to specify the main .singe  file. Apart from that its the same.

                                  So an example for timegal would be:

                                  /opt/retropie/emulators/daphne/daphne.bin singe vldp -nohwaccel -framefile /home/pi/RetroPie/roms/daphne/timegal.daphne/timegal.txt -script /home/pi/RetroPie/roms/daphne/timegal.daphne/timegal.singe -homedir /opt/retropie/emulators/daphne -fullscreen
                                  

                                  You can check the command that is called in:

                                  cat /dev/shm/runcommand.log
                                  

                                  Just a matter of getting the script to call the correct arguments. Go for it RetroPie'ers...

                                   

                                  Btw, the pi2 and newer are quad core so most people can use make -j 4

                                  No harm in using a few less cores, just takes a few seconds longer and generates less heat ;)

                                   

                                  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

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

                                    I suppose an edit to:

                                    /opt/retropie/emulators/daphne/daphne.sh
                                    

                                    Which looks if a .singe file exists in the target directory, then alters the config accordingly might work. I will take a look at that route.

                                    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

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

                                      OK,

                                      Seems easy enough.

                                      First backup your exisiting script:

                                      cp /opt/retropie/emulators/daphne/daphne.sh /opt/retropie/emulators/daphne/daphne.sh.orig
                                      

                                      Then alter the original file daphne.sh so it's like this:

                                      /opt/retropie/emulators/daphne/daphne.sh
                                      
                                      #!/bin/bash
                                      dir="$1"
                                      name="${dir##*/}"
                                      name="${name%.*}"
                                      
                                      if [[ -f "$dir/$name.commands" ]]; then
                                          params=$(<"$dir/$name.commands")
                                      fi
                                      
                                      if [[ -f "$dir/$name.singe" ]]; then
                                          "/opt/retropie/emulators/daphne/daphne.bin" singe vldp -framefile "$dir/$name.txt" -script "$dir/$name.singe" -homedir "/opt/retropie/emulators/daphne" -fullscreen $params
                                      else
                                          "/opt/retropie/emulators/daphne/daphne.bin" "$name" vldp -framefile "$dir/$name.txt" -homedir "/opt/retropie/emulators/daphne" -fullscreen $params
                                      fi
                                      

                                      Edit: I removed -nohwaccel as it's no longer needed.

                                      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

                                      DarksaviorD 1 Reply Last reply Reply Quote 0
                                      • DarksaviorD
                                        Darksavior @DirtBagXon
                                        last edited by Darksavior

                                        @dirtbagxon Got a bit further but now it's looking for the fonts and audio stuff . This is the last line: SINGE: Could not open singe/timegal/teedo.wav: Couldn't open singe/timegal/teedo.wav
                                        I don't have those folders but I have the files in my timegal folder. I'll move them but where would I make those folders?

                                        DirtBagXonD roslofR 2 Replies Last reply Reply Quote 0
                                        • DirtBagXonD
                                          DirtBagXon @Darksavior
                                          last edited by DirtBagXon

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

                                          @dirtbagxon Got a bit further but now it's looking for the fonts and audio stuff . This is the last line: SINGE: Could not open singe/timegal/teedo.wav: Couldn't open singe/timegal/teedo.wav
                                          I don't have those folders but I have the files in my timegal folder. I'll move them but where would I make those folders?

                                          Mmmm, this is following the path in the .singe file, which is looking for:

                                          /opt/retropie/emulators/daphne/singe/timegal
                                          

                                          i.e. the -homedir + singe + gamename

                                          All the singe game files will have the same path, as this is where it has traditional been and coded. Let me think about clean way to do that.....

                                          Messy way:

                                          cd /opt/retropie/emulators/daphne/
                                          mkdir singe
                                          cd singe
                                          ln -s ../timegal.daphne timegal
                                          

                                          I think.... ^ more correct ?

                                          Does that work firstly ?

                                          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

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

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

                                            @dirtbagxon Got a bit further but now it's looking for the fonts and audio stuff . This is the last line: SINGE: Could not open singe/timegal/teedo.wav: Couldn't open singe/timegal/teedo.wav
                                            I don't have those folders but I have the files in my timegal folder. I'll move them but where would I make those folders?

                                            Hey @Darksavior. FWIW, I had the same issues and had to jump through a couple of mini-hoops. As it stands, I believe the ../roms/daphne folder is always "root" for any of the <game>.singe scripts regardless of its location.

                                            If helpful, for Singe games only, this is what I'm currently doing to solve:

                                            1. Create a simlink within roms/daphne:
                                              ln -s /home/pi/RetroPie/roms/daphne singe
                                              RESULT SHOULD BE: singe -> /home/pi/RetroPie/roms/daphne

                                            2. For each Singe game, create simlinks that are the name of the rom that map to each .daphne game within roms/daphne:
                                              Examples:
                                              ln -s /home/pi/RetroPie/roms/daphne/hayate.daphne hayate
                                              ln -s /home/pi/RetroPie/roms/daphne/maddog.daphne maddog
                                              ln -s /home/pi/RetroPie/roms/daphne/maddog2.daphne maddog2
                                              ln -s /home/pi/RetroPie/roms/daphne/timegal.daphne timegal
                                              ln -s /home/pi/RetroPie/roms/daphne/timetraveler.daphne timetraveler
                                              SAMPLE RESULTS:
                                              hayate -> hayate.daphne/
                                              maddog -> maddog.daphne/
                                              maddog2 -> maddog2.daphne/
                                              timegal -> timegal.daphne/
                                              timetraveler -> timetraveler.daphne/

                                            So it's not pretty, and I fought with -homedir and -datadir settings to no avail. -- but this is best solution I could find based on the way code currently works that allows the standard naming convention and a clean launch from EmulationStation without extra files/folders visible.

                                            IDEALLY, the -script command-line directory would be the root directory for any game instead of -homedir or -datadir.

                                            roslofR 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.