Author Topic: Canon 500D / T1i  (Read 70291 times)

jonnybel

  • New to the forum
  • *
  • Posts: 1
Re: Canon 500D / T1i
« Reply #50 on: March 01, 2018, 10:20:40 PM »
You need to downgrade first to FW v1.1.1: http://pel.hu/down/v111-t1i-500d-x3-win.exe
This download link is dead and I can't find the 1.1.1 firmware update anywhere :(

My 500D is still running 1.0.9 and I just found out about ML :D

dfort

  • Developer
  • Hero Member
  • *****
  • Posts: 3151
Re: Canon 500D / T1i
« Reply #51 on: March 02, 2018, 05:31:26 AM »
This download link is dead and I can't find the 1.1.1 firmware update anywhere :(

This: http://pel.hu/eoscard/ is the place where you should be able to get pretty much any Canon firmware updater but you are right, the link to the 500D 1.1.1 firmware isn't working. I have a "500D Canon Firmware for Testers" that contains the 1.1.1 and 1.1.2 Canon updaters on my downloads page as a backup.

https://bitbucket.org/daniel_fort/magic-lantern/downloads/

If someone has a dump of the 1.1.2 firmware I'd appreciate a PM.
5D3.* 7D.206 700D.115 EOSM.203

dfort

  • Developer
  • Hero Member
  • *****
  • Posts: 3151
Re: Canon 500D / T1i
« Reply #52 on: April 13, 2018, 05:27:51 AM »
Got my hands on a 500D so I did the 1.1.2 firmware dump myself. The portable dumper didn't work so we ended up using the "blind dumper" - more details in this post.

That was about the only glitch, the rest of the update went like butter!



Firmware signature showed up fine in QEMU:



Worked first time in camera:



It also got a perfect score with the Stubs API test:

11999 passed, 0 failed
Code: [Select]
[Pass] is_play_mode() => 0x1
[Pass] src = fio_malloc(size) => 0x4211c0d0
[Pass] dst = fio_malloc(size) => 0x429200dc
[Pass] memcmp(dst, src, 4097) => 0x3f
[Pass] edmac_memcpy(dst, src, 4097) => 0x429200dc
[Pass] memcmp(dst, src, 4097) => 0x0
[Pass] edmac_memcpy(dst, src, 4097) => 0x429200dc
[Pass] memcmp(dst, src, size) => 0xcc
[Pass] edmac_memcpy(dst, src, size) => 0x429200dc
[Pass] memcmp(dst, src, size) => 0x0
[Pass] memcmp(dst, src, size) => 0xffffffc3
[Pass] edmac_memcpy_start(dst, src, size) => 0x429200dc
       dt => 0x3388
[Pass] copied => 0x400e24
[Pass] copied => 0x400e24
[Pass] copied => 0x400e24
[Pass] memcmp(dst, src, copied) => 0x0
[Pass] memcmp(dst, src, copied + 16) => 0x43
       edmac_memcpy_finish()
       free(src)
       free(dst)
Cache test A (EDMAC on BMP buffer)...
[Pass] bmp = bmp_load("ML/CROPMKS/CINESCO2.BMP", 1) => 0xfd5c0
[Pass] old => 0x0
[Pass] irq => 0xc0
[Pass] differences => 0x83f
[Pass] old => 0x0
[Pass] irq => 0xc0
[Pass] differences => 0x0
Cache test B (FIO on 8K buffer)...
[Pass] tries[0] => 0x114
[Pass] tries[1] => 0x109
[Pass] tries[2] => 0xec
[Pass] tries[3] => 0xdf
[Pass] failr[0] => 0x90
[Pass] failw[0] => 0x8c
[Pass] failr[1] => 0x8a
[Pass] failw[1] => 0x0
[Pass] failr[2] => 0x0
[Pass] failw[2] => 0x77
[Pass] failr[3] => 0x0
[Pass] failw[3] => 0x0
       times[0] / tries[0] => 0x16
       times[1] / tries[1] => 0x16
       times[2] / tries[2] => 0x18
       times[3] / tries[3] => 0x18
Cache tests finished.

