If capt_seq is good, completing filewrite should be straight forward.
^^ wrong. Not straight forward for me, anyway.
Testing chdkptp 'shoot'. Rec / Shoot cmds result in 1x JPG saved to sd card. Following with a PLAY cmd crashes camera with lens out. Yes, i'm trashing registers, and have not figured it out yet. Latest ROMLOG attached.
I looked for addrs in ROMLOG that match addrs in filewrite code, found 0xAE3C, and add filewrite debug logging to expose what's in that register. Attempts to correct the situation provoke either 0x10 or 0x1C exception errors.
Problem is inside "skip flushing the cache" or "skip creating directory" I think. This code is not laid out at all like ixus160, so it is hard for me to see precisely where to put the jumps and loc_'s.
BUT, my question is really about why the shoot command does not provoke any logging. Remoteshoot does, and also crashes with lens out, but I figured if the simple func 'shoot' does not work properly, there is no point to go further until corrected.
If I remove filewrite.c, recompile, and test quickshoot and halfpress-then-shoot, it works fine. Just like @blackhole's last test build. Yet, with filewrite code in place, when the shoot cmd happens, no debug log output comes. I don't understand.
How can I log the 'chdkptp shoot' case, if not inside filewrite code? Add logging to capt_seq?
One more dumb question; Does the choice of power button or PLAY button to turn cam on and off affect code paths taken in the 'chdkptp shoot' case?
Any feedback about the romlog or filewrite code is most welcome. Thanks in advance.