Open athairus opened 9 years ago
N64, which we will soon support, has native widescreen games: http://www.mobygames.com/attribute/sheet/attributeId,278/p,9/
Store in the database for each system the type of screen it was intended to display on:
SDTV
will be assumed to be 4:3, though the user can override this.
HDTV
will always be 16:9... or should it?
Custom
can be anything at all!
For a system like the DS, whose only core DeSmuME outputs a differently-sized framebuffer depending on the screen gap setting (different heights), we will need to come up with yet another approach. Maybe this approach could be merged with whatever we use to let the user choose between assuming 4:3 or 16:9 video output for SDTV
?
For SDTV
, treat width and height separately:
( fbHeight > 240 ? ( fbHeight / 480 ) : ( fbHeight / 240 ) )
1.0
(I'm assuming that the framebuffer was always intended to be stretched across the screen width?)The algorithm works nicely. It's been added to merged into corecontrol
master
. I've also added in PAL support (currently not settable from UI) and widescreen (for those games that support anamorphic widescreen). These are all properties of VideoOutput
, the entire thing being controlled by a master property: bool television
.
TODO:
I did not realize that the Libretro API already has the ability to specify aspect ratio. In the case of the DS, it can change during runtime, but that wasn't too hard to work around.
The code I wrote is still used for anamorphic widescreen, so it's worth keeping.
Some games like Castlevania: SotN can render at resolutions like 512x240. I'm going out on a limb here but I don't think that 1:1 was the PAR the developers had intended the game to be presented at.
Solving this is tricky. I had originally assumed we could rely on the core to give us the proper aspect ratio implicitly via the dimensions of the framebuffer passed, but I hadn't taken into account the PAR being non-square.
A basic (naïve) solution to all this is to hard-code the aspect at 4:3. But this will fall apart with games that support widescreen (16:9) and also with people who believe console X really has an aspect ratio of 5:4 or 3:2 or whatever. And let's not forget handheld games, their aspect ratios are all over the place (but at least have a PAR of 1:1... right?)
Another solution is to store in the future Libretro/Phoenix database for each system the "native" aspect ratio. Things could still get tricky with newer games that let you configure the aspect ratio in-game (normal = 1:1 PAR, widescreen = ?:? PAR). We'd either have to let the user tell us what aspect ratio they want or actually examine the game's state to figure that out.
This issue only applies to cores whose original systems were capable of displaying on analog TVs. That's not a huge chunk of what we support... is it? :)