forked from len0rd/rockbox
Functions and data into iram mode for iriver, seems faster.
git-svn-id: svn://svn.rockbox.org/rockbox/trunk@6112 a1c6a512-1295-4272-9138-f99709370657
This commit is contained in:
parent
0cecadd074
commit
95819727eb
6 changed files with 24 additions and 5 deletions
|
|
@ -17,7 +17,7 @@
|
|||
#endif
|
||||
|
||||
|
||||
struct cpu cpu;
|
||||
struct cpu cpu IDATA_ATTR;
|
||||
|
||||
|
||||
|
||||
|
|
|
|||
|
|
@ -35,7 +35,7 @@ void timer_advance(int cnt);
|
|||
void lcdc_advance(int cnt);
|
||||
void sound_advance(int cnt);
|
||||
void cpu_timers(int cnt);
|
||||
int cpu_emulate(int cycles);
|
||||
|
||||
int cpu_emulate(int cycles) ICODE_ATTR;
|
||||
int cpu_step(int max) ICODE_ATTR;
|
||||
|
||||
#endif
|
||||
|
|
|
|||
|
|
@ -16,7 +16,7 @@
|
|||
|
||||
struct lcd lcd;
|
||||
|
||||
struct scan scan;
|
||||
struct scan scan IDATA_ATTR;
|
||||
|
||||
#define BG (scan.bg)
|
||||
#define WND (scan.wnd)
|
||||
|
|
|
|||
|
|
@ -55,7 +55,7 @@ extern struct scan scan;
|
|||
|
||||
|
||||
|
||||
void updatepatpix(void);
|
||||
void updatepatpix(void) ICODE_ATTR;
|
||||
void tilebuf(void);
|
||||
void bg_scan(void);
|
||||
void wnd_scan(void);
|
||||
|
|
|
|||
|
|
@ -38,6 +38,12 @@ const struct {
|
|||
};
|
||||
#endif
|
||||
|
||||
#ifdef USE_IRAM
|
||||
extern char iramcopy[];
|
||||
extern char iramstart[];
|
||||
extern char iramend[];
|
||||
#endif
|
||||
|
||||
/* here is a global api struct pointer. while not strictly necessary,
|
||||
it's nice not to have to pass the api pointer in all function calls
|
||||
in the plugin */
|
||||
|
|
@ -114,6 +120,9 @@ enum plugin_status plugin_start(struct plugin_api* api, void* parameter)
|
|||
/* if you are using a global api pointer, don't forget to copy it!
|
||||
otherwise you will get lovely "I04: IllInstr" errors... :-) */
|
||||
rb = api;
|
||||
#ifdef USE_IRAM
|
||||
memcpy(iramstart, iramcopy, iramend-iramstart);
|
||||
#endif
|
||||
shut=0;
|
||||
cleanshut=0;
|
||||
mp3_bufferbase=mp3_bufferpointer=0;
|
||||
|
|
|
|||
|
|
@ -57,12 +57,22 @@ void ev_poll(void);
|
|||
#define open(a,b) rb->sim_open((a),(b))
|
||||
#undef lseek
|
||||
#define lseek(a,b,c) rb->sim_lseek((a),(b),(c))
|
||||
#define ICODE_ATTR
|
||||
#define IDATA_ATTR
|
||||
#else /* !SIMULATOR */
|
||||
#define opendir(a) rb->opendir((a))
|
||||
#define closedir(a) rb->closedir((a))
|
||||
#define mkdir(a,b) rb->mkdir((a),(b))
|
||||
#define open(a,b) rb->open((a),(b))
|
||||
#define lseek(a,b,c) rb->lseek((a),(b),(c))
|
||||
#if CONFIG_KEYPAD == IRIVER_H100_PAD
|
||||
#define ICODE_ATTR __attribute__ ((section(".icode")))
|
||||
#define IDATA_ATTR __attribute__ ((section(".idata")))
|
||||
#define USE_IRAM 1
|
||||
#else
|
||||
#define ICODE_ATTR
|
||||
#define IDATA_ATTR
|
||||
#endif
|
||||
#endif /* !SIMULATOR */
|
||||
|
||||
#define strcat(a,b) rb->strcat((a),(b))
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue