Menu

Show posts

This section allows you to view all posts made by this member. Note that you can only see posts made in areas you currently have access to.

Show posts Menu

Messages - Torkie

#1
Camera-specific Development / Re: Canon 1200D
February 26, 2017, 08:44:55 PM
I managed to compile ML for the 1200D properly, and now excluded the part of the selftest module that exercised the bv_toggle function.

I can execute the stubs test, it produces a log which I have added below.

In the end it says: Test complete. 4401 passed, 1 failed.

I also ran the quick test, that seemed to run without problems.



[Pass] is_play_mode() => 0x1
[Pass] f = FIO_CreateFile("test.dat") => 0x3
[Pass] FIO_WriteFile(f, (void*)0xFF000000, 0x10000) => 0x10000
[Pass] FIO_WriteFile(f, (void*)0xFF000000, 0x10000) => 0x10000
       FIO_CloseFile(f)
[Pass] FIO_GetFileSize("test.dat", &size) => 0x0
[Pass] size => 0x20000
[Pass] p = (void*)_alloc_dma_memory(0x20000) => 0x40997048
[Pass] f = FIO_OpenFile("test.dat", O_RDONLY | O_SYNC) => 0x3
[Pass] FIO_ReadFile(f, p, 0x20000) => 0x20000
       FIO_CloseFile(f)
       _free_dma_memory(p)
[Pass] count => 0x3a98
[Pass] buf = fio_malloc(0x1000000) => 0x423680d4
[Pass] FIO_GetFileSize_direct("test.dat") => 0x82000000
[Pass] f = FIO_OpenFile("test.dat", O_RDWR | O_SYNC) => 0x3
[Pass] FIO_SeekSkipFile(f, 0, SEEK_END) => 0x82000000
[Pass] FIO_WriteFile(f, buf, 0x10) => 0x10
[Pass] FIO_SeekSkipFile(f, -0x20, SEEK_END) => 0x81fffff0
[Pass] FIO_WriteFile(f, buf, 0x30) => 0x30
[Pass] FIO_SeekSkipFile(f, 0x20, SEEK_SET) => 0x20
[Pass] FIO_SeekSkipFile(f, 0x30, SEEK_CUR) => 0x50
[Pass] FIO_SeekSkipFile(f, -0x20, SEEK_CUR) => 0x30
[Pass] FIO_GetFileSize_direct("test.dat") => 0x82000020
[Pass] FIO_RemoveFile("test.dat") => 0x0
[Pass] SetTimerAfter(0, timer_cbr, overrun_cbr, 0) => 0x15
[Pass] timer_func => 0x2
[Pass] SetTimerAfter(1000, timer_cbr, overrun_cbr, 0) => 0x2268
       msleep(900)
[Pass] timer_func => 0x0
       msleep(200)
[Pass] timer_func => 0x1
[Pass] ABS((timer_time/1000 - t0) - 1000) => 0x9
[Pass] ABS((timer_arg - ta0) - 1000) => 0xa
[Pass] timer = SetTimerAfter(1000, timer_cbr, overrun_cbr, 0) => 0x226a
       msleep(400)
       CancelTimer(timer)
[Pass] timer_func => 0x0
       msleep(1500)
[Pass] timer_func => 0x0
[Pass] SetHPTimerAfterNow(0, timer_cbr, overrun_cbr, 0) => 0x15
[Pass] timer_func => 0x2
[Pass] SetHPTimerAfterNow(100000, timer_cbr, overrun_cbr, 0) => 0x258
       msleep(90)
[Pass] timer_func => 0x0
       msleep(20)
[Pass] timer_func => 0x1
[Pass] ABS(DeltaT(timer_time, t0) - 100000) => 0x13d
[Pass] ABS(DeltaT(timer_arg, ta0) - 100000) => 0xf8
[Pass] ABS((get_us_clock_value() - t0) - 110000) => 0xffffff8b
[Pass] SetHPTimerAfterNow(90000, next_tick_cbr, overrun_cbr, 0) => 0x25a
       msleep(80)
[Pass] timer_func => 0x0
       msleep(20)
[Pass] timer_func => 0x3
       msleep(80)
[Pass] timer_func => 0x3
       msleep(20)
[Pass] timer_func => 0x1
[Pass] ABS(DeltaT(timer_time, t0) - 300000) => 0x53
[Pass] ABS(DeltaT(timer_arg, ta0) - 300000) => 0xe
[Pass] ABS((get_us_clock_value() - t0) - 310000) => 0xffffff22
       t0 = *(uint32_t*)0xC0242014 => 0x2e1d5
       msleep(250)
       t1 = *(uint32_t*)0xC0242014 => 0x6b235
