myMPX
Advertisement


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

Hooray!!! Rockchip SDK!
Like Tree1Likes
Reply
Post New Thread
 
LinkBack Thread Tools
  #551 (permalink)  
Old 29th Apr 2010, 5:18 am
Member
I love my MPx player
 
Join Date: Jun 2009
Posts: 174
Default


Quote:
Originally Posted by knob View Post
Never had the memory hack problem myself.
Someone here has fixed a Rockchip memory hack:-
[Tut] hwo to remove memory-hack on Rockchip Mp4-players.
but not sure which version it refers too.
Hm, I tried that, and it didn't work. Mainly because its not a hack right now, but broken chip which is being detected during firmware upgrade. At some point during FW update, it gets into Rock USB mode and there information about partitions are being transmitted.

Quote:
Originally Posted by knob View Post
btw have you had issues with do,while() and printf() with the rk26xx Sdk/Gdk?
I've been looking at porting again and had some problems with bugs in the SDK.
I am using while() all the time. Also sometimes sprintf (for converting decimals to strings) but printf doesn't work for me. I am curious how sig11 is using printf (have you introduced some nice console?).

Though whole SDK is very buggy. btw sprintf doesn't support long data type. This function acts like it was signed int then.
Reply With Quote
  #552 (permalink)  
Old 29th Apr 2010, 10:25 am
Junior Member
 
Join Date: Sep 2009
Posts: 31
Default

Quote:
Originally Posted by flasher86 View Post
I am using while() all the time. Also sometimes sprintf (for converting decimals to strings) but printf doesn't work for me. I am curious how sig11 is using printf (have you introduced some nice console?).

Though whole SDK is very buggy. btw sprintf doesn't support long data type. This function acts like it was signed int then.
You should to implement two functions fputc() and fwrite(). After this your prinf() will be work.

int fputc(int ch,int handle)
{
if ( ch & 0xFF )
outch1(ch & 0xFF);
if ( ch >> 8 )
outch1(ch >> 8);
return 1;
}

int fwrite(const char* buff,int isize,int count,int handle)
{
int i;
int j = count;
while ( j > 0 ) {
for ( i = 0; i < isize; i++ ) {
int ch = *buff;
outch1(ch & 0xFF);
outch1(ch >> 8);
buff++;
}
j--;
}
return count;
}

where outch1() is your function for output of one char.

My console driver is not ready yet ( cursor is missing, 8x16 font only, CP866 only, no UTF8 support e.t.c. )
Reply With Quote
  #553 (permalink)  
Old 29th Apr 2010, 10:49 am
knob's Avatar
Senior Member
Valued Member
 
Join Date: May 2007
Posts: 1,285
Default

That great! thanks.
I have been trying to emulate the conio.h functions like clrscr(), gotoxy() getch()to make game porting easier.

I was having problems making a while loop work for a getch() to emulate an operation like "press any key" I'll give it another try.

tried this instead of while:-

int KeyVal;
KeyVal=(*GetKeyVal)();
KeyVal=KeyVal&0x1FFF;

for ( ; ; )
{
if (KeyVal==KEY_VAL_PLAY)
break;
}
player just locks up, got something to do with detecting the keypress.
__________________
-----------------------------------------------------------------------------------------------------------

Last edited by knob; 29th Apr 2010 at 1:11 pm.
Reply With Quote
  #554 (permalink)  
Old 29th Apr 2010, 1:23 pm
Junior Member
 
Join Date: Sep 2009
Posts: 31
Default

Quote:
Originally Posted by knob View Post
That great! thanks.
I have been trying to emulate the conio.h functions like clrscr(), gotoxy() getch()to make game porting easier.

I was having problems making a while loop work for a getch() to emulate an operation like "press any key" I'll give it another try.

tried this instead of while:-

int KeyVal;
KeyVal=(*GetKeyVal)();
KeyVal=KeyVal&0x1FFF;

for ( ; ; )
{
if (KeyVal==KEY_VAL_PLAY)
break;
}
player just locks up, got something to do with detecting the keypress.
Use this instead of (*GetKeyVal)();

#define KEY_PORT GPIO_PDAT0
unsigned int getKey()
{
unsigned int KeyTemp;
KeyTemp = read_mem(KEY_PORT);
KeyTemp = ((~KeyTemp) & 0x3f) | (KeyTemp & 0x40);
return (KeyTemp);
}
Reply With Quote
  #555 (permalink)  
Old 29th Apr 2010, 1:28 pm
Alis's Avatar
New Member
 
Join Date: Apr 2009
Location: Viseu - Portugal
Posts: 9
Default

(Sorry for my bad English)
Does this means that we are going to be able to run an app that can read files from FLASH ???
Reply With Quote
  #556 (permalink)  
Old 29th Apr 2010, 5:24 pm
Member
I love my MPx player
 
Join Date: Jun 2009
Posts: 174
Default

Quote:
Originally Posted by knob View Post
That great! thanks.
I have been trying to emulate the conio.h functions like clrscr(), gotoxy() getch()to make game porting easier.

I was having problems making a while loop work for a getch() to emulate an operation like "press any key" I'll give it another try.

tried this instead of while:-

int KeyVal;
KeyVal=(*GetKeyVal)();
KeyVal=KeyVal&0x1FFF;

for ( ; ; )
{
if (KeyVal==KEY_VAL_PLAY)
break;
}
player just locks up, got something to do with detecting the keypress.
it looks up because it causes an infinite loop because variable KeyVal doesn't change no matter what happes with (*GetKeyVal)() as the result of this function is assigned to KeyVal before the loop. You should use (*GetKeyVal)() inside the loop.

