In revising the work I have the following questions:
1) The constants defined in include/modelist.h - MODE_SCN_FIREWORK x MODE_FIREWORK, for example, both can be used? As new MODES were added in this new trunk, I used a mix. I have added MODE_BLUR_REDUCTION to the include\modelist.h.
2)EXMEM_BUFFER_SIZE - The porting procedure instructions recommends to use something between 2M / 4M. But the ixus220 porting use 640Kb (I used this). So what is better let memory to the camera or to chdk software?
3) unlocking zoom while filming - The way it is when press zoomIn and then zoomOut the zooming(optical and digital) gets locked - even after stopping registering. We have to go to review mode and return so that the zoom is again unlocked (zoom_status=ZOOM_OPTICAL_MEDIUM) - a strange behavior. On the other hand If we add in core\gui.c line 2020:
#if defined (CAMERA_s90) || defined (CAMERA_s95) || defined (CAMERA_g12) || defined (CAMERA_a3000) || defined (CAMERA_a800) everything seems to work fine with optical and digital zoomIn and zoomOut at will.
4) A suggestion: for using OSD change the printf format of memory content so that stable size patterns are displayed
5) I have made a change in platform\a800\kbd.c on the procedures kbd_key_press(long key), kbd_key_release(long key) and kbd_key_release_all(). The A800 seems to have the same behavior as the A495 (Menu,up,down and left) have an inverted 1 state for key pressed. The anding of KEYS_MASK2 with a new mask on a |= doesn`t reset the bit. Indeed I don't know if the values are really called. So I will try to test it.
6) When adapting for the new trunk I observed that if I don't use the option EDGEOVERLAY I get an "undefined module_save_edge" error on any compilation.
7) The problem I think I have seen on ixus220 porting is on the procedure sub_FF8B84D0_my() in captseq.c. Take a look.
void __attribute__((naked,noinline)) sub_FF8B84D0_my() {
//FF8B84D0 IXUS220: DONE
asm volatile (
" STMFD SP!, {R4-R6,LR} \n"
" LDR R5, =0x3EE0 \n"
" MOV R4, R0 \n"
" LDR R0, [R5,#4] \n"
" CMP R0, #1 \n"
" LDRNE R1, =0x146 \n"
" LDRNE R0, =0xFF8B8308 \n" //aShutter_c IXUS220 at FF8B8308
" BLNE _DebugAssert \n"
" CMN R4, #0xC00 \n"
" LDREQSH R4, [R5,#2] \n"
" CMN R4, #0xC00 \n"
" MOVEQ R1, #0x14C \n"
" LDRNE R0, =0xFF8B8308 \n" //aShutter_c IXUS220 at FF8B8308 <<============
" STRH R4, [R5,#2] \n"
" BLEQ _DebugAssert \n"
" MOV R0, R4 \n"
" BL apex2us \n" // patched
" B sub_FF8B8514 \n" // IXUS220 continue in firmware at ff8b8510
);
}
The firmware version:
ff8b84d0: e92d4070 push {r4, r5, r6, lr}
ff8b84d4: e51f51dc ldr r5, [pc, #-476] ; ff8b8300: (00003ee0)
ff8b84d8: e1a04000 mov r4, r0
ff8b84dc: e5950004 ldr r0, [r5, #4]
ff8b84e0: e3500001 cmp r0, #1
ff8b84e4: 159f13d4 ldrne r1, [pc, #980] ; ff8b88c0: (00000146)
ff8b84e8: 124f0f7a subne r0, pc, #488 ; ff8b8308: (74756853) *"Shutter.c"
ff8b84ec: 1bfd99e5 blne loc_ff81ec88
ff8b84f0: e3740b03 cmn r4, #3072 ; 0xc00
ff8b84f4: 01d540f2 ldrsheq r4, [r5, #2]
ff8b84f8: e3740b03 cmn r4, #3072 ; 0xc00
ff8b84fc: 03a01f53 moveq r1, #332 ; 0x14c
ff8b8500: 024f0c02 subeq r0, pc, #512 ; ff8b8308: (74756853) *"Shutter.c" <<============
ff8b8504: e1c540b2 strh r4, [r5, #2]
ff8b8508: 0bfd99de bleq loc_ff81ec88
ff8b850c: e1a00004 mov r0, r4
ff8b8510: eb060b1d bl loc_ffa3b18c