• Recent
  • Tags
  • Popular
  • Home
  • Docs
  • Register
  • Login
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

[SOLVED] Cannot invoke my PAL60 script (tweakvec.py) through runcommand-onstart

Scheduled Pinned Locked Moved Help and Support
runcommandpalcrtsolved
5 Posts 2 Posters 943 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.
  • F
    FroyoXSG
    last edited by FroyoXSG 5 Sept 2021, 14:52 2 May 2021, 19:48

    SOLUTION HERE

    Hi,

    PAL60 is an SDTV mode that has NTSC geometry but uses PAL color sync.
    There is a python-based tool called tweakvec that allows you to switch the Raspberry Pi's 3.5mm Composite output to PAL60. The user first has to use tvservice -c "NTSC 4:3" for 480i or tvservice -c "NTSC 4:3 P" for 240p, and then calls sudo python3 /home/pi/tweakvec/tweakvec.py --preset PAL60 to switch the color sync to PAL.

    Now I've been trying to integrate this into my RetroPie setup, but can't get this working.
    What does work:

    • calling tweakvec from autostart.sh. EmulationStation runs in PAL60.
    • calling tweakvec from runcommand-onend.sh; ES will be set to PAL60 again.

    The part that fails is calling tweakvec from runcommand-onstart.sh. I let RetroPie handle switching to NTSC 4:3 and NTSC 4:3 P normally through the videomodes.cfg file. But the tweakvec call doesn't work for some reason. My emulators (all libretro), will be in the right NTSC mode, but not with PAL color sync.
    I can call tweakvec through SSH, which will switch the color sync for me; note that tweakvec will not cause a crash or black screen here. It can be run while the emulator is running.
    However of course, SSH'ing into the Pi each time is not something I want to do.

    I also tried adding my tweakvec command into /opt/retropie/supplementary/runcommand/runcommand.sh manually, on a new line in the if block where it says $TVSERVICE -c "${mode_id[*]}" >/dev/null, but that also doesn't work, leading me to believe that this is something in the RetroPie script chain that I don't know about.

    If anyone knows what I can do here, please share your knowledge.

    Pi Model or other hardware: 3B+
    Power Supply used: official
    RetroPie Version Used: 4.7.12
    Built From: Pre made SD Image on RetroPie website
    USB Devices connected: Logitech K400+, DualShock 4, USB sound card (to separate audio from composite video)
    Controller used: DualShock 4
    Error messages received: -
    Verbose log (if relevant): -
    Guide used: No
    Emulator: lr-*

    1 Reply Last reply Reply Quote 0
    • M
      mitu Global Moderator
      last edited by 3 May 2021, 15:59

      @froyoxsg said in Cannot invoke my PAL60 script (tweakvec.py) through runcommand-onstart:

      The part that fails is calling tweakvec from runcommand-onstart.sh. I let RetroPie handle switching to NTSC 4:3 and NTSC 4:3 P normally through the videomodes.cfg file.

      The runcommand-onstart.sh commands are run before any mode switching (via tvservice) occurs. If the script relies on a certain TV mode to be set, you cannot use it in conjunction with the runcommand's video mode switching.

      F 1 Reply Last reply 3 May 2021, 18:36 Reply Quote 1
      • F
        FroyoXSG @mitu
        last edited by FroyoXSG 5 Mar 2021, 19:40 3 May 2021, 18:36

        @mitu I suspected as much! Good to have confirmation. Any call to tvservice -c will throw out tweakvec's color sync overrides.
        Do you have an explanation why it doesn't work from the main runcommand.sh either?

        This morning, I remembered that I can dump the command output with a > operator, so I'll check for that when I have time. Will also check if I can somehow schedule the actual call 30 seconds into the future or so. I think that will work in the end.

        M 1 Reply Last reply 4 May 2021, 02:46 Reply Quote 0
        • M
          mitu Global Moderator @FroyoXSG
          last edited by 4 May 2021, 02:46

          @froyoxsg said in Cannot invoke my PAL60 script (tweakvec.py) through runcommand-onstart:

          Do you have an explanation why it doesn't work from the main runcommand.sh either?

          Not sure where you actually added that line in runcommand, but since it's not going to play well with runcommand's usage of tvservice, I'd recommend you use the onstart script for the necessary commands (tvservice and tweakvc).

          1 Reply Last reply Reply Quote 1
          • F
            FroyoXSG
            last edited by 9 May 2021, 13:51

            Righto, here's the solution for everyone who wants to let RetroPie handle NTSC/ NTSC progressive modes but then switch to the PAL60 equivalent:
            Put this into runcommand-onstart.sh:

            (sleep 15 && sudo /home/pi/tweakvec/tweakvec.py --preset PAL60) &
            

            If it doesn't work for your Pi, try sleeping a bit longer. On my Pi3, 15 seconds seems like the sweet spot.

            1 Reply Last reply Reply Quote 0
            5 out of 5
            • First post
              5/5
              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.

              This community forum collects and processes your personal information.
              consent.not_received