Rockbox Technical Forums

Rockbox Development => New Ports => Topic started by: zefie on January 24, 2007, 06:44:58 PM

Title: SanDisk Sansa c200 Series
Post by: zefie on January 24, 2007, 06:44:58 PM
I'd like to help port Rockbox to the c200 in any way I can, but I'm not too good with C or assembly.
I've managed to help a little so far, got the mi4 key anyway.

I guess what I am asking is are there any other c200 owners out there who would be willing to help port Rockbox to the device?

http://zefie.com/files/sansa/c200/
Title: Re: SanDisk Sansa c200 Series
Post by: Bagder on January 25, 2007, 02:45:56 AM
I've taken the liberty of jotting down some early and quick known facts here:

http://www.rockbox.org/twiki/bin/view/Main/SansaC200Port
Title: Re: SanDisk Sansa c200 Series
Post by: zefie on January 25, 2007, 11:10:52 AM
Thanks! Can anyone confirm if the diag mode exists on the E200?

It may seem off topic, but since the units are similar in many ways, it may be easier to figure out the diag mode on the E200 if it exists.

As for me, I've tried everything I can think of, I can't think of any use for it. Especially since the USB isn't noticed by the computer while in Diag mode. For me its just another way to get into recovery.

Edit: Cheap page I put together: http://zefie.com/files/sansa/c200/images/chips/
Title: Re: SanDisk Sansa c200 Series
Post by: saratoga on January 25, 2007, 11:32:18 AM
The size and location of the corner dot on the unknown chip are consistent with the PP502x series.  I'd guess its one of those thats had the marking removed to conceal the chip identity for some reason.
Title: Re: SanDisk Sansa c200 Series
Post by: zefie on January 25, 2007, 11:38:23 AM
I managed to get manufacturing mode to work under VMWare, are there any special hardware addresses I could read to get more information? I went to the PP5022 page on iPodLinux but the link to the docs have been killed by nVidia's takeover of PortalPlayer. Does anyone have a backup of the PP5022 PDF?
Title: Re: SanDisk Sansa c200 Series
Post by: saratoga on January 25, 2007, 12:26:46 PM
Google still has it:

http://209.85.165.104/search?q=cache:fBeZ6qxXSUYJ:www.portalplayer.com/products/documents/5022_Brief_Mar05.pdf+pp5022&hl=en&gl=us&ct=clnk&cd=1&client=firefox-a

Theres almost nothing in there though, since PP doesn't publish any software info.
Title: Re: SanDisk Sansa c200 Series
Post by: Bagder on January 25, 2007, 04:02:56 PM
There are no public docs on the PP5022, and AFAIK we're not even sure the c200 has a 5022... The comments in the mi4 says 5022 but so does the comments in the e200 files, and the e200 uses the PP5024.

Anyone able to think of the best way to detect what PP model this might be?
Title: Re: SanDisk Sansa c200 Series
Post by: Llorean on January 25, 2007, 04:06:01 PM
Didn't the C200 come out at or after the E200? If so, I'd say it's very likely to be the 5024 just because that's intended for flash-based player use.
Title: Re: SanDisk Sansa c200 Series
Post by: lowlight on January 25, 2007, 04:20:58 PM
If it's a PP5024, why the separate AS3514 chip?
Title: Re: SanDisk Sansa c200 Series
Post by: saratoga on January 25, 2007, 04:25:25 PM
The pp5022 is a 261 pin chip that measures 12*12 mm according to it's spec sheet.

The pp5024 is a 196 pin chip that measures 10*10 mm according to it's spec sheet.

Anyone got a ruler?
Title: Re: SanDisk Sansa c200 Series
Post by: Llorean on January 25, 2007, 04:26:58 PM
Well, we know that there's at least a PP5024 and PP5024B (I think it's a B) in the E200 which doesn't have the video capabilities that the Advertising Flyer says it has. Another revision could exist.

But that is a very good point. Once code's running on it, one could conceivably attempt to reach different clock speeds and see which of our current targets it behaves the most like (at what point does it become unstable?)

It's hardly scientific, but it is a test.
Title: Re: SanDisk Sansa c200 Series
Post by: dan_a on January 25, 2007, 04:34:52 PM
Thanks! Can anyone confirm if the diag mode exists on the E200?

It may seem off topic, but since the units are similar in many ways, it may be easier to figure out the diag mode on the E200 if it exists.

I wasn't able to get into a diag mode on my E200. I tried booting with hold on and each button pressed except record and select (which already do different things.)
Title: Re: SanDisk Sansa c200 Series
Post by: saratoga on January 25, 2007, 04:38:54 PM


But that is a very good point. Once code's running on it, one could conceivably attempt to reach different clock speeds and see which of our current targets it behaves the most like (at what point does it become unstable?)

It's hardly scientific, but it is a test.

The sheets cite the same numbers for both: 32kHz to 100MHz.  I think the differences are due to mistakes on our part or possibly different clock gen speeds on different MP3 players.  That or the sheets are optimistic.

Edit:  The gold standard would be to take a dead c200, pull off the chip, and count the BGA balls on it.  No revision is going to add another 70 pins to a CPU.
Title: Re: SanDisk Sansa c200 Series
Post by: zefie on January 25, 2007, 04:48:04 PM
Don't look at me :)

But they are hard to kill. Yesterday I threw a e200 bootloader rom on it and thought I killed it, but went into manufacturing mode and loaded the rom via that and reflashed the proper rom.
Title: Re: SanDisk Sansa c200 Series
Post by: Bagder on January 25, 2007, 05:03:19 PM
went into manufacturing mode and loaded the rom

... I take it you meant "recovery mode" there! ;-)
Title: Re: SanDisk Sansa c200 Series
Post by: zefie on January 25, 2007, 08:20:17 PM
went into manufacturing mode and loaded the rom

... I take it you meant "recovery mode" there! ;-)

No, I meant what I said.
Recovery mode did not work.

I went into manufacturing mode and ran "./e200tool recover pribootLoader.rom", then while it was writing the addresses I quickly unlocked the lock switch. Then it booted into the firmware. From there I copied the pribootLoader.rom into the root folder and let it reflash.

Edit: another note, attempting to read 0x70000000 seems to crash the device.
Title: Re: SanDisk Sansa c200 Series
Post by: Bagder on January 26, 2007, 03:07:01 AM
I don't see why you need to fiddle with .rom files at all. If you stay with testing mi4 files only, you should be fine with "simply" using recovery mode to go back.

But it is great to see that the e200tool works this great for you!
Title: Re: SanDisk Sansa c200 Series
Post by: zefie on January 26, 2007, 11:19:44 AM
I don't see why you need to fiddle with .rom files at all. If you stay with testing mi4 files only, you should be fine with "simply" using recovery mode to go back.

But it is great to see that the e200tool works this great for you!

Yeah I know, I was just experimenting. But it is nice to know how to unbrick them :)

I wish I knew assembly perhaps I could be of actual help instead of having to ask for others to help in the porting process. What I am aiming for at the moment is to figure out the specs of the device, and the simularities (and differences) from the E200 (aside from the obvious smaller screen and no scroll wheel).

If it is simular enough, we may be able to simply port this by creating small patchs for the existing E200 project.

Edit: Interesting:
http://zefie.com/files/sansa/c200/docs/c200_firmware_paths.txt

Notice "pp7002_5022_color".. is PP7002  a new PortalPlayer CPU? Also notice all the references to e200...

There seem to be 4 types of firmware for the device:

http://zefie.com/files/sansa/c200/docs/c200_blrom_strings.txt

BootROM (not the bootloader, probably lower level, breaking this would probably kill manufacture mode even)
PRIMARY BOOTLOADER (what we get with the updates)
SECONDARY BOOTLOADER (no idea)
Main image (the "firmware")

Filenames (guess from blrom strings):
Bootrom: sdbootrom.rom
Primary BL: pribootLoader.rom
Sec. BL: ? secbootLoader.rom maybe?
Main image: firmware.mi4

Unknown strings hanging around the area where the filename strings are for recovery mode:
FONT
FORMAT (maybe something simular to sansa.fmt?)

I'd like to figure out the hw address for the BootROM so I can read that using e200tool and maybe get some more hardware info.
Title: Re: SanDisk Sansa c200 Series
Post by: linuxstb on January 26, 2007, 05:26:54 PM
PP7002 appears to be a PortalPlayer Windows application:

http://216.239.59.104/search?q=cache:3KbP4O7w_Q0J:www.portalplayer.com/products/platforms_musicjukebox.html+pp7002+portalplayer&hl=en&gl=uk&ct=clnk&cd=1&client=firefox-a

That page mentions it in conjunction with the PP5002, but looking at a disassembly of the bootloader, I'm almost certain it's a PP502x device.
Title: Re: SanDisk Sansa c200 Series
Post by: zdezi on January 27, 2007, 01:56:18 PM
SoC = PP5022BF + NAND FLASH MEMORY.

