Some general observations. From chunk 3, unless otherwise noted.
Canon Basic appears to be supported, based on string with the usual keywords, references to extend.m and some other possible script file names, and references to creating a script card.
The script card is almost certainly identified using an different mechanism from P&S. Some preliminary analysis suggests the identifier is based on values from SD card registers, which would be unique for a given card (functions called from e011956c). How a script would be activated is unknown.
Event procedures exist. Some names known from P&S like FA.Create, Mecha.Create etc are present, though some appear to be NOP, perhaps kept for compatibility. Eventprocs appear more integrated with a CLI, eventproc tables often include a pointer to a help string in addition to the name and function. Similarly e0338be6 appears to be a registration function that takes a help string in r3.
As mentioned in
https://chdk.setepontos.com/index.php?topic=4338.msg147752#msg147752 some of the PTP / eventproc system seems to be present. "InitiateEventProc\n" "ExecuteEventProc\n" exist as string in the xf705 firmware in an area apperently related to PTP. Additionally, a user with an
xf605 (a newer digic 7 dv cam, for which there are no public firmware updates) confirmed it supporting the initiate / terminate opcodes in PTP device info (full list attached).
Interestingly, PTP functionality does not appear to be documented on these cams. The function of the USB port(s) is controlled by various menu settings, but nothing in the manual obviously describes typical PTP usage. On the xf605, there is a USB setting called PTP/GPS for use with Canon GP-E2. Using this setting, they reported that attempting to access the camera with
gphoto2 --port usb:... --list-config
repeatably caused the camera to crash with a "fan error"
I'm not clear exactly which opcodes gphoto2 --list-config uses, but based on how P&S respond, it appears to include GetObjectHandles. gphoto2 --summary did not crash the cam (and does not issue GetObjectHandles), and neither did connecting chdkptp as shown in the log.
edit:
xf605 "fan error" seems to be caused by gphoto sending canon extension opcodes when it sees a Canon vendor ID (doing this blindly on an entirely different class of camera seems suspect). The last one sent before the crash is 0x911b (EOS_SetUILock), although it's possible some other one is the trigger.
The fan does actually stop when the error happens
Standard PTP commands relating to storage and object handles seem fine.
InitiateEventProc appears to expect a data phase on xf605.
From disassembly, InitiateEventProc in the xf705 firmware does not obviously use a dataphase, and appears to just a set a flag (only needing to be called once, not 3x like P&S) suggesting xf605 may have adopted the new system seen on still cams. 0x9050 and 0x905c are handled differently, with 0x905c setting an additional flag. Strings suggest 0x905c is called InitiateServiceEventProc (e0166ad4).
PTP handling on xf705 seems very different from P&S, instead of having registered handler functions, the logic appears to involve convoluted conditionals statements (starting around e011884e)
On a somewhat related note, there are references to a "service card" which parallels the script card logic.