RetroPie forum home
    • 최근
    • 태그
    • 인기
    • Home
    • Docs
    • 등록
    • 로그인

    Development of module-script generator for lr-mess, lr-mame and mame standalone

    예약됨 고정됨 잠김 이동됨 Ideas and Development
    developmentlr-messmamelr-mamescripts
    2.3k 게시물 37 작성자 7.7m 조회수
    게시물 더 불러오는 중
    • 오래된 순
    • 최신 순
    • 가장 많은 투표
    답글
    • 토픽으로 답글
    로그인 후 답글 작성
    이 토픽은 삭제되었습니다. 토픽 관리 권한이 있는 사용자만 볼 수 있습니다.
    • FollyF
      Folly
      마지막 수정자: Folly

      @valerino

      Very busy ?

      V 1 답글 마지막 답글 답글 인용 0
      • FollyF
        Folly
        마지막 수정자: Folly

        @DTEAM

        Just found nice way of running the gdrivedl.py script online, without downloading.
        If we use this in the script we can use just 1 line instead of 3, as we recently did :

        curl https://raw.githubusercontent.com/matthuisman/gdrivedl/master/gdrivedl.py | python - https://drive.google.com/drive/folders/<enter_the_folder_id_here> -P <destiny path>
        
        1 답글 마지막 답글 답글 인용 1
        • V
          valerino @Folly
          마지막 수정자:

          @folly yep, i don 't have time to dedicate to retropie now :(

          anyway, seems you made a really big jump ahead alone, you're making a really good work, really congratulations !

          when you think it's enough stable and working as intended, we'll see how to do to join mine and your repo.....

          v.

          FollyF 1 답글 마지막 답글 답글 인용 0
          • FollyF
            Folly @valerino
            마지막 수정자: Folly

            @valerino said in Development of module-script generator for lr-mess and mame standalone:

            @folly yep, i don 't have time to dedicate to retropie now :(

            anyway, seems you made a really big jump ahead alone, you're making a really good work, really congratulations !

            when you think it's enough stable and working as intended, we'll see how to do to join mine and your repo.....

            v.

            Thanks for your message.
            It's understood, not everyone can spend that much time on this.

            We will continue to work on it, keeping the joining in mind.

            1 답글 마지막 답글 답글 인용 0
            • FollyF
              Folly @DTEAM
              마지막 수정자: Folly

              @dteam @valerino

              I have done some menu restructuring tests on the add_ext_repos.sh script, which basically used the dialog api in the same way as our add-mamedev-systems.sh

              I did this on this script because it still contained just 1 main-menu.
              So this was an easy way to test my idea to use comma separate values in the array.

              I wanted to make a structure so :

              • the code is easy to read
              • implementation of data is easy (now using csv style, which could also be considered as a 2 dimensional array in some way)
              • it's possible to use exel/calc and cut/paste from a csv file for implementing the data, if needed
              • data can be imported directly from a csv file, if needed
              • not every menu needs a menu script (every menu/submenu should be built by the same function part)
              • lesser code that can do the same thing

              I hope and think it's a good idea for the base structure of our script and more scripts.

              This is the code before and after, just to give you an idea on what I have done :
              Before :
              https://raw.githubusercontent.com/FollyMaddy/RetroPie-Share/d66f3c78ac1239f724868dbdcaa4d8ec1e5cfeb4/00-workdir-00/add-ext-repos.sh
              After :
              https://raw.githubusercontent.com/FollyMaddy/RetroPie-Share/main/00-workdir-00/add-ext-repos.sh

              ps.

              I did a second test to see if I could install packages directly from my menu structure, and this works,
              showing a new window-menu with install/update/remove/package help etc.

              I just added a few lines to the csv_array to test the ability to install packages directly from our menu structure :
              (so now you can also see that it's possible to run different things per line in one menu)

              local csv=()
              #the first value should be an empty value so the menu begins with 1
              #make sure every line begins and ends with quotes because of possible spaces
              #just use the first and last colum in excel/calc for the quotes and you should be fine
              csv=(
              ",,,"
              ",FollyMaddy/RetroPie-Share,FollyMaddy/RetroPie-Share/tree/main/00-scriptmodules-00,download_ext_module_scripts,"
              ",GeorgeMcMullen/rp-box86wine,GeorgeMcMullen/rp-box86wine/tree/main/scriptmodules,download_ext_module_scripts,"
              ",zerojay/RetroPie-Extra,zerojay/RetroPie-Extra/tree/master/scriptmodules,download_ext_module_scripts,"
              ",valerino/RetroPie-Setup,valerino/RetroPie-Setup/tree/master/scriptmodules,download_ext_module_scripts,"
              ",install mame",,"package_setup mame,"
              ",install goonies",,"package_setup goonies,"
                  )
              

              Knowing above, I think it's time to rebuild the front-end script.

              R 1 답글 마지막 답글 답글 인용 0
              • R
                RussellB @Folly
                마지막 수정자: RussellB

                @folly At Folly's request I'm posting the changes I made to the run_mess.sh script which allows for each game that uses it to be started with a command file that instead of having it named 'tmpmess.cmd' it is named after the ROM that it is starting, e.g. "Alice in Wonderland (USA).cmd". This way each game is unique and RetroArch/mess will save custom game configs to that instead of constantly overwriting 'tmpmess.cfg'.

                These are the changes:

                _system="$4"
                _biosdir="$5"
                <<NEW CODE FOLLOWS>>
                #
                # use the name of the rom to generate the 'tmpmess.cmd' file so RetroArch can save a custom game config$
                #
                _fname="$(basename "${*: -3:1}")"
                _fbname="${_fname%.*}"
                <<END NEW CODE>>
                
                # generate mess.cmd
                echo "\t/tmp/mess.cmd content: ${_cmdarr[@]}"
                <<NEW CODE FOLLOWS>>
                # _tmpcmd="$_romdir/tmpmess.cmd"
                #
                # Now use the root name of the rom file as the name of the cmd file
                #
                _tmpcmd="$_romdir/$_fbname.cmd"
                <<END NEW CODE>>
                
                

                Using this with mess for Philips CD-i roms now every game has a bezel and I changed the screen offset to move the "CD-i" out of the view. Looks cleaner that way to me.

                Hope this helps!

                RussellB

                FollyF 2 답글 마지막 답글 답글 인용 2
                • FollyF
                  Folly @RussellB
                  마지막 수정자:

                  @russellb

                  Thanks for posting it here.

                  1 답글 마지막 답글 답글 인용 0
                  • DTEAMD
                    DTEAM
                    마지막 수정자: DTEAM

                    @folly said in Development of module-script generator for lr-mess and mame standalone:

                    After :
                    https://raw.githubusercontent.com/FollyMaddy/RetroPie-Share/main/00-workdir-00/add-ext-repos.sh

                    I Folly, I have installed and used It and It works well. Besides making the installation easier, I find it a good way to consolidate people's work.
                    It makes a one stop shop.

                    FollyF 1 답글 마지막 답글 답글 인용 1
                    • FollyF
                      Folly @DTEAM
                      마지막 수정자: Folly

                      @dteam

                      I think so too, thanks for testing and letting me know.

                      btw. I just updated the add-ext-repos.sh script in the normal 00-scriptmodules-00 directory with the csv style and some information of the csv structure.
                      I now use the first "row" for the descriptions of the "columns" that way we know what all the cells do. :-)

                      # INFORMATION ABOUT THE CSV STRUCTURE USED FOR GENERATING A GUI/SUB-GUI :
                      # - the first value isn't used for the menu, that way the menu begins with 1
                      # - this first value should be empty or contain a description of the specific column
                      # - make sure every line begins and ends with quotes because of possible spaces
                      # - just use the first and last column in excel/calc for the quotes and you should be fine
                      

                      So for the front-end it begins to looks like this (not yet on github!) :

                      ",menu_item,empty,to_do,"
                      ",install mame,,package_setup mame,"
                      ",install lr-mess,,package_setup lr-mess,"
                      ",,,,"
                      ",Handhelds / Plug & play -> Select and install,,,"
                      ",Handhelds / Plug & play -> Select downloads,,gui_add-mamedev-systems_downloads,"
                      
                      1 답글 마지막 답글 답글 인용 0
                      • FollyF
                        Folly @RussellB
                        마지막 수정자: Folly

                        @russellb said in Development of module-script generator for lr-mess and mame standalone:

                        @folly At Folly's request I'm posting the changes I made to the run_mess.sh script which allows for each game that uses it to be started with a command file that instead of having it named 'tmpmess.cmd' it is named after the ROM that it is starting, e.g. "Alice in Wonderland (USA).cmd". This way each game is unique and RetroArch/mess will save custom game configs to that instead of constantly overwriting 'tmpmess.cfg'.

                        These are the changes:
                        First part :

                        _system="$4"
                        _biosdir="$5"
                        +#
                        +# Use the name of the rom to generate the 'tmpmess.cmd' file so RetroArch can save a custom game config
                        +#
                        +_fname="$(basename "${*: -3:1}")"
                        +_fbname="${_fname%.*}"
                        

                        Second part :

                        # generate mess.cmd
                        echo "\t/tmp/mess.cmd content: ${_cmdarr[@]}"
                        -_tmpcmd="$_romdir/tmpmess.cmd"
                        +#
                        +# Now use the root name of the rom file as the name of the cmd file
                        +#
                        +_tmpcmd="$_romdir/$_fbname.cmd"
                        

                        Using this with mess for Philips CD-i roms now every game has a bezel and I changed the screen offset to move the "CD-i" out of the view. Looks cleaner that way to me.

                        Hope this helps!

                        RussellB

                        I have done some tests with your edited parts.
                        From what I am seeing now, it's a pretty good solution for many issues indeed.

                        Edit :
                        @RussellB
                        To read your code clearer I have edited the code part in this post with the diff function.

                        Can you take a look at it, is it still correct ?
                        To see how the diff function works just "Quote" my post and you will see how it's done :

                        = keep
                        - = remove
                        + = add
                        

                        I will look at it some more, but overall I think this should be added to the run_mess.sh script from Valerino .

                        @valerino
                        If you have some time, could you take a look at it too ?

                        DTEAMD R 2 답글 마지막 답글 답글 인용 0
                        • DTEAMD
                          DTEAM @Folly
                          마지막 수정자:

                          @folly
                          New stuff! If you add the rom path in the mame.ini file for a system like Coleco, you can run mame basename line in the system menu like we did with konamih or jakks. With that, you can load the cheat codes from MAME.

                          Other thing. In the MAME Arcade Romset, you have Nintendo Playchoice 10 roms and Sega MegaPlay roms . They run well with MAME standalone. For Megaplay, I think It's the only option.

                          FollyF 2 답글 마지막 답글 답글 인용 1
                          • FollyF
                            Folly @DTEAM
                            마지막 수정자:

                            @dteam said in Development of module-script generator for lr-mess and mame standalone:

                            @folly
                            New stuff! If you add the rom path in the mame.ini file for a system like Coleco, you can run mame basename line in the system menu like we did with konamih or jakks. With that, you can load the cheat codes from MAME.

                            Other thing. In the MAME Arcade Romset, you have Nintendo Playchoice 10 roms and Sega MegaPlay roms . They run well with MAME standalone. For Megaplay, I think It's the only option.

                            Cool !
                            I have to investigate that.

                            1 답글 마지막 답글 답글 인용 0
                            • R
                              RussellB @Folly
                              마지막 수정자:

                              @folly said in Development of module-script generator for lr-mess and mame standalone:

                              @russellb said in Development of module-script generator for lr-mess and mame standalone:

                              @folly At Folly's request I'm posting the changes I made to the run_mess.sh script which allows for each game that uses it to be started with a command file that instead of having it named 'tmpmess.cmd' it is named after the ROM that it is starting, e.g. "Alice in Wonderland (USA).cmd". This way each game is unique and RetroArch/mess will save custom game configs to that instead of constantly overwriting 'tmpmess.cfg'.

                              These are the changes:
                              First part :

                              _system="$4"
                              _biosdir="$5"
                              +#
                              +# Use the name of the rom to generate the 'tmpmess.cmd' file so RetroArch can save a custom game config
                              +#
                              +_fname="$(basename "${*: -3:1}")"
                              +_fbname="${_fname%.*}"
                              

                              Second part :

                              # generate mess.cmd
                              echo "\t/tmp/mess.cmd content: ${_cmdarr[@]}"
                              -_tmpcmd="$_romdir/tmpmess.cmd"
                              +#
                              +# Now use the root name of the rom file as the name of the cmd file
                              +#
                              +_tmpcmd="$_romdir/$_fbname.cmd"
                              

                              Using this with mess for Philips CD-i roms now every game has a bezel and I changed the screen offset to move the "CD-i" out of the view. Looks cleaner that way to me.

                              Hope this helps!

                              RussellB

                              I have done some tests with your edited parts.
                              From what I am seeing now, it's a pretty good solution for many issues indeed.

                              Edit :
                              @RussellB
                              To read your code clearer I have edited the code part in this post with the diff function.

                              Can you take a look at it, is it still correct ?
                              To see how the diff function works just "Quote" my post and you will see how it's done :

                              = keep
                              - = remove
                              + = add
                              

                              I will look at it some more, but overall I think this should be added to the run_mess.sh script from Valerino .

                              @valerino
                              If you have some time, could you take a look at it too ?

                              That looks correct. Sorry for the late reply.

                              FollyF R 2 답글 마지막 답글 답글 인용 0
                              • FollyF
                                Folly @RussellB
                                마지막 수정자:

                                @russellb

                                Thank's.
                                I will wait for @valerino, because it's his script.
                                I think he will implement it when he knows what it does.

                                1 답글 마지막 답글 답글 인용 0
                                • R
                                  RussellB @RussellB
                                  마지막 수정자: RussellB

                                  @russellb said in Development of module-script generator for lr-mess and mame standalone:

                                  @folly said in Development of module-script generator for lr-mess and mame standalone:

                                  @russellb said in Development of module-script generator for lr-mess and mame standalone:

                                  @folly At Folly's request I'm posting the changes I made to the run_mess.sh script which allows for each game that uses it to be started with a command file that instead of having it named 'tmpmess.cmd' it is named after the ROM that it is starting, e.g. "Alice in Wonderland (USA).cmd". This way each game is unique and RetroArch/mess will save custom game configs to that instead of constantly overwriting 'tmpmess.cfg'.

                                  These are the changes:
                                  First part :

                                  _system="$4"
                                  _biosdir="$5"
                                  +#
                                  +# Use the name of the rom to generate the 'tmpmess.cmd' file so RetroArch can save a custom game config
                                  +#
                                  +_fname="$(basename "${*: -3:1}")"
                                  +_fbname="${_fname%.*}"
                                  

                                  Second part :

                                  # generate mess.cmd
                                  echo "\t/tmp/mess.cmd content: ${_cmdarr[@]}"
                                  -_tmpcmd="$_romdir/tmpmess.cmd"
                                  +#
                                  +# Now use the root name of the rom file as the name of the cmd file
                                  +#
                                  +_tmpcmd="$_romdir/$_fbname.cmd"
                                  

                                  Using this with mess for Philips CD-i roms now every game has a bezel and I changed the screen offset to move the "CD-i" out of the view. Looks cleaner that way to me.

                                  Hope this helps!

                                  RussellB

                                  I have done some tests with your edited parts.
                                  From what I am seeing now, it's a pretty good solution for many issues indeed.

                                  Edit :
                                  @RussellB
                                  To read your code clearer I have edited the code part in this post with the diff function.

                                  Can you take a look at it, is it still correct ?
                                  To see how the diff function works just "Quote" my post and you will see how it's done :

                                  = keep
                                  - = remove
                                  + = add
                                  

                                  I will look at it some more, but overall I think this should be added to the run_mess.sh script from Valerino .

                                  @valerino
                                  If you have some time, could you take a look at it too ?

                                  That looks correct. Sorry for the late reply.

                                  @valerino....

                                  I ran into the issue that when mame/mess were run with tmpmess.cmd all the roms used the same configuration file, tmpmess.cfg. The first line of code there takes the third-to-last parameter sent to the run_mess.sh and assumes it's the name of the rom. Next line gets the root of the filename minus full path and extension. The last remaining line of code replaces tmpmess.cmd with the root name of the rom and .cmd. That way it's unique per rom. This allowed me to specify custom configs, including bezels and screen locations, etc. per rom.

                                  Hope the explanation helps.

                                  R 1 답글 마지막 답글 답글 인용 1
                                  • R
                                    RussellB @RussellB
                                    마지막 수정자:

                                    @folly,

                                    Can I recommend moving the location of the run_mess file away from the home directory and into something like /opt/retropie/scripts? I moved it because I don't like having rom dependencies in the home folder.

                                    RussellB

                                    FollyF 3 답글 마지막 답글 답글 인용 0
                                    • FollyF
                                      Folly @RussellB
                                      마지막 수정자: Folly

                                      @russellb said in Development of module-script generator for lr-mess and mame standalone:

                                      @folly,

                                      Can I recommend moving the location of the run_mess file away from the home directory and into something like /opt/retropie/scripts? I moved it because I don't like having rom dependencies in the home folder.

                                      RussellB

                                      I understand what you mean, but there problems doing it that way.

                                      The problem is, the run_mess.sh script is within the fork of @valerino of the RetroPie-Setup.
                                      So when you clone the repository the run_mess.sh script is already there.
                                      In the github Repositories you don't have the directories /opt/retropie/...... .
                                      If you want it there you have to "install/copy" it.
                                      So that is why it's in that place.

                                      If we really want this, all the 30+ valerino scripts have to be changed by hand.
                                      And you have to make an installer part for the run_mess.sh.
                                      I don't think Valerino has time for that.

                                      I could change my script, but then it isn't compatible anymore with the Valerino fork.
                                      An other reason not put in /opt/retropie/...... is, you have to be "root" to copy it in that folder.
                                      My generator script, the one without the front-end gui, can be run without root user.
                                      I like to keep it that way.

                                      So overall, it is better to keep it this way to avoid problems.

                                      I hope you understand.

                                      R 1 답글 마지막 답글 답글 인용 0
                                      • FollyF
                                        Folly @RussellB
                                        마지막 수정자: Folly

                                        이 게시물은 삭제되었습니다!
                                        1 답글 마지막 답글 답글 인용 0
                                        • FollyF
                                          Folly @RussellB
                                          마지막 수정자: Folly

                                          이 게시물은 삭제되었습니다!
                                          1 답글 마지막 답글 답글 인용 0
                                          • FollyF
                                            Folly
                                            마지막 수정자:

                                            I had a bad connection so my post was tripled.
                                            That's why I removed above posts.

                                            1 답글 마지막 답글 답글 인용 0
                                            • 첫 게시물
                                              마지막 게시물

                                            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.