Skip to content
This repository has been archived by the owner on May 8, 2024. It is now read-only.

Native Resolution output for PSTV [$145 awarded] #7

Closed
ScHlAuChii opened this issue Aug 10, 2019 · 5 comments
Closed

Native Resolution output for PSTV [$145 awarded] #7

ScHlAuChii opened this issue Aug 10, 2019 · 5 comments
Labels
bounty Has a bountysource bounty active

Comments

@ScHlAuChii
Copy link

ScHlAuChii commented Aug 10, 2019

The Vita´s original resolution is 960x544.

PSTV outputs: 480p, 720p and 1080i.
This means the internal 960x544 resolution gets downscaled to 720x480, or upscaled to 1280x720 or 1920x1080. Unfortunately this type of scaling has some bad effects especially on pixel based games. It also adds a certain blurryness to the picture.

So what I´m asking for here is a modification that would allow the PSTV to directly output 960x544, or alternatively a 1280x720 picture that contains the 960x544 with black borders.


The $145 bounty on this issue has been claimed at Bountysource.

@Rinnegatamante Rinnegatamante changed the title Native Resolution output for PSTV [$100] Native Resolution output for PSTV Aug 10, 2019
@ScHlAuChii
Copy link
Author

xerpi already did some digging:
/CONFIG/DISPLAY/", "hdmi_out_scaling_ratio" the default number is 992647056
in the code this registry numbers is divided by 1.09e to 0.992647
some kind of fixed point number 0.992647056 might be a ratio like 4/3 = 1.33333

typedef struct SceDisplayFbDataCurFbInfo {
SceUID pid; // +0x50, +0x70
void paddr; // +0x54, +0x74
unsigned int scaling; // +0x58, +0x78
float scaling_ratio; // +0x5C, +0x7C
unsigned int vp_x; // +0x60, +0x80 16.16
unsigned int vp_y; // +0x64, +0x84 16.16
unsigned int vp_width; // +0x68, +0x88 16.16
unsigned int vp_height; // +0x6C, +0x8C 16.16
} SceDisplayFbDataCurFbInfo; / size = 0x20 /

typedef struct SceDisplayFbData {
int lock;
unsigned int enabled;
int initialized;
unsigned int vblankcount;
unsigned int cb_event_uid;
unsigned int unk14;
unsigned int pulse_event_value;
unsigned int dsi_bus;
unsigned int plane_idx0;
unsigned int plane_idx1;
unsigned int vic; // VIC?
unsigned int dst_width;
unsigned int dst_height;
unsigned int conv_flags; // enable conv?
unsigned int dst_pixelformat; //0x00002000
unsigned int pixel_size;
float refresh_rate;
unsigned int unk44;
unsigned int brightness; // 0x10000 = max
unsigned int invert_colors;
SceDisplayFbDataCurFbInfo fb_set_info[2]; // +0x50
unsigned int cb_uid;
unsigned int brightness_control_value;
} SceDisplayFbData; / size = 0x98 */

@Rinnegatamante Rinnegatamante changed the title Native Resolution output for PSTV Native Resolution output for PSTV [$100] Aug 10, 2019
@Rinnegatamante Rinnegatamante added the bounty Has a bountysource bounty active label Aug 10, 2019
@SpamU47
Copy link

SpamU47 commented Aug 12, 2019

Pretty interesting, I think I'll be supporting. I'm a bit afraid that this would be too niche to atract anybody. Also, I have doubts (sorry, I'm just a scene fan and have no knowledge at all) on how all different resolutions (as seen in VitaGrafix) would work in a 720p output. On the positive side, games that push an internal resolution of 1280x720 would be so sweet! Don't know if I'm mixing concepts, sorry guys.

@Rinnegatamante man, you're awesome. Thank you for your hard work. It's pure magic. I'll be helping in different bounties as they go (already contributed to the retroarch and PPSSPP ones -name Hidalgo-).

@ScHlAuChii
Copy link
Author

ScHlAuChii commented Aug 30, 2019

Test-Pattern

A resolution test image of alternating black and white lines in exactly 960x544.
If the output is scaled correctly there shouldnt be any patterns appearing!
Is the output scaled wrong, pattern appear that arent really there in the original image!

@Rinnegatamante Rinnegatamante changed the title Native Resolution output for PSTV [$100] Native Resolution output for PSTV [$120] Oct 19, 2019
@Rinnegatamante Rinnegatamante changed the title Native Resolution output for PSTV [$120] Native Resolution output for PSTV [$135] Jan 11, 2020
@ScHlAuChii ScHlAuChii changed the title Native Resolution output for PSTV [$135] Native Resolution output for PSTV [$145] Jan 13, 2020
@ScHlAuChii
Copy link
Author

ScHlAuChii commented Apr 1, 2020

@cuevavirus
Awesome that someone tackled this :)
I gave it a try and couldnt get it working (not sure what im doing wrong)
Installing the vpk resulted in Error 0xFFFFFFFF.

Update: Reason why plugin and VPK didnt work, was due to a corruption on the SD,
which seems to happen sometimes randomly with SD2Vita.

@ScHlAuChii
Copy link
Author

ScHlAuChii commented Apr 1, 2020

Working solution provided by @cuevavirus - issue closed
Good work :)

Sharpscale can be found here:
https://github.com/cuevavirus/Sharpscale

@Rinnegatamante Rinnegatamante changed the title Native Resolution output for PSTV [$145] Native Resolution output for PSTV [$145 awarded] Apr 16, 2020
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
bounty Has a bountysource bounty active
Projects
None yet
Development

No branches or pull requests

3 participants