1 /***************************************************************************
3 * Open \______ \ ____ ____ | | _\_ |__ _______ ___
4 * Source | _// _ \_/ ___\| |/ /| __ \ / _ \ \/ /
5 * Jukebox | | ( <_> ) \___| < | \_\ ( <_> > < <
6 * Firmware |____|_ /\____/ \___ >__|_ \|___ /\____/__/\_ \
10 * New greyscale framework
11 * Coldfire assembler routines
13 * This is a generic framework to display 129 shades of grey on low-depth
14 * bitmap LCDs (Archos b&w, Iriver & Ipod 4-grey) within plugins.
16 * Copyright (C) 2008 Jens Arnold
18 * This program is free software; you can redistribute it and/or
19 * modify it under the terms of the GNU General Public License
20 * as published by the Free Software Foundation; either version 2
21 * of the License, or (at your option) any later version.
23 * This software is distributed on an "AS IS" basis, WITHOUT WARRANTY OF ANY
24 * KIND, either express or implied.
26 ****************************************************************************/
29 /* Plugins should not normally do this, but we need to check a macro, and
30 * plugin.h would confuse the assembler. */
34 .type _grey_line1, @function
36 #if (LCD_PIXELFORMAT == VERTICAL_PACKING) \
37 || (LCD_PIXELFORMAT == VERTICAL_INTERLEAVED)
39 #if (LCD_DEPTH == 1) || (LCD_PIXELFORMAT == VERTICAL_INTERLEAVED)
45 /****************************************************************************
46 * void _grey_line1(int width,
48 * const unsigned char *src,
49 * const unsigned char *lut);
53 lea.l (-2*4, %sp), %sp
54 movem.l %d2/%a2, (%sp)
55 movem.l (2*4+4, %sp), %d2/%a0-%a2
63 move.b (%d0.l, %a2), (%a0)
64 addq.l #GREY_BSIZE, %a0
77 move.b (%d0.l, %a2), (%a0)
78 addq.l #GREY_BSIZE, %a0
80 move.b (%d0.l, %a2), (%a0)
81 addq.l #GREY_BSIZE, %a0
93 move.b (%d0.l, %a2), (%a0)
94 addq.l #GREY_BSIZE, %a0
96 move.b (%d0.l, %a2), (%a0)
97 addq.l #GREY_BSIZE, %a0
101 move.b (%d0.l, %a2), (%a0)
102 addq.l #GREY_BSIZE, %a0
104 move.b (%d0.l, %a2), (%a0)
105 addq.l #GREY_BSIZE, %a0
109 /* No need to correct the count, we're only testing bits from now on. */
118 move.b (%d0.l, %a2), (%a0)
119 addq.l #GREY_BSIZE, %a0
121 move.b (%d0.l, %a2), (%a0)
122 addq.l #GREY_BSIZE, %a0
129 move.b (%d0.l, %a2), (%a0)
132 movem.l (%sp), %d2/%a2
133 lea.l (2*4, %sp), %sp
135 .size _grey_line1, . - _grey_line1