[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) => 0x40a41b38
[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) => 0x4211c0d0
[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] is_file("test.dat") => 0x1
[Pass] FIO_RemoveFile("test.dat") => 0x0
[Pass] is_file("test.dat") => 0x0
[Pass] SetTimerAfter(0, timer_cbr, overrun_cbr, 0) => 0x15
[Pass] timer_func => 0x2
[Pass] SetTimerAfter(1000, timer_cbr, overrun_cbr, 0) => 0x839e
       msleep(900)
[Pass] timer_func => 0x0
       msleep(200)
[Pass] timer_func => 0x1
[Pass] ABS((timer_time/1000 - t0) - 1000) => 0x5
[Pass] ABS((timer_arg - ta0) - 1000) => 0xa
[Pass] timer = SetTimerAfter(1000, timer_cbr, overrun_cbr, 0) => 0x83a0
       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) => 0x614
       msleep(90)
[Pass] timer_func => 0x0
       msleep(20)
[Pass] timer_func => 0x1
[Pass] ABS(DeltaT(timer_time, t0) - 100000) => 0x12d
[Pass] ABS(DeltaT(timer_arg, ta0) - 100000) => 0xfa
[Pass] ABS((get_us_clock_value() - t0) - 110000) => 0xffffffd0
[Pass] SetHPTimerAfterNow(90000, next_tick_cbr, overrun_cbr, 0) => 0x616
       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) => 0x86
[Pass] ABS(DeltaT(timer_arg, ta0) - 300000) => 0x51
[Pass] ABS((get_us_clock_value() - t0) - 310000) => 0xffffffec
       t0 = *(uint32_t*)0xC0242014 => 0x5cdd1
       msleep(250)
       t1 = *(uint32_t*)0xC0242014 => 0x988ca
[Pass] ABS(MOD(t1-t0, 1048576)/1000 - 250) => 0x6
       LoadCalendarFromRTC( &now )
       s0 = now.tm_sec => 0x1d
       Date/time: 2018/04/12 22:05:29
       msleep(1500)
       LoadCalendarFromRTC( &now )
       s1 = now.tm_sec => 0x1e
[Pass] MOD(s1-s0, 60) => 0x1
[Pass] MOD(s1-s0, 60) => 0x1
       m0 = MALLOC_FREE_MEMORY => 0x271a8
[Pass] p = (void*)_malloc(50*1024) => 0xff308
[Pass] CACHEABLE(p) => 0xff308
       m1 = MALLOC_FREE_MEMORY => 0x1a9a8
       _free(p)
       m2 = MALLOC_FREE_MEMORY => 0x271a8
[Pass] ABS((m0-m1) - 50*1024) => 0x0
[Pass] ABS(m0-m2) => 0x0
       m0 = GetFreeMemForAllocateMemory() => 0x2e5cd8
[Pass] p = (void*)_AllocateMemory(256*1024) => 0xa41af8
[Pass] CACHEABLE(p) => 0xa41af8
       m1 = GetFreeMemForAllocateMemory() => 0x2a5ccc
       _FreeMemory(p)
       m2 = GetFreeMemForAllocateMemory() => 0x2e5cd8
[Pass] ABS((m0-m1) - 256*1024) => 0xc
[Pass] ABS(m0-m2) => 0x0
       m01 = MALLOC_FREE_MEMORY => 0x271a8
       m02 = GetFreeMemForAllocateMemory() => 0x2e5cd8
[Pass] p = (void*)_alloc_dma_memory(256*1024) => 0x40a41b38
[Pass] UNCACHEABLE(p) => 0x40a41b38
[Pass] CACHEABLE(p) => 0xa41b38
[Pass] UNCACHEABLE(CACHEABLE(p)) => 0x40a41b38
       _free_dma_memory(p)
[Pass] p = (void*)_shoot_malloc(24*1024*1024) => 0x4c000068
[Pass] UNCACHEABLE(p) => 0x4c000068
       _shoot_free(p)
       m11 = MALLOC_FREE_MEMORY => 0x271a8
       m12 = GetFreeMemForAllocateMemory() => 0x2e5cd8
[Pass] ABS(m01-m11) => 0x0
[Pass] ABS(m02-m12) => 0x0
[Pass] suite = shoot_malloc_suite_contig(24*1024*1024) => 0xfbe98
[Pass] suite->signature => 'MemSuite'
[Pass] suite->num_chunks => 0x1
[Pass] suite->size => 0x1800000
[Pass] chunk = GetFirstChunkFromSuite(suite) => 0xfbeb8
[Pass] chunk->signature => 'MemChunk'
[Pass] chunk->size => 0x1800000
[Pass] p = GetMemoryAddressOfMemoryChunk(chunk) => 0x4c000064
[Pass] UNCACHEABLE(p) => 0x4c000064
       shoot_free_suite(suite); suite = 0; chunk = 0;
