supplierdeeply

CBasic

  • 6 Replies
  • 699 Views
CBasic
« on: 27 / November / 2011, 12:30:20 »
Advertisements
Have someone tried to write script that is able to shoot picture using Canon Basic?

Re: CBasic
« Reply #1 on: 27 / November / 2011, 13:09:51 »
Have someone tried to write script that is able to shoot picture using Canon Basic?
Yes - many time.  So far nobody has figured it out - its quite possible that Canon Basic does not support such an operation.


*

Offline reyalp

  • ******
  • 10068
Re: CBasic
« Reply #2 on: 27 / November / 2011, 17:04:49 »
Have someone tried to write script that is able to shoot picture using Canon Basic?
Yes - many time.  So far nobody has figured it out - its quite possible that Canon Basic does not support such an operation.
Many of the functions available to CBasic are related to shooting, so it should be possible. No one has figured out how yet though.

I tried this using PostLogicalEvent* which hat the interesting behavior that all the events get posted after the script ends. That seems like a clue, but I wasn't able to work out what it means.

Pretty much everything we know about CBasic is posted on the wiki.
Don't forget what the H stands for.

Re: CBasic
« Reply #3 on: 27 / November / 2011, 17:17:39 »
Pretty much everything we know about CBasic is posted on the wiki.
I believe the code for CBasic is all in the binary image dumped for CHDK conversion work?  Is it just a question that nobody has tried working through it that way ?


*

Offline reyalp

  • ******
  • 10068
Re: CBasic
« Reply #4 on: 27 / November / 2011, 17:32:00 »
I believe the code for CBasic is all in the binary image dumped for CHDK conversion work?
Of course, it's just another part of the firmware.
Quote
Is it just a question that nobody has tried working through it that way ?
No one has succeed, I wouldn't say that no one has tried ;)

Another thing to consider:
Currently, the only way we know to run a Canon Basic script is via "extend.m". There is also mention in the firmware of "A/autotest.m" but I wasn't able to determine how to run it. It is also possible that there is some way to execute an arbitrary script from the extend.m script.

edit:
Specifically, there's a LoadScript eventproc, but IIRC all I could get it to do was crash. (edit: or not do anything, I don't remember...)
« Last Edit: 27 / November / 2011, 18:14:00 by reyalp »
Don't forget what the H stands for.

Re: CBasic
« Reply #5 on: 28 / November / 2011, 15:21:53 »
Simpliest script to get ROMLOG.

private sub Initialize()
 SystemEventInit()
   t = GetLogToFile("A/logg.log",1)
end sub

If first parameter is not bath string then ROMLOG.txt is greated.
Second parameter has to be >0. Works on A630 (VxWorks).

*

Offline reyalp

  • ******
  • 10068
Re: CBasic
« Reply #6 on: 28 / November / 2011, 16:09:42 »
Simpliest script to get ROMLOG.

private sub Initialize()
 SystemEventInit()
   t = GetLogToFile("A/logg.log",1)
end sub

If first parameter is not bath string then ROMLOG.txt is greated.
Second parameter has to be >0. Works on A630 (VxWorks).
? http://chdk.wikia.com/wiki/Canon_Basic/Scripts/Romlog
Don't forget what the H stands for.