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

    Per System (es_systems.cfg) pre & post commandline

    Scheduled Pinned Locked Moved Ideas and Development
    240pscartcomponentessystems.cfgbash
    5 Posts 2 Posters 1.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.
    • V
      vykyan
      last edited by vykyan

      Hi all,

      AFAIK there's no way to run a script before booting a system or after.

      I would humbly ask for a /prerunscript and a /postrunscript to be added/read in es_systems.cfg

      For example;

      <system>
      <fullname>Sega Game Gear</fullname>
      <name>gamegear</name>
      <path>~/RetroPie/roms/gamegear</path>
      <extension>.gg .GG</extension>
      <command>/opt/retropie/emulators/osmose-0.8.1+rpi20121122/osmose %ROM% -joy -tv -fs</command>
      <platform>gamegear</platform>
      <theme>gamegear</theme>
      <prerunscript>/path/to/BeforeEmulation_SegaGameGear.sh</prerunscript>
      <postrunscript>/path/to/AfterEmulation_EmulationStation.sh</postrunscript>

      </system>

      I can find many reasons for this but my reason to ask is to support the RGB-Pi and RetroTINK Raspberry Pi hats that output to SCART / Component to original CRT TV's.

      They adjust the HDMI_Timings to match the original system, so it matches the output from the original system, timing and all.

      I could request this via RetroArch but its probably easier to implement in the runcommand script :)

      (I'd ask for in future maybe a MAME/FB Alpha per game prescript, but i'd be more than grateful for the Console Systems for now)
      Actually if the scripts could be passed the rom parameter, we could take care of the per game code in the script. (even if the console scripts probably wouldn't use it, the mess/mame/fb alpha/psx cores could and the ones that don't need it can just ignore it)

      so the actual command would look like;

      /path/to/BeforeEmulation_SegaGameGear.sh AlexKidd.zip
      or
      /path/to/BeforeEmulation_FBAlpha.sh sfa2

      People could even downclock their pies per core to save heat/power etc.

      Thank you for reading,

      Kind Regards,

      Vyk

      V mediamogulM 2 Replies Last reply Reply Quote 0
      • V
        vykyan @vykyan
        last edited by

        I kept getting blocked, but pass whatever the rom on the commandline is, let the script filter it for its needs for the system

        if the romfile parameter is sfa2 pass that
        is the romfile parameter is /mnt/hdd/Super Mario Kart.zip

        etc let the script writers deal with it. (To make your lives easier!)

        1 Reply Last reply Reply Quote 0
        • mediamogulM
          mediamogul Global Moderator @vykyan
          last edited by

          @vykyan

          Would the runcommand-onstart.sh and runcommand-onend.sh scripts detailed here handle what you need?

          RetroPie v4.5 • RPi3 Model B • 5.1V 2.5A PSU • 16GB SanDisk microSD • 512GB External Drive

          V 1 Reply Last reply Reply Quote 2
          • V
            vykyan @mediamogul
            last edited by

            @mediamogul

            Oh wow, thank you mediamogul! I knew about those scripts but didn't realise there was anything passed to them :/

            Will need to make a IF system equals script but I can do that, save you guys to work on more important stuff

            Really sorry about not RTFM :S

            Thanks a heap, MediaMogul and again, I apologise.

            mediamogulM 1 Reply Last reply Reply Quote 0
            • mediamogulM
              mediamogul Global Moderator @vykyan
              last edited by

              @vykyan

              No problem. Glad it helped.

              RetroPie v4.5 • RPi3 Model B • 5.1V 2.5A PSU • 16GB SanDisk microSD • 512GB External Drive

              1 Reply Last reply Reply Quote 1
              • 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.