Rockbox Technical Forums

Rockbox Development => New Ports => Topic started by: bwbass on March 18, 2007, 08:46:18 PM

Title: Samsung K5
Post by: bwbass on March 18, 2007, 08:46:18 PM
I would like to start a new port of Rockbox to the Samsung K5 - the player with slide-out speakers.

I've read the new port page on the wiki and think I'm prepared to start this, though I'm a bit confused about the protocol for starting a page in the Wiki for it.  I've used MediaWiki, but TwikiWiki is a bit different.  How do I decide what the parent of the new page should be, for instance?

I've dissasembled my K5 and posted the pictures here: http://picasaweb.google.com/bwbass/SamsungK5Disaasembly

Unfortunately, I don't have access to a flatbed scanner, but I think I did OK by propping the circuit boards up and using a timer with available light.

Now I'll start making a list of all the chips, though it's clear that the big one is a  Telechips TCC770, same as the
Cowon U3, which already has a page in the wiki: http://www.rockbox.org/twiki/bin/view/Main/IaudioU3Info

Title: Re: Samsung K5
Post by: Bagder on March 19, 2007, 03:45:36 AM
twiki has a rather simple approach to parents. When you create a new page, you can select the name of the parent page.

But then of course I don't know a suitable parent for a new port page, and to be fair, most of our wiki pages don't have the parent setup (in a sensible way).

Besides, we can always fix that after you've created it anyway!
Title: Re: Samsung K5
Post by: bwbass on March 19, 2007, 11:46:06 AM
Thank you (and Linus) for help with the Wiki!

I've started a very rough page for the new port here: http://www.rockbox.org/twiki/bin/view/Main/SamsungK5Port
Title: Re: Samsung K5
Post by: Drkepilogue on March 20, 2007, 12:13:09 AM
perhaps this link can be of some help??

http://www.anythingbutipod.com/forum/showthread.php?t=10915

Looking foward to this port since i am planning to buy one.
Title: Re: Samsung K5
Post by: bwbass on March 20, 2007, 12:21:06 AM
With all respect to the poster there, it looks like all he's done is replace text in the firmware.

The good news there is that the player didn't reject the changes out of hand based on an MD5 sum or something.  Sounds promising to me.
Title: Re: Samsung K5
Post by: Drkepilogue on March 20, 2007, 12:31:27 AM
Yeah, but i think it is  small but important step.  Atlest it will accept modified version of the orginal FW.  A bigger hope that the FW can be replaced.  
Title: Re: Samsung K5
Post by: saratoga on March 20, 2007, 12:35:43 AM
If he can edit text in the firmware, then there is no check in the bootloader, and the player is effectively wide open for anything you put on it.

Also, I love the part in that thread where he speculates that the firmware is written in c  ;)  
Title: Re: Samsung K5
Post by: dmd on March 20, 2007, 05:55:45 AM
This sounds promising, the upcoming K3 looks just like K5 but without the speakers. Very similiar to Nano 2G.
Title: Re: Samsung K5
Post by: bwbass on March 20, 2007, 01:02:25 PM
I'd like to try disassembling the existing firmware to glean some more insight into the player, but I'm unclear exactly how to start.

I've installed cygwin and the GNUARM tools and tried objdump -d and arm-elf-objdump -d on the YPK5.ROM file in this package: http://www.yepp.co.kr/support/support_file_down.jsp?pds_num=1663&seq_num=1 but both commands tell me that the file format is not supported.  I'm working under the assumption that this uses an ARM9 instruction set.

Can someone point me in the right direction?
Title: Re: Samsung K5
Post by: saratoga on March 20, 2007, 03:14:14 PM
I don't know specifically what the problem you're having is, however, I can confirm that the ROM file you linked is in ARM.  It dissassembles fine using default settings for ARM in IDA Pro.  The entry point of the ROM even looks like 0x0, making it that much easier to understand.  

