mailto: blog -at- heyrick -dot- eu

You are not reading my b.log using HTTPS. You can switch to HTTPS by clicking here.

Zen and the art of programming

A long long time ago I bought a Creative Zen. It was my friend for a good long time, it saw me through countless night shifts. It survived falling out of my locker on to a solid concrete floor (the case burst open and all the insides fell out, but putting it all back in place, it worked fine).

Pretty much my only two criticisms were: firstly, that it could only handle video up to 320×240 - but kudos for dealing with standard XviD, it is just a shame it didn't have the processing power to downscale from D1 to permit a person to watch DVD rips. And secondly, the firmware was quirky at best. The lock switch never worked, switching in and out of standby may have made the display over-bright and washed out. Additionally, there was never any sensible sort of integration between content held on the optional SD card and content on the Zen itself.

However, it was simple to use, the battery life was sufficient for a night shift, and it had enough buttons that I could skip songs I didn't feel like listening to - a feature I really miss when listening to music on my mobile phone.

I needed an SD card reader, so I plugged in the Zen, which promptly crashed. Several attempts, crashed every time. I have only tried to connect to my computer so it is possible some update or other has altered things in a way the Zen firmware doesn't like. However, I'd point my finger equally at the Zen. Here's why...

 

I updated the Zen's firmware. This was to be a simple download of an .exe file from Creative's website. All I had to do was plug in the Zen and once the software detected it, click on the Update button. Well, that was the theory. The process seemed to work. A long time spent transferring the data to the Zen, and then a fairly quick zapping of the internal FlashROM. Then the Zen rebooted and...

Failure.

Kudos again to Creative that the Zen contains a rescue bootloader. That was some good thinking on their part.

Problem was, the Zen refused to sync, and how can I get it to sync when there is no firmware? There ought to be a way...
So I removed the Zen from my known hardware list, and reconnected. USB device. Not recognised. MTP device. There was a problem with your hardware...
And that is as far as it went. So I popped over to Creative's website again and picked up the Zen driver. Actually, I first looked on the original CD-ROM, but that didn't seem to contain any driver that could be installed without an awful lot of other stuff that I didn't want. The driver unpacked itself and installed and - in a welcome change - said I could plug my Zen in right away, no need to reboot. So I did. Success, the boot loader told me the Zen was synced and the firmware updater recognised the device and soon I was trying to reflash the Zen once more.
[Trying now, as I write this, the recovery mode boot loader refuses to sync, so perhaps it is only something it does if the firmware is damaged? I don't plan to experiment to find out!]

This time the update worked. The Zen rebooted. Just to be certain nothing weird would happen, I disconnected the Zen from the computer and switched it off, then booted back to the bootloader and asked it to repair the filesystem, the "Clean Up" option. Nicely, the Flash update went in without trashing the content already on the Zen. Then I booted the firmware proper and reset all of the settings to their defaults. Then I connected the PC.

At which point the Zen promptly crashed.

This was repeatable. Connect the Zen to the PC, instant freeze of the Zen. I gave that hidden reset button quite a work-out.

But, oh wait, it gets worse.

I was angry, because not being able to access anything on the Zen makes it a bit pointless, so I decided to just listen to something calming while I looked on Google to see if there was something to say or do.

That's when I noticed that the indexes looked like this - note the alphabetical column on the right:

There's yet more! Playing media normally pops up a little time bar to show how far into the track you are. It is reasonably well thought out to show you that which is important without being information overload (I had a player that told me the sampling frequency, for god's sake - who needs to know that? especially since I never saw it as anything other than 44.1kHz). Thing was, the time bar was corrupted. A lot. Here's a photo:

So at the point I figured that the firmware update must have failed again, but how? I mean, the device works doesn't it? But the best bit? If I can't sync to the PC to even attempt a reflash.

I wandered around the menus, I played videos, I tried all sorts of things. Nothing else seemed to be faulty except the theme previews were not redrawing correctly. Resigning myself to the fact that the PC and the Zen would no longer talk, I set up my own theme (the purple crystal theme with one of the scenery pictures as the backdrop). Without thinking, I decided that the last job to do would be to drop some Kalafina onto the Zen so I plugged in the USB lead...

Oh, crap. Does this mean that I'll need to reconfigure the whole thing aga.....

...wait...

...there's the little yellow-spinny-arrow thing. It has... it...

HUH?

