Z80 Assembly 25: Timing the Frame Rate (VSync) for Smooth Animation
The Problem: Screen Tearing If your Z80 code draws objects to the screen while the video hardware is actively reading and displaying that part of memory, you get a visual artifact called screen tearing (a horizontal break in the image). The Solution: VSync (Vertical Synchronization) Vertical Synchronization, or VSync, is the process of waiting until the video beam has finished drawing the current frame and is resetting to the top of the screen (the Vertical Blanking Interval, or VBI). By drawing only during the VBI, you ensure the user never sees partially rendered frames. ...