notaz / pcsx_rearmed

ARM optimized PCSX fork
GNU General Public License v2.0
384 stars 207 forks source link

Setup custom scaler: Overscan to cut off letterbox for maximum screen usage #286

Open porg opened 1 year ago

porg commented 1 year ago

Environment

Reproduction

  1. You open a game with letterboxes. You want to resize proportionally to the maximum fill area (scale to fit, with the black letterbox content not counting as content).
  2. Menu > Options > Display > Setup custom scaler.
  3. The UI does not allow you to make scale source image larger than the viewport (aka overscan).
  4. Doing this manually by "hacking" the config file manually, doesn't work either.

Scaler options in a game config file

g_scaler3 = 5 # Use custom scaler

When you use the custom scaler, you can define these 4 values:

g_layer_x = 50 # dec 80
g_layer_y = 0
g_layer_w = 280 # dec 640
g_layer_h = 1e0 # dec 480

Increase the source image height by twice the letterbox (on on top, on on bottom) of 40px, so by 80px (hex: 50):

g_layer_x = -28 # dec -40
g_layer_h = 230 # dec 560

→ Got totally ignored. It tries the closest maximum possible to your given values which is 4:3 display. One cannot scale above the viewport to cut off source image parts. Also not via cfg file hacking.

Proposal

Indicate overscan / underscan

The control scheme gets improved

Snapping