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

    Exclude a system from runcommand-onstart

    Scheduled Pinned Locked Moved Help and Support
    runcommandcrt tvkodi
    5 Posts 3 Posters 595 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.
    • Y
      youxia
      last edited by

      I connect my Pi to a CRT TV via composite. To obtain 240p I use a simple runcommand-onstart/onend

      "tvservice -c "NTSC 4:3 P" ; fbset -depth 8 ; fbset -depth 32;  tvservice -s"  ONSTART
      "tvservice -c "NTSC 4:3" ; fbset -depth 8 ; fbset -depth 32;  tvservice -s"  ONEND
      

      This puts a system in the 240p mode and then brings it back to 480i for Emulationstation on quitting. It works great for all my emus, but now I would like to watch something on Kodi in 480i, without going into 240p.

      Is there any way to modify this "script" so it recognises Kodi on launch and does not go into 240p mode ("NTSC 4:3 P")?

      My system is RPi 3B+ 4.4 RetroPie from official image

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

        @youxia The onstart has some parameters sent - see OnStart parameters - which you can use to determine whether you should be running the commands you're using. I'd suggest testing explicitly for the system's name and running the resolution switching commands only for the needed systems.

        Y 1 Reply Last reply Reply Quote 0
        • Y
          youxia @mitu
          last edited by

          @mitu Sorry, I think you misunderstood. This setup works fine as it is, because all the systems I'm interested in require 240p. All but Kodi, what with films belonging to the 480i family.

          Therefore, what I'd like to happen is for runcommand-onstart to bypass Kodi somehow - or give it the "NTSC 4:3" parameter - by means of scripting magic. Since my knowledge of scripting is nil, I'm asking here. I'd imagine something along the lines of "IF $1="kodi THEN DoNothing" or "IF $1="kodi THEN tvservice -c "NTSC 4:3" ; fbset -depth 8 ; fbset -depth 32; tvservice -s"

          1 Reply Last reply Reply Quote 0
          • Y
            youxia
            last edited by

            So I get Kodi to start in 480i by disabling runcommand-onstart by SSH. But it's such an inelegant method.
            Bumping in hope perhaps somebody knows how to write a script to exclude one system from runcommand.

            1 Reply Last reply Reply Quote 0
            • K
              kcorcoran
              last edited by

              bumping this one myself as I'm trying to do the exact same thing.

              i tried if, then, fi but i'm a total script noob so i'm sure my syntax is crap

              trying to achieve the following

              onstart
              if system = "system name"
              then do-a-thing
              fi

              anyone that can help?

              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.