[Pass] suite = shoot_malloc_suite_contig(0) => 0xfbd88
[Pass] suite->signature => 'MemSuite'
[Pass] suite->num_chunks => 0x1
[Pass] suite->size => 0x1ae0000
[Pass] chunk = GetFirstChunkFromSuite(suite) => 0xfbda8
[Pass] chunk->signature => 'MemChunk'
[Pass] chunk->size => 0x1ae0000
[Pass] p = GetMemoryAddressOfMemoryChunk(chunk) => 0x46000064
[Pass] UNCACHEABLE(p) => 0x46000064
       shoot_free_suite(suite); suite = 0; chunk = 0;
[Pass] suite = shoot_malloc_suite(64*1024*1024) => 0xfbd88
[Pass] suite->signature => 'MemSuite'
[Pass] suite->num_chunks => 0x4
[Pass] suite->size => 0x4000000
[Pass] chunk = GetFirstChunkFromSuite(suite) => 0xfbda8
[Pass] chunk->signature => 'MemChunk'
[Pass] total += chunk->size => 0x1324000
[Pass] p = GetMemoryAddressOfMemoryChunk(chunk) => 0x4210c088
[Pass] UNCACHEABLE(p) => 0x4210c088
       chunk = GetNextMemoryChunk(suite, chunk) => 0xfbdf8
[Pass] chunk->signature => 'MemChunk'
[Pass] total += chunk->size => 0x1328000
[Pass] p = GetMemoryAddressOfMemoryChunk(chunk) => 0x42000064
[Pass] UNCACHEABLE(p) => 0x42000064
       chunk = GetNextMemoryChunk(suite, chunk) => 0xfbe28
[Pass] chunk->signature => 'MemChunk'
[Pass] total += chunk->size => 0x2e08000
[Pass] p = GetMemoryAddressOfMemoryChunk(chunk) => 0x4c000064
[Pass] UNCACHEABLE(p) => 0x4c000064
       chunk = GetNextMemoryChunk(suite, chunk) => 0xfbe58
[Pass] chunk->signature => 'MemChunk'
[Pass] total += chunk->size => 0x4000000
[Pass] p = GetMemoryAddressOfMemoryChunk(chunk) => 0x46000064
[Pass] UNCACHEABLE(p) => 0x46000064
       chunk = GetNextMemoryChunk(suite, chunk) => 0x0
[Pass] total => 0x4000000
       shoot_free_suite(suite); suite = 0; chunk = 0;
[Pass] suite = shoot_malloc_suite(0) => 0xfbd88
[Pass] suite->signature => 'MemSuite'
[Pass] suite->num_chunks => 0x9
[Pass] suite->size => 0x5f00000
[Pass] chunk = GetFirstChunkFromSuite(suite) => 0xfbda8
[Pass] chunk->signature => 'MemChunk'
[Pass] total += chunk->size => 0x1324000
[Pass] p = GetMemoryAddressOfMemoryChunk(chunk) => 0x4210c088
[Pass] UNCACHEABLE(p) => 0x4210c088
       chunk = GetNextMemoryChunk(suite, chunk) => 0xfbdf8
[Pass] chunk->signature => 'MemChunk'
[Pass] total += chunk->size => 0x1328000
[Pass] p = GetMemoryAddressOfMemoryChunk(chunk) => 0x42000064
[Pass] UNCACHEABLE(p) => 0x42000064
       chunk = GetNextMemoryChunk(suite, chunk) => 0xfbe28
[Pass] chunk->signature => 'MemChunk'
[Pass] total += chunk->size => 0x2e08000
[Pass] p = GetMemoryAddressOfMemoryChunk(chunk) => 0x46000064
[Pass] UNCACHEABLE(p) => 0x46000064
       chunk = GetNextMemoryChunk(suite, chunk) => 0xfbe58
[Pass] chunk->signature => 'MemChunk'
[Pass] total += chunk->size => 0x48e8000
[Pass] p = GetMemoryAddressOfMemoryChunk(chunk) => 0x4c000064
[Pass] UNCACHEABLE(p) => 0x4c000064
       chunk = GetNextMemoryChunk(suite, chunk) => 0xfbe88
