View Single Post
  #512 (permalink)  
Old 13th Apr 2010, 7:06 pm
flasher86 flasher86 is offline
Member
I love my MPx player
 
Join Date: Jun 2009
Posts: 174
Default

Hooray!! I successfully read data from sd card using RKP platform! Currently, it works only in RAW mode. So I can move forward through sd card data just like in some windows hex editor editing the whole physical drive media. I don't know how to decrypt the partition table, or read out file list and such, but we can definitely read data from SD card.

I though that we wont succeed in reading files from flash memory (different types of flash memory and so on), but sd driver must be the same for all versions of FW for rockchip 26xx. So I added library named RK_MLC_USBFS_SD.A to the compilation of the rkp test file and got access to these functions:

PHP Code:
extern    uint8    MediaSetup(uint8 memory);
extern    bool     SDWaitReady(void);
extern    bool     Before_CMD_SDWaitReady(void);
extern    uint8   SDWaitFifoReady(void);
extern    bool     CardCheckIn(void);
extern    uint8     SDInit(void);
extern    void     ReadCsd(uint16 *buf);
extern    uint8     SdCmdInit(void);
extern    bool     SdWriteSec(uint32 LBAuint16 coluint8 *bufuint16 Lengthuint8 width);
extern    bool     SdReadSec(uint32 LBAuint16 coluint8 *bufuint16 Lengthuint8 width); 
I've just tested SdReadSec and it shows some raw data from my microsd card, which I confirmed on pc is the same data I saw on my player, so its not random stuff.

BTW. It works only if I run rkp file directly from SD Card memory.

I think its breakthrough, it makes it possible now to gain file access directly from RKP platform, including write!!

EDIT:
Ok, I implemented support for file system, using this library http://elm-chan.org/fsw/ff/00index_e.html
It opens files successfully and reads them as well. In the evening I will make a test rkp app for everyone who is interested.

Too bad it doesn't work with internal flash memory, but sd card is not that bad.

Last edited by flasher86; 14th Apr 2010 at 9:33 am.
Reply With Quote