myMPX
Advertisement


Go Back MyMPx.org > MyMPx.org Forum > General Discussion

Hooray!!! Rockchip SDK!
Like Tree1Likes
Reply
Post New Thread
 
LinkBack Thread Tools
  #511 (permalink)  
Old 11th Apr 2010, 2:37 pm
Member
I love my MPx player
 
Join Date: Jun 2009
Posts: 174
Default


Actually, I think it can be done without file support. We can create an rkp app which reads all the information from txt file in the resources. Then we make simple win32 app tool for configuration where you can go through rkp resources no matter how you want, copying modifying and making changes to already compiled rkp.

of course, it would be much efficient to work with external files but I dont think it can be done. Only one idea is circling in my head. Write some sort of function in the rkp app which will scan the whole memory and will find the handle of the FileOpen function. But I have no idea what to look for, and I dont even know if it is possible to recognize such a handle in this stream of raw data.

But comming back to this language thing.
This variable is the index of order where a particular language is placed on list in the settings. This means that if a player has a different set of languages then perhaps these language IDs wont match in different players. For example what if one player has language which on the other player is not there. I m just thinking about that, thats why I asked you for advice.
Reply With Quote
  #512 (permalink)  
Old 13th Apr 2010, 7:06 pm
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
  #513 (permalink)  
Old 15th Apr 2010, 6:35 am
WIZARD's Avatar
Senior Member
MPx Junkie
 
Join Date: Mar 2008
Posts: 300
Question Read/Write

Flasher86, you are genius!

Now we have full access to the microSD card - which makes possible the creation of PDF-Reader, Text Editor and other useful apps.
Please, tell me, is it hard to port a computer program using the C/C++ sources?
Copy/paste a lot of small platform-independent pieces of the code (for example, PDF-Reader - algorithms of the .pdf opening)?

Last edited by WIZARD; 15th Apr 2010 at 6:39 am.
Reply With Quote
  #514 (permalink)  
Old 15th Apr 2010, 9:03 am
Member
I love my MPx player
 
Join Date: Jun 2009
Posts: 174
Default

Well, there is very little of such libraries that are written in pure ANSI C which is the only language supported by compiler. Though some of the functions may be ported directly - hopefully the crucial ones. I also thought that it will be great to start writing a rich text file viewer (RTF). There are many possibilities now, though I have a question for all of you who has rk260X player with RKP platform whether you also can run rkp files directly from sd card. Because I can, and I wonder if its only a matter of some bug in my player, then not all of us will get use of such file access.

To run rkp files from sd card in my player, I just need to open some dir in sd card so it gets switched to sd card media (as only one of two can be accessed at a time). And then I exit and click game, and it reads them from sd card now. Do you get the same? Coz its the only way to do the whole thing.
Reply With Quote
  #515 (permalink)  
Old 15th Apr 2010, 9:53 am
knob's Avatar
Senior Member
Valued Member
 
Join Date: May 2007
Posts: 1,285
Default

Quote:
Originally Posted by flasher86 View Post
To run rkp files from sd card in my player, I just need to open some dir in sd card so it gets switched to sd card media (as only one of two can be accessed at a time). And then I exit and click game, and it reads them from sd card now. Do you get the same? Coz its the only way to do the whole thing.
Yeah it works that way on my player too.(but I never tried before today!)

What you've done with the file access is awesome!.

What we could do with is a library of routines to enable us to port games and apps. I was looking at porting and found it limiting working in Ansi C only.

We need extra libraries for screen and graphics too, but it looks like you have already worked out the file handle bit which is brilliant.
__________________
-----------------------------------------------------------------------------------------------------------
Reply With Quote
  #516 (permalink)  
Old 15th Apr 2010, 10:28 am
WIZARD's Avatar
Senior Member
MPx Junkie
 
Join Date: Mar 2008
Posts: 300
Red face Rkp

