diff options
Diffstat (limited to 'apps/plugins')
-rw-r--r-- | apps/plugins/SOURCES | 17 | ||||
-rw-r--r-- | apps/plugins/SUBDIRS | 25 | ||||
-rw-r--r-- | apps/plugins/lua.c | 33 | ||||
-rw-r--r-- | apps/plugins/rockboy/sys_rockbox.c | 4 | ||||
-rw-r--r-- | apps/plugins/sokoban.c | 21 |
5 files changed, 43 insertions, 57 deletions
diff --git a/apps/plugins/SOURCES b/apps/plugins/SOURCES index 8f06522bc3..4e6079ac59 100644 --- a/apps/plugins/SOURCES +++ b/apps/plugins/SOURCES | |||
@@ -67,22 +67,19 @@ iriverify.c | |||
67 | 67 | ||
68 | #ifndef SIMULATOR /* those plugins only run on hardware */ | 68 | #ifndef SIMULATOR /* those plugins only run on hardware */ |
69 | 69 | ||
70 | /* Overlay loaders */ | 70 | /* Overlays loaders */ |
71 | #if PLUGIN_BUFFER_SIZE <= 0x10000 && defined(HAVE_LCD_BITMAP) | ||
71 | 72 | ||
72 | #if (MEMORYSIZE <= 8) | 73 | #if CONFIG_KEYPAD != ONDIO_PAD /* not enough buttons for rockboy */ |
73 | chessbox.c | ||
74 | #if CONFIG_KEYPAD == RECORDER_PAD | ||
75 | rockboy.c | 74 | rockboy.c |
76 | #endif | 75 | #endif |
77 | zxbox.c | ||
78 | #endif | ||
79 | 76 | ||
80 | /* overlay loader for Goban */ | 77 | zxbox.c |
81 | #if (PLUGIN_BUFFER_SIZE < 0x10000) | 78 | chessbox.c |
82 | lua.c | ||
83 | goban.c | 79 | goban.c |
84 | pictureflow.c | 80 | pictureflow.c |
85 | #endif | 81 | |
82 | #endif /* PLUGIN_BUFFER_SIZE <= 0x10000 && HAVE_LCD_BITMAP */ | ||
86 | 83 | ||
87 | 84 | ||
88 | #if CONFIG_CODEC != SWCODEC | 85 | #if CONFIG_CODEC != SWCODEC |
diff --git a/apps/plugins/SUBDIRS b/apps/plugins/SUBDIRS index 2a88e7d1b1..18d9db8ef2 100644 --- a/apps/plugins/SUBDIRS +++ b/apps/plugins/SUBDIRS | |||
@@ -7,23 +7,32 @@ shortcuts | |||
7 | clock | 7 | clock |
8 | #endif | 8 | #endif |
9 | 9 | ||
10 | #if (CONFIG_KEYPAD == RECORDER_PAD) || defined(HAVE_LCD_COLOR) \ | ||
11 | || defined(IRIVER_H100_SERIES) || defined(IAUDIO_M5) /* FIXME */ | ||
12 | rockboy | ||
13 | #endif | ||
14 | 10 | ||
15 | /* For all targets with a bitmap display */ | 11 | /* For all targets with a bitmap display */ |
16 | #ifdef HAVE_LCD_BITMAP | 12 | #ifdef HAVE_LCD_BITMAP |
17 | 13 | ||
14 | #if (CONFIG_KEYPAD != ONDIO_PAD) /* not enough buttons */ \ | ||
15 | && (LCD_PIXELFORMAT != HORIZONTAL_PACKING) /* TODO */ \ | ||
16 | && (LCD_PIXELFORMAT != VERTICAL_INTERLEAVED) /* TODO */ \ | ||
17 | && (defined(HAVE_LCD_COLOR) || (LCD_HEIGHT == 64) && (LCD_DEPTH == 1) || \ | ||
18 | (LCD_HEIGHT == 128) && (LCD_DEPTH == 2)) \ | ||
19 | && (PLUGIN_BUFFER_SIZE >= 0x60000 /* it needs a lot of RAM */ || \ | ||
20 | PLUGIN_BUFFER_SIZE <= 0x10000) /* but we can use overlays */ | ||
21 | rockboy | ||
22 | #endif | ||
23 | |||
18 | #ifdef HAVE_TAGCACHE | 24 | #ifdef HAVE_TAGCACHE |
19 | pictureflow | 25 | pictureflow |
20 | #endif | 26 | #endif |
21 | 27 | ||
22 | #if (CONFIG_CODEC == SWCODEC) | 28 | #if CONFIG_CODEC == SWCODEC && PLUGIN_BUFFER_SIZE > 0x20000 |
23 | fft | 29 | fft |
24 | #endif | 30 | #endif |
25 | 31 | ||
32 | #if PLUGIN_BUFFER_SIZE > 0x20000 || PLUGIN_BUFFER_SIZE <= 0x10000 /* overlay */ | ||
26 | chessbox | 33 | chessbox |
34 | #endif | ||
35 | |||
27 | fractals | 36 | fractals |
28 | imageviewer | 37 | imageviewer |
29 | sudoku | 38 | sudoku |
@@ -36,8 +45,10 @@ frotz | |||
36 | #endif | 45 | #endif |
37 | 46 | ||
38 | #ifndef OLYMPUS_MROBE_500 | 47 | #ifndef OLYMPUS_MROBE_500 |
48 | #if PLUGIN_BUFFER_SIZE > 0x40000 || PLUGIN_BUFFER_SIZE <= 0x10000 /* overlay */ | ||
39 | zxbox | 49 | zxbox |
40 | #endif | 50 | #endif |
51 | #endif | ||
41 | 52 | ||
42 | #endif /* HAVE_LCD_BITMAP */ | 53 | #endif /* HAVE_LCD_BITMAP */ |
43 | 54 | ||
@@ -56,7 +67,9 @@ doom | |||
56 | /* For all the swcodec targets */ | 67 | /* For all the swcodec targets */ |
57 | #if CONFIG_CODEC == SWCODEC | 68 | #if CONFIG_CODEC == SWCODEC |
58 | 69 | ||
70 | #if MEMORYSIZE > 2 /* we need a lot of RAM for instruments */ | ||
59 | midi | 71 | midi |
72 | #endif | ||
60 | 73 | ||
61 | /* beatbox */ | 74 | /* beatbox */ |
62 | #if defined(IRIVER_H300_SERIES) || defined(IRIVER_H100_SERIES) | 75 | #if defined(IRIVER_H300_SERIES) || defined(IRIVER_H100_SERIES) |
@@ -71,6 +84,6 @@ mpegplayer | |||
71 | #endif /* CONFIG_CODEC == SWCODEC */ | 84 | #endif /* CONFIG_CODEC == SWCODEC */ |
72 | 85 | ||
73 | /* Lua needs at least 160 KB to work in */ | 86 | /* Lua needs at least 160 KB to work in */ |
74 | #if (PLUGIN_BUFFER_SIZE >= 0x80000) | 87 | #if PLUGIN_BUFFER_SIZE >= 0x80000 |
75 | lua | 88 | lua |
76 | #endif | 89 | #endif |
diff --git a/apps/plugins/lua.c b/apps/plugins/lua.c deleted file mode 100644 index a68e5c149a..0000000000 --- a/apps/plugins/lua.c +++ /dev/null | |||
@@ -1,33 +0,0 @@ | |||
1 | /*************************************************************************** | ||
2 | * __________ __ ___. | ||
3 | * Open \______ \ ____ ____ | | _\_ |__ _______ ___ | ||
4 | * Source | _// _ \_/ ___\| |/ /| __ \ / _ \ \/ / | ||
5 | * Jukebox | | ( <_> ) \___| < | \_\ ( <_> > < < | ||
6 | * Firmware |____|_ /\____/ \___ >__|_ \|___ /\____/__/\_ \ | ||
7 | * \/ \/ \/ \/ \/ | ||
8 | * | ||
9 | * Overlay loader stub plugin for lua | ||
10 | * | ||
11 | * This program is free software; you can redistribute it and/or | ||
12 | * modify it under the terms of the GNU General Public License | ||
13 | * as published by the Free Software Foundation; either version 2 | ||
14 | * of the License, or (at your option) any later version. | ||
15 | * | ||
16 | * This software is distributed on an "AS IS" basis, WITHOUT WARRANTY OF ANY | ||
17 | * KIND, either express or implied. | ||
18 | * | ||
19 | ****************************************************************************/ | ||
20 | #include "plugin.h" | ||
21 | |||
22 | #if PLUGIN_BUFFER_SIZE >= 0x80000 && !defined(SIMULATOR) | ||
23 | |||
24 | #include "lib/overlay.h" | ||
25 | |||
26 | PLUGIN_HEADER | ||
27 | |||
28 | /* this is the plugin entry point */ | ||
29 | enum plugin_status plugin_start(const void* parameter) | ||
30 | { | ||
31 | return run_overlay(parameter, VIEWERS_DIR "/lua.ovl", "LuaViewer"); | ||
32 | } | ||
33 | #endif | ||
diff --git a/apps/plugins/rockboy/sys_rockbox.c b/apps/plugins/rockboy/sys_rockbox.c index fb9a1ea644..bf4c513758 100644 --- a/apps/plugins/rockboy/sys_rockbox.c +++ b/apps/plugins/rockboy/sys_rockbox.c | |||
@@ -230,7 +230,7 @@ void vid_update(int scanline) | |||
230 | { | 230 | { |
231 | register int cnt=0; | 231 | register int cnt=0; |
232 | int scanline_remapped; | 232 | int scanline_remapped; |
233 | #if (LCD_HEIGHT == 64) && (LCD_DEPTH == 1) /* Archos */ | 233 | #if (LCD_HEIGHT == 64) && (LCD_DEPTH == 1) /* Archos, Clip, m200v4 */ |
234 | int balance = 0; | 234 | int balance = 0; |
235 | if (fb.mode==1) | 235 | if (fb.mode==1) |
236 | scanline-=16; | 236 | scanline-=16; |
@@ -306,7 +306,7 @@ void vid_update(int scanline) | |||
306 | cnt ++; | 306 | cnt ++; |
307 | } | 307 | } |
308 | rb->lcd_update_rect(0, (scanline/2) & ~7, LCD_WIDTH, 8); | 308 | rb->lcd_update_rect(0, (scanline/2) & ~7, LCD_WIDTH, 8); |
309 | #elif (LCD_HEIGHT == 128) && (LCD_DEPTH == 2) /* iriver H1x0 */ | 309 | #elif (LCD_HEIGHT == 128) && (LCD_DEPTH == 2) /* iriver H1x0, Samsung YH920 */ |
310 | if (fb.mode==1) | 310 | if (fb.mode==1) |
311 | scanline-=16; | 311 | scanline-=16; |
312 | else if (fb.mode==2) | 312 | else if (fb.mode==2) |
diff --git a/apps/plugins/sokoban.c b/apps/plugins/sokoban.c index 3a853c81aa..b2721c84e9 100644 --- a/apps/plugins/sokoban.c +++ b/apps/plugins/sokoban.c | |||
@@ -58,10 +58,19 @@ PLUGIN_HEADER | |||
58 | #define COLS (LCD_WIDTH/SOKOBAN_TILESIZE) | 58 | #define COLS (LCD_WIDTH/SOKOBAN_TILESIZE) |
59 | #endif | 59 | #endif |
60 | 60 | ||
61 | /* Use either all but 16k of the plugin buffer for level data | 61 | /* size of code+bss */ |
62 | #if CONFIG_CPU == SH7034 | ||
63 | #define CODE_SIZE 0x3000 /* 12k */ | ||
64 | #else | ||
65 | #define CODE_SIZE 0x5000 /* 20k */ | ||
66 | #endif | ||
67 | |||
68 | #define CODE_AND_UNDO_SIZE (CODE_SIZE+0x1000) /* + 4k */ | ||
69 | |||
70 | /* Use either all but code & undo of the plugin buffer for level data | ||
62 | * or 128k, which ever is less */ | 71 | * or 128k, which ever is less */ |
63 | #if PLUGIN_BUFFER_SIZE - 0x4000 < 0x20000 | 72 | #if PLUGIN_BUFFER_SIZE - CODE_AND_UNDO_SIZE < 0x20000 |
64 | #define MAX_LEVEL_DATA (PLUGIN_BUFFER_SIZE - 0x4000) | 73 | #define MAX_LEVEL_DATA (PLUGIN_BUFFER_SIZE - CODE_AND_UNDO_SIZE) |
65 | #else | 74 | #else |
66 | #define MAX_LEVEL_DATA 0x20000 | 75 | #define MAX_LEVEL_DATA 0x20000 |
67 | #endif | 76 | #endif |
@@ -69,11 +78,11 @@ PLUGIN_HEADER | |||
69 | /* Number of levels for which to allocate buffer indexes */ | 78 | /* Number of levels for which to allocate buffer indexes */ |
70 | #define MAX_LEVELS MAX_LEVEL_DATA/70 | 79 | #define MAX_LEVELS MAX_LEVEL_DATA/70 |
71 | 80 | ||
72 | /* Use 4k plus remaining plugin buffer (-12k for prog) for undo, up to 64k */ | 81 | /* Use remaining plugin buffer (- code prog) for undo, up to 64k */ |
73 | #if PLUGIN_BUFFER_SIZE - MAX_LEVEL_DATA - 0x3000 > 0x10000 | 82 | #if PLUGIN_BUFFER_SIZE - MAX_LEVEL_DATA - CODE_SIZE > 0x10000 |
74 | #define MAX_UNDOS 0x10000 | 83 | #define MAX_UNDOS 0x10000 |
75 | #else | 84 | #else |
76 | #define MAX_UNDOS (PLUGIN_BUFFER_SIZE - MAX_LEVEL_DATA - 0x3000) | 85 | #define MAX_UNDOS (PLUGIN_BUFFER_SIZE - MAX_LEVEL_DATA - CODE_SIZE) |
77 | #endif | 86 | #endif |
78 | 87 | ||
79 | /* Move/push definitions for undo */ | 88 | /* Move/push definitions for undo */ |