ISR (TIMER0_COMPA_vect)
{
- if(line == 310) vsync(0);
- else if(line == 622) vsync(1);
- else
+ if(line == 310) vsync(0); // End of ODD fields, start vsync'ing
+ else if(line == 622) vsync(1); // End of EVEN, start vsync'ing
+ else // In frame. Generate a hsync pulse, then do some drawing :)
{
hsync();
- int t_line = line;
+
+ int t_line = line; // Reducing line-count complexity by half ;)
t_line = ( line > 312 ) ? line - 312 : line;
+ // Draw the logo-image centered vertically
if ( t_line > 118 && t_line < 118 + (2*testimg_height) )
{
- _delay_us(12);
+ _delay_us(12.3);
asm_render_line();
+ // Stretch the image vertically by repeating the same line twice
if( !stretch )
{
stretch = 1;