To fix it, add a "vdpIsReady = false;" right after your call to vdp_waitVDPReadyInt(), because that function forgets to reset the flag after waiting, leaving it set to true pretty much all the time. By the way, it may be a better idea to increment it in the interrupt handler (use uint8_t rather than bool) so you can still keep track of missed frames when aiming for 30 frames per second rather than 60.
For another way of noticing missed frame updates, if you have a sound channel available, you can play a tone in your frame processing loop. Easier to notice than a flickering light.
Code: Select all
if (vdpIsReady)
playNoteDelay(2, 71, 40); /* High, short note. */
vdp_waitVDPReadyInt();
vdpIsReady = false;