Top page 2.0.4 AJ

Related pages: Live View Structure

Related page: AJ_LiveView_main

Very low level (ie Fun) stuff - programming the DIGIC for zoom.

Very early page on Subs to Update DIGIC registers:

NB: This page is being used as a 'scratchpad'.

Many of the Canon ideas on Zooming use a language that is also used by others in this engineering space: [broken link]

[2010_09_20] --> Remidner to AJ. Update the 16 sub routines for x1 x5 x10 with their new names / add comment as to what they do.


5 Zoom modes. Two rec modes, Three non-record modes.[edit | edit source]


  • In LiveView Non-record mode - it is possible to magnify x1, x5, and x10.These correspond to LiveViewMgr[0xC0] =0 , 1, and 2 respectively.
  • In LiveView Record mode - there are two modes that are both x1 magniifiction.
    These correspond to LiveViewMgr[0x948] =0 or 1, respectively.
  • The firmware uses these to decide which of the 5 banks of 16 subroutines to call to setup the DIGIC.

Where is the list of 16 DIGIC setup subs selected?[edit | edit source]

  • AJ_ChangeVDInterrupt() - Note: This routine also mentions Setting up interrupts for Recording

Both of the above routines are called as part of the LiveView State machine (called "LVstate")

Both of these (currently) seem to refer to all 5 Zoom mode lists of 16subs wth a switch:

LiveView Non-record -> get 16 subroutines in AJ_GetLiveViewPassInfo_Zoom()

LiveView Record -> get 16 subroutines in AJ_GetRecMoviePassInfo_RecModeD()

LiveViewMgr_Struct[edit | edit source]

aAJ_0x1D78_LiveViewMgr_struct_ptr points to aAJ_LiveViewMgr_struct (size = 0x29D8)


NON-RECORD Magnification


0 = x1 bank of 16 subs to call

1 = x5 bank of 16 subs to call

2 = x10 bank of 16 subs to call

Ref: AJ_LiveView_main(), AJ_ChangeVDInterrupt()

Nb: These subs write the addr of the 16 engio structs to [0xCD0]
Also see AJ_sub40_LiveView_main() [part of AJ_LiveView_main() ]




0 = bank of 16 subs to call

1 = another bank of 16 subs to call

Both of these are x1 magnification


uses this to select banks of 16 subs at


[0xCD0] adr_16_subs = Address of 16 engio_write_subs to call
depending on Zoom level
cf [0xC0]

How does the firmware call AJ_LiveView_main() and AJ_ChangeVDInterrupt()?

How is AJ_LiveView_main() called?[edit | edit source]

There is a Huge list used as part of the LiveView state machine - called "LVState".

  • This state machine directy calls AJ_LiveView_main()
  • Also, the state machine calls a small routine AJ_LiveView_StartInSuspend() which then calls AJ_LiveView_main()

More deatils on where the "LVState" State machine is created:

  • AJ_LiveView_Initialise() ---> AJ_CreateStateObject_LiveView() ---> Huge state machine created using following struct:
ROM:FFC79630 aAJ_0xFFC79630_LV_VarSubList   DCD #1           
ROM:FFC79634                                DCD AJ_LiveView_main()

ROM:FFC79638                                DCD #1
ROM:FFC7963C                                DCD AJ_LDR_R0_aAJ_0x44FC_LiveView_struct_0x2C()
ROM:FFC79690                                DCD #13
ROM:FFC79694                                DCD AJ_LiveView_StartInSuspend()
ROM:FFC79768                                DCD #4
ROM:FFC7976C                                DCD AJ_ChangeVDInterrupt()
And several hundred more pairs of Value, Sub() used in the "LVState" state machine.

How is AJ_ChangeVDInterrupt() called?[edit | edit source]

  • Look at the "LVState" state machine above .. it simply a different state in the LiveView State machine.


List of 16 DIGIC routines called for ZOOM level -> x1 , x5 , x10 [NON-RECORD][edit | edit source]


