Code:
ROM:600815A0 BL delay_nopsCode:
ROM:60081314 MOV R1, #1Code:
Mcupanel_RegSet(0x600, 1); |
Hi!
I'm a new user of Rockchip players. My one is Rizone hacked "32GB" (actually 4GB), and the chip is RK2705 (almost equal to RK2706). It has 400x240 touchscreen, microsd slot and 4 buttons (+reset). I've put my firmware here: http://www.mediafire.com/chiprocker What I've found by now: 1) The player supports SDHC class6 cards (mine is 8GB). 2) It's easy to compile the firmware using RK27SDK, but it doesn't work on player. Haven't tested the emulator yet. 3) It's easy to use SDK to compile RKW file from original firmware folders you've dumped from your player. This way the process of recovery with RK27DM becomes very easy. 4) Inside the player I've found a 24MHz quartz; however, there's a 12MHz value in SDK files. Maybe, it should be changed. I'm rather experienced C/C++ coder and I'm interested in good firmware for the player too. Maybe I'll try porting roxkbox when we collect some more info. Alemaxx, how do you work with firmwares in IDA? |
hi ChipRocker. Welcome. The more members who can help out the better, we are in need of anyone with c/c++ experience. :)
We have a lot of information already we just need to get enough members with the right experience interested. Quote:
Quote:
|
Hi ChipRocker,
yes, I use IDA and sometimes arm-elf-objdump. If you have IDA, load the BASE.RKW as embedded rom-image, choose ARM architecture and load address (ROM) 0x5FFFFFD4. When its loaded go to location 0x60000000 and press 'c'. This should give you a branch (/jump) to some code thats installs the ARM exception handlers. Following the reset vector directs you to the firmwares main(). By comparing the disassembly with the source from the SDK (rename those sub_XXX by pressing 'n') its quite easy to make sense out of it. For a more detailed description have a look at this: RKW Firmware Patching (dont use that patching program on the page). Btw, Im also working on getting a real firmware running on the rk27 platform to get rid of this ultra crappy RockOS. So far I was aiming at ucLinux. I didnt get the UART working, so development is going really slow. A major step would be to get some virtual UART via USB (using CDC and ACM). I already found code for a virtual usb uart implementation for another platform but this doesnt seem to become easy at all (at least for me). Regards |
Here is what I got for the init code
(warning: may contain wrong values, this is an error-prone preocedure): Code:
void KnobsLCD_PowerOnInit(void)Code:
-#define LCDPANEL MCUIF_ILI9320_16BCode:
void Mcupanel_PowerOnInit(void) |
AleMaxx, thanks a lot!
Looking at your disassembly I've found similiar code in my own firmware. And...... the code is from hw_Ili9320.c! Hmm... that means my code is already used when building firmware... |
Hi ChipRocker,
so the firmware you build ends up as an .RKW file and if you copy it to the System folder it does not get executed? What exactly does happen? In my first attempts to write my own code I modified a firmware internal filename ("HOLDON.BIN") to get some feedback. The firmware will write to/create this file when the player is turned off. You could compare the disassembly of your built against the original firmware maybe using Code:
arm-elf-objdump -D -m arm -b binary BASE.RKW | cat > BASE.asmWait, did you check whether you have an 16bit or 18bit interfaced lcd? Locate that transform function thats called from within mcu_writereg and then its a matter of 0xFC00 or 0x3F00 iirc. Regards |
When I use the base.rkw built with sdk, and try turning the player on, it just gives a single flash of backlight and does nothing more.
Reset gives the same reaction. However, when plugging USB in, the screen shows a few lines of crap, and the player gives access to all disks. Looks like a problem is not in screen init, but it's more fundamental. Yes, I'm comparing the firmwares using IDA. Looks similiar, but there are differences. Continue digging... No, I don't think the problem is in CRC; if you try running 'version.exe -F:base.rkw' it says, that CRC32 is ok. Both firmwares have 0xFC00. |
Okay, I dont have anymore ideas but to actually confirm that the initialization is okay you could try changing the fill color in the last part of the init to something else then black possibly adding a "delay_nops" after or inside the loop. Btw, there is some more code in the lcd init procedure that gets executed afterwards and prevents access to the screen via mcu_xxx routines. If you out comment these lines:
Code:
/* |
Oh, I've mistaken a bit.
The code was just _like_ in hw_Ili9320.c, but actually not the same. I've spent about an hour rewriting this file using the disassembly of original firmware, and now what.... I have the screen working!!! The player still doesn't start with play button - just flashes backlight (any ideas?). BUT when I plug in usb, it gives access to disks, and shows random pictures (the order is wrong) from resources on red background!! That means that the screen init function works OK!! |
My screen is working now too. But it is flickering badly. Just copied the settings from the dump above into hw_lli9320.c too.
Needs some more work, but its a lot better at least I can make out the menu option I'm in.. just My start/stop/play/pause button works ok and so do the navigation buttons, but they are mixed up. |
No, I dont have any ideas, this could be related to just anything that follows the lcd init and currently we dont have any real debugging capabilities to pin it down. I never compiled the firmware myself but I wrote some tool to make the hidden partition show up. It basically sends a SCSI Read12 command with LBA=0xFFFFFFFE and LUN=0xE0 (bottom of BulkOnly.c). If the USB mass storage is working you could plugin some more cases there basically establishing a communication link. You could even upload code and execute it on the device, fetch messages, etc...
If that works you could define some debug-printf alike function that writes messages to a buffer that you later on fetch via the above method. What do you think? Btw, if youre on linux I can send you my SCSI code as a starting point for the host side app. If youre on Windows I think its possible to emulate these SCSI commands with bulk transfers using libusb. There is some firmware tool for rk26xx players that does just that SourceForge.net Repository - [s1mp3] Index of /trunk/rockchip/rkfwx (iirc). Good luck! knob, you used the c code I pasted? Did you compare it to the disassembly? Also did you keep the ScanDirSet and Standby functions from the original ILI? These may not work with your lcd and may lead to this behaviour. I assume you set LCD_W and all other defined appropriately. |
I'll recheck the code against the disassembly. LCD_W and LCD_H I already set for the emulator.
Yes I did keep the ScanDirSet and Standby functions from the original ILI so that might be the problem. Thanks for your help we are making good progress. ;) |
Well, your init code looks to be much more similar to fd5420 then to ili9320 and for the fd5420 ScanDirSet is just left empty. If that doesnt fix it maybe try to plug in the other functions that I posted where they seem to make sense. Although the one that takes the array/struct argument doesnt seem to fit anywhere I think.
|
Hey, I am thinking of buying a new player, 2706 based. And I wonder which one would be the best for my needs.
My player should have: - normal buttons, on the right (not on upper or lower side) - no touch screen - no big screen - components supported by SDK, so I would create some stuff Any tips? |
This is the best Rk27xx I found so far for the price, its the one I am working on now:-
8GB 3 16:9 QVGA MP3 MP4 MP5 Player FQ5-8R [MP4] - $43.74 : TinyDeal Direct Online Store, MP4/MP3 Player, Mobile Phone, Memory Card, Accessories you can get a 4GB for a bit less too |
Got the display perfect now just had to set the right screen in sysconfig.h to 400x240:-
Quote:
update yes!. The display is fully sorted now. Just copied the standby setting from fd5420. Noticed the loudspeaker doesn't work when the earphone is unplugged. Need to look at that next. :) http://i203.photobucket.com/albums/a...a/P1010096.jpg:D |
Well, knob, your player seems to be good. Resolution 400x240 is just perfect for me, although are those buttons doing their job? I mean, isn't it tiresome to click them? I want to have player with really nice and easy keyboard input. I looked through the list of functions and I noticed that it has fewer functions that SDK has. Is it correct? By creating your firmware you will get NES and AlbumArt support?
And one more thing, I am from Poland, how to check on that site the cost of shipment? |
Hi flasher86,
I dont know what particular features this player has, but from the button layout I would say its not suited for playing nes-games. Actually I havent seen any rockchip player that has a game-friendly keyboard layout. If youre looking for such kind of player I would recommend one of these Sunplus SPMP305x players (Main Page - Sp305x wiki). The CPU is less powerful, its an ARM9 @ approx. 168MHz but its an ARM9 so it has an MMU which the rk27s ARM7(+dsp) lacks. The shipping costs at tinydeal are zero Zloty I think (top of page). Regards |
Actually I am not so interested in games. I would stick to rockchip. But despite unfortunate button layout it is possible to expand functionality of the player, assuming that SDK RK2706 is even more up to date than original firmware. I'm just thinking
For example, on seller-site knob gave it says that it doesn't support FLAC nor APE, while SDK includes the codecs for them. Though I may be wrong at this. |
Of course you can add all kind of codecs, they're not hardware dependent. Btw, gamewise a touchscreen player would be just perfect for any type of games that rely on mouse control like those old lucas arts adventures (ScummVM) etc.. Anyway, things like FM-radio, touch-screen and the like have to be supported from the start and you cant use the SDK/software to add these later on.
Regards |
Quote:
For me it is more important to be able the make the player the way I want it than how the player looks. I'm not worried about the buttons because they can be remapped anyway if you got the SDK. |
Quote:
BTW. SWRIL has answered about file access in RKP files. Currently it works only on SLC memory, and I am not sure how he did it. As I looked through the file he uploaded, it seems that he modified the firmware to add file system functions to memory of Platform_fun. If I am correct, then file access will be available only on modified firmwares, therefore such a solution is not helpful for most people (including me with keyboard problem, and including you with lack of backup firmware for your rk2608 player). I hope I'm wrong, because if I am not, I still don't get file access. EDIT: I was right, file functions are usable only by using modified firmware. |
There is a nasty bug in the SDK.
The audio only plays one channel, but through both earphones, My original firmware is ok, so it should be fixable in the SDK, however this could be difficult as we do not have any RK27xx datasheets at all. I wonder if anyone else is getting this? If we can't get this fixed the project is dead in the water. :( |
I looked through the code and it looks ok. Perhaps player thinks it is in speaker mode (even RK260X players controls speaker digitally). Check whether this happens to all the audio codecs. If you can, make some on screen messages in audio source files, so you can see what happens with buffers and variables. Make a check function which will check if Right and Left buffers are the same. And if they are different, then check at what point they become the same. In RK260X pcm buffer is joined together from two channels, maybe it is the same with 2706. If that so, also check whether it combines the channels properly. It should be combined into buffer of INT. One left INT, next right INT and so on.
If there's a bug in compiled codecs, then it is for sure dead project. I hope you will figure this out, because I already made a decision to buy 'your' player, but only if SDK works perfectly. |
I buyed this player last week LINK. In Options-> System information it says:
Product name: RK27SDK Major version ID:2.2 Hardware ID:080722 The memory size is 16 gb. There is a problem reproducing music: the volume of the singer in all songs is too low! The instruments and the base of the song is perfect but the singer volume is very low!! do you know why? Is it possible to modify my new firmware with another firmware only in the part that regards music player? Thank you in advance guys! |
Quote:
There is no worry with the codecs, they are installed in a folder outside the firmware in Rk27xx, so you can swop them around as long as the firmware supports them. I'll have a dig around to see if I can turn the "speaker mode" off. |
Quote:
|
Quote:
BUT, What is even more weird, is that when I had problems with mini-jack socket in my player (already fixed) sometimes it happened that I heard only background of the music (though distorted) without the voice (or at low level). I don't know how was it possible that it was splitting the sound because of broken minijack, but that's a fact. Perhaps it is the same with you. I would recommend you to test mono music file in your player (as it doesn't store surround phase information) and see if the voice is louder. If it helps, you must reconvert every single song, cutting of the surround phase information (but I don't know yet how to cut it off, I don't know software for that). |
Knob, could you post your source code for your player's firmware because I have the 4 gig version of your player, but, every time I try to compile the firmware and copy it to my player, it formats both my partitions and so I keep having to revert to my original firmware.
Also, does the vol key on your player work as the back button, because I think I have found the problem if that's the case. |
Ok I'm uploading it now. LINK:- http://www.sendspace.com/file/fjfwpa
I have been playing around with the bmps and fonts though and trying to remap the keys. My "up" volume works ok, but I can't remap the down volume! I don't have any problem with the partitions, not sure if it will help, your player could be different. Does music play ok on your player? Please post your findings, we need many members involved. |
Hi knob, I've been trying to get to audio sources in your SDK, and I have terrible news so far! :( The most important audio functions are precompiled into this file: RK27XX_EQ_V071228R.a
It's a shame, because SDK for RK260X has these functions kept open source. look at msaudspapi.h file. There are functions listed connected with processing audio buffer at very last point of decoding data (uploading PCM data to audio digital processor). You can try changing the arguments of calling these functions. There are interesting values to set like ms_set_leq_target. I really hope you'll fix the audio, because I want to buy the player as yours as soon as possible. $43 and free shipping is not big money, you know it's tempting :D |
I think something is wrong with my compiler, it will not compile certain commands. It declares them as variables.
Knob, thanks for the source code, now i know that I'm getting somewhere because my screen now initialises :D but then goes red.:(. Could you post a compiled version of your firmware because I'm pretty sure my player has the same hardware as yours just less storage space and i think my compiler dosen't like me (:confused:) |
Here's compiled firmware from SDK ;-
http://www.sendspace.com/file/e732nq |
Thanks knob, much appreciated!
|
Hey knob, what's new? Have you looked at HW_rockcodec.c file in order to try to solve your audio problem?
|
Quote:
I contacted the seller and he says to me that he can remplace the player but I ship me the player only after he received my player (the one that I've now). Who guarantee to me that he ship me the new player? Thank you in advance guys :( |
Quote:
I'm sure there must be a way to make this work, this firmware is designed for more than 1 player type, but I can't see anything that looks like a solution. I was hoping the audio would be ok, this is a difficult area for me to fix. :( I was hoping someone else would test the firmware out on a different player, I'm SURE someone has, I just wish members would share information a bit more.:( |
Too bad, it would be great if someone who has a working SDK verified one-channel audio problem. As I looked SDK provides 2 or 3 different types of codecs for that. Have you tried to switch them? And perhaps trying unplug headphones and see whats happening on different codecs.
I'm looking forward to the solution, and also I'll try to get deeply into the source, there should be something. |
Hi Knob,
so your selfbuilt firmware has audio problems while the original firmware doesnt? In that case I would recommend to look at the working firmware code and compare it to the sdk source. This would require some ARM assembler knowledge and I recommend the non-free IDA disassembler. Have a look at one of my previous posts where I explained how to load a BASE.RKW firmware file if youre not familiar with this. If youve got any further questions, just ask. I havent dealt with sound so far. Also are you interested in getting a real OS running on your player or just modifying that rockchip firmware? Regards |
| All times are GMT -7. The time now is 8:38 pm. |
Powered by vBulletin® Version 3.8.6
Copyright ©2000 - 2015, Jelsoft Enterprises Ltd.
Content Relevant URLs by vBSEO 3.6.0 RC 2