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

Beetle Saturn and PSX right resolution on LCD #115

Open
ghost opened this issue Sep 17, 2019 · 1 comment
Open

Beetle Saturn and PSX right resolution on LCD #115

ghost opened this issue Sep 17, 2019 · 1 comment

Comments

@ghost
Copy link

ghost commented Sep 17, 2019

Hello,

I send this post to bring solution for some retroarch cores (Beetle Saturn & Beetle PSX).

Look issue open September 18, 2018 by retrorepair about switch horizontal resolutions with Beetle Saturn core. https://github.com/libretro/beetle-saturn-libretro/issues/125

I‘ve begun from your work in box-max shader (shaders_slang\auto-box\box-max.slang).
In first, I've changed line 28 like this.

return x.x;

In second, I've changed line 38.

box_scale = vec2(min(box_scale), min(box_scale));

by

if (global.OutputSize.y > global.SourceSize.y) box_scale = vec2(min(box_scale), 2.0);
else box_scale = vec2(min(box_scale), 1.0);

It's necessary used one preset file with previous shader like scanlines.slang (shaders_slang\reshade\shaders\scanlines.slang) and those setting.

scale_type_x0 = "source"
scale_x0 = "2.000000"
scale_type_y0 = "source"
scale_y0 = "2.000000"

With those modifications and preset file, every games on Saturn and PSX work fine with pixel aspect ratio on LCD. My monitor use 1920x1080 and I've this config in retroarch.
aspect_ratio_index = "21"
video_crop_overscan = "false"
video_driver = "glcore"
video_scale_integer = "true"

Only for PSX, I've another config.
aspect_ratio_index = "23"
custom_viewport_height = "960"
custom_viewport_width = "1600"
video_crop_overscan = "false"
video_driver = "glcore"
video_scale_integer = "true"

@ghost
Copy link
Author

ghost commented Sep 24, 2019

I made new modifications since last message.

I've revised my first modification by delete lines 27 to 29 and only keep line 30. It's same but more clean.

return x.x;

Then, I've revised my second modification by something better. I've changed line 38 by this :

if (global.OriginalSize.y > 400.0) box_scale = vec2(min(box_scale), 1.0);
else box_scale = vec2(min(box_scale), 2.0);

With my previous modification, everything worked fine except if video_scale_integer = "false" and emulator used 480i mode. For exemple, instead of get 1280x960, I'd got 1280x1920.

Now, box-max.slang shader will provide right resolution on LCD (pixel aspect ratio) in integer scale with each video mode and retroarch settings about integer scale. It's no more necessary check if integer scale is true or false for Beetle Saturn.

Unfortunatly, for Beetle PSX core, you've always need use video_scale_integer = "true" and settings writed upper.

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

0 participants