This is the bug/patch tracker for Rockbox. Click here for more information.
Quick links: Bugs · Patches · Rockbox frontpage
FS#7538 - Custom user splash screen.
Attached to Project:
Rockbox
Opened by Gerritt Gonzales (GRaTT) - Sunday, 05 August 2007, 06:00 GMT+2
Last edited by Jonathan Gordon (jdgordon) - Monday, 14 January 2008, 01:04 GMT+2
Opened by Gerritt Gonzales (GRaTT) - Sunday, 05 August 2007, 06:00 GMT+2
Last edited by Jonathan Gordon (jdgordon) - Monday, 14 January 2008, 01:04 GMT+2
|
DetailsThis works on the sansa simulator but not on target.
It does not hinder the target at all in it present state. When I removed the checks it tries to load the bmp and the screen looks a little strange then goes straight to the user start screen. It is supposed to load a user bmp from /splash.bmp of the DAP dimensions(l*W), like the custom backdrops. Suggestions and help are welcome. GRaTT |
This task depends upon
Closed by Jonathan Gordon (jdgordon)
Monday, 14 January 2008, 01:04 GMT+2
Reason for closing: Rejected
Additional comments about closing: No solution without a negative impact
Monday, 14 January 2008, 01:04 GMT+2
Reason for closing: Rejected
Additional comments about closing: No solution without a negative impact
Unfortunately the location of the function show_logo may be to early to open files.
This as well as various other version work in sims and in the plugins
but on target the read continues to fail.
This however is a good code snipit for reading and displaying a bmp file from disk.
The initialization of the struct fb_data save_buffer[LCD_WIDTH*LCD_HEIGHT*sizeof(fb_data)]
may be wrong but "works" it initializes to big a buffer,
struct fb_data save_buffer[LCD_WIDTH*LCD_HEIGHT] seems to be the proper way,
and work as well(in sim and plugin).
GRaTT
It uses a config file to set the splash time out
and does not slow things down if the config file is not present.
There may be a better place for this code to go, but this works.
There may also be better image display code and buffer sizing but
again this works for now.
User must create a "splash.cgf" text file in /.rockbox.
A single number eg. (5) gives a 5 second splash display.
A bitmap "/splash.bmp" file of mp3 player dimensions must be in the root dir.
Anything that will work as a backdrop will work.
GRaTT
also, splash.bmp should go in /.rockbox and not in /. remove the static infront of the fb_data variable as its not needed ever again once it has been displayed.
except for the config file. I currently use it as a test
and will need to look at how to make the changes you suggest.
GRaTT
the RB logo.
This patch just moves the expected splash.bmp location to /.rockbox.
GRaTT
/.rockbox/splash.cfg file with a number and a ./rockbox/splash.bmp
bitmap such as a backdrop for your player.
There is a slight delay in display and it shows a white screen
for less than 1 second before showing the RB logo or custom splash image.
It only affects LCD_BITMAP targets.
There is still room for improvement.
GRaTT
also, I think the splash filename should be in the config file also (config.cfg... not splash.cfg) because then if no filename is set there is no need to do an extra open() on a file which may not exist (iirc open is the "slow" part of file access).
and hard coded the display time to 3 sec.
I agree the options should be in the config or menu settings
but I do not know how to do that.
If the /.rockbox/splash.bmp file is there and successfully read
it will display it, else it will display the original
RB logo. The RB logo does not display for as long now, this is fixable
only with adding more delay.
I was able to remove the sizeof(fb_data) but not the static.
I also added in the code so the simulator will act the same way.
I think this is as close to the beginning of main.c that will open the bmp file.
Anybody good with menu and setting options??
GRaTT
you should modify the show_logo() function instead of main() to do this. or at least split your code into a seperate functio so it doesnt need to be dupolicated in main().
also, you need to figure out how to get this going on the remote lcd... its exactly the same, except the fb_data type cannot be used (the fb_data type is different when the main screen is colour and the remote isnt.)
what you should do is create a single variable static unsigned char buffer[LCD_WIDTH*LCD_HEIGHT*sizeof(fb_data)]; which on single screen targets will not change anything, and on remote targets you will then be able to read the bmp once, display it on the main lcd, then re-read it into the same buffer and display it on the remote (that buffer will be more than big enough for hte remote screen). DONT try displaying it on the remote lcd unless you re-read it... bmp_read_file() does conversions which will cause all types of wierdness if you try displaying the buffer for the main screen on the remote...
also, consider not closing the fd untill the remote is finished being read, open() is slow, seek() is fast in comparisson (iirc)
failed every time.
This updated patch adds a custom user setting menu
"Configure Splash Screen" to the Display menu.
(off,on,2,3,4,5,6,7,8,9) are the options.
When off the delay before the original logo is very small.
I just managed to figure out the menu code and I do not have a remote.
GRaTT
sync to current svn (r14238M-070807) and tested on target.
I removed some of my extra code.
The next patch will move the code to misc.c
Is the small time delay before displaying the original RB logo
an issue.
GRaTT
Due to where the show_logo is run in main.c with
this patch It will have this additional delay compared to
the original. I do not believe I could speed up check before
displaying the RB logo. Is checking a bool faster than checking an int
or the other way around??
I do not want to attempt moving function calls around in main to get
this portion to come earlier.
I do not have 2 targets to test side by side to see if this delay is
"perceived" or real.
Will this be committable to svn or will this very small time delay be to much??
GRaTT
"Configure Splash Screen" menu under "Display menu"
all show_splash() code in misc.c
Can this get committed now.
GRaTT
than the LCD screen size than it would center the splash. That
is all that I think is left to do with this patch and I hope that
this will be committed in the next few days. -Keith
and the custom splash is a little faster.
I split up my added code in main.c to do this.
Future TODO: support for any name.bmp file
selectable from context menu like the backdrop.
Can This be committed now?
GRaTT
used for the image buffer.
"on the 320x240 colour targets, this is 150KB (not insignifant)"
The line of code is:
static fb_data save_buffer2[LCD_WIDTH*LCD_HEIGHT];
This array is used to store the image data. I have tried without static
it will not display. Any ideas, anybody, to try and get this size down.
GRaTT
or
using the context menu select any
bitmap in the /.rockbox/backdrops/
directory to use as your custom splash screen.
You still need to enable/disable it under
settings/General Settings/Display/Configure splash Screen
GRaTT
specific for some LCD_DEPTH targets.
When you select a bitmap to display as a splash from the context menu
it will now show you the splash image. If there is an error it
tries /.rockbox/splash.bmp and then the RB logo.
GRaTT
A new autostart menu item (on, off), under Display to autostart a plugin.
If not enabled there is NO DELAY on startup. If enabled
it bypasses the RB logo and tries to start the plugin named
"/.rockbox/rocks/apps/autostart.rock". In this case to display a bitmap
"/.rockbox/splash" by default. If this autostart.rock plugin is called with a bitmap with the
"Open With" menu it writes a conf file in "/.rockbox/rocks/apps/splash.conf"
This file will be used if the default splash.bmp is not present in "/.rockbox", allowing for a
user configurable splash screen without file renaming.
Can it be committed this way??
GRaTT
Is there a speed on boot issue??
The last patch is slower in general but
V7.1 is fast.
GRaTT
The general view seems to be that:
a) the purpose of the splash is to display something whilst Rockbox is initialising, and
b) a custom splash by definition can't be displayed until after the majority of this initialisation is done, by which time there is no point in displaying it.
So the conclusion seemed to be that we should make it easier for users to compile their own builds with a custom splash (i.e. change the show_logo() code to better adapt to different sized bitmaps, so users don't have to modify any C code to change the splash .bmp), and add "run-time configurable splash screen" to the "NODO" list - i.e. no patch that implements it will be accepted.
Hopefully I've interpreted the views of other devs correctly - if not, please speak up!
No NOTICEABLE delay on sansa,
the show_logo() is called later but before the tag_cache get initialized.
This means no added delay unless you want a custom splash, the RB logo gets
displayed as before just a little later and ends the same time.
The only added delay is to check a variable(not human noticeable, imho).
and stuff is still happening to "require" a splash if desired.
This only adds a menu option under Display "Configure Splash Screen"
to config the splash screen (off, on, 1-9) and the
show_splash() function in misc.c
(this could even be removed and the splash plugin called instead) slower only to custom splash users.
and two variables, one int splash_timeout and one (char*)splash_file.
The plugin does all the configuration for specific file display, use open with to
display the bitmap and create a splash.cfg file. Run the cfg file that is now highlighted
to load the settings. Use any bitmap(of screen size) anywhere on the DAP. Run the splash plugin
to see what bitmap will be displayed.
Is it required? No
Does it harm? No
Does it look pretty? yes
It allows users more config without compiling which is not user friendly.
Sorry for the rant.
GRaTT
pity that you still see the solid (rockbox default) color screen right before it though. at least a black screen would be nice.
On Sansa I see the boot messages and then the splash no noticeable delay.
A little more work and I could find the clear screen that is called before
the splash and speed it up a little more. The RB logo still ends the same time.
By default the last patch will look for /splash.bmp first if the splash is enabled
for speed before checking the configured screen.
The RB logo is displayed by default. No NOTICEABLE DELAY on sansa.
GRaTT
where I do not see this screen. I get a couple (2-5) lines at
the top of the screen all garbled, then the RB logo or custom
splash screen.
When the splash screen was loading slower, previous patches
there was a quick splash of light blue screen, I do not get that now.
Do you still see this blue screen with the RB logo, using the latest patch
or just with the custom splash screen??
GRaTT
Updates: Speed of dispay from V7.1 for RB logo and custom splash.
The "set as splash screen" context menu will only display itself
if you have the custom splash enabled.
Splash (anyname.bmp) bitmaps must still be in the backdrops directory.
It will also try /splash.bmp if enabled and an image is not set.
I am trying to either:
1. only show context menu if in backdrops directory. (feedback: good dir for splash files?)
2. enable the anyname.bmp to be anywhere, but I have been unable to get #2 correctly.
With the plugin for settings the anyname.bmp could be anywhere but the two are not compatible.
Unless I could read/write splash_timeout and splash_file from the splash plugin so far unable to do that.
any Ideas/Info welcome.
GRaTT
GRaTT
the required lines, commented out in the patch.
Edit the patch to compile with bmp_resize.
GRaTT
The splash plugin only works with the autorock.diff version.
The autorock.diff version could also be optimized to display a little faster than the posted version.
The autorock plugin version is the only one that will allow the .bmp file to be anywhere.
Version 7.1... series
Configure the splash using the "Configure splash Screen" from the display menu,
when ON (or 2-9), the context menu "set as Splash Screen" will show for .bmp files.
When OFF no context menu will show to set splash screen.
.bmp files must be in the backdrops dir to display
(I was unable to get the plugin to read rb->global_setting.splash_file,
and unable to use a random dir for setting from the context menu).
It will try /splash.bmp if there is
an error opening the set file and then the RB logo as a last resort.
GRaTT
and then choosing a random .bmp file instead of a set file.
It could be another option, I like the idea.
Since this will never be committed another menu option should not matter.
Check back I will implement this when I get time.
GRaTT
Configure Splash Screen setting now under
Theme Setting.
Gratt
http://solutions-i.org/julius/images/rbss.jpg
GRaTT
Getting errors in lang.h
Around line 600 about the definition of LANG_SET_AS_SPLASH
This will probably be closed soon as the Devs have no intent on
adding it to SVN.
Testing on the sansa I can not tell the difference between having this patch
compiled in and set to OFF and not having this patch when timing start up times.
If people are interested maybe anythingbutipod will host closed rockbox patches
that people still use and want.
GRaTT