@GrAnd
@DataGhost
After several days of struggle with the trunk source, I still did not manage to get a
cold reboot, so I think it's time to ask some more advice and/or help.
I think I'm just gonna explain my approach so far:
What I want: to fully initialize the cam, just like Canon does, I'm assuming
that means a jump to 0xffc0 0000, aka $(ROMBASEADDR). I've looked at 3 IDA dumps, and in all 3
this address contains a jump to (I hope) the actual initialization code
What I've done (just for a620, for the moment):
I have tried to copy the calling sequence for the function enable_shutdown:
just like my cold_reboot, it is defined in wrappers.c, and calls a lowlevel function
_UnlockMainPower() which is, like my _Jump2CanonOEP(), defined in lolevel.h and
points to another NSTUB, NSTUB(UnlockMainPower, 0xffd49e50), in stubs_entry.S
(is stubs_entry.S treated any different than stubs_entry_2.S, BTW ?)
what I did in detail:
1. Create an entry in platforms/a620/sub/100f/stubs_entry_2.S:
NSTUB(Jump2CanonOEP, 0xffc00000)
2. Create an entry in /include/lolevel.h:
extern void _Jump2CanonOEP();
3. Create an entry in /platform/generic/wrappers.c:
void cold_reboot() { _Jump2CanonOEP(); }
4. Create an entry in /include/platform.h
void cold_reboot(void);
5. Replaced in /core/gui.c:
The body of the function gui_draw_reversi(int arg) with:
cold_reboot();
It does not work though - it compiles fine, no errors, but after booting from the created
DISKBOOT.BIN and starting "reversi" I get a screen freeze, 12 seconds pause and then a
camera shutdown.
wim