RetroPie forum home
    • Recent
    • Tags
    • Popular
    • Home
    • Docs
    • Register
    • Login
    Please do not post a support request without first reading and following the advice in https://retropie.org.uk/forum/topic/3/read-this-first

    Easy way of renaming Arcade roms?

    Scheduled Pinned Locked Moved Help and Support
    arcade emulatorarcade
    26 Posts 5 Posters 7.0k 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
      dudleydes @MikeLang
      last edited by

      @MikeLang Then scraping is the answer.

      It is possible to scrape roms on a PC. You can then copy over the gamelist.xml, leaving the images on your PC.

      For example, you can download a binary for your PC's OS for Steven Selph's Scraper from https://github.com/sselph/scraper/releases/tag/v1.4.6.

      M 1 Reply Last reply Reply Quote 0
      • M
        MikeLang @dudleydes
        last edited by

        @dudleydes

        That looks like exactly the kind of thing I am after but unfortunately it's all a bit too complicated for me to grasp. I downloaded scraper_windows_386, extracted it into a folder where there is an application called scraper but don't know how to proceed.

        D 1 Reply Last reply Reply Quote 0
        • D
          dudleydes @MikeLang
          last edited by dudleydes

          @MikeLang You need to run the app from the Command Prompt - the Wiki has examples.

          The scraper_windows_386.zip is for 32-bit (older) systems. If you have a modern computer, then you will likely need the 64-bit version, scraper_windows_amd64.zip.

          You may want to take a look at the Universal XML scraper which uses a GUI instead of the command line. There are videos on YouTube on how to use the scraper.

          Here is the thread: https://retropie.org.uk/forum/topic/5291/soft-universal-xml-scraper-v2-easy-scrape-with-high-quality-picture.

          M 1 Reply Last reply Reply Quote 0
          • M
            MikeLang @dudleydes
            last edited by MikeLang

            @dudleydes

            Still not really getting how to do this. This is what I am doing, create folder called 'arcade' on c:

            Copy 20 roms into 'arcade' folder. Copy scraper.exe to 'arcade' folder and then run in command prompt.

            Get message 'It appears that thegamesdb isn't set up.'

            D 1 Reply Last reply Reply Quote 0
            • D
              dudleydes @MikeLang
              last edited by dudleydes

              @MikeLang You can try a source other TheGamesDB - Screenscraper.fr is probably considered best. Selph's scraper also needs to be run in MAME mode.

              Try the command: scraper -mame -mame_src ss

              [EDIT: changed -console-src to -mame-src]

              M 1 Reply Last reply Reply Quote 0
              • M
                MikeLang @dudleydes
                last edited by

                @dudleydes

                I typed 'scraper -mame -mame_src ss' in command prompt, just get a lot of text:

                'flag provided but not defined: -mame_scr'
                '-workers N'
                'use N worker threads to process roms. (default 1)'

                ClydeC 1 Reply Last reply Reply Quote 0
                • ClydeC
                  Clyde @MikeLang
                  last edited by

                  @MikeLang said in Easy way of renaming Arcade roms?:

                  'flag provided but not defined: -mame_scr'

                  You said you entered -mame_src, yet the error says that you entered -mame_scr (which would be wrong). Which one is the typo?

                  M 1 Reply Last reply Reply Quote 0
                  • M
                    MikeLang @Clyde
                    last edited by

                    @Clyde

                    Yep, that's what I've done, typed it wrong. It's working now but the gamelist.xml it generates has a synopsis of the game. I only want these bits:

                    <game>
                    <path>./Gamename.zip</path>
                    <name>Game Name</name>
                    </game>

                    If that is possible. Really appreciating all the help.

                    D 1 Reply Last reply Reply Quote 0
                    • D
                      dudleydes @MikeLang
                      last edited by dudleydes

                      EDIT: Ignore - please see @mitu's suggestion below.

                      @MikeLang You can use the sed command. This is a Linux command so it will have to be done on your Pi. I recommend that you use SSH so that the command can copied and pasted.

                      First, use cd to change the directory to the one containing your gamelist.xml file, then run:

                      sed '/<desc>\|<image>\|<rating>\|<releasedate>\|<developer>\|<publisher>\|<genre>\|<players>/d' gamelist.xml
                      

                      This command will output to the terminal what the amended version of gamelist.xml will look like.

                      If you're happy, then you can run the command below to commit the changes. This will overwrite your gamelist.xml file so good idea to keep a copy of the the original.

                      sed -i '/<desc>\|<image>\|<rating>\|<releasedate>\|<developer>\|<publisher>\|<genre>\|<players>/d' gamelist.xml
                      

                      The only concern is when the <desc> entry runs for more than one paragraph. The sed will not catch the second and subsequent paragraphs. There's probably a way to include these but I don't know of any.

                      Extra paragraphs will make the XML file invalid as it will have unmatched tags and ES may not load. The extra paragraphs can be manually deleted in a text editor searching for </desc> string.

                      mituM M 2 Replies Last reply Reply Quote 0
                      • mituM
                        mitu Global Moderator @dudleydes
                        last edited by

                        @dudleydes It's easier with xmlstarlet:

                        xmlstarlet ed -d '//game/desc' gamelist.xml
                        

                        will delete all desc child nodes of the game node. Repeat for any other tag you'd like removed (favorite/image/video/etc.).

                        D 1 Reply Last reply Reply Quote 1
                        • M
                          MikeLang @dudleydes
                          last edited by

                          @dudleydes said in Easy way of renaming Arcade roms?:

                          First, use cd to change the directory to the one containing your gamelist.xml file, then run:

                          Already stuck, running putty, don't know how to change directory from 'pi@retropie:/ $' to:

                          \RETROPIE\configs\all\emulationstation\gamelists\arcade\gamelist

                          D ClydeC 2 Replies Last reply Reply Quote 0
                          • D
                            dudleydes @mitu
                            last edited by

                            @mitu Thank you.

                            The command below will give a preview of amended gamelist.xml:

                            xmlstarlet ed -d '//game/desc | //game/image | //game/releasedate | //game/rating  | //game/developer  | //game/publisher | //game/genre  | //game/players' gamelist.xml
                            

                            To write changes, add --inplace as below:

                            xmlstarlet ed --inplace -d '//game/desc | //game/image | //game/releasedate | //game/rating  | //game/developer  | //game/publisher | //game/genre  | //game/players' gamelist.xml
                            
                            M 1 Reply Last reply Reply Quote 0
                            • D
                              dudleydes @MikeLang
                              last edited by

                              @MikeLang Try

                              cd /opt/retropie/configs/all/emulationstation/gamelists/arcade
                              

                              After this command, run ls to check gamelist.xml is there.

                              1 Reply Last reply Reply Quote 0
                              • ClydeC
                                Clyde @MikeLang
                                last edited by Clyde

                                @MikeLang said in Easy way of renaming Arcade roms?:

                                Already stuck, running putty, don't know how to change directory from 'pi@retropie:/ $' to:

                                \RETROPIE\configs\all\emulationstation\gamelists\arcade\gamelist

                                Just an addition to @dudleydes' post: Windows uses backslashes (\) as directory dividers. The official Retropie image is running on Linux, which uses slashes as directory dividers (/).

                                1 Reply Last reply Reply Quote 0
                                • M
                                  MikeLang @dudleydes
                                  last edited by

                                  @dudleydes said in Easy way of renaming Arcade roms?:

                                  @mitu Thank you.

                                  The command below will give a preview of amended gamelist.xml:

                                  xmlstarlet ed -d '//game/desc | //game/image | //game/releasedate | //game/rating  | //game/developer  | //game/publisher | //game/genre  | //game/players' gamelist.xml
                                  

                                  That's not giving me a full preview of gamelist, I'm getting something like this:

                                  gamelist.xml:1697.16: xmlParseEntityRef: no name
                                  <name>Game name</name>
                                  ^
                                  gamelist.xml:1889.17: xmlParseEntityRef: no name
                                  <name>Game name 2</name>
                                  ^

                                  The original command 'sed '/<desc>|<image>|<rating>|<releasedate>|<developer>|<publisher>|<genre>|<players>/d' gamelist.xml' is giving a fuller list but has entry run issues as you mentioned.

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

                                    @MikeLang You'll have to be more specific, maybe you can upload your final gamelist.xml somewhere so we can check.

                                    1 Reply Last reply Reply Quote 0
                                    • M
                                      MikeLang
                                      last edited by

                                      I know why I was getting that weird error now, it was related to having '&' in the name of a game. My example didn't help matters seeing as I didn't type '&'.

                                      The list it generates still doesn't have the games I haven't picked, for example say the arcade rom folder has 300 games and the gamelist.xml file lists 200 roms. There's still 100 games that I have to manually pick in order for them to appear in the gamelist.xml file.

                                      Thanks for all the help everyone I've learned a great deal from all your input.

                                      1 Reply Last reply Reply Quote 0
                                      • First post
                                        Last post

                                      Contributions to the project are always appreciated, so if you would like to support us with a donation you can do so here.

                                      Hosting provided by Mythic-Beasts. See the Hosting Information page for more information.