Canon Basic scripting (DIGIC 6, DIGIC 7 models)

Started by kitor, November 27, 2021, 02:43:36 PM

Previous topic - Next topic

0 Members and 1 Guest are viewing this topic.

kitor

... there's Basic interpreter on Digic 6 and 7 models too! (checked on 750D, 5D4, 200D). It works differently than D8+, so I'm creating a separate thread.

There's no need for script.req file on card, or any bootsector flags.

I found no way to execute script without UART. With UART:

' Comment test, will this be ignored?

public sub my_test(string)
    ' moar comments
    Printf("\nyo man!\n")
end sub


K393[1]>LoadScript B:/test.m
Load B:/test.m
LoadScript returned 0(0x0)
K393[1]>ShowScript
Show Script
                          Name:     Code: CodeSize:     Data: DataSize:
======================================================================
                      B:/test.m  0x9ac3cc      0x28  0x9ac400      0x14
----------------------------------------------------------------------
ShowScript returned 0(0x0)
K393[1]>my_test
yo man!

my_test returned 0(0x0)


Quirks: I found no way to auto execute any function from script. All public subroutines get exported into Evprocs.
If subroutine doesn't have any arguments, parser complains:
K393[1]>LoadScript B:/test.m
Load B:/test.m
Syntax Error:Invalid Parameter Name
3:private sub my_test()

LoadScript returned 1(0x1)


Thanks to Lorenzo for pointing me into that direction. He claimed that there may be Basic engine on 6D, unfortunately this is not yet confirmed/busted. autoexec.sc on D5 is something with different syntax.
Too many Canon cameras.
If you have a dead R, RP, 250D mainboard (e.g. after camera repair) and want to donate for experiments, I'll cover shipping costs.

srsa

This could possibly be used over PTP (for creating event procedures). See this for details.

kitor

Yes, most likely.

There's yet another scripting language on D6+ but I still have no idea how to execute it without running own code just to do that.

File is AUTOSHT.SEQ, syntax seems pretty simple - allows for shoot automation, but parser also has option to call (probably arbitrary) evprocs from script.

File load is done by SVDSTask; task is created by one of states of SVDSState which is part of ShootVfxDebug class, which is one of handlers (stages?) for ShootVfxService (SVS).
Seems that state transition can be executed calling PostStageEvent wrapper specific for SVDS, or via event delivered through ShootVfs StageClass (event callback routes messages to selected stage).

If we find a way to execute this on camera I'll make a separate thread.
Too many Canon cameras.
If you have a dead R, RP, 250D mainboard (e.g. after camera repair) and want to donate for experiments, I'll cover shipping costs.