DerKoun / bsnes-hd

bsnes fork that adds HD video features
GNU General Public License v3.0
625 stars 35 forks source link

Feature Request: Overscan Bit Override #34

Open FitzRoyX opened 4 years ago

FitzRoyX commented 4 years ago

Per my forum article here https://www.retrowide.com/forums/viewtopic.php?f=14&p=14&sid=cd234fe23905cce0416eedc03e6a5aef#p14

I'm not sure how you want to implement this, but I think the best way is to move away from "aspect" selections and offer resolution dropdowns instead. For example:

Horizontal: 384 448 480

Vertical: 216 224 240

If you do it like this, then "overscan override" doesn't have to be some separate option that looks alien to people. It can simply be enabled when 240 vertical res is selected.

DerKoun commented 4 years ago

I gave the override a quick try and it turned out more complex than I thought. It most likely won't make it into the next release. I'll look into overhauling the overscan options entirely and include this if possible. I won't replace aspect ratios with resolutions. That would be significantly more difficult for users. I'll improve documentation for ROM-hackers and developers as good as I can.

FitzRoyX commented 4 years ago

Hmm, well I see resolution selectors in almost all my emulators and games. This is the first time I've seen an aspect selector, since one aspect can be shared by multiple resolutions. I know that when I first saw "16:9", I wondered if it meant 384x216 cropped, 398x224 rounded, or maybe even 448x252 letterboxed.

DerKoun commented 4 years ago

Please name/link some of those emulators, so I can have a look, maybe get inspired.

FitzRoyX commented 4 years ago

ZSNES (jk). Any 3d emulator will have one, so epsxe and project64. However, the more appropriate comparison would be any 2d game that has fairly customizable width & height. So i.e. HoMM3HD and Diablo 1 HD.

The fact that there's an "Aspect Correction" option ontop of "Aspect Selection" complicates things too. Its behavior and effect on the frame was predictable when render width was fixed at 256. Now that render width is variable, it should more appropriately be called "Widen PAR" and have no effect on the frame.

There's too much hidden interplay between all these separate options. Aspect Correction widens frame Aspect but not rendered aspect. Show Overscan narrows rendered and frame aspect and diminishes the effect of Aspect Correction. Chrono Trigger's moon isn't worth any of this :P

DerKoun commented 4 years ago

Aspect Correction is indeed a name that has gotten confusing. I'll change it. The rest I'll have to delay for now, so I can get the next bugfix release done.

FitzRoyX commented 4 years ago

No problem. I was eager to see what 448x240 looks like, so I made a test build for it. Advantages: -max view distance -12px away from 16:9 -wont crop any title -can fill 240p handhelds. -doesn't perfectly scale into 1080p, but the windowboxing is still far less empty space than 256x240. -will require per-game fixing of overscan glitches, but since hackers have to hack the game anyway...

Overscan cropping and PAR widening options were indeed hooked into calculation, so this took a bit longer than I wanted. But whatever, I managed to create a build that:

-Sets the internal rendering, viewport frame, and default output to 448x240. The frame is not dynamic as that takes a lot of code and more skill than I have. So changing to other aspects will only break stuff. -changed all defaults to unblurred, unstretched. -removed "aspect correction" aka PAR widening from the UI. It is not removed internally because I lack the skill. -there are two patches and save files included for SMW and LTTP. They will enable the overscan bit. Alternatively, the PAL version of SMW both enables overscan and fixes its timing impacts, but it's 50fps.

Source included. bsneshd448x240.zip

DerKoun commented 4 years ago

A finding worth archiving here: It seems that game specific issues caused by forcing the overscan bit can be mitigated by also setting some overclocking. This should be analyzed when implementing the setting and documented prominently.