[Pass] ABS(MOD(t1-t0, 1048576)/1000 - 250) => 0x1
       LoadCalendarFromRTC( &now )
       s0 = now.tm_sec => 0x35
       Date/time: 2017/02/26 19:49:53
       msleep(1500)
       LoadCalendarFromRTC( &now )
       s1 = now.tm_sec => 0x37
[Pass] MOD(s1-s0, 60) => 0x2
[Pass] MOD(s1-s0, 60) => 0x2
       m0 = MALLOC_FREE_MEMORY => 0x3dee8
[Pass] p = (void*)_malloc(50*1024) => 0xc6f28
[Pass] CACHEABLE(p) => 0xc6f28
       m1 = MALLOC_FREE_MEMORY => 0x316d8
       _free(p)
       m2 = MALLOC_FREE_MEMORY => 0x3dee8
[Pass] ABS((m0-m1) - 50*1024) => 0x10
[Pass] ABS(m0-m2) => 0x0
       m0 = GetFreeMemForAllocateMemory() => 0x141bcc
[Pass] p = (void*)_AllocateMemory(256*1024) => 0xba7fb4
[Pass] CACHEABLE(p) => 0xba7fb4
       m1 = GetFreeMemForAllocateMemory() => 0x101bbc
       _FreeMemory(p)
       m2 = GetFreeMemForAllocateMemory() => 0x141bcc
[Pass] ABS((m0-m1) - 256*1024) => 0x10
[Pass] ABS(m0-m2) => 0x0
       m01 = MALLOC_FREE_MEMORY => 0x3dee8
       m02 = GetFreeMemForAllocateMemory() => 0x141bcc
[Pass] p = (void*)_alloc_dma_memory(256*1024) => 0x40ba7ff4
[Pass] UNCACHEABLE(p) => 0x40ba7ff4
[Pass] CACHEABLE(p) => 0xba7ff4
[Pass] UNCACHEABLE(CACHEABLE(p)) => 0x40ba7ff4
       _free_dma_memory(p)
[Pass] p = (void*)_shoot_malloc(24*1024*1024) => 0x423680b4
[Pass] UNCACHEABLE(p) => 0x423680b4
       _shoot_free(p)
       m11 = MALLOC_FREE_MEMORY => 0x3dee8
       m12 = GetFreeMemForAllocateMemory() => 0x141bcc
[Pass] ABS(m01-m11) => 0x0
[Pass] ABS(m02-m12) => 0x0
[Pass] suite = shoot_malloc_suite_contig(24*1024*1024) => 0xc5888
[Pass] suite->signature => 'MemSuite'
[Pass] suite->num_chunks => 0x1
[Pass] suite->size => 0x1800000
[Pass] chunk = GetFirstChunkFromSuite(suite) => 0xc58b0
[Pass] chunk->signature => 'MemChunk'
[Pass] chunk->size => 0x1800000
[Pass] p = GetMemoryAddressOfMemoryChunk(chunk) => 0x423680b0
[Pass] UNCACHEABLE(p) => 0x423680b0
       shoot_free_suite(suite); suite = 0; chunk = 0;
[Pass] suite = shoot_malloc_suite_contig(0) => 0xc5888
[Pass] suite->signature => 'MemSuite'
[Pass] suite->num_chunks => 0x1
[Pass] suite->size => 0x1dd4000
[Pass] chunk = GetFirstChunkFromSuite(suite) => 0xc58b0
[Pass] chunk->signature => 'MemChunk'
[Pass] chunk->size => 0x1dd4000
[Pass] p = GetMemoryAddressOfMemoryChunk(chunk) => 0x4a000070
[Pass] UNCACHEABLE(p) => 0x4a000070
       shoot_free_suite(suite); suite = 0; chunk = 0;
[Pass] suite = shoot_malloc_suite(64*1024*1024) => 0xc5888
[Pass] suite->signature => 'MemSuite'
[Pass] suite->num_chunks => 0x3
[Pass] suite->size => 0x4000000
[Pass] chunk = GetFirstChunkFromSuite(suite) => 0xc58b0
[Pass] chunk->signature => 'MemChunk'
[Pass] total += chunk->size => 0x1c94000
[Pass] p = GetMemoryAddressOfMemoryChunk(chunk) => 0x423680b0
[Pass] UNCACHEABLE(p) => 0x423680b0
       chunk = GetNextMemoryChunk(suite, chunk) => 0xc5910
