PCSX2 / pcsx2

PCSX2 - The Playstation 2 Emulator
https://pcsx2.net
GNU General Public License v3.0
11.49k stars 1.6k forks source link

[Feature Request]: Send native resolution to monitor for output #6348

Open DukeSkinny opened 2 years ago

DukeSkinny commented 2 years ago

Description

I'd like to be able to output to my CRT monitor in whatever resolution the game is natively rendering at any given point. So, irrespective of internal rendering resolution the monitor would switch to a 240, 448, 480 etc. modeline.

Reason

Not only would this allow for stunning period accurate output on the right hardware, but also enable high quality anti-aliasing. Scaling is also avoided while providing full screen coverage. The lack of such a feature is currently a major roadblock for me to move away from RetroArch (along with robust shader support, which stenzek is seemingly working on). At the moment, users can manually set the .exe to switch to a pre-defined resolution, but this does not take into account the variability of resolutions that are available on the PS2 and relies on external software.

Examples

CRTSwitchRes as implemented in RA, CRTEmuDriver etc. (see GroovyMame). The solution would not have to be nearly as complex, however. An option to double the refresh rate for 240p output so as to allow 31khz monitors to display 15khz signal content would be appreciated.

OdinVex commented 2 years ago

Description

I'd like to be able to output to my CRT monitor in whatever resolution the game is natively rendering at any given point. So, irrespective of internal rendering resolution the monitor would switch to a 240, 448, 480 etc. modeline.

Reason

Not only would this allow for stunning period accurate output on the right hardware, but also enable high quality anti-aliasing. Scaling is also avoided while providing full screen coverage. The lack of such a feature is currently a major roadblock for me to move away from RetroArch (along with robust shader support, which stenzek is seemingly working on). At the moment, users can manually set the .exe to switch to a pre-defined resolution, but this does not take into account the variability of resolutions that are available on the PS2 and relies on external software.

Examples

CRTSwitchRes as implemented in RA, CRTEmuDriver etc. (see GroovyMame). The solution would not have to be nearly as complex, however. An option to double the refresh rate for 240p output so as to allow 31khz monitors to display 15khz signal content would be appreciated.

I believe the answer to this is more complex than you imagine. Many older video-game systems were designed for CRTs, including their scanlines, not only for size but also for color accuracy, too.

Almost all modern displays cannot handle such small resolutions. You'd need to use a common-enough minimum such as 800x600 which is available on almost every single display since the late 1980s. Add in scanline-option behavior and color-accuracy compensation (relying on either natural scanlines on a real CRT by simply not enabling scanlines or emulate with configurable opacity for LCDs such as through size of scanlines to handle displays of different sizes (or assume a scanline size? iffy) and opacity). Tie in aspect-ratio overriding and handle widescreen (game-native or patching) and stretch up to your height resolution target, bars on the side if not using aspect-ratio overrides or stretching, et cetera. All preliminary, off-the-cuff. If I understood the Feature Request. Anything bothering about refresh rates above NTSC/PAL are wishful at best, you'd just be showing same-frames to artificially increase frame-rate on any game that relies on data from the screen. You wouldn't see any actual improvement, and most likely experience perception issues with input.

dio-gh commented 2 years ago

I believe the answer to this is more complex than you imagine. Many older video-game systems were designed for CRTs, including their scanlines, not only for size but also for color accuracy, too.

No, there's nothing particularly complex about this request (in that way at least). What OP is asking for is essentially a video mode pass-through option:

image

So whenever there's a video mode change in the CRTC \^\^, the emulator would forward that to the host and have the actual display change it's mode to the prescribed configuration, just like when hooked up to real hardware.

This is moot on non-CRT displays because they have fixed pixel grids, so they'd end up doing interpolation (I think bilinear) on the input image to stretch it to fill their whole display area, just like the emulator normally does otherwise (when not using the integer scaling option).

refractionpcsx2 commented 2 years ago

That option would certainly need to be tied to Screen Offsets, since that forces the 640x### output, where by default PCSX2 will display the framebuffer size (which can be like 512x512, which will never work as a monitor resolution), however, NTSC would need to be forced to 640x480, as I doubt 640x448 is a viable resolution on any display. It only worked on TV's because it didn't request a resolution, it was completely analogue.

OdinVex commented 2 years ago

Ah, I see now, glad it isn't as complicated as I had taken it to mean. I also assumed most to have digital->analog conversion of signal.

DukeSkinny commented 2 years ago

as I doubt 640x448 is a viable resolution on any display

Actually, my VGA monitor is perfectly capable of displaying 640x448. I just need to create a custom resolution with modified frequencies to push to vertical sync above the 31khz minimum. This wouldn't be possible on normal TV's, however.

refractionpcsx2 commented 2 years ago

as I doubt 640x448 is a viable resolution on any display

Actually, my VGA monitor is perfectly capable of displaying 640x448. I just need to create a custom resolution with modified frequencies to push to vertical sync above the 31khz minimum. This wouldn't be possible on normal TV's, however.

That's a tall ask for users who will scream if they can't just press a button and it all works. That's a no from me.

DukeSkinny commented 2 years ago

Just throwing this out there: how about a fallback solution? Look for the requested resolution, and if can't be found, just output 480p. Wouldn't have to bother config-wary users this way.

refractionpcsx2 commented 2 years ago

I guess what we'll have to do is 640x480 with black bars for NTSC. be aware though, if you're looking for a crisp picture, it's not going to happen, because the picture is getting resampled to 640x480 from whatever it is internaly, so it will receive some blurring, this is why by default PCSX2 just shows the framebuffer size.

DukeSkinny commented 2 years ago

I'm not understanding. I get you'd have to resample to force everything into 640x480, but how does that fit into the above suggestion?

refractionpcsx2 commented 2 years ago

I guess we could, yeah, we might have to. the likelyhood of anything supporting 640x448 without fucking with your monitor, is slim to none.

mirh commented 2 years ago

That's a tall ask for users who will scream if they can't just press a button and it all works. That's a no from me.

I really don't think the kind of user that exhumes a 20yo monitor (and a VGA output) for hardcore accuracy purposes, is the same one that yells at clouds if they cannot play gran turismo with 8x resolution on a pentium dual core.

In fact, if you implemented #2059 you could just as well have this be a sub-option named "CRT mode". (hell, with automatic resolution discovery even built into the emulator if we really want to dream big)

naxeras commented 9 months ago

Any news for this?

stenzek commented 9 months ago

Please don't bump issues. If there is any change, you can clearly see it posted.

As it stands, none of us are interested in investigating this.