Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

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

Open
porg opened this issue Jan 15, 2023 · 0 comments
Open

Comments

@porg
Copy link

porg commented Jan 15, 2023

Environment

  • PCSX ReARMed r23
  • Device: OpenPandora (800 x 640 pixels)
  • OS: SuperZaxxon v1.76 update 3

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
  • g_scaler can be any of these 5 constants, as can be seen in menu.h
    • 0 SCALE_1_1,
    • 1 SCALE_2_2,
    • 2 SCALE_4_3,
    • 3 SCALE_4_3v2,
    • 4 SCALE_FULLSCREEN,
    • 5 SCALE_CUSTOM

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

  • g_layer_x , g_layer_y , g_layer_w , g_layer_h
  • To mimick the SCALE_4_3 values in a SCALE_CUSTOM setup, you'd use these:
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

  • Green areas = Viewport estate left.
  • Red boundary line: Some content is outside the viewport, indicated by the red line + red text like "+40px" next to boundary center.
  • In my example from above the screen looks like this:
    • +40px on top and +40px bottom from my example given above.
    • The left and right boundary show neither green surface areas nor a red boundary, as the content boundary is exactly on the viewport boundary.

The control scheme gets improved

  • Dpad = Scale on respective axis
  • R + Dpad = Move on respective axis
  • L + Dpad = Scale on respective axis and the other axis proportionally

Snapping

  • When a content boundary hits any viewport boundary
    • the boundary line shortly flashes
    • the auto increase is paused for 1000-2000ms (experiment the ideal value), enough time to get off the Dpad when satisfied,
  • if the Dpad remains pressed after that treshhold the scaling/moving continues.
notaz added a commit to libretro/pcsx_rearmed that referenced this issue Dec 13, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant