I sent you a new version, please check the power up behavior.
Thank you, the power up behavior works as you described.
Unless I'm horribly wrong, the power up mode check is not done correctly in this port.
The following patch is only for trial purposes (as this is a code_gen port).
Index: platform/sx400is/sub/100b/boot.c
===================================================================
--- platform/sx400is/sub/100b/boot.c (revision 5462)
+++ platform/sx400is/sub/100b/boot.c (working copy)
@@ -210,7 +210,7 @@
// Similar to ixus160: http://chdk.setepontos.com/index.php?topic=12321.msg123724#msg123724
// look at power-on switch sub_FF86AE74 (FF8687CC)
// value and pointer from sub_FF86A770
- *(int*)(0x2978+0x4) = (*(int*)0xC022F484)&0x20000 ? 0x400000 : 0x200000;
+ *(int*)(0x2978+0x4) = (*(int*)0xC022F48C)&0x100000 ? 0x400000 : 0x200000;
asm volatile (
" LDR R0, =0xFF82043C \n"
If someone is willing to try, a test build can be provided.