DB3210 - Drawing on player possible - developers needed : Эльфостроение : Форум

Страница 1 из 3: [1] 2 3 »

 mc_kibel:
17.07.10, 05:59
 Hi :-)

Today I was playing with my SE a little.
From some time I tried to draw on player without a patch - but it seems to be impossible.

I found UltraShot's post on Se-Developers (I saw this post long time ago, today I remembered about that): http://se-developers.net/viewtopic.php?f=28&t=278#p2728
The most important thing here is a patch :-)

I started searching hook for this patch in C901 main:

Код: 
(...)
ROM:14D27A00 08 49                       LDR     R1, ONREDRAW_METHOD
ROM:14D27A02 20 1C                       ADDS    R0, R4, #0
ROM:14D27A04 00 F0 2A F8                 BL      _DISP_DESC_SetOnRedraw
(...)
ROM:14D27A24 85 4E 49 14 ONREDRAW_METHOD DCD loc_14494E84+1
(...)


Entrypoint found :-P

Here's the patch:
Код: 
include "x.inc"
;C901 SW-R1GA028
;"PlayerChanger patch"
;Ability to redraw Walkman by elf
;(c) UltraShot
;(p) mc_kibel

hook1         = 0x14D27A24
patch         = 0x15DB69F0
FindBook     = 0x1416DA65
strcmp         = 0x14C80395

;-------------------------------------------

org hook1
    DCD patch1+1

;-------------------------------------------

org patch
patch1:
    PUSH {R0-R7,LR}
    BL ReceiveSignal
    POP {R0-R7,PC}
ReceiveSignal:
        PUSH        {R0-R7, LR}
        MOV        R7, R0
        LDR        R0, dword_IsPCBook
        LDR        R6, dword_FindBook
        BLX        R6
        CMP        R0, 0
        BEQ        BookNotFound
        LDR        R5, [R0, 0x18]
        MOV        R0, R7
        BLX        R5
        POP        {R0-R7,PC}
BookNotFound:
        MOV        R0, R7
        POP        {R0-R7, PC}

;-----------------------------------------------
;check our book
isPCBook:
        PUSH    {LR}
        CMP        R0, 0
        BEQ        isPCBook_Error
        LDR        R0, [R0]
        LDR        R0, [R0, 4]
        adr        R1, dword_MyBook
        LDR        R3, dword_strcmp
        BLX        R3
        CMP        R0, 0
        BEQ        isPCBook_Exit
isPCBook_Error:
        MOV        R0, 0
        POP        {PC}
isPCBook_Exit:
        MOV        R0, 1
        POP        {PC}
;-----------------------------------------------
align 4
dword_FindBook    DCD FindBook
dword_strcmp     DCD strcmp
dword_IsPCBook    DCD isPCBook+1
align 4
dword_MyBook     DCB "AdvPlayer",0


I can draw on Walkman screen, but
- restoring old redraw doesn't seems to work - phone always reboots:
I tried like this:

Код:
DISP_OBJ_ONREDRAW_METHOD oldredraw=(DISP_OBJ_ONREDRAW_METHOD)(0x14494E84+1); //address for c901 r1ga028
void Redraw(DISP_OBJ *DO, int a, int b, int c)
{  
  oldredraw(DO,a,b,c);
};


Reboot. So I tried: if (oldredraw) oldredraw(DO,a,b,c); - the same result.

But it's not the most important problem. The most important problem...
How can I get path and name to file currently played by phone?
In db2020 it was easy,

Код: 
typedef struct
{
  u16 unk;
  u16 unk2;
  wchar_t * path;
  wchar_t * name;
  wchar_t * MIME;
  int fulltime;
} BOOK_PLAYER_TRACK_DESC;
  
  
typedef struct
{
  char dummy[0x5C];
  wchar_t pos;
  char dummy1[0xE];
  int time;
  char dummy2[0x4];
  BOOK_PLAYER_TRACK_DESC * dsc;
  char dummy3[2];
  wchar_t pos2;
  wchar_t pos3;
  char dummy4[22];
  int tracks_count;
}BOOK_PLAYER_2020;

void somefn (){ 
BOOK_PLAYER_2020 *bkp=(BOOK_PLAYER_2020*)bk;
wchar_t *filename = bkp->dsc->name;
wchar_t *filepath = bkp->dsc->path;
}


And then we could get tags - now I can't, because structure of AudioPlayerBook in DB3210 is different. Don't care about MetaDataDesc_Create / Destroy / GetTags functions, it's not hard to get ID3 tags from file, even without function in library.

So... Anyone ? How to get name and path of file currently played by phone in DB3210?


NOTE: Title / artist on photo is taken from image :P

[ Edited by mc_kibel в 17.7.10 05:05 ]

