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

    Cross-Ref over emulators and romdirs?

    Scheduled Pinned Locked Moved Ideas and Development
    emulatorsfoldersxref
    6 Posts 2 Posters 440 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.
    • LolonoisL
      Lolonois
      last edited by

      I know [1] and the accompanied script admin/stats.sh but is there already a script which does create a cross-reference between which folder below ~/RetroPie/roms/ is utilized by which emulator?

      If not it is not a big deal to create such x-ref, I just want to save some cycles / do not want to reinvent the wheel.

      I need the x-ref for another topic I am working on.

      TIA

      [1] https://retropie.org.uk/stats/pkgflags/

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

        No, there's no cross-reference.

        EDIT: to expand a bit.
        The association is done in each scriptmodule, by using addSystem during the configure phase (we're excluding ports which have a single folder). So you can search each scriptmodule for addSystem and - with some text manipulation - get a list of links (emulator -> systems). However, the issue is that some emulators supporting more than 1 system have parametrized this call so instead of of

        addSystem "snes"
        

        you'll see

        for system in "arcade dreamcast x1"; do
          addSystem "$system"
        done
        

        which doesn't work anymore with the approach above.

        1 Reply Last reply Reply Quote 0
        • LolonoisL
          Lolonois
          last edited by

          Et voilĂ  ! [1] Code could be more elegant, but it does the trick. Comments/corrections welcomed.

          Thanks for your extra hints, @mitu .

          [1] https://gist.github.com/Gemba/410710b53be04a9de16d190b988eca56

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

            Nice. Now make it a one-liner :).

            LolonoisL 1 Reply Last reply Reply Quote 0
            • LolonoisL
              Lolonois @mitu
              last edited by

              Maybe this way around: As the information is dug up now. Why not adding an extra rp_module_systems to the scriptmodules properties which holds the folders/systems? That way the code for creating the xref could be reduced drastically.

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

                That may not be a bad idea.

                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.