Avamander / arduino-tvout

Arduino-TVout
333 stars 83 forks source link

Support for high resolution? #148

Open L1uTongwei opened 1 year ago

L1uTongwei commented 1 year ago

look these codes in video_gen.cpp:

//selects the widest render method that fits in 46us
//as of 9/16/10 rendermode 3 will not work for resolutions lower than
//192(display.hres lower than 24)
unsigned char rmethod = (_TIME_ACTIVE*_CYCLES_PER_US)/(display.hres*8);
switch(rmethod) {
case 6:
    render_line = &render_line6c;
    break;
case 5:
    render_line = &render_line5c;
    break;
case 4:
    render_line = &render_line4c;
    break;
case 3:
    render_line = &render_line3c;
    break;
default:
    if (rmethod > 6)
        render_line = &render_line6c;
    else
        render_line = &render_line3c;
}

It seems that the cycles would make effort to render mode. Now I have 16Mhz ATmega328P, what is the max resolution? (If we don't care memory...) Do 640x480 even 1024x768 possible?

L1uTongwei commented 1 year ago

Then, in order to read information of line, I edit render functions:

for(int16_t i = 0; i < display.hres; i++){
    display.screenBuffer[i] = display.screen[renderLine * (uint32_t)display.vres + i];
}
//......

Would it change the feature?