The “crop overscan” option is misaligned by one column of pixels when using the Mednafen PSX core. This results in a black column of pixels on the left of the image, and the last column of pixels being cropped.
If I’m looking in the right place, it looks like this changes depending on the game’s width:
Does it do this everywhere or just on certain games/screens?
I’ve checked two titles so far: Symphony of the Night, and WipEout (the original).
It seems that I was mis-remembering Symphony of the Night. It’s cropped from 280px to 256px and is shifted over two columns, not one. [ul] [li]Uncropped [/li][li]Cropped [/li][/ul] WipEout is cropped from 350px to 320px and shifted over one column. [ul] [li]Uncropped [/li][li]Cropped [/li][/ul]
I’ll have to try and test some other titles to see if this is a constant offset, or if it varies from game to game. It’s difficult to do this however, as the scale is fixed at multiples of 320px for Mednafen PSX core, it doesn’t get updated based on the internal resolution. So SotN resizes in 320px multiples instead of 256px for example.
Tested Silent Hill, which renders 350px and is cropped to 320px. The image is centered correctly. In the uncropped image, there are 14px borders on the left and 16px borders on the right. [ul] [li]Uncropped [/li][li]Cropped [/li][/ul] So it seems to vary game to game. Would it be possible to have an core option to adjust the offset? Keep the defaults as “0” and allow it to be shifted maybe 10px left or right?
Though I do wonder if the default should result in evenly spaced bars on either side, or be left as it is. I’ve no way of knowing whether the majority of games are perfectly centered or not.
I suppose we could probably add a core option that adds or subtracts from that pix_offset number.
That would be great, thanks.
Alright, I opened a PR for it. We’ll see if it gets merged.
EDIT: and now it’s merged.
What would be great is a gamefixes database file that the plugin could pull from for per game specific things like this and overclock settings that could be used with a core option setting of auto game fixes.
per-game core options are easy to setup. You guys could start up a repo (github would work for it) that has that sort of thing in it.
If someone wants to set that up, I’d be happy to contribute once this option is available.
This seems to have made it into the latest build and it works exactly as I would have hoped! It does crash the program immediately if I make an adjustment and return to the game, but if I save the change and close the core first or set it manually in my config beforehand, the offset works as expected.
So now I’ve gone from: [ul] [li]Manually finding the game’s native resolution.[/li][li]Measuring the output aspect ratio.[/li][li]Calculating a corrected aspect ratio to give me a correct 4:3 image[/li][/ul] To selecting a 4:3 or 16:9 output with crop overscan enabled, then shifting the image over a pixel or two with the offset if necessary. It might not sound like much, but it saves a considerable amount of time.
Glad it’s working
That crash is troubling, though. I didn’t have any problem with that, though I tested with libretro-pause disabled (that is, so the game kept running in the background while i was in the menu). Can you get a backtrace on the crash? I’ll try to reproduce it on my end with libretro-pause enabled.
Did a bit more testing - it crashes when the crop overscan option is disabled - which I had been using for most of my profiles until this option was added.
ohhhhh. hmm. okay. I wouldn’t have expected it to do anything if crop overscan is disabled. I’ll have to investigate.
That’s what I would have expected too. Hopefully an easy thing to fix. That said, I haven’t encountered a game where you would want to keep the overscan visible now that it’s possible to adjust the offset.
I had originally thought about something like that and of course setting up a git repo would be easy but then I thought about filenames. We have no-intro, redump & trurip each with their own filenames. Which is why I was thinking about a having the core check the disc maybe something similar to what reicast core is doing but then pull from a database that contains the overscan & overclock values based on the disc id. I really wished my c skills were much better to at least have a p.o.c.
The crash with crop overscan disabled should be fixed now.
Never used that crop overscan option with mednafen PSX, didn’t know it worked. I’ve tried a bit but it’s cutting too much picture, I prefer having full control.
I’m using shaders instead:
-image adjustment shader in 1st pass to center the picture vertically and horizontally -CRT geom where I tweak the overscan options
Then cgp with the values + per core cfg pointing to them for each game.
But that’s still annoying how the resolution keeps changing on that system…
Confirmed, thanks!
[QUOTE=Tatsuya79;39919]Never used that crop overscan option with mednafen PSX, didn’t know it worked. I’ve tried a bit but it’s cutting too much picture, I prefer having full control.[/quote]What games are you having problems with? Everything that I’ve tested so far on the PSX has no picture information in the overscan area.
[QUOTE=Tatsuya79;39919]I’m using shaders instead: -image adjustment shader in 1st pass to center the picture vertically and horizontally -CRT geom where I tweak the overscan options[/quote]Shaders can’t crop the image, they can only mask it. [ul] [li]CRT-Geom horizontal overscan 100 [/li][li]CRT-Geom horizontal overscan 108 [/li][li]CRT-Geom horizontal overscan 114 [/li][li]Crop Overscan Enabled [/li][/ul] Adjusting overscan in the shader has zero effect on scaling in RetroArch, it can only mask the image, making it narrower. The “crop overscan” option displays the image correctly by removing the black overscan pixels. (WipEout 3 in widescreen mode)
That’s why I’m so happy that this new option has been implemented. If you’re using non-integer scaling, everything works great on the PSX core now. Once you’ve set the initial/last scanline for the game, you get a proper 4:3 or 16:9 image.
Integer scaling is a no-go right now though, as the core doesn’t update RetroArch with the internal resolution of the game. It reports that it’s running at 320x240 at all times. That doesn’t work if the game is 256px or some other internal resolution, or changes its resolution dynamically. And it doesn’t update the vertical height when you use the scanline options. (again, using 240px at all times) Genesis Plus GX is an example of a core that does an excellent job of updating the internal resolution, as it will actually switch during gameplay if you have the aspect ratio set to the “1:1 PAR” option - though that core is lacking scanline options to crop the image vertically.
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. But I just play 2D games: Gradius, Zanac, Ralph… Only 3D game I have is Tobal 2.
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.
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.