Author Topic: prop_register_master  (Read 2043 times)

coutts

  • Developer
  • Senior
  • *****
  • Posts: 401
prop_register_master
« on: July 23, 2012, 02:36:33 PM »
Has anyone figured out what this does / is used for yet?

coutts

  • Developer
  • Senior
  • *****
  • Posts: 401
Re: prop_register_master
« Reply #1 on: July 23, 2012, 02:57:52 PM »
This should all be identical for DryOS cameras as well

Structs for reference

Stubs for reference from 5d.111 firmware:
TaskClass__TryPostEvent: 0xFFB22AFC


prop_register_slave
struct created every time prop_register_slave is called (only local, it's not used after the call).
Code: [Select]
prop_register_slave  local_struct (len: 0x14)
off_0x00     prop_list_array     //~ len: 4 * arg1(property list). property list is copied to this struct, used to pass to TryPostEvent.
off_0x04     arg1
off_0x08     arg2
off_0x0C     arg3
off_0x10     arg4                //~ arguments passed to prop_register_slave call

This call is what actually does something (post some event to PropMgr):
Code: [Select]
TaskClass__TryPostEvent(
  Manager->name,                   //~ "PropMgr"
  Manager_struct_ptr               //~ pointer to a manager's struct, ex: PropMgr pointer setup in Prop_Initialize from canon's startup_task
  0x4                              //~ not known, always 0x4 for prop_register_slave
  local_struct                     //~ struct outlined above
  0x4                              //~ always same as arg2? 0x4 for prop_register_slave
);





prop_register_master
struct created every time prop_register_master is called (only local, it's not used after the call).
Code: [Select]
prop_register_master  local_struct (len: 0x20)
off_0x00     arg0         //~ arg0 to prop_register_master, usually some property id.
off_0x04     unk_struct   //~ len: arg2. some stuff copied from arg1 to this struct, len of memcpy operation is arg2.
off_0x08     arg2
off_0x0C     arg3
off_0x10     arg4
off_0x14 arg5
off_0x18 arg6
off_0x1C arg7

Calls:
Code: [Select]
TaskClass__TryPostEvent(
  Manager->name,                   //~ "PropMgr"
  Manager_struct_ptr               //~ pointer to a manager's struct, ex: PropMgr pointer setup in Prop_Initialize from canon's startup_task
  0x1                              //~ not known, always 0x1 for prop_register_slave
  local_struct                     //~ struct outlined above
  0x4                              //~ different from prop_register_slave, not the same as arg2 this time. this one is 0x4.
);



Properties registered with prop_register_master:
0x80010002
0x80020002
0x80020003
0x80020004
0x80020006
0x80020007
0x80020008
0x80020009
0x8002000A
0x80030002
0x80030005
0x80030006
0x80030007
0x80030008
0x8003000D
0x8003000E
0x80030011
0x80030014
0x80030015
0x80040000