Author Topic: Canon 5D Mark III / 5D3 / Firmware 1.3.4  (Read 35509 times)

dfort

  • Hero Member
  • *****
  • Posts: 2089
Re: Canon 5D Mark III / 5D3 / Firmware 1.3.4
« Reply #50 on: November 14, 2017, 05:20:15 PM »
It's usually spelled Excute in Canon code.

Ok--now I see it. There's a bunch of "DlgMnCardFormatExcute" all over the place.

(the obvious part is on the UI, but the presence of the bug can be found in these logs)

Obvious? Hum, how does Canon spell UI?
EOSM.202 EOSM.203 EOSM2.103 700D.115 5D3.*

nexiabass

  • New to the forum
  • *
  • Posts: 13
Re: Canon 5D Mark III / 5D3 / Firmware 1.3.4
« Reply #51 on: November 14, 2017, 07:25:16 PM »
Just installed the newest version.
It seems to be magic.... The Q Button works as expected now!
Thank you so much  :D

dfort

  • Hero Member
  • *****
  • Posts: 2089
Re: Canon 5D Mark III / 5D3 / Firmware 1.3.4
« Reply #52 on: November 15, 2017, 07:45:22 AM »
Still looking for trouble. Self tests are passing.



Going from 1.2.3 to 1.3.4 check-stubs.py flags a few stubs that affect the UI but these seem to be correct.
Code: [Select]
gui_main_struct                     0x00024120 -> 0x00024120 [0x000]
dm_names                            0x00024a70 -> 0x00024a70 [0x000]
task_max                            0x00025024 -> 0x00025024 [0x000]
gui_task_list                       0x000321c8 -> 0x000321e0 [0x018] [!!!]
cf_device_ptr                       0x00036184 -> 0x0003619c [0x018] [!!!]
sd_device                           0x00039960 -> 0x00039978 [0x018] [!!!]
LCD_Palette                         0x00041510 -> 0x00041530 [0x020] [!!!]
bmp_vram_info                       0x00042d10 -> 0x00042d30 [0x020] [!!!]
additional_version                  0x00046910 -> 0x00046930 [0x020] [!!!]
camera_engine                       0xc0220000 -> 0xc0220000 [0x000]
cstart                              0xff0c1ca0 -> 0xff0c1ca0 [0x000] [!!!]
init_task                           0xff0c5298 -> 0xff0c52a0 [0x008]
_malloc                             0xff0c8178 -> 0xff0c8180 [0x008]
_free                               0xff0c81d0 -> 0xff0c81d8 [0x008]
gui_main_task                       0xff0de948 -> 0xff0de950 [0x008]
GUI_Control                         0xff0ded1c -> 0xff0ded24 [0x008]
gui_init_end                        0xff0df384 -> 0xff0df38c [0x008]

Is it one bug or several? And it is in the api_test.lua log? Feel I'm overlooking something very obvious.
EOSM.202 EOSM.203 EOSM2.103 700D.115 5D3.*

dfort

  • Hero Member
  • *****
  • Posts: 2089
Re: Canon 5D Mark III / 5D3 / Firmware 1.3.4
« Reply #53 on: Yesterday at 02:56:06 AM »
...the presence of the bug can be found in these logs...

Took another look and of course it hit me in the face this time.

Code: [Select]
lens = table:
  name = "EF50mm f/1.8 STM"
  focal_length = 0
  focus_distance = 14080
  hyperfocal = 0
  dof_near = 0
  dof_far = 0
  af = true
  af_mode = 0
  focus = function: p

Yeah, it shows up in the UI.



Some of it seems to be fine but obviously some of those values are out of whack.



Of course I found this out right when I have to run off to an appointment.
EOSM.202 EOSM.203 EOSM2.103 700D.115 5D3.*

dfort

  • Hero Member
  • *****
  • Posts: 2089
Re: Canon 5D Mark III / 5D3 / Firmware 1.3.4
« Reply #54 on: Yesterday at 07:09:20 AM »
Fixed! Maybe?





New test build posted.

[EDIT] Log looks better?

Code: [Select]
===============================================================================
ML/SCRIPTS/api_test.lua - 2017-11-17 23:17:32
===============================================================================

Strict mode tests...
Strict mode tests passed.

Generic tests...
camera = table:
  shutter = table:
    raw = 96
    apex = 5
    ms = 31
    value = 0.03125
  aperture = table:
    raw = 48
    apex = 5
    value = 5.599999
    min = table:
      raw = 22
      apex = 1.75
      value = 1.8
    max = table:
      raw = 80
      apex = 9
      value = 22.6
  iso = table:
    raw = 96
    apex = 8
    value = 800
  ec = table:
    raw = 0
    value = 0
  flash_ec = table:
    raw = 0
    value = 0
  kelvin = 5500
  mode = 3
  metering_mode = 3
  drive_mode = 0
  model = "Canon EOS 5D Mark III"
  model_short = "5D3"
  firmware = "1.3.4"
  temperature = 152
  state = 0
  bulb = function: p
  reboot = function: p
  shoot = function: p
