summaryrefslogtreecommitdiff
path: root/apps/plugins/zxbox/zxbox.c
diff options
context:
space:
mode:
authorMichael Sevakis <jethead71@rockbox.org>2006-11-18 02:18:29 +0000
committerMichael Sevakis <jethead71@rockbox.org>2006-11-18 02:18:29 +0000
commitacc29d95be85c9cfd0d8f74dda813d7d1082e2ec (patch)
tree81fdd154d122b393d6254968cba5bc90b63e4741 /apps/plugins/zxbox/zxbox.c
parente2a262ee258769136eadc58c2bc8e3aa53db1a71 (diff)
downloadrockbox-acc29d95be85c9cfd0d8f74dda813d7d1082e2ec.tar.gz
rockbox-acc29d95be85c9cfd0d8f74dda813d7d1082e2ec.zip
SWCODEC/IRAM: Save voice IRAM when a plugin initializes its IRAM. Defines two macros for declaring and initializing IRAM. Plugins should use these instead. See mp3_encoder, doom, etc. for details. Further tweaks in buffer restoration after other use. Hiding of some interfaces that should only be used by buffer management.
git-svn-id: svn://svn.rockbox.org/rockbox/trunk@11544 a1c6a512-1295-4272-9138-f99709370657
Diffstat (limited to 'apps/plugins/zxbox/zxbox.c')
-rw-r--r--apps/plugins/zxbox/zxbox.c17
1 files changed, 2 insertions, 15 deletions
diff --git a/apps/plugins/zxbox/zxbox.c b/apps/plugins/zxbox/zxbox.c
index 54a11d010e..753fb1ff5b 100644
--- a/apps/plugins/zxbox/zxbox.c
+++ b/apps/plugins/zxbox/zxbox.c
@@ -20,6 +20,7 @@
20#include "zxconfig.h" 20#include "zxconfig.h"
21 21
22PLUGIN_HEADER 22PLUGIN_HEADER
23PLUGIN_IRAM_DECLARE
23 24
24struct plugin_api* rb; 25struct plugin_api* rb;
25 26
@@ -37,14 +38,6 @@ int use_shm = 0;
37int small_screen,pause_on_iconify; 38int small_screen,pause_on_iconify;
38int vga_pause_bg; 39int vga_pause_bg;
39 40
40#ifdef USE_IRAM
41extern char iramcopy[];
42extern char iramstart[];
43extern char iramend[];
44extern char iedata[];
45extern char iend[];
46#endif
47
48#include "keymaps.h" 41#include "keymaps.h"
49#include "zxvid_com.h" 42#include "zxvid_com.h"
50#include "spmain.h" 43#include "spmain.h"
@@ -75,13 +68,7 @@ enum plugin_status plugin_start(struct plugin_api* api, void* parameter)
75 rb->lcd_set_backdrop(NULL); 68 rb->lcd_set_backdrop(NULL);
76 rb->splash(HZ, true, "Welcome to ZXBox"); 69 rb->splash(HZ, true, "Welcome to ZXBox");
77 70
78#ifdef USE_IRAM 71 PLUGIN_IRAM_INIT(rb)
79 /* We need to stop audio playback in order to use IRAM */
80 rb->audio_stop();
81
82 rb->memcpy(iramstart, iramcopy, iramend-iramstart);
83 rb->memset(iedata, 0, iend - iedata);
84#endif
85 72
86 sp_init(); 73 sp_init();
87 74