Magic Lantern Forum

Developing Magic Lantern => Reverse Engineering => Topic started by: scrax on December 17, 2012, 10:35:07 PM

Title: Flash prop
Post by: scrax on December 17, 2012, 10:35:07 PM
I've started to add flash prop to 600D using the 580EXII, any advice on what name to use?

will update this post with what i've found...




800200090004:8300015f00000from 000 to 15f when some setting is confirmed with SET
800200010004:5f00000from 0 to 5f when some setting is confirmed with SET
800400130004:000000Flash Firing: Enable
800400130004:100000Flash Firing: Disable
800400140004:000000E_TTLII Meter: Evalutative
800400140004:100000E_TTLII Meter: Average
800300380022:800448003800001Flash Settings: ETTL-II
800300380022:810448003800003Flash Settings: Manual flash
800300380022:820470123848003800001Flash Settings: Multiflash
800300380022:820470123848003800001Flash Settings: Frequency 199 to 1 = 0xC7 to 0x01
800300380022:820470123848003800001Flash Settings: Flash Count from 1 to 18 maybe more? in hex 0x01 to 0x12
800300380022:800448003800001Flash Settings: 1st curtain
800300380022:80044a003800001Flash Settings: 2nd curtain
800300380022:80044d003800001Flash Settings: Hi-speed
800300380022:1000800448003800001Flash Settings: Flash exp. comp: +2ev
800300380022:d000800448003800001Flash Settings: Flash exp. comp: +1.6ev
800300380022:b000800448003800001Flash Settings: Flash exp. comp: +1.3ev
800300380022:800448003800001Flash Settings: Zoom Auto
800300380022:300448003800001Flash Settings: Zoom 24mm others: 5-7-9-b-d-f
800300380022:80040048003800001Flash Output: 1/1
800300380022:80043848003800001Flash Output: 1/128
800300380022:800448003800001Flash Settings: Wireless func. disable
800300380022:80046830001006003800001Flash Settings: Wireless func. enable
800300380022:80046830000006003800001Flash Settings: Master Flash disabled and Channel All
800300380022:80046830001006003800001Flash Settings: Master Flash enabled and Channel All
800300380022:80046830002006003800001Flash Settings: Master Flash disabled and Channel A:B
800300380022:80046830003006003800001Flash Settings: Master Flash enabled and Channel A:B
800300380022:80046830004006003800001Flash Settings: Master Flash disabled and Channel A:B:C
800300380022:80046830005006003800001Flash Settings: Master Flash enabled and Channel A:B:C
800300380022:4830009006003800001Internal Flash Settings: Wireless Flash enabled EXT:INT
800300380022:483001B006003800001Internal Flash Settings: Custom Wireless enabled EXT:INT
800300380022:4830010006003800001Internal Flash Settings: Wireless Manual Flash enabled EXT
800300380022:4830012006003800001Internal Flash Settings: Wireless ETT-II Flash enabled EXT
800300380022:4830019006003800001Internal Flash Settings: Wirl. en. EXT+INT or Custom Wir. Ext. All and Int.
800300380022:80046830000006003800001Flash Settings: Channel 1
800300380022:80046830100006003800001Flash Settings: Channel 2
800300380022:80046830200006003800001Flash Settings: Channel 3
800300380022:80046830300006003800001Flash Settings: Channel 4
800300380022:80040680000006003800001Flash Settings:  Group A output 1/1
800300380022:8004206820000006003800001Flash Settings:  Group A output 1/16
800300380022:8004386838000006003800001Flash Settings:  Group A output 1/128
800300380022:8004386838000006003800001Flash Settings:  Group B output 1/1
800300380022:8004386838000006003800201Flash Settings:  Group B output 1/16
800300380022:8004386838000006003800381Flash Settings:  Group B output 1/128
800300380022:8004386838000006003800381Flash Settings:  Group C output 1/1
800300380022:8004386838000006003820381Flash Settings:  Group C output 1/16
800300380022:8004386838000006003838381Flash Settings:  Group C output 1/128
800300380022:800468300010006003800001Flash Settings: A:B fire ratio 1:1
800300380022:800468300010000003800001Flash Settings: A:B fire ratio 8:1
800300380022:80046830001000c003800001Flash Settings: A:B fire ratio 1:8
800300380022:8004683000100180c003800001Flash Settings: Grp.C exp.comp +3
800300380022:8004683000100100c003800001Flash Settings: Grp.C exp.comp +2
800300380022:800468300010080c003800001Flash Settings: Grp.C exp.comp +1
800300380022:800468300010000c003800001Flash Settings: Grp.C exp.comp 0
800300380022:8004683000100f80c003800001Flash Settings: Grp.C exp.comp -1
800300380022:8004683000100f00c003800001Flash Settings: Grp.C exp.comp -2
800300380022:8004683000100e80c003800001Flash Settings: Grp.C exp.comp -3
800300380022:4030001006f00f00001Internal Flash Settings: Normal firing
800300380022:4030001016f00f00001Internal Flash Settings: Easy Wireless
800300380022:4030001026f00f00001Internal Flash Settings: CustomWireless
800300380022:4030001016f00f00001Internal Flash Settings: Easy Wireless flash exp. comp.
800300380022:4030001006f00f00001Internal Flash Settings: Wireless custom. External flash exp.comp -2
800300380022:4030001006f00f0f001Internal Flash Settings: Wireless custom. Internal flash exp.comp -2


