View Single Post
Old 04 March 2021, 18:40   #4
grond
Registered User
 
Join Date: Jun 2015
Location: Germany
Posts: 1,918
Quote:
Originally Posted by Cobe View Post
Meaning what? At second vbl it wont be called again cause its already being executed?
An IRQ of the same priority cannot interrupt a running IRQ, hence, the VBL can't interrupt the VBL still being executed. Since the interrupt source is cleared at the beginning of the interrupt handler and the new VBL sets it again, in the moment the interrupt routine quits (and the IRQ status flag is cleared), the next VBL will be triggered. This would also happen if the raster beam is now already drawing a new frame onto the monitor such that the VBL would be delayed. If the VBL routine runs for two frames or more, one VBL will be dropped.

Old games often had almost all game code in the VBL routine so that it was synced from the VBL. This is not advisable and a rather ugly hack. Of course, this must not be done at all if you have the OS running.
grond is offline  
 
Page generated in 0.06161 seconds with 11 queries