OpenEmu / Mednafen-Core

OpenEmu Core plugin with Mednafen
29 stars 22 forks source link

Feature Request:HD Mode 7 and Widescreen support for Snes Like Bsnes #24

Open ghost opened 3 years ago

ghost commented 3 years ago

I love HD Mode 7 and WIdescreen,but I don't like Bsnes because it doesn't have Netplay, (to my knowledge) and isn't Eyecandy,so it would be awesome to be able to use HD Mode 7 and Widescreen in Mednafen.

PatTheMav commented 3 years ago

If I'm not mistaken there are no plans to use Mednafen for SNES emulation, as "2 cores are enough".

There are valid use cases for widescreen support though: Some late-generation PS1 games supported stretched output on 16:9 TV sets by squashing the rendered output which is then stretched to correct proportions by the TV.

~Wipeout 3 is one title that works that way and using vanilla Mednafen this is possible by setting psx.stretch full in a config override file for it.~

~I understand that OpenEmu errs on the side of accuracy and correct emulation (which I appreciate) but this is one widescreen use case that (IMO at least) would be authentic to what was officially possible on a PS1 with a widescreen CRT.~

EDIT: After some research I came to the conclusion that what I stated originally is not entirely correct. Mednafen uses a hardcoded aspect ratio (based on calculations by its original author) to emulate a PS1's 4:3 aspect ratio as observed on NTSC sets (with some scanline corrections for PAL).

Games like Wipeout 3 support widescreen insofar as their internal rendering creates a "squished" frame (assuming a 16:9 target ratio) which then needs to be stretched by the TV again to look correct. For 4K/5K/8K this can be achieved with integer scaling (as each height is cleanly divisible by 240/480), not so for 1080p which would require some rounding for the x-axis.

This means a 5K iMac could display Wipeout 3 at 5120 x 2880 without fractional scaling (as could a 4K or 8K TV), but not pixel-perfect (which, iirc requires scaling with a multiple of 2 on both axes). As always this wasn't a problem on CRTs which didn't have pixels and thus could stretch the image to whatever width they needed.

As such the "correct" game-specific override for Mednafen requires setting psx.stretch full (to disable Mednafen's built-in aspect ratio) and setting correct values for psx.xres and psx.yres to either 4K/5K/8K or - as compromise - a proper full-integer scaled height and rounded corresponding width.

(Note that this gets even weirder for SNES emulation as the console renders internally at 8:7, but then stretches its output to 4:3 which even Nintendo didn't account for in its art design, hence "fat" Link and the non-circular logo in Mario All-Stars).