addrleng0x290x270x250x230x210x1E0x1C0x1A0x180x170x150x130x110x0E0x0C0x0A0x080x060x040x020x00
800300380022:aa00bc04gghhffdennkmmqqiijjss38oopprrttzz
aa= Flash. Exp.comp.
b = Zoom
c = Flash mode: Ettl-II, Manual, Multiflash
d = Wireless func
e = 1st, 2nd curtain, hi-speed
ff* = Flash power values from 1/1 to 1/128 1/3stop: (2,5,8,a,d,10,12,15,18,1a,1d,20,22,25,28,2a,2d,30,32,35,38)
gg = frequency (199 = 0xc7, 1 = 0x1)
hh = flash count (hex like before 1 = 0x1 18 = 0x12)
ii = Grp.C exp.comp
jj = A:B fire ratio
k = Channels (1,2,3,4)
mm = Master Flash and Channel Groups
nn = Group A output
oo = Group B output
pp = Group C output
qq = Built-in flash mode
rr = Internal Flash Settings: only int. exp.comp
ss = Internal Flash Settings: Easy Wireless flash exp. comp
tt = Internal Flash Settings: Wireless custom. int. flash exp.comp
zz = change only when in manual flash, unknown
*can change if Flash mode changes (saves the value each mode has set and restore it if the mode is recalled back)
Title: Re: Flash prop
Post by: nanomad on December 17, 2012, 10:35:59 PM
flash prop? As in?
Title: Re: Flash prop
Post by: scrax on December 17, 2012, 10:41:38 PM
Quote from: nanomad on December 17, 2012, 10:35:59 PM
flash prop? As in?

what i can see using Spy prop and adding them to property.h like:

#define PROP_STROBO_FIRING    0x80040013  // 0 = enable, 1 = disable, 2 = auto?
Title: Re: Flash prop
Post by: g3gg0 on December 17, 2012, 11:10:06 PM

              v23 = (const char *)&"***** PROP_STROBO_SETTING size = 0[%d]";
Title: Re: Flash prop
Post by: scrax on December 18, 2012, 12:59:13 AM
Quote from: g3gg0 on December 17, 2012, 11:10:06 PM
              v23 = (const char *)&"***** PROP_STROBO_SETTING size = 0[%d]";
yes that 0x80030038 is full of settings
Title: Re: Flash prop
Post by: Greg on December 18, 2012, 02:04:29 PM
Great, I dreamed about it, the 500D does not work debugmsg, so I can not carry out research.
;) ;D
Title: Re: Flash prop
Post by: scrax on December 18, 2012, 02:54:23 PM
I've added options found using ETTL-II as flash mode.
there are also Manual and Multi flash left.
Title: Re: Flash prop
Post by: Greg on December 18, 2012, 05:28:14 PM
We can overwrite the data? I think the ISO menu, you can add a few features ;)
Title: Re: Flash prop
Post by: scrax on December 18, 2012, 05:42:44 PM
Quote from: Greg on December 18, 2012, 05:28:14 PM
We can overwrite the data? I think the ISO menu, you can add a few features ;)
I hope so, not sure right now.
I don't know how to properly add the value in property.h will try once finished posting them here.
For example "Master flash" and "Firing Group" are related.
If FG is set to all and MF is off we have 0 with MF on we have 1
if FG is set to A:B and MF if off we have 2 with MF on we have 3
if FG is set to A:B:C and MF if off we have 4 with MF on we have 5
Title: Re: Flash prop
Post by: scrax on December 18, 2012, 07:20:57 PM
I've added here all i can figure out for now, I hope it's clear.
How to put those value in property.h?

for example this is wrong i suppose:
#define STROBE_1ST_CURTAIN 0x8
#define STROBE_2ND_CURTAIN 0xA
#define STROBE_HI_SPEED 0xD

How to specify that it need to go in the 16th "place" (last char of second group) in that prop?
something like this, maybe?:
#define STROBE_1ST_CURTAIN 0x00000000 0x00000008
or:
#define STROBE_1ST_CURTAIN[16] 0x8
Title: Re: Flash prop
Post by: nanomad on December 18, 2012, 07:24:18 PM
You can probably use a bitmask of some sort
Title: Re: Flash prop
Post by: scrax on December 18, 2012, 07:41:32 PM
In property.h there are those commented lines:
//strobo_setting[0] & 0xFF000000 = strobo_aecomp << 24
//strobo_setting[1] & 2 = 2 if strobo_curtain else 0
//strobo_setting[1] & 8 = 8 if e-ttl meter = average else 0
that are corresponding to my results. Is good this? i can go on filling it, but not sure if it's useful or not.
from what i get, [ 0 ] is the first block [5] the last. Position inside the block is done with zeros
Title: Re: Flash prop
Post by: jplxpto on December 18, 2012, 11:15:44 PM
You did a good job!
Title: Re: Flash prop
Post by: jplxpto on December 18, 2012, 11:44:33 PM
Scrax, you can try to do the same for the internal flash.

