GameboxSystems / Gamebox-Product-Firmware-Updates

Repository of firmware update binaries for FPGA based Gamebox projects
8 stars 0 forks source link

64HD firmware: VI-Deblur not working on PAL systems #1

Closed borti4938 closed 1 year ago

borti4938 commented 1 year ago

On PAL systems, the VI-Deblur feature does not work correctly. The algorithm samples/outputs the wrong pixel phase.

Detecting PAL mode and decide for correct sampling phase is not a big deal:

I would love to see this being considered in an upcoming firmware update! The PAL community highly appreciates such an update :)
Thank you!

GameboxSystems commented 1 year ago

Hi Borti!

Thanks for bringing this to my attention, will slate it for the next release. Since you linked your example, I may be able to whip up a hotfix since there is reference code.

Will update as soon as there is one.

-Postman

borti4938 commented 1 year ago

Quick update... I heard that the problem was that I changed the filter settings beforehand. And this was the case. My crosscheck with an NTSC game was just setting Deblur settings. Without changing the filter settings at all, deblur works on PAL, too.

I actually have no idea how you implemented the video processing pipeline. Just a wild guess: my impression is that deblur isn't considered during input sampling and demux of the data. May considering deblur at this point might fix the issue.

GameboxSystems commented 1 year ago

That's a very interesting observation indeed...

Deblur is handled in the scaling core during scaling and the filtering is done right after the n64 VI decoder core.

The pipe is AXI4 and on a very high level goes:

n64 VI decoder -> pixel filter -> SDRAM pixel packer -> SDRAM controller -> SDRAM pixel loader -> Scaler -> Video core

I think your observation is right in that deblur should perhaps even come before the pixel filter in the pipeline. That intuitively makes more sense.

When I have a moment to do more work on the firmware, I will implement this and report back here (hopefully) with a new firmware to release.

Thank you for the insight, Borti! It is invaluable to helping make 64HD an even better option for people. Any other issues you see pop up please do submit another issue for tracking.

GameboxSystems commented 1 year ago

@borti4938 thanks to your referenced code, this issue will be resolved in the next release.

The Approach that was taken previously didn't take into account the counters and signal timings from the n64 VI decoder. It should work perfectly now. Will unit test and push soon!

GameboxSystems commented 1 year ago

Fixed in v2.0.1

Kept deblur in scaler core as apposed to in the pixel decoder core. After testing, this methods sharpens the image more having it in the pixel decoding core.