Thank you waterwingz for this great tool! following the wiki instructions I have been able to get to the converting CHDK boot.c, movie_rec.c, and capt_set.c part of the porting process (I am working to port genie's SX230HS 100C to SX230HS 101B).
I got a little lost with the instructions about the address.txt file, so I started just looking at where the boot.c code references locations in the firmware memory, like"loc_FF0001F8:\n"
" SUB R0, R12, R0 \n"
" STR R0, [R2] \n"
" SUB R0, LR, R1 \n"
" STR R0, [R3] \n"
" LDMFD SP!, {R4-R7,PC} \n"
and then comparing those locations in the two different firmware dumps and changing any of the associated code.
But then I saw code likevoid __attribute__((naked,noinline)) sub_FF000358_my() {
*(int*)0x1938=(int)taskHook;
*(int*)0x193C=(int)taskHook;
if ((*(int*) 0xC022012C) & 1)
*(int*)(0x25E4) = 0x200000;
else
*(int*)(0x25E4) = 0x100000;
asm volatile (
"loc_FF000358:\n"
"LDR R0, =0xFF0003D0\n"
"MOV R1, #0\n"
"LDR R3, =0xFF000408\n"
and I wasn't sure what to do. I assume that if loc_F000358 changes I have some work to do on sub_FF000358_my, but if I just look at all the loc_XXXXXXXX codes and change them to reflect the addresses in the firmware I am porting to, does that make things simpler?
AND, am I making this all harder on myself because I don't understand what addresses and labels to pull out of boot.c and put into addresses.txt? I looked at the sample addresses.txt file but I couldn't figure out how to make a similar list of addresses and task lengths from the boot.c file I am working with.
Thanks again for your tools that at least make me feel like I have a chance of succeeding.