Ant
Did you found the address of current bitrate to display it during movie recording.
After some detective work, I found something that I think we could use as bitrate information.
There is a function identified by the string "APENDSTRM". Its address can be found right before that string (it's in a table that gets copied to RAM).
Among other things, it gets a list of chunks that need to be written to card. If you sum up the chunk sizes, you get the amount of data written to card in that pass. Bitrate can be calculated from that.
On the sx280 I did the following (excerpts only, to give an idea):
void __attribute__((naked,noinline)) sub_fc02167a_my() { // "APENDSTRM"
asm volatile (
" push {r4, lr}\n"
" mov r4, r0\n"
"push {r0}\n" // +
"ldr r0, [r0, #8]\n" // +
"ldr r0, [r0, #4]\n" // +
"bl getchunkinfo\n" // +
"pop {r0}\n" // +
" ldr r0, [r0, #8]\n"
" ldr r1, [r0, #4]\n"
" ldr.w r0, [r4, #0xe0]\n"
" bl sub_fc0290fc\n"
" cmp r0, #0\n"
" str r0, [r4, #0x14]\n"
" bne loc_fc02169e\n"
" ldrb.w r1, [r4, #0xa8]\n"
" add.w r0, r4, #0x9c\n"
" bl sub_fc0291de\n"
" str r0, [r4, #0x14]\n"
"loc_fc02169e:\n"
" pop {r4, pc}\n"
);
}
void getchunkinfo(int *r0) {
if (mybadr > MYBUFEND-4096)
return;
int m;
m = *r0; // num of chunks
mybadr += sprintf((char*)mybadr,"%d chunks\n",m);
int *cl = (int*)(*(r0+1));
while (m>0) {
mybadr += sprintf((char*)mybadr," addr %x, size %x, unk %x\n",*cl,*(cl+1),*(cl+2));
cl+=3;
m--;
}
}
I replaced APENDSTRM's func pointer in RAM with a pointer to my replacement function.
Structs may differ on other cameras.
Example log (first APENDSTRM call):
6 chunks
addr 161450, size 8, unk 1
addr 161458, size 8, unk 1
addr 61d0000, size 1fc5, unk 1
addr 62d0000, size 1ee1ac, unk 1
addr 61d1fc5, size 1ec3, unk 1
addr 64be1ac, size 10dfbc, unk 1