event = table:
  pre_shoot = nil
  post_shoot = nil
  shoot_task = nil
  seconds_clock = nil
  keypress = nil
  custom_picture_taking = nil
  intervalometer = nil
  config_save = nil
console = table:
  show = function: p
  hide = function: p
  write = function: p
  clear = function: p
lv = table:
  enabled = true
  paused = false
  running = true
  zoom = 1
  pause = function: p
  start = function: p
  resume = function: p
  info = function: p
  stop = function: p
  wait = function: p
lens = table:
  name = "EF50mm f/1.8 STM"
  focal_length = 50
  focus_distance = 410
  hyperfocal = 15444
  dof_near = 400
  dof_far = 419
  af = true
  af_mode = 0
  focus = function: p
display = table:
  idle = true
  height = 480
  width = 720
  screenshot = function: p
  pixel = function: p
  off = function: p
  circle = function: p
  rect = function: p
  notify_box = function: p
  load = function: p
  line = function: p
  clear = function: p
  on = function: p
  draw = function: p
  print = function: p
key = table:
  last = 0
  press = function: p
  wait = function: p
menu = table:
  visible = false
  get = function: p
  close = function: p
  block = function: p
  open = function: p
  set = function: p
  new = function: p
testmenu = userdata:
  value = 0
  name = "Script API tests"
  help = "Various tests for the Lua scripting API."
  help2 = "When adding new Lua APIs, tests for them should go here."
  advanced = 0
  depends_on = 0
  edit_mode = 0
  hidden = false
  icon_type = 5
  jhidden = false
  max = 0
  min = 0
  selected = true
  shidden = false
  starred = false
  submenu_height = 0
  submenu_width = 0
  unit = 0
  works_best_in = 0
  run_in_separate_task = 0
  select = function: p
  update = nil
  info = nil
  rinfo = nil
  warning = nil
movie = table:
  recording = false
  stop = function: p
  start = function: p
dryos = table:
  clock = 18
  ms_clock = 18204
  prefix = "1Y7A"
  dcim_dir = table:
    exists = true
    create = function: p
    children = function: p
    files = function: p
    parent = table:
      exists = true
      create = function: p
      children = function: p
      files = function: p
      parent = table:
        exists = true
        create = function: p
        children = function: p
        files = function: p
        parent = nil
        path = "A:/"
      path = "A:/DCIM/"
    path = "A:/DCIM/100EOS5D/"
  config_dir = table:
    exists = true
    create = function: p
    children = function: p
    files = function: p
    parent = table:
      exists = true
      create = function: p
      children = function: p
      files = function: p
      parent = table:
        exists = true
        create = function: p
        children = function: p
        files = function: p
        parent = nil
        path = "B:/"
      path = "ML/"
    path = "ML/SETTINGS/"
  ml_card = table:
    cluster_size = 131072
    drive_letter = "B"
    file_number = 3188
    folder_number = 100
    free_space = 62705536
    type = "SD"
    path = "B:/"
    _card_ptr = userdata
  shooting_card = table:
    cluster_size = 32768
    drive_letter = "A"
    file_number = 3188
    folder_number = 100
    free_space = 85757472
    type = "CF"
    path = "A:/"
    _card_ptr = userdata
  date = table:
    year = 2017
    wday = 6
    day = 17
    min = 17
    yday = 321
    month = 11
    hour = 23
    isdst = false
    sec = 34
  remove = function: p
  directory = function: p
  call = function: p
interval = table:
  time = 10
  count = 0
  running = 0
  stop = function: p
battery = table:
  level = 37
  id = 0
  performance = 3
  time = 3996
  drain_rate = 33
task = table:
  yield = function: p
  create = function: p
property = table:
Generic tests completed.

Module tests...
Copy test: autoexec.bin -> tmp.bin
Copy test OK
Append test: tmp.txt
Append test OK
Testing exposure settings, module 'camera'...
Camera    : Canon EOS 5D Mark III (5D3) 1.3.4
Lens      : EF50mm f/1.8 STM
Shoot mode: 3
Shutter   : Ç30 (raw 96, 0.03125s, 31ms, apex 5)
Aperture  : Å5.6 (raw 48, f/5.599999, apex 5)
Av range  : Å1.8..Å22 (raw 22..80, f/1.8..f/22.6, apex 1.75..9)
ISO       : 800 (raw 96, 800, apex 8)
EC        : 0.0 (raw 0, 0 EV)
Flash EC  : 0.0 (raw 0, 0 EV)
Setting shutter to random values...
Setting ISO to random values...
Setting aperture to random values...
Please switch to Av mode.
Setting EC to random values...
Setting Flash EC to random values...
Exposure tests completed.

