This is a bit too advanced for my basic knowledge.
Sorry about that.
It would be VERY tedious to support all cameras.
I don't know about that. Of course, every feature that relies on previously unused functions from the firmware requires each and every firmware to be inspected, but that is inherent to the CHDK. Perhaps it is possible to find a few generic signatures that can be used instead. Otherwise you can just give empty definitions by default and override them only for some cameras (as is done with other "optional" functionality).
The only thing that is really needed is the address of add_ptp_handler. For specific features (shutdown/reboot and mode switching) you need a few more.
Could you list the steps that I have to take to compile and patch the various softwares (under Windows) and run the command line for testing ?
Sure, but I'm not sure about the Windows part as I can't test it. Also, I haven't looked at VxWorks, so that might also be a bit different.
For the CHDK you need the following:
- NHSTUB for add_ptp_handler (found as discussed in my documentation)
- Platform functions shutdown_soft, reboot and switch_mode (I've put them in lib.c)
- Make sure init_chdk_ptp is started as task (see boot.c of IXUS 870 IS 1.01a)
The platform function need not have anything as body, unless you want the appropriate functionality to work. In the latter case you also need the following:
- Address for power button (I've found it, together with the playback button, in taskcreate_Startup, most clearly in function 0xFF845D18)
- NHSTUB for reboot_fw_update (can be found by searching for "FirmUpgrade.c")
- NHSTUB for set_control_event (discussed in documentation; for VxWorks you seem to need DisableNotificationPTP)
- NHSTUB for PB2Rec and Rec2PB functions (searchable as strings)
- Values to pass to set_control_event (can be found as discussed in documentation; not needed for VxWorks)
To get libptp/ptpcam you should download the latest version (1.1.10) or, in case of Windows, I'd download the sources linked to before in this thread. Then apply my patch (I think it should work for the Windows variant as well) and compile it. I'm not sure which compilers work for Windows and whether or not you need libusb as well.
I think that should be it. Let me know how things work out.
Edit: added creation of init_chdk_ptp as task to todo list.