MiSTer-devel / MegaDrive_MiSTer

Sega Megadrive for MiSTer
47 stars 17 forks source link

Feature Request: Two-frame interpolation #42

Open jinshin opened 9 months ago

jinshin commented 9 months ago

I'm unsure how this exact feature could be called - i've seen it's called "flickerblend" in Lynx core. To start - there's a Samurai Shodown game, that shadows implementation (drawing black sprite at 30Hz) possibly expects some big phosphorous afterglow, which is not present on modern display. Long time ago, while working on Genesis Plus, i've added an additional prescaler for this case, which renders frame as interpolation between previous and current picture. Demo: https://www.youtube.com/watch?v=2e2vff28jyU&t=74s Discussion on MisterFPGA forum: https://misterfpga.org/viewtopic.php?t=7714 To be honest, it's the only game i know, that could benefit of that kind of prerender, but i guess it won't take much processing power. But, setting some other afterglow levels, for example 1/4 previous 3/4 current might give some nice cinematic (long exposure film) effect to all games. I would love to do that myself, but so far FPGA programming looks like magic for me.

birdybro commented 4 months ago

https://github.com/MiSTer-devel/Gameboy_MiSTer/pull/113/files - the pull request from paulb-nl that made this kind of change to the Gameboy core for reference. It might introduce some timing complications as the MegaDrive core is already fairly large (occupies a lot of space on the FPGA) and complex and the resolution/width of the rgb data being blended is larger in this case. Just wanted to give you an example of how to do it in verilog (which is c-like).

The issue is, the changes to the handheld cores have a ghosting effect with the frameblending which is intentional because that is how those LCDs looked. The video you linked has this same ghosting issue when the characters move which isn't very pleasant to the eye personally.

Doing this without ghosting in hardware is harder since you don't have the privileges that software emulators have.

It wouldn't be as simple to do as the NES extra sprites option either.

The Megadrive core is also written like a netlist so figuring out how to do this would be like modding a decapped chip.

In summary, not easy to do (the right way, without the ghosting of simple interpolation).