Possible video option: "maintain integer scale"

PSX emulators are all doing something different and none of them are displaying correctly with the default settings, AFAIK. There needs to be some way for the RA custom aspect ratio to change on the fly to match what is being reported by the emulator, in order to avoid scaling artifacts at all times.

I believe that the way integer scale currently works for all PSX emulators is that it simply takes 320x240 and multiplies it by the user-selected integer scale factor.

What I’m proposing is that it should take the currently detected resolution and multiply that by the user-selected integer scale factor to obtain the custom aspect ratio. The custom AR would be dynamic and would change during gameplay whenever the game’s detected resolution changed.

The same problem is discussed in this post: https://forum.fobby.net/index.php?t=msg&goto=3776&

Using FFVII as a test case:

PCSX ReARMed (integer scale ON, custom AR)- Isn’t properly detecting/switching resolutions on the overworld screen or on menu screens. There is no crop overscan option in the core options to fix this. Turning crop overscan ON or OFF results in scaling artifacts.

Beetle PSX (integer scale ON, custom AR, video options -> crop overscan OFF). Looks correct on menu screens and the overworld, but regular gameplay screens are distorted when crop overscan is turned OFF under core options (quick menu -> options -> crop overscan). It’s the reverse with crop overscan ON

Beetle PSX HW crashes almost immediately on my system so I’m unable to test it.

3 Likes

bump; does anyone know if something like this is possible? I can’t be the only one that wants an option like this. For example, FFVII normally uses 320x240 but switches to 320x224 on the overworld screen and 364x240 in menu screens. If the user selects 5x5 integer scale (1600x1200 for PSX) then “maintain integer scale” would cause the emulator to automatically switch to 1600x1120 on the overworld screen and 1820x1200 on menu screens. This would cause the image to be stretched somewhat, but it would avoid scaling artifacts.

1 Like

what happens currently if you use custom AR and set a specific integer scale factor?

Everything is cool when playing FFVII at 5x5 custom integer scale, until you get to the overworld or menu screens. Then you get artifacts because it’s still being resized to 1600x1200, even though the in-game resolution has changed. What I’d like to happen is for the custom integer resolution to automatically change when the game’s resolution changes, so that it’s always (for example) at 5x5 integer scale (or whatever the user selects). This would completely eliminate scaling artifacts at all times, but the AR would change when the game’s resolution changes. Hope that makes sense :sweat_smile:

1 Like

PCSX ReARMed gets closer. If you turn off GPU Screenshot Enable, output pictures have the right resolution, but in RetroArch they’re still stretched: pcsxr (RetroArch window on the left and screen captured png on the right)

Curiously, scenes with pre-rendered backgrounds like towns and the Highwind get padded on both RetroArch and screenshots: pcsxr-02 (RetroArch window on the left and screen captured png on the right)

Beetle PSX HW outputs fixed resolution (640x480) (stretched) in all my tests.

Yeah, it would be nice if RA took the currently-reported output resolution and scaled it by the user-selected custom integer scale factor. It would cause some distortion by stretching the image, but this way you could truly eliminate scaling artifacts for games that use multiple resolutions. I don’t know if I’m explaining this well or if such a thing is even possible, though.

I had noticed that this does happen in Genesis Plus GX, for example in Sonic CD the title screen is natively 256x224 and then switches to 320x224 during gameplay. With integer scaling on and pixel aspect ratio (1:1), the aspect ratio changes accordingly.

I believe this would make it something that is core-dependent.

1 Like

I don’t mind the real resolution being used. I do notice that the resolution is different from PSX vs PSX HW – which is annoying for scanlines.

Ok, after further testing, PSX emulators are all doing something different with crop overscan and none of them are displaying correctly with the default settings, AFAIK.

Using FFVII as a test case:

PCSX ReARMed (integer scale ON, custom AR)- Isn’t properly detecting/switching resolutions on the overworld screen or on menu screens. There is no crop overscan option in the core options to fix this. Turning crop overscan ON or OFF results in scaling artifacts.

Beetle PSX (integer scale ON, custom AR, video options -> crop overscan OFF). Looks correct on menu screens and the overworld, but regular gameplay screens are distorted when crop overscan is turned OFF under core options (quick menu -> options -> crop overscan). It’s the reverse with crop overscan ON

Beetle PSX HW crashes almost immediately on my system so I’m unable to test it.