[Pass] chunk->signature => 'MemChunk'
[Pass] total += chunk->size => 0x2898000
[Pass] p = GetMemoryAddressOfMemoryChunk(chunk) => 0x413f8070
[Pass] UNCACHEABLE(p) => 0x413f8070
       chunk = GetNextMemoryChunk(suite, chunk) => 0xc5948
[Pass] chunk->signature => 'MemChunk'
[Pass] total += chunk->size => 0x4000000
[Pass] p = GetMemoryAddressOfMemoryChunk(chunk) => 0x4a000070
[Pass] UNCACHEABLE(p) => 0x4a000070
       chunk = GetNextMemoryChunk(suite, chunk) => 0x0
[Pass] total => 0x4000000
       shoot_free_suite(suite); suite = 0; chunk = 0;
[Pass] suite = shoot_malloc_suite(0) => 0xc5888
[Pass] suite->signature => 'MemSuite'
[Pass] suite->num_chunks => 0x3
[Pass] suite->size => 0x4700000
[Pass] chunk = GetFirstChunkFromSuite(suite) => 0xc58b0
[Pass] chunk->signature => 'MemChunk'
[Pass] total += chunk->size => 0x1c94000
[Pass] p = GetMemoryAddressOfMemoryChunk(chunk) => 0x423680b0
[Pass] UNCACHEABLE(p) => 0x423680b0
       chunk = GetNextMemoryChunk(suite, chunk) => 0xc5910
[Pass] chunk->signature => 'MemChunk'
[Pass] total += chunk->size => 0x2898000
[Pass] p = GetMemoryAddressOfMemoryChunk(chunk) => 0x413f8070
[Pass] UNCACHEABLE(p) => 0x413f8070
       chunk = GetNextMemoryChunk(suite, chunk) => 0xc5948
[Pass] chunk->signature => 'MemChunk'
[Pass] total += chunk->size => 0x4700000
[Pass] p = GetMemoryAddressOfMemoryChunk(chunk) => 0x4a000070
[Pass] UNCACHEABLE(p) => 0x4a000070
       chunk = GetNextMemoryChunk(suite, chunk) => 0x0
[Pass] total => 0x4700000
       shoot_free_suite(suite); suite = 0; chunk = 0;
[Pass] strlen("abc") => 0x3
[Pass] strlen("qwertyuiop") => 0xa
[Pass] strlen("") => 0x0
[Pass] strcpy(msg, "hi there") => 0x16bcbc
[Pass] msg => 'hi there'
[Pass] snprintf(a, sizeof(a), "foo") => 0x3
[Pass] snprintf(b, sizeof(b), "foo") => 0x3
[Pass] strcmp(a, b) => 0x0
[Pass] snprintf(a, sizeof(a), "bar") => 0x3
[Pass] snprintf(b, sizeof(b), "baz") => 0x3
[Pass] strcmp(a, b) => 0xfffffff8
[Pass] snprintf(a, sizeof(a), "Display") => 0x7
[Pass] snprintf(b, sizeof(b), "Defishing") => 0x9
[Pass] strcmp(a, b) => 0x4
[Pass] snprintf(buf, 3, "%d", 1234) => 0x2
[Pass] buf => '12'
[Pass] memcpy(foo, bar, 6) => 0x16bc80
[Pass] foo => 'asdfghuiop'
[Pass] memset(bar, '*', 5) => 0x16bc60
[Pass] bar => '*****hjkl;'
       bzero32(bar + 5, 5)
[Pass] bar => '****'
       EngDrvOut(LCD_Palette[0], 0x1234)
[Pass] shamem_read(LCD_Palette[0]) => 0x1234
       call("TurnOnDisplay")
[Pass] DISPLAY_IS_ON => 0x1
       call("TurnOffDisplay")
[Pass] DISPLAY_IS_ON => 0x0
       call("TurnOnDisplay")
[Pass] DISPLAY_IS_ON => 0x1
       task_create("test", 0x1c, 0x1000, test_task, 0) => 0x67c00be
