Software Support > Automated Projects

Retropie Rotating Monitor Config

(1/3) > >>

Kingcade:
My cabinet has a manually rotated CRT. I’m using a Raspberry Pi 3b+ running RetroPie and EmulationStation (ES).

I’ve spent a fair amount of time figuring out how to configure things using the UI so my games were shown in the correct orientation, so I thought I would share what worked for me. You could also manually edit the config files. There may be easier ways.

I’ve got 4 ES Collections set up for my games, to separate them based on the hardware requirements.

- Horizontal Display, 4-way joystick
- Horizontal Display, 8-way joystick
- Vertical Display, 4-way joystick
- Vertical Display, 8-way joystick

I rotate the monitor and set the joystick mode appropriately and then play games from the corresponding collection.

First, you need to set video_allow_rotate to false in the Retroarch config. This will prevent the games from assuming a horizontal monitor rotation and rotating vertical games to fit in it. You might also need to set video_rotation(0), depending on what the default is.

I made this config change by going into the Retropie Configuration Editor > Advanced Configuration > Configure Libreto Options > arcade/retroarch.cfg. You might have to pick a different folder depending on your game file setup.




I could only get rotating and scaling to work well in the MAME2003 and fbneo cores, so I set all of my games to use one of those two cores.

To config MAME 2003 vertical games, launch a MAME game and then enter the Retroarch config menus by hitting Select (Exit) button plus the X button. On my 6-button control panel, the X button is the top middle button.

This will take you into the Main Menu > Quick Menu. From here, scroll down to Options, and set TATE_mode to on. Go back to the previous menu and Overrides>Save Core Overrides. Go back to the Main Menu and Quit Retroarch. You might need to then restart the system.




Repeat the process with a fbneo games, but set Options > Vertical_Mode to  true.

For each Mame game, the rotation will need to be set. Some will require normal rotation, others will require 90, 180, or 270 rotation. You’ll need to launch each game to see how to configure it.

Again, launch a MAME game and enter the Retroarch menu. Go back to the Main Menu, and then go to the right for the Settings menu.

From the Settings > Video menu, set the “rotation” value accordingly. Then go back to the Quick Menu, and select Override > Save Game Overrides. Go back to the Main Menu and Quit Retroarch.









The only problem with this setup is the EmulationStation menus for the vertical games are sideways. ES doesn’t appear to have a way to dynamically switch into vertical orientations.  ES provides a startup parameter to put it into vertical mode, but it can’t be changed without a config change and restart.


Sent from my iPhone using Tapatalk

Kingcade:
Update - I figured out a way to rotate EmulationStation without reconfiguration! I changed the EmulationStation startup script to toggle between starting up in horizontal mode or vertical mode. So, now, to switch modes, I just click the P1 button and select Quit>Restart EmulationStation!  :woot

To make the same change, hit F4 to exit to the command line, then
sudo nano /opt/retropie/supplementary/emulationstation/emulationstation.sh

Make the changes below, hit Ctrl-O and Enter to save the file, then Ctrl-X, then type Exit. That's it!  Follow the steps above to restart EmulationStation, and it will switch modes each time you restart.

Note:
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.


--- Code: ---#!/bin/sh


esdir="$(dirname $0)"
while true; do
    rm -f /tmp/es-restart /tmp/es-sysrestart /tmp/es-shutdown
    "$esdir/emulationstation" "$@" $rotate
    ret=$?
    if [ -f /tmp/es-restart ]; then
       if [ -z "$rotate" ]
       then
            rotate=”--screenrotate 1”         
       else
         rotate=””
       fi
       continue
    fi
    if [ -f /tmp/es-sysrestart ]; then
        rm -f /tmp/es-sysrestart
        sudo reboot
        break
    fi
    if [ -f /tmp/es-shutdown ]; then
                rm -f /tmp/es-shutdown
        sudo poweroff
        break
    fi
    break
done
exit $ret

--- End code ---

Kingcade:
Here’s a screenshot showing the highlighted changes in the code, as well as a view of what the EmulationStation Carbon theme looks like when rotated vertically.





Sent from my iPhone using Tapatalk

DaOld Man:
Good work Kingcade.
I played around with using ES with retropie to automatically rotate the monitor.
I used the GPIO to interface RPi to the motor drive and rotation limit switches.
I cant find any reference to it here or in my backups (Maybe PL1 can help me.)
But if memory serves correctly, I think I did basically what you are doing, except my script re-wrote the ES config file based on game selected, and restarted ES after the game ended.
I cant verify that without some reference to go by though.

PL1:

--- Quote from: DaOld Man on July 13, 2020, 01:08:40 pm ---I played around with using ES with retropie to automatically rotate the monitor.
I used the GPIO to interface RPi to the motor drive and rotation limit switches.
I cant find any reference to it here or in my backups (Maybe PL1 can help me.)

--- End quote ---
Is this what you're looking for?

http://forum.arcadecontrols.com/index.php/topic,150907.msg1580159.html#msg1580159




Scott

Navigation

[0] Message Index

[#] Next page

Go to full version