>>[http://jiangmen.yesky.com/cseek/gd/gdsm/108/2664608_2.shtml

(automatically translated)

Quote
In all these chips, the most attention to the needs of this chip SanDisk iNAND, In fact, it was a Flash and the integration of the ARM chip. iNAND is a high-speed NAND FLASH MEMORY sequence controller in a single device combining a complete subsystem. iNAND can save CPU and the main system memory buffer random. ensure a high degree of reliability and provides a complete disk-file management structure.
Chip is very likely to listen to him after such a trend,
Recently, the S10 can iriver is an example of the application of this chip, without sacrificing function of the circumstances,
 Volume also can be further reduced.
Infineon chip is the first in the lower-right panel of 16 MB of SDRAM 1.8V voltage. This product should be used in the cache to use it.

 Middle and below the chips .IC is AustrianMicroSystems produce. It is AS3514 models, as the first product designed specifically for low-power portable audio audio encoder, It can not only achieve high-quality intervals, and at the same time also supports stereo FM recorded.

From the above one can see. While on the surface it seems to strengthen customs c200 does not seem particularly remarkable about. But it did little sloppy internal However, the chip but it has not unique.
Or in the future, we will see more use iNAND chip products
 
Title: Re: SanDisk Sansa c200 Series
Post by: maxkelley on January 28, 2007, 08:28:53 PM
I'm not sure how I can help, but I know basic C and know the syntax well.. I also can provide an objdump'ed firmware file for the c200 series: http://www.maxkelley.com/sansa/firmwaredump_c200.txt
Cheers.
Title: Re: SanDisk Sansa c200 Series
Post by: Bagder on January 29, 2007, 03:13:14 AM
Note that this objdump still has a 0x200 bytes mi4 header. At 0x200 you see the exception vectors that goes to location 0x0.
Title: Re: SanDisk Sansa c200 Series
Post by: maxkelley on January 29, 2007, 06:50:37 AM
Would it help if I mi4code decrypted it? Here it is, if it helps: http://maxkelley.com/sansa/firmware_decrypt_dump_c200.tar.gz (tar-gz with textfile inside)
Title: Re: SanDisk Sansa c200 Series
Post by: Bagder on January 29, 2007, 05:09:50 PM
It simply has to be a PP5021C, see the http://www.rockbox.org/twiki/bin/view/Main/SansaC200Port page now.
Title: Re: SanDisk Sansa c200 Series
Post by: maxkelley on January 29, 2007, 06:48:47 PM
So, instead of patches to the e200 port, patches to the nano port? That should make it fairly easier, figuring that the Nano port is more complete.
Title: Re: SanDisk Sansa c200 Series
Post by: saratoga on January 30, 2007, 01:31:01 AM
Its more like the e200.  It doesn't share much with the nano, except the PP CPU.  
Title: Re: SanDisk Sansa c200 Series
Post by: Bagder on January 30, 2007, 03:34:31 AM
MrH said something like this to me:

Quote
"I took a brief look at the c200 BL and it also seems to have the SD protocol routines, so the NAND in it might still be an emulated SD card."

Which is somehow weird in my view since I thought the PP5021 in the nano had some kind of ATA interface to the NAND.
Title: Re: SanDisk Sansa c200 Series
Post by: dan_a on January 30, 2007, 03:45:35 AM
MrH said something like this to me:

Quote
"I took a brief look at the c200 BL and it also seems to have the SD protocol routines, so the NAND in it might still be an emulated SD card."

Which is somehow weird in my view since I thought the PP5021 in the nano had some kind of ATA interface to the NAND.

But the c200 does have an SD slot - they may be to support that (thought I don't know why the routines would be in the bootloader.)

My advice to zefie would be to test the Elio bootloader build and see if that creates files.  If not, modify it to use the E200 flash driver and see if that creates the files.
Title: Re: SanDisk Sansa c200 Series
Post by: saratoga on January 30, 2007, 11:44:42 AM
The pp5021 has an ATA controller, but I suppose theres no reason they have to use it.  They may have wired it up like the 5024 to resuse code or something.
Title: Re: SanDisk Sansa c200 Series
Post by: zefie on February 01, 2007, 05:29:23 AM
MrH said something like this to me:

Quote
"I took a brief look at the c200 BL and it also seems to have the SD protocol routines, so the NAND in it might still be an emulated SD card."

Which is somehow weird in my view since I thought the PP5021 in the nano had some kind of ATA interface to the NAND.

But the c200 does have an SD slot - they may be to support that (thought I don't know why the routines would be in the bootloader.)

My advice to zefie would be to test the Elio bootloader build and see if that creates files.  If not, modify it to use the E200 flash driver and see if that creates the files.

I'll do what I can soon, when I get my new computer. Right now I'm roughing it on old computers that don't want to cooperate :P
Title: Re: SanDisk Sansa c200 Series
Post by: maxkelley on February 17, 2007, 10:46:35 AM
Could we possibly create a checklist of things to be done?

[Moderator's note:  I've deleted your most recent post.  Please do not "bump" threads in the Rockbox forums.  Febs]
Title: Re: SanDisk Sansa c200 Series
Post by: lowlight on August 31, 2007, 09:19:43 AM
Rockbox working on the c200!
http://www.rockbox.org/mail/archive/rockbox-archive-2007-08/0447.shtml
Title: Re: SanDisk Sansa c200 Series
Post by: Bagder on September 03, 2007, 07:06:10 AM
Allow me to also point out that mi4code 1.0.1 is now hosted on my site (http://daniel.haxx.se/sansa/mi4code.html) and it contains the keys built-in for the most recent c200 firmwares.
Title: Re: SanDisk Sansa c200 Series
Post by: Heyoka on September 19, 2007, 08:55:56 AM
I'm a proud owner of a rockboxed iriver h140 (well h180 now  ;) ) for years and I loathe the idea of touching any dap that isn't running rockbox.
  Anyway I'm a few days away of being a c250 owner which I bought specifically for the possibility of rockbox goodness (and modest size as well) , but since I'm a lowly user and not a programmer (ok I can compile some things and edit my own X.org and assorted linux config files by hand and such, but thats as far as my kung fu goes) I would like to offer my services as a guinea pig for all tests that need to be done on this player, would any of the devs please be so kind as to point me to some installation and unbricking instructions, and a fresh supply of builds to play around with and try to provide as much usefull information as possible?

 thanks for all the good work you've been doing, I hope I can help out and do my share too.
Title: Re: SanDisk Sansa c200 Series
Post by: Bagder on September 19, 2007, 09:04:20 AM
It seems we're just inches away of having a sansapatcher for the c200 series (see IRC logs for exactly today). You'll soon be able to try it out...
Title: Re: SanDisk Sansa c200 Series
Post by: CJ on September 19, 2007, 06:26:11 PM
Sansa c200 http://img513.imageshack.us/img513/5015/worksdu6.jpg
Title: Re: SanDisk Sansa c200 Series
Post by: francocool on September 20, 2007, 10:31:49 AM
Sansa c200 http://img513.imageshack.us/img513/5015/worksdu6.jpg
Hello guys! tell me, where can i get this Sansa c200 sansapatcher.exe? I realy need it! I'am unhappy with quality of sound in my C250.
I have already new rockbox Sansa c200 firmware, now i need sansapatcher.exe.
Please answer me! I shall be grateful!
Title: Re: SanDisk Sansa c200 Series
Post by: Febs on September 20, 2007, 11:28:06 AM
When it becomes available, it will be announced here.  Until then, please be patient.
Title: Re: SanDisk Sansa c200 Series
Post by: linuxstb on September 20, 2007, 12:28:16 PM
You can download the "pre-release" version here - it's been quite well tested (successfully) so far, but more testing won't hurt.

To install Rockbox on the c200, basically follow the instructions in the e200 manual, but download this version of sansapatcher instead of the link in the manual, and download the c200 build instead of the e200.

http://www.davechapman.f2s.com/rockbox/sansapatcher-c200.zip

(both a Windows and Linux binary are included).


Please report back with success or failure...
Title: Re: SanDisk Sansa c200 Series
Post by: lmatto on September 21, 2007, 05:58:58 AM
Installed and plays mp3's  :D  

Tnx for great work :) I will test and report if i find any bugs...
Title: Re: SanDisk Sansa c200 Series
Post by: francocool on September 21, 2007, 06:01:52 AM

http://www.davechapman.f2s.com/rockbox/sansapatcher-c200.zip

(both a Windows and Linux binary are included).
Thanx a lot! New rockbox c250 firmware already in my Sansa C250! It's change everything there! :D
But I find some bugs -
1)russian language is not correct, when i choose it i see some strange signs instead russian letters.
2) I can't set time and date - marker doesn't sets on minutes, only on hours and seconds. The same goes with month. (sorry for my english, it's not my native language).
Title: Re: SanDisk Sansa c200 Series
Post by: pixelma on September 21, 2007, 06:16:34 AM
Remember: the port is not in any way complete and very very fresh, expect missing or non working features, there is no manual available and the installation procedure is not "official" yet.

About your two issues:
1) Install the fonts package, choose a font that includes cyrillic characters. Search a bit in the forums for more general information like this before.
2) Yes, it's known that there are still some quirks (I also knew about the set time screen), it's a new port...

3) Please, don't report every single thing here, do some searching before, be patient, wait for official support and the manual... give it some time especially for these small, not critical problems.
Title: Re: SanDisk Sansa c200 Series
Post by: yaggi on September 25, 2007, 10:05:01 AM
Greetings! I installed Rockbox on my Sansa c250 on Sep-22 and it is working great! Many thanks to the Rockbox developers for a wonderful alternative to the original firmware. My question concerns the player's control / "menu" led. Is there currently a way to allow this to time out or turn off? When running the OF, the led turns off when the lcd times out. I have found the setting for lcd timeout but it has no effect on the led. My concern is one of battery life, especially on long plane trips. Thank you very much for any advice and keep up the great work on this excellent product!