Suspending screen refresh
|
11-25-2023, 09:46 PM
Post: #1
|
|||
|
|||
Suspending screen refresh
Question for Moravia.
I'm trying to create something that showcases the graphical capabilities of Prime, and it involves very dynamic graphics that change rapidly on the screen (the entire screen updates dozens of times per second), similar to demo-scene effects. I've noticed that even when I use a back buffer (G1-G9) to create the entire image and then BLIT_P it to G0, I still experience flickering, especially when the screen brightness changes quickly (e.g., dimming from white to black). It's evident that the screen is often refreshed before the entire buffer has been copied (so half of the screen can refresh in one cycle and the rest in the next cycle), which doesn't look good. I assume that Prime has allocated a certain area of memory (frame buffer) for displaying data, and then some mechanism (likely implemented using interrupts or a timer) retrieves this data and cyclically sends it to the screen's electronics (if it's implemented in a completely different way, please provide a brief explanation). My question is: Is it possible to suspend the screen refresh for a while? Specifically, can we suspend the refreshing and create an image during that time in a way that the changes aren't immediately visible on the screen, and then do a one-time refresh on demand to display these changes? I assume that the current firmware doesn't have this feature, but many programming languages have something like SuspendLayout (suspend refreshing), ResumeLayout (resume refreshing), and RefreshLayout (a one-time refresh on demand). Is it theoretically possible to implement such a mechanism on the Prime? It seems to me that it should be possible because the G2 already has the ability to control the refresh rate ([On] + [Shift] and [+]/[-]), and thanks to this capability, you can increase the refresh rate and minimize the flickering effect, but it cannot be eliminated entirely because it would require the complete disabling of refreshing and enabling it when the image is ready for display. If it were possible to completely disable the refresh, there would be no need to use an additional back buffer; you could directly access the G0 image, and when a specific frame of the image is ready to be displayed, trigger a RefreshLayout. Theoretically, this should also slightly improve performance because the screen refresh itself probably consumes processor cycles. Are there any possibilities in this regard? Best wishes, Piotr |
|||
« Next Oldest | Next Newest »
|
Messages In This Thread |
Suspending screen refresh - komame - 11-25-2023 09:46 PM
RE: Suspending screen refresh - john gustaf stebbins - 11-25-2023, 11:05 PM
RE: Suspending screen refresh - komame - 11-26-2023, 04:48 AM
RE: Suspending screen refresh - john gustaf stebbins - 11-25-2023, 11:15 PM
|
User(s) browsing this thread: 1 Guest(s)