[Pass] chunk->signature => 'MemChunk'
[Pass] total += chunk->size => 0x4e04000
[Pass] p = GetMemoryAddressOfMemoryChunk(chunk) => 0x47ae00e4
[Pass] UNCACHEABLE(p) => 0x47ae00e4
       chunk = GetNextMemoryChunk(suite, chunk) => 0xfbeb8
[Pass] chunk->signature => 'MemChunk'
[Pass] total += chunk->size => 0x5320000
[Pass] p = GetMemoryAddressOfMemoryChunk(chunk) => 0x4dae00e4
[Pass] UNCACHEABLE(p) => 0x4dae00e4
       chunk = GetNextMemoryChunk(suite, chunk) => 0xfbee8
[Pass] chunk->signature => 'MemChunk'
[Pass] total += chunk->size => 0x583c000
[Pass] p = GetMemoryAddressOfMemoryChunk(chunk) => 0x4bae00e4
[Pass] UNCACHEABLE(p) => 0x4bae00e4
       chunk = GetNextMemoryChunk(suite, chunk) => 0xfbf18
[Pass] chunk->signature => 'MemChunk'
[Pass] total += chunk->size => 0x5d58000
[Pass] p = GetMemoryAddressOfMemoryChunk(chunk) => 0x49ae00e4
[Pass] UNCACHEABLE(p) => 0x49ae00e4
       chunk = GetNextMemoryChunk(suite, chunk) => 0xfbf48
[Pass] chunk->signature => 'MemChunk'
[Pass] total += chunk->size => 0x5f00000
[Pass] p = GetMemoryAddressOfMemoryChunk(chunk) => 0x45ae00e4
[Pass] UNCACHEABLE(p) => 0x45ae00e4
       chunk = GetNextMemoryChunk(suite, chunk) => 0x0
[Pass] total => 0x5f00000
       shoot_free_suite(suite); suite = 0; chunk = 0;
[Pass] strlen("abc") => 0x3
[Pass] strlen("qwertyuiop") => 0xa
[Pass] strlen("") => 0x0
[Pass] strcpy(msg, "hi there") => 0x1b2474
[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) => 0x1b2440
[Pass] foo => 'asdfghuiop'
[Pass] memset(bar, '*', 5) => 0x1b2420
[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) => 0x60400ac
[Pass] test_task_created => 0x1
[Pass] get_current_task_name() => 'run_test'
[Pass] task_max => 0x68
[Pass] task_max => 0x68
[Pass] mq = mq ? mq : (void*)msg_queue_create("test", 5) => 0x6060080
[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) => 0x60801b8
[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) => 0x60a0062
[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)
[Pass] HALFSHUTTER_PRESSED => 0x1
       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

Test build on my downloads page, pull request coming soon.

[EDIT] Pull request is open: https://bitbucket.org/hudson/magic-lantern/pull-requests/916/update-to-500d112/diff
5D3.* 7D.206 700D.115 EOSM.203

dfort

  • Developer
  • Hero Member
  • *****
  • Posts: 3151
Re: Canon 500D / T1i
« Reply #53 on: May 03, 2018, 02:14:00 AM »
I've been pushing several users into doing tests on these firmware updates and since nobody seems to be responding on the 500D.112 and I happened to have my hands on one I guess it is up to me to run these tests.

Made a lua_fix build for the new firmware and these tests failed:

Code: [Select]
test_keys
test_lv failed
test_lens_focus
test_camera_exposure

All the others were fine. Of course the first thing I ask testers to do on a firmware update is to regress to the previous firmware version to see if this is a new issue or inherited from the previous version. Same issues on 1.1.1.

The lens focus test is interesting because it the lens will go from infinity to closest distance before failing. If the lens is focused at the closest setting to begin with it will fail right away. The 500D might be a camera that the lens can only be controlled by lua when in LiveView so I hacked up the script a bit, set the camera in LiveView and it completed this test using an old 28-105mm lens:

Code: [Select]
===============================================================================
ML/SCRIPTS/API_TEST.LUA - 2018-5-2 19:05:13
===============================================================================

Module tests...

