Rockbox

  • Status Closed
  • Percent Complete
    100%
  • Task Type Patches
  • Category User Interface
  • Assigned To No-one
  • Operating System All players
  • Severity Low
  • Priority Very Low
  • Reported Version Daily build (which?)
  • Due in Version Undecided
  • Due Date Undecided
  • Votes
  • Private
Attached to Project: Rockbox
Opened by GRaTT - 2007-08-05
Last edited by jdgordon - 2008-01-14

FS#7538 - Custom user splash screen.

This 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

Closed by  jdgordon
2008-01-14 00:04
Reason for closing:  Rejected
Additional comments about closing:  

No solution without a negative impact

2008-04-16: A request to reopen the task has been made. Reason for request: its still in sync from my end with svn, its a neat patch, please re-open
GRaTT commented on 2007-08-05 07:05

After some discussion on irc this was deemed ok for committing if it works.
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

GRaTT commented on 2007-08-06 01:48

I have managed to get this working but after the RB logo displays.
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

add the splash timeout to the standard confing file and global_setting (and settings_list.c) byt the time you want to dispolay the splash that file should have been parsed already.
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.

GRaTT commented on 2007-08-06 04:35

Made the above changes to the code,
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

GRaTT commented on 2007-08-06 04:54

It did not like when I removed the static it hung before
the RB logo.
This patch just moves the expected splash.bmp location to /.rockbox.
GRaTT

GRaTT commented on 2007-08-06 07:04

This update replaces the RB splash screen if you have a
/.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

the reason it hung removing the static is probably because you used too much stack space… so leave it in… the sizeof(fb_data) part of that line isnt needed (im now 99% sure of it :p ).
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).

GRaTT commented on 2007-08-06 16:58

To speed up the display slightly I removed the splash.cfg file
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

settings_list.c, you want to copy and INT_SETTING, and a FILENAME_SETTING

after a quick review….
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)

GRaTT commented on 2007-08-07 08:27

I could not get this to work in show_logo(), the file read
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

Fixed issue with patch not applying (I think)

GRaTT commented on 2007-08-08 06:11

just in case
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

yes, there should be no extra delay if the user doesnt want to set a custom image

GRaTT commented on 2007-08-08 15:01

The time delay is very small, less than 1 sec.
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

GRaTT commented on 2007-08-08 20:42

Working with no noticeable delay for non custom splash users.
“Configure Splash Screen” menu under “Display menu” all show_splash() code in misc.c
Can this get committed now.
GRaTT

I modified the patch so that if the custom splash was smaller
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

Slight bug that caused malformed patch. Fixed.

GRaTT commented on 2007-08-18 17:43

There is now NO DELAY, NONE, NADA, ZERO for non custom splash users
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

GRaTT commented on 2007-08-19 01:51

On IRC there are concerns of the static array
used for the image buffer.
“on the 320×240 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

GRaTT commented on 2007-08-19 08:24

use /.rockbox/splash.bmp
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

GRaTT commented on 2007-08-19 19:14

Code clean up and added some code from the backdrop display,
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

GRaTT commented on 2007-08-22 00:31

A whole new approach with a plugin.
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

GRaTT commented on 2007-08-22 01:09

I need feedback fro disk and flashed DAP owners.
Is there a speed on boot issue??
The last patch is slower in general but
V7.1 is fast.
GRaTT

The concept of configurable splash screens was discussed in IRC on 20 August, starting at around 10.11am.

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!

GRaTT commented on 2007-08-22 23:43

One last patch for anybody interested.
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

this is an amazing patch, thanks!
pity that you still see the solid (rockbox default) color screen right before it though. at least a black screen would be nice.

GRaTT commented on 2007-08-23 16:34

Are you saying you still see the RB logo?? You should not after version V3.
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

not the logo itself, just the solid color screen which is the same color (official rockbox color) as these forums (it comes right after the initial loading bar screen on gigabeat for example).

GRaTT commented on 2007-08-24 03:09

I have had a bug for a while now even with clean svn build,
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

all seems great with the latest version!

GRaTT commented on 2007-08-30 20:48

Here is a faster version of V7.1, NO DELAY on sansa, using the context menu.
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 commented on 2007-08-31 00:36

Fixed bug where splash would not show from backdrops dir.
GRaTT

Anonymous Submitter commented on 2007-08-31 22:12

This patch has a conflict with the cmp_resize patch in apps/misc.c (read_bmp_file)…

Anonymous Submitter commented on 2007-08-31 22:16

i meant bmp_resize

GRaTT commented on 2007-09-01 14:42

Yes it does conflict with bmp_resize. I have added the
the required lines, commented out in the patch.
Edit the patch to compile with bmp_resize.
GRaTT

using the latest version, everything works just fine (.bmp file is in the backdrops folder). however, if i go into plugins/applications/splash i get “error reading bitmap”.

GRaTT commented on 2007-09-09 04:29

@perldiver
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

Is it possible to randomly display one of several splashs of my choosing?

GRaTT commented on 2007-10-10 05:44

This could be done by scanning the backdrops directory
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

GRaTT commented on 2007-10-17 14:23

Updated for new Theme Setting Menu.
Configure Splash Screen setting now under
Theme Setting.
Gratt

Nice patch, everything is working as advertised for me.

hey thanks guys works perfect on my h10 [20GB]

you can also download this image for your splash screens just resize this to you screen size & save as bmp, credits go to jblog – pijulius

http://solutions-i.org/julius/images/rbss.jpg

Love this patch. Working fine on my Sansa e200.

The backlight is off while displaying the custom splash screen for the first few seconds then the backlight turns on right before going to the Start Screen on my 30gig 5G iPod Video. I’ve tried changing the settings of both the custom splash by choosing different lengths of time to display as well as the LCD settings but nothing changes this behavior.

Sorry for the double-post, forgot to say that I’m using tdtooke’s Underground custom build based on r15627.

The current build r15833 will no longer compile with this patch…onplay.c declares an undefined instruction “splash”

I hope work continues on this patch so it compiles with current builds, it’s awesome!

Sorry my mistake. It’s the english lang file which stops compilation of the source.

synced to rev 15872 , there was a hunk failed at english.lang which is fixed now enjoy c ya

GRaTT commented on 2007-12-09 22:10

Updated to current SVN for changes in list setting code Dec 06 2007.
GRaTT

Seems this may be broken in 16027

Getting errors in lang.h
Around line 600 about the definition of LANG_SET_AS_SPLASH

GRaTT commented on 2008-01-13 18:00

updated for revision 16078 Jan 13
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

Loading...

Available keyboard shortcuts

Tasklist

Task Details

Task Editing