mirror of
git://projects.qi-hardware.com/ben-blinkenlights.git
synced 2024-12-26 08:41:45 +02:00
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".
This commit is contained in:
parent
623f3ccbe3
commit
a63579e119
@ -230,8 +230,6 @@ static void line(const uint32_t *line)
|
||||
|
||||
/* Back porch */
|
||||
|
||||
TCNT(TIMER) = 0;
|
||||
|
||||
MSC_STRPCL = 1 << 3; /* reset the MSC */
|
||||
// while (MSC_STAT & (1 << 15));
|
||||
|
||||
@ -351,8 +349,16 @@ static void frame(void *const *f)
|
||||
PDDATS = HSYNC;
|
||||
until(mode->line_cycles-US(0.79));
|
||||
|
||||
for (p = f; p != f+mode->yres; p++)
|
||||
/*
|
||||
* Note: resetting the timer just before calling "line" isn't enough.
|
||||
* We have t reset it before the loop and right after returning from
|
||||
* "line".
|
||||
*/
|
||||
TCNT(TIMER) = 0;
|
||||
for (p = f; p != f+mode->yres; p++) {
|
||||
line(*p);
|
||||
TCNT(TIMER) = 0;
|
||||
}
|
||||
|
||||
/* Back porch */
|
||||
hdelay(14);
|
||||
|
Loading…
Reference in New Issue
Block a user