The 40D has these properties:

PROP_BUILTIN_STROBO_SETTING

PROP_STROBO_CFN
PROP_STROBO_SETTING
PROP_STROBO_WIRELESS_SETTING


Title: Re: Flash prop
Post by: scrax on December 19, 2012, 12:09:49 AM
Is this correct so:
//strobo_setting[0] & 0x0000F000 = 1 if strobo_manualflash else 0
//strobo_setting[0] & 0x0000F000 = 2 if strobo_multilflash else 0

or is better this:
#define STROBO_ETTLII_FLASH 0x00000000 0x0 0x0 0x0 0x0 0x0
#define STROBO_MANUAL_FLASH 0x00001000 0x0 0x0 0x0 0x0 0x0
#define STROBO_MULTI_FLASH 0x00002000 0x0 0x0 0x0 0x0 0x0

#define STROBO_ZOOM_AUTO 0x00080000 0x0 0x0 0x0 0x0 0x0
#define STROBO_ZOOM_24MM 0x00030000 0x0 0x0 0x0 0x0 0x0
#define STROBO_ZOOM_28MM 0x00050000 0x0 0x0 0x0 0x0 0x0
#define STROBO_ZOOM_35MM 0x00070000 0x0 0x0 0x0 0x0 0x0
#define STROBO_ZOOM_50MM 0x00090000 0x0 0x0 0x0 0x0 0x0
#define STROBO_ZOOM_70MM 0x000B0000 0x0 0x0 0x0 0x0 0x0
#define STROBO_ZOOM_80MM 0x000D0000 0x0 0x0 0x0 0x0 0x0
#define STROBO_ZOOM_105MM 0x000F0000 0x0 0x0 0x0 0x0 0x0

#define STROBO_FREQ_001 0x0 0x01000000 0x0 0x0 0x0 0x0
//....
#define STROBO_FREQ_199 0x0 0xC7000000 0x0 0x0 0x0 0x0

#define STROBO_COUNT_01 0x0 0x00010000 0x0 0x0 0x0 0x0
//....
#define STROBO_COUNT_18 0x0 0x00120000 0x0 0x0 0x0 0x0

#define STROBO_OUTPUT_1_0 0x0 0x00000000 0x0 0x0 0x0 0x0
#define STROBO_OUTPUT_1_3 0x0 0x00000200 0x0 0x0 0x0 0x0
#define STROBO_OUTPUT_1_6 0x0 0x00000200 0x0 0x0 0x0 0x0
#define STROBO_OUTPUT_2_0 0x0 0x00000500 0x0 0x0 0x0 0x0
#define STROBO_OUTPUT_2_3 0x0 0x00000800 0x0 0x0 0x0 0x0
#define STROBO_OUTPUT_2_6 0x0 0x00001000 0x0 0x0 0x0 0x0
#define STROBO_OUTPUT_4_0 0x0 0x00001200 0x0 0x0 0x0 0x0
#define STROBO_OUTPUT_4_3 0x0 0x00001500 0x0 0x0 0x0 0x0
#define STROBO_OUTPUT_4_6 0x0 0x00001800 0x0 0x0 0x0 0x0
#define STROBO_OUTPUT_8_0 0x0 0x00001000 0x0 0x0 0x0 0x0
#define STROBO_OUTPUT_8_3 0x0 0x00001A00 0x0 0x0 0x0 0x0
#define STROBO_OUTPUT_8_6 0x0 0x00001D00 0x0 0x0 0x0 0x0
#define STROBO_OUTPUT_16_0 0x0 0x00002000 0x0 0x0 0x0 0x0
#define STROBO_OUTPUT_16_3 0x0 0x00002200 0x0 0x0 0x0 0x0
#define STROBO_OUTPUT_16_6 0x0 0x00002500 0x0 0x0 0x0 0x0
#define STROBO_OUTPUT_32_0 0x0 0x00002800 0x0 0x0 0x0 0x0
#define STROBO_OUTPUT_32_3 0x0 0x00002A00 0x0 0x0 0x0 0x0
#define STROBO_OUTPUT_32_6 0x0 0x00002D00 0x0 0x0 0x0 0x0
#define STROBO_OUTPUT_64_0 0x0 0x00003000 0x0 0x0 0x0 0x0
#define STROBO_OUTPUT_64_3 0x0 0x00003200 0x0 0x0 0x0 0x0
#define STROBO_OUTPUT_64_6 0x0 0x00003500 0x0 0x0 0x0 0x0
#define STROBO_OUTPUT_128_0 0x0 0x00003800 0x0 0x0 0x0 0x0

