mirror of
https://github.com/Rockbox/rockbox.git
synced 2025-11-11 22:22:33 -05:00
New plugin loader. Solves the crashes introduced with the .bss changes while keeping the small binary size. The model & api version check is now part of the plugin loader. Codecs are not yet adapted, but the old method still works for them. Simulator plugins are not (yet) version-checked. API version numbering restarted, as this is an all-new system. Uses the target ID from configure, so don't change that too often.
git-svn-id: svn://svn.rockbox.org/rockbox/trunk@8349 a1c6a512-1295-4272-9138-f99709370657
This commit is contained in:
parent
c7c9069ed4
commit
a36b1d4083
70 changed files with 270 additions and 310 deletions
|
|
@ -10,7 +10,7 @@
|
|||
INCLUDES = -I$(APPSDIR) -I.. -I. -I$(FIRMDIR)/include -I$(FIRMDIR)/export \
|
||||
-I$(FIRMDIR)/common -I$(FIRMDIR)/drivers -I$(OUTDIR) -I$(BUILDDIR)
|
||||
CFLAGS = $(GCCOPTS) -O3 $(INCLUDES) $(TARGET) $(EXTRA_DEFINES) \
|
||||
-DMEM=${MEMORYSIZE} -DPLUGIN
|
||||
-DTARGET_ID=$(TARGET_ID) -DMEM=${MEMORYSIZE} -DPLUGIN
|
||||
|
||||
ifdef APPEXTRA
|
||||
INCLUDES += $(patsubst %,-I$(APPSDIR)/%,$(subst :, ,$(APPEXTRA)))
|
||||
|
|
|
|||
|
|
@ -36,6 +36,8 @@ const struct {
|
|||
0x524f564c, /* ROVL */
|
||||
ovl_start_addr, ovl_end_addr, plugin_start
|
||||
};
|
||||
#else
|
||||
PLUGIN_HEADER
|
||||
#endif
|
||||
|
||||
#ifdef USE_IRAM
|
||||
|
|
@ -93,17 +95,12 @@ void setmallocpos(void *pointer)
|
|||
/* this is the plugin entry point */
|
||||
enum plugin_status plugin_start(struct plugin_api* api, void* parameter)
|
||||
{
|
||||
/* this macro should be called as the first thing you do in the plugin.
|
||||
it test that the api version and model the plugin was compiled for
|
||||
matches the machine it is running on */
|
||||
TEST_PLUGIN_API(api);
|
||||
|
||||
/* if you are using a global api pointer, don't forget to copy it!
|
||||
otherwise you will get lovely "I04: IllInstr" errors... :-) */
|
||||
rb = api;
|
||||
|
||||
rb->lcd_setfont(0);
|
||||
|
||||
|
||||
if (!parameter) {
|
||||
rb->splash(HZ*3, true, "Play gameboy ROM file! (.gb/.gbc)");
|
||||
return PLUGIN_OK;
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue