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 | ||
---|---|---|
230 | 230 | |
231 | 231 | /* Back porch */ |
232 | 232 | |
233 | TCNT(TIMER) = 0; | |
234 | ||
235 | 233 | MSC_STRPCL = 1 << 3; /* reset the MSC */ |
236 | 234 | // while (MSC_STAT & (1 << 15)); |
237 | 235 | |
... | ... | |
351 | 349 | PDDATS = HSYNC; |
352 | 350 | until(mode->line_cycles-US(0.79)); |
353 | 351 | |
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++) { | |
355 | 359 | line(*p); |
360 | TCNT(TIMER) = 0; | |
361 | } | |
356 | 362 | |
357 | 363 | /* Back porch */ |
358 | 364 | hdelay(14); |
Branches:
master