[SOLVED] Swap from lcd to full size screen (both via hdmi port)
-
@caver01 thanks. It's nice to see someone that doesn't think I'm telling bullshit. (By the way, your 4-player cocktail case is fantastic)
The problem here is that I doubt something like this will be seriously implemented in an official release because it could be considered too peculiar.
If I was a programmer myself I would definitely try it. If someone will help me, I will think of a small reward. -
I'm also occasionally swapping between a 4:3 lcd for dev, and 16:9 for playing, and yes, I didn't realize at first how many issues are involved with this.
I've started to play around with putting together a couple scripts that I run with an alias to swap my settings between lcd and hdmi. I would love to automate this to a startup script, that would do a simple check for current input, and then swap configs if needed.
I'm still wading through all of the various config files that are being affected, aside from the /boot/config.txt that you mentioned.
- At the basic level, this script would run a 'tvservice -n' command to check if the current display is either in DMT or CEA modes.
- If there isn't a change in current mode, continue.
- If there is a change, then copy the appropirate config_lcd.txt or config_hdmi.txt to /boot/config. Probably make a backup to be safe.
- Copy the appropriate retroarch.cfg files for either lcd or hdmi (change resolutions, audio output modes hdmi<->headphone jack.
- Reboot the Pi.
Anyways, that's the current idea. For now, I'm just running an alias that essentially does the config.txt part, and working through all of the various configs outside of the /boot/config.txt.
Cheers,
Howitzer -
@Howitzer99 yes, nice idea. In my wildest dream it would be even more spartan in the sense that I start from the basic idea that I already know both resolutions for both screens.
So I could jump over the tvservice part.
Something like:(From Retropie and therefore simply using the D-Pad)
START-->"SWAP CONFIG"-->"MODE A (config_lcd.txt)" or "MODE B (config_tv.txt)"--> rewriting config.txt -->reboot systemThis would solve all of my problems...
-
I don't have my RetroPie hooked up right now, but if you look in your front-end's config section (EmulationStation or Attract Mode), there are pre-existing scripts for rebooting and powering-down the system. Maybe look at one of these and see if its possible to use this approach to run the config script. You should be able to have two scripts to swap the config files and force a reboot (to/from hdmi). I haven't spent a lot of time setting up custom hotkeys, but maybe you could map these scripts to a joypad button combo?
-
@sahelX Without really modifying anything, I think you could write a bash script that copies a saved configA.txt over top of config.txt, then issues a reboot command. Make another that copies configB. Then, drop these scripts into the ROM folder for Ports. They would show up as "Ported" game titles, but you would know they are your scripts. Then, you simply D-pad over to Ports (your menu of scripts, essentially) and select the config you want. It copies, reboots, and you are back in business.
There may be other systems/emulators defined in ES that would allow this, but I think Ports recognizes a .sh file as a "rom" so to speak. Maybe they could also live in the RetroPie menu too. I dunno. The point is, you can leverage the existing menu list functionality, only instead of launching ROMs you are launching your scripts.
-
@caver01 this is genius! Masquerading script as ports would also be good for the simple use I plan. The only problem is that I really never ever programmed anything, not even know how to use bash, so I was asking for someone to do it for me. I would act as a tester with my raspi3/retropie.
-
Ah nice, I've never played around with ports, but it does sound like the right idea if it will execute bash scripts directly from the front-ends.
Thanks for the tip!
-
@Howitzer99 yes if only I could program using bash or so... by the way I used the word "reboot" but in reality it should be more a "shut down and then press the button and power up" because I would like to have enough time to connect the cable...
In any case: thanks for your response guys! At least I don't feel like fighting windmills alone! -
@sahelX In the spirit of transparency, I know just enough command line stuff to get by. Whenever I attempt to write a bash script I need to have google handy.
I would suggest that you research a few things and make an attempt at it. Look up a few commands, like "cp" (copy), how to specify the source and destination paths in that command, how to force an overwrite, etc.. Then, lookup commands for rebooting the Pi and try it at the command line. Then, you will need to write scripts and make your scripts executable. Read about how to properly format a bash script file. It's really just a text file. Some of this detail can be found in Retropie's documentation in Ports, although the examples are more complex because they deal with launching ported games.
I guess my point is, give it a try. You will earn a lot more respect if you make an attempt and then ask questions (and you will learn the skills to improve/enhance your setup later).
-
@caver01 'kay, I will give it a try, worst come to worst, I will just reinstall the image!
-
@sahelX if you make a copy of your /boot/config.txt, about the worst thing you can do is mess up that file, and to fix it, just copy your backup into place.
-
@sahelX Oh, and some commands require permissions, which is why you often see "sudo " at the beginning of the command. This executes the command as the Super User--basically, a temporary admin. Some folders/file may be protected in a way that prevents you from casually issuing a copy command to overwrite. Using sudo where appropriate can overcome this. I only mention it because you may run into this problem before you really get going!
-
Thanks guys, it worked!
-
I got this HDMI detect or LCD working good.. It takes a while before the script kicks in.. Maybe it should go in rc.local instead?
Opinions?What I also need to do is have a LCD profile Start Roms without game frame/boarder . Rather have it expand full LCD and use frame when using HDMI..
Any ideas?Thanks so much
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.