diff options
Diffstat (limited to 'apps/plugins')
-rw-r--r-- | apps/plugins/CATEGORIES | 1 | ||||
-rw-r--r-- | apps/plugins/SOURCES | 11 | ||||
-rw-r--r-- | apps/plugins/SUBDIRS | 4 | ||||
-rw-r--r-- | apps/plugins/doom/i_video.c | 10 | ||||
-rw-r--r-- | apps/plugins/greyscale.c | 11 | ||||
-rw-r--r-- | apps/plugins/jpeg.c | 12 | ||||
-rw-r--r-- | apps/plugins/lib/SOURCES | 3 | ||||
-rw-r--r-- | apps/plugins/lib/grey.h | 6 | ||||
-rw-r--r-- | apps/plugins/lib/grey_core.c | 87 | ||||
-rw-r--r-- | apps/plugins/lib/grey_draw.c | 2 | ||||
-rw-r--r-- | apps/plugins/lib/grey_parm.c | 4 | ||||
-rw-r--r-- | apps/plugins/lib/grey_scroll.c | 6 | ||||
-rw-r--r-- | apps/plugins/mandelbrot.c | 16 | ||||
-rw-r--r-- | apps/plugins/mpegplayer/mpeg_settings.c | 8 | ||||
-rw-r--r-- | apps/plugins/mpegplayer/mpegplayer.c | 9 | ||||
-rw-r--r-- | apps/plugins/plasma.c | 13 | ||||
-rw-r--r-- | apps/plugins/test_fps.c | 4 |
17 files changed, 181 insertions, 26 deletions
diff --git a/apps/plugins/CATEGORIES b/apps/plugins/CATEGORIES index 4b267c162b..c2ad75e0c7 100644 --- a/apps/plugins/CATEGORIES +++ b/apps/plugins/CATEGORIES | |||
@@ -80,6 +80,7 @@ stopwatch,apps | |||
80 | test_codec,viewers | 80 | test_codec,viewers |
81 | test_disk,apps | 81 | test_disk,apps |
82 | test_fps,apps | 82 | test_fps,apps |
83 | test_grey,apps | ||
83 | test_sampr,apps | 84 | test_sampr,apps |
84 | test_scanrate,apps | 85 | test_scanrate,apps |
85 | test_viewports,apps | 86 | test_viewports,apps |
diff --git a/apps/plugins/SOURCES b/apps/plugins/SOURCES index 23c22f9826..968592d15a 100644 --- a/apps/plugins/SOURCES +++ b/apps/plugins/SOURCES | |||
@@ -19,6 +19,7 @@ stats.c | |||
19 | stopwatch.c | 19 | stopwatch.c |
20 | vbrfix.c | 20 | vbrfix.c |
21 | viewer.c | 21 | viewer.c |
22 | test_disk.c | ||
22 | 23 | ||
23 | #ifdef OLYMPUS_MROBE_500 | 24 | #ifdef OLYMPUS_MROBE_500 |
24 | /* remove these once the plugins before it are compileable */ | 25 | /* remove these once the plugins before it are compileable */ |
@@ -46,17 +47,22 @@ flipit.c | |||
46 | #ifdef HAVE_LCD_BITMAP /* Not for the Player */ | 47 | #ifdef HAVE_LCD_BITMAP /* Not for the Player */ |
47 | brickmania.c | 48 | brickmania.c |
48 | maze.c | 49 | maze.c |
49 | mazezam.c | 50 | mazezam.c |
51 | greyscale.c | ||
52 | test_fps.c | ||
53 | test_scanrate.c | ||
50 | text_editor.c | 54 | text_editor.c |
51 | wavview.c | 55 | wavview.c |
52 | robotfindskitten.c | 56 | robotfindskitten.c |
53 | 57 | ||
54 | /* Plugins needing the grayscale lib on low-depth LCDs */ | 58 | /* Plugins needing the grayscale lib on low-depth LCDs */ |
55 | #ifndef IAUDIO_M3 /* FIXME: no greyscale library yet */ | ||
56 | fire.c | 59 | fire.c |
57 | jpeg.c | 60 | jpeg.c |
58 | mandelbrot.c | 61 | mandelbrot.c |
59 | plasma.c | 62 | plasma.c |
63 | |||
64 | #if LCD_DEPTH < 4 | ||
65 | test_grey.c | ||
60 | #endif | 66 | #endif |
61 | 67 | ||
62 | blackjack.c | 68 | blackjack.c |
@@ -118,6 +124,7 @@ nim.c | |||
118 | 124 | ||
119 | #if CONFIG_CODEC == SWCODEC /* software codec platforms */ | 125 | #if CONFIG_CODEC == SWCODEC /* software codec platforms */ |
120 | mp3_encoder.c | 126 | mp3_encoder.c |
127 | test_codec.c | ||
121 | wav2wv.c | 128 | wav2wv.c |
122 | #else /* hardware codec platforms */ | 129 | #else /* hardware codec platforms */ |
123 | #ifndef HAVE_MMC /* not for Ondio, has no remote control pin */ | 130 | #ifndef HAVE_MMC /* not for Ondio, has no remote control pin */ |
diff --git a/apps/plugins/SUBDIRS b/apps/plugins/SUBDIRS index 9bda7c2715..b0bffc73eb 100644 --- a/apps/plugins/SUBDIRS +++ b/apps/plugins/SUBDIRS | |||
@@ -34,7 +34,7 @@ pacbox | |||
34 | 34 | ||
35 | /* For all the color targets */ | 35 | /* For all the color targets */ |
36 | #if defined(HAVE_LCD_COLOR) || \ | 36 | #if defined(HAVE_LCD_COLOR) || \ |
37 | (LCD_DEPTH == 2) && !defined(ARCHOS_AV300) && !defined(IAUDIO_M3) | 37 | (LCD_DEPTH == 2) && !defined(ARCHOS_AV300) |
38 | doom | 38 | doom |
39 | #endif | 39 | #endif |
40 | 40 | ||
@@ -42,9 +42,7 @@ doom | |||
42 | #if CONFIG_CODEC == SWCODEC | 42 | #if CONFIG_CODEC == SWCODEC |
43 | midi | 43 | midi |
44 | /* beatbox */ | 44 | /* beatbox */ |
45 | #ifndef IAUDIO_M3 /* TODO: no greyscale lib yet */ | ||
46 | mpegplayer | 45 | mpegplayer |
47 | #endif | 46 | #endif |
48 | #endif | ||
49 | 47 | ||
50 | #endif /* IRIVER_IFP7XX_SERIES */ | 48 | #endif /* IRIVER_IFP7XX_SERIES */ |
diff --git a/apps/plugins/doom/i_video.c b/apps/plugins/doom/i_video.c index bc0f204d3b..ce4b670583 100644 --- a/apps/plugins/doom/i_video.c +++ b/apps/plugins/doom/i_video.c | |||
@@ -235,6 +235,16 @@ void I_ShutdownGraphics(void) | |||
235 | #define DOOMBUTTON_ESC BUTTON_OFF | 235 | #define DOOMBUTTON_ESC BUTTON_OFF |
236 | #define DOOMBUTTON_ENTER BUTTON_SELECT | 236 | #define DOOMBUTTON_ENTER BUTTON_SELECT |
237 | #define DOOMBUTTON_WEAPON BUTTON_ON | 237 | #define DOOMBUTTON_WEAPON BUTTON_ON |
238 | #elif CONFIG_KEYPAD == IAUDIO_M3_PAD | ||
239 | #define DOOMBUTTON_ESC BUTTON_RC_REC | ||
240 | #define DOOMBUTTON_UP BUTTON_RC_VOL_UP | ||
241 | #define DOOMBUTTON_DOWN BUTTON_RC_VOL_DOWN | ||
242 | #define DOOMBUTTON_LEFT BUTTON_RC_REW | ||
243 | #define DOOMBUTTON_RIGHT BUTTON_RC_FF | ||
244 | #define DOOMBUTTON_OPEN BUTTON_RC_PLAY | ||
245 | #define DOOMBUTTON_SHOOT BUTTON_RC_MODE | ||
246 | #define DOOMBUTTON_ENTER BUTTON_RC_PLAY | ||
247 | #define DOOMBUTTON_WEAPON BUTTON_RC_MENU | ||
238 | #elif CONFIG_KEYPAD == COWOND2_PAD | 248 | #elif CONFIG_KEYPAD == COWOND2_PAD |
239 | #define DOOMBUTTON_ESC BUTTON_POWER | 249 | #define DOOMBUTTON_ESC BUTTON_POWER |
240 | #define DOOMBUTTON_UP BUTTON_UP | 250 | #define DOOMBUTTON_UP BUTTON_UP |
diff --git a/apps/plugins/greyscale.c b/apps/plugins/greyscale.c index 522a81fc28..42ba08f22e 100644 --- a/apps/plugins/greyscale.c +++ b/apps/plugins/greyscale.c | |||
@@ -78,6 +78,17 @@ PLUGIN_HEADER | |||
78 | #define GREYSCALE_LEFT BUTTON_LEFT | 78 | #define GREYSCALE_LEFT BUTTON_LEFT |
79 | #define GREYSCALE_RIGHT BUTTON_RIGHT | 79 | #define GREYSCALE_RIGHT BUTTON_RIGHT |
80 | #define GREYSCALE_OFF BUTTON_EQ | 80 | #define GREYSCALE_OFF BUTTON_EQ |
81 | |||
82 | #elif CONFIG_KEYPAD == IAUDIO_M3_PAD | ||
83 | #define GREYSCALE_SHIFT BUTTON_RC_PLAY /* somewhat dangerous... */ | ||
84 | #define GREYSCALE_UP BUTTON_RC_VOL_UP | ||
85 | #define GREYSCALE_DOWN BUTTON_RC_VOL_DOWN | ||
86 | #define GREYSCALE_LEFT BUTTON_RC_REW | ||
87 | #define GREYSCALE_RIGHT BUTTON_RC_FF | ||
88 | #define GREYSCALE_OFF BUTTON_RC_REC | ||
89 | |||
90 | #define GREYSCALE_RC_OFF BUTTON_REC | ||
91 | |||
81 | #endif | 92 | #endif |
82 | 93 | ||
83 | #define GFX_HEIGHT (LCD_HEIGHT-8) | 94 | #define GFX_HEIGHT (LCD_HEIGHT-8) |
diff --git a/apps/plugins/jpeg.c b/apps/plugins/jpeg.c index e2c1b4861b..fcef31f5fd 100644 --- a/apps/plugins/jpeg.c +++ b/apps/plugins/jpeg.c | |||
@@ -198,6 +198,18 @@ PLUGIN_HEADER | |||
198 | #define JPEG_NEXT (BUTTON_DISPLAY | BUTTON_RIGHT) | 198 | #define JPEG_NEXT (BUTTON_DISPLAY | BUTTON_RIGHT) |
199 | #define JPEG_PREVIOUS (BUTTON_DISPLAY | BUTTON_LEFT) | 199 | #define JPEG_PREVIOUS (BUTTON_DISPLAY | BUTTON_LEFT) |
200 | 200 | ||
201 | #elif CONFIG_KEYPAD == IAUDIO_M3_PAD | ||
202 | #define JPEG_ZOOM_IN_PRE BUTTON_RC_PLAY | ||
203 | #define JPEG_ZOOM_IN (BUTTON_RC_PLAY|BUTTON_REL) | ||
204 | #define JPEG_ZOOM_OUT (BUTTON_RC_PLAY|BUTTON_REPEAT) | ||
205 | #define JPEG_UP BUTTON_RC_VOL_UP | ||
206 | #define JPEG_DOWN BUTTON_RC_VOL_DOWN | ||
207 | #define JPEG_LEFT BUTTON_RC_REW | ||
208 | #define JPEG_RIGHT BUTTON_RC_FF | ||
209 | #define JPEG_MENU BUTTON_RC_REC | ||
210 | #define JPEG_NEXT BUTTON_RC_MODE | ||
211 | #define JPEG_PREVIOUS BUTTON_RC_MENU | ||
212 | |||
201 | #elif CONFIG_KEYPAD == COWOND2_PAD | 213 | #elif CONFIG_KEYPAD == COWOND2_PAD |
202 | #define JPEG_ZOOM_IN BUTTON_PLUS | 214 | #define JPEG_ZOOM_IN BUTTON_PLUS |
203 | #define JPEG_ZOOM_OUT BUTTON_MINUS | 215 | #define JPEG_ZOOM_OUT BUTTON_MINUS |
diff --git a/apps/plugins/lib/SOURCES b/apps/plugins/lib/SOURCES index f1aded6122..6a44c80ffa 100644 --- a/apps/plugins/lib/SOURCES +++ b/apps/plugins/lib/SOURCES | |||
@@ -3,8 +3,7 @@ configfile.c | |||
3 | fixedpoint.c | 3 | fixedpoint.c |
4 | playback_control.c | 4 | playback_control.c |
5 | rgb_hsv.c | 5 | rgb_hsv.c |
6 | #if defined(HAVE_LCD_BITMAP) && (LCD_DEPTH < 4) \ | 6 | #if defined(HAVE_LCD_BITMAP) && (LCD_DEPTH < 4) |
7 | && !defined(IAUDIO_M3) /* TODO: Test whether it can be implemented */ | ||
8 | grey_core.c | 7 | grey_core.c |
9 | grey_draw.c | 8 | grey_draw.c |
10 | grey_parm.c | 9 | grey_parm.c |
diff --git a/apps/plugins/lib/grey.h b/apps/plugins/lib/grey.h index ce37e17829..4298ae3ada 100644 --- a/apps/plugins/lib/grey.h +++ b/apps/plugins/lib/grey.h | |||
@@ -134,8 +134,8 @@ void grey_ub_scroll_down(int count); | |||
134 | 134 | ||
135 | #if LCD_PIXELFORMAT == HORIZONTAL_PACKING | 135 | #if LCD_PIXELFORMAT == HORIZONTAL_PACKING |
136 | #define _GREY_BSHIFT 0 | 136 | #define _GREY_BSHIFT 0 |
137 | #else | 137 | #else /* vertical packing or vertical interleaved */ |
138 | #if LCD_DEPTH == 1 | 138 | #if (LCD_DEPTH == 1) || (LCD_PIXELFORMAT == VERTICAL_INTERLEAVED) |
139 | #define _GREY_BSHIFT 3 | 139 | #define _GREY_BSHIFT 3 |
140 | #elif LCD_DEPTH == 2 | 140 | #elif LCD_DEPTH == 2 |
141 | #define _GREY_BSHIFT 2 | 141 | #define _GREY_BSHIFT 2 |
@@ -155,7 +155,7 @@ struct _grey_info | |||
155 | #if LCD_PIXELFORMAT == HORIZONTAL_PACKING | 155 | #if LCD_PIXELFORMAT == HORIZONTAL_PACKING |
156 | int bx; /* 8-pixel units */ | 156 | int bx; /* 8-pixel units */ |
157 | int bwidth; /* 8-pixel units */ | 157 | int bwidth; /* 8-pixel units */ |
158 | #else /* vertical packing */ | 158 | #else /* vertical packing or vertical interleaved */ |
159 | int by; /* 4-pixel or 8-pixel units */ | 159 | int by; /* 4-pixel or 8-pixel units */ |
160 | int bheight; /* 4-pixel or 8-pixel units */ | 160 | int bheight; /* 4-pixel or 8-pixel units */ |
161 | #endif | 161 | #endif |
diff --git a/apps/plugins/lib/grey_core.c b/apps/plugins/lib/grey_core.c index caa7af2f25..ad8f306dea 100644 --- a/apps/plugins/lib/grey_core.c +++ b/apps/plugins/lib/grey_core.c | |||
@@ -26,7 +26,8 @@ | |||
26 | #include "plugin.h" | 26 | #include "plugin.h" |
27 | #include "grey.h" | 27 | #include "grey.h" |
28 | 28 | ||
29 | #if defined(CPU_PP) && defined(HAVE_ADJUSTABLE_CPU_FREQ) | 29 | #if defined(HAVE_ADJUSTABLE_CPU_FREQ) && \ |
30 | (defined(CPU_PP) || (CONFIG_LCD == LCD_TL0350A)) | ||
30 | #define NEED_BOOST | 31 | #define NEED_BOOST |
31 | #endif | 32 | #endif |
32 | 33 | ||
@@ -143,6 +144,42 @@ static const unsigned char lcdlinear[256] = { | |||
143 | 203, 206, 209, 212, 215, 219, 222, 226, | 144 | 203, 206, 209, 212, 215, 219, 222, 226, |
144 | 229, 233, 236, 240, 244, 248, 251, 255 | 145 | 229, 233, 236, 240, 244, 248, 251, 255 |
145 | }; | 146 | }; |
147 | #elif CONFIG_LCD == LCD_TL0350A | ||
148 | /* generic linear curve - not yet measured */ | ||
149 | static const unsigned char lcdlinear[256] = { | ||
150 | 0, 1, 2, 3, 4, 5, 6, 7, | ||
151 | 8, 9, 10, 11, 12, 13, 14, 15, | ||
152 | 16, 17, 18, 19, 20, 21, 22, 23, | ||
153 | 24, 25, 26, 27, 28, 29, 30, 31, | ||
154 | 32, 33, 34, 35, 36, 37, 38, 39, | ||
155 | 40, 41, 42, 43, 44, 45, 46, 47, | ||
156 | 48, 49, 50, 51, 52, 53, 54, 55, | ||
157 | 56, 57, 58, 59, 60, 61, 62, 63, | ||
158 | 64, 65, 66, 67, 68, 69, 70, 71, | ||
159 | 72, 73, 74, 75, 76, 77, 78, 79, | ||
160 | 80, 81, 82, 83, 84, 85, 86, 87, | ||
161 | 88, 89, 90, 91, 92, 93, 94, 95, | ||
162 | 96, 97, 98, 99, 100, 101, 102, 103, | ||
163 | 104, 105, 106, 107, 108, 109, 110, 111, | ||
164 | 112, 113, 114, 115, 116, 117, 118, 119, | ||
165 | 120, 121, 122, 123, 124, 125, 126, 127, | ||
166 | 128, 129, 130, 131, 132, 133, 134, 135, | ||
167 | 136, 137, 138, 139, 140, 141, 142, 143, | ||
168 | 144, 145, 146, 147, 148, 149, 150, 151, | ||
169 | 152, 153, 154, 155, 156, 157, 158, 159, | ||
170 | 160, 161, 162, 163, 164, 165, 166, 167, | ||
171 | 168, 169, 170, 171, 172, 173, 174, 175, | ||
172 | 176, 177, 178, 179, 180, 181, 182, 183, | ||
173 | 184, 185, 186, 187, 188, 189, 190, 191, | ||
174 | 192, 193, 194, 195, 196, 197, 198, 199, | ||
175 | 200, 201, 202, 203, 204, 205, 206, 207, | ||
176 | 208, 209, 210, 211, 212, 213, 214, 215, | ||
177 | 216, 217, 218, 219, 220, 221, 222, 223, | ||
178 | 224, 225, 226, 227, 228, 229, 230, 231, | ||
179 | 232, 233, 234, 235, 236, 237, 238, 239, | ||
180 | 240, 241, 242, 243, 244, 245, 246, 247, | ||
181 | 248, 249, 250, 251, 252, 253, 254, 255 | ||
182 | }; | ||
146 | #endif | 183 | #endif |
147 | #else /* SIMULATOR */ | 184 | #else /* SIMULATOR */ |
148 | /* undo a (generic) PC display gamma of 2.0 to simulate target behaviour */ | 185 | /* undo a (generic) PC display gamma of 2.0 to simulate target behaviour */ |
@@ -225,7 +262,7 @@ static unsigned long _grey_get_pixel(int x, int y) | |||
225 | int yg = y - _grey_info.y; | 262 | int yg = y - _grey_info.y; |
226 | #if LCD_PIXELFORMAT == HORIZONTAL_PACKING | 263 | #if LCD_PIXELFORMAT == HORIZONTAL_PACKING |
227 | int idx = _grey_info.width * yg + xg; | 264 | int idx = _grey_info.width * yg + xg; |
228 | #else | 265 | #else /* vertical packing or vertical interleaved */ |
229 | int idx = _grey_info.width * (yg & ~_GREY_BMASK) | 266 | int idx = _grey_info.width * (yg & ~_GREY_BMASK) |
230 | + (xg << _GREY_BSHIFT) + (~yg & _GREY_BMASK); | 267 | + (xg << _GREY_BSHIFT) + (~yg & _GREY_BMASK); |
231 | #endif | 268 | #endif |
@@ -243,7 +280,7 @@ static void _timer_isr(void) | |||
243 | _grey_info.bx, _grey_info.y, | 280 | _grey_info.bx, _grey_info.y, |
244 | _grey_info.bwidth, _grey_info.height, | 281 | _grey_info.bwidth, _grey_info.height, |
245 | _grey_info.width); | 282 | _grey_info.width); |
246 | #else | 283 | #else /* vertical packing or vertical interleaved */ |
247 | _grey_info.rb->lcd_blit_grey_phase(_grey_info.values, _grey_info.phases, | 284 | _grey_info.rb->lcd_blit_grey_phase(_grey_info.values, _grey_info.phases, |
248 | _grey_info.x, _grey_info.by, | 285 | _grey_info.x, _grey_info.by, |
249 | _grey_info.width, _grey_info.bheight, | 286 | _grey_info.width, _grey_info.bheight, |
@@ -355,8 +392,8 @@ bool grey_init(struct plugin_api* newrb, unsigned char *gbuf, long gbuf_size, | |||
355 | #if LCD_PIXELFORMAT == HORIZONTAL_PACKING | 392 | #if LCD_PIXELFORMAT == HORIZONTAL_PACKING |
356 | bdim = (width + 7) >> 3; | 393 | bdim = (width + 7) >> 3; |
357 | width = bdim << 3; | 394 | width = bdim << 3; |
358 | #else /* vertical packing */ | 395 | #else /* vertical packing or vertical interleaved */ |
359 | #if LCD_DEPTH == 1 | 396 | #if (LCD_DEPTH == 1) || (LCD_PIXELFORMAT == VERTICAL_INTERLEAVED) |
360 | bdim = (height + 7) >> 3; | 397 | bdim = (height + 7) >> 3; |
361 | height = bdim << 3; | 398 | height = bdim << 3; |
362 | #elif LCD_DEPTH == 2 | 399 | #elif LCD_DEPTH == 2 |
@@ -408,7 +445,7 @@ bool grey_init(struct plugin_api* newrb, unsigned char *gbuf, long gbuf_size, | |||
408 | #if LCD_PIXELFORMAT == HORIZONTAL_PACKING | 445 | #if LCD_PIXELFORMAT == HORIZONTAL_PACKING |
409 | _grey_info.bx = 0; | 446 | _grey_info.bx = 0; |
410 | _grey_info.bwidth = bdim; | 447 | _grey_info.bwidth = bdim; |
411 | #else | 448 | #else /* vertical packing or vertical interleaved */ |
412 | _grey_info.by = 0; | 449 | _grey_info.by = 0; |
413 | _grey_info.bheight = bdim; | 450 | _grey_info.bheight = bdim; |
414 | #endif | 451 | #endif |
@@ -491,6 +528,9 @@ void grey_show(bool enable) | |||
491 | _grey_info.rb->timer_register(1, NULL, TIMER_FREQ / 83, 1, _timer_isr); | 528 | _grey_info.rb->timer_register(1, NULL, TIMER_FREQ / 83, 1, _timer_isr); |
492 | #elif CONFIG_LCD == LCD_MROBE100 | 529 | #elif CONFIG_LCD == LCD_MROBE100 |
493 | _grey_info.rb->timer_register(1, NULL, TIMER_FREQ / 83, 1, _timer_isr); /* not calibrated/tested */ | 530 | _grey_info.rb->timer_register(1, NULL, TIMER_FREQ / 83, 1, _timer_isr); /* not calibrated/tested */ |
531 | #elif CONFIG_LCD == LCD_TL0350A | ||
532 | _grey_info.rb->timer_register(1, NULL, TIMER_FREQ / 75, 1, _timer_isr); /* verified */ | ||
533 | /* This is half of the actual frame frequency, but 150Hz is too much */ | ||
494 | #endif /* CONFIG_LCD */ | 534 | #endif /* CONFIG_LCD */ |
495 | #endif /* !SIMULATOR */ | 535 | #endif /* !SIMULATOR */ |
496 | _grey_info.rb->screen_dump_set_hook(grey_screendump_hook); | 536 | _grey_info.rb->screen_dump_set_hook(grey_screendump_hook); |
@@ -607,8 +647,11 @@ static void grey_screendump_hook(int fd) | |||
607 | #elif LCD_DEPTH == 2 | 647 | #elif LCD_DEPTH == 2 |
608 | int shift; | 648 | int shift; |
609 | #endif | 649 | #endif |
610 | #endif /* LCD_PIXELFORMAT == VERTICAL_PACKING */ | 650 | #elif LCD_PIXELFORMAT == VERTICAL_INTERLEAVED |
611 | unsigned char *lcdptr; | 651 | unsigned data; |
652 | int shift; | ||
653 | #endif /* LCD_PIXELFORMAT */ | ||
654 | fb_data *lcdptr; | ||
612 | unsigned char *clut_entry; | 655 | unsigned char *clut_entry; |
613 | unsigned char linebuf[MAX(4*BMP_VARCOLORS,BMP_LINESIZE)]; | 656 | unsigned char linebuf[MAX(4*BMP_VARCOLORS,BMP_LINESIZE)]; |
614 | 657 | ||
@@ -660,7 +703,7 @@ static void grey_screendump_hook(int fd) | |||
660 | lcdptr++; | 703 | lcdptr++; |
661 | } | 704 | } |
662 | #endif /* LCD_DEPTH */ | 705 | #endif /* LCD_DEPTH */ |
663 | #else /* LCD_PIXELFORMAT == VERTICAL_PACKING */ | 706 | #elif LCD_PIXELFORMAT == VERTICAL_PACKING |
664 | #if LCD_DEPTH == 1 | 707 | #if LCD_DEPTH == 1 |
665 | mask = 1 << (y & 7); | 708 | mask = 1 << (y & 7); |
666 | lcdptr = _grey_info.rb->lcd_framebuffer + _GREY_MULUQ(LCD_WIDTH, y >> 3); | 709 | lcdptr = _grey_info.rb->lcd_framebuffer + _GREY_MULUQ(LCD_WIDTH, y >> 3); |
@@ -708,6 +751,32 @@ static void grey_screendump_hook(int fd) | |||
708 | lcdptr++; | 751 | lcdptr++; |
709 | } | 752 | } |
710 | #endif /* LCD_DEPTH */ | 753 | #endif /* LCD_DEPTH */ |
754 | #elif LCD_PIXELFORMAT == VERTICAL_INTERLEAVED | ||
755 | #if LCD_DEPTH == 2 | ||
756 | shift = y & 7; | ||
757 | lcdptr = _grey_info.rb->lcd_framebuffer + _GREY_MULUQ(LCD_WIDTH, y >> 3); | ||
758 | |||
759 | for (x = 0; x < LCD_WIDTH; x++) | ||
760 | { | ||
761 | gx = x - _grey_info.x; | ||
762 | |||
763 | if (((unsigned)gy < (unsigned)_grey_info.height) | ||
764 | && ((unsigned)gx < (unsigned)_grey_info.width)) | ||
765 | { | ||
766 | linebuf[x] = BMP_FIXEDCOLORS | ||
767 | + _grey_info.values[_GREY_MULUQ(_grey_info.width, | ||
768 | gy & ~_GREY_BMASK) | ||
769 | + (gx << _GREY_BSHIFT) | ||
770 | + (~gy & _GREY_BMASK)]; | ||
771 | } | ||
772 | else | ||
773 | { | ||
774 | data = (*lcdptr >> shift) & 0x0101; | ||
775 | linebuf[x] = ((data >> 7) | data) & 3; | ||
776 | } | ||
777 | lcdptr++; | ||
778 | } | ||
779 | #endif /* LCD_DEPTH */ | ||
711 | #endif /* LCD_PIXELFORMAT */ | 780 | #endif /* LCD_PIXELFORMAT */ |
712 | 781 | ||
713 | _grey_info.rb->write(fd, linebuf, BMP_LINESIZE); | 782 | _grey_info.rb->write(fd, linebuf, BMP_LINESIZE); |
diff --git a/apps/plugins/lib/grey_draw.c b/apps/plugins/lib/grey_draw.c index 7b24ba4c70..a1b99fc13b 100644 --- a/apps/plugins/lib/grey_draw.c +++ b/apps/plugins/lib/grey_draw.c | |||
@@ -630,7 +630,7 @@ void grey_ub_gray_bitmap_part(const unsigned char *src, int src_x, int src_y, | |||
630 | { | 630 | { |
631 | #if LCD_PIXELFORMAT == HORIZONTAL_PACKING | 631 | #if LCD_PIXELFORMAT == HORIZONTAL_PACKING |
632 | int idx = _GREY_MULUQ(_grey_info.width, yc); | 632 | int idx = _GREY_MULUQ(_grey_info.width, yc); |
633 | #else | 633 | #else /* vertical packing or vertical interleaved */ |
634 | int idx = _GREY_MULUQ(_grey_info.width, yc & ~_GREY_BMASK) | 634 | int idx = _GREY_MULUQ(_grey_info.width, yc & ~_GREY_BMASK) |
635 | + (~yc & _GREY_BMASK); | 635 | + (~yc & _GREY_BMASK); |
636 | #endif /* LCD_PIXELFORMAT */ | 636 | #endif /* LCD_PIXELFORMAT */ |
diff --git a/apps/plugins/lib/grey_parm.c b/apps/plugins/lib/grey_parm.c index 63d09dfd72..e4aaec3efd 100644 --- a/apps/plugins/lib/grey_parm.c +++ b/apps/plugins/lib/grey_parm.c | |||
@@ -34,8 +34,8 @@ void grey_set_position(int x, int y) | |||
34 | #if LCD_PIXELFORMAT == HORIZONTAL_PACKING | 34 | #if LCD_PIXELFORMAT == HORIZONTAL_PACKING |
35 | _grey_info.bx = (x + 4) >> 3; | 35 | _grey_info.bx = (x + 4) >> 3; |
36 | x = 8 * _grey_info.bx; | 36 | x = 8 * _grey_info.bx; |
37 | #else | 37 | #else /* vertical packing or vertical interleaved */ |
38 | #if LCD_DEPTH == 1 | 38 | #if (LCD_DEPTH == 1) || (LCD_PIXELFORMAT == VERTICAL_INTERLEAVED) |
39 | _grey_info.by = (y + 4) >> 3; | 39 | _grey_info.by = (y + 4) >> 3; |
40 | y = 8 * _grey_info.by; | 40 | y = 8 * _grey_info.by; |
41 | #elif LCD_DEPTH == 2 | 41 | #elif LCD_DEPTH == 2 |
diff --git a/apps/plugins/lib/grey_scroll.c b/apps/plugins/lib/grey_scroll.c index 12a27daf23..ba790b035f 100644 --- a/apps/plugins/lib/grey_scroll.c +++ b/apps/plugins/lib/grey_scroll.c | |||
@@ -191,7 +191,8 @@ void grey_ub_scroll_up(int count) | |||
191 | _grey_info.fg_brightness : | 191 | _grey_info.fg_brightness : |
192 | _grey_info.bg_brightness]; | 192 | _grey_info.bg_brightness]; |
193 | 193 | ||
194 | #if LCD_PIXELFORMAT == VERTICAL_PACKING | 194 | #if (LCD_PIXELFORMAT == VERTICAL_PACKING) \ |
195 | || (LCD_PIXELFORMAT == VERTICAL_INTERLEAVED) | ||
195 | if (count & _GREY_BMASK) | 196 | if (count & _GREY_BMASK) |
196 | { | 197 | { |
197 | /* Scrolling by fractional blocks - move pixel wise. */ | 198 | /* Scrolling by fractional blocks - move pixel wise. */ |
@@ -262,7 +263,8 @@ void grey_ub_scroll_down(int count) | |||
262 | _grey_info.fg_brightness : | 263 | _grey_info.fg_brightness : |
263 | _grey_info.bg_brightness]; | 264 | _grey_info.bg_brightness]; |
264 | 265 | ||
265 | #if LCD_PIXELFORMAT == VERTICAL_PACKING | 266 | #if (LCD_PIXELFORMAT == VERTICAL_PACKING) \ |
267 | || (LCD_PIXELFORMAT == VERTICAL_INTERLEAVED) | ||
266 | if (count & _GREY_BMASK) | 268 | if (count & _GREY_BMASK) |
267 | { | 269 | { |
268 | /* Scrolling by fractional blocks - move pixel wise. */ | 270 | /* Scrolling by fractional blocks - move pixel wise. */ |
diff --git a/apps/plugins/mandelbrot.c b/apps/plugins/mandelbrot.c index 26ec3e4ab9..4a4872b827 100644 --- a/apps/plugins/mandelbrot.c +++ b/apps/plugins/mandelbrot.c | |||
@@ -202,6 +202,22 @@ PLUGIN_HEADER | |||
202 | #define MANDELBROT_MAXITER_DEC BUTTON_PLAY | 202 | #define MANDELBROT_MAXITER_DEC BUTTON_PLAY |
203 | #define MANDELBROT_RESET BUTTON_DISPLAY | 203 | #define MANDELBROT_RESET BUTTON_DISPLAY |
204 | 204 | ||
205 | #elif CONFIG_KEYPAD == IAUDIO_M3_PAD | ||
206 | #define MANDELBROT_QUIT BUTTON_RC_REC | ||
207 | #define MANDELBROT_UP BUTTON_RC_VOL_UP | ||
208 | #define MANDELBROT_DOWN BUTTON_RC_VOL_DOWN | ||
209 | #define MANDELBROT_LEFT BUTTON_RC_REW | ||
210 | #define MANDELBROT_RIGHT BUTTON_RC_FF | ||
211 | #define MANDELBROT_ZOOM_IN_PRE BUTTON_RC_PLAY | ||
212 | #define MANDELBROT_ZOOM_IN (BUTTON_RC_PLAY | BUTTON_REL) | ||
213 | #define MANDELBROT_ZOOM_OUT_PRE BUTTON_RC_PLAY | ||
214 | #define MANDELBROT_ZOOM_OUT (BUTTON_RC_PLAY | BUTTON_REPEAT) | ||
215 | #define MANDELBROT_MAXITER_INC_PRE BUTTON_RC_MODE | ||
216 | #define MANDELBROT_MAXITER_INC (BUTTON_RC_MODE|BUTTON_REL) | ||
217 | #define MANDELBROT_MAXITER_DEC_PRE BUTTON_RC_MODE | ||
218 | #define MANDELBROT_MAXITER_DEC (BUTTON_RC_MODE|BUTTON_REPEAT) | ||
219 | #define MANDELBROT_RESET BUTTON_RC_MENU | ||
220 | |||
205 | #elif CONFIG_KEYPAD == COWOND2_PAD | 221 | #elif CONFIG_KEYPAD == COWOND2_PAD |
206 | #define MANDELBROT_QUIT BUTTON_POWER | 222 | #define MANDELBROT_QUIT BUTTON_POWER |
207 | #define MANDELBROT_UP BUTTON_UP | 223 | #define MANDELBROT_UP BUTTON_UP |
diff --git a/apps/plugins/mpegplayer/mpeg_settings.c b/apps/plugins/mpegplayer/mpeg_settings.c index 7dfdd36927..b7b7def729 100644 --- a/apps/plugins/mpegplayer/mpeg_settings.c +++ b/apps/plugins/mpegplayer/mpeg_settings.c | |||
@@ -102,6 +102,14 @@ struct mpeg_settings settings; | |||
102 | #define MPEG_START_TIME_SCROLL_UP BUTTON_PLAY | 102 | #define MPEG_START_TIME_SCROLL_UP BUTTON_PLAY |
103 | #define MPEG_START_TIME_EXIT BUTTON_POWER | 103 | #define MPEG_START_TIME_EXIT BUTTON_POWER |
104 | 104 | ||
105 | #elif CONFIG_KEYPAD == IAUDIO_M3_PAD | ||
106 | #define MPEG_START_TIME_SELECT BUTTON_RC_PLAY | ||
107 | #define MPEG_START_TIME_LEFT BUTTON_RC_REW | ||
108 | #define MPEG_START_TIME_RIGHT BUTTON_RC_FF | ||
109 | #define MPEG_START_TIME_UP BUTTON_RC_VOL_UP | ||
110 | #define MPEG_START_TIME_DOWN BUTTON_RC_VOL_DOWN | ||
111 | #define MPEG_START_TIME_EXIT BUTTON_RC_REC | ||
112 | |||
105 | #elif CONFIG_KEYPAD == COWOND2_PAD | 113 | #elif CONFIG_KEYPAD == COWOND2_PAD |
106 | #define MPEG_START_TIME_SELECT BUTTON_SELECT | 114 | #define MPEG_START_TIME_SELECT BUTTON_SELECT |
107 | #define MPEG_START_TIME_SCROLL_UP BUTTON_PLUS | 115 | #define MPEG_START_TIME_SCROLL_UP BUTTON_PLUS |
diff --git a/apps/plugins/mpegplayer/mpegplayer.c b/apps/plugins/mpegplayer/mpegplayer.c index d068fd8254..8a947904a3 100644 --- a/apps/plugins/mpegplayer/mpegplayer.c +++ b/apps/plugins/mpegplayer/mpegplayer.c | |||
@@ -202,6 +202,15 @@ PLUGIN_IRAM_DECLARE | |||
202 | #define MPEG_RW BUTTON_LEFT | 202 | #define MPEG_RW BUTTON_LEFT |
203 | #define MPEG_FF BUTTON_RIGHT | 203 | #define MPEG_FF BUTTON_RIGHT |
204 | 204 | ||
205 | #elif CONFIG_KEYPAD == IAUDIO_M3_PAD | ||
206 | #define MPEG_MENU BUTTON_RC_MENU | ||
207 | #define MPEG_STOP BUTTON_RC_REC | ||
208 | #define MPEG_PAUSE BUTTON_RC_PLAY | ||
209 | #define MPEG_VOLDOWN BUTTON_RC_VOL_DOWN | ||
210 | #define MPEG_VOLUP BUTTON_RC_VOL_UP | ||
211 | #define MPEG_RW BUTTON_RC_REW | ||
212 | #define MPEG_FF BUTTON_RC_FF | ||
213 | |||
205 | #elif CONFIG_KEYPAD == COWOND2_PAD | 214 | #elif CONFIG_KEYPAD == COWOND2_PAD |
206 | #define MPEG_MENU BUTTON_MENU | 215 | #define MPEG_MENU BUTTON_MENU |
207 | #define MPEG_STOP BUTTON_POWER | 216 | #define MPEG_STOP BUTTON_POWER |
diff --git a/apps/plugins/plasma.c b/apps/plugins/plasma.c index d5c1ef427f..2e04bd59b5 100644 --- a/apps/plugins/plasma.c +++ b/apps/plugins/plasma.c | |||
@@ -59,6 +59,7 @@ static int plasma_frequency; | |||
59 | #define PLASMA_QUIT BUTTON_MENU | 59 | #define PLASMA_QUIT BUTTON_MENU |
60 | #define PLASMA_INCREASE_FREQUENCY BUTTON_SCROLL_FWD | 60 | #define PLASMA_INCREASE_FREQUENCY BUTTON_SCROLL_FWD |
61 | #define PLASMA_DECREASE_FREQUENCY BUTTON_SCROLL_BACK | 61 | #define PLASMA_DECREASE_FREQUENCY BUTTON_SCROLL_BACK |
62 | |||
62 | #elif (CONFIG_KEYPAD == GIGABEAT_PAD) | 63 | #elif (CONFIG_KEYPAD == GIGABEAT_PAD) |
63 | #define PLASMA_QUIT BUTTON_A | 64 | #define PLASMA_QUIT BUTTON_A |
64 | #define PLASMA_INCREASE_FREQUENCY BUTTON_UP | 65 | #define PLASMA_INCREASE_FREQUENCY BUTTON_UP |
@@ -74,26 +75,38 @@ static int plasma_frequency; | |||
74 | #define PLASMA_QUIT BUTTON_POWER | 75 | #define PLASMA_QUIT BUTTON_POWER |
75 | #define PLASMA_INCREASE_FREQUENCY BUTTON_UP | 76 | #define PLASMA_INCREASE_FREQUENCY BUTTON_UP |
76 | #define PLASMA_DECREASE_FREQUENCY BUTTON_DOWN | 77 | #define PLASMA_DECREASE_FREQUENCY BUTTON_DOWN |
78 | |||
77 | #elif (CONFIG_KEYPAD == IRIVER_H10_PAD) | 79 | #elif (CONFIG_KEYPAD == IRIVER_H10_PAD) |
78 | #define PLASMA_QUIT BUTTON_POWER | 80 | #define PLASMA_QUIT BUTTON_POWER |
79 | #define PLASMA_INCREASE_FREQUENCY BUTTON_SCROLL_UP | 81 | #define PLASMA_INCREASE_FREQUENCY BUTTON_SCROLL_UP |
80 | #define PLASMA_DECREASE_FREQUENCY BUTTON_SCROLL_DOWN | 82 | #define PLASMA_DECREASE_FREQUENCY BUTTON_SCROLL_DOWN |
83 | |||
81 | #elif (CONFIG_KEYPAD == GIGABEAT_S_PAD) | 84 | #elif (CONFIG_KEYPAD == GIGABEAT_S_PAD) |
82 | #define PLASMA_QUIT BUTTON_BACK | 85 | #define PLASMA_QUIT BUTTON_BACK |
83 | #define PLASMA_INCREASE_FREQUENCY BUTTON_UP | 86 | #define PLASMA_INCREASE_FREQUENCY BUTTON_UP |
84 | #define PLASMA_DECREASE_FREQUENCY BUTTON_DOWN | 87 | #define PLASMA_DECREASE_FREQUENCY BUTTON_DOWN |
88 | |||
85 | #elif (CONFIG_KEYPAD == MROBE100_PAD) | 89 | #elif (CONFIG_KEYPAD == MROBE100_PAD) |
86 | #define PLASMA_QUIT BUTTON_POWER | 90 | #define PLASMA_QUIT BUTTON_POWER |
87 | #define PLASMA_INCREASE_FREQUENCY BUTTON_UP | 91 | #define PLASMA_INCREASE_FREQUENCY BUTTON_UP |
88 | #define PLASMA_DECREASE_FREQUENCY BUTTON_DOWN | 92 | #define PLASMA_DECREASE_FREQUENCY BUTTON_DOWN |
93 | |||
94 | #elif (CONFIG_KEYPAD == IAUDIO_M3_PAD) | ||
95 | #define PLASMA_QUIT BUTTON_RC_REC | ||
96 | #define PLASMA_INCREASE_FREQUENCY BUTTON_RC_VOL_UP | ||
97 | #define PLASMA_DECREASE_FREQUENCY BUTTON_RC_VOL_DOWN | ||
98 | #define PLASMA_RC_QUIT BUTTON_REC | ||
99 | |||
89 | #elif (CONFIG_KEYPAD == COWOND2_PAD) | 100 | #elif (CONFIG_KEYPAD == COWOND2_PAD) |
90 | #define PLASMA_QUIT BUTTON_POWER | 101 | #define PLASMA_QUIT BUTTON_POWER |
91 | #define PLASMA_INCREASE_FREQUENCY BUTTON_UP | 102 | #define PLASMA_INCREASE_FREQUENCY BUTTON_UP |
92 | #define PLASMA_DECREASE_FREQUENCY BUTTON_DOWN | 103 | #define PLASMA_DECREASE_FREQUENCY BUTTON_DOWN |
104 | |||
93 | #else | 105 | #else |
94 | #define PLASMA_QUIT BUTTON_OFF | 106 | #define PLASMA_QUIT BUTTON_OFF |
95 | #define PLASMA_INCREASE_FREQUENCY BUTTON_UP | 107 | #define PLASMA_INCREASE_FREQUENCY BUTTON_UP |
96 | #define PLASMA_DECREASE_FREQUENCY BUTTON_DOWN | 108 | #define PLASMA_DECREASE_FREQUENCY BUTTON_DOWN |
109 | |||
97 | #if (CONFIG_KEYPAD == IRIVER_H100_PAD) || (CONFIG_KEYPAD == IRIVER_H300_PAD) | 110 | #if (CONFIG_KEYPAD == IRIVER_H100_PAD) || (CONFIG_KEYPAD == IRIVER_H300_PAD) |
98 | #define PLASMA_RC_QUIT BUTTON_RC_STOP | 111 | #define PLASMA_RC_QUIT BUTTON_RC_STOP |
99 | #endif | 112 | #endif |
diff --git a/apps/plugins/test_fps.c b/apps/plugins/test_fps.c index 7c86fabdc0..a312c13662 100644 --- a/apps/plugins/test_fps.c +++ b/apps/plugins/test_fps.c | |||
@@ -260,7 +260,7 @@ static void time_remote_update(void) | |||
260 | } | 260 | } |
261 | #endif | 261 | #endif |
262 | 262 | ||
263 | #if (LCD_DEPTH < 4) && !defined(IAUDIO_M3) | 263 | #if LCD_DEPTH < 4 |
264 | 264 | ||
265 | GREY_INFO_STRUCT_IRAM | 265 | GREY_INFO_STRUCT_IRAM |
266 | static unsigned char greydata[LCD_HEIGHT][LCD_WIDTH]; | 266 | static unsigned char greydata[LCD_HEIGHT][LCD_WIDTH]; |
@@ -357,7 +357,7 @@ enum plugin_status plugin_start(struct plugin_api* api, void* parameter) | |||
357 | log_text("Main LCD YUV"); | 357 | log_text("Main LCD YUV"); |
358 | time_main_yuv(); | 358 | time_main_yuv(); |
359 | #endif | 359 | #endif |
360 | #if (LCD_DEPTH < 4) && !defined(IAUDIO_M3) | 360 | #if LCD_DEPTH < 4 |
361 | log_text("Greyscale library"); | 361 | log_text("Greyscale library"); |
362 | time_greyscale(); | 362 | time_greyscale(); |
363 | #endif | 363 | #endif |