Another problem with that is that if a one cycle of main() function tooks too much time, it locks up no matter how properly it is designed. In my case it keep hanging after about 2 seconds of executing main(), so this function must hang. Try to do this using multiply main() function variable dependent loop which will work for sure. Its because main function is executed directly by FW code every single time, and between those calls to this function it does some necessary operations (not sure what exactly though). For instance screen doesn't get refreshed before one cycle of main() is executed. If we draw a bitmap, it will be displayed only after main() function is ended.

But normal use of "getch()" or "repeat until keypressed" (pascal) is as far as I know impossible to implement. We must follow tricks to do that, because to be honest, when I first met RKP platform I was surprised by the way its all running (infinite loop of main function - in opposite to normal console app where main is executed once and thats it.

Quote:
Originally Posted by Alis View Post
(Sorry for my bad English)
Does this means that we are going to be able to run an app that can read files from FLASH ???
For now we can only read RAW data of flash memory, but implementing filesystem is possible, so probably yes - it will be possible to read files from flash - not sure about writing though, but who knows

SIG11. But isn't your function reading values only from standard button input? I got touchpad, so most probably (*GetKeyVal)() is something that should be left original way because it may be written differently - depends on used input keyboard driver in a particular rk26 model player.

Last edited by flasher86; 30th Apr 2010 at 6:04 am.
Reply With Quote
  #557 (permalink)  
Old 30th Apr 2010, 8:42 am
knob's Avatar
Senior Member
Valued Member
 
Join Date: May 2007
Posts: 1,285
Default

Quote:
Originally Posted by flasher86 View Post
Another problem with that is that if a one cycle of main() function tooks too much time, it locks up no matter how properly it is designed. In my case it keep hanging after about 2 seconds of executing main(), so this function must hang. Try to do this using multiply main() function variable dependent loop which will work for sure. Its because main function is executed directly by FW code every single time, and between those calls to this function it does some necessary operations (not sure what exactly though). For instance screen doesn't get refreshed before one cycle of main() is executed. If we draw a bitmap, it will be displayed only after main() function is ended.
That makes perfect sense, it is exactly the problem I have had, nothing gets displayed on screen, when logically it should.

Keeping this in mind, I will have another go at this, thanks again, flasher.
__________________
-----------------------------------------------------------------------------------------------------------

Last edited by knob; 30th Apr 2010 at 8:46 am.
Reply With Quote
Sponsored Links
  #558 (permalink)  
Old 30th Apr 2010, 10:06 am
Member
I love my MPx player
 
Join Date: Jun 2009
Posts: 174
Default

Quote:
Originally Posted by knob View Post
nothing gets displayed on screen, when logically it should.
yeah no problem. I discovered that thing while doing some animation. I was going nutts figuring out why it gets displayed only last frame of animation (as it refreshes screen after main function). About this refreshing screen, it can be done inside our code manually. I even started to wonder whether it will be more effective and optimal to display everything at low level (uploading display buffer directly to the screen driver memory, but I havent given a shot yet).

BTW. Open Dialog is almost done. Going into directories works, as well as coming back up level, also I introduced icons (in the sd card there must be icons folder in which icons in bmp format are stored and named like extentions of files ex. txt.bmp, gif.bmp and so on). Now I am trying to make scrolling of the filenames longer than possible to display in a row. Next will be filtering filelist only to files that we are interested in, and its done.
Reply With Quote
  #559 (permalink)  
Old 30th Apr 2010, 11:38 am
Junior Member
 
Join Date: Sep 2009
Posts: 31
Default

Quote:
Originally Posted by flasher86 View Post
it looks up because it causes an infinite loop because variable KeyVal doesn't change no matter what happes with (*GetKeyVal)() as the result of this function is assigned to KeyVal before the loop. You should use (*GetKeyVal)() inside the loop.

Another problem with that is that if a one cycle of main() function tooks too much time, it locks up no matter how properly it is designed. In my case it keep hanging after about 2 seconds of executing main(), so this function must hang. Try to do this using multiply main() function variable dependent loop which will work for sure. Its because main function is executed directly by FW code every single time, and between those calls to this function it does some necessary operations (not sure what exactly though). For instance screen doesn't get refreshed before one cycle of main() is executed. If we draw a bitmap, it will be displayed only after main() function is ended.

But normal use of "getch()" or "repeat until keypressed" (pascal) is as far as I know impossible to implement. We must follow tricks to do that, because to be honest, when I first met RKP platform I was surprised by the way its all running (infinite loop of main function - in opposite to normal console app where main is executed once and thats it.


For now we can only read RAW data of flash memory, but implementing filesystem is possible, so probably yes - it will be possible to read files from flash - not sure about writing though, but who knows

SIG11. But isn't your function reading values only from standard button input? I got touchpad, so most probably (*GetKeyVal)() is something that should be left original way because it may be written differently - depends on used input keyboard driver in a particular rk26 model player.
Try attachment.
Does it work on your player?
Attached Files
File Type: zip fap1.zip (26.2 KB, 12 views)
Reply With Quote
  #560 (permalink)  
Old 30th Apr 2010, 3:42 pm
Member
I love my MPx player
 
Join Date: Jun 2009
Posts: 174
Default

It shows START...
I press some key and it shows some number just below it (66 or 64?), then there are some messages and "Press any key to continue" text. After that nothing.

I don't know if this suppose to continue after some key is pressed but it stucks here(no quit possible). Also I noticed that backlight of my touchpad is always turned on in your application, while by default it turns on when I hit the button and turns off about a sec later. So I don't think that it should be used - it interfere custom input driver.

Beside that, its amazing how your console works. I like it!

EDIT:
I downloaded file manager from your repository, and it doesn't get stuck before init, but keyboard isn't working on my player. It acts like it was always the same button. Waiting for a new version so I can test it. It looks nice.

Last edited by flasher86; 30th Apr 2010 at 3:47 pm.
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 10:24 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