Quote from: jplxpto on December 18, 2012, 11:44:33 PM
Scrax, you can try to do the same for the internal flash.

The 40D has these properties:

PROP_BUILTIN_STROBO_SETTING

PROP_STROBO_CFN
PROP_STROBO_SETTING
PROP_STROBO_WIRELESS_SETTING



Yes will try internal too.
Title: Re: Flash prop
Post by: g3gg0 on December 19, 2012, 01:01:50 AM
Quote from: scrax on December 18, 2012, 07:20:57 PM
I've added here all i can figure out for now, I hope it's clear.
How to put those value in property.h?

for example this is wrong i suppose:
#define STROBE_1ST_CURTAIN 0x8
#define STROBE_2ND_CURTAIN 0xA
#define STROBE_HI_SPEED 0xD

(very good research btw!)

i think thats *nothing* for property.h.

create a strobo.c/.h and put these defines there along with the code to access them.
as this is very specific, i recommend adding parameter description too.
e.g.

/** call this function to set the strobe firing to 1st/2nd curtain ...
  *  @param strobe_type: one of STROBE_1ST_CURTAIN  STROBE_2ND_CURTAIN STROBE_HI_SPEED 0xD
  */
void strobo_set_curtain(uint32_t strobo_type)
{
...
}

Quote from: scrax on December 18, 2012, 07:20:57 PM
How to specify that it need to go in the 16th "place" (last char of second group) in that prop?
something like this, maybe?:
#define STROBE_1ST_CURTAIN 0x00000000 0x00000008
or:
#define STROBE_1ST_CURTAIN[16] 0x8

i would add a define to strobo.h
#define STROBO_<propertyname>_CURTAIN_POS (16)
and in strobo.c:

...
property_buffer[STROBO_<propertyname>_CURTAIN_POS] = strobo_type;
...
Title: Re: Flash prop
Post by: g3gg0 on December 19, 2012, 01:10:34 AM
btw:
- DryosDebugMsg(131, 3, "GUI_SetStroboSettingCompositionStatus Status(%d) IsBuiltIn(%d)", a1, a2);
- "***** PROP_STROBO_SETTING_COMPOSITION size = 0[%d]"
these are some messages when
prop_request_change(0x80030038u, &byte_7B1A8, 34);
is called on 7D


thats some debug code: (after manual cleanup)

