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

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

Scheduled Pinned Locked Moved Ideas and Development
developmentlr-messmamelr-mamescripts
2.2k Posts 35 Posters 6.0m 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.
  • F
    Folly @RussellB
    last edited by 26 Apr 2021, 12:21

    @russellb

    Thanks for posting it here.

    1 Reply Last reply Reply Quote 0
    • D
      DTEAM
      last edited by DTEAM 26 Apr 2021, 12:33

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

      F 1 Reply Last reply 26 Apr 2021, 13:00 Reply Quote 1
      • F
        Folly @DTEAM
        last edited by Folly 26 Apr 2021, 13:00

        @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 Reply Last reply Reply Quote 0
        • F
          Folly @RussellB
          last edited by Folly 26 Apr 2021, 20:04

          @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 ?

          D R 2 Replies Last reply 30 Apr 2021, 14:19 Reply Quote 0
          • D
            DTEAM @Folly
            last edited by 30 Apr 2021, 14:19

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

            F 2 Replies Last reply 30 Apr 2021, 15:47 Reply Quote 1
            • F
              Folly @DTEAM
              last edited by 30 Apr 2021, 15:47

              @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 Reply Last reply Reply Quote 0
              • R
                RussellB @Folly
                last edited by 30 Apr 2021, 16:30

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

                F R 2 Replies Last reply 30 Apr 2021, 17:31 Reply Quote 0
                • F
                  Folly @RussellB
                  last edited by 30 Apr 2021, 17:31

                  @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 Reply Last reply Reply Quote 0
                  • R
                    RussellB @RussellB
                    last edited by RussellB 30 Apr 2021, 17:48

                    @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 Reply Last reply 1 May 2021, 11:51 Reply Quote 1
                    • R
                      RussellB @RussellB
                      last edited by 1 May 2021, 11:51

                      @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

                      F 3 Replies Last reply 1 May 2021, 15:00 Reply Quote 0
                      • F
                        Folly @RussellB
                        last edited by Folly 5 Jan 2021, 16:14 1 May 2021, 15:00

                        @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 Reply Last reply 1 May 2021, 20:48 Reply Quote 0
                        • F
                          Folly @RussellB
                          last edited by Folly 5 Jan 2021, 16:05 1 May 2021, 15:00

                          This post is deleted!
                          1 Reply Last reply Reply Quote 0
                          • F
                            Folly @RussellB
                            last edited by Folly 5 Jan 2021, 16:08 1 May 2021, 15:01

                            This post is deleted!
                            1 Reply Last reply Reply Quote 0
                            • F
                              Folly
                              last edited by 1 May 2021, 15:22

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

                              1 Reply Last reply Reply Quote 0
                              • R
                                RussellB @Folly
                                last edited by 1 May 2021, 20:48

                                @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,

                                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.

                                Got it. Thanks.

                                1 Reply Last reply Reply Quote 0
                                • F
                                  Folly @DTEAM
                                  last edited by Folly 5 May 2021, 19:20 5 May 2021, 18:18

                                  @dteam

                                  Here a small update on the progress on the front-end module script :

                                  I am working on the front-end module-script add-mamedev-systems-test5.sh.
                                  I have made some progress in rebuilding and building stuff into the front-end.
                                  I can now generate sub-menu's for #,A,B,C etc .
                                  But I can't show the systems already in there, this seems quite difficult at the moment.
                                  Progress is really slow at the moment.

                                  I have to leave it for a while and re-think my approach again.
                                  I hope I can find some better/easier ways.

                                  Another idea is to make this script in such a way that I can just copy and paste my generate-systems-lr-mess_mame-2v0-alpha.sh into the front-end module-script.
                                  That way I can just maintain the 2v0 script and paste it into the front-end each time when I update it.

                                  D 1 Reply Last reply 5 May 2021, 19:13 Reply Quote 1
                                  • D
                                    DTEAM @Folly
                                    last edited by 5 May 2021, 19:13

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

                                    Another idea is to make this script in such a way that I can just copy and paste my generate-systems-lr-mess_mame-2v0-alpha.sh into the front-end module-script.
                                    That way I can just maintain the 2v0 script and paste it into the front-end each time when I update it.

                                    This is what I am doing at the moment with V1.8.

                                    F 1 Reply Last reply 5 May 2021, 20:02 Reply Quote 1
                                    • F
                                      Folly @DTEAM
                                      last edited by 5 May 2021, 20:02

                                      @dteam

                                      Ok, yes indeed you can do that too.
                                      Btw. I have been keeping 2.0 and 1.8 both up to date.

                                      D 1 Reply Last reply 5 May 2021, 20:24 Reply Quote 0
                                      • D
                                        DTEAM @Folly
                                        last edited by DTEAM 5 May 2021, 21:32 5 May 2021, 20:24

                                        @folly
                                        I know. I updated my cdimono1 with v1.8 to see what RussellB did.

                                        I'm running adam for coleco_sgm with MAME. I created a separate folder for that (coleco_sgm). Everything goes well exepted the MAME UI menu. I'm not able to go in. Have you a solution for that. It's the first time I met this problem.

                                        mame-system-adam-cart1 = "/opt/retropie/emulators/mame/mame -v -c adam -cart1 %ROM%"
                                        
                                        F 1 Reply Last reply 6 May 2021, 06:21 Reply Quote 0
                                        • F
                                          Folly @DTEAM
                                          last edited by 6 May 2021, 06:21

                                          @dteam

                                          You should use the scroll-lock key to toggle between FULL and PARTIAL emulation.
                                          With PARTIAL the UI should be enabled.

                                          If this doesn't work we have to look further.

                                          D 1 Reply Last reply 6 May 2021, 14:30 Reply Quote 0
                                          256 out of 2234
                                          • First post
                                            256/2234
                                            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.

                                            This community forum collects and processes your personal information.
                                            consent.not_received