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

    2 retroarch configs for 1 emulator?

    Scheduled Pinned Locked Moved Help and Support
    retropieretroarchconfigs
    11 Posts 3 Posters 642 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.
    • S
      Steaz
      last edited by

      hi.

      i have a 7" LCD screen connect with my raspberry and 1 1080p TV.

      on the 7" LCD i want different aspect ratio as the tv. (example for the core PCSX-rearmed) 1 retroarch config works great with the lcd. but when i put my raspberry on the tv and go under retroarch -> Configuration -> save new config file and will load the new config file, they dont have the PCSX-rearmed core and i cant change anything.

      what i make wrong?

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

        What do you mean by 'don't have the core' ? What do you expect to find ?

        S 1 Reply Last reply Reply Quote 0
        • S
          Steaz @mitu
          last edited by Steaz

          @mitu i mean the emulator core

          this is when i normally start the PSX rom and the retroarch.cfg loaded

          Bild Text

          this is when i load the new config that i saved

          Bild Text

          bottom left "no core"

          i think it means the emulator PCSX

          in "/opt/retropie/configs/psx" the "emulator.cfg" is a entry "--config /opt/retropie/configs/psx/retroarch.cfg %ROM%"

          how do I make psx aware of the new second config? or I am thinking completely wrong?

          i aspect a new retroarch configuration with this config, to load it when i put my rasp on the tv

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

            @Steaz said in 2 retroarch configs for 1 emulator?:

            how do I make psx aware of the new config? or I am thinking completely wrong?

            You can load the pcsx core with the Load Core menu option, although I'm not so sure what you're trying to accomplish - i.e. what RA settings you want to keep depending on the screen you use.
            It would be easier to have a global retroarch.cfg for each screen, then switch between each .cfg whenever you're using the screen.

            S 1 Reply Last reply Reply Quote 0
            • S
              Steaz @mitu
              last edited by Steaz

              @mitu i want play all retropie games on the 7" screen in 16:9, with specific shaders. it is saved in the retroarch.cfg in the specially emulator folder.

              when i put my raspberry on a 1080p screen, i want load shaders, overlays and specific aspect ratio. so it would nice to have 2 retroarch configs, then i can load when i put my raspberry on my TV or i load the config to play in 16:9 on the 7" screen. manually changes are too expensive.

              idk how i configure this with the retroarch configs for 1 emulator.

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

                @Steaz You can load another cfg in RetroArch's Main Menu (your second screenshot) under Configurations -> Load Configuration.

                Another idea could be a script that queries the current video mode via tvservice -s and then copies the suitable cfg to the emulator's retroarch.cfg location prior to launching RetroArch. How to write and include such a script, alas, I cannot help you with. My knowledge about scripting and RetroPie is too limited for that. I'll leave it here as an impulse for others.

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

                  @clyde is on to something :). Here's an example on how to do that, based on what tvservice detects https://retropie.org.uk/forum/topic/17558/command-execution-when-hdmi-or-composite-is-detected.
                  Of course, you can also add the 2 scripts (.sh) under the retropie rom folder so you can execute them from ES and switch the .cfg files. Something like

                  • Switch to LCD - copy the retroarch.cfg file for the LCD over the default one.
                  • Switch to TV - copy the retroarch.cfg file for the TV and make it default.
                  ClydeC 1 Reply Last reply Reply Quote 1
                  • S
                    Steaz @Clyde
                    last edited by Steaz

                    @mitu @Clyde i have written 2 scritps now. for 16:9 resolution called "resolution_16-9.sh"and for 4:3 with overlay called "resolution_oldschool.sh"

                    this configs remove first all retroarch.cfg from the specially emulator and copy after that the right retroarch.cfg into it

                    resolution_16-9.sh:

                    #!/bin/bash
                    echo "change retroarch configs"
                    rm -f /opt/retropie/configs/psx/retroarch.cfg
                    rm -f /opt/retropie/configs/n64/retroarch.cfg
                    rm -f /opt/retropie/configs/nes/retroarch.cfg
                    rm -f /opt/retropie/configs/snes/retroarch.cfg
                    rm -f /opt/retropie/configs/gb/retroarch.cfg
                    rm -f /opt/retropie/configs/gbc/retroarch.cfg
                    rm -f /opt/retropie/configs/gba/retroarch.cfg
                    cp /opt/retropie/oldschool_16-9/16-9/psx/retroarch.cfg /opt/retropie/configs/psx/
                    cp /opt/retropie/oldschool_16-9/16-9/n64/retroarch.cfg /opt/retropie/configs/n64/
                    cp /opt/retropie/oldschool_16-9/16-9/nes/retroarch.cfg /opt/retropie/configs/nes/
                    cp /opt/retropie/oldschool_16-9/16-9/snes/retroarch.cfg /opt/retropie/configs/snes/
                    cp /opt/retropie/oldschool_16-9/16-9/gb/retroarch.cfg /opt/retropie/configs/gb/
                    cp /opt/retropie/oldschool_16-9/16-9/gbc/retroarch.cfg /opt/retropie/configs/gbc/
                    cp /opt/retropie/oldschool_16-9/16-9/gba/retroarch.cfg /opt/retropie/configs/gba/
                    echo "done"
                    

                    resolution_oldschool.sh:

                    #!/bin/bash
                    echo "change retroarch configs"
                    rm -f /opt/retropie/configs/psx/retroarch.cfg
                    rm -f /opt/retropie/configs/n64/retroarch.cfg
                    rm -f /opt/retropie/configs/nes/retroarch.cfg
                    rm -f /opt/retropie/configs/snes/retroarch.cfg
                    rm -f /opt/retropie/configs/gb/retroarch.cfg
                    rm -f /opt/retropie/configs/gbc/retroarch.cfg
                    rm -f /opt/retropie/configs/gba/retroarch.cfg
                    cp /opt/retropie/oldschool_16-9/oldschool/psx/retroarch.cfg /opt/retropie/configs/psx/
                    cp /opt/retropie/oldschool_16-9/oldschool/n64/retroarch.cfg /opt/retropie/configs/n64/
                    cp /opt/retropie/oldschool_16-9/oldschool/nes/retroarch.cfg /opt/retropie/configs/nes/
                    cp /opt/retropie/oldschool_16-9/oldschool/snes/retroarch.cfg /opt/retropie/configs/snes/
                    cp /opt/retropie/oldschool_16-9/oldschool/gb/retroarch.cfg /opt/retropie/configs/gb/
                    cp /opt/retropie/oldschool_16-9/oldschool/gbc/retroarch.cfg /opt/retropie/configs/gbc/
                    cp /opt/retropie/oldschool_16-9/oldschool/gba/retroarch.cfg /opt/retropie/configs/gba/
                    echo "done"
                    

                    there are in the folder "/home/pi/RetroPie/retropiemenu" so i can load it any time in emulationstation.

                    for automatic detect hdmi or lcd and setup automatically the resolution to 16-9 (if the raspberry is on the lcd) or to 4:3 with overlays (if the raspberry on hdmi), i have used the code from @matchaman in the link that mitu posted.

                    if (/usr/bin/tvservice -s | /bin/egrep 'HDMI|DVI') ; then
                    bash /home/pi/RetroPie/retropiemenu/resoultion_oldschool.sh
                    else
                    bash /home/pi/RetroPie/retropiemenu/resolution_16-9.sh
                    fi
                    

                    this code i put in "/etc/profile.d/10-retropie.sh" to load this on boot
                    (idk why this code not works in the rc.local config.)

                    so after that I came across a new problem. when i put my rasp on the hdmi, i must add in the "/boot/config.txt" first the command "ignore_lcd=1" to show a response on the tv.
                    when i put my rasp on the lcd, i must change the command "ignore_lcd=1" in "display_rotate=2".

                    so i have created 2 config files for hdmi and lcd, and wrote a script that i can load in the retropie menü.

                    ChangeToHDMI.sh:

                    echo "change boot.cfg"
                    sudo rm -f /boot/config.txt
                    sudo cp /boot/config_hdmi.txt /boot/config.txt
                    sudo reboot
                    

                    ChangeToLCD.sh:

                    echo "change boot.cfg"
                    sudo rm -f /boot/config.txt
                    sudo cp /boot/config_lcd.txt /boot/config.txt
                    sudo reboot
                    

                    soo.....to wait if the rasp started and i can load the cfg (for example hdmi )and it restarted with the correct boot/config.txt is rly annoying.
                    so i tryed to load this scripts on boot and put this code in the rc.local config (without the reboot command at the end):

                    if (/usr/bin/tvservice -s | /bin/egrep 'HDMI|DVI') ; then
                    bash /boot/ChangeToHDMI.sh
                    else
                    bash /boot/ChangeToLCD.sh
                    fi
                    
                    

                    but it didnt work on boot :/

                    any ideas? would be great :)

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

                      @Steaz said in 2 retroarch configs for 1 emulator?:

                      but it didnt work on boot :/

                      Any changes to config.txt require a reboot, so your scripts to switch the config.txt will not have any effect without rebooting the Pi.

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

                        @Steaz Just a thing I noticed: Removing the cfg files beforehand shouldn't be necessary, as cp overwrites any existing file by default.

                        S 1 Reply Last reply Reply Quote 0
                        • S
                          Steaz @Clyde
                          last edited by

                          @Clyde yeah it worked without the remove command. ty :)

                          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.