DryosDebugMsg(131, 3, (char *)&"PROP_STROBO_SETTING_COMPOSITION");
DryosDebugMsg(131, 3, (char *)&"StroboSettingCompositionData.status[%#x]", (unsigned __int8)byte_7B1A8[0]);
DryosDebugMsg(131, 3, (char *)&"StroboSettingCompositionData.setting0[%#x]", (unsigned __int8)byte_7B1A8[1]);
DryosDebugMsg(131, 3, (char *)&"StroboSettingCompositionData.setting1[%#x]", (unsigned __int8)byte_7B1A8[2]);
DryosDebugMsg(131, 3, (char *)&"StroboSettingCompositionData.setting2[%#x]", (unsigned __int8)byte_7B1A8[3]);
DryosDebugMsg(131, 3, (char *)&"StroboSettingCompositionData.setting3[%#x]", (unsigned __int8)byte_7B1A8[4]);
DryosDebugMsg(131, 3, (char *)&"StroboSettingCompositionData.setting4[%#x]", (unsigned __int8)byte_7B1A8[5]);
DryosDebugMsg(131, 3, (char *)&"StroboSettingCompositionData.setting5[%#x]", (unsigned __int8)byte_7B1A8[6]);
DryosDebugMsg(131, 3, (char *)&"StroboSettingCompositionData.setting6[%#x]", (unsigned __int8)byte_7B1A8[7]);
DryosDebugMsg(131, 3, (char *)&"StroboSettingCompositionData.setting7[%#x]", (unsigned __int8)byte_7B1A8[8]);
DryosDebugMsg(131, 3, (char *)&"StroboSettingCompositionData.setting8[%#x]", (unsigned __int8)byte_7B1A8[9]);
DryosDebugMsg(131, 3, (char *)&"StroboSettingCompositionData.setting9[%#x]", (unsigned __int8)byte_7B1A8[10]);
DryosDebugMsg(131, 3, (char *)&"StroboSettingCompositionData.setting10[%#x]", (unsigned __int8)byte_7B1A8[11]);
DryosDebugMsg(131, 3, (char *)&"StroboSettingCompositionData.setting11[%#x]", (unsigned __int8)byte_7B1A8[12]);
DryosDebugMsg(131, 3, (char *)&"StroboSettingCompositionData.setting12[%#x]", (unsigned __int8)byte_7B1A8[13]);
DryosDebugMsg(131, 3, (char *)&"StroboSettingCompositionData.setting13[%#x]", (unsigned __int8)byte_7B1A8[14]);
DryosDebugMsg(131, 3, (char *)&"StroboSettingCompositionData.setting14[%#x]", (unsigned __int8)byte_7B1A8[15]);
DryosDebugMsg(131, 3, (char *)&"StroboSettingCompositionData.setting15[%#x]", (unsigned __int8)byte_7B1A8[16]);
DryosDebugMsg(131, 3, (char *)&"StroboSettingCompositionData.setting16[%#x]", (unsigned __int8)byte_7B1A8[17]);
DryosDebugMsg(131, 3, (char *)&"StroboSettingCompositionData.setting17[%#x]", (unsigned __int8)byte_7B1A8[18]);
DryosDebugMsg(131, 3, (char *)&"StroboSettingCompositionData.setting18[%#x]", (unsigned __int8)byte_7B1A8[19]);
DryosDebugMsg(131, 3, (char *)&"StroboSettingCompositionData.setting19[%#x]", (unsigned __int8)byte_7B1A8[20]);
DryosDebugMsg(131, 3, (char *)&"StroboSettingCompositionData.setting20[%#x]", (unsigned __int8)byte_7B1A8[21]);
DryosDebugMsg(131, 3, (char *)&"StroboSettingCompositionData.setting21[%#x]", (unsigned __int8)byte_7B1A8[22]);
DryosDebugMsg(131, 3, (char *)&"StroboSettingCompositionData.setting22[%#x]", (unsigned __int8)byte_7B1A8[23]);
DryosDebugMsg(131, 3, (char *)&"StroboSettingCompositionData.setting23[%#x]", (unsigned __int8)byte_7B1A8[24]);
DryosDebugMsg(131, 3, (char *)&"StroboSettingCompositionData.setting24[%#x]", (unsigned __int8)byte_7B1A8[25]);
DryosDebugMsg(131, 3, (char *)&"StroboSettingCompositionData.setting25[%#x]", (unsigned __int8)byte_7B1A8[26]);
DryosDebugMsg(131, 3, (char *)&"StroboSettingCompositionData.setting26[%#x]", (unsigned __int8)byte_7B1A8[27]);
DryosDebugMsg(131, 3, (char *)&"StroboSettingCompositionData.setting27[%#x]", (unsigned __int8)byte_7B1A8[28]);
DryosDebugMsg(131, 3, (char *)&"StroboSettingCompositionData.setting28[%#x]", (unsigned __int8)byte_7B1A8[29]);
DryosDebugMsg(131, 3, (char *)&"StroboSettingCompositionData.setting29[%#x]", (unsigned __int8)byte_7B1A8[30]);
DryosDebugMsg(131, 3, (char *)&"StroboSettingCompositionData.setting30[%#x]", (unsigned __int8)byte_7B1A8[31]);
DryosDebugMsg(131, 3, (char *)&"StroboSettingCompositionData.setting31[%#x]", (unsigned __int8)byte_7B1A8[32]);
DryosDebugMsg(131, 3, (char *)&"StroboSettingCompositionData.setting32[%#x]", (unsigned __int8)byte_7B1A8[33]);
Title: Re: Flash prop
Post by: scrax on December 19, 2012, 01:43:24 AM
So far this is what i got, is it correct? :)

//this in strobo.h
#define STROBO_SYNC_POS (16)  // why parenthesis? And maybe this is 15?
#define STROBO_1ST_CURTAIN 0x8
#define STROBO_2ND_CURTAIN 0xA
#define STROBO_HI_SPEED 0xD

#define STROBO_ZOOM_POS (4)  // why parenthesis? and this 3? if the first is 0
#define STROBO_ZOOM_AUTO 0x8
#define STROBO_ZOOM_24MM 0x3
#define STROBO_ZOOM_28MM 0x5
#define STROBO_ZOOM_35MM 0x7
#define STROBO_ZOOM_50MM 0x9
#define STROBO_ZOOM_70MM 0xB
#define STROBO_ZOOM_80MM 0xD
#define STROBO_ZOOM_105MM 0xF

//this in strobo.c
uint32_t strobo_settings;
PROP_HANDLER(PROP_STROBO_SETTINGS)
{
    strobo_settings = buf[0];
}
/** call this function to set the strobo firing to 1st/2nd curtain ...
*  @param strobo_type: one of
*/
void strobo_set_sync(uint32_t strobo_type)
{
    strobo_settings[STROBO_SYNC_POS] = strobo_type;
    prop_request_change(PROP_STROBO_SETTINGS, &strobo_settings, 34)
}

/** call this function to change external flash zoom...**/
void strobo_set_zoom(uint32_t strobo_zoom)
{
    strobo_settings[STROBO_ZOOM_POS] = strobo_zoom;
    prop_request_change(PROP_STROBO_SETTINGS, &strobo_settings, 34)
}
Title: Re: Flash prop
Post by: scrax on December 19, 2012, 01:49:18 AM
Quote from: g3gg0 on December 19, 2012, 01:10:34 AM
DryosDebugMsg(131, 3, (char *)&"StroboSettingCompositionData.status[%#x]", (unsigned __int8)byte_7B1A8[0]);

