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

    From where is retroarch.cfg seeded?

    Scheduled Pinned Locked Moved Help and Support
    retroarch.cfgdefault
    5 Posts 2 Posters 972 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
      daubsi
      last edited by daubsi

      I am using RetroPi 4.8.2 on a RPI3b with RetroArch v1.10.0
      Years ago I created a customized retroarch.cfg for my cores without understanding in detail how the whole mechanism of config "overlaying" (global <-core -< game) worked but just copied my final retroarch.cfg to every core config directory, basically having a core specific override what would better be a global config now that I understand the concept.

      OK, now I tried to clean this up a little bit.
      I started deleting the /opt/retroarch/config/megadrive/retroarch.cfg file for example and put what was my specific configfile into /opt/retroarch/config/all/retroarch.cfgto use this as a global config file.

      When I now first ran the Megadrive core the screen shows Saved new config to /opt/retroarch/config/megadrive/retroarch.cfg.

      So far, so good. But I couldn't play.
      It turned out that all the keybindings (I use an ipac2 in keyboard mode) were lost.

      I checked the config/all/retroarch.cfg again, and there everything was properly set.

      The "new" config must have been seeded by another default config file it seems. So I started looking in my system where that would be. Another file with exactly this filesize wasn't found, so I searched for a concrete setting which is different in my file and in the newly generated config, e.g. input_player1_start = "enter". I found that particular setting in those locations:

      pi@retropie:/opt/retropie $ find . -type f -exec grep -l 'input_player1_start = "enter"' {} \;

      ./configs/megadrive/retroarch.cfg ./configs/all/retroarch.cfg.rp-dist ./emulators/retroarch/etc/retroarch.cfg ./emulators/retroarch/retroarch.cfg
      Howevery the one in the megadrive directory was about 106k and all the others of the same size of about 31k.

      Ok, so I started changing one by one of those "default"(?) files by settings "escape" instead of "enter" for this value, removing the megadrive/retroarch.cfg config every time before starting the core and hoping that eventually "escape" would also turn up in my megadrive\retroarch.cfg file.

      But no matter where I changed that value, the newly generated config in megadrive\retroarch.cfg always still had the default value of "enter" for that key and not "escape".

      Where is this initial configuration coming from? And why is retroarch generating a core specifc configuration AT ALL on the first run? I thought it would only do so, when I explicitly changed the confguration while a core was loaded and I'd do a Save configuration now?

      Am I missing something? Is there a config setting which forces the generation of a core specific retroarch.cfg on the first run and where is this default config coming from?

      BuZzB 1 Reply Last reply Reply Quote 0
      • BuZzB
        BuZz administrators @daubsi
        last edited by BuZz

        @daubsi You shouldn't delete /opt/retropie/configs/megadrive/retroarch.cfg without re-installing a megadrive emulator after. We include a default config which includes the global retroarch configuration (from /opt/retropie/configs/all/retroarch.cfg).

        If you remove the megadrive retroarch configuration and then run a megadrive emulator RetroArch will create a new configuration with it's defaults and that will contain incorrect paths and other settings.

        the default config for /opt/retropie/configs/megadrive/retroarch.cfg is

        # Settings made here will only override settings in the global retroarch.cfg if placed above the #include line
        
        input_remapping_directory = "/opt/retropie/configs/megadrive"
        
        #include "/opt/retropie/configs/all/retroarch.cfg"
        

        (I assume you mean /opt/retropie not /opt/retroarch in your post - i copy and pasted some paths and then realised so have corrected my post)

        To help us help you - please make sure you read the sticky topics before posting - https://retropie.org.uk/forum/topic/3/read-this-first

        D 2 Replies Last reply Reply Quote 0
        • D
          daubsi @BuZz
          last edited by

          @BuZz Thank you, I will "reset" all my past then overwritten core-specific retroarch.cfg conf files then. Could you please tell me where that "default config" is taken from? I couldn't figure out where it is seeded/loaded from? Is it maybe stored within the retroarch binary itself and dumped to disk then?

          1 Reply Last reply Reply Quote 0
          • D
            daubsi @BuZz
            last edited by

            @BuZz I've noticed there is a retroarch.cfg.rp-dist file in every core's config directory. So this is the "dist"/default variant of the retroarch.cfg with exactly that content you showed above.

            So I would now go in every core config directory and do a

            cp retroarch.cfg.rp-dist retroarch.cfg

            there, correct?

            (I assume you mean /opt/retropie not /opt/retroarch in your post - i copy and pasted some paths and then realised so have corrected my post)

            That's correct, sorry for the mixup

            BuZzB 1 Reply Last reply Reply Quote 0
            • BuZzB
              BuZz administrators @daubsi
              last edited by

              @daubsi Yes. The .rp-dist files are created when an emulator is installed or updated and the default config has been changed (as it won't overwrite your custom config).

              To help us help you - please make sure you read the sticky topics before posting - https://retropie.org.uk/forum/topic/3/read-this-first

              1 Reply Last reply Reply Quote 0
              • D daubsi referenced this topic on
              • S sleve_mcdichael referenced this topic on
              • 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.