Testing module 'lv'...
LiveView is running; stopping...
Starting LiveView...
Setting zoom to x1...
Setting zoom to x5...
Setting zoom to x10...
Setting zoom to x5...
Setting zoom to x1...
Setting zoom to x10...
Setting zoom to x1...
Pausing LiveView...
Resuming LiveView...
Stopping LiveView...
LiveView tests completed.

Focus distance: 410
Focusing backward...
Focus distance: 8610
Focusing forward with step size 3, wait=true...
......................
Focus distance: 370
Focusing backward with step size 3, wait=true...
......................
Focus distance: 8610
Focus range: 22 steps forward, 22 steps backward.
Focusing forward with step size 3, wait=false...
......................
Focus distance: 370
Focusing backward with step size 3, wait=false...
......................
Focus distance: 8610
Focus range: 22 steps forward, 22 steps backward.
Focusing forward with step size 2, wait=true...
...
Focus distance: 370
Focusing backward with step size 2, wait=true...
...
Focus distance: 655350
Focus range: 159 steps forward, 160 steps backward.
Focusing forward with step size 2, wait=false...
...
Focus distance: 370
Focusing backward with step size 2, wait=false...
...
Focus distance: 655350
Focus range: 159 steps forward, 159 steps backward.
Focusing forward with step size 1, wait=true...
...
Focus distance: 370
Focusing backward with step size 1, wait=true...
...
Focus distance: 655350
Focus range: 1053 steps forward, 1054 steps backward.
Focusing forward with step size 1, wait=false...
...
Focus distance: 370
Focusing backward with step size 1, wait=false...
...
Focus distance: 655350
Focus range: 1054 steps forward, 1053 steps backward.
Focus test completed.

Done!
EOSM.202 EOSM.203 EOSM2.103 700D.115 5D3.*

a1ex

  • Administrator
  • Hero Member
  • *****
  • Posts: 10439
  • 5D Mark Free
Re: Canon 5D Mark III / 5D3 / Firmware 1.3.4
« Reply #55 on: Yesterday at 03:13:39 PM »
Right - this time, the focus distance figures look sane. For infinity, Canon firmware returns 65535 cm; maybe this can be adjusted in Lua somehow, but that applies to all models, not just 5D3 1.3.4.

There may be (didn't test) a similar bug in another widely used feature; it can be noticed with grep.

garry23

  • Hero Member
  • *****
  • Posts: 1311
Re: Canon 5D Mark III / 5D3 / Firmware 1.3.4
« Reply #56 on: Yesterday at 04:22:14 PM »
...a word of caution.

Remember the DoFs in the core ML are broken because of the integer math that gets used in C.

I don't think it has been corrected yet.

All ok in Lua, hence my focus bar script returns the 'correct' DoFs based on the usual assumptions, eg thin lens formula is ok to use and Canon returns a reasonable value for the focus distance.


dfort

  • Hero Member
  • *****
  • Posts: 2089
Re: Canon 5D Mark III / 5D3 / Firmware 1.3.4
« Reply #57 on: Yesterday at 07:02:17 PM »
...it can be noticed with grep.

That gave me an idea, not to debug a widely used feature but to find anything that I might have missed pertaining to this 1.3.4 firmware update.

Here's one I just found and updated:

fps-engio.c
Code: [Select]
#elif defined(CONFIG_5D3)
    #define NEW_FPS_METHOD 1
    #ifdef CONFIG_5D3_123
    #define SENSOR_TIMING_TABLE MEM(0x32530)
    #elseif CONFIG_5D3_134
    #define SENSOR_TIMING_TABLE MEM(0x32548)
    #else
    #define SENSOR_TIMING_TABLE MEM(0x325ac)
    #endif
EOSM.202 EOSM.203 EOSM2.103 700D.115 5D3.*

dfort

  • Hero Member
  • *****
  • Posts: 2089
Re: Canon 5D Mark III / 5D3 / Firmware 1.3.4
« Reply #58 on: Today at 07:29:27 AM »
Combed through the source tree with a fine toothed comb and came up with a few more fixes.
  • io_crypt module now works. Well, I've never actually used it but the addresses do check out if anyone wants to check it out. (Module posted)
  • 5D3.134 should also have quad-buffered LV like on the 5D3.123 so I updated it in vram.c
I also found this:

qemu-helper.c
Code: [Select]
// all DIGIC V cameras require a RAM offset, take it from stubs.S
#if defined(CONFIG_650D)
#define RAM_OFFSET (0xFFA4DF58-0x1900)
#elif defined(CONFIG_5D3)
#define RAM_OFFSET 0xFF9F07C0
#elif defined(CONFIG_6D)
#define RAM_OFFSET 0xFFCC34D4
#elif defined(CONFIG_EOSM)
#define RAM_OFFSET 0xFFA68D58
#else
#define RAM_OFFSET 0
#endif

qemu-helper.c is not in the qemu branch so maybe it has been depreciated? In any case, the RAM_OFFSET in this file is only valid for the 5D3.123.
EOSM.202 EOSM.203 EOSM2.103 700D.115 5D3.*