So this status can be z in my table? Manual mode 3 aother 1 ?
and also the POS in strobo.h are reversed.

so:
#define STROBO_ZOOM_POS (1E) // or 31?
Title: Re: Flash prop
Post by: jplxpto on December 19, 2012, 02:21:32 AM
Scrax, you are my new hero :)

Very good work!
Title: Re: Flash prop
Post by: jplxpto on December 19, 2012, 03:08:46 AM
If it were possible one day, we could control the external flashes with integrated flash. The new models already allow this.
Title: Re: Flash prop
Post by: imme on December 19, 2012, 06:53:38 AM
Can we use very high speed flash synchronization with ML software?

1. Be able to take images with flash speed sync at 1/800 or higher,
2. DSLR Camera mechanical shutters cant do it. 
3. Can we use ML + Camera on B + ML software shutter speeds

if yes, than definitely this is a whole new world of creativity....
Title: Re: Flash prop
Post by: scrax on December 19, 2012, 11:14:23 PM
Added also the internal flash prop found, now 9 numbers are unknown or never changed on my camera.
If what i've posted for strobo.c is correct i'll go on filling it.
Title: Re: Flash prop
Post by: g3gg0 on December 20, 2012, 09:59:40 AM
Quote from: scrax on December 19, 2012, 01:49:18 AM
So this status can be z in my table? Manual mode 3 aother 1 ?
and also the POS in strobo.h are reversed.

so:
#define STROBO_ZOOM_POS (1E) // or 31?

i personally prefer 0x1E, but both is ok.
Title: Re: Flash prop
Post by: scrax on December 20, 2012, 11:41:10 AM
Good I'm going on with strobo.c but i'm still not sure about one thing
this 0x80030038 has a length of 0x22 = 34 char
but spy prop shows me: 8+8+7+6+6+6 = 41 char
how can my positions be correct?
Title: Re: Flash prop
Post by: scrax on December 20, 2012, 12:29:08 PM
If someone want to check and edit what i did i'm pushing here my strobo.c/.h : https://bitbucket.org/600Dplus/magic-lantern-finding-flash-prop/commits/all
Permission are the same of the source repo so you can make corrections  ;)
Title: Re: Flash prop
Post by: g3gg0 on December 20, 2012, 12:42:38 PM
strobo_settings must be an array of size 34 iirc and in prop handler you must memcpy the data into your strobo_settings
Title: Re: Flash prop
Post by: scrax on December 20, 2012, 01:29:15 PM
Quote from: g3gg0 on December 20, 2012, 12:42:38 PM
strobo_settings must be an array of size 34 iirc and in prop handler you must memcpy the data into your strobo_settings
Googled for memcpy now and come up with this but it's wrong i think  :( :


#include "dryos.h"
#include "strobo.h"

size_t n = 2;
uint32_t strobo_settings[PROP_STROBO_SETTINGS_LEN];
PROP_HANDLER(PROP_STROBO_SETTINGS)
{
    memcpy(buf[STROBO_SETTING_POS], &strobo_settings, n);
}

/** call this function when changing to/from manual flash mode...**/
void strobo_set_status(uint32_t strobo_status)
{
#define STROBO_SETTING_POS (STROBO_SETTINGS_STATUS_POS)
    strobo_settings[STROBO_SETTING_POS] = strobo_status;
    prop_request_change(PROP_STROBO_SETTINGS, &strobo_settings, PROP_STROBO_SETTINGS_LEN);
}
Title: Re: Flash prop
Post by: g3gg0 on December 20, 2012, 02:31:45 PM

#include "dryos.h"
#include "strobo.h"

uint32_t strobo_settings[PROP_STROBO_SETTINGS_LEN];
PROP_HANDLER(PROP_STROBO_SETTINGS)
{
    memcpy(strobo_settings, buf, PROP_STROBO_SETTINGS_LEN * 4);
}

/** call this function when changing to/from manual flash mode...**/
void strobo_set_status(uint32_t strobo_status)
{
    strobo_settings[STROBO_SETTINGS_STATUS_POS] = strobo_status;
    prop_request_change(PROP_STROBO_SETTINGS, &strobo_settings, PROP_STROBO_SETTINGS_LEN);
}
Title: Re: Flash prop
Post by: scrax on December 20, 2012, 03:55:17 PM
thanks I've finished now adding all but still can't get this:


