Post Reply 
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
Find all posts by this user
Quote this message in a reply
11-25-2023, 11:05 PM
Post: #2
RE: Suspending screen refresh
I don't know of a way to suspend the refresh. You can adjust the refresh rate by holding the On and Shift keys and then + or -. For rapid screen changes like this, the refresh rate can have a significant effect on artifacts like you are describing.

513016415223221833242338122322514610315
Find all posts by this user
Quote this message in a reply
11-25-2023, 11:15 PM
Post: #3
RE: Suspending screen refresh
Here is a thread with information on the refresh rate.

https://www.hpmuseum.org/forum/thread-14403.html

513016415223221833242338122322514610315
Find all posts by this user
Quote this message in a reply
11-26-2023, 04:48 AM
Post: #4
RE: Suspending screen refresh
(11-25-2023 11:05 PM)john gustaf stebbins Wrote:  I don't know of a way to suspend the refresh. You can adjust the refresh rate by holding the On and Shift keys and then + or -. For rapid screen changes like this, the refresh rate can have a significant effect on artifacts like you are describing.

John,
Please always read the questions to the end before responding Wink. In this case, you will see that what you mention, I also included in my question. I think only someone from Moravia - HP programmers, and probably no one else, can answer this question.
Anyway, thanks for trying.

Best wishes,
Piotr

Piotr Kowalewski
Find all posts by this user
Quote this message in a reply
Post Reply 




User(s) browsing this thread: 1 Guest(s)