Rockbox Technical Forums

Support and General Use => Theming and Appearance Customization => Topic started by: disorder on November 17, 2007, 04:52:17 AM

Title: wps not correctly showing on sansa e250r
Post by: disorder on November 17, 2007, 04:52:17 AM
I just got rockbox up and running no problem but now I am trying to install the "acotil" series themes and wps screens. the themes work fine, the wps screens however are not what they should be. they simply are the backdrop from the theme with very simple text displaying song info. it's as if the stock wps screen is there and the only things that changed were the font color and backdrop.

what could i be doing wrong?
Title: Re: wps not correctly showing on sansa e250r
Post by: NicolasP on November 17, 2007, 06:02:05 AM
Your themes contain errors. Most probably, you're trying to use themes that use unsupported patches on an official build. You need to correct these themes or find corrected versions.
Title: Re: wps not correctly showing on sansa e250r
Post by: ONE_HUMAN on November 19, 2007, 09:32:45 PM
I developed the Acotil theme.  It actually worked fine until some changes were made to the latest Rockbox builds.  My theme wasn't designed to be used with unsupported patches, and it was working with official builds... until recently, when how the %s and %m tags were used was changed.  I guess I'll have to rework my code.

I suspect the following lines in the .wps file are the problem:

%s%ac%?ia<%ia|Artist Unknown>
%s%ac%?it<%it|Title Unknown>


%s%acNext: %?It<%It|%?Fn<%Fn|?>>


I suppose that is now considered improper use of the %s tag, but I don't see why.  And I don't have any instances of the %m tag.

Or maybe it's the code for the progress bar:

%pb|height|0|176|184|

Have I improperly declared the margin?

By the way, if I make changes to the code to work with the newest builds of Rockbox, does that mean it will still work with older versions?  Or is it an either/or kinda thing?
Title: Re: wps not correctly showing on sansa e250r
Post by: Llorean on November 19, 2007, 09:40:06 PM
Old WPSes that were compatible with SVN Rockbox _shouldn't_ have been broken by any of the recent changes, with a few exceptions. I believe the parser was made slightly stricter again, and I think the problem is that your pb seems kinda odd. It shouldn't have the word "height" in it, it should have the number of pixels of height the progress bar takes up. It may be that that's what's causing the problem. Which would qualify as a bug that your WPS had before, it just didn't get rejected for it at the time. Whatever problem you're having it's probably a bug your WPS had previously.

