It was a long time ago, but I know I was experimenting with that. The “odd/even” pad on the Video Experimenter board will be HIGH if the video signal is the odd frame, and LOW if the even frame. Connect this signal to an Arduino pin (in the case below, it is digital pin 10) and make the capture conditional on this pin being HIGH. Remember to do pinMode(10, INPUT) somewhere in your setup().
This is the code at the end of the function blank_line() in TVout/video_gen.cpp:
// BEGIN Video Experimenter
// original code
//if ((dataCaptureBuf != 0) && (display.scanLine == dataCaptureLine)) {
// capture only if ODDEVEN pin is HIGH
if ((dataCaptureBuf != 0) && (display.scanLine == dataCaptureLine) && ((PINB & 0x4) > 0)) {
render_line = &dataCapture_line5c;
wait_until(dataCaptureWait);
render_line();
render_line = save_render_line;
}
display.scanLine++;