addrleng0x290x270x250x230x210x1E0x1C0x1A0x180x170x150x130x110x0E0x0C0x0A0x080x060x040x020x00
800300380022:aa00bc04gghhffdennkmmqqiijjss38oopprrttzz
I think that leng should be 0x30, not 0x22.. what's going on?
Title: Re: Flash prop
Post by: g3gg0 on December 20, 2012, 04:46:20 PM
cant you add a property handler that permanently checks the size and reports it?
Title: Re: Flash prop
Post by: scrax on December 20, 2012, 04:53:21 PM
Quote from: g3gg0 on December 20, 2012, 04:46:20 PM
cant you add a property handler that permanently checks the size and reports it?
is bad leaving it at 0x31 even if it's less I suppose? 
Title: Re: Flash prop
Post by: a1ex on December 20, 2012, 04:57:19 PM
The length is camera-specific; you can define a maximum length and allocate the array statically, but use the length reported by the prop handler when you call prop_request_change.

I've bricked Marvin's 5D3 with a wrong length value in a prop_request_change call. It was easy to unbrick, only took one hour or so.
Title: Re: Flash prop
Post by: Pelican on December 29, 2012, 10:21:46 PM
Wow! I'm working on this too (I want to display the remote flash settings on the info screen), but you were quicker! Congrats!
I'll download your strobo.c and see it.
I want some more readable than a big array, like make a struct for flash settings like lens_info.

But if it is camera dependent we should put it to the platform specific folder instead of src, shouldn't we?
Title: Re: Flash prop
Post by: scrax on December 29, 2012, 11:23:11 PM
Quote from: Pelican on December 29, 2012, 10:21:46 PM
Wow! I'm working on this too (I want to display the remote flash settings on the info screen), but you were quicker! Congrats!
I'll download your strobo.c and see it.
I want some more readable than a big array, like make a struct for flash settings like lens_info.

But if it is camera dependent we should put it to the platform specific folder instead of src, shouldn't we?
Thank's, I'm stuck now on that, so go on with what you think could be done to make those settings usable.  :)
I suppose like other prop that address is the same and just values are camera specific (for example for wireless flash.)
Title: Re: Flash prop
Post by: Pelican on December 30, 2012, 09:23:16 PM
Quote from: scrax on December 29, 2012, 11:23:11 PM
Thank's, I'm stuck now on that, so go on with what you think could be done to make those settings usable.  :)
I suppose like other prop that address is the same and just values are camera specific (for example for wireless flash.)
There are a lot of problem (at least on 7D).
This property only contains data when you are in the Canon flash menu. After that its deleted.
Also when you are in the Canon flash menu, you can see the same data at memory address 7B1A8 and several other places, but when you close the menu then all of them deleted too. I found the property data with memdump in other locations after the menu closed but these adresses changed every time.


Anyway, I fixed all the typos and stuff in the strobo.c/.h so you can compile them and also made a struct to the array.
I can send it to you if you can use it on 600D.


struct flash_info {
   int firing; // 0: enable firing, 1: disable_firing
   int ettl2_meter; // 0: evaluative, 1: average
   int expo_comp;
   int zoom;
   int mode; //E-TTL II, Manual, Multi
   int wireless_func;  // Disable, Ext, Ext (A,B,C), Ext+Int, Ext(A,B,C)+Int
   int wireless_channel; // (1,2,3,4)
   int shutter_sync; // 1st curt., 2nd curt, High Speed
   int multi_freq; // (199 = 0xc7, 1 = 0x1)
   int multi_count; //(hex like before 1 = 0x1 18 = 0x12)
   int internal_output; // Flash power values from 1/1 to 1/128 1/3stop: (2,5,8,a,d,10,12,15,18,1a,1d,20,22,25,28,2a,2d,30,32,35,38)
   int external_output;
   int group_a_output; // 0x00..0x38: 1/1..1/128
   int group_b_output;
   int group_c_output;
};


Another thing about your first post with this
addr   leng   0x29   0x27   0x25   0x23   0x21   0x1E   0x1C   0x1A   0x18   0x17   0x15   0x13   0x11   0x0E   0x0C   0x0A   0x08   0x06   0x04   0x02   0x00
80030038   0022:   aa   00   bc   04   gg   hh   ff   de   nn   k   mm   qq   ii   jj   ss   38   oo   pp   rr   tt   zz

I really don't understand how do you count these numbers.
For example, you positioned the c: flash mode to the 0x25 and actually it is the 0x01
When you see the prop spy data you see this:
80030038 0022: "first longword" "second long word" ... "sixth longword"

Doesn't matter if you see only one zero it is a longword (four bytes) so the byte order is:
03 02 01 00  07 06 05 04  0b 0a 09 08  0f 0e 0d 0c ...
Title: Re: Flash prop
Post by: scrax on December 30, 2012, 11:57:10 PM
Quote from: Pelican on December 30, 2012, 09:23:16 PM
Doesn't matter if you see only one zero it is a longword (four bytes) so the byte order is:
03 02 01 00  07 06 05 04  0b 0a 09 08  0f 0e 0d 0c ...
Thank's Pelican, now understood a little more why the numbers were not correct. Added to you writing permission on the fork (https://bitbucket.org/600Dplus/magic-lantern-finding-flash-prop) so you can pull your corrections that i'll use for understanding better my errors, if you prefer posting strobo.c/h somewhere i will add them there for reference since I think that probably also 600D has the same problems you found on 7D.
Title: Re: Flash prop
Post by: Marsu42 on April 06, 2013, 11:21:17 AM
Quote from: Pelican on December 30, 2012, 09:23:16 PM
This property only contains data when you are in the Canon flash menu. After that its deleted.