Testing lens focus functionality...
Focus distance: 655350
Focusing backward...
Focus distance: 655350
Focus motor position: 0
Focusing forward with step size 3, wait=true...
...
Focus distance: 470
Focus motor position: -1974
Focusing backward with step size 3, wait=true...
...
Focus distance: 655350
Focus motor position: -69
Focus range: 520 steps forward, 366 steps backward.
Motor steps: 1974 forward, 1905 backward, 69 lost.
Focusing forward with step size 3, wait=false...
....................................
Focus distance: 470
Focus motor position: -1974
Focusing backward with step size 3, wait=false...
......................................
Focus distance: 655350
Focus motor position: -77
Focus range: 36 steps forward, 38 steps backward.
Motor steps: 1905 forward, 1897 backward, 8 lost.
Focusing forward with step size 2, wait=true...
...
Focus distance: 470
Focus motor position: -1967
Focusing backward with step size 2, wait=true...
...
Focus distance: 655350
Focus motor position: -69
Focus range: 840 steps forward, 770 steps backward.
Motor steps: 1890 forward, 1898 backward, 8 lost.
Focusing forward with step size 2, wait=false...
...
Focus distance: 470
Focus motor position: -1971
Focusing backward with step size 2, wait=false...
...
Focus distance: 655350
Focus motor position: -76
Focus range: 168 steps forward, 161 steps backward.
Motor steps: 1902 forward, 1895 backward, 7 lost.
Focusing forward with step size 1, wait=true...
...
Focus distance: 470
Focus motor position: -1983
Focusing backward with step size 1, wait=true...
...
Focus distance: 655350
Focus motor position: -106
Focus range: 1737 steps forward, 1477 steps backward.
Motor steps: 1907 forward, 1877 backward, 30 lost.
Focusing forward with step size 1, wait=false...
...
Focus distance: 470
Focus motor position: -2002
Focusing backward with step size 1, wait=false...
...
Focus distance: 655350
Focus motor position: -108
Focus range: 462 steps forward, 444 steps backward.
Motor steps: 1896 forward, 1894 backward, 2 lost.

Focus test completed.
Done!

The only key that test_keys is checking for is the half-shutter press.

platform/500D.111/gui.h
Code: [Select]
#define BGMT_PRESS_HALFSHUTTER 0x23
Checking this against the results of Debug -> Show GUI events



Well 0x3f definitely didn't work and neither did 0x24 so maybe this is somewhere else?

The test_lv does put the camera in LiveView then dies.

Code: [Select]
===============================================================================
ML/SCRIPTS/API_TEST.LUA - 2018-5-2 19:55:31
===============================================================================

Module tests...
Testing module 'lv'...
Starting LiveView...

Looks like there's some doubt in the code.

platform/500D.111/gui.h
Code: [Select]
#define BGMT_LV 0xf // idk?

Finally, test_camera_exposure starts off well outside LiveView but dies when trying to set ISO values.

Code: [Select]
===============================================================================
ML/SCRIPTS/API_TEST.LUA - 2018-5-2 19:58:31
===============================================================================

Module tests...
Testing exposure settings...
Camera    : Canon EOS REBEL T1i (500D) 1.1.2
Lens      : EF28-105mm f/3.5-4.5 USM
Shoot mode: 3
Shutter   : Ç125 (raw 112, 0.007812s, 8ms, apex 7.)
Aperture  : Å5.6 (raw 48, f/5.6, apex 5.)
Av range  : Å3.5..Å22 (raw 37..80, f/3.5..f/22.6, apex 3.625..9.)
ISO       : ÄAuto (raw 0, 0, apex 0)
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...

However, if the exposure test is done in LiveView:

Code: [Select]
===============================================================================
ML/SCRIPTS/API_TEST.LUA - 2018-5-2 20:15:51
===============================================================================