So staying up way later than I wanted, I did some experiments. The best that I can work out is that the default configuration is missing some of its icons, and in the case of syncing, at the time it comes to display the sync icon, it is unable to load the icon at which point it does the useful thing and locks up.
[as a programmer, maybe there's a "pointer to icon data" which is set to &0 (data not found) and something writes to it and trashes the hardware exception vectors? all sorts of possible reasons, all going to come down to shoddy programming failing to deal with error trapping]

This is absolutely repeatable. Set any theme. Plug in the USB lead. Fine. Now disconnect the USB lead, restore default settings (backdrop will become dark red with white partial circles, the Zen logo), connect the USB lead....bang.

Nice one, guys. Nice.

 

 

I think the sad thing about this, other than a rather abysmal failure to handle unexpected error conditions, is that time and life have moved on so the Zen is now a "what once was". The newer firmware is slightly better. Obstensibly it fixes an issue with the radio (not that I ever noticed one) but it also corrects the lock switch problem and the washed-out-display insanity happens much less frequently. The Zen just seems a little more reliable now. But the SD USB crash still happens. Is this Windows' fault? Is this the Zen failing to cope with something? Maybe the driver now does a probe for something (partition table, perhaps?) that was unheard of back in the mid '00s but may make more sense these days - especially with devices like the RaspberryPi that boot from FAT partitions to run operating systems hosted on non-FAT partitions (SDFS for RISC OS, ext3 or such for Linux). The Zen does, at least, connect the SD card to my Livebox, so it is definitely something interacting between the Zen and my PC. Still, it shouldn't crash the player.

There are also other things that would be cool to have. There should be something like an "SD link" feature that, when activated, would scan a connected SD card for music and video files. These can then be merged into the master list of songs and when an SD link song is to be played, switch on the SD card, play the song, then disable the SD card (to save power). The Zen behaves as if it has a mini-OS underlying everything, so I reckon everything is there to make this possible, and it would certainly make things a lot more convenient for users. Also the ability to move specific files on to the Zen. There is an option to transfer photos (all photos), this should be made selective and extended to cater for all supported types of file.

This will probably fall on deaf ears, but the Zen's heart is a Sigmatel STMP3760 (an ARM962EJ-S running at ~300MHz with some sort of DSP) along with a 2GiB FlashROM (presumably the OS) and a 4GiB FlashRom (storage) which may be implemented as an SSD with the use of a Phison UT062788 (no info?). A tiny Philips TEA5761UK is the radio tuner (and it is so tiny I spent a long time with a powerful magnifying glass trying to read it). Everything is tied together by application software running on the Nucleus OS.
Anyway.
Don't suppose you'd consider open sourcing the Zen firmware? (or, at least, the bits you can)

 

 

Your comments:

Please note that while I check this page every so often, I am not able to control what users write; therefore I disclaim all liability for unpleasant and/or infringing and/or defamatory material. Undesired content will be removed as soon as it is noticed. By leaving a comment, you agree not to post material that is illegal or in bad taste, and you should be aware that the time and your IP address are both recorded, should it be necessary to find out who you are. Oh, and don't bother trying to inline HTML. I'm not that stupid! ☺ ADDING COMMENTS DOES NOT WORK IF READING TRANSLATED VERSIONS.
 
You can now follow comment additions with the comment RSS feed. This is distinct from the b.log RSS feed, so you can subscribe to one or both as you wish.

YogiCK, 13th November 2014, 18:15
Read about Rockbox project > http://www.rockbox.org/wiki/CreativeZENPort

Add a comment (v0.11) [help?] . . . try the comment feed!
Your name
Your email (optional)
Validation Are you real? Please type 92304 backwards.
Your comment
French flagSpanish flagJapanese flag
Calendar
«   November 2014   »
MonTueWedThuFriSatSun
     
345678
101113141516
171820
2526272930

(Felicity? Marte? Find out!)

Last 5 entries

List all b.log entries

Return to the site index

Geekery

Search

Search Rick's b.log!

PS: Don't try to be clever.
It's a simple substring match.

Etc...

Last read at 01:12 on 2024/04/26.

QR code


Valid HTML 4.01 Transitional
Valid CSS
Valid RSS 2.0

 

© 2014 Rick Murray
This web page is licenced for your personal, private, non-commercial use only. No automated processing by advertising systems is permitted.
RIPA notice: No consent is given for interception of page transmission.

 

Have you noticed the watermarks on pictures?
Next entry - 2014/11/12
Return to top of page