Date:2011-04-29 18:20:56 (12 years 10 months ago)
Author:Werner Almesberger
Commit:a63579e119613fe225eb4de39aa5ad88c8e1e4ff
Message:ubb-vga2.c (line, frame): start line timer outside the "line" function

The indirection introduced with the non-contiguous frame buffer caused
significant horizontal distortions. We can compensate for them by
starting the timer before loading the line pointer and calling "line".
Files: ubb-vga/ubb-vga2.c (2 diffs)

Change Details

ubb-vga/ubb-vga2.c
230230
231231    /* Back porch */
232232
233    TCNT(TIMER) = 0;
234
235233    MSC_STRPCL = 1 << 3; /* reset the MSC */
236234// while (MSC_STAT & (1 << 15));
237235
...... 
351349    PDDATS = HSYNC;
352350    until(mode->line_cycles-US(0.79));
353351
354    for (p = f; p != f+mode->yres; p++)
352    /*
353     * Note: resetting the timer just before calling "line" isn't enough.
354     * We have t reset it before the loop and right after returning from
355     * "line".
356     */
357    TCNT(TIMER) = 0;
358    for (p = f; p != f+mode->yres; p++) {
355359        line(*p);
360        TCNT(TIMER) = 0;
361    }
356362
357363    /* Back porch */
358364    hdelay(14);

Archive Download the corresponding diff file

Branches:
master



interactive