forked from len0rd/rockbox
Plugins: modify IRAM copying code
Move to plugin_crt0.c, plugins don't need PLUGIN_IRAM_* macros anymore IRAM is no longered zeroed before copying (as it is at the same address than BSS) -> Fix FS#11581 Use cpucache_invalidate() (and not cpucache_flush), needed for self-modifying code on cached IRAM git-svn-id: svn://svn.rockbox.org/rockbox/trunk@27948 a1c6a512-1295-4272-9138-f99709370657
This commit is contained in:
parent
a1997c13c1
commit
da16248e47
15 changed files with 39 additions and 110 deletions
|
@ -109,7 +109,9 @@ static const struct plugin_api rockbox_api = {
|
||||||
lcd_clear_display,
|
lcd_clear_display,
|
||||||
lcd_getstringsize,
|
lcd_getstringsize,
|
||||||
lcd_putsxy,
|
lcd_putsxy,
|
||||||
|
lcd_putsxyf,
|
||||||
lcd_puts,
|
lcd_puts,
|
||||||
|
lcd_putsf,
|
||||||
lcd_puts_scroll,
|
lcd_puts_scroll,
|
||||||
lcd_stop_scroll,
|
lcd_stop_scroll,
|
||||||
#ifdef HAVE_LCD_CHARCELLS
|
#ifdef HAVE_LCD_CHARCELLS
|
||||||
|
@ -382,8 +384,10 @@ static const struct plugin_api rockbox_api = {
|
||||||
trigger_cpu_boost,
|
trigger_cpu_boost,
|
||||||
cancel_cpu_boost,
|
cancel_cpu_boost,
|
||||||
#endif
|
#endif
|
||||||
#if NUM_CORES > 1
|
#ifdef HAVE_CPUCACHE_FLUSH
|
||||||
cpucache_flush,
|
cpucache_flush,
|
||||||
|
#endif
|
||||||
|
#ifdef HAVE_CPUCACHE_INVALIDATE
|
||||||
cpucache_invalidate,
|
cpucache_invalidate,
|
||||||
#endif
|
#endif
|
||||||
timer_register,
|
timer_register,
|
||||||
|
@ -620,9 +624,6 @@ static const struct plugin_api rockbox_api = {
|
||||||
plugin_get_audio_buffer,
|
plugin_get_audio_buffer,
|
||||||
plugin_tsr,
|
plugin_tsr,
|
||||||
plugin_get_current_filename,
|
plugin_get_current_filename,
|
||||||
#ifdef PLUGIN_USE_IRAM
|
|
||||||
plugin_iram_init,
|
|
||||||
#endif
|
|
||||||
#if defined(DEBUG) || defined(SIMULATOR)
|
#if defined(DEBUG) || defined(SIMULATOR)
|
||||||
debugf,
|
debugf,
|
||||||
#endif
|
#endif
|
||||||
|
@ -721,9 +722,6 @@ static const struct plugin_api rockbox_api = {
|
||||||
|
|
||||||
/* new stuff at the end, sort into place next time
|
/* new stuff at the end, sort into place next time
|
||||||
the API gets incompatible */
|
the API gets incompatible */
|
||||||
|
|
||||||
lcd_putsf,
|
|
||||||
lcd_putsxyf,
|
|
||||||
};
|
};
|
||||||
|
|
||||||
int plugin_load(const char* plugin, const void* parameter)
|
int plugin_load(const char* plugin, const void* parameter)
|
||||||
|
@ -919,23 +917,6 @@ void* plugin_get_audio_buffer(size_t *buffer_size)
|
||||||
#endif
|
#endif
|
||||||
}
|
}
|
||||||
|
|
||||||
#ifdef PLUGIN_USE_IRAM
|
|
||||||
/* Initializes plugin IRAM */
|
|
||||||
void plugin_iram_init(char *iramstart, char *iramcopy, size_t iram_size,
|
|
||||||
char *iedata, size_t iedata_size)
|
|
||||||
{
|
|
||||||
/* We need to stop audio playback in order to use codec IRAM */
|
|
||||||
audio_hard_stop();
|
|
||||||
memcpy(iramstart, iramcopy, iram_size);
|
|
||||||
memset(iedata, 0, iedata_size);
|
|
||||||
memset(iramcopy, 0, iram_size);
|
|
||||||
#if NUM_CORES > 1
|
|
||||||
/* writeback cleared iedata and iramcopy areas */
|
|
||||||
cpucache_flush();
|
|
||||||
#endif
|
|
||||||
}
|
|
||||||
#endif /* PLUGIN_USE_IRAM */
|
|
||||||
|
|
||||||
/* The plugin wants to stay resident after leaving its main function, e.g.
|
/* The plugin wants to stay resident after leaving its main function, e.g.
|
||||||
runs from timer or own thread. The callback is registered to later
|
runs from timer or own thread. The callback is registered to later
|
||||||
instruct it to free its resources before a new plugin gets loaded. */
|
instruct it to free its resources before a new plugin gets loaded. */
|
||||||
|
|
|
@ -147,12 +147,12 @@ void* plugin_get_buffer(size_t *buffer_size);
|
||||||
#define PLUGIN_MAGIC 0x526F634B /* RocK */
|
#define PLUGIN_MAGIC 0x526F634B /* RocK */
|
||||||
|
|
||||||
/* increase this every time the api struct changes */
|
/* increase this every time the api struct changes */
|
||||||
#define PLUGIN_API_VERSION 191
|
#define PLUGIN_API_VERSION 192
|
||||||
|
|
||||||
/* update this to latest version if a change to the api struct breaks
|
/* update this to latest version if a change to the api struct breaks
|
||||||
backwards compatibility (and please take the opportunity to sort in any
|
backwards compatibility (and please take the opportunity to sort in any
|
||||||
new function which are "waiting" at the end of the function table) */
|
new function which are "waiting" at the end of the function table) */
|
||||||
#define PLUGIN_MIN_API_VERSION 191
|
#define PLUGIN_MIN_API_VERSION 192
|
||||||
|
|
||||||
/* plugin return codes */
|
/* plugin return codes */
|
||||||
/* internal returns start at 0x100 to make exit(1..255) work */
|
/* internal returns start at 0x100 to make exit(1..255) work */
|
||||||
|
@ -183,7 +183,9 @@ struct plugin_api {
|
||||||
void (*lcd_clear_display)(void);
|
void (*lcd_clear_display)(void);
|
||||||
int (*lcd_getstringsize)(const unsigned char *str, int *w, int *h);
|
int (*lcd_getstringsize)(const unsigned char *str, int *w, int *h);
|
||||||
void (*lcd_putsxy)(int x, int y, const unsigned char *string);
|
void (*lcd_putsxy)(int x, int y, const unsigned char *string);
|
||||||
|
void (*lcd_putsxyf)(int x, int y, const unsigned char *fmt, ...);
|
||||||
void (*lcd_puts)(int x, int y, const unsigned char *string);
|
void (*lcd_puts)(int x, int y, const unsigned char *string);
|
||||||
|
void (*lcd_putsf)(int x, int y, const unsigned char *fmt, ...);
|
||||||
void (*lcd_puts_scroll)(int x, int y, const unsigned char* string);
|
void (*lcd_puts_scroll)(int x, int y, const unsigned char* string);
|
||||||
void (*lcd_stop_scroll)(void);
|
void (*lcd_stop_scroll)(void);
|
||||||
#ifdef HAVE_LCD_CHARCELLS
|
#ifdef HAVE_LCD_CHARCELLS
|
||||||
|
@ -496,8 +498,10 @@ struct plugin_api {
|
||||||
void (*trigger_cpu_boost)(void);
|
void (*trigger_cpu_boost)(void);
|
||||||
void (*cancel_cpu_boost)(void);
|
void (*cancel_cpu_boost)(void);
|
||||||
#endif
|
#endif
|
||||||
#if NUM_CORES > 1
|
#ifdef HAVE_CPUCACHE_FLUSH
|
||||||
void (*cpucache_flush)(void);
|
void (*cpucache_flush)(void);
|
||||||
|
#endif
|
||||||
|
#ifdef HAVE_CPUCACHE_INVALIDATE
|
||||||
void (*cpucache_invalidate)(void);
|
void (*cpucache_invalidate)(void);
|
||||||
#endif
|
#endif
|
||||||
bool (*timer_register)(int reg_prio, void (*unregister_callback)(void),
|
bool (*timer_register)(int reg_prio, void (*unregister_callback)(void),
|
||||||
|
@ -769,10 +773,6 @@ struct plugin_api {
|
||||||
void* (*plugin_get_audio_buffer)(size_t *buffer_size);
|
void* (*plugin_get_audio_buffer)(size_t *buffer_size);
|
||||||
void (*plugin_tsr)(bool (*exit_callback)(bool reenter));
|
void (*plugin_tsr)(bool (*exit_callback)(bool reenter));
|
||||||
char* (*plugin_get_current_filename)(void);
|
char* (*plugin_get_current_filename)(void);
|
||||||
#ifdef PLUGIN_USE_IRAM
|
|
||||||
void (*plugin_iram_init)(char *iramstart, char *iramcopy, size_t iram_size,
|
|
||||||
char *iedata, size_t iedata_size);
|
|
||||||
#endif
|
|
||||||
#if defined(DEBUG) || defined(SIMULATOR)
|
#if defined(DEBUG) || defined(SIMULATOR)
|
||||||
void (*debugf)(const char *fmt, ...) ATTRIBUTE_PRINTF(1, 2);
|
void (*debugf)(const char *fmt, ...) ATTRIBUTE_PRINTF(1, 2);
|
||||||
#endif
|
#endif
|
||||||
|
@ -894,9 +894,6 @@ struct plugin_api {
|
||||||
|
|
||||||
/* new stuff at the end, sort into place next time
|
/* new stuff at the end, sort into place next time
|
||||||
the API gets incompatible */
|
the API gets incompatible */
|
||||||
|
|
||||||
void (*lcd_putsf)(int x, int y, const unsigned char *fmt, ...);
|
|
||||||
void (*lcd_putsxyf)(int x, int y, const unsigned char *fmt, ...);
|
|
||||||
};
|
};
|
||||||
|
|
||||||
/* plugin header */
|
/* plugin header */
|
||||||
|
@ -928,31 +925,10 @@ extern unsigned char plugin_end_addr[];
|
||||||
PLUGIN_MAGIC, TARGET_ID, PLUGIN_API_VERSION, \
|
PLUGIN_MAGIC, TARGET_ID, PLUGIN_API_VERSION, \
|
||||||
NULL, NULL, plugin__start, &rb };
|
NULL, NULL, plugin__start, &rb };
|
||||||
#endif /* CONFIG_PLATFORM */
|
#endif /* CONFIG_PLATFORM */
|
||||||
|
|
||||||
#ifdef PLUGIN_USE_IRAM
|
|
||||||
/* Declare IRAM variables */
|
|
||||||
#define PLUGIN_IRAM_DECLARE \
|
|
||||||
extern char iramcopy[]; \
|
|
||||||
extern char iramstart[]; \
|
|
||||||
extern char iramend[]; \
|
|
||||||
extern char iedata[]; \
|
|
||||||
extern char iend[];
|
|
||||||
/* Initialize IRAM */
|
|
||||||
#define PLUGIN_IRAM_INIT(api) \
|
|
||||||
(api)->plugin_iram_init(iramstart, iramcopy, iramend-iramstart, \
|
|
||||||
iedata, iend-iedata);
|
|
||||||
#else
|
|
||||||
#define PLUGIN_IRAM_DECLARE
|
|
||||||
#define PLUGIN_IRAM_INIT(api)
|
|
||||||
#endif /* PLUGIN_USE_IRAM */
|
|
||||||
#endif /* PLUGIN */
|
#endif /* PLUGIN */
|
||||||
|
|
||||||
int plugin_load(const char* plugin, const void* parameter);
|
int plugin_load(const char* plugin, const void* parameter);
|
||||||
void* plugin_get_audio_buffer(size_t *buffer_size);
|
void* plugin_get_audio_buffer(size_t *buffer_size);
|
||||||
#ifdef PLUGIN_USE_IRAM
|
|
||||||
void plugin_iram_init(char *iramstart, char *iramcopy, size_t iram_size,
|
|
||||||
char *iedata, size_t iedata_size);
|
|
||||||
#endif
|
|
||||||
|
|
||||||
/* plugin_tsr,
|
/* plugin_tsr,
|
||||||
callback returns true to allow the new plugin to load,
|
callback returns true to allow the new plugin to load,
|
||||||
|
|
|
@ -27,8 +27,6 @@
|
||||||
#include "midi/midifile.h"
|
#include "midi/midifile.h"
|
||||||
|
|
||||||
|
|
||||||
PLUGIN_IRAM_DECLARE
|
|
||||||
|
|
||||||
/* variable button definitions */
|
/* variable button definitions */
|
||||||
#if CONFIG_KEYPAD == RECORDER_PAD
|
#if CONFIG_KEYPAD == RECORDER_PAD
|
||||||
#define BTN_QUIT BUTTON_OFF
|
#define BTN_QUIT BUTTON_OFF
|
||||||
|
@ -249,8 +247,6 @@ enum plugin_status plugin_start(const void* parameter)
|
||||||
{
|
{
|
||||||
int retval = 0;
|
int retval = 0;
|
||||||
|
|
||||||
PLUGIN_IRAM_INIT(rb)
|
|
||||||
|
|
||||||
rb->lcd_setfont(0);
|
rb->lcd_setfont(0);
|
||||||
|
|
||||||
#if defined(HAVE_ADJUSTABLE_CPU_FREQ)
|
#if defined(HAVE_ADJUSTABLE_CPU_FREQ)
|
||||||
|
|
|
@ -41,9 +41,6 @@
|
||||||
#include "st_stuff.h"
|
#include "st_stuff.h"
|
||||||
#include "lib/helper.h"
|
#include "lib/helper.h"
|
||||||
|
|
||||||
|
|
||||||
PLUGIN_IRAM_DECLARE
|
|
||||||
|
|
||||||
extern boolean timingdemo, singledemo, demoplayback, fastdemo; // killough
|
extern boolean timingdemo, singledemo, demoplayback, fastdemo; // killough
|
||||||
|
|
||||||
int filearray[9];
|
int filearray[9];
|
||||||
|
@ -663,8 +660,6 @@ enum plugin_status plugin_start(const void* parameter)
|
||||||
/* Disable all talking before initializing IRAM */
|
/* Disable all talking before initializing IRAM */
|
||||||
rb->talk_disable(true);
|
rb->talk_disable(true);
|
||||||
|
|
||||||
PLUGIN_IRAM_INIT(rb)
|
|
||||||
|
|
||||||
(void)parameter;
|
(void)parameter;
|
||||||
|
|
||||||
doomexit=0;
|
doomexit=0;
|
||||||
|
|
|
@ -26,8 +26,6 @@
|
||||||
#include "midifile.h"
|
#include "midifile.h"
|
||||||
|
|
||||||
|
|
||||||
PLUGIN_IRAM_DECLARE
|
|
||||||
|
|
||||||
/* variable button definitions */
|
/* variable button definitions */
|
||||||
#if (CONFIG_KEYPAD == IRIVER_H100_PAD) || (CONFIG_KEYPAD == IRIVER_H300_PAD)
|
#if (CONFIG_KEYPAD == IRIVER_H100_PAD) || (CONFIG_KEYPAD == IRIVER_H300_PAD)
|
||||||
#define BTN_QUIT BUTTON_OFF
|
#define BTN_QUIT BUTTON_OFF
|
||||||
|
@ -451,8 +449,6 @@ enum plugin_status plugin_start(const void* parameter)
|
||||||
{
|
{
|
||||||
int retval;
|
int retval;
|
||||||
|
|
||||||
PLUGIN_IRAM_INIT(rb)
|
|
||||||
|
|
||||||
if (parameter == NULL)
|
if (parameter == NULL)
|
||||||
{
|
{
|
||||||
rb->splash(HZ*2, " Play .MID file ");
|
rb->splash(HZ*2, " Play .MID file ");
|
||||||
|
|
|
@ -15,8 +15,6 @@
|
||||||
#include "plugin.h"
|
#include "plugin.h"
|
||||||
|
|
||||||
|
|
||||||
PLUGIN_IRAM_DECLARE
|
|
||||||
|
|
||||||
#define SAMP_PER_FRAME 1152
|
#define SAMP_PER_FRAME 1152
|
||||||
#define SAMPL2 576
|
#define SAMPL2 576
|
||||||
#define SBLIMIT 32
|
#define SBLIMIT 32
|
||||||
|
@ -2504,8 +2502,6 @@ enum plugin_status plugin_start(const void* parameter)
|
||||||
if (parameter == NULL)
|
if (parameter == NULL)
|
||||||
return PLUGIN_ERROR;
|
return PLUGIN_ERROR;
|
||||||
|
|
||||||
PLUGIN_IRAM_INIT(rb)
|
|
||||||
|
|
||||||
enc_buffer = rb->plugin_get_audio_buffer(&enc_buffer_size);
|
enc_buffer = rb->plugin_get_audio_buffer(&enc_buffer_size);
|
||||||
|
|
||||||
#ifdef CPU_COLDFIRE
|
#ifdef CPU_COLDFIRE
|
||||||
|
|
|
@ -109,8 +109,6 @@
|
||||||
#include "stream_mgr.h"
|
#include "stream_mgr.h"
|
||||||
|
|
||||||
|
|
||||||
PLUGIN_IRAM_DECLARE
|
|
||||||
|
|
||||||
/* button definitions */
|
/* button definitions */
|
||||||
#if (CONFIG_KEYPAD == IRIVER_H100_PAD) || (CONFIG_KEYPAD == IRIVER_H300_PAD)
|
#if (CONFIG_KEYPAD == IRIVER_H100_PAD) || (CONFIG_KEYPAD == IRIVER_H300_PAD)
|
||||||
#define MPEG_MENU BUTTON_MODE
|
#define MPEG_MENU BUTTON_MODE
|
||||||
|
@ -1761,9 +1759,6 @@ enum plugin_status plugin_start(const void* parameter)
|
||||||
/* Disable all talking before initializing IRAM */
|
/* Disable all talking before initializing IRAM */
|
||||||
rb->talk_disable(true);
|
rb->talk_disable(true);
|
||||||
|
|
||||||
/* Initialize IRAM - stops audio and voice as well */
|
|
||||||
PLUGIN_IRAM_INIT(rb)
|
|
||||||
|
|
||||||
#ifdef HAVE_LCD_COLOR
|
#ifdef HAVE_LCD_COLOR
|
||||||
rb->lcd_set_backdrop(NULL);
|
rb->lcd_set_backdrop(NULL);
|
||||||
rb->lcd_set_foreground(LCD_WHITE);
|
rb->lcd_set_foreground(LCD_WHITE);
|
||||||
|
|
|
@ -32,9 +32,6 @@
|
||||||
#include "lib/configfile.h"
|
#include "lib/configfile.h"
|
||||||
#include "lib/playback_control.h"
|
#include "lib/playback_control.h"
|
||||||
|
|
||||||
|
|
||||||
PLUGIN_IRAM_DECLARE
|
|
||||||
|
|
||||||
struct pacman_settings {
|
struct pacman_settings {
|
||||||
int difficulty;
|
int difficulty;
|
||||||
int numlives;
|
int numlives;
|
||||||
|
@ -493,8 +490,6 @@ enum plugin_status plugin_start(const void* parameter)
|
||||||
{
|
{
|
||||||
(void)parameter;
|
(void)parameter;
|
||||||
|
|
||||||
PLUGIN_IRAM_INIT(rb)
|
|
||||||
|
|
||||||
#ifdef HAVE_ADJUSTABLE_CPU_FREQ
|
#ifdef HAVE_ADJUSTABLE_CPU_FREQ
|
||||||
rb->cpu_boost(true);
|
rb->cpu_boost(true);
|
||||||
#endif
|
#endif
|
||||||
|
|
|
@ -29,8 +29,6 @@
|
||||||
|
|
||||||
/* Welcome to the PDBox plugin */
|
/* Welcome to the PDBox plugin */
|
||||||
|
|
||||||
PLUGIN_IRAM_DECLARE
|
|
||||||
|
|
||||||
/* Name of the file to open. */
|
/* Name of the file to open. */
|
||||||
char* filename;
|
char* filename;
|
||||||
|
|
||||||
|
@ -159,8 +157,6 @@ void core_thread(void)
|
||||||
/* Plug-in entry point */
|
/* Plug-in entry point */
|
||||||
enum plugin_status plugin_start(const void* parameter)
|
enum plugin_status plugin_start(const void* parameter)
|
||||||
{
|
{
|
||||||
PLUGIN_IRAM_INIT(rb)
|
|
||||||
|
|
||||||
/* Memory pool variables. */
|
/* Memory pool variables. */
|
||||||
size_t mem_size;
|
size_t mem_size;
|
||||||
void* mem_pool;
|
void* mem_pool;
|
||||||
|
|
|
@ -69,8 +69,6 @@
|
||||||
#include "pluginbitmaps/pitch_notes.h"
|
#include "pluginbitmaps/pitch_notes.h"
|
||||||
|
|
||||||
|
|
||||||
PLUGIN_IRAM_DECLARE
|
|
||||||
|
|
||||||
/* Some fixed point calculation stuff */
|
/* Some fixed point calculation stuff */
|
||||||
typedef int32_t fixed_data;
|
typedef int32_t fixed_data;
|
||||||
struct _fixed
|
struct _fixed
|
||||||
|
@ -1056,12 +1054,10 @@ static void init_everything(void)
|
||||||
/* Disable all talking before initializing IRAM */
|
/* Disable all talking before initializing IRAM */
|
||||||
rb->talk_disable(true);
|
rb->talk_disable(true);
|
||||||
|
|
||||||
PLUGIN_IRAM_INIT(rb);
|
|
||||||
|
|
||||||
load_settings();
|
load_settings();
|
||||||
rb->storage_sleep();
|
rb->storage_sleep();
|
||||||
|
|
||||||
/* Stop all playback (if no IRAM, otherwise IRAM_INIT would have) */
|
/* Stop all playback */
|
||||||
rb->plugin_get_audio_buffer(NULL);
|
rb->plugin_get_audio_buffer(NULL);
|
||||||
|
|
||||||
/* --------- Init the audio recording ----------------- */
|
/* --------- Init the audio recording ----------------- */
|
||||||
|
|
|
@ -63,10 +63,35 @@ enum plugin_status plugin__start(const void *param)
|
||||||
int exit_ret;
|
int exit_ret;
|
||||||
enum plugin_status ret;
|
enum plugin_status ret;
|
||||||
|
|
||||||
/* zero out the bss section */
|
|
||||||
#if (CONFIG_PLATFORM & PLATFORM_NATIVE)
|
#if (CONFIG_PLATFORM & PLATFORM_NATIVE)
|
||||||
|
|
||||||
|
/* IRAM must be copied before clearing the BSS ! */
|
||||||
|
#ifdef PLUGIN_USE_IRAM
|
||||||
|
extern char iramcopy[], iramstart[], iramend[], iedata[], iend[];
|
||||||
|
size_t iram_size = iramend - iramstart;
|
||||||
|
size_t ibss_size = iend - iedata;
|
||||||
|
if (iram_size > 0 || ibss_size > 0)
|
||||||
|
{
|
||||||
|
/* We need to stop audio playback in order to use codec IRAM */
|
||||||
|
rb->audio_stop();
|
||||||
|
rb->memcpy(iramstart, iramcopy, iram_size);
|
||||||
|
rb->memset(iedata, 0, ibss_size);
|
||||||
|
#ifdef HAVE_CPUCACHE_INVALIDATE
|
||||||
|
/* make the icache (if it exists) up to date with the new code */
|
||||||
|
rb->cpucache_invalidate();
|
||||||
|
#endif /* HAVE_CPUCACHE_INVALIDATE */
|
||||||
|
|
||||||
|
/* barrier to prevent reordering iram copy and BSS clearing,
|
||||||
|
* because the BSS segment alias the IRAM copy.
|
||||||
|
*/
|
||||||
|
asm volatile ("" ::: "memory");
|
||||||
|
}
|
||||||
|
#endif /* PLUGIN_USE_IRAM */
|
||||||
|
|
||||||
|
/* zero out the bss section */
|
||||||
rb->memset(plugin_bss_start, 0, plugin_end_addr - plugin_bss_start);
|
rb->memset(plugin_bss_start, 0, plugin_end_addr - plugin_bss_start);
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
/* we come back here if exit() was called or the plugin returned normally */
|
/* we come back here if exit() was called or the plugin returned normally */
|
||||||
exit_ret = setjmp(__exit_env);
|
exit_ret = setjmp(__exit_env);
|
||||||
if (exit_ret == 0)
|
if (exit_ret == 0)
|
||||||
|
|
|
@ -26,9 +26,6 @@
|
||||||
#include "hw.h"
|
#include "hw.h"
|
||||||
#include "pcm.h"
|
#include "pcm.h"
|
||||||
|
|
||||||
|
|
||||||
PLUGIN_IRAM_DECLARE
|
|
||||||
|
|
||||||
int shut,cleanshut;
|
int shut,cleanshut;
|
||||||
char *errormsg;
|
char *errormsg;
|
||||||
|
|
||||||
|
@ -380,8 +377,6 @@ static int gnuboy_main(const char *rom)
|
||||||
/* this is the plugin entry point */
|
/* this is the plugin entry point */
|
||||||
enum plugin_status plugin_start(const void* parameter)
|
enum plugin_status plugin_start(const void* parameter)
|
||||||
{
|
{
|
||||||
PLUGIN_IRAM_INIT(rb)
|
|
||||||
|
|
||||||
rb->lcd_setfont(0);
|
rb->lcd_setfont(0);
|
||||||
|
|
||||||
rb->lcd_clear_display();
|
rb->lcd_clear_display();
|
||||||
|
|
|
@ -22,8 +22,6 @@
|
||||||
#include "lib/helper.h"
|
#include "lib/helper.h"
|
||||||
#include "lib/grey.h"
|
#include "lib/grey.h"
|
||||||
|
|
||||||
PLUGIN_IRAM_DECLARE
|
|
||||||
|
|
||||||
#if (CONFIG_KEYPAD == IPOD_4G_PAD) || (CONFIG_KEYPAD == IPOD_3G_PAD) || \
|
#if (CONFIG_KEYPAD == IPOD_4G_PAD) || (CONFIG_KEYPAD == IPOD_3G_PAD) || \
|
||||||
(CONFIG_KEYPAD == IPOD_1G2G_PAD)
|
(CONFIG_KEYPAD == IPOD_1G2G_PAD)
|
||||||
#define FPS_QUIT BUTTON_MENU
|
#define FPS_QUIT BUTTON_MENU
|
||||||
|
@ -344,7 +342,6 @@ enum plugin_status plugin_start(const void* parameter)
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
/* standard stuff */
|
/* standard stuff */
|
||||||
PLUGIN_IRAM_INIT(rb)
|
|
||||||
(void)parameter;
|
(void)parameter;
|
||||||
|
|
||||||
log_init();
|
log_init();
|
||||||
|
|
|
@ -29,8 +29,6 @@
|
||||||
*/
|
*/
|
||||||
|
|
||||||
|
|
||||||
PLUGIN_IRAM_DECLARE;
|
|
||||||
|
|
||||||
static int hw_freq IDATA_ATTR = HW_FREQ_DEFAULT;
|
static int hw_freq IDATA_ATTR = HW_FREQ_DEFAULT;
|
||||||
static unsigned long hw_sampr IDATA_ATTR = HW_SAMPR_DEFAULT;
|
static unsigned long hw_sampr IDATA_ATTR = HW_SAMPR_DEFAULT;
|
||||||
|
|
||||||
|
@ -298,8 +296,6 @@ enum plugin_status plugin_start(const void *parameter)
|
||||||
/* Disable all talking before initializing IRAM */
|
/* Disable all talking before initializing IRAM */
|
||||||
rb->talk_disable(true);
|
rb->talk_disable(true);
|
||||||
|
|
||||||
PLUGIN_IRAM_INIT(rb);
|
|
||||||
|
|
||||||
while (!exit)
|
while (!exit)
|
||||||
{
|
{
|
||||||
int result = rb->do_menu(&menu, &selected, NULL, false);
|
int result = rb->do_menu(&menu, &selected, NULL, false);
|
||||||
|
|
|
@ -20,10 +20,6 @@
|
||||||
****************************************************************************/
|
****************************************************************************/
|
||||||
|
|
||||||
#include "zxconfig.h"
|
#include "zxconfig.h"
|
||||||
|
|
||||||
|
|
||||||
PLUGIN_IRAM_DECLARE
|
|
||||||
|
|
||||||
#include "spkey_p.h"
|
#include "spkey_p.h"
|
||||||
|
|
||||||
spkeyboard kb_mkey;
|
spkeyboard kb_mkey;
|
||||||
|
@ -61,8 +57,6 @@ long start_time IBSS_ATTR = 0;
|
||||||
|
|
||||||
enum plugin_status plugin_start(const void* parameter)
|
enum plugin_status plugin_start(const void* parameter)
|
||||||
{
|
{
|
||||||
PLUGIN_IRAM_INIT(rb)
|
|
||||||
|
|
||||||
#if LCD_DEPTH > 1
|
#if LCD_DEPTH > 1
|
||||||
rb->lcd_set_backdrop(NULL);
|
rb->lcd_set_backdrop(NULL);
|
||||||
#endif
|
#endif
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue