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

    Extract region of games via command line

    Scheduled Pinned Locked Moved General Discussion and Gaming
    regionspalntscregion
    6 Posts 4 Posters 539 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.
    • T
      thomas327
      last edited by thomas327

      I have a bunch of PAL and NTSC games mixed. Now I read that NTSC is preferred because of the higher frame rate. Is there a command line compatible emulator that I can use to lookup the region of a game? E.g.: <emulator_name> "super mario 3.nes" --info | grep region. In that way I can write a script to filter out the PAL verions which I then can replace with NTSC versions (if available).

      SuperFromNDS Lister of SmegL 2 Replies Last reply Reply Quote 0
      • SuperFromNDS
        SuperFromND @thomas327
        last edited by SuperFromND

        @thomas327 I don't believe such an emulator exists, unfortunately. If your ROMs are consistently labelled (i.e. they use a No-Intro system of filename, like Video Game (USA).exm) then you could probably use something like:

        ls | grep ".*Europe.*"
        

        This should list all files that end in "Europe", which would match ROMs named stuff like "Cooler Game (Europe).exm". It might be theoretically possible to write a program to auto-detect the region of a given ROM by looking at its raw hex data for a region code, but it would only work on a per-system basis as region specification varies wildly from console to console, assuming that information is in the ROM in the first place.

        ▲▼▲▼▲▼▲▼▲▼
        IKEMEN Go
        SRB2Kart
        ▼▲▼▲▼▲▼▲▼▲

        1 Reply Last reply Reply Quote 0
        • T
          thomas327
          last edited by thomas327

          Thanks for the info! Most games do not have the region included in their name, so I cannot just look at the file names. Using a hex reader sounds interesting, but that would be too much of an effort. Nevertheless it's a cool idea! :-)

          T 1 Reply Last reply Reply Quote 0
          • windgW
            windg
            last edited by

            You can take the hash of the rom and compare it with a database. For example this site : http://redump.org/ have the hashes of the games of a lot disk systems.

            My English isn't at a good level.

            1 Reply Last reply Reply Quote 0
            • Lister of SmegL
              Lister of Smeg @thomas327
              last edited by

              @thomas327 It's probably quicker to search for 1G1R (1game 1rom) sets which are usually filtered preferring NTSC roms
              or you can learn how to do it yourself by downloading xml dats from No-Intro's DAT-o-MATIC and running them through clrmamepro
              plenty of tutorials on the web detailing how to do this

              1 Reply Last reply Reply Quote 0
              • T
                thomas327 @thomas327
                last edited by

                @windg said in Extract region of games via command line:

                You can take the hash of the rom and compare it with a database. For example this site : http://redump.org/ have the hashes of the games of a lot disk systems.

                Unfortunately that site does not have retro games listed. Only PSX, Dreamcast and up. However the m5 hash approach gave me an idea: I can download a rom pack and compare my roms to the ones from the pack. Thanks for your helpful answer! :-)

                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.