In trunk 4210, I added a script function get_raw_support, which returns true if the current capture mode has valid raw data according to the CHDK defines. I updated the setmode.lua test to report this value.
This can be used with rawop to know in advance if raw framebuffer functions will work, but isn't part of rawop because it's useful in other situations.
I'm not in love with the name but I couldn't come up with a better one, so alternative suggestions are welcome (for a limited time, I'm not going to repeat the remote timing debacle)
Notes:
* A fair number of ports probably don't set the DISABLE_RAW_IN_* defines correctly.
* Currently, dedicated video modes will return true, even though capturing stills in these modes is not possible on many cameras. This is because CHDK doesn't know which cameras can shoot still in video. One thing I've wanted to do for a long time is attach flags to modes (can shoot stills, can start video, uses USER propcases etc) but that's a project for another day.
* This does not check raw settings (enable, exceptions) to see if raw will actually be saved, the purpose is only to check if valid date will be available.
* It might be better to be able to pass the mode number instead of using the current one, but the existing C code isn't set up to do that.