Video modes, from command-line?
-
When I use runcommand launch menu to set a video mode (640x480, etc.), what's actually happening? How can I replicate this on command-line?
-
Not sure how you want to start from the command line (using
runcommand
or not). The video mode selection is kept in a configuration file, so launching from the command line withruncommand
it should be all it takes. -
@mitu said in Video modes, from command-line?:
Not sure how you want to start from the command line (using
runcommand
or not).Yeah I mean bypassing runcommand, me launching the port commands myself and doing whatever it was that runcommand would be doing if I was using runcommand, but without actually using it. Is it switching modes with
tvservice
, or what is going on under the hood, there? -
@sleve_mcdichael said in Video modes, from command-line?:
. Is it switching modes with tvservice, or what is going on under the hood, there?
tvservice
works for Pi3 and older models (for now). Basically the resolution change has 3 methods:- using
tvservice
, where supported (i.e. Pi3 and older, using the Broadcom GPU drivers) - using
xrandr
, forx11
platforms (PC). - using the Linux kernel modesetting support (Pi4 and other KMS platforms), as implemented in SDL2 or RetroArch:
- if the app is using SDL2, then there are 2 env vars that are set during startup here that instruct SDL2 video driver to switch to that resolution. This is a RetroPie specific extension/patch for SDL2 (see for instance here).
- if the emulator is a Libretro core, just set the desired resolution in the
/dev/shm/retroarch.cfg
runtime configuration file (see here).
If your port is SDL2 based, then you can run it with SDL's env vars for mode switching:
SDL_VIDEO_KMSDRM_MODELINE=WxH[@hz] <command>
For instance:
SDL_VIDEO_KMSDRM_MODELINE=800x600 pppsspp game1.iso SDL_VIDEO_KMSDRM_MODELINE=1024x768@75 pppsspp game2.iso
- using
-
Thank you. Much of that is over my head but it gives me a place to start.
@mitu said in Video modes, from command-line?:
For instance:
SDL_VIDEO_KMSDRM_MODELINE=800x600 pppsspp game1.iso SDL_VIDEO_KMSDRM_MODELINE=1024x768@75 pppsspp game2.iso
Are these arbitrary values, or there's only certain ones that will work? Is it based on what modes my TV can display?
-
Are these arbitrary values, or there's only certain ones that will work? Is it based on what modes my TV can display?
Only values supported by your display will have an effect.
runcommand
will query the available modes and set the values depending on what you choose in the menu.
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.