Rockbox Technical Forums

Rockbox Development => New Ports => Topic started by: LEKO on April 06, 2006, 12:39:50 PM

Title: Step by step - How to port a new MP3 player?
Post by: LEKO on April 06, 2006, 12:39:50 PM
Hi,

I'm new here, but I have good background in electronics and programming (not professionnaly, but for fun). I bought an RCA Lyra RD2840 MP3 players a couple of months ago on eBay.

I'm satisfied with it. It has some software bugs, but they are not very annoying... And it has a very good sound output (quality and power).

I would like to take that MP3 player one step further with the ROCKbox Firmware.

Here is what I plan to do...

1. Search the forums here. DONE! No progress..
2. Open my MP3 player and check how it works. Chips manufacturer/models/etc... <= TO DO!
3. Install the Software needed to apapt ROCKbox. <= TO DO

From your personal experience with ROCKbox coding/developing is there some very useful tips that would help me shorten my integration time?

By the way, the Lyra player seems to have a "preloader" and from this preloader it's lauch the actual MP3 player software. On the player HDD, a directory is called "lyra_sys" which contains a couple of executable files. And I guess that the ONLY file that I will need to "rebuild" with ROCKbox is the one called "mp3.exe".

Do you think I'm in "danger" of renaming or changing that file only. From what I know about hardware (PC, routers, FW, switches, etc...). Most equipment have their "preloader/bootloader" and I don't need to mess with anything else than the application that is actually processing audio files.

Thanks In Advance! I do really hope to be able to do something helpful with this ROCKbox project. Keep on working guys!
Title: Re: Step by step - How to port a new MP3 player?
Post by: Llorean on April 06, 2006, 12:45:48 PM
Well, firstly: http://www.rockbox.org/twiki/bin/view/Main/NewPort

As for the rest, you should probably figure out which of those files are loaded as the OS, or if the OS itself is in flash or ROM. If one of those files is the OS, do some research to find out if you can still get into the player if those files become corrupt. If this is also true, then working on Rockbox because a much safer prospect.

That being said, you wouldn't be "rebuild" anything. Rockbox is a full replacement for most or all functions of an MP3 player. If you can figure out how to compile it for the right architecture, create drivers for the hardware that doesn't have drivers in our repository, and get it to load the code, you're done. See, simple, no? Alright, in all honesty, it's not an easy job, but if the firmware is loaded from disk, it's a bit less difficult simply because experimenting is usually safer. *Usually*
Title: Re: Step by step - How to port a new MP3 player?
Post by: LEKO on April 06, 2006, 12:53:13 PM
Well, firstly: http://www.rockbox.org/twiki/bin/view/Main/NewPort

As for the rest, you should probably figure out which of those files are loaded as the OS, or if the OS itself is in flash or ROM. If one of those files is the OS, do some research to find out if you can still get into the player if those files become corrupt. If this is also true, then working on Rockbox because a much safer prospect.

That being said, you wouldn't be "rebuild" anything. Rockbox is a full replacement for most or all functions of an MP3 player. If you can figure out how to compile it for the right architecture, create drivers for the hardware that doesn't have drivers in our repository, and get it to load the code, you're done. See, simple, no? Alright, in all honesty, it's not an easy job, but if the firmware is loaded from disk, it's a bit less difficult simply because experimenting is usually safer. *Usually*

I just read the New Port section...  HE HE HE!!! Quite a job, but it could be gratifying if I get it to work.

From what I understand, I'll have to do code the interface between the "hardware" and the ROCKbox "common base".

Basically, am I correct to say that I will need to code the hardware DRIVERS for the "ROCKbox OS" and of course, compile the whole stuff for my specific MP3 processor.
Title: Re: Step by step - How to port a new MP3 player?
Post by: Llorean on April 06, 2006, 12:57:43 PM
Basically, yes.
Title: Re: Step by step - How to port a new MP3 player?
Post by: LEKO on April 06, 2006, 01:03:24 PM
Basically, yes.
First, I must you are quite fast to answer!

Is there any known limitation that would prevent a player from being portable. Is there any minimum for the ROCKbox software to "work". Like the minimum RAM/CPU power.