Module tests...
Testing exposure settings...
Camera    : Canon EOS REBEL T1i (500D) 1.1.2
Lens      : EF28-105mm f/3.5-4.5 USM
Shoot mode: 3
Shutter   : Ç125 (raw 112, 0.007812s, 8ms, apex 7.)
Aperture  : Å5.6 (raw 48, f/5.6, apex 5.)
Av range  : Å3.5..Å22 (raw 37..80, f/3.5..f/22.6, apex 3.625..9.)
ISO       : Ä3200 (raw 112, 3200, apex 10.)
EC        : 0.0 (raw 0, 0 EV)
Flash EC  : 0.0 (raw 0, 0 EV)
Setting shutter to random values...
Error: shutter set to value=0.009291, got 0.010132s, expected 0.009291s
Error: shutter set to value=0.009291, got 10ms, expected 9ms
Error: shutter set to value=0.009291, got Tv6.625, expected Tv6.75
Error: shutter set to value=0.009291, got 109, expected 110 (raw)
Error: shutter 0.010132s != Tv6.625, expected 6.75
Error: shutter 5.187358s != Tv-2.375, expected -2.25
Error: shutter set to value=0.000581, got 142, expected 141 (raw)
Error: shutter set to ms=115, got 0.125s, expected 0.114626s
Error: shutter set to ms=115, got 125ms, expected 115ms
Error: shutter set to ms=115, got Tv3., expected Tv3.125
Error: shutter set to ms=115, got 80, expected 81 (raw)
Error: shutter set to value=14.672065, got 16s, expected 14.672065s
Error: shutter set to value=14.672065, got 16000ms, expected 14672ms
Error: shutter set to value=14.672065, got Tv-4., expected Tv-3.875
Error: shutter set to value=14.672065, got 24, expected 25 (raw)
Error: shutter set to value=32, got Tv-5., expected Tv-4.875
Error: shutter set to ms=7336, got 8.s, expected 7.336032s
Error: shutter set to ms=7336, got 8000ms, expected 7336ms
Error: shutter set to ms=7336, got Tv-3., expected Tv-2.875
Error: shutter set to ms=7336, got 32, expected 33 (raw)
Error: shutter set to value=0.028656, got Tv5., expected Tv5.125
Error: shutter set to value=0.028656, got 96, expected 97 (raw)
Error: shutter set to value=3.668016, got 4.s, expected 3.668016s
Error: shutter set to value=3.668016, got 4000ms, expected 3668ms
Error: shutter set to value=3.668016, got Tv-2., expected Tv-1.875
Error: shutter set to value=3.668016, got 40, expected 41 (raw)
Error: shutter set to value=19.027313, got 20.749433s, expected 19.027313s
Error: shutter set to value=19.027313, got 20749ms, expected 19027ms
Error: shutter set to value=19.027313, got Tv-4.375, expected Tv-4.25
Error: shutter set to value=19.027313, got 21, expected 22 (raw)
Error: shutter set to value=0.000488, got Tv11.000001, expected Tv11.125001
Error: shutter set to value=0.000448, got 145, expected 144 (raw)
Error: shutter set to value=19.027313, got 20.749433s, expected 19.027313s
Error: shutter set to value=19.027313, got 20749ms, expected 19027ms
Error: shutter set to value=19.027313, got Tv-4.375, expected Tv-4.25
Error: shutter set to value=19.027313, got 21, expected 22 (raw)
Error: shutter set to value=3.668016, got 4.s, expected 3.668016s
Error: shutter set to value=3.668016, got 4000ms, expected 3668ms
Error: shutter set to value=3.668016, got Tv-2., expected Tv-1.875
Error: shutter set to value=3.668016, got 40, expected 41 (raw)
Error: shutter set to value=0.007164, got 0.007812s, expected 0.007164s
Error: shutter set to value=0.007164, got 8ms, expected 7ms
Error: shutter set to value=0.007164, got Tv7., expected Tv7.125
Error: shutter set to value=0.007164, got 112, expected 113 (raw)
Error: shutter set to value=29.344129, got 29344ms, expected 32000ms
Error: shutter set to value=29.344129, got 17, expected 16 (raw)
Error: shutter set to value=29.344129, got 17, expected 16 (raw)
Setting ISO to random values...

And once again dies when setting ISO values.
5D3.* 7D.206 700D.115 EOSM.203

rafaelbf

  • New to the forum
  • *
  • Posts: 5
Re: Canon 500D / T1i
« Reply #54 on: June 13, 2018, 01:01:08 AM »
Hi @dfort

Thanks for your tip about 500D dumping. I was also searching for new stubs and noticed some changes not present in your stubs.S

update-to-500d112
Code: [Select]
NSTUB(0xFF0234B4,  gui_init_end)
NSTUB(    0x1E8C,  mvr_config)               // please re-check
NSTUB(0xFF33030C,  fsuDecodePartitionTable)

