You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I hope this is the correct way to ask a question like this.
I am making games using this library and I would like to be able to have the game wait for the vertical sync, to avoid tearing. I've read up a bit on the subject and found two potential ways to do this.
Use the Set virtual offset tag, as discussed here. < https://www.raspberrypi.org/forums/viewtopic.php?t=19073 > So I've tried calling CBcmFrameBuffer::SetVirtualOffset and it returns with no error (TRUE) but the game is still not waiting for VSync.
So then I found this.
Enable fake_vsync_irq in config.txt and listen to IRQ 48, as discussed here < VSync IRQ? raspberrypi/firmware#67 > So I tried connecting an IRQ handler like so:
m_Interrupt.ConnectIRQ( ARM_IRQ_SMI, IRQParty, (void*)0 );
But for some reason that function never returns. If I add logging before and after that function call I see that the log message before the call is printed but not the message after.
Soooooo I guess my question is, how can I wait for vsync using the Circle library?
Thank you very much for an awesome library. Super easy to use and very lightweight! My game is running within a second after the power switch is flipped, rather than first having to wait for ages for Raspbian to boot up. That is fantastic!
The text was updated successfully, but these errors were encountered:
The second method works well. I have tested it with the attached test program on a RPi A+, 2, 3 and Zero.
I guess you are using a RPi 2 or 3? The address for resetting the SMI is 0x3F600000 there, not 0x20600000 like on the RPi 1. That's why your SMI IRQ handler is called all the time and the second log message cannot be displayed.
Hi,
I hope this is the correct way to ask a question like this.
I am making games using this library and I would like to be able to have the game wait for the vertical sync, to avoid tearing. I've read up a bit on the subject and found two potential ways to do this.
So then I found this.
m_Interrupt.ConnectIRQ( ARM_IRQ_SMI, IRQParty, (void*)0 );
But for some reason that function never returns. If I add logging before and after that function call I see that the log message before the call is printed but not the message after.
My IRQ handler looks like this:
Soooooo I guess my question is, how can I wait for vsync using the Circle library?
Thank you very much for an awesome library. Super easy to use and very lightweight! My game is running within a second after the power switch is flipped, rather than first having to wait for ages for Raspbian to boot up. That is fantastic!
The text was updated successfully, but these errors were encountered: