Rockbox Technical Forums

Rockbox Development => New Ports => Topic started by: M_Koga on April 16, 2010, 12:24:32 PM

Title: The Zune -- has the day finally arrived?
Post by: M_Koga on April 16, 2010, 12:24:32 PM
Does this make it possible to port Rockbox to the Zune?

Zune HD hacked, as well as previous Zune models (http://www.zuneboards.com/?p=vB50442)

PS: I know that there is an existing Zune thread, but when I went to post this as a reply to that thread, there was a "red letter warning" atop the form urging me to start a new thread since that one had been inactive for some huge amount of time.
Title: Re: The Zune -- has the day finally arrived?
Post by: GodEater on April 16, 2010, 12:34:25 PM
The way I read that, you'd need the as-yet-unwritten Rockbox as App to be finished, since that says that Rockbox would have to run on top of the existing Zune Firmware, and not as a replacement for it.
Title: Re: The Zune -- has the day finally arrived?
Post by: M_Koga on April 16, 2010, 12:55:46 PM
Well, I'm not an OS developer (just a retired applications coder), but from the info they provide on the OS files, I'd think that once you get a foot in the door, you'd be able to own the whole show, and write your own system to run side by side, just as with the Ipods and Sansas.

Since the Zune (the legacy hard drive models at least) use the same processor used by other Rockboxed players, then if you can get into the house, it should be a simple matter of running your own bootloader, and of course, knowing the mapping for the IO pieces.  No?

Edited to add:

Is this info useful?

http://zunedevwiki.org/wiki/development/firmware_dump
Title: Re: The Zune -- has the day finally arrived?
Post by: saratoga on April 16, 2010, 02:09:53 PM
The way I read that, you'd need the as-yet-unwritten Rockbox as App to be finished, since that says that Rockbox would have to run on top of the existing Zune Firmware, and not as a replacement for it.

I think they have root access, so you could probably just patch the Zune firmware and use it like a bootloader.
Title: Re: The Zune -- has the day finally arrived?
Post by: zivan56 on April 16, 2010, 10:21:16 PM
Well I have tried it on my Zune 30, and the "sample" application appears to bring up a classic WinCE MessageBox dialog.  Likewise, the C source code for the app is a normal win32 application using standard API calls.
They have written a deployment package, which essentially allows you to load any .exe file onto the device (in WinCE ARM format, of course).
Title: Re: The Zune -- has the day finally arrived?
Post by: gigawatts on April 21, 2010, 03:53:04 PM
The "sample" application that comes with the ZDK is coded to use the ZuneHD's tegra graphics chip, which the 1st and 2nd generation zunes lack.

I too would love to see a bootloader and rockbox ported to the Zune.  I have a Zune 80, and would be very happy if it were able to play more file formats (.flac, .ogg, etc).

How feasible is such a bootloader?
Title: Re: The Zune -- has the day finally arrived?
Post by: saratoga on April 21, 2010, 03:57:35 PM
How feasible is such a bootloader?

I'm sure when someone figures that out they'll find time to post it here.
Title: Re: The Zune -- has the day finally arrived?
Post by: M_Koga on April 26, 2010, 12:23:53 PM
Looks like the breadcrumb trail is starting to fall into line...

http://zunedevwiki.org/wiki/documentation/apis/start

http://zunedevwiki.org/wiki/documentation/apis/zdkcontent/start

If I was a bit younger, and a bit healthier, I'd be having visions of writing a Zune shell dancing in my head.

From what I can see on those pages, once those "crumbs" are fleshed out a bit, I'd think it ought to be possible to write wrapper code for the stuff necessary to access files on the Zune WITHOUT using zune.exe on the PC.

While "true" USB access may not be do-able at this point, I'd consider an application that served as a shell, exposing enough of the file system (to enable copying and deleting) to be a MAJOR victory, and something that would make the Zune VERY appealing to a lot of people who would otherwise never consider it (like me, for example, having bought into it before I realized exactly how solidly walled-in it was).

Once that happens, I think it may create enough of a critical mass of deeply clued (and younger, healthier, energetic) developers who will be able to make the NEXT leap -- getting Rockbox onto this sucker.

At that point, the Zune will be one formidable mofo.

(I still can't wrap my mind around the groupthink in Redmond that so intensely dedicates itself to doing all that it can to ensure that a very nice piece of hardware is virtually non-marketable, due to it being crippled by insane nannyware.)
Title: Re: The Zune -- has the day finally arrived?
Post by: saratoga on April 26, 2010, 01:46:58 PM
Looks like the breadcrumb trail is starting to fall into line...

http://zunedevwiki.org/wiki/documentation/apis/start

http://zunedevwiki.org/wiki/documentation/apis/zdkcontent/start

If I was a bit younger, and a bit healthier, I'd be having visions of writing a Zune shell dancing in my head.

From what I can see on those pages, once those "crumbs" are fleshed out a bit, I'd think it ought to be possible to write wrapper code for the stuff necessary to access files on the Zune WITHOUT using zune.exe on the PC.

While "true" USB access may not be do-able at this point, I'd consider an application that served as a shell, exposing enough of the file system (to enable copying and deleting) to be a MAJOR victory, and something that would make the Zune VERY appealing to a lot of people who would otherwise never consider it (like me, for example, having bought into it before I realized exactly how solidly walled-in it was).


Keep in mind, we do replacement firmware, not application development (at least not yet), so things like APIs for the Zune firmware aren't useful to us.  We don't need or want to do USB access in the Zune firmware, nor do we  care much about the stuff linked on that wiki page since they won't be usable in rockbox.  With that in mind, please try to limit discussion in this thread to things that are helpful to rockbox development, such as how to get a bootloader running on the Zune.
Title: Re: The Zune -- has the day finally arrived?
Post by: zivan56 on April 28, 2010, 12:41:21 AM
I did some testing with Visual Studio and the SDK.  The API provided by the OS is very basic, and appears incapable of displaying forms or a console application.  So the only way to get feedback back onto the screen is via a messagebox (which is permanently covered by a loading animation) or by using the ZDK API for drawing/rendering (no font API was provided).  The screen API can clear the screen of the animation, but doesn't allow the messagebox dialog to come to the front.

The device itself resets whenever the application exits or when it detects something is "wrong."  I tried loading HaRET, and that either generated a rare error message or rebooted (it appears to be a random result).  Likewise, I tried to load signed Gigabeat S binaries, all of which caused a reset.

I have no experience in Windows development, so I can't do much.   If somebody knows the Windows API, they could perhaps explore the device using the MessageBox API to get feedback from the device.  Likewise, the ZDK API provides for the controls on the device, none of which work on the dialog.  So something could most likely be developed to explore the ROM/RAM (if readable at all on WinCE) or even load the kernel directly.

These are my observations after a couple of hours of testing.  Should save others some time in terms of figuring out why the device reboots when even a basic application is sent to it.
Title: Re: The Zune -- has the day finally arrived?
Post by: xBr4v3x on July 23, 2013, 06:00:54 PM
Well now we know alot more about the Zune HD thanwe did back then so it would be a little easier of a start this time and quicker hopefully. We know that  with Liberate, we can strip the Zune UI and replace it with Windows CE(2000) UI and that allows us to access most (if not all) of the file system on the device its self.
It only has 128mb RAM, bu with a months time of work we can allow it to use Virtual RAM from the storage available to the user, making it a little more useful and faster for flash integration and better game support as well as perfect media playback
Title: Re: The Zune -- has the day finally arrived?
Post by: [Saint] on July 23, 2013, 08:17:44 PM
Flash? Game support?

These are things the Zune firmware handles, Rockbox is not the Zune firmware, nor does it try to be a replacement thereof. Assuming all went to plan on the bootloader end (and quite frankly, nothing is happening there), Rockbox wouldn't need to care about any of this (and, nor should it) due to dual-boot. Whatever the original firmware does or doesn't do has no bearing on what Rockbox does or doesn't do on the same target device.

And on a slightly more personal note, Flash is evil, I'm not sure anyone from the project would put any time or effort into making Flash in Rockbox a possibility.


[Saint]