Not sure, I have little experience with this. Can you check please?
Maybe this help your API_TEST.LUA tests.
thanks

dfort

  • Developer
  • Hero Member
  • *****
  • Posts: 3151
Re: Canon 500D / T1i
« Reply #55 on: June 22, 2018, 07:17:28 AM »
@rafaelbf -- catching up after 3 weeks on vacation. Thanks for this, will look into it when I get some time. Please send me a reminder if I flake out.
5D3.* 7D.206 700D.115 EOSM.203

dfort

  • Developer
  • Hero Member
  • *****
  • Posts: 3151
Re: Canon 500D / T1i
« Reply #56 on: June 23, 2018, 03:30:36 PM »
@rafaelbf -- Thanks for pointing out the problem with fsuDecodePartitionTable. Looks like I didn't update it from the previous firmware version. However, the other values seem to be fine. How did you come up with those addresses?
5D3.* 7D.206 700D.115 EOSM.203

rafaelbf

  • New to the forum
  • *
  • Posts: 5
Re: Canon 500D / T1i
« Reply #57 on: July 16, 2018, 03:51:10 AM »
How did you come up with those addresses?

@dfort
opening 2 simultaneous IDA sessions and comparing each Stub address in 111 and 112
"mvr_config" is not an address, I've noticed a change in old value.

dfort

  • Developer
  • Hero Member
  • *****
  • Posts: 3151
Re: Canon 500D / T1i
« Reply #58 on: July 16, 2018, 02:20:03 PM »
Have you tried changing those values to see if it makes any difference when running the tests?

The problems with the tests that the 500D.112 firmware update isn't passing is also present on the 500D.111 so we're in a situation where we need to do some bug hunting using 1.1.1 then see if those changes translate to the 1.1.2 firmware--it should. Not a high priority for me at this time because I don't use this camera much and when I do it seems to be fine even though it can't pass the lua API tests.
5D3.* 7D.206 700D.115 EOSM.203

rafaelbf

  • New to the forum
  • *
  • Posts: 5
Re: Canon 500D / T1i
« Reply #59 on: August 13, 2018, 04:54:05 AM »
Hi @dfort

about the api_test.lua tests, really hangs the 500D. Not related to these Stubs.

But...check this script. It runs same functions that hangs on api_test. (Setting ISO and Enabling LiveView)
Runs fine....no hangs !! Tested on 500D fw111:

Code: [Select]
-- Simple 500d test script.

require("keys")

--printf
function printf(...)
    io.write(string.format(...))
end

function main()
    menu.close()
    console.show()

    printf("Camera    : %s (%s) %s\n", camera.model, camera.model_short, camera.firmware)
    printf("Lens      : %s\n", lens.name)
    printf("Shoot mode: %s\n", camera.mode)
    printf("ISO       : %s (raw %s, %s, apex %s)\n", camera.iso, camera.iso.raw, camera.iso.value, camera.iso.apex)

    printf("Setting ISO 800\n")
    camera.iso.value = 800
    printf("ISO       : %s (raw %s, %s, apex %s)\n", camera.iso, camera.iso.raw, camera.iso.value, camera.iso.apex)

    printf("Press any key to test LiveView...\n")
    key.wait()

    if lv.enabled then
        printf("LiveView is running; stopping...\n")
        lv.stop()
        msleep(2000)
    end

    printf("Starting LiveView...\n")
    lv.start()

    msleep(5000)
    printf("Stopping LiveView...\n")
    lv.stop()
    msleep(1000)

    printf("Test complete. Press any key to exit...\n")
    key.wait()

    console.hide()
end

keymenu = menu.new
{
    name   = "500D tests",
    help   = "Some tests on 500D",
    select = function(this) task.create(main) end,
}






I have no idea why the api_test.lua hangs, and this script works.
Successfully sets ISO to 800 and enabled LiveView.

So, I think the 500D is ready for version 112.
Please not forget to update these new Stubs. They aren't related to these tests, but present in version 112.

And, If possible check my patch about "SoundDevice\SoundDevice_CODEC.c" crash.  ;D
Now My 500D is stable, no more crash while recording movies:

