Tasklist
FS#9770 - provide a loader-initialized global struct plugin_api
| Task Type |
Patches |
| Category |
Plugins |
| Status |
Closed |
| Assigned To |
No-one |
| Player Type |
All players |
| Severity |
Low |
| Priority |
Normal |
| Reported Version |
Version 3.1 |
| Due in Version |
Undecided |
| Due Date |
Undecided |
| Percent Complete |
|
| Private |
No
|
|
Details
This patch provides a global struct plugin_api *rb which is initialized by the loader. This is done by adding a declaration for rb to the PLUGIN_HEADER macro, and a pointer to rb to the plugin header structure, so that the loader can initialize rb before starting the plugin. All (I think) pluginlib functions and plugins are modified to use this global plugin API, including the overlay loader. I have not tested plugins exhaustively, but I have clean firmware buidls for recorderv2 and e200, with all plugins that I tried working on e200, and also a clean build with working plugins for ipod video sim.
plugin_global_api.patch
(221.9 KiB)
b/apps/plugin.c | 3
b/apps/plugin.h | 12 +-
b/apps/plugins/alpine_cdc.c | 8 -
b/apps/plugins/battery_bench.c | 4
b/apps/plugins/beatbox/beatbox.c | 8 -
b/apps/plugins/blackjack.c | 6 -
b/apps/plugins/bounce.c | 6 -
b/apps/plugins/brickmania.c | 10 -
b/apps/plugins/bubbles.c | 13 --
b/apps/plugins/calculator.c | 4
b/apps/plugins/calendar.c | 6 -
b/apps/plugins/chessbox.c | 4
b/apps/plugins/chessbox/chessbox.c | 29 ++---
b/apps/plugins/chessbox/chessbox_pgn.c | 29 +----
b/apps/plugins/chessbox/chessbox_pgn.h | 16 +-
b/apps/plugins/chessbox/gnuchess.c | 3
b/apps/plugins/chessbox/gnuchess.h | 3
b/apps/plugins/chessclock.c | 7 -
b/apps/plugins/chip8.c | 6 -
b/apps/plugins/chopper.c | 11 -
b/apps/plugins/clock/clock.c | 8 -
b/apps/plugins/clock/clock.h | 1
b/apps/plugins/credits.c | 9 -
b/apps/plugins/cube.c | 13 --
b/apps/plugins/demystify.c | 15 +-
b/apps/plugins/dice.c | 7 -
b/apps/plugins/dict.c | 5
b/apps/plugins/disktidy.c | 4
b/apps/plugins/doom/i_video.c | 2
b/apps/plugins/doom/rockdoom.c | 18 +--
b/apps/plugins/doom/rockmacros.h | 1
b/apps/plugins/euroconverter.c | 10 -
b/apps/plugins/fire.c | 13 --
b/apps/plugins/fireworks.c | 12 --
b/apps/plugins/firmware_flash.c | 6 -
b/apps/plugins/flipit.c | 4
b/apps/plugins/greyscale.c | 10 -
b/apps/plugins/helloworld.c | 11 -
b/apps/plugins/invadrox.c | 11 -
b/apps/plugins/iriver_flash.c | 6 -
b/apps/plugins/iriverify.c | 6 -
b/apps/plugins/jackpot.c | 7 -
b/apps/plugins/jewels.c | 8 -
b/apps/plugins/jpeg/jpeg.c | 21 +--
b/apps/plugins/jpeg/jpeg_decoder.c | 2
b/apps/plugins/jpeg/yuv2rgb.c | 3
b/apps/plugins/keybox.c | 7 -
b/apps/plugins/lamp.c | 13 --
b/apps/plugins/lib/bmp.c | 10 -
b/apps/plugins/lib/bmp.h | 5
b/apps/plugins/lib/checkbox.c | 14 +-
b/apps/plugins/lib/checkbox.h | 2
b/apps/plugins/lib/configfile.c | 79 ++++++-------
b/apps/plugins/lib/configfile.h | 2
b/apps/plugins/lib/grey.h | 3
b/apps/plugins/lib/grey_core.c | 68 +++++------
b/apps/plugins/lib/grey_draw.c | 22 +--
b/apps/plugins/lib/grey_parm.c | 4
b/apps/plugins/lib/grey_scroll.c | 40 +++---
b/apps/plugins/lib/helper.c | 17 +-
b/apps/plugins/lib/helper.h | 17 +-
b/apps/plugins/lib/highscore.c | 7 -
b/apps/plugins/lib/highscore.h | 1
b/apps/plugins/lib/md5.c | 7 -
b/apps/plugins/lib/md5.h | 2
b/apps/plugins/lib/oldmenuapi.c | 5
b/apps/plugins/lib/oldmenuapi.h | 2
b/apps/plugins/lib/overlay.c | 5
b/apps/plugins/lib/overlay.h | 2
b/apps/plugins/lib/playback_control.c | 51 ++++----
b/apps/plugins/lib/playback_control.h | 6 -
b/apps/plugins/lib/playergfx.c | 18 +--
b/apps/plugins/lib/playergfx.h | 2
b/apps/plugins/lib/pluginlib_actions.c | 4
b/apps/plugins/lib/pluginlib_actions.h | 2
b/apps/plugins/lib/profile_plugin.c | 13 --
b/apps/plugins/lib/profile_plugin.h | 2
b/apps/plugins/lib/resize.c | 7 -
a/apps/plugins/lib/resize.h | 31 -----
b/apps/plugins/lib/xlcd.h | 4
b/apps/plugins/lib/xlcd_core.c | 12 --
b/apps/plugins/lib/xlcd_draw.c | 6 -
b/apps/plugins/lib/xlcd_scroll.c | 132 +++++++++++------------
b/apps/plugins/logo.c | 5
b/apps/plugins/mandelbrot.c | 9 -
b/apps/plugins/matrix.c | 6 -
b/apps/plugins/maze.c | 12 --
b/apps/plugins/mazezam.c | 17 --
b/apps/plugins/md5sum.c | 8 -
b/apps/plugins/metronome.c | 9 -
b/apps/plugins/midi/guspat.c | 2
b/apps/plugins/midi/midifile.c | 2
b/apps/plugins/midi/midiplay.c | 6 -
b/apps/plugins/midi/midiutil.c | 2
b/apps/plugins/midi/sequencer.c | 1
b/apps/plugins/midi/synth.c | 2
b/apps/plugins/minesweeper.c | 9 -
b/apps/plugins/mosaique.c | 5
b/apps/plugins/mp3_encoder.c | 7 -
b/apps/plugins/mpegplayer/decode.c | 2
b/apps/plugins/mpegplayer/header.c | 2
b/apps/plugins/mpegplayer/mpeg_settings.c | 14 +-
b/apps/plugins/mpegplayer/mpegplayer.c | 16 +-
b/apps/plugins/mpegplayer/mpegplayer.h | 3
b/apps/plugins/mpegplayer/stream_mgr.c | 2
b/apps/plugins/nim.c | 8 -
b/apps/plugins/oscilloscope.c | 12 --
b/apps/plugins/pacbox/arcade.c | 2
b/apps/plugins/pacbox/hardware.c | 2
b/apps/plugins/pacbox/pacbox.c | 11 -
b/apps/plugins/pegbox.c | 5
b/apps/plugins/pictureflow.c | 14 --
b/apps/plugins/plasma.c | 10 -
b/apps/plugins/pong.c | 6 -
b/apps/plugins/ppmviewer.c | 6 -
b/apps/plugins/properties.c | 5
b/apps/plugins/random_folder_advance_config.c | 10 -
b/apps/plugins/reversi/reversi-game.h | 2
b/apps/plugins/reversi/reversi-gui.c | 14 --
b/apps/plugins/reversi/reversi-strategy-naive.c | 2
b/apps/plugins/reversi/reversi-strategy-simple.c | 7 -
b/apps/plugins/robotfindskitten.c | 10 -
b/apps/plugins/rockblox.c | 17 +-
b/apps/plugins/rockblox1d.c | 5
b/apps/plugins/rockbox_flash.c | 6 -
b/apps/plugins/rockboy.c | 4
b/apps/plugins/rockboy/menu.c | 6 -
b/apps/plugins/rockboy/rockboy.c | 12 --
b/apps/plugins/rockboy/rockmacros.h | 1
b/apps/plugins/rocklife.c | 12 --
b/apps/plugins/rockpaint.c | 9 -
b/apps/plugins/search.c | 6 -
b/apps/plugins/searchengine/searchengine.c | 6 -
b/apps/plugins/searchengine/searchengine.h | 2
b/apps/plugins/settings_dumper.c | 4
b/apps/plugins/shortcuts/shortcuts.h | 2
b/apps/plugins/shortcuts/shortcuts_append.c | 3
b/apps/plugins/shortcuts/shortcuts_view.c | 3
b/apps/plugins/sliding_puzzle.c | 6 -
b/apps/plugins/snake.c | 4
b/apps/plugins/snake2.c | 4
b/apps/plugins/snow.c | 6 -
b/apps/plugins/sokoban.c | 6 -
b/apps/plugins/solitaire.c | 9 -
b/apps/plugins/sort.c | 6 -
b/apps/plugins/spacerocks.c | 8 -
b/apps/plugins/splitedit.c | 6 -
b/apps/plugins/star.c | 5
b/apps/plugins/starfield.c | 11 -
b/apps/plugins/stats.c | 4
b/apps/plugins/stopwatch.c | 5
b/apps/plugins/sudoku/generator.c | 2
b/apps/plugins/sudoku/sudoku.c | 19 ---
b/apps/plugins/superdom.c | 5
b/apps/plugins/test_codec.c | 6 -
b/apps/plugins/test_disk.c | 10 -
b/apps/plugins/test_fps.c | 13 --
b/apps/plugins/test_grey.c | 10 -
b/apps/plugins/test_greylib_bitmap_scale.c | 13 --
b/apps/plugins/test_resize.c | 7 -
b/apps/plugins/test_sampr.c | 12 --
b/apps/plugins/test_scanrate.c | 4
b/apps/plugins/test_touchscreen.c | 5
b/apps/plugins/test_viewports.c | 10 -
b/apps/plugins/text_editor.c | 9 -
b/apps/plugins/vbrfix.c | 5
b/apps/plugins/video.c | 9 -
b/apps/plugins/viewer.c | 10 -
b/apps/plugins/vu_meter.c | 5
b/apps/plugins/wav2wv.c | 15 --
b/apps/plugins/wavplay.c | 6 -
b/apps/plugins/wavrecord.c | 8 -
b/apps/plugins/wavview.c | 5
b/apps/plugins/wormlet.c | 11 -
b/apps/plugins/xobox.c | 9 -
b/apps/plugins/zxbox.c | 4
b/apps/plugins/zxbox/spmain.c | 9 -
b/apps/plugins/zxbox/zxbox.c | 11 -
b/apps/plugins/zxbox/zxconfig.h | 1
179 files changed, 553 insertions(+), 1150 deletions(-)
|
Closed by
Andrew Mahone (Unhelpful)
Saturday, 17 January 2009, 01:39 GMT+2
Reason for closing: Accepted
Additional comments about closing: Committed as r19776
Loading...
This potentially affects all plugins using IRAM on targets where iram usage is enabled for plugins.
I've added an updated patch that puts 'rb' into the data section.
pros:
saves 4B on target - not a big deal
this is what i thought "should" be done in the first place
cons:
slightly larger difference in target vs sim than before
EDIT: removed deleted file apps/plugins/lib/resize.h from patch