Quote:
Originally Posted by flasher86 View Post
To run rkp files from sd card in my player, I just need to open some dir in sd card so it gets switched to sd card media (as only one of two can be accessed at a time). And then I exit and click game, and it reads them from sd card now. Do you get the same? Coz its the only way to do the whole thing.
To run the apps from microSD card in my player, I must create the GAME folder.
And I can't run the apps from the player's explorer.
Performance: Wolf3D's FPS is nearly the same (sometimes even higher)
__________________
Heroes of Might and Magic V - The Best Game In The World !
Try to play !
Reply With Quote
  #517 (permalink)  
Old 15th Apr 2010, 12:17 pm
Member
I love my MPx player
 
Join Date: Jun 2009
Posts: 174
Default

Quote:
Originally Posted by WIZARD View Post
To run the apps from microSD card in my player, I must create the GAME folder.
And I can't run the apps from the player's explorer.
Performance: Wolf3D's FPS is nearly the same (sometimes even higher)
Yeah, I get the same, folder GAME must be placed just like on flash memory.

Quote:
Originally Posted by knob View Post
Yeah it works that way on my player too.(but I never tried before today!)

What you've done with the file access is awesome!.

What we could do with is a library of routines to enable us to port games and apps. I was looking at porting and found it limiting working in Ansi C only.

We need extra libraries for screen and graphics too, but it looks like you have already worked out the file handle bit which is brilliant.
Yeah, I am thinking of savedialog and opendialog.

Here is the sample of this. If you run this from flash memory the player will hang. If you run this from SD Card it will list all the files in the root dir.

SDCARD.rar

BTW. I have problems with getting long names of files. FatFS lib includes long file name support, but I get troubles in assigning pointer to unicode string, I will keep trying with this. And look at the size of this rkp. Including this lib from SDK to access SDCard caused a lot of unnecessary code to be included in rkp, also a lot of warnings about overleap of memory regions are raised - though we have nothing to worry about, as we use only two functions from there.

Last edited by flasher86; 15th Apr 2010 at 12:22 pm.
Reply With Quote
Sponsored Links
  #518 (permalink)  
Old 15th Apr 2010, 1:06 pm
Alis's Avatar
New Member
 
Join Date: Apr 2009
Location: Viseu - Portugal
Posts: 9
Default

Can anyone make a new app ???
And a big problem of this is because my rockchip 2608 and many others doesn't have a sd slot.

:-(
Reply With Quote
  #519 (permalink)  
Old 15th Apr 2010, 2:50 pm
Member
I love my MPx player
 
Join Date: Jun 2009
Posts: 174
Default

well, currently its only for players with SD slot, sorry. Perhaps in future something will change.
Reply With Quote
  #520 (permalink)  
Old 15th Apr 2010, 7:08 pm
Member
I love my MPx player
 
Join Date: Jun 2009
Posts: 174
Default

Well, guys. I noticed something. To implement this file access support, I wasted almost all the available memory. I even bent the limits in *.lcf file because I got messages that I am out of memory. Is there any way to elicit from this lib: RK_MLC_USBFS_SD.A only those functions that are necessary? Because in Memap.txt you can see parts of this lib, and there is SD.OBJ, so maybe we can optimize it, and know what memory regions are necessary to add to link script file, and which are not.

Anyway, I handled long file names, but what really creeps me out is that problem with memory :-/ If I don't do something, we won't create any nice app because we quickly run out of it.

Perhaps some of you are familiar with Link Script Files which sdcc uses? How to rearrange it to gain more mem?
Reply With Quote
Reply

Sponsored Links



Similar Threads
Thread Thread Starter Forum Replies Last Post
NEW rockchip player (Rockchip RK27xx series) availability knob General Discussion 38 12th Nov 2008 10:47 am
Rockchip Editor: for Rockchip 27xx ALP1987 Support and How To 6 17th Oct 2008 5:25 pm


All times are GMT -7. The time now is 7:33 am.


Powered by vBulletin® Version 3.8.6
Copyright ©2000 - 2015, Jelsoft Enterprises Ltd.
Content Relevant URLs by vBSEO 3.6.0 RC 2
Back to Top

Designed by indiqo.media