[Pass] test_task_created => 0x1
[Pass] get_task_name_from_id(get_current_task()) => 'run_test'
[Pass] task_max => 0x68
[Pass] task_max => 0x68
[Pass] mq = mq ? mq : (void*)msg_queue_create("test", 5) => 0x67e0096
[Pass] msg_queue_post(mq, 0x1234567) => 0x0
[Pass] msg_queue_receive(mq, (struct event **) &m, 500) => 0x0
[Pass] m => 0x1234567
[Pass] msg_queue_receive(mq, (struct event **) &m, 500) => 0x9
[Pass] sem = sem ? sem : create_named_semaphore("test", 1) => 0x6800304
[Pass] take_semaphore(sem, 500) => 0x0
[Pass] take_semaphore(sem, 500) => 0x9
[Pass] give_semaphore(sem) => 0x0
[Pass] take_semaphore(sem, 500) => 0x0
[Pass] give_semaphore(sem) => 0x0
[Pass] rlock = rlock ? rlock : CreateRecursiveLock(0) => 0x682006a
[Pass] AcquireRecursiveLock(rlock, 500) => 0x0
[Pass] AcquireRecursiveLock(rlock, 500) => 0x0
[Pass] ReleaseRecursiveLock(rlock) => 0x0
[Pass] ReleaseRecursiveLock(rlock) => 0x0
[Pass] ReleaseRecursiveLock(rlock) => 0xf
       SetGUIRequestMode(1); msleep(1000);
[Pass] CURRENT_GUI_MODE => 0x1
       SetGUIRequestMode(2); msleep(1000);
[Pass] CURRENT_GUI_MODE => 0x2
       SetGUIRequestMode(0); msleep(1000);
[Pass] CURRENT_GUI_MODE => 0x0
[Pass] display_idle() => 0x1
       GUI_Control(BGMT_PLAY, 0, 0, 0); msleep(1000);
[Pass] PLAY_MODE => 0x1
[Pass] MENU_MODE => 0x0
       GUI_Control(BGMT_MENU, 0, 0, 0); msleep(1000);
[Pass] MENU_MODE => 0x1
[Pass] PLAY_MODE => 0x0
[Pass] dialog->type => 'DIALOG'
       GUI_Control(BGMT_MENU, 0, 0, 0); msleep(500);
[Pass] MENU_MODE => 0x0
[Pass] PLAY_MODE => 0x0
       SW1(1,100)
[FAIL] HALFSHUTTER_PRESSED => 0x0
       SW1(0,100)
[Pass] HALFSHUTTER_PRESSED => 0x0
[Pass] is_play_mode() => 0x1
[Pass] is_pure_play_photo_mode() => 0x1
[Pass] is_pure_play_movie_mode() => 0x0
[Pass] is_play_mode() => 0x1
[Pass] is_pure_play_photo_mode() => 0x0
[Pass] is_pure_play_movie_mode() => 0x0
[Pass] is_play_mode() => 0x1
[Pass] is_pure_play_photo_mode() => 0x0
[Pass] is_pure_play_movie_mode() => 0x1
[Pass] is_play_mode() => 0x1
[Pass] is_pure_play_photo_mode() => 0x0
[Pass] is_pure_play_movie_mode() => 0x0
#2
Camera-specific Development / Re: Canon 1200D
February 24, 2017, 09:42:43 PM
I have done some more testing

I performed the API test in LUA, and have the output attached.
The  battery stuff could be caused because I have the camera on a powersupply

The selftest.mo was not among the modules. I have built ML from the 1200D branch, and the selftest.mo was included.
Enabling it gives an error on booting the camera:
Scanning modules...
Load modules...
  [i] load: SELFTEST.MO
linking..
tcc: error: undefined symbol 'bv_toggle'
  [E] failed to link modules


Also enabling other modules in my own build gave errors while loading them.





===============================================================================
ML/SCRIPTS/API_TEST.LUA - 2017-2-24 22:22:25
===============================================================================

Strict mode tests...
Strict mode tests passed.

Generic tests...
arg = table:
  [0] = "API_TEST.LUA"
camera = table:
  shutter = table:
    raw = 0
    apex = -7.
    ms = 0
    value = 0
  aperture = table:
    raw = 75
    apex = 8.374999
    value = 18.2
    min = table:
      raw = 45
      apex = 4.624999
      value = 4.9
    max = table:
      raw = 88
      apex = 10
      value = 32
  iso = table:
    raw = 0
    apex = -4
    value = 0
  ec = table:
    raw = 0
    value = 0
  flash_ec = table:
    raw = 0
    value = 0
  kelvin = 5200
  mode = 0
  metering_mode = 3
  drive_mode = 0
  model = "Canon EOS 1200D"
  model_short = "1200D"
  firmware = "1.0.1"
  temperature = 165
  state = 0
  reboot = function: p
  burst = function: p
  shoot = function: p
  bulb = 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:
  hide = function: p
  write = function: p
  show = function: p
  clear = function: p
lv = table:
  enabled = false
  paused = false
  running = false
  zoom = 1
  wait = function: p
  info = function: p
  resume = function: p
  stop = function: p
  start = function: p
  pause = function: p
