|
From: Giacomo G. <gi...@ga...> - 2003-09-09 16:10:31
|
Hi all
ok, I underestimate the video scroll function... it takes 1900 us sec on
a P3 celeron.
So the ABORT 64 error with system TICK of 1000 it's normal... anyway
with one shot mode it shouldn't happen. I suggest to change the ll_timer
to skip
the abort test in case of one shot.
I modified also the scroll function:
void _scroll(char attr,int x1,int y1,int x2,int y2)
{
register int x,y;
WORD xattr = attr << 8,w;
LIN_ADDR v = (LIN_ADDR)(0xB8000 + active_page*(2*PAGE_SIZE));
for (y = y1+1; y <= y2; y++)
for (x = x1; x <= x2; x++) {
w = lmempeekw((LIN_ADDR)(v + 2*(y*cons_columns+x)));
lmempokew((LIN_ADDR)(v + 2*((y-1)*cons_columns+x)),w);
}
for (x = x1; x <= x2; x++)
lmempokew((LIN_ADDR)(v + 2*((y-1)*cons_columns+x)),xattr);
}
//#define OPTIMIZED
#ifdef OPTIMIZED
void scroll(void)
{
int x;
WORD xattr = bios_attr << 8;
LIN_ADDR v = (LIN_ADDR)(0xB8000 + active_page*(2*PAGE_SIZE));
memcpy((LIN_ADDR)(v),
(LIN_ADDR)(v + 2*cons_columns),
cons_columns*(cons_rows-1)*2);
for (x = 0; x <= cons_columns-1; x++)
lmempokew((LIN_ADDR)(v + 2*((cons_rows-1)*cons_columns+x)),xattr);
}
#else
void scroll(void)
{
_scroll(bios_attr,0,0,(cons_columns-1),(cons_rows-1));
}
#endif
with the optimized one I got 1200 us instead of 1900... not much but
it's called many times.
Regards
Giacomo
|