Provenance-Emu / Provenance

iOS & tvOS multi-emulator frontend, supporting various Atari, Bandai, NEC, Nintendo, Sega, SNK and Sony console systems… Get Started: https://wiki.provenance-emu.com |
https://provenance-emu.com
Other
5.93k stars 686 forks source link

Overscan/Letterbox/Black Bars/Dead Space Auto-Cropping #436

Open msikma opened 7 years ago

msikma commented 7 years ago

A lot of NES emulators provide an option to cut off an overscan area to simulate the slightly smaller viewable area of the NES image on a TV. Although overscan is technically complicated and partly TV-dependent, emulators generally cut the picture from 256x240 to 256x224. This is because some games have glitch pixels in the far top and bottom of the screen since they did not get displayed on a TV anyway.

It would be nice to have an option in the settings to cut off the top and bottom 8 pixels, called something like "Trim NES border area."

(This might also be useful for other consoles, I'm not sure.)

I'm using a build from master, commit a3e072b.

msikma commented 7 years ago

Is there any chance that I could get an invite for the dev Slack? I've been trying to work on this, but I'm looking for the best place to actually take off the pixels. Some guidance would be ideal. Right now I'm looking at Provenance/Emulator/PVGLViewController.m/glkView:drawInRect but I'm not sure that's the best place.

jasarien commented 7 years ago

Let me know an email for the invite. As far as the pixel trimming, it's more likely to be an option in the emulator itself than something we want to do manually on rendering.

msikma commented 7 years ago

Yeah, you're right. I'm thinking that it's a setting (to enable/disable) which gets looked up and utilized when the emulator core returns its rendered buffer. If you could send an invite to [removed email] I would appreciate it :)

sevdestruct commented 6 years ago

There has been discussion about this, I need to pull it here, as I think there is differences across cores so we might need something like a multi frame check to find out what the dead space is before it gets dropped (check the bottom of Chrono Trigger for instance, or final fantasy vii, the sides of Mario on new or all NES games which Joe found some overscsn documentation about specifically.

Ah, the notes are in my Trello board.:

Some games leave dead space we could try to detect and eradicate, similar to how black bars are clipped out via checking multiple frames for consistent block of dead rectangular space on edges.


Joe found this: https://wiki.nesdev.com/w/index.php/Overscan regarding overscan for NES specifically since it flickers and isn't consistent. "also goes into why there are variations into the center position on games"