1
0
Fork 0
forked from len0rd/rockbox

lcd-24bit: Introduce a 24-bit mid-level LCD driver

With LCD driver all calculation will be performed on RGB888 and the hardware/OS
can display from our 24bit framebuffer.

It is not yet as performance optimized as the existing drivers but should be
good enough.The vast number of small changes is due to the fact that
fb_data can be a struct type now, while most of the code expected a scalar type.

lcd-as-memframe ASM code does not work with 24bit currently so the with 24bit
it enforces the generic C code.

All plugins are ported over. Except for rockpaint. It uses so much memory that
it wouldnt fit into the 512k plugin buffer anymore (patches welcome).

Change-Id: Ibb1964545028ce0d8ff9833ccc3ab66be3ee0754
This commit is contained in:
Thomas Martitz 2014-06-18 07:15:00 +02:00
parent 0250be1d67
commit a1842c04f9
49 changed files with 1653 additions and 341 deletions

View file

@ -60,7 +60,7 @@ struct rgb_pick
/* list of primary colors */
#define SB_PRIM 0
#define SB_FILL 1
static const fb_data prim_rgb[][3] =
static const unsigned prim_rgb[][3] =
{
/* Foreground colors for sliders */
{
@ -87,13 +87,13 @@ static const unsigned char rgb_max[3] =
/* Unpacks the color value into native rgb values and 24 bit rgb values */
static void unpack_rgb(struct rgb_pick *rgb)
{
unsigned color = _LCD_UNSWAP_COLOR(rgb->color);
rgb->red = _RGB_UNPACK_RED(color);
rgb->green = _RGB_UNPACK_GREEN(color);
rgb->blue = _RGB_UNPACK_BLUE(color);
rgb->r = _RGB_UNPACK_RED_LCD(color);
rgb->g = _RGB_UNPACK_GREEN_LCD(color);
rgb->b = _RGB_UNPACK_BLUE_LCD(color);
unsigned color = rgb->color;
rgb->red = RGB_UNPACK_RED(color);
rgb->green = RGB_UNPACK_GREEN(color);
rgb->blue = RGB_UNPACK_BLUE(color);
rgb->r = RGB_UNPACK_RED_LCD(color);
rgb->g = RGB_UNPACK_GREEN_LCD(color);
rgb->b = RGB_UNPACK_BLUE_LCD(color);
}
/* Packs the native rgb colors into a color value */
@ -159,6 +159,7 @@ static void draw_screen(struct screen *display, char *title,
int max_label_width;
int text_x, text_top;
int slider_x, slider_width;
int value_width;
bool display_three_rows;
struct viewport vp;
@ -185,7 +186,12 @@ static void draw_screen(struct screen *display, char *title,
TITLE_MARGIN_BOTTOM + SELECTOR_TB_MARGIN;
text_x = SELECTOR_WIDTH;
slider_x = text_x + max_label_width + SLIDER_TEXT_MARGIN;
slider_width = vp.width - slider_x*2 - max_label_width;
slider_width = vp.width - text_x - slider_x - SLIDER_TEXT_MARGIN;
if (display->depth >= 24)
display->getstringsize("255", &value_width, NULL);
else
display->getstringsize("63", &value_width, NULL);
slider_width -= value_width;
line_height = char_height + 2*SELECTOR_TB_MARGIN;
/* Find out if there's enough room for three sliders or just
@ -252,7 +258,10 @@ static void draw_screen(struct screen *display, char *title,
vp.flags &= ~VP_FLAG_ALIGNMENT_MASK;
display->putsxy(text_x, text_top, buf);
/* Draw color value */
snprintf(buf, 3, "%02d", rgb->rgb_val[i]);
if (display->depth >= 24)
snprintf(buf, 4, "%03d", rgb->rgb_val[i]);
else
snprintf(buf, 3, "%02d", rgb->rgb_val[i]);
vp.flags |= VP_FLAG_ALIGN_RIGHT;
display->putsxy(text_x, text_top, buf);
@ -324,7 +333,7 @@ static int touchscreen_slider(struct screen *display,
{
short x, y;
int char_height, line_height;
int max_label_width;
int max_label_width, value_width;
int text_top, slider_x, slider_width;
bool display_three_rows;
int button;
@ -345,7 +354,12 @@ static int touchscreen_slider(struct screen *display,
text_top = MARGIN_TOP + char_height +
TITLE_MARGIN_BOTTOM + SELECTOR_TB_MARGIN;
slider_x = SELECTOR_WIDTH + max_label_width + SLIDER_TEXT_MARGIN;
slider_width = vp.width - slider_x*2 - max_label_width;
slider_width = vp.width - SELECTOR_WIDTH - slider_x - SLIDER_TEXT_MARGIN;
if (display->depth >= 24)
display->getstringsize("255", &value_width, NULL);
else
display->getstringsize("63", &value_width, NULL);
slider_width -= value_width;
line_height = char_height + 2*SELECTOR_TB_MARGIN;
/* same logic as in draw_screen */

View file

@ -66,10 +66,10 @@ struct line_desc {
int16_t line;
/* line text color if STYLE_COLORED is specified, in native
* lcd format (convert with LCD_RGBPACK() if necessary) */
fb_data text_color;
unsigned text_color;
/* line color if STYLE_COLORBAR or STYLE_GRADIENT is specified, in native
* lcd format (convert with LCD_RGBPACK() if necessary) */
fb_data line_color, line_end_color;
unsigned line_color, line_end_color;
/* line decorations, see STYLE_DEFAULT etc. */
enum line_styles style;
/* whether the line can scroll */

View file

@ -136,9 +136,9 @@ static bool do_non_text_tags(struct gui_wps *gwps, struct skin_draw_info *info,
* come before the text style tag color fields need to be preserved */
if (data->style & STYLE_GRADIENT)
{
fb_data tc = linedes->text_color,
lc = linedes->line_color,
lec = linedes->line_end_color;
unsigned tc = linedes->text_color,
lc = linedes->line_color,
lec = linedes->line_end_color;
*linedes = *data;
linedes->text_color = tc;
linedes->line_color = lc;

View file

@ -184,7 +184,7 @@ static const struct plugin_api rockbox_api = {
lcd_get_backdrop,
lcd_set_backdrop,
#endif
#if LCD_DEPTH == 16
#if LCD_DEPTH >= 16
lcd_bitmap_transparent_part,
lcd_bitmap_transparent,
#if MEMORYSIZE > 2

View file

@ -242,7 +242,7 @@ struct plugin_api {
fb_data* (*lcd_get_backdrop)(void);
void (*lcd_set_backdrop)(fb_data* backdrop);
#endif
#if LCD_DEPTH == 16
#if LCD_DEPTH >= 16
void (*lcd_bitmap_transparent_part)(const fb_data *src,
int src_x, int src_y, int stride,
int x, int y, int width, int height);

View file

@ -195,7 +195,8 @@ codebuster.c
fireworks.c
#endif
#if LCD_DEPTH >= 16
#if LCD_DEPTH == 16
/* FIXME: make it work with 24bit (needs lot of memory) */
rockpaint.c
#endif

View file

@ -22,7 +22,7 @@ clock
rockboy
#endif
#ifdef HAVE_TAGCACHE
#if defined(HAVE_TAGCACHE)
pictureflow
#endif

View file

@ -790,7 +790,7 @@ static void I_UploadNewPalette(int pal)
#ifndef HAVE_LCD_COLOR
paldata[i]=(3*r+6*g+b)/10;
#else
paldata[i] = LCD_RGBPACK(r,g,b);
paldata[i] = FB_RGBPACK(r,g,b);
#endif
}

View file

@ -929,13 +929,15 @@ static void draw_spectrogram_vertical(unsigned this_max, unsigned graph_max)
if(bins_acc >= ARRAYLEN_PLOT)
{
unsigned index = (SHADES-1)*bins_max / graph_max;
unsigned color;
/* These happen because we exaggerate the graph a little for
* linear mode */
if(index >= SHADES)
index = SHADES-1;
mylcd_set_foreground(SPECTROGRAPH_PALETTE(index));
color = FB_UNPACK_SCALAR_LCD(SPECTROGRAPH_PALETTE(index));
mylcd_set_foreground(color);
mylcd_drawpixel(fft_spectrogram_pos, y);
if(--y < 0)
@ -973,13 +975,15 @@ static void draw_spectrogram_horizontal(unsigned this_max, unsigned graph_max)
if(bins_acc >= ARRAYLEN_PLOT)
{
unsigned index = (SHADES-1)*bins_max / graph_max;
unsigned color;
/* These happen because we exaggerate the graph a little for
* linear mode */
if(index >= SHADES)
index = SHADES-1;
mylcd_set_foreground(SPECTROGRAPH_PALETTE(index));
color = FB_UNPACK_SCALAR_LCD(SPECTROGRAPH_PALETTE(index));
mylcd_set_foreground(color);
mylcd_drawpixel(x, fft_spectrogram_pos);
if(++x >= LCD_WIDTH)

View file

@ -100,20 +100,20 @@ static void color_palette_init(fb_data* palette)
int i;
for (i = 0; i < 32; i++){
/* black to blue, 32 values*/
palette[i]=LCD_RGBPACK(0, 0, 2*i);
palette[i]=FB_RGBPACK(0, 0, 2*i);
/* blue to red, 32 values*/
palette[i + 32]=LCD_RGBPACK(8*i, 0, 64 - 2*i);
palette[i + 32]=FB_RGBPACK(8*i, 0, 64 - 2*i);
/* red to yellow, 32 values*/
palette[i + 64]=LCD_RGBPACK(255, 8*i, 0);
palette[i + 64]=FB_RGBPACK(255, 8*i, 0);
/* yellow to white, 162 values */
palette[i + 96]=LCD_RGBPACK(255, 255, 0 + 4*i);
palette[i + 128]=LCD_RGBPACK(255, 255, 64 + 4*i);
palette[i + 160]=LCD_RGBPACK(255, 255, 128 + 4*i);
palette[i + 192]=LCD_RGBPACK(255, 255, 192 + i);
palette[i + 224]=LCD_RGBPACK(255, 255, 224 + i);
palette[i + 96]=FB_RGBPACK(255, 255, 0 + 4*i);
palette[i + 128]=FB_RGBPACK(255, 255, 64 + 4*i);
palette[i + 160]=FB_RGBPACK(255, 255, 128 + 4*i);
palette[i + 192]=FB_RGBPACK(255, 255, 192 + i);
palette[i + 224]=FB_RGBPACK(255, 255, 224 + i);
}
#if defined(HAVE_LCD_MODES) && (HAVE_LCD_MODES & LCD_MODE_PAL256)
rb->lcd_pal256_update_pal(palette);

View file

@ -43,8 +43,8 @@ static fb_data imgbuffer[LCD_HEIGHT];
#endif
#ifdef HAVE_LCD_COLOR
#define COLOR(iter) (fb_data)LCOLOR(iter)
#define CONVERGENCE_COLOR LCD_RGBPACK(0, 0, 0)
#define COLOR(iter) FB_SCALARPACK(LCOLOR(iter))
#define CONVERGENCE_COLOR FB_RGBPACK(0, 0, 0)
#else /* greyscale */
#define COLOR(iter) (unsigned char)LCOLOR(iter)
#define CONVERGENCE_COLOR 0
@ -413,4 +413,3 @@ static int mandelbrot_precision(int d)
return changed;
}

View file

@ -106,7 +106,7 @@ static fb_data pixel_to_lcd_colour(void)
b = component_to_lcd(p->b, LCD_BLUE_BITS, NODITHER_DELTA);
b = clamp_component_bits(b, LCD_BLUE_BITS);
return LCD_RGBPACK_LCD(r, g, b);
return FB_RGBPACK_LCD(r, g, b);
}
/** write a monochrome pixel to the colour LCD **/
@ -119,7 +119,7 @@ static fb_data pixel_to_lcd_gray(void)
b = component_to_lcd(g, LCD_BLUE_BITS, NODITHER_DELTA);
g = component_to_lcd(g, LCD_GREEN_BITS, NODITHER_DELTA);
return LCD_RGBPACK_LCD(r, g, b);
return FB_RGBPACK_LCD(r, g, b);
}
/**
@ -163,7 +163,7 @@ static fb_data pixel_odither_to_lcd(void)
p->col += p->inc;
return LCD_RGBPACK_LCD(r, g, b);
return FB_RGBPACK_LCD(r, g, b);
}
/**
@ -217,7 +217,7 @@ static fb_data pixel_fsdither_to_lcd(void)
distribute_error(&p->ce[BLU], &p->e[BLU], bc, epos, inc);
/* Pack and return pixel */
return LCD_RGBPACK_LCD(r, g, b);
return FB_RGBPACK_LCD(r, g, b);
}
/* Functions for each output mode, colour then grayscale. */

View file

@ -197,7 +197,7 @@ static int read_ppm_row(int fd, struct ppm_info *ppm, int row)
{
return PLUGIN_ERROR;
}
*dst = LCD_RGBPACK(
*dst = FB_RGBPACK(
(255 * r)/ppm->maxval,
(255 * g)/ppm->maxval,
(255 * b)/ppm->maxval);
@ -216,7 +216,7 @@ static int read_ppm_row(int fd, struct ppm_info *ppm, int row)
{
return PLUGIN_ERROR;
}
*dst = LCD_RGBPACK(
*dst = FB_RGBPACK(
(255 * r)/ppm->maxval,
(255 * g)/ppm->maxval,
(255 * b)/ppm->maxval);

View file

@ -1027,7 +1027,7 @@ static inline void draw_ship(void)
}
static inline void fire_alpha(int xc, int yc, fb_data color)
static inline void fire_alpha(int xc, int yc, unsigned color)
{
int oldmode = rb->lcd_get_drawmode();
@ -1128,12 +1128,12 @@ static void move_fire(void)
/* Check for hit*/
for (i = FIRE_SPEED; i >= 0; i--) {
pix = get_pixel(fire_x, fire_y + i);
if(pix == screen_white) {
if(!memcmp(&pix, &screen_white, sizeof(fb_data))) {
hit_white = true;
fire_y += i;
break;
}
if(pix == screen_green) {
if(!memcmp(&pix, &screen_green, sizeof(fb_data))) {
hit_green = true;
fire_y += i;
break;
@ -1336,7 +1336,8 @@ static void move_bombs(void)
/* Check for green (ship or shield) */
for (j = BOMB_HEIGHT; j >= BOMB_HEIGHT - BOMB_SPEED; j--) {
bombs[i].target = 0;
if(get_pixel(bombs[i].x + BOMB_WIDTH / 2, bombs[i].y + j) == screen_green) {
fb_data pix = get_pixel(bombs[i].x + BOMB_WIDTH / 2, bombs[i].y + j);
if(!memcmp(&pix, &screen_green, sizeof(fb_data))) {
/* Move to hit pixel */
bombs[i].x += BOMB_WIDTH / 2;
bombs[i].y += j;

View file

@ -130,38 +130,38 @@ void smooth_resize_bitmap(struct bitmap *src_bmp, struct bitmap *dest_bmp)
if (XAP > 0) {
pix = ypoint + xpoint;
r = RGB_UNPACK_RED(*pix) * INV_XAP;
g = RGB_UNPACK_GREEN(*pix) * INV_XAP;
b = RGB_UNPACK_BLUE(*pix) * INV_XAP;
r = FB_UNPACK_RED(*pix) * INV_XAP;
g = FB_UNPACK_GREEN(*pix) * INV_XAP;
b = FB_UNPACK_BLUE(*pix) * INV_XAP;
pix++;
r += RGB_UNPACK_RED(*pix) * XAP;
g += RGB_UNPACK_GREEN(*pix) * XAP;
b += RGB_UNPACK_BLUE(*pix) * XAP;
r += FB_UNPACK_RED(*pix) * XAP;
g += FB_UNPACK_GREEN(*pix) * XAP;
b += FB_UNPACK_BLUE(*pix) * XAP;
pix += sow;
rr = RGB_UNPACK_RED(*pix) * XAP;
gg = RGB_UNPACK_GREEN(*pix) * XAP;
bb = RGB_UNPACK_BLUE(*pix) * XAP;
rr = FB_UNPACK_RED(*pix) * XAP;
gg = FB_UNPACK_GREEN(*pix) * XAP;
bb = FB_UNPACK_BLUE(*pix) * XAP;
pix--;
rr += RGB_UNPACK_RED(*pix) * INV_XAP;
gg += RGB_UNPACK_GREEN(*pix) * INV_XAP;
bb += RGB_UNPACK_BLUE(*pix) * INV_XAP;
rr += FB_UNPACK_RED(*pix) * INV_XAP;
gg += FB_UNPACK_GREEN(*pix) * INV_XAP;
bb += FB_UNPACK_BLUE(*pix) * INV_XAP;
r = ((rr * YAP) + (r * INV_YAP)) >> 16;
g = ((gg * YAP) + (g * INV_YAP)) >> 16;
b = ((bb * YAP) + (b * INV_YAP)) >> 16;
*dptr++ = LCD_RGBPACK(r, g, b);
*dptr++ = FB_RGBPACK(r, g, b);
} else {
pix = ypoint + xpoint;
r = RGB_UNPACK_RED(*pix) * INV_YAP;
g = RGB_UNPACK_GREEN(*pix) * INV_YAP;
b = RGB_UNPACK_BLUE(*pix) * INV_YAP;
r = FB_UNPACK_RED(*pix) * INV_YAP;
g = FB_UNPACK_GREEN(*pix) * INV_YAP;
b = FB_UNPACK_BLUE(*pix) * INV_YAP;
pix += sow;
r += RGB_UNPACK_RED(*pix) * YAP;
g += RGB_UNPACK_GREEN(*pix) * YAP;
b += RGB_UNPACK_BLUE(*pix) * YAP;
r += FB_UNPACK_RED(*pix) * YAP;
g += FB_UNPACK_GREEN(*pix) * YAP;
b += FB_UNPACK_BLUE(*pix) * YAP;
r >>= 8;
g >>= 8;
b >>= 8;
*dptr++ = LCD_RGBPACK(r, g, b);
*dptr++ = FB_RGBPACK(r, g, b);
}
}
} else {
@ -176,17 +176,17 @@ void smooth_resize_bitmap(struct bitmap *src_bmp, struct bitmap *dest_bmp)
if (XAP > 0) {
pix = ypoint + xpoint;
r = RGB_UNPACK_RED(*pix) * INV_XAP;
g = RGB_UNPACK_GREEN(*pix) * INV_XAP;
b = RGB_UNPACK_BLUE(*pix) * INV_XAP;
r = FB_UNPACK_RED(*pix) * INV_XAP;
g = FB_UNPACK_GREEN(*pix) * INV_XAP;
b = FB_UNPACK_BLUE(*pix) * INV_XAP;
pix++;
r += RGB_UNPACK_RED(*pix) * XAP;
g += RGB_UNPACK_GREEN(*pix) * XAP;
b += RGB_UNPACK_BLUE(*pix) * XAP;
r += FB_UNPACK_RED(*pix) * XAP;
g += FB_UNPACK_GREEN(*pix) * XAP;
b += FB_UNPACK_BLUE(*pix) * XAP;
r >>= 8;
g >>= 8;
b >>= 8;
*dptr++ = LCD_RGBPACK(r, g, b);
*dptr++ = FB_RGBPACK(r, g, b);
} else
*dptr++ = sptr[xpoint];
}
@ -221,37 +221,37 @@ void smooth_resize_bitmap(struct bitmap *src_bmp, struct bitmap *dest_bmp)
val_x += inc_x;
pix = ypoint + xpoint;
r = (RGB_UNPACK_RED(*pix) * yap) >> 10;
g = (RGB_UNPACK_GREEN(*pix) * yap) >> 10;
b = (RGB_UNPACK_BLUE(*pix) * yap) >> 10;
r = (FB_UNPACK_RED(*pix) * yap) >> 10;
g = (FB_UNPACK_GREEN(*pix) * yap) >> 10;
b = (FB_UNPACK_BLUE(*pix) * yap) >> 10;
pix += sow;
for (j = (1 << 14) - yap; j > Cy; j -= Cy) {
r += (RGB_UNPACK_RED(*pix) * Cy) >> 10;
g += (RGB_UNPACK_GREEN(*pix) * Cy) >> 10;
b += (RGB_UNPACK_BLUE(*pix) * Cy) >> 10;
r += (FB_UNPACK_RED(*pix) * Cy) >> 10;
g += (FB_UNPACK_GREEN(*pix) * Cy) >> 10;
b += (FB_UNPACK_BLUE(*pix) * Cy) >> 10;
pix += sow;
}
if (j > 0) {
r += (RGB_UNPACK_RED(*pix) * j) >> 10;
g += (RGB_UNPACK_GREEN(*pix) * j) >> 10;
b += (RGB_UNPACK_BLUE(*pix) * j) >> 10;
r += (FB_UNPACK_RED(*pix) * j) >> 10;
g += (FB_UNPACK_GREEN(*pix) * j) >> 10;
b += (FB_UNPACK_BLUE(*pix) * j) >> 10;
}
if (XAP > 0) {
pix = ypoint + xpoint + 1;
rr = (RGB_UNPACK_RED(*pix) * yap) >> 10;
gg = (RGB_UNPACK_GREEN(*pix) * yap) >> 10;
bb = (RGB_UNPACK_BLUE(*pix) * yap) >> 10;
rr = (FB_UNPACK_RED(*pix) * yap) >> 10;
gg = (FB_UNPACK_GREEN(*pix) * yap) >> 10;
bb = (FB_UNPACK_BLUE(*pix) * yap) >> 10;
pix += sow;
for (j = (1 << 14) - yap; j > Cy; j -= Cy) {
rr += (RGB_UNPACK_RED(*pix) * Cy) >> 10;
gg += (RGB_UNPACK_GREEN(*pix) * Cy) >> 10;
bb += (RGB_UNPACK_BLUE(*pix) * Cy) >> 10;
rr += (FB_UNPACK_RED(*pix) * Cy) >> 10;
gg += (FB_UNPACK_GREEN(*pix) * Cy) >> 10;
bb += (FB_UNPACK_BLUE(*pix) * Cy) >> 10;
pix += sow;
}
if (j > 0) {
rr += (RGB_UNPACK_RED(*pix) * j) >> 10;
gg += (RGB_UNPACK_GREEN(*pix) * j) >> 10;
bb += (RGB_UNPACK_BLUE(*pix) * j) >> 10;
rr += (FB_UNPACK_RED(*pix) * j) >> 10;
gg += (FB_UNPACK_GREEN(*pix) * j) >> 10;
bb += (FB_UNPACK_BLUE(*pix) * j) >> 10;
}
r = r * INV_XAP;
g = g * INV_XAP;
@ -264,7 +264,7 @@ void smooth_resize_bitmap(struct bitmap *src_bmp, struct bitmap *dest_bmp)
g >>= 4;
b >>= 4;
}
*dptr = LCD_RGBPACK(r, g, b);
*dptr = FB_RGBPACK(r, g, b);
dptr++;
}
}
@ -297,37 +297,37 @@ void smooth_resize_bitmap(struct bitmap *src_bmp, struct bitmap *dest_bmp)
xap = XAP & 0xffff;
pix = ypoint + xpoint;
r = (RGB_UNPACK_RED(*pix) * xap) >> 10;
g = (RGB_UNPACK_GREEN(*pix) * xap) >> 10;
b = (RGB_UNPACK_BLUE(*pix) * xap) >> 10;
r = (FB_UNPACK_RED(*pix) * xap) >> 10;
g = (FB_UNPACK_GREEN(*pix) * xap) >> 10;
b = (FB_UNPACK_BLUE(*pix) * xap) >> 10;
pix++;
for (j = (1 << 14) - xap; j > Cx; j -= Cx) {
r += (RGB_UNPACK_RED(*pix) * Cx) >> 10;
g += (RGB_UNPACK_GREEN(*pix) * Cx) >> 10;
b += (RGB_UNPACK_BLUE(*pix) * Cx) >> 10;
r += (FB_UNPACK_RED(*pix) * Cx) >> 10;
g += (FB_UNPACK_GREEN(*pix) * Cx) >> 10;
b += (FB_UNPACK_BLUE(*pix) * Cx) >> 10;
pix++;
}
if (j > 0) {
r += (RGB_UNPACK_RED(*pix) * j) >> 10;
g += (RGB_UNPACK_GREEN(*pix) * j) >> 10;
b += (RGB_UNPACK_BLUE(*pix) * j) >> 10;
r += (FB_UNPACK_RED(*pix) * j) >> 10;
g += (FB_UNPACK_GREEN(*pix) * j) >> 10;
b += (FB_UNPACK_BLUE(*pix) * j) >> 10;
}
if (YAP > 0) {
pix = ypoint + xpoint + sow;
rr = (RGB_UNPACK_RED(*pix) * xap) >> 10;
gg = (RGB_UNPACK_GREEN(*pix) * xap) >> 10;
bb = (RGB_UNPACK_BLUE(*pix) * xap) >> 10;
rr = (FB_UNPACK_RED(*pix) * xap) >> 10;
gg = (FB_UNPACK_GREEN(*pix) * xap) >> 10;
bb = (FB_UNPACK_BLUE(*pix) * xap) >> 10;
pix++;
for (j = (1 << 14) - xap; j > Cx; j -= Cx) {
rr += (RGB_UNPACK_RED(*pix) * Cx) >> 10;
gg += (RGB_UNPACK_GREEN(*pix) * Cx) >> 10;
bb += (RGB_UNPACK_BLUE(*pix) * Cx) >> 10;
rr += (FB_UNPACK_RED(*pix) * Cx) >> 10;
gg += (FB_UNPACK_GREEN(*pix) * Cx) >> 10;
bb += (FB_UNPACK_BLUE(*pix) * Cx) >> 10;
pix++;
}
if (j > 0) {
rr += (RGB_UNPACK_RED(*pix) * j) >> 10;
gg += (RGB_UNPACK_GREEN(*pix) * j) >> 10;
bb += (RGB_UNPACK_BLUE(*pix) * j) >> 10;
rr += (FB_UNPACK_RED(*pix) * j) >> 10;
gg += (FB_UNPACK_GREEN(*pix) * j) >> 10;
bb += (FB_UNPACK_BLUE(*pix) * j) >> 10;
}
r = r * INV_YAP;
g = g * INV_YAP;
@ -340,7 +340,7 @@ void smooth_resize_bitmap(struct bitmap *src_bmp, struct bitmap *dest_bmp)
g >>= 4;
b >>= 4;
}
*dptr = LCD_RGBPACK(r, g, b);
*dptr = FB_RGBPACK(r, g, b);
dptr++;
}
}
@ -378,20 +378,20 @@ void smooth_resize_bitmap(struct bitmap *src_bmp, struct bitmap *dest_bmp)
pix = sptr;
sptr += sow;
rx = (RGB_UNPACK_RED(*pix) * xap) >> 9;
gx = (RGB_UNPACK_GREEN(*pix) * xap) >> 9;
bx = (RGB_UNPACK_BLUE(*pix) * xap) >> 9;
rx = (FB_UNPACK_RED(*pix) * xap) >> 9;
gx = (FB_UNPACK_GREEN(*pix) * xap) >> 9;
bx = (FB_UNPACK_BLUE(*pix) * xap) >> 9;
pix++;
for (i = (1 << 14) - xap; i > Cx; i -= Cx) {
rx += (RGB_UNPACK_RED(*pix) * Cx) >> 9;
gx += (RGB_UNPACK_GREEN(*pix) * Cx) >> 9;
bx += (RGB_UNPACK_BLUE(*pix) * Cx) >> 9;
rx += (FB_UNPACK_RED(*pix) * Cx) >> 9;
gx += (FB_UNPACK_GREEN(*pix) * Cx) >> 9;
bx += (FB_UNPACK_BLUE(*pix) * Cx) >> 9;
pix++;
}
if (i > 0) {
rx += (RGB_UNPACK_RED(*pix) * i) >> 9;
gx += (RGB_UNPACK_GREEN(*pix) * i) >> 9;
bx += (RGB_UNPACK_BLUE(*pix) * i) >> 9;
rx += (FB_UNPACK_RED(*pix) * i) >> 9;
gx += (FB_UNPACK_GREEN(*pix) * i) >> 9;
bx += (FB_UNPACK_BLUE(*pix) * i) >> 9;
}
r = (rx * yap) >> 14;
@ -401,20 +401,20 @@ void smooth_resize_bitmap(struct bitmap *src_bmp, struct bitmap *dest_bmp)
for (j = (1 << 14) - yap; j > Cy; j -= Cy) {
pix = sptr;
sptr += sow;
rx = (RGB_UNPACK_RED(*pix) * xap) >> 9;
gx = (RGB_UNPACK_GREEN(*pix) * xap) >> 9;
bx = (RGB_UNPACK_BLUE(*pix) * xap) >> 9;
rx = (FB_UNPACK_RED(*pix) * xap) >> 9;
gx = (FB_UNPACK_GREEN(*pix) * xap) >> 9;
bx = (FB_UNPACK_BLUE(*pix) * xap) >> 9;
pix++;
for (i = (1 << 14) - xap; i > Cx; i -= Cx) {
rx += (RGB_UNPACK_RED(*pix) * Cx) >> 9;
gx += (RGB_UNPACK_GREEN(*pix) * Cx) >> 9;
bx += (RGB_UNPACK_BLUE(*pix) * Cx) >> 9;
rx += (FB_UNPACK_RED(*pix) * Cx) >> 9;
gx += (FB_UNPACK_GREEN(*pix) * Cx) >> 9;
bx += (FB_UNPACK_BLUE(*pix) * Cx) >> 9;
pix++;
}
if (i > 0) {
rx += (RGB_UNPACK_RED(*pix) * i) >> 9;
gx += (RGB_UNPACK_GREEN(*pix) * i) >> 9;
bx += (RGB_UNPACK_BLUE(*pix) * i) >> 9;
rx += (FB_UNPACK_RED(*pix) * i) >> 9;
gx += (FB_UNPACK_GREEN(*pix) * i) >> 9;
bx += (FB_UNPACK_BLUE(*pix) * i) >> 9;
}
r += (rx * Cy) >> 14;
@ -424,20 +424,20 @@ void smooth_resize_bitmap(struct bitmap *src_bmp, struct bitmap *dest_bmp)
if (j > 0) {
pix = sptr;
sptr += sow;
rx = (RGB_UNPACK_RED(*pix) * xap) >> 9;
gx = (RGB_UNPACK_GREEN(*pix) * xap) >> 9;
bx = (RGB_UNPACK_BLUE(*pix) * xap) >> 9;
rx = (FB_UNPACK_RED(*pix) * xap) >> 9;
gx = (FB_UNPACK_GREEN(*pix) * xap) >> 9;
bx = (FB_UNPACK_BLUE(*pix) * xap) >> 9;
pix++;
for (i = (1 << 14) - xap; i > Cx; i -= Cx) {
rx += (RGB_UNPACK_RED(*pix) * Cx) >> 9;
gx += (RGB_UNPACK_GREEN(*pix) * Cx) >> 9;
bx += (RGB_UNPACK_BLUE(*pix) * Cx) >> 9;
rx += (FB_UNPACK_RED(*pix) * Cx) >> 9;
gx += (FB_UNPACK_GREEN(*pix) * Cx) >> 9;
bx += (FB_UNPACK_BLUE(*pix) * Cx) >> 9;
pix++;
}
if (i > 0) {
rx += (RGB_UNPACK_RED(*pix) * i) >> 9;
gx += (RGB_UNPACK_GREEN(*pix) * i) >> 9;
bx += (RGB_UNPACK_BLUE(*pix) * i) >> 9;
rx += (FB_UNPACK_RED(*pix) * i) >> 9;
gx += (FB_UNPACK_GREEN(*pix) * i) >> 9;
bx += (FB_UNPACK_BLUE(*pix) * i) >> 9;
}
r += (rx * j) >> 14;
@ -445,7 +445,7 @@ void smooth_resize_bitmap(struct bitmap *src_bmp, struct bitmap *dest_bmp)
b += (bx * j) >> 14;
}
*dptr = LCD_RGBPACK(r >> 5, g >> 5, b >> 5);
*dptr = FB_RGBPACK(r >> 5, g >> 5, b >> 5);
dptr++;
}
}

View file

@ -112,6 +112,9 @@ static struct osd grey_osd;
# define _OSD_WIDTH2BYTES(w) ((w)*2)
# define _OSD_BYTES2WIDTH(b) ((b)/2)
# endif /* end stride type selection */
#elif LCD_DEPTH == 24
# define _OSD_WIDTH2BYTES(w) ((w)*3)
# define _OSD_BYTES2WIDTH(b) ((b)/3)
#else /* other LCD depth */
# error Unknown LCD depth; please define macros
#endif /* LCD_DEPTH */

View file

@ -70,9 +70,9 @@ int save_bmp_file( char* filename, struct bitmap *bm )
fb_data *d = (fb_data*)( bm->data ) + (x+y*bm->width);
unsigned char c[] =
{
RGB_UNPACK_BLUE( *d ),
RGB_UNPACK_GREEN( *d ),
RGB_UNPACK_RED( *d )
FB_UNPACK_BLUE( *d ),
FB_UNPACK_GREEN( *d ),
FB_UNPACK_RED( *d )
};
rb->write( fh, c, 3 );
}

View file

@ -170,7 +170,7 @@ void xlcd_filltriangle_screen(struct screen* display,
xlcd_filltriangle_vertical(display, x1, y1, x2, y2, x3, y3);
}
#if LCD_DEPTH >= 8
#if LCD_DEPTH >= 8 && LCD_DEPTH <= 16
#ifdef HAVE_LCD_COLOR
static const fb_data graylut[256] = {
@ -244,6 +244,8 @@ static const fb_data graylut[256] = {
};
#endif /* HAVE_LCD_COLOR */
/* unused functions, enable when needed */
#if 0
/* Draw a partial greyscale bitmap, canonical 8 bit format */
void xlcd_gray_bitmap_part(const unsigned char *src, int src_x, int src_y,
int stride, int x, int y, int width, int height)
@ -286,7 +288,13 @@ void xlcd_gray_bitmap_part(const unsigned char *src, int src_x, int src_y,
#ifdef HAVE_LCD_COLOR
do
#if LCD_DEPTH == 16
*dst_row++ = graylut[*src_row++];
#else
/* untested change because this function is completely unused */
*dst_row->r = *dst_row->g = *dst_row->b = *src_row++;
dst_row++;
#endif
while (src_row < row_end);
#endif
@ -302,6 +310,7 @@ void xlcd_gray_bitmap(const unsigned char *src, int x, int y, int width,
{
xlcd_gray_bitmap_part(src, 0, 0, width, x, y, width, height);
}
#endif
#ifdef HAVE_LCD_COLOR
/* Draw a partial colour bitmap, canonical 24 bit RGB format */
@ -379,4 +388,3 @@ void xlcd_color_bitmap(const unsigned char *src, int x, int y, int width,
#endif /* LCD_DEPTH >= 8 */
#endif /* HAVE_LCD_BITMAP */

View file

@ -42,14 +42,12 @@ static const struct button_mapping *plugin_contexts[]
#define REMOTE_LOGO_WIDTH BMPWIDTH_remote_rockboxlogo
#define REMOTE_LOGO_HEIGHT BMPHEIGHT_remote_rockboxlogo
#define REMOTE_LOGO remote_rockboxlogo
extern const fb_remote_data remote_rockboxlogo[];
#endif /* HAVE_REMOTE_LCD */
#define LOGO rockboxlogo
#include "pluginbitmaps/rockboxlogo.h"
#define LOGO_WIDTH BMPWIDTH_rockboxlogo
#define LOGO_HEIGHT BMPHEIGHT_rockboxlogo
extern const fb_data rockboxlogo[];
#else /* !LCD_BITMAP */
#define DISPLAY_WIDTH 55
@ -103,10 +101,10 @@ enum plugin_status plugin_start(const void* parameter) {
while (1) {
#ifdef HAVE_LCD_BITMAP
rb->lcd_clear_display();
rb->lcd_bitmap(LOGO, x, y, LOGO_WIDTH, LOGO_HEIGHT);
rb->lcd_bitmap((const fb_data*)LOGO, x, y, LOGO_WIDTH, LOGO_HEIGHT);
#ifdef REMOTE_LOGO
rb->lcd_remote_clear_display();
rb->lcd_remote_bitmap(REMOTE_LOGO,
rb->lcd_remote_bitmap((const fb_data*)REMOTE_LOGO,
(x * (REMOTE_WIDTH - REMOTE_LOGO_WIDTH)) / (DISPLAY_WIDTH - LOGO_WIDTH),
(y * (REMOTE_HEIGHT - REMOTE_LOGO_HEIGHT)) / (DISPLAY_HEIGHT - LOGO_HEIGHT),
REMOTE_LOGO_WIDTH, REMOTE_LOGO_HEIGHT);
@ -195,5 +193,3 @@ enum plugin_status plugin_start(const void* parameter) {
}
}
}

View file

@ -138,14 +138,14 @@ static fb_data* rli_element(lua_State *L)
static int rli_set(lua_State *L)
{
fb_data newvalue = (fb_data) luaL_checknumber(L, 4);
fb_data newvalue = FB_SCALARPACK((unsigned)luaL_checknumber(L, 4));
*rli_element(L) = newvalue;
return 0;
}
static int rli_get(lua_State *L)
{
lua_pushnumber(L, *rli_element(L));
lua_pushnumber(L, FB_UNPACK_SCALAR_LCD(*rli_element(L)));
return 1;
}

View file

@ -231,4 +231,3 @@ void codec_free(void* ptr)
#endif
(void)ptr;
}

View file

@ -702,7 +702,7 @@ static void draw_oriented_mono_bitmap_part(const unsigned char *src,
dst_col--;
if (data & 1)
*dst_col = fg_pattern;
*dst_col = FB_SCALARPACK(fg_pattern);
#if 0
else
*dst_col = bg_pattern;
@ -719,7 +719,7 @@ static void draw_oriented_mono_bitmap_part(const unsigned char *src,
while (src < src_end);
}
/* draw alpha bitmap for anti-alias font */
#define ALPHA_COLOR_FONT_DEPTH 2
#define ALPHA_COLOR_LOOKUP_SHIFT (1 << ALPHA_COLOR_FONT_DEPTH)
#define ALPHA_COLOR_LOOKUP_SIZE ((1 << ALPHA_COLOR_LOOKUP_SHIFT) - 1)
@ -727,6 +727,7 @@ static void draw_oriented_mono_bitmap_part(const unsigned char *src,
#define ALPHA_COLOR_PIXEL_PER_WORD (32 >> ALPHA_COLOR_FONT_DEPTH)
#ifdef CPU_ARM
#define BLEND_INIT do {} while (0)
#define BLEND_FINISH do {} while(0)
#define BLEND_START(acc, color, alpha) \
asm volatile("mul %0, %1, %2" : "=&r" (acc) : "r" (color), "r" (alpha))
#define BLEND_CONT(acc, color, alpha) \
@ -734,13 +735,18 @@ static void draw_oriented_mono_bitmap_part(const unsigned char *src,
#define BLEND_OUT(acc) do {} while (0)
#elif defined(CPU_COLDFIRE)
#define ALPHA_BITMAP_READ_WORDS
#define BLEND_INIT coldfire_set_macsr(EMAC_UNSIGNED)
#define BLEND_INIT \
unsigned long _macsr = coldfire_get_macsr(); \
coldfire_set_macsr(EMAC_UNSIGNED)
#define BLEND_FINISH \
coldfire_set_macsr(_macsr)
#define BLEND_START(acc, color, alpha) \
asm volatile("mac.l %0, %1, %%acc0" :: "%d" (color), "d" (alpha))
#define BLEND_CONT BLEND_START
#define BLEND_OUT(acc) asm volatile("movclr.l %%acc0, %0" : "=d" (acc))
#else
#define BLEND_INIT do {} while (0)
#define BLEND_FINISH do {} while(0)
#define BLEND_START(acc, color, alpha) ((acc) = (color) * (alpha))
#define BLEND_CONT(acc, color, alpha) ((acc) += (color) * (alpha))
#define BLEND_OUT(acc) do {} while (0)
@ -749,6 +755,7 @@ static void draw_oriented_mono_bitmap_part(const unsigned char *src,
/* Blend the given two colors */
static inline unsigned blend_two_colors(unsigned c1, unsigned c2, unsigned a)
{
#if LCD_DEPTH == 16
a += a >> (ALPHA_COLOR_LOOKUP_SHIFT - 1);
#if (LCD_PIXELFORMAT == RGB565SWAPPED)
c1 = swap16(c1);
@ -767,6 +774,20 @@ static inline unsigned blend_two_colors(unsigned c1, unsigned c2, unsigned a)
#else
return p;
#endif
#else /* LCD_DEPTH == 24 */
unsigned s = c1;
unsigned d = c2;
unsigned s1 = s & 0xff00ff;
unsigned d1 = d & 0xff00ff;
a += a >> (ALPHA_COLOR_LOOKUP_SHIFT - 1);
d1 = (d1 + ((s1 - d1) * a >> ALPHA_COLOR_LOOKUP_SHIFT)) & 0xff00ff;
s &= 0xff00;
d &= 0xff00;
d = (d + ((s - d) * a >> ALPHA_COLOR_LOOKUP_SHIFT)) & 0xff00;
return d1 | d;
#endif
}
static void draw_oriented_alpha_bitmap_part(const unsigned char *src,
@ -849,8 +870,9 @@ static void draw_oriented_alpha_bitmap_part(const unsigned char *src,
#endif
do
{
*dst=blend_two_colors(*dst, fg_pattern,
data & ALPHA_COLOR_LOOKUP_SIZE );
unsigned color = blend_two_colors(FB_UNPACK_SCALAR_LCD(*dst), fg_pattern,
data & ALPHA_COLOR_LOOKUP_SIZE );
*dst= FB_SCALARPACK(color);
dst += LCD_WIDTH;
UPDATE_SRC_ALPHA;
}

View file

@ -340,7 +340,7 @@ void decodeROMs(void)
for( i=0; i<256; i++ ) {
c = decoded_palette[ color_data_[i] & 0x0F ];
#ifdef HAVE_LCD_COLOR
palette[i] = LCD_RGBPACK((unsigned char) (c),
palette[i] = FB_RGBPACK((unsigned char) (c),
(unsigned char) (c >> 8),
(unsigned char) (c >> 16));
#else

View file

@ -470,7 +470,6 @@ static int pf_state;
/** code */
static bool free_slide_prio(int prio);
static inline unsigned fade_color(pix_t c, unsigned a);
bool load_new_slide(void);
int load_surface(int);
@ -646,10 +645,15 @@ static inline PFreal fcos(int iangle)
return fsin(iangle + (IANGLE_MAX >> 2));
}
static inline unsigned scale_val(unsigned val, unsigned bits)
/* scales the 8bit subpixel value to native lcd format, indicated by bits */
static inline unsigned scale_subpixel_lcd(unsigned val, unsigned bits)
{
(void) bits;
#if LCD_PIXELFORMAT != RGB888
val = val * ((1 << bits) - 1);
return ((val >> 8) + val + 128) >> 8;
val = ((val >> 8) + val + 128) >> 8;
#endif
return val;
}
static void output_row_8_transposed(uint32_t row, void * row_in,
@ -666,10 +670,10 @@ static void output_row_8_transposed(uint32_t row, void * row_in,
unsigned r, g, b;
for (; dest < end; dest += ctx->bm->height)
{
r = scale_val(qp->red, 5);
g = scale_val(qp->green, 6);
b = scale_val((qp++)->blue, 5);
*dest = LCD_RGBPACK_LCD(r,g,b);
r = scale_subpixel_lcd(qp->red, 5);
g = scale_subpixel_lcd(qp->green, 6);
b = scale_subpixel_lcd((qp++)->blue, 5);
*dest = FB_RGBPACK_LCD(r,g,b);
}
#endif
}
@ -690,11 +694,11 @@ static void output_row_32_transposed(uint32_t row, void * row_in,
int r, g, b;
for (; dest < end; dest += ctx->bm->height)
{
r = scale_val(SC_OUT(qp->r, ctx), 5);
g = scale_val(SC_OUT(qp->g, ctx), 6);
b = scale_val(SC_OUT(qp->b, ctx), 5);
r = scale_subpixel_lcd(SC_OUT(qp->r, ctx), 5);
g = scale_subpixel_lcd(SC_OUT(qp->g, ctx), 6);
b = scale_subpixel_lcd(SC_OUT(qp->b, ctx), 5);
qp++;
*dest = LCD_RGBPACK_LCD(r,g,b);
*dest = FB_RGBPACK_LCD(r,g,b);
}
#endif
}
@ -714,10 +718,10 @@ static void output_row_32_transposed_fromyuv(uint32_t row, void * row_in,
v = SC_OUT(qp->r, ctx);
qp++;
yuv_to_rgb(y, u, v, &r, &g, &b);
r = scale_val(r, 5);
g = scale_val(g, 6);
b = scale_val(b, 5);
*dest = LCD_RGBPACK_LCD(r, g, b);
r = scale_subpixel_lcd(r, 5);
g = scale_subpixel_lcd(g, 6);
b = scale_subpixel_lcd(b, 5);
*dest = FB_RGBPACK_LCD(r, g, b);
}
}
#endif
@ -1793,14 +1797,13 @@ static void recalc_offsets(void)
offsetY = DISPLAY_WIDTH / 2 * (fsin(itilt) + PFREAL_ONE / 2);
}
/**
Fade the given color by spreading the fb_data (ushort)
to an uint, multiply and compress the result back to a ushort.
Fade the given color by spreading the fb_data
to an uint, multiply and compress the result back to a fb_data.
*/
#if (LCD_PIXELFORMAT == RGB565SWAPPED)
static inline unsigned fade_color(pix_t c, unsigned a)
static inline pix_t fade_color(pix_t c, unsigned a)
{
#if (LCD_PIXELFORMAT == RGB565SWAPPED)
unsigned int result;
c = swap16(c);
a = (a + 2) & 0x1fc;
@ -1808,24 +1811,29 @@ static inline unsigned fade_color(pix_t c, unsigned a)
result |= ((c & 0x7e0) * a) & 0x7e000;
result >>= 8;
return swap16(result);
}
#elif LCD_PIXELFORMAT == RGB565
static inline unsigned fade_color(pix_t c, unsigned a)
{
unsigned int result;
a = (a + 2) & 0x1fc;
result = ((c & 0xf81f) * a) & 0xf81f00;
result |= ((c & 0x7e0) * a) & 0x7e000;
result >>= 8;
return result;
}
#elif LCD_PIXELFORMAT == RGB888
unsigned int pixel = FB_UNPACK_SCALAR_LCD(c);
unsigned int result;
a = (a + 2) & 0x1fc;
result = ((pixel & 0xff00ff) * a) & 0xff00ff00;
result |= ((pixel & 0x00ff00) * a) & 0x00ff0000;
result >>= 8;
return FB_SCALARPACK(result);
#else
static inline unsigned fade_color(pix_t c, unsigned a)
{
unsigned val = c;
return MULUQ(val, a) >> 8;
}
#endif
}
/**
* Render a single slide

View file

@ -105,7 +105,7 @@ static void shades_generate(int time)
if (blue > 255)
blue= 510 - blue;
colours[i] = LCD_RGBPACK(red, green, blue);
colours[i] = FB_RGBPACK(red, green, blue);
r++; g++; b++;
}

View file

@ -789,7 +789,7 @@ static const short scoring[4] = { /* scoring for each number of lines */
struct figure
{
#if LCD_DEPTH >= 2
unsigned short color[3]; /* color of figure (light,middle,shadow) */
unsigned int color[3]; /* color of figure (light,middle,shadow) */
#endif
unsigned short max_or; /* max orientations */
signed short shapeX[4], shapeY[4]; /* implementation of figures */

View file

@ -3,6 +3,7 @@
#ifndef __LCD_GB_H__
#define __LCD_GB_H__
#include "lcd.h"
#include "defs.h"
struct vissprite
@ -23,7 +24,7 @@ struct scan
#elif LCD_DEPTH > 4
byte buf[256];
#endif
un16 pal[64];
fb_data pal[64];
byte pri[256];
struct vissprite vs[16];
int ns, l, x, y, s, t, u, v, wx, wy, wt, wv;
@ -61,6 +62,3 @@ void pal_dirty(void) ICODE_ATTR;
void lcd_reset(void);
#endif

View file

@ -19,7 +19,7 @@ struct scan scan IBSS_ATTR;
#define BG (scan.bg)
#define WND (scan.wnd)
#if LCD_DEPTH ==16
#if LCD_DEPTH >= 16
#define BUF (scan.buf)
#else
#define BUF (scan.buf[scanline_ind])
@ -1154,6 +1154,7 @@ void set_pal(void)
static void updatepalette(int i)
{
int c, r, g, b;
fb_data px;
c = (lcd.pal[i<<1] | ((int)lcd.pal[(i<<1)|1] << 8)) & 0x7FFF;
r = (c & 0x001F) << 3;
@ -1167,18 +1168,16 @@ static void updatepalette(int i)
g = (g >> fb.cc[1].r) << fb.cc[1].l;
b = (b >> fb.cc[2].r) << fb.cc[2].l;
#if LCD_PIXELFORMAT == RGB565
c = r|g|b;
#elif LCD_PIXELFORMAT == RGB565SWAPPED
c = swap16(r|g|b);
#endif
px = FB_SCALARPACK_LCD(c);
/* updatepalette might get called, but the pallete does not necessarily
* need to be updated.
*/
if(PAL[i]!=c)
if(memcmp(&PAL[i], &px, sizeof(fb_data)))
{
PAL[i] = c;
PAL[i] = px;
#if defined(HAVE_LCD_MODES) && (HAVE_LCD_MODES & LCD_MODE_PAL256)
rb->lcd_pal256_update_pal(PAL);
#endif
@ -1256,4 +1255,3 @@ void lcd_reset(void)
lcd_begin();
vram_dirty();
}

View file

@ -261,12 +261,21 @@ void vid_init(void)
fb.enabled=1;
#if defined(HAVE_LCD_COLOR)
#if LCD_DEPTH == 24
fb.cc[0].r = 0; /* 8-8 (wasted bits on red) */
fb.cc[0].l = 16; /* this is the offset to the R bits (24-8) */
fb.cc[1].r = 0; /* 8-6 (wasted bits on green) */
fb.cc[1].l = 8; /* This is the offset to the G bits (24-8-8) */
fb.cc[2].r = 0; /* 8-5 (wasted bits on red) */
fb.cc[2].l = 0; /* This is the offset to the B bits (24-8-8-8) */
#else
fb.cc[0].r = 3; /* 8-5 (wasted bits on red) */
fb.cc[0].l = 11; /* this is the offset to the R bits (16-5) */
fb.cc[1].r = 2; /* 8-6 (wasted bits on green) */
fb.cc[1].l = 5; /* This is the offset to the G bits (16-5-6) */
fb.cc[2].r = 3; /* 8-5 (wasted bits on red) */
fb.cc[2].l = 0; /* This is the offset to the B bits (16-5-6-5) */
#endif
#else
fb.mode=3;
#endif

View file

@ -23,8 +23,6 @@
#include "lib/display_text.h"
#include "pluginbitmaps/superdom_boarditems.h"
extern const fb_data superdom_boarditems[];
char buf[255];
#define COLOUR_DARK 0
@ -32,7 +30,7 @@ char buf[255];
#define MARGIN 5
#if (LCD_DEPTH == 16)
#if (LCD_DEPTH >= 16)
#define MY_BITMAP_PART rb->lcd_bitmap_transparent_part
#else
#define MY_BITMAP_PART rb->lcd_mono_bitmap_part

View file

@ -12,7 +12,7 @@
#define IB0 (0xFF-B0)
#define IB1 (0xFF-B1)
static const fb_data _16bpp_colors[32] = {
static const unsigned _16bpp_colors[32] = {
/* normal */
LCD_RGBPACK(N0, N0, N0), LCD_RGBPACK(N0, N0, N1),
LCD_RGBPACK(N1, N0, N0), LCD_RGBPACK(N1, N0, N1),
@ -60,7 +60,7 @@ void update_screen(void)
*/
frameb = rb->lcd_framebuffer;
for ( y = 0 ; y < HEIGHT*WIDTH; y++ ){
frameb[y] = _16bpp_colors[(unsigned)sp_image[y]];
frameb[y] = FB_SCALARPACK(_16bpp_colors[(unsigned)sp_image[y]]);
}
#else
@ -74,7 +74,7 @@ void update_screen(void)
srcx = 0; /* reset our x counter before each row... */
for(x = 0; x < LCD_WIDTH; x++)
{
*frameb = _16bpp_colors[image[srcx>>16]];
*frameb = FB_SCALARPACK(_16bpp_colors[image[srcx>>16]]);
srcx += X_STEP; /* move through source image */
frameb++;
}

View file

@ -455,7 +455,7 @@ void output_row_8_native(uint32_t row, void * row_in,
*dest++ |= vi_pattern[bright] << shift;
}
#endif /* LCD_PIXELFORMAT */
#elif LCD_DEPTH == 16
#elif LCD_DEPTH >= 16
/* iriver h300, colour iPods, X5 */
(void)fb_width;
fb_data *dest = STRIDE_MAIN((fb_data *)ctx->bm->data + fb_width * row,
@ -470,15 +470,18 @@ void output_row_8_native(uint32_t row, void * row_in,
bm_alpha += ALIGN_UP(ctx->bm->width, 2) * row/2;
for (col = 0; col < ctx->bm->width; col++) {
(void) delta;
if (ctx->dither)
delta = DITHERXDY(col,dy);
r = qp->red;
g = qp->green;
b = qp->blue;
#if LCD_DEPTH < 24
r = (31 * r + (r >> 3) + delta) >> 8;
g = (63 * g + (g >> 2) + delta) >> 8;
b = (31 * b + (b >> 3) + delta) >> 8;
*dest = LCD_RGBPACK_LCD(r, g, b);
#endif
*dest = FB_RGBPACK_LCD(r, g, b);
dest += STRIDE_MAIN(1, ctx->bm->height);
if (bm_alpha) {
/* pack alpha channel for 2 pixels into 1 byte and negate
@ -526,8 +529,8 @@ int read_bmp_fd(int fd,
bool dither = false;
#endif
#ifdef HAVE_REMOTE_LCD
bool remote = false;
#ifdef HAVE_REMOTE_LCD
if (format & FORMAT_REMOTE) {
remote = true;
#if LCD_REMOTE_DEPTH == 1
@ -710,9 +713,7 @@ int read_bmp_fd(int fd,
case 16:
#if LCD_DEPTH >= 16
/* don't dither 16 bit BMP to LCD with same or larger depth */
#ifdef HAVE_REMOTE_LCD
if (!remote)
#endif
dither = false;
#endif
if (compression == 0) { /* BI_RGB, i.e. 15 bit */
@ -755,6 +756,12 @@ int read_bmp_fd(int fd,
break;
}
#if LCD_DEPTH >= 24
/* Never dither 24/32 bit BMP to 24 bit LCDs */
if (depth >= 24 && !remote)
dither = false;
#endif
/* Search to the beginning of the image data */
lseek(fd, (off_t)letoh32(bmph.off_bits), SEEK_SET);

View file

@ -680,6 +680,7 @@ static void output_row_32_native_fromyuv(uint32_t row, void * row_in,
unsigned r, g, b, y, u, v;
for (col = 0; col < ctx->bm->width; col++) {
(void) delta;
if (ctx->dither)
delta = DITHERXDY(col,dy);
y = SC_OUT(qp->b, ctx);
@ -687,10 +688,12 @@ static void output_row_32_native_fromyuv(uint32_t row, void * row_in,
v = SC_OUT(qp->r, ctx);
qp++;
yuv_to_rgb(y, u, v, &r, &g, &b);
#if LCD_DEPTH < 24
r = (31 * r + (r >> 3) + delta) >> 8;
g = (63 * g + (g >> 2) + delta) >> 8;
b = (31 * b + (b >> 3) + delta) >> 8;
*dest = LCD_RGBPACK_LCD(r, g, b);
#endif
*dest = FB_RGBPACK_LCD(r, g, b);
dest += DEST_STEP;
}
}
@ -764,7 +767,7 @@ static void output_row_32_native(uint32_t row, void * row_in,
*dest++ |= vi_pattern[bright] << shift;
}
#endif /* LCD_PIXELFORMAT */
#elif LCD_DEPTH == 16
#elif LCD_DEPTH >= 16
/* iriver h300, colour iPods, X5 */
(void)fb_width;
fb_data *dest = STRIDE_MAIN((fb_data *)ctx->bm->data + fb_width * row,
@ -780,16 +783,19 @@ static void output_row_32_native(uint32_t row, void * row_in,
bm_alpha += ALIGN_UP(ctx->bm->width, 2)*row/2;
for (col = 0; col < ctx->bm->width; col++) {
(void) delta;
if (ctx->dither)
delta = DITHERXDY(col,dy);
q0 = *qp++;
r = SC_OUT(q0.r, ctx);
g = SC_OUT(q0.g, ctx);
b = SC_OUT(q0.b, ctx);
#if LCD_DEPTH < 24
r = (31 * r + (r >> 3) + delta) >> 8;
g = (63 * g + (g >> 2) + delta) >> 8;
b = (31 * b + (b >> 3) + delta) >> 8;
*dest = LCD_RGBPACK_LCD(r, g, b);
#endif
*dest = FB_RGBPACK_LCD(r, g, b);
dest += STRIDE_MAIN(1, ctx->bm->height);
if (bm_alpha) {
/* pack alpha channel for 2 pixels into 1 byte */

View file

@ -218,6 +218,8 @@ drivers/lcd-16bit-vert.c
#else
drivers/lcd-16bit.c
#endif
#elif LCD_DEPTH == 24
drivers/lcd-24bit.c
#endif /* LCD_DEPTH */
common/diacritic.c
#endif /* HAVE_LCD_BITMAP */

View file

@ -12,5 +12,9 @@ strlen.c
defined(COWON_D2) || defined(MINI2440) || defined(SAMSUNG_YPR0) || \
defined(SAMSUNG_YPR1) || (defined(MROBE_500) && !defined(LCD_USE_DMA))) && \
!defined(SIMULATOR)
#if LCD_DEPTH == 24
lcd-as-memframe-24bit.c
#else
lcd-as-memframe.c
#endif
#endif

View file

@ -0,0 +1,3 @@
/* The ASM version of lcd-as-memframe.c isn't 24bit capable */
#include "lcd-as-memframe.c"

View file

@ -78,7 +78,7 @@ extern void lcd_write_yuv420_lines(fb_data *dst,
b = clamp(b, 0, 64*256-1);
}
*dst = LCD_RGBPACK_LCD(r >> 9, g >> 8, b >> 9);
*dst = FB_RGBPACK(r >> 6, g >> 6, b >> 6);
#if LCD_WIDTH >= LCD_HEIGHT
dst++;
@ -98,7 +98,7 @@ extern void lcd_write_yuv420_lines(fb_data *dst,
b = clamp(b, 0, 64*256-1);
}
*dst = LCD_RGBPACK_LCD(r >> 9, g >> 8, b >> 9);
*dst = FB_RGBPACK(r >> 6, g >> 6, b >> 6);
#if LCD_WIDTH >= LCD_HEIGHT
dst++;
@ -143,7 +143,7 @@ extern void lcd_write_yuv420_lines(fb_data *dst,
b = clamp(b, 0, 64*256-1);
}
*dst = LCD_RGBPACK_LCD(r >> 9, g >> 8, b >> 9);
*dst = FB_RGBPACK_LCD(r >> 9, g >> 8, b >> 9);
#if LCD_WIDTH >= LCD_HEIGHT
dst++;
@ -163,7 +163,7 @@ extern void lcd_write_yuv420_lines(fb_data *dst,
b = clamp(b, 0, 64*256-1);
}
*dst = LCD_RGBPACK_LCD(r >> 9, g >> 8, b >> 9);
*dst = FB_RGBPACK_LCD(r >> 9, g >> 8, b >> 9);
#if LCD_WIDTH >= LCD_HEIGHT
dst++;

1129
firmware/drivers/lcd-24bit.c Normal file

File diff suppressed because it is too large Load diff

View file

@ -422,7 +422,7 @@ void lcd_blit_yuv(unsigned char * const src[3],
b = clamp(b, 0, 64*256-1);
}
*dst = FB_RGBPACK_LCD(r >> 9, g >> 8, b >> 9);
*dst = FB_RGBPACK(r >> 6, g >> 6, b >> 6);
#if LCD_WIDTH >= LCD_HEIGHT
dst++;
@ -442,7 +442,7 @@ void lcd_blit_yuv(unsigned char * const src[3],
b = clamp(b, 0, 64*256-1);
}
*dst = FB_RGBPACK_LCD(r >> 9, g >> 8, b >> 9);
*dst = FB_RGBPACK(r >> 6, g >> 6, b >> 6);
#if LCD_WIDTH >= LCD_HEIGHT
dst++;
@ -487,7 +487,7 @@ void lcd_blit_yuv(unsigned char * const src[3],
b = clamp(b, 0, 64*256-1);
}
*dst = FB_RGBPACK_LCD(r >> 9, g >> 8, b >> 9);
*dst = FB_RGBPACK(r >> 6, g >> 6, b >> 6);
#if LCD_WIDTH >= LCD_HEIGHT
dst++;
@ -507,7 +507,7 @@ void lcd_blit_yuv(unsigned char * const src[3],
b = clamp(b, 0, 64*256-1);
}
*dst = FB_RGBPACK_LCD(r >> 9, g >> 8, b >> 9);
*dst = FB_RGBPACK(r >> 6, g >> 6, b >> 6);
#if LCD_WIDTH >= LCD_HEIGHT
dst++;

View file

@ -275,6 +275,7 @@
#define VERTICAL_INTERLEAVED 4
#define RGB565 565
#define RGB565SWAPPED 3553
#define RGB888 888
/* LCD_STRIDEFORMAT */
#define VERTICAL_STRIDE 1

View file

@ -47,7 +47,7 @@
/* sqrt(240^2 + 320^2) / 2.6 = 153.8 */
#define LCD_DPI 154
#define LCD_DEPTH 16
#define LCD_DEPTH 24
/* Check that but should not matter */
#define LCD_PIXELFORMAT RGB565

View file

@ -53,11 +53,11 @@
#define LCD_HEIGHT 240
#endif
#define LCD_DEPTH 16
#define LCD_DEPTH 24
/* Calculated value, important for touch sensor */
#define LCD_DPI 180
/* Check that but should not matter */
#define LCD_PIXELFORMAT RGB565
#define LCD_PIXELFORMAT RGB888
/* Capacitive touchscreen */
#define HAVE_TOUCHSCREEN

View file

@ -53,8 +53,8 @@
#define LCD_HEIGHT 220
/* sqrt(176^2 + 220^2) / 1.8 = 156.5 */
#define LCD_DPI 157
#define LCD_DEPTH 16 /* 65536 colours */
#define LCD_PIXELFORMAT RGB565 /* rgb565 */
#define LCD_DEPTH 24 /* 65536 colours */
#define LCD_PIXELFORMAT RGB888 /* rgb565 */
#ifndef BOOTLOADER
/* define this if you have LCD enable function */

View file

@ -44,8 +44,8 @@
#define LCD_HEIGHT 480
#endif
#define LCD_DEPTH 16
#define LCD_PIXELFORMAT RGB565
#define LCD_DEPTH 24
#define LCD_PIXELFORMAT RGB888
/* define this to indicate your device's keypad */
#define HAVE_TOUCHSCREEN

View file

@ -127,7 +127,13 @@ typedef unsigned char fb_data;
#elif LCD_DEPTH <= 16
typedef unsigned short fb_data;
#define FB_DATA_SZ 2
#else /* LCD_DEPTH > 16 */
#elif LCD_DEPTH <= 24
struct _fb_pixel {
unsigned char b, g, r;
};
typedef struct _fb_pixel fb_data;
#define FB_DATA_SZ 3
#else /* LCD_DEPTH > 24 */
typedef unsigned long fb_data;
#define FB_DATA_SZ 4
#endif /* LCD_DEPTH */
@ -341,6 +347,31 @@ static inline unsigned lcd_color_to_native(unsigned color)
#define RGB_UNPACK_GREEN_LCD(x) _RGB_UNPACK_GREEN_LCD(x)
#define RGB_UNPACK_BLUE_LCD(x) _RGB_UNPACK_BLUE_LCD(x)
#endif /* RGB565* */
#elif LCD_PIXELFORMAT == RGB888
#define LCD_MAX_RED 255
#define LCD_MAX_GREEN 255
#define LCD_MAX_BLUE 255
#define LCD_RED_BITS 8
#define LCD_GREEN_BITS 8
#define LCD_BLUE_BITS 8
/* pack/unpack native RGB values */
#define _RGBPACK(r, g, b) ( r << 16 | g << 8 | b )
#define _RGB_UNPACK_RED(x) ((x >> 16) & 0xff)
#define _RGB_UNPACK_GREEN(x) ((x >> 8) & 0xff)
#define _RGB_UNPACK_BLUE(x) ((x >> 0) & 0xff)
#define _LCD_UNSWAP_COLOR(x) (x)
#define LCD_RGBPACK(r, g, b) _RGBPACK((r), (g), (b))
#define LCD_RGBPACK_LCD(r, g, b) _RGBPACK((r), (g), (b))
#define RGB_UNPACK_RED(x) _RGB_UNPACK_RED(x)
#define RGB_UNPACK_GREEN(x) _RGB_UNPACK_GREEN(x)
#define RGB_UNPACK_BLUE(x) _RGB_UNPACK_BLUE(x)
#define RGB_UNPACK_RED_LCD(x) _RGB_UNPACK_RED(x)
#define RGB_UNPACK_GREEN_LCD(x) _RGB_UNPACK_GREEN(x)
#define RGB_UNPACK_BLUE_LCD(x) _RGB_UNPACK_BLUE(x)
#else
/* other colour depths */
#endif
@ -367,6 +398,58 @@ static inline unsigned lcd_color_to_native(unsigned color)
#endif /* HAVE_LCD_COLOR */
/* Framebuffer conversion macros: Convert from and to the native display data
* format (fb_data).
*
* FB_RGBPACK: Convert the three r,g,b values to fb_data. r,g,b are
* assumed to in 8-bit format.
* FB_RGBPACK_LCD Like FB_RGBPACK, except r,g,b shall be in display-native
* bit format (e.g. 5-bit r for RGB565)
* FB_UNPACK_RED Extract the red component of fb_data into 8-bit red value.
* FB_UNPACK_GREEN Like FB_UNPACK_RED, just for the green component.
* FB_UNPACK_BLIE Like FB_UNPACK_RED, just for the green component.
* FB_SCALARPACK Similar to FB_RGBPACK, except that the channels are already
* combined into a single scalar value. Again, 8-bit per channel.
* FB_SCALARPACK_LCD Like FB_SCALARPACK, except the channels shall be in
* display-native format (i.e. the scalar is 16bits on RGB565)
* FB_UNPACK_SCALAR_LCD Converts an fb_data to a scalar value in display-native
* format, so it's the reverse of FB_SCALARPACK_LCD
*/
#if LCD_DEPTH >= 24
static inline fb_data scalar_to_fb(unsigned p)
{
union { fb_data st; unsigned sc; } convert;
convert.sc = p; return convert.st;
}
static inline unsigned fb_to_scalar(fb_data p)
{
union { fb_data st; unsigned sc; } convert;
convert.st = p; return convert.sc;
}
#define FB_RGBPACK(r_, g_, b_) ((fb_data){.r = r_, .g = g_, .b = b_})
#define FB_RGBPACK_LCD(r_, g_, b_) FB_RGBPACK(r_, g_, b_)
#define FB_UNPACK_RED(fb) ((fb).r)
#define FB_UNPACK_GREEN(fb) ((fb).g)
#define FB_UNPACK_BLUE(fb) ((fb).b)
#define FB_SCALARPACK(c) scalar_to_fb(c)
#define FB_SCALARPACK_LCD(c) scalar_to_fb(c)
#define FB_UNPACK_SCALAR_LCD(fb) fb_to_scalar(fb)
#elif defined(HAVE_LCD_COLOR)
#define FB_RGBPACK(r_, g_, b_) LCD_RGBPACK(r_, g_, b_)
#define FB_RGBPACK_LCD(r_, g_, b_) LCD_RGBPACK_LCD(r_, g_, b_)
#define FB_UNPACK_RED(fb) RGB_UNPACK_RED(fb)
#define FB_UNPACK_GREEN(fb) RGB_UNPACK_GREEN(fb)
#define FB_UNPACK_BLUE(fb) RGB_UNPACK_BLUE(fb)
#define FB_SCALARPACK(c) LCD_RGBPACK(RGB_UNPACK_RED(c), RGB_UNPACK_GREEN(c), RGB_UNPACK_BLUE(c))
#define FB_SCALARPACK_LCD(c) (c)
#define FB_UNPACK_SCALAR_LCD(fb) (fb)
#else
#define FB_SCALARPACK(c) (c)
#define FB_SCALARPACK_LCD(c) (c)
#define FB_UNPACK_SCALAR_LCD(fb) (fb)
#endif
/* Frame buffer dimensions */
#if LCD_DEPTH == 1
#if LCD_PIXELFORMAT == HORIZONTAL_PACKING

View file

@ -118,6 +118,9 @@ void screen_dump(void)
#elif LCD_DEPTH <= 16
unsigned short *dst, *dst_end;
unsigned short linebuf[DUMP_BMP_LINESIZE/2];
#else /* 24bit */
unsigned char *dst, *dst_end;
unsigned char linebuf[DUMP_BMP_LINESIZE * 3];
#endif
#if CONFIG_RTC
@ -227,6 +230,17 @@ void screen_dump(void)
#endif
}
while (dst < dst_end);
#elif LCD_DEPTH == 24
dst_end = dst + LCD_WIDTH*3;
src = FBADDR(0, y);
do
{
*dst++ = src->b;
*dst++ = src->g;
*dst++ = src->r;
++src;
}
while (dst < dst_end);
#endif /* LCD_DEPTH */
write(fd, linebuf, DUMP_BMP_LINESIZE);

View file

@ -112,6 +112,8 @@ static unsigned long get_lcd_pixel(int x, int y)
#else
return *FBADDR(x, y);
#endif
#elif LCD_DEPTH == 24
return FB_UNPACK_SCALAR_LCD(*FBADDR(x, y));
#endif
}
@ -172,7 +174,7 @@ void sim_backlight(int value)
/* initialise simulator lcd driver */
void lcd_init_device(void)
{
#if LCD_DEPTH == 16
#if LCD_DEPTH >= 16
lcd_surface = SDL_CreateRGBSurface(SDL_SWSURFACE,
SIM_LCD_WIDTH * display_zoom,
SIM_LCD_HEIGHT * display_zoom,

View file

@ -491,14 +491,6 @@ void generate_c_source(char *id, char* header_dir, int width, int height,
bool have_header = header_dir && header_dir[0];
create_bm = have_header && create_bm;
if (t_depth > 16)
{
fprintf(stderr, "Generating C source not supported for this format\n");
fprintf(stderr, "because Rockbox does not support this display depth yet.\n");
fprintf(stderr, "However you are welcome to fix this!\n");
return;
}
if (!id || !id[0])
id = "bitmap";
@ -520,8 +512,11 @@ void generate_c_source(char *id, char* header_dir, int width, int height,
id, height, id, width);
if (t_depth <= 8)
fprintf(fh, "extern const unsigned char %s[];\n", id);
else
else if (t_depth <= 16)
fprintf(fh, "extern const unsigned short %s[];\n", id);
else
fprintf(fh, "extern const fb_data %s[];\n", id);
if (create_bm)
{
@ -542,8 +537,10 @@ void generate_c_source(char *id, char* header_dir, int width, int height,
if (t_depth <= 8)
fprintf(f, "const unsigned char %s[] = {\n", id);
else
else if (t_depth == 16)
fprintf(f, "const unsigned short %s[] = {\n", id);
else if (t_depth == 24)
fprintf(f, "const fb_data %s[] = {\n", id);
for (i = 0; i < t_height; i++)
{
@ -555,6 +552,12 @@ void generate_c_source(char *id, char* header_dir, int width, int height,
else if (t_depth == 16)
fprintf(f, "0x%04x,%c", t_bitmap->d16[i * t_width + a],
(a + 1) % 10 ? ' ' : '\n');
else if (t_depth == 24)
fprintf(f, "{ .r = 0x%02x, .g = 0x%02x, .b = 0x%02x },%c",
t_bitmap->d24[i * t_width + a].r,
t_bitmap->d24[i * t_width + a].g,
t_bitmap->d24[i * t_width + a].b,
(a + 1) % 4 ? ' ' : '\n');
}
fprintf(f, "\n");
}
@ -651,7 +654,7 @@ void print_usage(void)
"\t 6 Greyscale iPod 4-grey\n"
"\t 7 Greyscale X5 remote 4-grey\n"
"\t 8 16-bit packed 5-6-5 RGB with a vertical stride\n"
"\t 9 24-bit BGR (raw only for now)\n");
"\t 9 24-bit BGR\n");
printf("build date: " __DATE__ "\n\n");
}

View file

@ -79,58 +79,58 @@ RSBS: no
<main>
# override implicit .wps filename
wps.800x480x16: cabbiev2.800x480x16.wps
wps.480x800x16: cabbiev2.480x800x16.wps
wps.400x240x16: cabbiev2.400x240x16.wps
wps.320x480x16: cabbiev2.320x480x16.wps
wps.320x240x16: cabbiev2.320x240x16.wps
wps.240x400x16: cabbiev2.240x400x16.wps
wps.240x320x16: cabbiev2.240x320x16.wps
wps.220x176x16: cabbiev2.220x176x16.wps
wps.176x220x16: cabbiev2.176x220x16.wps
wps.176x132x16: cabbiev2.176x132x16.wps
wps.160x128x16: cabbiev2.160x128x16.wps
wps.160x128x2: cabbiev2.160x128x2.wps
wps.160x128x1: cabbiev2.160x128x1.wps
wps.138x110x2: cabbiev2.138x110x2.wps
wps.128x128x16: cabbiev2.128x128x16.wps
wps.128x128x2: cabbiev2.128x128x2.wps
wps.128x160x16: cabbiev2.128x160x16.wps
wps.132x80x16: cabbiev2.132x80x16.wps
wps.128x96x16: cabbiev2.128x96x16.wps
wps.128x96x2: cabbiev2.128x96x2.wps
wps.128x64x1: cabbiev2.128x64x1.wps
wps.112x64x1: cabbiev2.112x64x1.wps
wps.96x96x16: cabbiev2.96x96x16.wps
wps.800x480x(16|24): cabbiev2.800x480x16.wps
wps.480x800x(16|24): cabbiev2.480x800x16.wps
wps.400x240x(16|24): cabbiev2.400x240x16.wps
wps.320x480x(16|24): cabbiev2.320x480x16.wps
wps.320x240x(16|24): cabbiev2.320x240x16.wps
wps.240x400x(16|24): cabbiev2.240x400x16.wps
wps.240x320x(16|24): cabbiev2.240x320x16.wps
wps.220x176x(16|24): cabbiev2.220x176x16.wps
wps.176x220x(16|24): cabbiev2.176x220x16.wps
wps.176x132x(16|24): cabbiev2.176x132x16.wps
wps.160x128x(16|24): cabbiev2.160x128x16.wps
wps.160x128x2: cabbiev2.160x128x2.wps
wps.160x128x1: cabbiev2.160x128x1.wps
wps.138x110x2: cabbiev2.138x110x2.wps
wps.128x128x(16|24): cabbiev2.128x128x16.wps
wps.128x128x2: cabbiev2.128x128x2.wps
wps.128x160x(16|24): cabbiev2.128x160x16.wps
wps.132x80x(16|24): cabbiev2.132x80x16.wps
wps.128x96x(16|24): cabbiev2.128x96x16.wps
wps.128x96x2: cabbiev2.128x96x2.wps
wps.128x64x1: cabbiev2.128x64x1.wps
wps.112x64x1: cabbiev2.112x64x1.wps
wps.96x96x(16|24): cabbiev2.96x96x16.wps
# override implicit .fms filename
fms.160x128x2: cabbiev2-160x128x2.fms
fms.128x128x2: cabbiev2-128x128x2.fms
# Preferred font (including .fnt extension - leave blank for player):
Font.800x480x16: 35-Adobe-Helvetica.fnt
Font.480x800x16: 35-Adobe-Helvetica.fnt
Font.400x240x16: 15-Adobe-Helvetica.fnt
Font.320x480x16: 27-Adobe-Helvetica.fnt
Font.320x240x16: 15-Adobe-Helvetica.fnt
Font.240x400x16: 16-Adobe-Helvetica.fnt
Font.240x320x16: 15-Adobe-Helvetica.fnt
Font.220x176x16: 12-Adobe-Helvetica.fnt
Font.176x220x16: 12-Adobe-Helvetica.fnt
Font.176x132x16: 12-Adobe-Helvetica.fnt
Font.160x128x16: 12-Adobe-Helvetica.fnt
Font.160x128x2: 12-Adobe-Helvetica.fnt
Font.160x128x1: 12-Adobe-Helvetica.fnt
Font.138x110x2: 12-Adobe-Helvetica.fnt
Font.128x128x16: 12-Adobe-Helvetica.fnt
Font.128x128x2: 12-Adobe-Helvetica.fnt
Font.128x160x16: 12-Adobe-Helvetica.fnt
Font.132x80x16: 11-Sazanami-Mincho.fnt
Font.128x96x16: 08-Rockfont.fnt
Font.128x96x2: 12-Adobe-Helvetica.fnt
Font.128x64x1: 08-Rockfont.fnt
Font.112x64x1: 08-Rockfont.fnt
Font.96x96x16: 08-Rockfont.fnt
Font.800x480x(16|24): 35-Adobe-Helvetica.fnt
Font.480x800x(16|24): 35-Adobe-Helvetica.fnt
Font.400x240x(16|24): 15-Adobe-Helvetica.fnt
Font.320x480x(16|24): 27-Adobe-Helvetica.fnt
Font.320x240x(16|24): 15-Adobe-Helvetica.fnt
Font.240x400x(16|24): 16-Adobe-Helvetica.fnt
Font.240x320x(16|24): 15-Adobe-Helvetica.fnt
Font.220x176x(16|24): 12-Adobe-Helvetica.fnt
Font.176x220x(16|24): 12-Adobe-Helvetica.fnt
Font.176x132x(16|24): 12-Adobe-Helvetica.fnt
Font.160x128x(16|24): 12-Adobe-Helvetica.fnt
Font.160x128x2: 12-Adobe-Helvetica.fnt
Font.160x128x1: 12-Adobe-Helvetica.fnt
Font.138x110x2: 12-Adobe-Helvetica.fnt
Font.128x128x(16|24): 12-Adobe-Helvetica.fnt
Font.128x128x2: 12-Adobe-Helvetica.fnt
Font.128x160x(16|24): 12-Adobe-Helvetica.fnt
Font.132x80x(16|24): 11-Sazanami-Mincho.fnt
Font.128x96x(16|24): 08-Rockfont.fnt
Font.128x96x2: 12-Adobe-Helvetica.fnt
Font.128x64x1: 08-Rockfont.fnt
Font.112x64x1: 08-Rockfont.fnt
Font.96x96x(16|24): 08-Rockfont.fnt
#misc settings that should be ignored on grayscale targets
foreground color: CCCCCC
@ -141,68 +141,68 @@ line selector text color: 000000
filetype colours: -
#backdrop - remember this is the source file name in your SVN folder, not dest name!
backdrop.800x480x16: backdrops/cabbiev2.800x480x16.bmp
backdrop.480x800x16: backdrops/cabbiev2.480x800x16.bmp
backdrop.400x240x16: backdrops/cabbiev2.400x240x16.bmp
backdrop.320x480x16: backdrops/cabbiev2.320x480x16.bmp
backdrop.320x240x16: backdrops/cabbiev2.320x240x16.bmp
backdrop.128x128x16: backdrops/cabbiev2.128x128x16.bmp
backdrop.128x128x2: backdrops/cabbiev2.128x128x2.bmp
backdrop.128x160x16: backdrops/cabbiev2.128x160x16.bmp
backdrop.132x80x16: backdrops/cabbiev2.132x80x16.bmp
backdrop.138x110x2: backdrops/cabbiev2.138x110x2.bmp
backdrop.160x128x16: backdrops/cabbiev2.160x128x16.bmp
backdrop.160x128x2: backdrops/cabbiev2.160x128x2.bmp
backdrop.176x132x16: backdrops/cabbiev2.176x132x16.bmp
backdrop.176x220x16: backdrops/cabbiev2.176x220x16.bmp
backdrop.220x176x16: backdrops/cabbiev2.220x176x16.bmp
backdrop.240x320x16: backdrops/cabbiev2.240x320x16.bmp
backdrop.240x400x16: backdrops/cabbiev2.240x400x16.bmp
backdrop.96x96x16: backdrops/cabbiev2.96x96x16.bmp
backdrop.128x96x16: backdrops/cabbiev2.128x96x16.bmp
backdrop.128x96x2: backdrops/cabbiev2.128x96x2.bmp
backdrop.800x480x(16|24): backdrops/cabbiev2.800x480x16.bmp
backdrop.480x800x(16|24): backdrops/cabbiev2.480x800x16.bmp
backdrop.400x240x(16|24): backdrops/cabbiev2.400x240x16.bmp
backdrop.320x480x(16|24): backdrops/cabbiev2.320x480x16.bmp
backdrop.320x240x(16|24): backdrops/cabbiev2.320x240x16.bmp
backdrop.128x128x(16|24): backdrops/cabbiev2.128x128x16.bmp
backdrop.128x128x2: backdrops/cabbiev2.128x128x2.bmp
backdrop.128x160x(16|24): backdrops/cabbiev2.128x160x16.bmp
backdrop.132x80x(16|24): backdrops/cabbiev2.132x80x16.bmp
backdrop.138x110x2: backdrops/cabbiev2.138x110x2.bmp
backdrop.160x128x(16|24): backdrops/cabbiev2.160x128x16.bmp
backdrop.160x128x2: backdrops/cabbiev2.160x128x2.bmp
backdrop.176x132x(16|24): backdrops/cabbiev2.176x132x16.bmp
backdrop.176x220x(16|24): backdrops/cabbiev2.176x220x16.bmp
backdrop.220x176x(16|24): backdrops/cabbiev2.220x176x16.bmp
backdrop.240x320x(16|24): backdrops/cabbiev2.240x320x16.bmp
backdrop.240x400x(16|24): backdrops/cabbiev2.240x400x16.bmp
backdrop.96x96x(16|24): backdrops/cabbiev2.96x96x16.bmp
backdrop.128x96x(16|24): backdrops/cabbiev2.128x96x16.bmp
backdrop.128x96x2: backdrops/cabbiev2.128x96x2.bmp
#selection bar settings for color targets
selector type..+x16: bar (gradient)
selector type..+x2: bar (inverse)
#icons
iconset.800x480x16: icons/tango_icons.32x32.bmp
iconset.480x800x16: icons/tango_icons.32x32.bmp
iconset.400x240x16: icons/tango_icons.16x16.bmp
iconset.320x480x16: icons/tango_icons.24x24.bmp
iconset.320x240x16: icons/tango_icons.16x16.bmp
iconset.128x128x16: icons/tango_icons.12x12.bmp
iconset.128x160x16: icons/tango_icons.12x12.bmp
iconset.132x80x16: icons/tango_icons.12x12.bmp
iconset.160x128x16: icons/tango_icons.12x12.bmp
iconset.176x132x16: icons/tango_icons.12x12.bmp
iconset.176x220x16: icons/tango_icons.12x12.bmp
iconset.220x176x16: icons/tango_icons.12x12.bmp
iconset.240x320x16: icons/tango_icons.16x16.bmp
iconset.240x400x16: icons/tango_icons.16x16.bmp
iconset.128x96x16: icons/tango_icons.8x8.bmp
iconset.96x96x16: icons/tango_icons.8x8.bmp
iconset..+x2: icons/tango_small_mono.bmp
iconset.800x480x(16|24): icons/tango_icons.32x32.bmp
iconset.480x800x(16|24): icons/tango_icons.32x32.bmp
iconset.400x240x(16|24): icons/tango_icons.16x16.bmp
iconset.320x480x(16|24): icons/tango_icons.24x24.bmp
iconset.320x240x(16|24): icons/tango_icons.16x16.bmp
iconset.128x128x(16|24): icons/tango_icons.12x12.bmp
iconset.128x160x(16|24): icons/tango_icons.12x12.bmp
iconset.132x80x(16|24): icons/tango_icons.12x12.bmp
iconset.160x128x(16|24): icons/tango_icons.12x12.bmp
iconset.176x132x(16|24): icons/tango_icons.12x12.bmp
iconset.176x220x(16|24): icons/tango_icons.12x12.bmp
iconset.220x176x(16|24): icons/tango_icons.12x12.bmp
iconset.240x320x(16|24): icons/tango_icons.16x16.bmp
iconset.240x400x(16|24): icons/tango_icons.16x16.bmp
iconset.128x96x(16|24): icons/tango_icons.8x8.bmp
iconset.96x96x(16|24): icons/tango_icons.8x8.bmp
iconset..+x2: icons/tango_small_mono.bmp
#viewer icons
viewers iconset.800x480x16: icons/tango_icons_viewers.32x32.bmp
viewers iconset.480x800x16: icons/tango_icons_viewers.32x32.bmp
viewers iconset.400x240x16: icons/tango_icons_viewers.16x16.bmp
viewers iconset.320x480x16: icons/tango_icons_viewers.24x24.bmp
viewers iconset.320x240x16: icons/tango_icons_viewers.16x16.bmp
viewers iconset.128x128x16: icons/tango_icons_viewers.12x12.bmp
viewers iconset.128x160x16: icons/tango_icons_viewers.12x12.bmp
viewers iconset.132x80x16: icons/tango_icons_viewers.12x12.bmp
viewers iconset.160x128x16: icons/tango_icons_viewers.12x12.bmp
viewers iconset.176x132x16: icons/tango_icons_viewers.12x12.bmp
viewers iconset.176x220x16: icons/tango_icons_viewers.12x12.bmp
viewers iconset.220x176x16: icons/tango_icons_viewers.12x12.bmp
viewers iconset.240x320x16: icons/tango_icons_viewers.16x16.bmp
viewers iconset.240x400x16: icons/tango_icons_viewers.16x16.bmp
viewers iconset.128x96x16: icons/tango_icons_viewers.8x8.bmp
viewers iconset.96x96x16: icons/tango_icons_viewers.8x8.bmp
viewers iconset..+x2: icons/tango_small_viewers_mono.bmp
viewers iconset.800x480x(16|24): icons/tango_icons_viewers.32x32.bmp
viewers iconset.480x800x(16|24): icons/tango_icons_viewers.32x32.bmp
viewers iconset.400x240x(16|24): icons/tango_icons_viewers.16x16.bmp
viewers iconset.320x480x(16|24): icons/tango_icons_viewers.24x24.bmp
viewers iconset.320x240x(16|24): icons/tango_icons_viewers.16x16.bmp
viewers iconset.128x128x(16|24): icons/tango_icons_viewers.12x12.bmp
viewers iconset.128x160x(16|24): icons/tango_icons_viewers.12x12.bmp
viewers iconset.132x80x(16|24): icons/tango_icons_viewers.12x12.bmp
viewers iconset.160x128x(16|24): icons/tango_icons_viewers.12x12.bmp
viewers iconset.176x132x(16|24): icons/tango_icons_viewers.12x12.bmp
viewers iconset.176x220x(16|24): icons/tango_icons_viewers.12x12.bmp
viewers iconset.220x176x(16|24): icons/tango_icons_viewers.12x12.bmp
viewers iconset.240x320x(16|24): icons/tango_icons_viewers.16x16.bmp
viewers iconset.240x400x(16|24): icons/tango_icons_viewers.16x16.bmp
viewers iconset.128x96x(16|24): icons/tango_icons_viewers.8x8.bmp
viewers iconset.96x96x(16|24): icons/tango_icons_viewers.8x8.bmp
viewers iconset..+x2: icons/tango_small_viewers_mono.bmp
show icons: on
statusbar: top