[Mednafen PSX] Crop Overscan Misaligned

[QUOTE=Tatsuya79;39952]It’s missing some pixels on the right side for Castlevania Symphony Of The Night (J), then I’m not sure for other games, I’ll have to check again later.[/quote]I just tested it, and that’s no different from the US version that I’ve been playing. [ol] [li]No crop. Black borders all around, image is the wrong aspect ratio when RA is set to 4:3.[/li][li]Crop overscan. Black borders top and bottom, black band down the left, some of the image on the right is cropped.[/li][li]Offset -2px. Black borders top and bottom, image is properly centered and nothing is lost.[/li][li]Set first/last scanlines (20/226). Image fills the screen and is in the proper 4:3 aspect ratio.[/li][/ol]

[QUOTE=Tatsuya79;39952]I don’t know what’s happening with your CRT-Geom screenshot. By default there is black empty space on each side of a game I launch (overscan is OFF). The picture is narrower than 4:3 because of that. Then I change overscan_x = “109.000000” in the shader options and it remove the empty space making the picture 4:3 (larger on screen).

Perhaps that’s because of the widescreen hack or something? I’m not sure.[/quote]Can you post screenshots taken with the “take screenshot” option? I’ve not seen that behavior at all.

[QUOTE=Tatsuya79;39952]I have to do more testing with that overscan option though, I was just giving my current method as an alternative. But the scanline start/end option needing a restart makes it a bit tedious.[/QUOTE]I agree, it would be nice if the scanline could be updated without needing a restart, like some of the other cores do. (e.g. Mednafen PCE Fast) I have RA configured to automatically create and load a savestate which helps speed that up a lot. This is still much faster than the way I was previously filling the screen by having to manually calculate a custom viewport setting though. EDIT: Make sure that you use the “create game-options file” option before adjusting scanlines. Then you are changing them on a per-game basis, rather than adjusting the core defaults. (which affects every game)

Now I don’t know how RetroArch identifies games, but if it is able to read a PSX ISO or BIN/CUE etc. and pull a unique identifier for the game such as SLPM-86023 for “Akumajou Dracula X - Gekka no Yasoukyoku (J) (v1.2)” when it runs, then it might be possible to start creating a database for offsets, scanline, and aspect ratio profiles. I don’t have a huge library of PSX games, but I’d love to be able to contribute to something like that. Even better if scanline options (and ideally a left/right crop setting as well) became universal across all cores and we started to build a database for all games.

[QUOTE=larch1991;39958]Can you post screenshots taken with the “take screenshot” option? I’ve not seen that behavior at all. [/QUOTE] Sure, looks like this: http://postimg.org/image/yoapkmwez/full/

But your crop is good, guess I did it wrong. I’ll have to do it again and see if that’s better overall.

(there’s an aspect ratio setting in crt-geom 1 / 0.75 by default, perhaps that’s what changes this overscan cut behaviour)

Looks like the shader only behaves that way if you have curvature enabled. [ul] [li]Curvature Enabled[/li][li]Curvature Disabled[/li][/ul] Again, it’s much better to have the core handle this than a shader, since you then have the option of using any (or no) shader that you want.

Gradius Gaiden (J) (v1.1) [SLPM-86042] needs more horizontal cropping than the default overscan crop. Only 1 I found in my small list.

[QUOTE=Tatsuya79;39980]Gradius Gaiden (J) (v1.1) [SLPM-86042] needs more horizontal cropping than the default overscan crop. Only 1 I found in my small list.[/QUOTE]Yes, that’s why we need left/right crop controls in addition to the scanline controls. Crop overscan only literally crops the overscan region of the image. If the game is not rendering to the full active picture area, we need custom controls to crop the image further.

Again, a shader may work, but it’s not the proper solution.

I put in a PR to move ‘crop overscan’ over to a core option that you can toggle at runtime and added an option to crop out a couple more pixels, if necessary.

I was going to do left/right controls but it turns out that the resolution changes way too often, even within a single game, to rely on that. The existing behavior is more adaptive.

Nice that’s great!

Well, it’s the same for initial/end scanlines. Castlevania is quite the example of this.

Hmm, I don’t really know what the best solution would be. There does need to be some way of cropping the image.

With 4:3 games on a 16:9 screen, you can cheat and tell RA to render a wider aspect ratio. Instead of rendering 4:3 (1.33:1) I can tell Gradius Gaiden to render an aspect ratio of 1.40350877192982:1 so that the center portion of the image is displayed as 4:3. [ul] [li]4:3 (1.33:1) [/li][li]1.40350877192982:1[/ul] [/li]However that doesn’t work for 16:9 games, since the black bars at the sides are still being rendered. When you do that with a 16:9 game, you end up with a black border around the entire image. And it takes a lot more time than I’d like to figure out the internal resolution of a game and then calculate the aspect ratio required to correct it.

From that github page, it looks like there are five horizontal resolutions supported by the PSX: 256, 320, 364, 512, 640. What I would personally prefer would be a full set of initial/last scanline, left/right crop, and offset controls for each resolution individually. That would let you have a perfect image which fills the viewport at all times, even if the game switches between multiple resolutions. I would be surprised if a game switched between more than two resolutions though, so it wouldn’t be that much work to set up - maybe 60 seconds at the start of a game that I’ll be playing for several hours.

With Symphony of the Night for example, the game switches between 256x240 for gameplay, and 364x240 for the menus. However the gameplay actually renders 256x207 with a -2px offset while the menus are 360x200 with an 0px offset. With individual controls, it would be easy to ensure that both resolutions fill the viewport perfectly.

I realize that’s more work than most people probably want to do for a game. But if you had a database for this, it becomes automatic for any game which is in it.

Scaling is one of RetroArch’s biggest advantages over other emulators/front-ends, and I’d love to see them expanded like this. It would make RA the definitive way to play PSX games - even beyond using the original hardware on a CRT.

Ideally the core would also be updating RA with the internal resolution as it changes, as Genesis Plus GX does now: [ul] [li]Castlevania Blodlines - Title Screen (1:1 PAR) [/li][li]Castlevania Bloodlines - Gameplay (1:1 PAR) [/li][/ul] Some 2D games not only switch resolutions, but they are intended to be viewed at 1:1 PAR rather than a fixed 4:3 aspect ratio. (this being one of them) That’s not currently possible in the Mednafen PSX core, you can only select one aspect ratio to apply to everything.