RetroManager - overlay manager

Hi all.

I developed a little utility to massively manage overlays and other config files for RetroArch.

Current feature list:

  • It can detect the “viewport” area inside the overlay and generate RetroArch config files so that a game runs (almost) perfectly inside it.

  • It can resize overlays to the desired size keeping the aspect ratio.

  • The resize operation can be based on the full size of the overlay or the viewport, thus maximizing the game playable area and cropping “excess” overlay.

You can find it on GitHub. It’s a command line utility written in Python so it should easily running any system, provided you have Python 3.* installed.

It’s still very rough and I’d like to have feedback to fix and improve it.

2 Likes

Some examples of overlay manipulation, using one of the excellent overlays made by @OrionsAngel.

python retromanager.py overlay_resize "MAME 2016" dkong

Basic rescale, using the original (1920x1080 in this case) dimensions. Used this way the overlay image is simply copied to the destination folder with no processing altogether.

python retromanager.py overlay_resize "MAME 2016" dkong -tx 960 -ty 720 -bc FF0000

Rescale to 4:3 (960x720), using an ugly red to showcase the backgroud filling.

python retromanager.py overlay_resize "MAME 2016" dkong -rm inner -mx 30 -my 30 -tx 1440 -ty 720 -bc FF0000

Rescale to HDReady resolution maximizing the viewport area and leaving some margin around it.

3 Likes

Running the above examples substituting “generate_all” for “overlay_generate” will also create the config files needed for RetroArch to configure the viewport size and, if you want them, a basic crt shader preset.

They are created under the output folders and must be copied to the folders where RetroArch expects them (default is \config<core>)

The file created for command python retromanager.py generate_all "MAME 2016" dkong is:

aspect_ratio_index = "23"
custom_viewport_height = "859"
custom_viewport_width = "657"
custom_viewport_x = "629"
custom_viewport_y = "109"
input_overlay = "C:\Emulation Stuff\Retroarch\layouts\\dkong.cfg"
input_overlay_enable = "true"
input_overlay_hide_in_menu = "false"
video_shader_enable = "true"
video_fullscreen = "true"

The file for other commands differs only in the calculated custom-viewport_* entries.

Here’s a screenshot of the game running with the following shader.

#reference "..\..\shaders_cg\crt\crt-geom.cgp

2 Likes