Emulation Station scaling and centering - ZFEbHVUE/Batocera-CRT-Script GitHub Wiki

Overview

This guide explains how to manually scale and center the screen for situations where adjustments using the service menu or CRT geometry tool do not produce a perfectly centered display.

Manual adjustments can be made by editing the file /userdata/system/es.arg.override via the command line.


es.arg.override

When the CRT script is executed, it creates the file es.arg.override in the directory /userdata/system.

Initially, the file will contain the following values:

  • screensizeoffset_x 0
  • screensizeoffset_y 0
  • screenoffset_x 0
  • screenoffset_y 0

You can edit this file at the command line (e.g., via SSH) using nano or another text editor.

After making changes, you must restart EmulationStation with the following command:

batocera-es-swissknife --restart

Offset → Position

Adjusting the Offset

Begin by aligning the top-left corner of the image with the top-left corner of the display. This step is crucial before adjusting the scaling (size). Use the following arguments for this purpose:

  • screenoffset_x = Horizontal Position
  • screenoffset_y = Vertical Position

Examples:

screenoffset_x 00  
screenoffset_y 00  

These values move the canvas by [x] pixels to the right (horizontal) and [y] pixels downward (vertical).


Scaling → Size

Adjusting the Scaling

After aligning the image using the offset values, adjust the size by scaling it. The top-left corner serves as the anchor point:

  • Increasing values will stretch the image outward to the right and downward.
  • Decreasing values will compress the image inward from the right and bottom.

Use the following arguments:

  • screensizeoffset_x = Width
  • screensizeoffset_y = Height

Examples:

screensizeoffset_x 00  
screensizeoffset_y 00  

Example

Suppose your resolution is 640x480. If you configure the following values:

screensizeoffset_x 10  
screensizeoffset_y -10  
screenoffset_x -5  
screenoffset_y 5  

The result will correspond to this configuration in batocera.conf:

es.customsargs=--screensize 650 470 --screenoffset -5 5  

Important Notes

The file /userdata/system/es.arg.override will be deleted every time the CRT script is executed. To avoid losing your changes, make a backup of the file before running the script.