[ Edited by mc_kibel в 17.7.10 05:06 ]

Прикрепленный к сообщению файл:

DSC01748_kopia.jpg DSC01748_kopia.jpg (62.37 kb; 906 hits) Скачать файл
DSC01752_kopia.jpg DSC01752_kopia.jpg (105.39 kb; 937 hits) Скачать файл
MOV01739.zip MOV01739.zip (641.67 kb; 74 hits) Скачать файл

 Joker XT:
17.07.10, 08:24
 Чё он хочет?)
Чтоб мы всё нашли чтоли и дал ему? :D

 АБВЭЮЯ:
17.07.10, 09:47
 
How to get name and path of file
currently played by phone in DB3210?

Как получить имя и путь
файла который игрaeт в нaстоящиe врeмя нa DB3210?
Вот что он хочeт.

 den_po:
17.07.10, 10:26
 
mc_kibel пишет:
Don't care about MetaDataDesc_Create / Destroy / GetTags functions, it's not hard to get ID3 tags from file, even without function in library.

http://perk11.info/svn/SE/Dlls/LibraryDLL/main.c

 mc_kibel:
17.07.10, 14:44
 
den_po пишет:
mc_kibel пишет:
Don't care about MetaDataDesc_Create / Destroy / GetTags functions, it's not hard to get ID3 tags from file, even without function in library.

http://perk11.info/svn/SE/Dlls/LibraryDLL/main.c


I know about those functions, too :) But as I wrote before, tags are not problem, only path to file currently played by phone.

Joker XT пишет:
Чё он хочет?)
Чтоб мы всё нашли чтоли и дал ему? :D


In short:
typedef struct
{
....
}BOOK_PLAYER_3210

:-D

 Joker XT:
17.07.10, 16:07
 А сам?
Слей книгу плеера

 mc_kibel:
17.07.10, 17:03
 
Joker XT пишет:
А сам?
Слей книгу плеера


How?

I tried:
Код: 
void dump ()
{
  PROCESS pid = current_process (); 
  char *ptr = (char*)malloc(4096000);
  memset(ptr,0,4096000);
  get_mem (pid,0x28000000,ptr,4096000);
  int f = _fopen (L"/card/other/",L"dump.bin",WA_Write | WA_Append | WA_Create,0x180,0);
  fwrite(f,ptr,4096000);
  mfree (ptr);
  fclose (f);
}


Don't matter what I write in second parameter of get_mem, file is always empty, and size is always 8000kb instead of 4096kb.

I also tried (OSADDRESS)(FindBook(isAudioPlayerBook())) as second parameter of get_mem, file empty.

ReaderRAM doesn't seem to work on my phone. I don't know how should I search that...

 Joker XT:
17.07.10, 18:13
 Держи, тока эльф без гет-мем)

http://slil.ru/29473576

 mc_kibel:
17.07.10, 18:28
 
Joker XT пишет:
Держи, тока эльф без гет-мем)

http://slil.ru/29473576


Thanks, but everytime file size is 0 bytes.

Edit: Anyway, dumping problem solved, I wrote my own :-P

[ Edited by mc_kibel в 17.7.10 17:35 ]


Added 17.7.10 18:42

I found what I need once
path: 0x4BBACC5A
name: 0x4BBACE52

but it's in ram, it's different everytime. I have no idea how dump can help me. :-(

 mc_kibel:
20.07.10, 02:07
 SOLVED

I wouldn't do it without mcming1989 - he explained to me, how to read informations from dumps - big thanks to him!
:-)

Код: 
typedef struct
{
  wchar_t *fname;
  wchar_t *fpath;
  char *MIME;
  wchar_t *extension;
}BOOK_PLAYER_TRACK_DESC_3210;

typedef struct
{
  int unk;
  BOOK_PLAYER_TRACK_DESC_3210 *xdesc;
}DESC_PTR;

typedef struct
{
  char dummy1[0x4C];
  int time
  int unk_1;
  DESC_PTR *dsc;
  int unk_2;
}BOOK_PLAYER_3210;


void somefn ()
{
    BOOK_PLAYER_3210 *player = (BOOK_PLAYER_3210*)FindBook(isAudioPlayerBook());
    debug_printf ("\n -->> Current path: %ls ; name: %ls ; time: %d \n", 
                player->dsc->xdesc->fpath, 
                player->dsc->xdesc->fname,
                player->time);
};



Functions in LibraryDLL for getting mp3 tags are so slow :( Animation is about 5-7 fps...

[ Edited by mc_kibel в 20.7.10 02:40 ]
Страница 1 из 3: [1] 2 3 »

URL этой темы:
https://mobilefree.justdanpo.ru/newbb_plus/viewtopic.php?topic_id=4938

© 2005-2018 supertrubka.org