Also, they left a lot of debug strings in, including paths to folders in the arm developers suite.  Anyone know if IDA can be configured with a list of ADS library functions so that it can annotate them for you in the asm?
Title: Re: Samsung K5
Post by: Bagder on March 20, 2007, 05:13:05 PM
arm-elf-objdump -D --target binary -marm [file name]
Title: Re: Samsung K5
Post by: bwbass on March 20, 2007, 07:33:17 PM
Thank you, Bagder, that worked perfectly!

I suspect IDA Pro's output looks nicer, though - with objdump you can't read the plain text strings you can see in a hex editor, though I can look up the addresses and cross-reference them in the code.

On a different note, have any of the devs ever tried getting datasheets from Telechips?  I know there are several other (apparently stalled) projects for players using these chips - is this one of the stumbling blocks?  I'd be happy to try contacting them, if it would help.
Title: Re: Samsung K5
Post by: Bagder on March 21, 2007, 03:39:29 AM
I suspect IDA Pro's output looks nicer, though - with objdump you can't read the plain text strings you can see in a hex editor, though I can look up the addresses and cross-reference them in the code.

Oh yes, IDA Pro is a true disassembler with lots of powerful tools. objdump is rather poor in comparison.

Quote
On a different note, have any of the devs ever tried getting datasheets from Telechips?  I know there are several other (apparently stalled) projects for players using these chips - is this one of the stumbling blocks?  I'd be happy to try contacting them, if it would help.

I'm not sure anyone tried for real since I don't think anyone (before you) actually have started a serious attempt of a port to a Telechip-based player (at least not one with an ARM-based telechip). Given the track record from other "secret" companies with hidden data sheets, I would say that the likeliness of them responding to you with any good news is very slim. :-(
Title: Re: Samsung K5
Post by: GodEater on March 21, 2007, 10:06:29 AM
I would say that the likeliness of them responding to you with any good news is very slim. :-(

If they respond at all :(
Title: Re: Samsung K5
Post by: bwbass on March 21, 2007, 11:30:39 AM
I suspected as much.  Still, it doesn't cost anything to try.  I'll send off inquiries to Telechips, Samsung, and Wolfson, just to fully exhaust my optimism.  Worst they can say is no (or nothing).  :)
Title: Re: Samsung K5
Post by: bwbass on March 22, 2007, 09:41:57 AM
Wolfson, at least, has responded by pointing out where some good info can be found on their site, including a pinout of the DAC (it's on the PDF for its evaluation board on their site, page 7: http://www.wolfsonmicro.com/uploads/documents/en/WM8956EV1.pdf).  

I'll get it up on the wiki when I can.
Title: Re: Samsung K5
Post by: Bagder on March 22, 2007, 09:48:10 AM
Perhaps they can answer if the 8956 is similar to one of the other Wolfsons we already support: 87311, 8758 and 8975...
Title: Re: Samsung K5
Post by: bwbass on March 22, 2007, 02:04:07 PM
From the nice folks at Wolfson:
Quote
Hi Brian,

WM8758 and WM8975 are both customised devices.

Both are similar in the digital core to our WM8750.

Register settings for WM8750 (CODEC) and WM8751 (DAC) are also similar to WM8960 (CODEC) and WM8956 (DAC).

I’d be interested in any information that you have on the work you guys do – I hope that Wolfson is your preferred audio company
Title: Re: Samsung K5
Post by: Bagder on March 22, 2007, 05:15:18 PM
I’d be interested in any information that you have on the work you guys do

I trust you point them to a familiar site ;-)
Title: Re: Samsung K5
Post by: bwbass on March 23, 2007, 12:03:42 PM
I did indeed!  I told him the best chip manufacturer for Rockbox was the one who provided the best tech data.  As expected, I have heard only the sound of crickets chriping from my inquiries to Samsung and Telechips.

FYI, I noticed some cheap (discontinued? grey-market?) 1Gb K5's on ebay for around $80 USD - I think I may pick one up so I can have one I won't mind destroying when tracing the circuit board.