Rockbox

Tasklist

FS#11027 - Support for "Pebbles", small visualisation plugins that get loaded into the skin buffer

Attached to Project: Rockbox
Opened by Frank Gevaerts (fg) - Tuesday, 16 February 2010, 20:51 GMT
Last edited by Frank Gevaerts (fg) - Sunday, 31 July 2011, 12:39 GMT
Task Type Patches
Category Plugins
Status Closed
Assigned To No-one
Operating System All players
Severity Low
Priority Normal
Reported Version Daily build (which?)
Due in Version Undecided
Due Date Undecided
Percent Complete 100%
Votes 0
Private No

Details

Preliminary patch to explore the concept of plugins that consist of a single function ("pebbles", small rocks) to avoid the need for relocation.

These plugins are loaded into the skin buffer, and are called during WPS redraw. Add a %P token to the wps to try the included test_pebble

Still to do:
- actually parse the token to allow specifying the pebble to load
- call the pebble for init/exit
- implement bookkeeping and clearing of the pebble table on wps reload
- work out how the pebble-allocated memory should work
- test on non-ARM
- check the plugin API version on load
- allocate the correct buffer size
This task depends upon

Closed by  Frank Gevaerts (fg)
Sunday, 31 July 2011, 12:39 GMT
Reason for closing:  Rejected
Additional comments about closing:  Not a viable way of doing this
Comment by Frank Gevaerts (fg) - Tuesday, 16 February 2010, 21:07 GMT
to actually build the pebbles, you need to add "export ENABLEDPEBBLES=yes" to the Makefile
Comment by Frank Gevaerts (fg) - Tuesday, 16 February 2010, 21:17 GMT
New patch. This one builds for all four CPU types and fixes the ENABLEDPEBBLES bit
Comment by Maurus Cuelenaere (mcuelenaere) - Tuesday, 16 February 2010, 21:52 GMT
Confirmed working on MIPS-based players (Onda VX747).
Comment by Jonathan Gordon (jdgordon) - Tuesday, 16 February 2010, 23:17 GMT
WOO!

some random thoughts:
the/a pebble api needs to give the pebble some internal function pointers. get_*_token_value() and just get_token() so it can easily get the value from any other token
likewise it should be able to act like a simple token so it can just return the string to display
also access to the skin_buffer_alloc() function, and the entry point should be called for the parse line and updates
it should keep track of the update requirements for the token (WPS_REFRESH_DYNAMIC|STATIC|etc)

Also, it would be good to be able to reuse the same pebble more than once, either between skins, or even in the same skin (look at skin fonts and backdrops)
Comment by Frank Gevaerts (fg) - Wednesday, 17 February 2010, 00:07 GMT
Some more progress. This one can handle const data on ARM (I haven't tried the others). Still only one function though.

The included test pebble is a bit more interesting now, and pebbles are built unconditionally, so there are no more changes needed to configure

Re-using a pebble shouldn't be too hard, and adding a pebble_api is easy.
Comment by Frank Gevaerts (fg) - Wednesday, 17 February 2010, 22:25 GMT
This one gets slightly closer to the standard plugins in the way things are organised. Multiple functions work (most of the time anyway), and the pebbles get a viewport.
Use with %P|name_of_pebble| (e.g. "%P|test_pebble|"), the pebble will get the entire enclosing viewport.

I've added a starfield pebble, but that one doesn't work properly. It suffers from illegal instructions, data aborts and the like. Help in figuring out why is welcome.
Comment by Frank Gevaerts (fg) - Sunday, 21 February 2010, 17:56 GMT
This one actually works on arm. Thanks to TheSeven for spotting the obvious bug.

It doesn't work on coldfire right now. Investigating.
Comment by Frank Gevaerts (fg) - Sunday, 21 February 2010, 17:59 GMT
When testing, revert the changes to apps/gui/skin_engine/skin_buffer.c . Those shouldn't be there
Comment by Frank Gevaerts (fg) - Sunday, 21 February 2010, 20:04 GMT
This version reintroduces the global rb pointer. If we can get this to work for all CPUs, the next question will be if we should keep this separate from regular plugins.

The wps I use for testing is:

%wd
%V|10|10|73|73|1|ffffff|000000|
%P|test_pebble|
%V|93|10|73|73|1|ff0000|00ff00|
%P|test_pebble|
%V|10|103|156|107|1|ffffff|000000|
%P|starfield|
Comment by Frank Gevaerts (fg) - Monday, 22 February 2010, 22:10 GMT
Changes since v6:
- partly works on m68k (test_pebble works for me, starfield does not). Linker scripts and compilers are evil!
- passes the viewport using a global (similar to rb) named pebble_vp
- calls lcd_set_viewport before calling the pebble paint function to ensure that the correct viewport is active
Comment by Frank Gevaerts (fg) - Monday, 22 February 2010, 22:24 GMT
This one also compiles on non-colour-lcd, so it can be tested on Archos.

Testers on SH and MIPS are welcome, as well as people who can fix the m68k issues
Comment by Frank Gevaerts (fg) - Wednesday, 24 February 2010, 20:25 GMT
OK, this approach won't get anywhere. As soon as you have a compile-time initialised pointer, it breaks. We'll need a full relocator

Loading...