Subs [0..15] x1 x5 x10
0 AJ_STR_to_HDMI_SetImagePass_struct_0x13E8C_0x04_x1 AJ_SetImagePassParameter_x5 AJ_STR_0x13F0C_0x04_SetImagePass_x10_struct
1 AJ_calls_SetImagePass_x1 AJ_SetImagePass_x5 AJ_SetImagePass_x10
2 AJ_StartImagePass_x1 AJ_StartImagePass_x5 AJ_StartImagePass_x10
3 [TG_standby] AJ_0xFFA081D4_seems_to_be_x1_related AJ_0x13EC0_struct_engio_x5 AJ_Start_n_SetImagePass_x10
4 AJ_calls_x1_related AJ_ClearImagePass_x5 AJ_dummy_cbr_engio_x10
5 AJ_Set_n_Start_x1_related AJ_0x13EC0_n_0xC0F08000_struct_engio_x5 AJ_0xC0F11000_n_0xC0F08000_engio_x10
6 AJ_ImagePass_related_x1 AJ_Guess_Set_n_clear_ImagePass_x5_related AJ_Start_n_Set_ImagePass_x10_related
7 AJ_calls_eng_set_dummy_cbr AJ_eng_set_dummy_cbr_x5 AJ_eng_set_dummy_cbr_x10
8 AJ_SetHivshdIrParameter_x1 AJ_null_sub_x5 AJ_null_sub_x10
9 AJ_0x13F78_engine_struct_x1x5x10 AJ_0x13F78_engine_struct_x1x5x10 AJ_0x13F78_engine_struct_x1x5x10
10 AJ_SetIntermediatePass_x1 AJ_SetIntermediatePassMagnify_x5x10 AJ_SetIntermediatePassMagnify_x5x10
11 AJ_StarIntermediatePass_x1 AJ_StartIntermediatePassMagnify_x5x10 AJ_StartIntermediatePassMagnify_x5x10
12 [TG_standby] AJ_0x13F78_n_callback_engine_struct_x1x5x10 AJ_0x13F78_n_callback_engine_struct_x1x5x10 AJ_0x13F78_n_callback_engine_struct_x1x5x10
13 AJ_0x13F78_LockEngineResources_x1x5x10 AJ_0x13F78_LockEngineResources_x1x5x10 AJ_0x13F78_LockEngineResources_x1x5x10
14 AJ_0x13F78_n_0xC0F1E000_x1x5x10 AJ_0x13F78_n_0xC0F1E000_x1x5x10 AJ_0x13F78_n_0xC0F1E000_x1x5x10
15 0 0 0


List of 16 DIGIC routines called for ZOOM level -> x1 only [RECORD][edit | edit source]


Subs [0..15] x1 mode 1 x1 mode 2
0 AJ_STR_to_HDMI_SetImagePass_struct_0x13E8C_0x04_x1 AJ_STR_to_HDMI_SetImagePass_struct_0x13E8C_0x04_x1
1 AJ_calls2_SetImagePass_x1 AJ_calls2_SetImagePass_x1
2 AJ_StartImagePass_x1 AJ_StartImagePass_x1
3 AJ_0xFFA081D4_seems_to_be_x1_related AJ_0xFFA081D4_seems_to_be_x1_related
4 [differs from x1 zoom] AJ_calls2_x1_related AJ_calls2_x1_related
5 AJ_Set_n_Start_x1_related AJ_Set_n_Start_x1_related
6 AJ_ImagePass_related_x1 AJ_ImagePass_related_x1
7 AJ_calls_eng_set_dummy_cbr AJ_calls_eng_set_dummy_cbr
8 AJ_SetHivshdIrParameter_x1 AJ_SetHivshdIrParameter_x1
9 AJ_0x13F78_engine_struct_x1x5x10 AJ_0x13F78_engine_struct_x1x5x10
10 AJ_SetIntermediatePassH264_1080 AJ_SetIntermediatePassH264_VGA
11 AJ_StartIntermediatePassH264_1080i AJ_StartIntermediatePassH264_VGA
12 AJ_0xFFCABA60_engio_struct_n_0x33B88_callback_n_EngDrvOut_n_0x13F78_engio_struct AJ_0xFFCABA98_engio_write_struct_n_0x33B88_callback_n_EngDrvOut_n_0x13F78_engio_struct
13 AJ_0xFFCABB28_engio_struct_n_0x13F78_engio_struct_n_LockEngine AJ_0xFFCABB78_engio_write_struct_n_0x13F78_engio_struct
14 AJ_0x13F78_n_0xC0F1E000_x1x5x10 AJ_0x13F78_n_0xC0F1E000_x1x5x10
15 1 1

. .

Zooming before Recording[edit | edit source]


The Granularity of the Zoom in x5 and x10 mode is: 57 positions horizontally, 37 positions vertically.

Community content is available under CC-BY-SA unless otherwise noted.