lens = table:
  name = "EF-S18-55mm f/3.5-5.6 III"
  focal_length = 0
  focus_distance = 14080
  hyperfocal = 0
  dof_near = 0
  dof_far = 0
  af = false
  af_mode = 771
  focus = function: p
  autofocus = function: p
display = table:
  idle = true
  height = 480
  width = 720
  pixel = function: p
  print = function: p
  notify_box = function: p
  rect = function: p
  screenshot = function: p
  draw = function: p
  load = function: p
  circle = function: p
  on = function: p
  off = function: p
  line = function: p
  clear = function: p
key = table:
  last = 10
  wait = function: p
  press = function: p
menu = table:
  visible = false
  close = function: p
  set = function: p
  open = function: p
  new = function: p
  block = function: p
  get = function: p
movie = table:
  recording = false
  start = function: p
  stop = function: p
dryos = table:
  clock = 39
  ms_clock = 39453
  prefix = "IMG_"
  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 = "B:/"
      path = "B:/DCIM/"
    path = "B:/DCIM/100CANON/"
  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 = 32768
    drive_letter = "B"
    file_number = 84
    folder_number = 100
    free_space = 14400608
    type = "SD"
    _card_ptr = userdata
    path = "B:/"
  shooting_card = table:
    cluster_size = 32768
    drive_letter = "B"
    file_number = 84
    folder_number = 100
    free_space = 14400608
    type = "SD"
    _card_ptr = userdata
    path = "B:/"
  date = table:
    yday = 55
    wday = 6
    isdst = false
    day = 24
    month = 2
    year = 2017
    hour = 22
    sec = 27
    min = 22
  rename = function: p
  call = function: p
  directory = function: p
  remove = function: p
interval = table:
  time = 10
  count = 0
  running = false
  stop = function: p
battery = table:
function not available on this camera
stack traceback:
[C]: in ?
[C]: in for iterator 'for iterator'
ML/SCRIPTS/LIB/logger.lua:125: in function 'logger.serialize'
ML/SCRIPTS/API_TEST.LUA:32: in function <ML/SCRIPTS/API_TEST.LUA:31>
[C]: in function 'globals.xpcall'
ML/SCRIPTS/API_TEST.LUA:31: in function 'globals.print_table'
ML/SCRIPTS/API_TEST.LUA:77: in function 'globals.generic_tests'
ML/SCRIPTS/API_TEST.LUA:832: in function 'globals.api_tests'
ML/SCRIPTS/API_TEST.LUA:855: in main chunktask = table:
  create = function: p
  yield = function: p
property = table:
Generic tests completed.

Module tests...
Testing file I/O...
Copy test: autoexec.bin -> tmp.bin
Copy test OK
Append test: tmp.txt
Append test OK
Rename test: apple.txt -> banana.txt
Rename test OK
Rename test: apple.txt -> ML/banana.txt
Rename test OK
File I/O tests completed.

Testing half-shutter...
half-shutter...





#3
Camera-specific Development / Re: Canon 1200D
February 19, 2017, 03:45:21 PM
@a1ex: thanks for creating this. Most of the things I've tried so far do work.

I worked through the Overlay menu and tried out all settings, except for the ones involving RAW. I had the following findings

Global draw OK, all 4 settings
Zebras
- color space all 3 OK
- Under exposure  OK
- Over exposure OK
- When recording OK
- Use raw zebras
- Raw zebra under exposure
Focus peak
- Filter bias OK
- Threshold OK
- Color OK
- Grayscale image OK
Magic zoom
-Trigger Mode OK
- Size OK
- Position OK
- Magnification OK
- Focus confirm OK
Cropmarks Going into menu with Q gives error 'Duplicate menu Cropmarks (2)'
Changing settings does work when camera is restarted
- Bitmap OK
- Show in Photo mode OK
- Show in Play mode OK
Spotmeter
- Spotmeter Unit OK
- Spot position See no difference between Center and focus box
False color OK
Histogram
- Histogram type OK
- RAW EV indicator ?
- Scaling OK
- Clip warning OK
Waveform OK
Vectorscope Going into menu gives error 'Duplicate menu Vectorscope (2)'
Changed setting do work after restarting camera

What doesn't work

When I go into the Cropmarks or Vectorscope menu, I get errors 'Duplicate menu Cropmarks (2)' or 'Duplicate menu Vectorscope (2)' which are shown in a box in the bottom left of the screen. When I then switch to Live mode a box fills the left of the screen with lots of these messages and a message 'Save configs...' and the overlays don't appear. After restarting the camera it works fine again.