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

PS1 games being stretched to fullscreen #59

Open
yossariano opened this issue Jun 2, 2020 · 12 comments
Open

PS1 games being stretched to fullscreen #59

yossariano opened this issue Jun 2, 2020 · 12 comments

Comments

@yossariano
Copy link

I'm using the latest build of the udcd-uvc plugin (thanks for a great utility, btw) and mplayer- and whenever I open a PS1 game (using adrenaline + adrenaline bubble manager), it stretches the image to fullscreen no matter what the vita screen looks like (in my case I prefer 1:1 pixels as much as possible).

Image being stretched to fullscreen, differing from vita display:
image

I can see in the code where we are treating PS1 framebuffers differently: https://github.com/xerpi/vita-udcd-uvc/blob/master/src/main.c#L532

I pulled the repo and tried tweaking the values of SceIftuPixelformat being used here, but without better knowledge of the vita sdk I was just guessing and checking. As far as I can tell your settings are the only ones which at least give the proper color and don't duplicate the image.

However- if you open the official settings overlay while playing a PS1 game, you can actually see the image behind the transparent overlay shrinks to the proper scaling. It blows back up to fullscreen when you close the settings overlay. Opening this issue to see if anyone has had any luck in getting an unstretched PS1 image / if this is just on my machine. Example images below.

Settings menu making image correct aspect ratio:
image

@Invictaz
Copy link

Invictaz commented Jun 2, 2020

The stretch should be optional. I like it though.

@ghost
Copy link

ghost commented Jun 2, 2020

What you need to do is add a 4:3 frame descriptor in usb_descriptors.h and select that on the video player when you play PS1 games.

@TheIronUniverse
Copy link

this happened to me as well, what worked for me was loading up my PS1 game, going into Adrenaline settings, and changing Graphics Filtering to anything, bilinear is probably best though.

@TheIronUniverse
Copy link

you will have to do this with every PS1 game you want to display properly

@Invictaz
Copy link

Invictaz commented Jun 8, 2020

@cuevavirus maybe you can add this?

@xerpi
Copy link
Owner

xerpi commented Jun 8, 2020

The stretching is being done here: https://github.com/xerpi/vita-udcd-uvc/blob/master/src/main.c#L620
To center the image you have to do something like: src.dst_x = 960/2 - src_width/2 and (convert it to 8.8 fixed point format).
I had in mind to change the code so that it keeps the original resolution/offsets but in the end, I didn't...

@Emiougus
Copy link

The stretching is being done here: https://github.com/xerpi/vita-udcd-uvc/blob/master/src/main.c#L620
To center the image you have to do something like: src.dst_x = 960/2 - src_width/2 and (convert it to 8.8 fixed point format).
I had in mind to change the code so that it keeps the original resolution/offsets but in the end, I didn't...

Tried doing this but it just offset the image and cut off half of it

This is the edit I made:

src.dst_x = 245760/512 - src_width/512;
src.dst_y = 139264/512 - src_height/512;

Dunno if that's what you meant to do, also tried just altering the src.dst_x value and not the src.dst_y and but as expected after seeing the result of my first attempt it just got rid of the vertical offset and the horizontal offset stayed. Did manage to add a 4:3 Frame descriptor as Cuevavirus suggested and it works well, though there seems to be some smoothing of sorts going on as the image is perfect on the vita but on my screen the pixels are somewhat smoothed, dunno if that's an intentional feature of the plugin or not

@ghost
Copy link

ghost commented Jun 29, 2020

I had in mind to change the code so that it keeps the original resolution/offsets but in the end, I didn't...

PS1 games have variable resolution or resolution that doesn't match the intended aspect ratio. I had the same problem in Sharpscale and what I ended up doing is having an option to force the AR.

though there seems to be some smoothing of sorts going on as the image is perfect on the vita but on my screen the pixels are somewhat smoothed

SceIftuConvParams.unk4 is the flag for bilinear filtering if you want to remove that

@Invictaz
Copy link

I hope someone will fix this with a "PS1 mode" or something like that.

@RuiOrey
Copy link

RuiOrey commented Feb 14, 2021

it would be nice to be able to disable/toggle bilinear filtering in some way, specially using sharpscale.
And relative to the scale, isn't possible to make the ps games to keep the ps1 settings overlay scaling when it's not visible?

@QUAKEULUS
Copy link

QUAKEULUS commented Apr 30, 2021

Thanks, confirmed enabling bilinear under graphics filtering in adrenaline menu fixed the stretch (smooth graphics: yes, however, does not)

proposed fix: adding another resolution mode for 4:3 content instead of worrying about what is or isn't a ps1 game

@xerpi
Copy link
Owner

xerpi commented Apr 30, 2021

Ideally, we could have a config file with per-game options saying whether you want it to expand to full-screen or to keep the game's resolution. Unfortunately, I'm not available these days.
So if any developer wants to help, I'll provide the info necessary to do that.

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

7 participants