f18a icon indicating copy to clipboard operation
f18a copied to clipboard

Scan line decoupling

Open dnotq opened this issue 4 years ago • 0 comments

The scan line generation is currently tied to the pixel scan-out rate (pixel clock) and needs to be separated. This is to decouple the scan line pixel generation from the output video resolution. This is required for the MK2. To fix this:

  1. Change pixel scan line generation to a single line buffer that is shared between the tile layer and sprites. They are currently sequential processes (sprites are triggered once the tiles are done) using their own line buffers. This is wasting a 2K BRAM as well, which could be freed for additional VRAM.

  2. Change all internal pixel scan line generation to run at the main fast (typically 100MHz) clock. It currently has dependency on the 25MHz clock.

  3. Create the single line buffer as a dual-clock RAM to allow the scan-out to have its own pixel clock.

Note that the overall frame-rate of the F18A must remain at 59.94Hz to avoid problems with existing software. 59.973Hz was proven to be enough of a deviation to cause software on multiple platforms to crash!

So, even though the scan-out can have its own pixel clock, the overall scan line time cannot deviate from 31.778us and the vertical rate must remain at 59.9390Hz (59.40Hz).

dnotq avatar Aug 29 '19 05:08 dnotq