plugins: changes for targets with small plugin buffer (Clipv1)

- only enable overlays for targets with very small plugin buffer (<=
  0x10000 bytes, i.e. archos)
- change the condition for rockboy to reflect exactly why it can be
  built or not
- Some plugins need a large plugin buffer, only enable them if the
  buffer is big enough (sizes measured on Clipv1)
- disable MIDI if we have 2MB (or less), we won't be able to load the
  instruments in the audio buffer
- remove unusable lua overlay loader
- sokoban code is bigger on clipv1 than on SH, assume it code is 20kB on
  anything but SH so it builds with buffer smaller than 192kB
- reduce the Clipv1 plugin buffer size from 288kB to 96kb, disabling
  zxbox, chessbox, and fft

zxbox and chessbox have overlays which run on archos, we just need to
enable them on other targets. We'll also be able to run rockboy.

fft won't run as it needs a large plugin buffer for greylib

git-svn-id: svn://svn.rockbox.org/rockbox/trunk@26141 a1c6a512-1295-4272-9138-f99709370657
This commit is contained in:
Rafaël Carré 2010-05-18 12:46:53 +00:00
parent dcbd8d74c6
commit a01422c54b
6 changed files with 44 additions and 58 deletions

View file

@ -58,10 +58,19 @@ PLUGIN_HEADER
#define COLS (LCD_WIDTH/SOKOBAN_TILESIZE)
#endif
/* Use either all but 16k of the plugin buffer for level data
/* size of code+bss */
#if CONFIG_CPU == SH7034
#define CODE_SIZE 0x3000 /* 12k */
#else
#define CODE_SIZE 0x5000 /* 20k */
#endif
#define CODE_AND_UNDO_SIZE (CODE_SIZE+0x1000) /* + 4k */
/* Use either all but code & undo of the plugin buffer for level data
* or 128k, which ever is less */
#if PLUGIN_BUFFER_SIZE - 0x4000 < 0x20000
#define MAX_LEVEL_DATA (PLUGIN_BUFFER_SIZE - 0x4000)
#if PLUGIN_BUFFER_SIZE - CODE_AND_UNDO_SIZE < 0x20000
#define MAX_LEVEL_DATA (PLUGIN_BUFFER_SIZE - CODE_AND_UNDO_SIZE)
#else
#define MAX_LEVEL_DATA 0x20000
#endif
@ -69,11 +78,11 @@ PLUGIN_HEADER
/* Number of levels for which to allocate buffer indexes */
#define MAX_LEVELS MAX_LEVEL_DATA/70
/* Use 4k plus remaining plugin buffer (-12k for prog) for undo, up to 64k */
#if PLUGIN_BUFFER_SIZE - MAX_LEVEL_DATA - 0x3000 > 0x10000
/* Use remaining plugin buffer (- code prog) for undo, up to 64k */
#if PLUGIN_BUFFER_SIZE - MAX_LEVEL_DATA - CODE_SIZE > 0x10000
#define MAX_UNDOS 0x10000
#else
#define MAX_UNDOS (PLUGIN_BUFFER_SIZE - MAX_LEVEL_DATA - 0x3000)
#define MAX_UNDOS (PLUGIN_BUFFER_SIZE - MAX_LEVEL_DATA - CODE_SIZE)
#endif
/* Move/push definitions for undo */