I'm trying to implement this feature request (switch from hss to 2nd curtain): http://www.magiclantern.fm/forum/index.php?topic=5040.0

But from what you're saying I understand it's impossible to either read or write this property outside the Canon flash menu, so changing anything about the flash from normal shooting is doomed?
Title: Re: Flash prop
Post by: peter.scharff on April 08, 2013, 09:18:07 AM
Sorry to crash the party here guys, but I was reading this post with interest, would finding these setting help with implementing a ml dedicated flash menu that is easy to navigate to via a user defined button shortcut ? instead of the long winded approach canon has buried deep within their menus, Canons implementation really breaks my flow while shooting and setting up ratios.

I did a feature request some time ago and a1ex mentioned it wasn't possible as of yet here :

http://www.magiclantern.fm/forum/index.php?topic=3392.msg17775#msg17775

If this now possible could you look at implementing the above request, I'm sure it would be a much loved feature for us that use Flash while shooting,

Thank all :)
Title: Re: Flash prop
Post by: Marsu42 on April 08, 2013, 01:16:04 PM
Quote from: peter.scharff on April 08, 2013, 09:18:07 AM
If this now possible could you look at implementing the above request, I'm sure it would be a much loved feature for us that use Flash while shooting

I agree - while I can change most settings directly on my "big" Canon flash, some things are better done on the large camera lcd and it's a pita to navigate to say "Group C EC" in the Canon menu structure - and you even cannot link items in the flash menu to the Canon "my menu" :-(

Maybe I'll come around to do it sometime later, but as far as I understand it the flash props aren't completely worked out yet (or they aren't accessible until you're in the Canon flash menu).
Title: Re: Flash prop
Post by: nanomad on April 08, 2013, 01:30:48 PM
Quote from: Marsu42 on April 08, 2013, 01:16:04 PM
Maybe I'll come around to do it sometime later, but as far as I understand it the flash props aren't completely worked out yet (or they aren't accessible until you're in the Canon flash menu).
Both things actually  :(
Title: Re: Flash prop
Post by: Marsu42 on April 08, 2013, 03:43:41 PM
Quote from: nanomad on April 08, 2013, 01:30:48 PM
Both things actually  :(

Damn, that's bad news - maybe Canon wants to sell their expensive flashes as the only sane options to have a fast access to the flash settings? The fact alone that you cannot pin flash settings to my menu is strange ... or maybe Canon's whole flash code is just not integrated well as the camera tends to loose some settings (like the flash group modes) on battery changes.

But to be absolutely sure: The gist of it is that the whole thing is doomed since the props aren't there unless you're in the Canon menu, and then you don't need ml anymore to change them, correct?
Title: Re: Flash prop
Post by: 1% on April 08, 2013, 05:22:14 PM
6D:


*0x77C2C = arg0
_prop_request_change(0x80040014, 0x77c2c, 0x4, arg3) => ret__prop_request_change_FF19A328


The prop changes between evaluative and average... so does mem location.

0x80030038 or PROP_STROBO_SETTING contains values all the time for me. Am I missing something?


Ok... prop is wiped out after playing in the flash settings. But my flash is off the camera and the dialog said as much. So maybe prop shows up only when strobo connected? I hooked up/powered the flash and its back.
* on 600D... that prop has values too at least at the front where I can see with prop browser.
Title: Re: Flash prop
Post by: Marsu42 on June 16, 2013, 05:30:07 PM
Any news here, anybody did some more research esp. as far as hss on/off goes?

I'd still like to force-switch hss on with ml instead of having to push a button on the flash ... the latter is a major annoyance with Canon because if you forget it after changing batteries the camera stops at x-sync no matter what and simply overexposes all pictures, I've lost a couple of good shots this way.
Title: Re: Flash prop
Post by: jondeckerphoto on July 23, 2015, 02:42:42 PM
I'm subscribing to this string. I'm on the hunt for a solution to the second Curtain Sync for non-canon strobe triggers.
Title: Re: Flash prop
Post by: jondeckerphoto on July 23, 2015, 03:16:39 PM
After researching this for days before finding the forum, I'm trending towards finding a hardware solution. There's some trigger or electronic feedback that the my Canon flashes give the body that allows 2nd shutter sync that I'm hoping can be remedied with a dongle, if this software solution you-all are working on isn't feasible.
Title: Re: Flash prop
Post by: dragos on April 14, 2016, 02:21:28 AM
Hi guys, did you manage to find a workaround to the second curtain sync? This thing is driving me crazy. Got a 6D , have to use it underwater with a non-canon flash and i dont have enough space in the housing for any kind of trigger... Thank you very much