Now most of this done and working.I must also correct the live preview, as this very slow. anyone have any suggestions.
I am posting the trunk.
also could not do set_zom through the LUA scrips.
Thanks. This is excellent work for a first port. I've added the patch posted by waterwingz to the trunk. The only thing I changed was the notes.txt. In the future, please update the notes.txt to reflect what has actually been tested or is known to be broken in this port. For future updates, you can use SVN to generate a patch against the current trunk.
There are quite a few things that need to be resolved before it can be added to the autobuild. In addition to the things I've noted below, please see
http://chdk.wikia.com/wiki/Testingcode-genThe capt_seq.c generated by code-gen does not match the one submitted in the patch, specifically the capt_seq.c has
" BL sub_FF0F39C0 \n" // --> Patched. Old value = 0xFF0F39C0. jeronymo
while code-gen generates
" BL sub_FF0F39C0_my\n"
If the capt_seq.c reflects the code that should actually be used, please update the code-gen file.
finsigThe stubs_entry.S included in the patch appears to have been generated by an updated version of finsig, which was not included in the patch, the current svn finsig does not generate
// KEYSYS = d4h // Found @ 0xff0144a4
sx530hs/shooting.cThe mode map is incorrect. To find the mode map values, you can set each mode in the canon UI while watching propcase SHOOTING_MODE. You can use the mode table in the canon firmware to verify that you found all the valid values.
sx530hs/kbd.cThe KEY_VIDEO is missing, when the camera clearly has a video button. There are probably some other keys that can be added. You can find the keys by watching phsw_status in the memory browser while pressing keys. KEY_POWER
should probably not be in the keymap, and definitely shouldn't be in the KEYS_MASK2
(edit: other cams have it in the keymap, but it should not be in mask)
Comment refers to sx510 code. Verify the code is valid for sx530 and update comments.
The jogdial code looks incomplete. Are you able to use the jodgial to navigate the CHDK menu?
sx530hs/lib.cthe next_buffer code appears to be unused. It should be deleted or put in an #if 0 block
shutdown refers to _TurnOffE1, which NULLSUB.
Does debug_led work? I see the same value is defined as AF_LED. From the wiki it seems this isn't actually the AF LED, but just to be sure, the debug_led should not use the AF LED, because this would interfere with shooting.
does vid_get_viewport_live_fb return the correct buffer while video is recording?
have the varioius viewport functions been verified? In general, this can be done by making sure everything looks correct in chdkptp live view. Also check that histogram and zebra work correctly.
The palette functions in #ifdef CAM_LOAD_CUSTOM_COLORS are mostly commented out, but the define is defined in platform_camera.h. If custom colors are not working, then the define should not be defined.
The jogdial functions have comments that appear to be copied from other ports. Please verify that script wheel_left() and wheel_right() work correctly, and update or remove the comments.
platform_camera.hThis appears to have been copied from sx510. Please update the comments and indicate clearly which values have been verified.
The CAM_JPEG_* values are are clearly incorrect, since this is a 16MP cam. The values should reflect the size of the largest available jpeg.
The active area should be checked. You can find instructions at the bottom of
https://www.assembla.com/spaces/chdkptp/wiki/DNG_Processing or upload a sample DNG somewhere.
The comment on CAM_HAS_MOVIE_DIGEST_MODE says the camera doesn't have a movie digest mode, but the manual suggests it does.
CAM_IS_VID_REC_WORKS should only be defined if is_video_recording actually works. If this hasn't been verified, it should be. Information on this can be found at
http://chdk.wikia.com/wiki/Testing_Needed#CAM_IS_VID_REC_WORKSThe CAM_ALT_BUTTON_ defines include KEY_VIDEO, but this key is not in the keymap. Please update the keymap, or remove it.
Have the CAM_SD_OVER_IN... defines been verified?
sub/boot_hdr.cThe debug LED code should be in #if 0 or removed
sub/capt_seq_hdrThe dark frame control code refers to RAM addresses copied from the SX510 port. This is almost certainly wrong, and is likely to cause crashes if anyone tries to use it. AFAIK the SX510 port itself also doesn't do dark frame control correctly. Additionally, these addresses are likely to be firmware specific, so should not be in the code-gen header at all.
sub/movie_rec_hdr.cIs not used.
sub/fw/capt_seq.cHas the "quick press" behavior been tested? Specifically, if you press the shutter quickly without waiting for focus, is raw captured and overrides correctly applied?
sub/fw/stubs_entry_2.sSome functions defined here are correctly found by the current finsig. They can be removed.
Firmware variables
focus_len_table and
playrec_mode are defined as NULLSUB. This is
completely incorrect and will cause crashes or other bad behavior, because the values of those variables with be the opcod of the nullsub (and whatever follows it for focus_len_table)
time() is defined as nullsub. This will cause problems, because time() has a return value that will be garbage.
loader/entry.sIs the delay loop actually needed?
loader/main.cDebug LED code should be #if 0
Comments refer to addresses in a different port. Has the equivalent code been found and verified for this specific camera?