/* * The hardware cursor definition requires 2 bits per pixel. The * Cursor size reguardless of the visible cursor size is 64 pixels * by 64 lines. The total memory required to define the cursor is * 16 bytes / line for 64 lines or 1024 bytes of data. The data * must be in a contigiuos format. The 2 bit cursor code values are * as follows: * * 00 - pixel colour = CURSOR_CLR_0 * 01 - pixel colour = CURSOR_CLR_1 * 10 - pixel colour = transparent (current display pixel) * 11 - pixel colour = 1's complement of current display pixel * * Cursor Offset 64 pixels Actual Displayed Area * \_________________________/ * | | | | * |<--------------->| | | * | CURS_HORZ_OFFSET| | | * | |_______| | 64 Lines * | ^ | | * | | | | * | CURS_VERT_OFFSET| | * | | | | * |____________________|____| | * * * The Screen position of the top left corner of the displayed * cursor is specificed by CURS_HORZ_VERT_POSN. Care must be taken * when the cursor hot spot is not the top left corner and the * physical cursor position becomes negative. It will be displayed * if either the horizontal or vertical cursor position is negative * * If x becomes negative the cursor manager must adjust the CURS_HORZ_OFFSET * to a larger number and saturate CUR_HORZ_POSN to zero. * * if Y becomes negative, CUR_VERT_OFFSET must be adjusted to a larger number, * CUR_OFFSET must be adjusted to a point to the appropriate line in the cursor * definitation and CUR_VERT_POSN must be saturated to zero.
*/
// Clear cursor image with 1010101010...
fb_memset_io(dst, 0xaa, 1024);
offset = align - width*2;
for (i = 0; i < height; i++) { for (j = 0; j < width; j++) {
u16 l = 0xaaaa;
b = *src++;
m = *msk++; switch (cursor->rop) { case ROP_XOR: // Upper 4 bits of mask data
l = cursor_bits_lookup[(b ^ m) >> 4] | // Lower 4 bits of mask
(cursor_bits_lookup[(b ^ m) & 0x0f] << 8); break; case ROP_COPY: // Upper 4 bits of mask data
l = cursor_bits_lookup[(b & m) >> 4] | // Lower 4 bits of mask
(cursor_bits_lookup[(b & m) & 0x0f] << 8); break;
} /* * If cursor size is not a multiple of 8 characters * we must pad it with transparent pattern (0xaaaa).
*/ if ((j + 1) * 8 > cursor->image.width) {
l = comp(l, 0xaaaa,
(1 << ((cursor->image.width & 7) * 2)) - 1);
}
fb_writeb(l & 0xff, dst++);
fb_writeb(l >> 8, dst++);
}
dst += offset;
}
}
return 0;
}
int aty_init_cursor(struct fb_info *info, struct fb_ops *atyfb_ops)
{ unsignedlong addr;
¤ Die Informationen auf dieser Webseite wurden
nach bestem Wissen sorgfältig zusammengestellt. Es wird jedoch weder Vollständigkeit, noch Richtigkeit,
noch Qualität der bereit gestellten Informationen zugesichert.0.1Bemerkung:
(vorverarbeitet)
¤
Die Informationen auf dieser Webseite wurden
nach bestem Wissen sorgfältig zusammengestellt. Es wird jedoch weder Vollständigkeit, noch Richtigkeit,
noch Qualität der bereit gestellten Informationen zugesichert.
Bemerkung:
Die farbliche Syntaxdarstellung und die Messung sind noch experimentell.