I doubt that my player would not be able to run ROCKbox, since it's currently able to play MP3! But just in case... There is no specific information about this on the "NewPort" page.
Title: Re: Step by step - How to port a new MP3 player?
Post by: Llorean on April 06, 2006, 01:07:15 PM
Well, the rockbox binary itself takes up less than 300k of RAM I believe, and the user interface can run on a slower than 12mhz SH1 processor. But those have a dedicate hardware decoder to handle MP3 playback.

It also runs on one 75mhz ARM7 core in the iPods, and a 120mhz m68k coldfire processor in the iRivers. Though in both of those the processor itself is used to decode the music.

Odds are fairly good that Rockbox can work on your MP3 player, though depending upon its capabilities not every feature of Rockbox will necessarily be usable. For example, if it uses a hardware decoder for MP3 playback, Rockbox can't really add OGG support.
Title: Re: Step by step - How to port a new MP3 player?
Post by: saratoga on April 06, 2006, 01:07:58 PM
Some chipsets are very difficult to support.  Others are very easy because they are so similar to existing Rockbox targets.  Best thing to do would be to open the unit and scan the PCB.  That way you'll know how much work will be involved.

Quote
By the way, the Lyra player seems to have a "preloader" and from this preloader it's lauch the actual MP3 player software. On the player HDD, a directory is called "lyra_sys" which contains a couple of executable files. And I guess that the ONLY file that I will need to "rebuild" with ROCKbox is the one called "mp3.exe".

Do you think I'm in "danger" of renaming or changing that file only. From what I know about hardware (PC, routers, FW, switches, etc...). Most equipment have their "preloader/bootloader" and I don't need to mess with anything else than the application that is actually processing audio files.

Rockbox cannot use software that came from your player (aside maybe from the bootloader).  You'll have to replace everything else.
Title: Re: Step by step - How to port a new MP3 player?
Post by: Bagder on April 07, 2006, 12:33:03 AM
Allow me to point out that we already know what CPU this Lyra player uses:

http://www.rockbox.org/twiki/bin/view/Main/TexasInstrumentsTMS320#DM270

This is good because its a known ARM7 CPU core.

This is bad because we lack docs and I don't think there's any free compiler for the DSP parts...
Title: Re: Step by step - How to port a new MP3 player?
Post by: LinusN on April 07, 2006, 02:55:48 AM
There is a free assembler (gas), but no compiler.
Title: Re: Step by step - How to port a new MP3 player?
Post by: Platin465 on April 07, 2006, 11:17:18 AM
do some research to find out if you can still get into the player if those files become corrupt. If this is also true, then working on Rockbox because a much safer prospect.

You should have no problem if those files become corrupt, as long as you have a working backup of them or the latest firmware, which is those files.  I have one of the Lyra players, and upon seeing those files in it, I proceeded to move them to my computer.  The player no longer functioned as a player.  I moved the files back, and it worked fine again.  So if they become corrupt, and they don't damage the hardware in the process, you shouldn't have any problems replacing the files with working ones to get it back up & running again.
Title: Re: Step by step - How to port a new MP3 player?
Post by: paulheu on April 08, 2006, 05:15:37 AM
There might be something here (http://www.misticriver.net/showpost.php?p=409356&postcount=122)??
Title: Re: Step by step - How to port a new MP3 player?
Post by: LEKO on May 04, 2006, 02:31:18 PM
Allow me to point out that we already know what CPU this Lyra player uses:

http://www.rockbox.org/twiki/bin/view/Main/TexasInstrumentsTMS320#DM270

This is good because its a known ARM7 CPU core.

This is bad because we lack docs and I don't think there's any free compiler for the DSP parts...

How do you know that this player use this CPU?

And, by the way, I try to buy a defective RD2840 to open it and dig into it!!! I missed an auction on eBay a week ago! Damn me!

Do I need to know something aboutthe LCD to start working on a binary??? Does we only need the CPU model to start working on a port???
Title: Re: Step by step - How to port a new MP3 player?
Post by: LEKO on May 16, 2006, 10:33:39 AM
In case some are interested about a possible RCA/Lyra RD2825/RD2840 port!

I'm currently bidding on 2 defective RD28xx player. Once I will receive them, I'll test my electronic skill! Both units miss their battery and internal HDD, but I don't think these components are necessary to start working on the port.

 :)