What I’m proposing is that RA should take the currently detected resolution and multiply that by the user-selected integer scale factor to obtain the custom aspect ratio. The custom AR would be dynamic and would change during gameplay whenever the game’s detected resolution changed. Having an option to enable “dynamic custom AR” would solve the scaling problems with integer scale when using PSX emulators.

The same problem is discussed in this post: https://forum.fobby.net/index.php?t=msg&goto=3776&

Sadly, this is still an issue for Beetle PSX.

SwanStation does all of this correctly. Solution: use SwanStation

1 Like

Ok, yeah, this is still a problem, unfortunately.

Looking at FFVII again…

SwanStation reports 320 X 224 when on the overworld.

366x240 when on menu screen.

So… how do I get it to switch between these resolutions automatically and maintain integer scale?

The core knows what resolution the game should be, and it looks like it’s reporting this information correctly- the problem is the fixed integer scale. How do we get integer scaling to change on the fly to match whatever the game is currently outputting? Is a dynamic integer scaling possible?

I don’t quite understand why you use Custom AR for this when you don’t want any aspect stretching. PAR 1:1 in Core and Integer scaling in RA is not what you want?

1 Like

Ok, yes! That mostly works.

PAR 1:1 in Core and Integer Scaling + Core Provided in RA does the trick (4:3 in RA also works), BUT it is switching from 9x to 10x vertical scale. 9x in the menu, 10x on the overworld.

This tricked me into thinking there was a scaling problem because the slot mask pattern I use introduces a moire pattern with scanlines when used at non-even integer scales. :stuck_out_tongue:

So, everything is working as it should, BUT it would still be nice if there was a “maintain integer scale” option for this kind of situation, and keep it at 10x and crop a little extra when on the menu screen - I’m not sure what the cutoff is for integer scale overscale, but I’m guessing it’s too many cropped pixels and so it’s defaulting to 9x on the menu?

For now my solution is to just use a 9x friendly mask option (aperture grille works fine).

2 Likes

Didn’t realize this before, but it looks like when your content res matches your screen res in at least one direction with integer scale, overscale doesn’t work.

1 Like

That makes total sense, now. Not sure what the solution could be - ideally, we want the image to remain at a consistent integer scale.

Just disabling overscale works, I guess, but then you lose the benefits of overscale.

In your case your could either try the core cropping options or using a custom res like 2159p (or something like that, there might be driver limitations or such).

1 Like

Yes! That did it. It’s perfect now :smiley:

Core settings:

Crop Mode: Only Overscan Area

Core Provided Aspect Ratio: Uncorrected (PAR 1:1)

Retroarch settings:

Integer Scale: On

Integer Scale Overscale: On

Aspect Ratio: 4:3 or Core Provided

Crop Overscan: On

2 Likes

Are you using a newer version of RetroArch (1.21.0+) with the new X/Y/X+Y and Overscale/Underscale/Smart Options?

I generally force Underscale plus do Integer Scale on both X + Y with Custom Aspect Ratios and I haven’t noticed anything dynamic happening n the vertical axis. Maybe it’s just the games I’ve tried.

I remember disabling Crop Overscan and using Core Cropping and Aspect Ratio Options in some cores to solve some aspect ratio related issues preventing even checkerboard dithering and vertical power bars in some games at some point in time.

In Sony Megatron there’s an option to shift the screen including the mask horizontally or vertically in relation to the scanlines, which can help immensely with slot mask moire due to misalignment with scanlines.

I have noticed cases where some cores/scanline and mask combinations end up even at 9x but uneven at 8x and vice versa though.

I’m definitely going to try this but I generally don’t like to go over 8x/9x at 4K. I even relish 6x from near distances. It seems to sharpen the image and sort of lower the TVL.

You should take a closer look at it, I think you get less triads per pixel at lower scale settings so sometimes edges and finer details look a little rougher but then there are the brightness and FOV benefits.

1 Like

I’m still on 1.16 :joy: I’ve been away for a while…

That’s pretty cool, I’ll look into it!

I’m on a 27" monitor so it’s a bit of a different situation - I think you’re using a TV, correct? With a monitor I think the edge details are going to be more noticeable, and since I’m using an HDR1000 display, extra brightness isn’t much of a concern (could potentially help with some slotmask setups, though :thinking:)

1 Like