That being said, sometimes a change will be significant enough that you end up with an either/or situation (this one shouldn't be, strictly within the domain of unpatched SVN builds so long as you don't add a new tag that wasn't supported in older builds). But we try very hard not to break compatibility unless it's deemed very, very necessary (or with the recent %s -> %s with margins -> separate %s and %m where the change was in SVN for a very, very short time, then changed to something better almost immediately).
Title: Re: wps not correctly showing on sansa e250r
Post by: ONE_HUMAN on November 19, 2007, 09:57:33 PM
Unfortunately I can't test this with Rockbox simulator rockboxui.exe because the latest version for the Sansa e200 is Nov. 13/07, while all other models are dated the 15th.  When I try to run the latest Rockbox firmware with the simulator, it generates errors and won't run correctly.  I guess I'll have to do it on the actual player.

I had a feeling it might be the code for my progress bar.  Hopefully replacing the word "height" with the number of pixels is enough to fix it.  Thanks.
Title: Re: wps not correctly showing on sansa e250r
Post by: Llorean on November 19, 2007, 10:02:26 PM
You don't install a build to the simulator. You simply compile the simulator, it is the build. I'm not sure what you mean about the latest simulator being from a different date, we don't provide any here at the site, and the code is the very same code used for the on-player Rockbox so if you build one from SVN sources it's up to date.

That being said, just pick a player with a larger screen, remove the backdrop line from your WPS, and you should be able to test if it works OK. Of course, it won't fill the whole screen, but as long as the width and height of the new screen is larger than the one you're designing for and you remove the backdrop, it should work *ok* at least for verifying that it doesn't simply reject it.
Title: Re: wps not correctly showing on sansa e250r
Post by: ONE_HUMAN on November 19, 2007, 10:15:53 PM
Go to this page and you'll see what I mean: http://rasher.dk/rockbox/simulator/

Notice the date for the Sansa e200.  It's November 13th, meaning it isn't the latest build.  Therefore it's not exhibiting the problems that people are experiencing with the latest builds and some themes.

I was hoping I could extract the latest Rockbox build to the simulator's .rockbox folder, but like I said, that isn't working for me as it generates an error when I try to resume playback.

I'm not sure if a Nov. 15th build would even make a difference, because I don't know the exact date that these problems cropped up.  I'll have to investigate which build actually has the changes.

So I'll have to test with the latest Rockbox build on my actual Sansa player is what I'm getting at.
Title: Re: wps not correctly showing on sansa e250r
Post by: Llorean on November 19, 2007, 10:21:31 PM
As I said, you should be able to test with any simulator that has a larger screen.

That page isn't an official site, so when you refer to it, you should always mention that it's what you're referring to instead of just saying "the simulators are out of date" and leaving nobody knowing which simulators you mean (there are other locations to get simulators prebuilt, though in many cases those contain patches).

The reason extracting a build to the simulator won't work is that the .exe file that is the simulator has the same code in it that the .mi4 or .ipod or .iriver file has in it for a player. So the .mi4 code is to run on the player's processor, and the .exe runs on your computer. To update to a newer version you have to replace the .exe, your computer can't run ARM code.
Title: Re: wps not correctly showing on sansa e250r
Post by: ONE_HUMAN on November 19, 2007, 10:25:04 PM
I never said that page was an official site.  However, that page is the only precompiled simulator for Windows linked to on this official Rockbox page: http://www.rockbox.org/twiki/bin/view/Main/UiSimulator

Testing with a larger screen won't make a difference if the Nov. 15th build doesn't have the changes that affect some themes.  So I have to figure that out first.
Title: Re: wps not correctly showing on sansa e250r
Post by: Llorean on November 19, 2007, 10:27:31 PM
No, you didn't say it was an official site. You just said the simulator wasn't up to date, you didn't even mention that it came from a site at all, which made it more confusing, since the simulator _can't_ be out of date in SVN.

It'd help you a lot to learn to compile your own simulators. It's not hard to learn, and once you can, it's really, ridiculously easy to do and will make your WPS testing easier since any time things are changed you can have an up to date simulator within a minute or two of the change being made, if you so desire.
Title: Re: wps not correctly showing on sansa e250r
Post by: ONE_HUMAN on November 19, 2007, 10:37:48 PM
As near as I can tell, it was changes committed to the build on November 14th that are responsible for the problems with some themes such as mine.  So perhaps using a simulator for a different model compiled on the 15th like you suggested will let me experiment.  Thanks for the idea.
Title: Re: wps not correctly showing on sansa e250r
Post by: Llorean on November 19, 2007, 10:47:29 PM
If it still doesn't work, and there's no obvious conflicts between the code in your WPS and the code on the CustomWPS wiki page, post a bug report, as I'm sure there are a few people who'd be interested in knowing if parsing is broken somewhere.
Title: Re: wps not correctly showing on sansa e250r
Post by: ONE_HUMAN on November 20, 2007, 12:30:13 AM
I believe I've figured it out.  I was able to test on the Toshiba Gigabeat simulator.  It appears I was missing the closing pipe on a lot of lines, which was parsing okay before, but now with the stricter settings, it wasn't passing.  Here is an example of my old code (some of which was borrowed from other themes):

Code: [Select]
%X|backdrop_blue.bmp|0|0
%P|progbar.bmp|
%xl|a|batt_100.bmp|143|2
%xl|b|batt_075.bmp|143|2
%xl|c|batt_050.bmp|143|2
%xl|d|batt_025.bmp|143|2
%xl|e|batt_000.bmp|143|2
%xl|f|pause.bmp|77|191
%xl|g|vol_00.bmp|3|3
%xl|h|vol_01.bmp|3|3
%xl|i|vol_02.bmp|3|3
%xl|j|vol_03.bmp|3|3
%xl|k|vol_04.bmp|3|3
%xl|l|vol_05.bmp|3|3
%xl|m|vol_06.bmp|3|3
%xl|n|vol_07.bmp|3|3
%xl|o|vol_08.bmp|3|3
%xl|p|vol_09.bmp|3|3
%xl|q|vol_10.bmp|3|3
%xl|r|vol_11.bmp|3|3
%xl|s|vol_12.bmp|3|3
%xl|t|vol_13.bmp|3|3
%xl|u|vol_14.bmp|3|3
%xl|v|vol_15.bmp|3|3
%xl|w|vol_16.bmp|3|3
%xl|x|vol_17.bmp|3|3
%xl|y|vol_18.bmp|3|3
%xl|z|vol_19.bmp|3|3
%xl|A|vol_20.bmp|3|3
%xl|B|rep_song.bmp|116|4
%xl|C|rep_all.bmp|116|4
%xl|D|rep_ab.bmp|116|4
%xl|E|shuff.bmp|89|4
%wd
                   

%al %pv dB %ar %cl:%cM %cp



%s%ac%?ia<%ia|Artist Unknown>
%s%ac%?it<%it|Title Unknown>


%s%acNext: %?It<%It|%?Fn<%Fn|?>>



%t1 %?mp<%al Stopped%ar-:--/-:-- |%al %fbKbps%ar%pc/%pt |%al Paused%ar%pc/%pt |%al Seeking%ar%pc/%pt |%al Seeking%ar%pc/%pt >;%t1 %?mp<%al Stopped-:--/-:-- |%al %fbKbps%ar%pc/%pt |%al Paused|%al Seeking%ar%pc/%pt |%al Seeking%ar%pc/%pt >

%pb|height|0|176|184|



%?bl<%xde|%xdd|%xdc|%xdb|%xda>
%?mm<%xdZ|%xdC|%xdB|%xdC%xdE|%xdD>
%?ps<%xdE>
%?mp<%xdf|%xdZ|%xdf|%xdZ|%xdZ>
%?pv<%xdg|%xdh|%xdi|%xdj|%xdk|%xdl|%xdm|%xdn|%xdo|%xdp|%xdq|%xdr|%xds|%xdt|%xdu|%xdv|%xdw|%xdx|%xdy|%xdz|%xdA>

.....

You'll notice a lot of lines, including the very first one, don't have a closing pipe:

%X|backdrop_blue.bmp|0|0

should be:

%X|backdrop_blue.bmp|0|0|

So here is my revised code:

Code: [Select]
%X|backdrop_blue.bmp|0|0|
%P|progbar.bmp|
%xl|a|batt_100.bmp|143|2|
%xl|b|batt_075.bmp|143|2|
%xl|c|batt_050.bmp|143|2|
%xl|d|batt_025.bmp|143|2|
%xl|e|batt_000.bmp|143|2|
%xl|f|pause.bmp|77|191|
%xl|g|vol_00.bmp|3|3|
%xl|h|vol_01.bmp|3|3|
%xl|i|vol_02.bmp|3|3|
%xl|j|vol_03.bmp|3|3|
%xl|k|vol_04.bmp|3|3|
%xl|l|vol_05.bmp|3|3|
%xl|m|vol_06.bmp|3|3|
%xl|n|vol_07.bmp|3|3|
%xl|o|vol_08.bmp|3|3|
%xl|p|vol_09.bmp|3|3|
%xl|q|vol_10.bmp|3|3|
%xl|r|vol_11.bmp|3|3|
%xl|s|vol_12.bmp|3|3|
%xl|t|vol_13.bmp|3|3|
%xl|u|vol_14.bmp|3|3|
%xl|v|vol_15.bmp|3|3|
%xl|w|vol_16.bmp|3|3|
%xl|x|vol_17.bmp|3|3|
%xl|y|vol_18.bmp|3|3|
%xl|z|vol_19.bmp|3|3|
%xl|A|vol_20.bmp|3|3|
%xl|B|rep_song.bmp|116|4|
%xl|C|rep_all.bmp|116|4|
%xl|D|rep_ab.bmp|116|4|
%xl|E|shuff.bmp|89|4|
%wd
                   

%al %pv dB %ar %cl:%cM %cp



%s%ac%?ia<%ia|Artist Unknown>
%s%ac%?it<%it|Title Unknown>


%s%acNext: %?It<%It|%?Fn<%Fn|?>>



%t1 %?mp<%al Stopped%ar-:--/-:-- |%al %fbKbps%ar%pc/%pt |%al Paused%ar%pc/%pt |%al Seeking%ar%pc/%pt |%al Seeking%ar%pc/%pt >;%t1 %?mp<%al Stopped-:--/-:-- |%al %fbKbps%ar%pc/%pt |%al Paused|%al Seeking%ar%pc/%pt |%al Seeking%ar%pc/%pt >

%pb|6|0|176|184|



%?bl<%xde|%xdd|%xdc|%xdb|%xda>
%?mm<%xdZ|%xdC|%xdB|%xdC%xdE|%xdD>
%?ps<%xdE>
%?mp<%xdf|%xdZ|%xdf|%xdZ|%xdZ>
%?pv<%xdg|%xdh|%xdi|%xdj|%xdk|%xdl|%xdm|%xdn|%xdo|%xdp|%xdq|%xdr|%xds|%xdt|%xdu|%xdv|%xdw|%xdx|%xdy|%xdz|%xdA>

.....

Hopefully this helps anyone else out that is experiencing similar problems.

Having the word "height" in as one of the progress bar settings didn't cause a problem, but I have changed it anyway to indicate the actual pixel height.  It really has no effect in my theme because I'm using an image to define the progress bar.  Whether I change the value to 2 or 20, my progress bar maintains the height of the image being used -- 6 pixels.