in memory browser I can find many variables concerning current record time.For example, in your A620 int variable at 0x73CF4 is current number of captured frames (and if interesting 0x73D0C is limit of frames for current video mode). If this variable changes, video record is in progress.You can find this variables at top of sub_FFD2E0D8_my() in movie_rec.c for a620.
sprintf(osd_buf, "value: %u", atoi((char*)0x739A4)); draw_string(100, 100, osd_buf, conf.osd_color);
sprintf(osd_buf, "value: %u", (void*)(*(int*)0x739A4));
Watch 0x739A4 variable for your A620 in memory browser.In A710 this variable (0x715BC):0 - before first movie record4 - during movie record5 - during movie record finishing1 - after movie record (standby)other values - in other short-term stagesp.s 0x6115C for S3IS.
void *movie_get_state(){ return (void*)(*(int*)0x739A4);}
if (conf.save_raw && (!((*movie_get_state() > 1) && conf.save_raw_in_video ))) {
warning: comparison between pointer and integer
small question again:Code: (c) [Select] if (conf.save_raw && (!((*movie_get_state() > 1) && conf.save_raw_in_video ))) {throws a warning when i compile it:Quotewarning: comparison between pointer and integer
int movie_get_state(){ return *((int*)0x739A4);}
Just modify your function to return the int:Code: (c) [Select]int movie_get_state(){ return *((int*)0x739A4);}The another way, which does not require creation of function, is to add this address to stubs_min.S file and declare the appropriate integer variable in lolevel.h or platform.h, depends on access level required.
i think i'm gonna go with lib.c. what are the advantages/disadvantages?
what do you mean by access level required?
edit: my previous assumption on how to find out the address in movie_rec.c was wrong, i already fail at finding the address in the a460 movie_rec.c
void __attribute__((naked,noinline)) movie_record_task(){ asm volatile( "STMFD SP!, {R4,LR}\n" "SUB SP, SP, #4\n" "MOV R4, SP\n" "B loc_FFD2C1D4\n""loc_FFD2C124:\n" "LDR R3, =0x73988\n" "LDR R2, [R3]\n" "CMP R2, #0\n" "BNE loc_FFD2C1C0\n" "SUB R3, R12, #1\n" "CMP R3, #0xA\n" "LDRLS PC, [PC,R3,LSL#2]\n" "B loc_FFD2C1C0\n" ".long loc_FFD2C170\n" ".long loc_FFD2C178\n" ".long loc_FFD2C190\n" ".long loc_FFD2C198\n" ".long loc_FFD2C1A0\n" ".long loc_FFD2C180\n" ".long loc_FFD2C1A8\n" ".long loc_FFD2C188\n" ".long loc_FFD2C1C0\n" ".long loc_FFD2C1B8\n" ".long loc_FFD2C1B0\n""loc_FFD2C170:\n" "BL sub_FFD2C254\n" "B loc_FFD2C1BC\n""loc_FFD2C178:\n" "BL unlock_optical_zoom\n" "BL sub_FFD2C488\n" "B loc_FFD2C1BC\n""loc_FFD2C180:\n" "BL sub_FFD2C918_my\n" //------------>...void __attribute__((naked,noinline)) sub_FFD2C918_my(){ asm volatile( "STMFD SP!, {R4-R11,LR}\n" "LDR R5, =0x739A4\n" "SUB SP, SP, #0x34\n"...
void __attribute__((naked,noinline)) movie_record_task(){ asm volatile( "STMFD SP!, {R4,LR}\n" "SUB SP, SP, #4\n" "MOV R4, SP\n" "B loc_FFEEA4C8\n" "loc_FFEEA424:\n" "LDR R3, =0x91D38\n" "LDR R2, [R3]\n" "CMP R2, #0\n" "BNE loc_FFEEA4B4\n" "SUB R3, R12, #2\n" "CMP R3, #9\n" "LDRLS PC, [PC,R3,LSL#2]\n" "B loc_FFEEA4B4\n" ".long loc_FFEEA474\n" ".long loc_FFEEA48C\n" ".long loc_FFEEA494\n" ".long loc_FFEEA49C\n" ".long loc_FFEEA47C\n" ".long loc_FFEEA4A4\n" ".long loc_FFEEA484\n" ".long loc_FFEEA4B4\n" ".long loc_FFEEA4AC\n" ".long loc_FFEEA46C\n""loc_FFEEA46C:\n" "BL sub_FFEEA564\n" "B loc_FFEEA4B0\n" "loc_FFEEA474:\n" "BL unlock_optical_zoom\n" "BL sub_FFEEA718\n" "B loc_FFEEA4B0\n" "loc_FFEEA47C:\n" "BL sub_FFEEAB9C_my\n" //----------------> ...void __attribute__((naked,noinline)) sub_FFEEAB9C_my(){ asm volatile( "STMFD SP!, {R4-R11,LR}\n" "LDR R5, =0x91D54\n" "SUB SP, SP, #0x3C\n" ...
DEF (movie_state,0x6115C)
extern int movie_state;
Quote from: PhyrePhoX on 05 / April / 2008, 03:32:50edit: my previous assumption on how to find out the address in movie_rec.c was wrong, i already fail at finding the address in the a460 movie_rec.c 0x91D54 ?...Just another functions order in the file.
if (!((movie_get_state > 1) && conf.save_raw_in_video ))
Started by alvm DryOS Development
Started by evox General Discussion and Assistance
Started by vijaymukhi712 General Chat
Started by cdg General Help and Assistance on using CHDK stable releases
Started by paulo General Discussion and Assistance