Code: [Select]
--- src/audio-common.orig.c 2018-06-01 17:50:30.343132126 -0300
+++ src/audio-common.c 2018-06-01 18:08:03.743893154 -0300
@@ -308,11 +308,15 @@
     {
         return is_menu_active("Audio");
     }
     else
     {
+        #if defined(CONFIG_500D)
+        return 0;
+        #else
         return is_movie_mode() && do_draw_meters && zebra_should_run() && !get_halfshutter_pressed();
+        #endif
     }
 #else
     return 0;
 #endif
 }
@@ -503,17 +507,20 @@
     int meters_slept_times = 0;
 
     TASK_LOOP
     {
         msleep(MIN_MSLEEP);
-        int meters_sleep_cycles = (DISPLAY_IS_ON ? (50/MIN_MSLEEP) : (500/MIN_MSLEEP));
-        meters_slept_times++;
-        compute_audio_levels(0);
-        compute_audio_levels(1);
-        if(meters_slept_times >= meters_sleep_cycles) {
-            reconfig_audio = audio_meters_step(reconfig_audio);
-            meters_slept_times = 0;
+        if (audio_meters_are_drawn())
+        {
+           int meters_sleep_cycles = (DISPLAY_IS_ON ? (50/MIN_MSLEEP) : (500/MIN_MSLEEP));
+           meters_slept_times++;
+           compute_audio_levels(0);
+           compute_audio_levels(1);
+           if(meters_slept_times >= meters_sleep_cycles) {
+               reconfig_audio = audio_meters_step(reconfig_audio);
+               meters_slept_times = 0;
+           }
         }
     }
 
 }


thanks

dfort

  • Developer
  • Hero Member
  • *****
  • Posts: 3151
Re: Canon 500D / T1i
« Reply #60 on: August 13, 2018, 05:48:16 AM »
...
I have no idea why the api_test.lua hangs, and this script works.
Successfully sets ISO to 800 and enabled LiveView.

So, I think the 500D is ready for version 112.
Please not forget to update these new Stubs. They aren't related to these tests, but present in version 112.

And, If possible check my patch about "SoundDevice\SoundDevice_CODEC.c" crash.  ;D
Now My 500D is stable, no more crash while recording movies:
...

Amazing -- Could you do a pull request for this? I no longer have a 500D to test this out. Just a week ago I sent my 500D to @critix so he can play around with ML and possibly use it to help him with the 1300D port. Looks like he's already getting into it because he approved the 500D.112 pull request.
5D3.* 7D.206 700D.115 EOSM.203

critix

  • New to the forum
  • *
  • Posts: 46
Re: Canon 500D / T1i
« Reply #61 on: August 13, 2018, 09:19:15 AM »
Code: [Select]
NSTUB(0xFF0234B4,  gui_init_end) -> is not OK.
NSTUB(    0x1E8C,  mvr_config)               // please re-check  -> is not OK
NSTUB(0xFF33030C,  fsuDecodePartitionTable)  -> is OK

I ran Stubs API test and the result was a positive, error-free result.
I'm now trying to see why there are errors in running the api_test.lua script.
Canon 1300D, 500D, EOS M, EOS M2

critix

  • New to the forum
  • *
  • Posts: 46
Re: Canon 500D / T1i
« Reply #62 on: August 22, 2018, 11:37:01 AM »
I've tried to see what the api_test.lua script does not work, but without a result. One of the "problems" was that the device had to be set to expanded ISO because it has ISO 3200 and expanded to 6400. The api_test.lua script is used maximum 6400.
Another change we tested. Script perform 100 random value tests. I just set maximum 10 values, and it was ok, but is crash to
Code: [Select]
printf (" Starting LiveView ... \ n ")I can not tell, unfortunately, what is not ok ...
Canon 1300D, 500D, EOS M, EOS M2

a1ex

  • Administrator
  • Hero Member
  • *****
  • Posts: 11725
  • 5D Mark Free
Re: Canon 500D / T1i
« Reply #63 on: September 16, 2018, 11:23:22 PM »
Lua API tests almost passing 8)

Also found a way to disable the (slightly annoying) "Perform autofocus with AE lock <*> button" message in LiveView. Somebody asked for this a while ago, but I have trouble finding the original request.

That message was actually causing the failed assertion reported by critix - ML expected the camera to be "idle" right after entering LiveView, i.e. without other dialog boxes displayed on the screen.

@rafaelbf: still getting the crash at SoundDevice_CODEC.c with your patch (i.e. with audio meters disabled).



edit: might have found a fix, please try the draft patch the latest experimental lua_fix build and report back.