@aprofiti - Thanks for the patch.
@dfort Can you try these ones?
NSTUB(0xFF27E674, StartImagePass_x1_SetEDmac)
NSTUB(0xFF27F444, StartImagePass_x5_SetEDmac)

Looks like the "Jump range error" message was already patch.c but I didn't think of opening the console -- Doh!
Ok--so these aren't the stubs we're looking for.
First one It's a bit different but function called looks likely the same.
Looking into the disassembly I can't find a mirror for both stubs in the 0xFF9 range or similar like on 50D
Right, on the 7D these stubs show up only once. I did take a close look at them and it seems that the second one (StartImagePass_x5_SetEDmac) can be matched perfectly to what works on the 5D2/50D but the stub you came up with is slightly different. Is there a reason for that? Here's the "perfect" match:
platform/7D.203/stubs.S
NSTUB(0xFF27F43C, StartImagePass_x5_SetEDmac)
Looking at the pieces of the puzzle that fit, don't fit or are missing:
src/raw.c
printf("patch_hook_function() - Trying to patch RAW LV x5");
patch_hook_function((uint32_t) &StartImagePass_x5_SetEDmac, 0xE3A03202, raw_lv_setedmac_patch, "RAW LV x5");
I get that "E3A03202" is the instruction, "mov r3, #536870912; 0x20000000" which is what the StartImagePass_x5_SetEDmac stub is pointing at. I also looked at the patch_hook_function definition to try and figure out what is being passed to that function:
src/patch.h
int patch_hook_function(uintptr_t addr, uint32_t orig_instr, patch_hook_function_cbr logging_function, const char * description);
So--I guess that one looks good but the first stub, StartImagePass_x1_SetEDmac is definitely different. The closest match I could find is the same as the one you found:
platform/7D.203/stubs.S
NSTUB(0xFF27E674, StartImagePass_x1_SetEDmac)
However, the instruction at that address is, "E3A00010" which is "mov r0, #16" so maybe we need to modify the patch_hook_function call to this?
src/raw.c
printf("patch_hook_function() - Trying to patch RAW LV x1");
patch_hook_function((uint32_t) &StartImagePass_x1_SetEDmac, 0xE3A00010, raw_lv_setedmac_patch, "RAW LV x1");
So how did that work out? Same errors as before. Does this mean we're patching a mirrored copy and not executable code?
That means, you should patch some address that Canon code is going to execute, not a mirrored copy.
Where's the code? Show me the code.
@dfort , what about digital poke ?
Before a1ex fixed adtg_gui.mo for d4's (broken from some d5 code etc... ) waza57 & myself used digital poke to extended raw resolutions .
I'm not extending raw resolutions at this point, simply trying to get 10/12-bit working on the 7D.
I Idea ! , did you try the adtg_gui.mo from the https://builds.magiclantern.fm/modules.html download page ?
That module comes from the iso-research branch and the 7D isn't supported. I found the stubs:
modules/adtg_gui/adtg_gui.c
else if (is_camera("7D", "2.0.3"))
{
ADTG_WRITE_FUNC = 0xFF2C0944; //"[REG] @@@@@@@@@@@@ Start ADTG[CS:%lx]"
CMOS_WRITE_FUNC = 0xFF2C0B3C; //"[REG] ############ Start CMOS"
ENGIO_WRITE_FUNC = 0xFF1F6B20; // from stubs
ENG_DRV_OUT_FUNC = 0xFF1F675C;
}
The 7D_MASTER.203 doesn't build on the iso-research branch so it needs the same
Makefile hack I used on the raw_video_10bit_12bit_LVState branch. So now it builds, adtg_gui launches and --- it doesn't work!