summaryrefslogtreecommitdiff
path: root/apps/plugins
diff options
context:
space:
mode:
Diffstat (limited to 'apps/plugins')
-rw-r--r--apps/plugins/rockboy/cpu.c2
-rw-r--r--apps/plugins/rockboy/cpu.h4
-rw-r--r--apps/plugins/rockboy/lcd.c2
-rw-r--r--apps/plugins/rockboy/lcd.h2
-rw-r--r--apps/plugins/rockboy/rockboy.c9
-rw-r--r--apps/plugins/rockboy/rockmacros.h10
6 files changed, 24 insertions, 5 deletions
diff --git a/apps/plugins/rockboy/cpu.c b/apps/plugins/rockboy/cpu.c
index 44a870a6eb..d4831e813f 100644
--- a/apps/plugins/rockboy/cpu.c
+++ b/apps/plugins/rockboy/cpu.c
@@ -17,7 +17,7 @@
17#endif 17#endif
18 18
19 19
20struct cpu cpu; 20struct cpu cpu IDATA_ATTR;
21 21
22 22
23 23
diff --git a/apps/plugins/rockboy/cpu.h b/apps/plugins/rockboy/cpu.h
index 22d58b0db0..eab4979cc6 100644
--- a/apps/plugins/rockboy/cpu.h
+++ b/apps/plugins/rockboy/cpu.h
@@ -35,7 +35,7 @@ void timer_advance(int cnt);
35void lcdc_advance(int cnt); 35void lcdc_advance(int cnt);
36void sound_advance(int cnt); 36void sound_advance(int cnt);
37void cpu_timers(int cnt); 37void cpu_timers(int cnt);
38int cpu_emulate(int cycles); 38int cpu_emulate(int cycles) ICODE_ATTR;
39 39int cpu_step(int max) ICODE_ATTR;
40 40
41#endif 41#endif
diff --git a/apps/plugins/rockboy/lcd.c b/apps/plugins/rockboy/lcd.c
index 6351cb93ed..8cb1b7a319 100644
--- a/apps/plugins/rockboy/lcd.c
+++ b/apps/plugins/rockboy/lcd.c
@@ -16,7 +16,7 @@
16 16
17struct lcd lcd; 17struct lcd lcd;
18 18
19struct scan scan; 19struct scan scan IDATA_ATTR;
20 20
21#define BG (scan.bg) 21#define BG (scan.bg)
22#define WND (scan.wnd) 22#define WND (scan.wnd)
diff --git a/apps/plugins/rockboy/lcd.h b/apps/plugins/rockboy/lcd.h
index 9442b56cf0..4911f857de 100644
--- a/apps/plugins/rockboy/lcd.h
+++ b/apps/plugins/rockboy/lcd.h
@@ -55,7 +55,7 @@ extern struct scan scan;
55 55
56 56
57 57
58void updatepatpix(void); 58void updatepatpix(void) ICODE_ATTR;
59void tilebuf(void); 59void tilebuf(void);
60void bg_scan(void); 60void bg_scan(void);
61void wnd_scan(void); 61void wnd_scan(void);
diff --git a/apps/plugins/rockboy/rockboy.c b/apps/plugins/rockboy/rockboy.c
index c9788e2438..ca48fc2b1a 100644
--- a/apps/plugins/rockboy/rockboy.c
+++ b/apps/plugins/rockboy/rockboy.c
@@ -38,6 +38,12 @@ const struct {
38}; 38};
39#endif 39#endif
40 40
41#ifdef USE_IRAM
42extern char iramcopy[];
43extern char iramstart[];
44extern char iramend[];
45#endif
46
41/* here is a global api struct pointer. while not strictly necessary, 47/* here is a global api struct pointer. while not strictly necessary,
42 it's nice not to have to pass the api pointer in all function calls 48 it's nice not to have to pass the api pointer in all function calls
43 in the plugin */ 49 in the plugin */
@@ -114,6 +120,9 @@ enum plugin_status plugin_start(struct plugin_api* api, void* parameter)
114 /* if you are using a global api pointer, don't forget to copy it! 120 /* if you are using a global api pointer, don't forget to copy it!
115 otherwise you will get lovely "I04: IllInstr" errors... :-) */ 121 otherwise you will get lovely "I04: IllInstr" errors... :-) */
116 rb = api; 122 rb = api;
123#ifdef USE_IRAM
124 memcpy(iramstart, iramcopy, iramend-iramstart);
125#endif
117 shut=0; 126 shut=0;
118 cleanshut=0; 127 cleanshut=0;
119 mp3_bufferbase=mp3_bufferpointer=0; 128 mp3_bufferbase=mp3_bufferpointer=0;
diff --git a/apps/plugins/rockboy/rockmacros.h b/apps/plugins/rockboy/rockmacros.h
index 63f9b106e9..6cc05237f2 100644
--- a/apps/plugins/rockboy/rockmacros.h
+++ b/apps/plugins/rockboy/rockmacros.h
@@ -57,12 +57,22 @@ void ev_poll(void);
57#define open(a,b) rb->sim_open((a),(b)) 57#define open(a,b) rb->sim_open((a),(b))
58#undef lseek 58#undef lseek
59#define lseek(a,b,c) rb->sim_lseek((a),(b),(c)) 59#define lseek(a,b,c) rb->sim_lseek((a),(b),(c))
60#define ICODE_ATTR
61#define IDATA_ATTR
60#else /* !SIMULATOR */ 62#else /* !SIMULATOR */
61#define opendir(a) rb->opendir((a)) 63#define opendir(a) rb->opendir((a))
62#define closedir(a) rb->closedir((a)) 64#define closedir(a) rb->closedir((a))
63#define mkdir(a,b) rb->mkdir((a),(b)) 65#define mkdir(a,b) rb->mkdir((a),(b))
64#define open(a,b) rb->open((a),(b)) 66#define open(a,b) rb->open((a),(b))
65#define lseek(a,b,c) rb->lseek((a),(b),(c)) 67#define lseek(a,b,c) rb->lseek((a),(b),(c))
68#if CONFIG_KEYPAD == IRIVER_H100_PAD
69#define ICODE_ATTR __attribute__ ((section(".icode")))
70#define IDATA_ATTR __attribute__ ((section(".idata")))
71#define USE_IRAM 1
72#else
73#define ICODE_ATTR
74#define IDATA_ATTR
75#endif
66#endif /* !SIMULATOR */ 76#endif /* !SIMULATOR */
67 77
68#define strcat(a,b) rb->strcat((a),(b)) 78#define strcat(a,b) rb->strcat((a),(b))