• 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 36 Posters 6.1m 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.
  • D
    DTEAM @Folly
    last edited by DTEAM 18 Feb 2021, 16:17

    @folly

    Does the cheat still work when you remove it from the custom-core-config and keep it in /all/retroarch-core-config.cfg ?

    Good question. I'm gonna do a test

    new edit
    Yes, It works

    And then, when you set cheats on disabled in /all/retroarch-core-config.cfg is it disabled then ?

    No, doesn't show in MAME UI

    cheats = enable in custom-core-options.cfg only doesn't work also.

    So It runs with retroarch-core-config.cfg

    F 1 Reply Last reply 18 Feb 2021, 16:46 Reply Quote 1
    • F
      Folly @DTEAM
      last edited by Folly 18 Feb 2021, 16:46

      @dteam

      Perfect !
      Exactly what I was thinking.
      Now we know it should work.

      Thanks for testing :-)

      I could have added it in the custom but then you have to append the config and the config is actually created for the Valerino scripts.
      So this solution is perhaps the best for now.

      1 Reply Last reply Reply Quote 0
      • D
        DTEAM
        last edited by DTEAM 18 Feb 2021, 17:04

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

        What do you manage ?, In this way artwork is automatically loaded with MAME standalone.

        Yes I did, this background is then renamed and used as retroarch overlay with lr-mess.

        For MAME standalone I left the artwork zipped in /home/pi/RetroPie/roms/mame/artwork/<artwork>.zip

        I confirm, It works great. Is It doable to get from zipped artworks in the MAME artwork folder, an unzipped copy and renamed backgroud files for your new ovelays directory (konamih, tigerh, etc).
        It could be done with your generate-overlay-configs.sh

        Maybe if you put everything in the overlay folder without subfolders, you could generate overlay .cfg files for everything in the /home/pi/RetroPie/roms/mame/artwork/ and copy/rename each background

        That way, if It's doable , It could be work for arcade games also and handheld consoles overlays!

        F 1 Reply Last reply 18 Feb 2021, 18:22 Reply Quote 0
        • F
          Folly @DTEAM
          last edited by Folly 18 Feb 2021, 18:22

          @dteam

          Yes, I think so too.

          Indeed I could implement this in the overlays script.
          So then it would create the directories, create the configs and download the artwork and overlays and cheats and place them in the correct place, just in 1 run.
          And It would be nice if all files can be downloaded from the same source.

          Well I will think about it a bit, but that would be awesome.

          D 1 Reply Last reply 18 Feb 2021, 19:22 Reply Quote 1
          • D
            DTEAM @Folly
            last edited by DTEAM 18 Feb 2021, 19:22

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

            And It would be nice if all files can be downloaded from the same source.

            Cheat codes for MAME/MESS : Pugsy's Cheats , you must get cheat.7z and put It in /home/pi/RetroPie/BIOS/mame/cheat

            MAME Artworks: (Handheld systems without arcade artwork), could be moved somewhere else on another server.

            some observations (with your 3 days ago version):
            For MAME systems (TigerH, KonamiH, Jakks, etc., ) - MAME Romset

            • all options working well lr-mess-cmd, etc. (except -- > lr-mess-basename - It freezes)

            For systems like coleco, nes or others,

            • Lr-Mess-system and mame-system always working with No-intro, Tosec, MESS, etc. romsets
            • lr-mess-cmd works with mess romset
            • lr-mess-basename, mame-basename and mame-cmd never work

            For systems using a nomenclature in RetroPie different from that of MAME (e.g .: jaguar = atarijaguar)

            • only lr-mess-system and mame-system working with No-intro, Tosec, MESS, etc. romsets

            Have you the same results?

            F 2 Replies Last reply 19 Feb 2021, 07:43 Reply Quote 0
            • F
              Folly @DTEAM
              last edited by Folly 19 Feb 2021, 07:43

              @dteam

              Thanks, I will read the information and see what we can do with it.

              I think I have similar results, but still I have to do some tests.

              Summarized :

              It seem I can remove the old :

              • lr-mess-basename,
              • mame-basename

              For the handhelds this should be kept :

              • mame-cmd
              1 Reply Last reply Reply Quote 1
              • F
                Folly @DTEAM
                last edited by 20 Feb 2021, 14:39

                @dteam

                I have made some progress on the downloading of cheats and artwork.
                But google drive is a pain !
                For google drive I found a nice script, but it doesn't get all the files.
                So I made an issue on Github.
                Hopefully the maker of the google drive script will do something with it.
                To be continued...

                D 1 Reply Last reply 20 Feb 2021, 17:27 Reply Quote 1
                • D
                  DTEAM @Folly
                  last edited by 20 Feb 2021, 17:27

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

                  But google drive is a pain !

                  I put It there because It was easy to do for me for storage, but If you prefer, you can download those files and transfer It somewhere else where It will be easier to manage It.

                  F 2 Replies Last reply 20 Feb 2021, 19:50 Reply Quote 0
                  • F
                    Folly @DTEAM
                    last edited by 20 Feb 2021, 19:50

                    @dteam

                    I will first wait on the response.

                    If you have some extra capacity an other solution could be to add some separate handheld folders for this purpose.

                    We can discuss this later.

                    1 Reply Last reply Reply Quote 0
                    • F
                      Folly @DTEAM
                      last edited by Folly 20 Feb 2021, 19:58

                      @dteam

                      So you see, if this works, it would be great.
                      Just using a few lines ;-)

                      If you are interested in the code I already made.
                      This is it :
                      (OK)

                      #gets the cheat.7z and places it in the correct path
                      #works perfect
                      wget -N -P /tmp http://cheat.retrogames.com/download/cheat0221.zip
                      unzip -o /tmp/cheat0221.zip cheat.7z -d $HOME/RetroPie/BIOS/mame/cheat
                      rm /tmp/cheat0221.zip

                      EDIT (look a few posts ahead for better code for artwork !) :
                      gdrivedl got only a part of the html code(old version).
                      If you would browse the website, you will see that when you scroll-down, more info is added to the page.
                      I think that is the reason why it isn't working.
                      So I created an issue on github which is solved now.

                      #get all artwork files and put it in the correct path
                      #first test got about 42 of 162 artwork files :-(
                      #second test with improved version of gdrivedl.py gets all files :-)
                      wget -nv -O /tmp/gdrivedl.py https://raw.githubusercontent.com/matthuisman/gdrivedl/master/gdrivedl.py
                      python /tmp/gdrivedl.py https://drive.google.com/drive/folders/1sm6gdOcaaQaNUtQ9tZ5Q5WQ6m1OD2QY3 -P $HOME/RetroPie/roms/mame/artwork
                      rm /tmp/gdrivedl.py

                      ( issue is posted here and gdrivedl.py is improved, accordingly : https://github.com/matthuisman/gdrivedl/issues/12 )

                      D 1 Reply Last reply 20 Feb 2021, 22:18 Reply Quote 0
                      • D
                        DTEAM @Folly
                        last edited by DTEAM 20 Feb 2021, 22:18

                        @Folly
                        Great, I’ll try those and give you news.
                        For the artworks on google drive, if you prefer, I can split It per systems in folders

                        F 1 Reply Last reply 20 Feb 2021, 22:49 Reply Quote 0
                        • F
                          Folly @DTEAM
                          last edited by Folly 20 Feb 2021, 22:49

                          @dteam

                          I have a solution already ;-) (too bad, not the solution after all ! :-( )

                          This is the code to get all 162 files the artwork files which are then placed in the correct directory ( still testing but seems to be ok / damn stuck at 114 files ! ) :

                          wget -nv -O /tmp/gdrivedl.py https://raw.githubusercontent.com/matthuisman/gdrivedl/master/gdrivedl.py
                          curl https://drive.google.com/embeddedfolderview?id=1sm6gdOcaaQaNUtQ9tZ5Q5WQ6m1OD2QY3#list | egrep -o '(\w|-){26,}' | grep entry | sed 's/entry-//g' | while read fileid ; do python /tmp/gdrivedl.py https://drive.google.com/file/d/$fileid -P $HOME/RetroPie/roms/mame/artwork ; done
                          rm /tmp/gdrivedl.py

                          This code should be working but google drive seems to block after a while.
                          (see https://retropie.org.uk/forum/topic/29682/development-of-module-script-generator-for-lr-mess-and-mame-standalone/41 )

                          This is how it works :

                          • with https://drive.google.com/embeddedfolderview?id=1sm6gdOcaaQaNUtQ9tZ5Q5WQ6m1OD2QY3#list you can list all the files in one page.
                          • with egrep -o '(\w|-){26,}' | grep entry | sed 's/entry-//g' you filter out only the file-id's.
                          • then it uses these file-id's every time in the loop, creating a command one by one for each file.
                          D 1 Reply Last reply 21 Feb 2021, 01:03 Reply Quote 0
                          • D
                            DTEAM @Folly
                            last edited by 21 Feb 2021, 01:03

                            @folly
                            Some files are for arcade folder, is It for that you stuck at 114?

                            F 1 Reply Last reply 21 Feb 2021, 08:04 Reply Quote 0
                            • F
                              Folly @DTEAM
                              last edited by Folly 21 Feb 2021, 08:04

                              @dteam

                              There is another reason why this is not working.

                              Haha, I think I tested too much, keep getting => 403 : Forbidden.

                              Read the output of one file that I was trying.

                              Sorry...Sorry... We're sorry... ... but your computer or network may be sending automated queries. To protect our users, we can't process your request right now.

                              Can you get all the files with the code ?

                              D 1 Reply Last reply 22 Feb 2021, 13:31 Reply Quote 0
                              • D
                                DTEAM @Folly
                                last edited by DTEAM 22 Feb 2021, 13:31

                                @folly

                                #gets the cheat.7z and places it in the correct path
                                #works perfect
                                wget -N -P /tmp http://cheat.retrogames.com/download/cheat0221.zip
                                unzip -o /tmp/cheat0221.zip cheat.7z -d $HOME/RetroPie/BIOS/mame/cheat
                                rm /tmp/cheat0221.zip

                                Like you said, It works perfect. It's great

                                wget -nv -O /tmp/gdrivedl.py https://raw.githubusercontent.com/matthuisman/gdrivedl/master/gdrivedl.py

                                curl https://drive.google.com/embeddedfolderview?id=1sm6gdOcaaQaNUtQ9tZ5Q5WQ6m1OD2QY3#list | egrep -o '(\w|-){26,}' | grep entry | sed 's/entry-//g' | while read fileid ; do python /tmp/gdrivedl.py https://drive.google.com/file/d/$fileid -P $HOME/RetroPie/roms/mame/artwork ; done

                                rm /tmp/gdrivedl.pyrm /tmp/gdrivedl.py

                                I got only 38 files ( 271 Mb). I'm gonna try another run (same thing)
                                Example of Errors I had:
                                2.jpg

                                F 1 Reply Last reply 22 Feb 2021, 16:03 Reply Quote 1
                                • F
                                  Folly @DTEAM
                                  last edited by 22 Feb 2021, 16:03

                                  @dteam

                                  Thanks for trying.

                                  Basically it also says : HTTP Error 403: Forbidden.

                                  It looks like google detects it and then will blocks you for a time.
                                  ;-(

                                  I will search again for a solution on the internet.

                                  D 1 Reply Last reply 22 Feb 2021, 16:22 Reply Quote 0
                                  • D
                                    DTEAM @Folly
                                    last edited by 22 Feb 2021, 16:22

                                    @folly
                                    If I zip all those files in one file to download, and after that, you manage It on the Pi. Could It be a solution?

                                    F 2 Replies Last reply 22 Feb 2021, 17:11 Reply Quote 0
                                    • F
                                      Folly @DTEAM
                                      last edited by Folly 22 Feb 2021, 17:11

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

                                      @folly
                                      If I zip all those files in one file to download, and after that, you manage It on the Pi. Could It be a solution?

                                      If everything else fails, then we can try that ^^, but large files have other problems too solve..

                                      Whoow, I just had a full test run and all files are downloaded :-)
                                      I Basically used the sample script on this page just using 2 curl lines :
                                      https://gist.github.com/tanaikech/f0f2d122e05bf5f971611258c22c110f
                                      I injected the filenames and the file-id's from a handmade comma seperate file (.csv) into this sample script.

                                      I have to rewrite this a bit.
                                      Now I am hopefull !!!

                                      1 Reply Last reply Reply Quote 0
                                      • F
                                        Folly @DTEAM
                                        last edited by Folly 22 Feb 2021, 19:03

                                        @dteam

                                        Done rewriting.
                                        Can you test this for me ? :

                                        fileids=(); filenames=()
                                        weblist=$(curl https://drive.google.com/embeddedfolderview?id=1sm6gdOcaaQaNUtQ9tZ5Q5WQ6m1OD2QY3#list)
                                        IFS=$'\n' GLOBIGNORE='*' command eval 'fileids=($(echo $weblist | egrep -o "(\w|-){26,}" | grep entry | sed "s/entry-//g"))'
                                        IFS=$'\n' GLOBIGNORE='*' command eval 'filenames=($(echo $weblist | tr ">" "\n" | tr "<" "\n" | grep zip | grep -v application | grep -v : ))'
                                        mkdir -p $HOME/RetroPie/roms/mame/artwork
                                        cd $HOME/RetroPie/roms/mame/artwork
                                        for index in "${!filenames[@]}"; do
                                        echo downloading : ${filenames[$index]}
                                        curl -c ./.cookie -s -L "https://drive.google.com/uc?export=download&id=${fileids[$index]}" > /dev/null
                                        curl -Lb ./.cookie "https://drive.google.com/uc?export=download&confirm=`awk '/download/ {print $NF}' ./.cookie`&id=${fileids[$index]}" -o ${filenames[$index]}
                                        done
                                        cd $HOME

                                        How does it work :

                                        • create empty array's (see it as an excel column with more cell's with data)
                                        • get all data of the website and put it in the string : weblist
                                          ( using embedded folder view : http://stackoverflow.com/questions/20681974/ddg#20681975 )
                                        • IFS is used to get all data it reads, when encountering a newline (\n), and puts it in the array
                                        • sed, tr and grep commands filter the website so IFS will read the data
                                        • all data, gathered in the array's, is injected in the curl commands by the for loop
                                        D 1 Reply Last reply 22 Feb 2021, 19:20 Reply Quote 0
                                        • D
                                          DTEAM @Folly
                                          last edited by DTEAM 22 Feb 2021, 19:20

                                          @folly
                                          It running right now. It seems to be faster than the other script to get the files.
                                          new edit
                                          162 zip files + 1 cookie file ... It works !!

                                          F 1 Reply Last reply 22 Feb 2021, 20:11 Reply Quote 0
                                          37 out of 2249
                                          • First post
                                            37/2249
                                            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