initial ML version for 600D/T3i

1,164 views
Skip to first unread message

indy arm

unread,
May 21, 2011, 7:28:47 PM5/21/11
to ml-devel
Hi,

Please find:
- an minimal version of ML that set the bootflag.
- Stubs and Consts files for "autoexec.bin" development

Thanks to Chucho for the very first test!

Most work has been done by Alex and assembled by me.
we used this tag as a starting point: https://bitbucket.org/a1ex/magic-lantern/changeset/93135f58ed93

Any developer for the 600D/T3i will be helped to port the 550d and 60d features.

Indy (who do not have a 600d ;-)

autoexec.bin
magiclantern.fir
stubs-600d.101.S
consts-600d.101.h

arm.indy

unread,
May 21, 2011, 7:31:46 PM5/21/11
to Magic Lantern firmware development
this is for Canon firmware 1.0.1, so upgrade first !
>  autoexec.bin
> 70KAfficherTélécharger
>
>  magiclantern.fir
> 70KAfficherTélécharger
>
>  stubs-600d.101.S
> 9KAfficherTélécharger
>
>  consts-600d.101.h
> 6KAfficherTélécharger

JaKob

unread,
May 21, 2011, 9:09:48 PM5/21/11
to ml-d...@googlegroups.com
this is so cool the 

~~~poor 7D~~~

- Jakob



--
http://magiclantern.wikia.com/
 
To post to this group, send email to ml-d...@googlegroups.com
To unsubscribe from this group, send email to ml-devel+u...@googlegroups.com
For more options, visit this group at http://groups.google.com/group/ml-devel?hl=en

XFracture (aka Herb)

unread,
May 23, 2011, 3:00:23 PM5/23/11
to Magic Lantern firmware development
I installed this on my t3i, per the 550d instructions (using these
files). The ML hook installed (shows in firmware), but ML will not
launch when trashcan button. SD card made bootable with the macboot
utility, camera set to "P" to install, set to "movie" when trying to
activate.
>  autoexec.bin
> 70KViewDownload
>
>  magiclantern.fir
> 70KViewDownload
>
>  stubs-600d.101.S
> 9KViewDownload
>
>  consts-600d.101.h
> 6KViewDownload

erik venhues

unread,
May 23, 2011, 8:16:54 PM5/23/11
to Magic Lantern firmware development
same here, but so far i understoud its

"an minimal version of ML that set only the bootflag."

no other functions yet.

i have a 600d and i am free to test any versions :)

On May 23, 9:00 pm, "XFracture (aka Herb)" <herbhalst...@gmail.com>
wrote:

XFracture (aka Herb)

unread,
May 24, 2011, 10:04:48 AM5/24/11
to Magic Lantern firmware development
me too - eager to test

Brian Berneker

unread,
May 24, 2011, 8:42:12 AM5/24/11
to Magic Lantern firmware development
Hey I do some pretty in depth php programming, and while I realize
it's probably quite different from what you're working with, some of
the code looks very recognizable and like I might even be able to make
sense of it and pitch in. Is there a link to an SDK or something I
could use to help? I'd love to get involved and contribute...

Brian

Chuchin

unread,
May 24, 2011, 2:28:53 PM5/24/11
to Magic Lantern firmware development
Brain, I'm using the 550 build as a starting point, which can be
downloaded here https://bitbucket.org/hudson/magic-lantern/src you
have to update the 5d-hack.c file the new address that can be found in
the consts-600d.101.h. In the gui.c file keep the #include
"consts-550d.109.h" untill the 600d are confrim. In the makefile the
restartstart has to be update which is in the stubs-600d.101.S also
replace the 550d-empty.hdr with the 600d frimware, keep
magiclantern.lds entry.o 5d-hack.o stubs-600d.101.S version.o bmp.o
font-large.o font-med.o font-small.o config.o menu.o debug.o stdio.o
lens.o property.o propvalues.o gui.o chdk-gui_draw.o and try to
activate the other functions one at a time. You will have to rewrite
code as needed but not much.

Chucho
> > 6KViewDownload- Hide quoted text -
>
> - Show quoted text -

XFracture (aka Herb)

unread,
May 24, 2011, 3:51:13 PM5/24/11
to Magic Lantern firmware development
so... Chuchin... do you a compiled version? (grin)

On May 24, 1:28 pm, Chuchin <jlsaldan...@gmail.com> wrote:
> Brain, I'm using the 550 build as a starting point, which can be
> downloaded herehttps://bitbucket.org/hudson/magic-lantern/src  you

arm.indy

unread,
May 24, 2011, 4:08:35 PM5/24/11
to Magic Lantern firmware development
gui.c from 60d can be used.

counter and queue offsets (0xc and 0x30 resp.) are the same.
struct is 0x1C38

600d is closer to 60d than 550d: same DryOS 2.3 version release #47

thanks for your help Chuchin!

Indy

On May 24, 9:51 pm, "XFracture (aka Herb)" <herbhalst...@gmail.com>
wrote:

Brian Berneker

unread,
May 24, 2011, 4:35:27 PM5/24/11
to Magic Lantern firmware development
Ok so where do I get the ARM dev tools/environment to follow up on
this?
Is it available on OSX or just Windows?
If I can get the hang of the codebase I might even develop a new
feature or two!

Brian

"Sztupák Sz. Zsolt"

unread,
May 24, 2011, 4:38:33 PM5/24/11
to ml-d...@googlegroups.com
I only had success running the gnu arm compiler on Ubuntu using this:
http://magiclantern.wikia.com/wiki/Build_instructions/550D

Removing the need to use libc in the source (by replacing the needed
functionality from eg. bionic or uclibc) would make the building a lot
easier though imho.

SztupY

Alex

unread,
May 24, 2011, 4:42:35 PM5/24/11
to ml-d...@googlegroups.com
Right now, the only dependency on libc is memset (and even this one is
optional; my_memset.c seems to work well).

arm.indy

unread,
May 25, 2011, 1:58:52 PM5/25/11
to Magic Lantern firmware development
if we execute this piece of code on the 600d, it should display some
video ram addresses:

int i;
unsigned int *bmp_ram_addr = bmp_vram_info;
for (i=0; i<2; i++)
DebugMsg( DM_MAGIC, 3, "bmp_vram[]=0x%08x, 0x%08x, 0x%08x",
bmp_ram_addr[3*i+0], bmp_ram_addr[3*i+1], bmp_ram_addr[3*i+2] );
unsigned int *vram_info_addr = vram_info;
for (i=0; i<3; i++)
DebugMsg( DM_MAGIC, 3, "vram_info[]=0x%08x, w=%4d, h=%4d, p=%4d, n=
%4d",
vram_info_addr[5*i+0], vram_info_addr[5*i+1],
vram_info_addr[5*i+2], vram_info_addr[5*i+3], vram_info_addr[5*i
+4] );
unsigned int *stateobj_disp = 0x23DC+0xb0; // see FF062CEC
SetBitmapVramAddress
DebugMsg( DM_MAGIC, 3, "stateobj_disp+0xb0[]=0x%08x,0x%08x,0x%08x,",
stateobj_disp[0], stateobj_disp[1], stateobj_disp[2]);

Indy

arm.indy

unread,
May 25, 2011, 2:46:11 PM5/25/11
to Magic Lantern firmware development
I just cloned Alex's branch from this revision
https://bitbucket.org/a1ex/magic-lantern/changeset/93135f58ed93

and included my diff for 600D / T3i in
https://bitbucket.org/arm_indy/magic-lantern-for-600d-t3i/changesets

If someone serious want write access, just ask.

Indy

On May 24, 10:08 pm, "arm.indy" <arm.indi...@gmail.com> wrote:

Piers

unread,
May 25, 2011, 8:29:06 PM5/25/11
to ml-d...@googlegroups.com
The GNU ARM toolchain most definitely works on OSX. I have no recollection of what I did, but I followed instructions either on or pointed to by the wiki, and have built many an ML on OSX

PG

JaKob

unread,
May 27, 2011, 12:45:30 PM5/27/11
to ml-d...@googlegroups.com
so has anyone got the t3i with ML working ?

- Jakob


Vincent Olivier

unread,
May 28, 2011, 4:37:03 PM5/28/11
to Magic Lantern firmware development
Hi Indy,

I looked at both your code and the hudson original master (both
downloaded just a couple of minutes ago).

Your T3i branch seems to be missing some code from the main hudson
branch. Namely, when I search for the string "movie" in all the text
files, there is a "movtweaks.c" file that is returned in hudson's case
but not in your branch. I'm asking because this code contains
something that is of high interest to me possibly, the auto-restart
movie recording function, seen in the hudson movtweaks.c at line 313
(search for "movie_restart").

I'm looking to bypass both the 29m59s and the 4GB limits on movie
recordings. An auto restart whenever the movie recording is non-
interactively stopped will fit the bill for now.

So yeah, I'm just asking why is this code missing from your branch and
if you are planning on reincorporating it, or if I can do it myself,
if I'm on the right track, etc.

Regards,

Vincent

On May 25, 2:46 pm, "arm.indy" <arm.indi...@gmail.com> wrote:
> I just cloned Alex's branch from this revisionhttps://bitbucket.org/a1ex/magic-lantern/changeset/93135f58ed93
>
> and included my diff for 600D / T3i inhttps://bitbucket.org/arm_indy/magic-lantern-for-600d-t3i/changesets

"Sztupák Sz. Zsolt"

unread,
May 28, 2011, 4:41:54 PM5/28/11
to ml-d...@googlegroups.com
Hi!

The 600D branch is based on the 60D branch which is based on the 550D
branch which is based on the original master (5DmkII branch), but is
somewhat different as Alex is actively developing new features primarily
here. Each one has more or less differences from the previous one. If
looking for features you should first check the 550D or 60D branch, as
those contain the most compatible code that should more or less work on
600D too.

SztupY

Vincent Olivier

unread,
May 28, 2011, 5:03:47 PM5/28/11
to ml-d...@googlegroups.com
Hi,

When looking for the "movie_restart" in the t3i branch, it only shows up in the "debug.c" file whereas in the original one, there are around 10 files where it's a hit. So, I might want to import this code in. But I'd need a little guidance…

I'm totally new in this and it's really difficult to get a grasp on the code because the only comments I will find in there are dead lines that have been commented out. ;-)

For instance, everything of interest seems to arise around "call("MovieStart");" statements. I find "4a79d9 FA_MovieStart" in the "fa-functions.txt" file, but no further definition for that. Is that a lower level service in DryOS or something? Can it be overridden/looked at?

And even if I get the whole thing to compile and load on the camera (which seems feasible given the instruction set I found for Mac OS), I'm not sure I will be able to understand what needs to be done to have ML working on the t3i before you guys are done with it… Unless I get a crash course or something…

Anyways, I'm really into bypassing the recording time limits as per my other conversation here : http://groups.google.com/group/ml-devel/browse_thread/thread/9c2b9aece9e459fd

And I'm willing to give a couple of hours every week until we nail it for the T3i, conditionally to some intellectual support on the code structure. ;-)

Anyways, let me know.

Vincent


arm.indy

unread,
May 29, 2011, 1:20:39 PM5/29/11
to Magic Lantern firmware development
Hi Vincent,

The first thing is to activate menu and key events handling (gui.c).
The 60d code can be reused, but key events may differ a little bit.
the 600d is very close to the 60d, which must be taken as model for
the porting process.

Indy

On May 28, 11:03 pm, Vincent Olivier <vinc...@nbourbaki.com> wrote:
> Hi,
>
> When looking for the "movie_restart" in the t3i branch, it only shows up in the "debug.c" file whereas in the original one, there are around 10 files where it's a hit. So, I might want to import this code in. But I'd need a little guidance…
>
> I'm totally new in this and it's really difficult to get a grasp on the code because the only comments I will find in there are dead lines that have been commented out. ;-)
>
> For instance, everything of interest seems to arise around "call("MovieStart");" statements. I find "4a79d9 FA_MovieStart" in the "fa-functions.txt" file, but no further definition for that. Is that a lower level service in DryOS or something? Can it be overridden/looked at?
>
> And even if I get the whole thing to compile and load on the camera (which seems feasible given the instruction set I found for Mac OS), I'm not sure I will be able to understand what needs to be done to have ML working on the t3i before you guys are done with it… Unless I get a crash course or something…
>
> Anyways, I'm really into bypassing the recording time limits as per my other conversation here :http://groups.google.com/group/ml-devel/browse_thread/thread/9c2b9aec...

Vincent Olivier

unread,
May 29, 2011, 2:51:40 PM5/29/11
to ml-d...@googlegroups.com
Hi Indy,

I'd be glad to look into it. I'm trying to compile the ARM toolchain now (from the current esden trunk). It currently crashes at "Configuring openocd-master" with

"checking Build & Link with libftdi...... configure: error: Cannot build & run test program using libftdi"

Contacted Piotr Esden-Tempski about it already.

I think I'm going to look for a version dating back from the time when the ML instructions for Mac OS on the wiki were developed, now.

While it's compiling, I'm looking at "gui.c", guessing that the actual changes need to be done in header file "consts-600d.101.h".

Can you confirm that you are now trying out event constants using "console_printf" (guess from commented out code), which, what, will output on the camera screen? If so, can we separate the workload so that we don't redo the work independently?

Still compiling ARM toolchain…

Vincent

arm.indy

unread,
May 29, 2011, 2:57:30 PM5/29/11
to Magic Lantern firmware development
follow the wiki to create your build toolchain
http://magiclantern.wikia.com/wiki/550d_dev

Alex

unread,
May 29, 2011, 3:09:46 PM5/29/11
to ml-d...@googlegroups.com
Hi,

Do not use other versions of ARM toolchain; use the ones recommended
on the wiki.
http://magiclantern.wikia.com/wiki/Build_instructions/550D

If you don't use console.c (i.e. just bmp_printf), messages will still
appear on the screen, but sometimes they may get erased before you
have a chance to read them. For the first time, I think it's OK to use
this approach.

To use console_printf, you need to include console.c (add console.o in
Makefile at ML_OBJS-y ). This will print messages on the screen; you
have to start it with console_show() first, because the menu is not
working yet. Also make "draw_event = 1" in menu.c.

Relevant pages:
http://magiclantern.wikia.com/wiki/Debugging_Magic_Lantern
http://magiclantern.wikia.com/wiki/GUI_Events/550D

Also see the 60D porting thread for more hints.

arm.indy

unread,
May 29, 2011, 3:23:17 PM5/29/11
to Magic Lantern firmware development
Vincent,

static void gui_main_task_60d() in
https://bitbucket.org/a1ex/magic-lantern/src/93135f58ed93/gui.c
should work "as is", because queue and counter are at the same offsets
as with the 60d.
other changes are handled in consts and stubs files for the 600d.

yes, buttons codes (BGMT_*) must be modified on consts-600d.101.h file

Alex knows this better than me.

Indy


On May 29, 9:09 pm, Alex <broscutama...@gmail.com> wrote:
> Hi,
>
> Do not use other versions of ARM toolchain; use the ones recommended
> on the wiki.http://magiclantern.wikia.com/wiki/Build_instructions/550D
>
> If you don't use console.c (i.e. just bmp_printf), messages will still
> appear on the screen, but sometimes they may get erased before you
> have a chance to read them. For the first time, I think it's OK to use
> this approach.
>
> To use console_printf, you need to include console.c (add console.o in
> Makefile at ML_OBJS-y ). This will print messages on the screen; you
> have to start it with console_show() first, because the menu is not
> working yet. Also make "draw_event = 1" in menu.c.
>
> Relevant pages:http://magiclantern.wikia.com/wiki/Debugging_Magic_Lanternhttp://magiclantern.wikia.com/wiki/GUI_Events/550D

Vincent Olivier

unread,
May 29, 2011, 3:53:14 PM5/29/11
to ml-d...@googlegroups.com
Hi again Alex and Indy,

I recompiled the ARM tool chain from the script provided in the ML forum. Now, I'm getting this upon running "make" in the T3i branch of the code :

######## BEGIN
~/arm-toolchain/bin/arm-elf-ar cr libstdio.a lib_a-setjmp.o lib_a-strlen.o lib_a-strcmp.o lib_a-memcmp.o lib_a-memset.o
[ LD       ]   magiclantern
[ OBJCOPY  ]   magiclantern.bin
[ CC       ]   reboot.o
[ LD       ]   autoexec
[ OBJCOPY  ]   autoexec.bin

Notice: ../dumper/build_fir.py not found; will not build magiclantern.fir. It's okay.
Leaving magiclantern.fir unchanged.

stat: illegal option -- c
usage: stat [-FlLnqrsx] [-f format] [-t timefmt] [file ...]
make: *** [magiclantern.fir] Error 1
######## END

Previously, I extracted the 1.0.1 firmware from the Canon-supplied DMG file and renamed it to "dumper/600d_101.fir" I also put the "magiclantern.fir" from the T3i ML forum thread in the build directory.

So, not sure what to do from here. Do you guys have a clue on what I did wrong?

Thanks,

Vincent

arm.indy

unread,
May 29, 2011, 4:02:47 PM5/29/11
to Magic Lantern firmware development

Vincent Olivier

unread,
May 29, 2011, 4:12:05 PM5/29/11
to ml-d...@googlegroups.com
I'm sorry. I read that already. I'm not sure what you are referring to exactly. If it's about the signature thing, I did place the "magiclantern.fir" in the build directory (see bottom of my previous message, after console dump). Is that where it's supposed to go? I'm not sure…

Vincent

Alex

unread,
May 29, 2011, 4:12:33 PM5/29/11
to ml-d...@googlegroups.com
It's okay, it worked. You only need autoexec.bin.

Vincent Olivier

unread,
May 29, 2011, 4:47:55 PM5/29/11
to ml-d...@googlegroups.com
OK, so I upgraded with the provided "magiclantern.fir". I now have "Firmware Ver. 1.0.1-ml-2011May29". I made the SDHC card bootable with MacBoot. I copied the provided "cropmks" folder and the "autoexec.bin" I just compiled.

But I can't seem to be able to trigger anything. Does the code now in version control do anything more than "set the bootflag"? How to I test "gui.c" from the camera? Or confirm that the autoexec.in has loaded properly?

Thanks again guys. I know this is basic stuff, but, well, I think I can contribute if I get these little steps done! ;-)

Vincent

Alex

unread,
May 29, 2011, 5:14:43 PM5/29/11
to ml-d...@googlegroups.com
If you see "Firmware Ver. 1.0.1-ml-2011May29", autoexec.bin is loaded
and running. You don't need the fir any more.

First, you have to enable task override (uncomment line
boot-hack.c:137). There are two tasks started in this way: one in
gui.c (which we want), and one in audio.c (sounddev_task). Make sure
the camera boots with these tasks, and display the events on the
screen. From handle_buttons, comment everything except the block
containing console_printf, and return 1 for all events. This should
let you display button events on the screen.

Next:

Other tasks will be normally started after reading config file. See
the 60D boot-hack to see how it's done:
https://bitbucket.org/hudson/magic-lantern/src/tip/boot-hack.c

I recommend you to block all the tasks (comment all calls to
TASK_CREATE macro) and enable them one by one. The first one will be
the menu.

Vincent Olivier

unread,
May 29, 2011, 5:48:15 PM5/29/11
to ml-d...@googlegroups.com
Hi,

Cool!

So did "make clean". Uncommented  boot-hack.c:137 so it now reads "task_dispatch_hook = my_task_dispatch_hook;". Put newly compiled "autoexec.bin" on card. Put battery back. Turned on. Video mode. Pressed trash can button. Nothing. :-(

Are we absolutely certain the autoexec.bin gets loaded? Did I need to put the console code in to see anything? Hoped to leave it with "bmp_printf" as a first try...

Vincent

"Sztupák Sz. Zsolt"

unread,
May 29, 2011, 5:49:14 PM5/29/11
to ml-d...@googlegroups.com
The version number should get rewritten by the init part too. Check it inside the normal Canon menu.

�SztupY
Hi,

Cool!

So did "make clean".�Uncommented �boot-hack.c:137 so it now reads "task_dispatch_hook = my_task_dispatch_hook;".�Put newly compiled "autoexec.bin" on card. Put battery back. Turned on. Video mode. Pressed trash can button. Nothing. :-(
[ LD � � � ] � magiclantern
[ OBJCOPY �] � magiclantern.bin
[ CC � � � ] � reboot.o
[ LD � � � ] � autoexec
[ OBJCOPY �] � autoexec.bin
Still compiling ARM toolchain�

Vincent

On 2011-05-29, at 1:20 PM, arm.indy wrote:

Hi Vincent,

The first thing is to activate menu and key events handling (gui.c).
The 60d code can be reused, but key events may differ a little bit.
the 600d is very close to the 60d, which must be taken as model for
the porting process.

Indy

On May 28, 11:03 pm, Vincent Olivier <vinc...@nbourbaki.com> wrote:
Hi,

When looking for the "movie_restart" in the t3i branch, it only shows up in the "debug.c" file whereas in the original one, there are around 10 files where it's a hit. So, I might want to import this code in. But I'd need a little guidance�

I'm totally new in this and it's really difficult to get a grasp on the code because the only comments I will find in there are dead lines that have been commented out. ;-)

For instance, everything of interest seems to arise around "call("MovieStart");" statements. I find "4a79d9 FA_MovieStart" in the "fa-functions.txt" file, but no further definition for that. Is that a lower level service in DryOS or something? Can it be overridden/looked at?

And even if I get the whole thing to compile and load on the camera (which seems feasible given the instruction set I found for Mac OS), I'm not sure I will be able to understand what needs to be done to have ML working on the t3i before you guys are done with it� Unless I get a crash course or something�
On May 25, 2:46 pm, "arm.indy"<arm.indi...@gmail.com> �wrote:
I just cloned Alex's branch from this revisionhttps://bitbucket.org/a1ex/magic-lantern/changeset/93135f58ed93

and included my diff for 600D / T3i inhttps://bitbucket.org/arm_indy/magic-lantern-for-600d-t3i/changesets

If someone serious want write access, just ask.

Indy

On May 24, 10:08 pm, "arm.indy"<arm.indi...@gmail.com> �wrote:

gui.c from 60d can be used.
counter and queue offsets (0xc and 0x30 resp.) are the same.
struct is 0x1C38
600d is closer to 60d than 550d: same DryOS 2.3 version release #47
thanks for your help Chuchin!
Indy
On May 24, 9:51 pm, "XFracture (aka Herb)"<herbhalst...@gmail.com>
wrote:
so... Chuchin... do you a compiled version? (grin)
On May 24, 1:28 pm, Chuchin<jlsaldan...@gmail.com> �wrote:
Brain, I'm using the 550 build as a starting point, which can be
downloaded herehttps://bitbucket.org/hudson/magic-lantern/srcyou
have to update the 5d-hack.c file the new address that can be found in
the consts-600d.101.h. In the gui.c file keep the #include
"consts-550d.109.h" untill the 600d are confrim. In the makefile the
restartstart has to be update which is in the stubs-600d.101.S also
replace the 550d-empty.hdr with the 600d frimware, keep
magiclantern.lds entry.o 5d-hack.o stubs-600d.101.S version.o bmp.o
font-large.o font-med.o font-small.o config.o menu.o debug.o stdio.o
lens.o property.o propvalues.o gui.o chdk-gui_draw.o and try to
activate the other functions one at a time. You will have to rewrite
code as needed but not much.
Chucho
On May 24, 5:42 am, Brian Berneker<brianberne...@gmail.com> �wrote:
Hey I do some pretty in depth php programming, and while I realize
it's probably quite different from what you're working with, some of
the code looks very recognizable and like I might even be able to make
sense of it and pitch in. �Is there a link to an SDK or something I
could use to help? �I'd love to get involved and contribute...
Brian
On May 21, 7:28 pm, indy arm<arm.indi...@gmail.com> �wrote:
Hi,
Please find:
- an minimal version of ML that set the bootflag.
- Stubs and Consts files for "autoexec.bin" development
Thanks to Chucho for the very first test!
Most work has been done by Alex and assembled by me.
we used this tag as a starting point:https://bitbucket.org/a1ex/magic-lantern/changeset/93135f58ed93
Any developer for the 600D/T3i will be helped to port the 550d and 60d
features.
Indy (who do not have a 600d ;-)
�autoexec.bin

...

read more �

--
http://magiclantern.wikia.com/

To post to this group, send email to ml-d...@googlegroups.com
To unsubscribe from this group, send email to ml-devel+u...@googlegroups.com
For more options, visit this group at http://groups.google.com/group/ml-devel?hl=en

--
http://magiclantern.wikia.com/

To post to this group, send email to ml-d...@googlegroups.com
To unsubscribe from this group, send email to ml-devel+u...@googlegroups.com
For more options, visit this group at http://groups.google.com/group/ml-devel?hl=en

--
http://magiclantern.wikia.com/

To post to this group, send email to ml-d...@googlegroups.com
To unsubscribe from this group, send email to ml-devel+u...@googlegroups.com
For more options, visit this group at http://groups.google.com/group/ml-devel?hl=en

--
http://magiclantern.wikia.com/

To post to this group, send email to ml-d...@googlegroups.com
To unsubscribe from this group, send email to ml-devel+u...@googlegroups.com
For more options, visit this group at http://groups.google.com/group/ml-devel?hl=en

Vincent Olivier

unread,
May 29, 2011, 5:56:28 PM5/29/11
to ml-d...@googlegroups.com
This, specifically? http://twitpic.com/54c7r2

I can't see anything else.

Vincent

On 2011-05-29, at 5:49 PM, Sztupák Sz. Zsolt wrote:

The version number should get rewritten by the init part too. Check it inside the normal Canon menu.

 SztupY
Hi,

Cool!

So did "make clean". Uncommented  boot-hack.c:137 so it now reads "task_dispatch_hook = my_task_dispatch_hook;". Put newly compiled "autoexec.bin" on card. Put battery back. Turned on. Video mode. Pressed trash can button. Nothing. :-(
[ LD       ]   magiclantern
[ OBJCOPY  ]   magiclantern.bin
[ CC       ]   reboot.o
[ LD       ]   autoexec
[ OBJCOPY  ]   autoexec.bin
Still compiling ARM toolchain…

Vincent

On 2011-05-29, at 1:20 PM, arm.indy wrote:

Hi Vincent,

The first thing is to activate menu and key events handling (gui.c).
The 60d code can be reused, but key events may differ a little bit.
the 600d is very close to the 60d, which must be taken as model for
the porting process.

Indy

On May 28, 11:03 pm, Vincent Olivier <vinc...@nbourbaki.com> wrote:
Hi,

When looking for the "movie_restart" in the t3i branch, it only shows up in the "debug.c" file whereas in the original one, there are around 10 files where it's a hit. So, I might want to import this code in. But I'd need a little guidance…

I'm totally new in this and it's really difficult to get a grasp on the code because the only comments I will find in there are dead lines that have been commented out. ;-)

For instance, everything of interest seems to arise around "call("MovieStart");" statements. I find "4a79d9 FA_MovieStart" in the "fa-functions.txt" file, but no further definition for that. Is that a lower level service in DryOS or something? Can it be overridden/looked at?

And even if I get the whole thing to compile and load on the camera (which seems feasible given the instruction set I found for Mac OS), I'm not sure I will be able to understand what needs to be done to have ML working on the t3i before you guys are done with it… Unless I get a crash course or something…
On May 25, 2:46 pm, "arm.indy"<arm.indi...@gmail.com>  wrote:
I just cloned Alex's branch from this revisionhttps://bitbucket.org/a1ex/magic-lantern/changeset/93135f58ed93

and included my diff for 600D / T3i inhttps://bitbucket.org/arm_indy/magic-lantern-for-600d-t3i/changesets

If someone serious want write access, just ask.

Indy

On May 24, 10:08 pm, "arm.indy"<arm.indi...@gmail.com>  wrote:

gui.c from 60d can be used.
counter and queue offsets (0xc and 0x30 resp.) are the same.
struct is 0x1C38
600d is closer to 60d than 550d: same DryOS 2.3 version release #47
thanks for your help Chuchin!
Indy
On May 24, 9:51 pm, "XFracture (aka Herb)"<herbhalst...@gmail.com>
wrote:
so... Chuchin... do you a compiled version? (grin)
On May 24, 1:28 pm, Chuchin<jlsaldan...@gmail.com>  wrote:
Brain, I'm using the 550 build as a starting point, which can be
downloaded herehttps://bitbucket.org/hudson/magic-lantern/srcyou
have to update the 5d-hack.c file the new address that can be found in
the consts-600d.101.h. In the gui.c file keep the #include
"consts-550d.109.h" untill the 600d are confrim. In the makefile the
restartstart has to be update which is in the stubs-600d.101.S also
replace the 550d-empty.hdr with the 600d frimware, keep
magiclantern.lds entry.o 5d-hack.o stubs-600d.101.S version.o bmp.o
font-large.o font-med.o font-small.o config.o menu.o debug.o stdio.o
lens.o property.o propvalues.o gui.o chdk-gui_draw.o and try to
activate the other functions one at a time. You will have to rewrite
code as needed but not much.
Chucho
On May 24, 5:42 am, Brian Berneker<brianberne...@gmail.com>  wrote:
Hey I do some pretty in depth php programming, and while I realize
it's probably quite different from what you're working with, some of
the code looks very recognizable and like I might even be able to make
sense of it and pitch in.  Is there a link to an SDK or something I
could use to help?  I'd love to get involved and contribute...
Brian
On May 21, 7:28 pm, indy arm<arm.indi...@gmail.com>  wrote:
Hi,
Please find:
- an minimal version of ML that set the bootflag.
- Stubs and Consts files for "autoexec.bin" development
Thanks to Chucho for the very first test!
Most work has been done by Alex and assembled by me.
we used this tag as a starting point:https://bitbucket.org/a1ex/magic-lantern/changeset/93135f58ed93
Any developer for the 600D/T3i will be helped to port the 550d and 60d
features.
Indy (who do not have a 600d ;-)
 autoexec.bin

...

read more »

"Sztupák Sz. Zsolt"

unread,
May 29, 2011, 5:58:25 PM5/29/11
to ml-d...@googlegroups.com
Yep, as you can see ML did load (the version number contains -ml-builddate).

From this on probably the task handler didn't get loaded properly, so the gui task doesn't get loaded which handles the keys which will in turn load the menus.

�SztupY
This, specifically?�http://twitpic.com/54c7r2

I can't see anything else.

Vincent

On 2011-05-29, at 5:49 PM, Sztup�k Sz. Zsolt wrote:

The version number should get rewritten by the init part too. Check it inside the normal Canon menu.

�SztupY
Hi,

Cool!

So did "make clean".�Uncommented �boot-hack.c:137 so it now reads "task_dispatch_hook = my_task_dispatch_hook;".�Put newly compiled "autoexec.bin" on card. Put battery back. Turned on. Video mode. Pressed trash can button. Nothing. :-(
[ LD � � � ] � magiclantern
[ OBJCOPY �] � magiclantern.bin
[ CC � � � ] � reboot.o
[ LD � � � ] � autoexec
[ OBJCOPY �] � autoexec.bin
Still compiling ARM toolchain�

Vincent

On 2011-05-29, at 1:20 PM, arm.indy wrote:

Hi Vincent,

The first thing is to activate menu and key events handling (gui.c).
The 60d code can be reused, but key events may differ a little bit.
the 600d is very close to the 60d, which must be taken as model for
the porting process.

Indy

On May 28, 11:03 pm, Vincent Olivier <vinc...@nbourbaki.com> wrote:
Hi,

When looking for the "movie_restart" in the t3i branch, it only shows up in the "debug.c" file whereas in the original one, there are around 10 files where it's a hit. So, I might want to import this code in. But I'd need a little guidance�

I'm totally new in this and it's really difficult to get a grasp on the code because the only comments I will find in there are dead lines that have been commented out. ;-)

For instance, everything of interest seems to arise around "call("MovieStart");" statements. I find "4a79d9 FA_MovieStart" in the "fa-functions.txt" file, but no further definition for that. Is that a lower level service in DryOS or something? Can it be overridden/looked at?

And even if I get the whole thing to compile and load on the camera (which seems feasible given the instruction set I found for Mac OS), I'm not sure I will be able to understand what needs to be done to have ML working on the t3i before you guys are done with it� Unless I get a crash course or something�
On May 25, 2:46 pm, "arm.indy"<arm.indi...@gmail.com> �wrote:
I just cloned Alex's branch from this revisionhttps://bitbucket.org/a1ex/magic-lantern/changeset/93135f58ed93

and included my diff for 600D / T3i inhttps://bitbucket.org/arm_indy/magic-lantern-for-600d-t3i/changesets

If someone serious want write access, just ask.

Indy

On May 24, 10:08 pm, "arm.indy"<arm.indi...@gmail.com> �wrote:

gui.c from 60d can be used.
counter and queue offsets (0xc and 0x30 resp.) are the same.
struct is 0x1C38
600d is closer to 60d than 550d: same DryOS 2.3 version release #47
thanks for your help Chuchin!
Indy
On May 24, 9:51 pm, "XFracture (aka Herb)"<herbhalst...@gmail.com>
wrote:
so... Chuchin... do you a compiled version? (grin)
On May 24, 1:28 pm, Chuchin<jlsaldan...@gmail.com> �wrote:
Brain, I'm using the 550 build as a starting point, which can be
downloaded herehttps://bitbucket.org/hudson/magic-lantern/srcyou
have to update the 5d-hack.c file the new address that can be found in
the consts-600d.101.h. In the gui.c file keep the #include
"consts-550d.109.h" untill the 600d are confrim. In the makefile the
restartstart has to be update which is in the stubs-600d.101.S also
replace the 550d-empty.hdr with the 600d frimware, keep
magiclantern.lds entry.o 5d-hack.o stubs-600d.101.S version.o bmp.o
font-large.o font-med.o font-small.o config.o menu.o debug.o stdio.o
lens.o property.o propvalues.o gui.o chdk-gui_draw.o and try to
activate the other functions one at a time. You will have to rewrite
code as needed but not much.
Chucho
On May 24, 5:42 am, Brian Berneker<brianberne...@gmail.com> �wrote:
Hey I do some pretty in depth php programming, and while I realize
it's probably quite different from what you're working with, some of
the code looks very recognizable and like I might even be able to make
sense of it and pitch in. �Is there a link to an SDK or something I
could use to help? �I'd love to get involved and contribute...
Brian
On May 21, 7:28 pm, indy arm<arm.indi...@gmail.com> �wrote:
Hi,
Please find:
- an minimal version of ML that set the bootflag.
- Stubs and Consts files for "autoexec.bin" development
Thanks to Chucho for the very first test!
Most work has been done by Alex and assembled by me.
we used this tag as a starting point:https://bitbucket.org/a1ex/magic-lantern/changeset/93135f58ed93
Any developer for the 600D/T3i will be helped to port the 550d and 60d
features.
Indy (who do not have a 600d ;-)
�autoexec.bin

...

read more �

--
http://magiclantern.wikia.com/

To post to this group, send email to ml-d...@googlegroups.com
To unsubscribe from this group, send email to ml-devel+u...@googlegroups.com
For more options, visit this group at http://groups.google.com/group/ml-devel?hl=en

--
http://magiclantern.wikia.com/

To post to this group, send email to ml-d...@googlegroups.com
To unsubscribe from this group, send email to ml-devel+u...@googlegroups.com
For more options, visit this group at http://groups.google.com/group/ml-devel?hl=en

--
http://magiclantern.wikia.com/

To post to this group, send email to ml-d...@googlegroups.com
To unsubscribe from this group, send email to ml-devel+u...@googlegroups.com
For more options, visit this group at http://groups.google.com/group/ml-devel?hl=en

--
http://magiclantern.wikia.com/

To post to this group, send email to ml-d...@googlegroups.com
To unsubscribe from this group, send email to ml-devel+u...@googlegroups.com
For more options, visit this group at http://groups.google.com/group/ml-devel?hl=en

To post to this group, send email to ml-d...@googlegroups.com
To unsubscribe from this group, send email to ml-devel+u...@googlegroups.com
For more options, visit this group at http://groups.google.com/group/ml-devel?hl=en

To post to this group, send email to ml-d...@googlegroups.com
To unsubscribe from this group, send email to ml-devel+u...@googlegroups.com
For more options, visit this group at http://groups.google.com/group/ml-devel?hl=en

Alex

unread,
May 29, 2011, 6:00:33 PM5/29/11
to ml-d...@googlegroups.com
Right. You won't get any menus until you figure out button codes, then
enable user tasks and then the menu task.

Does bmp_printf work? (I believe yes). Use it to see what the code is
doing, and look at 60D's boot-hack.c to see how startup works.

Vincent Olivier

unread,
May 29, 2011, 6:03:37 PM5/29/11
to ml-d...@googlegroups.com
OK. So humm. I will leave it a that for today. Sushi is waiting for me somewhere.

Is there something happening earlier than boot-hack.c:137 where I could put some bmp_printf stuff? That's what I'll try next and then go down to testing the button codes.

I'm off for the day, will try more this week.

Thanks for everything!

Vincent


On 2011-05-29, at 5:58 PM, Sztupák Sz. Zsolt wrote:

Yep, as you can see ML did load (the version number contains -ml-builddate).

From this on probably the task handler didn't get loaded properly, so the gui task doesn't get loaded which handles the keys which will in turn load the menus.

 SztupY
This, specifically? http://twitpic.com/54c7r2

I can't see anything else.

Vincent

On 2011-05-29, at 5:49 PM, Sztupák Sz. Zsolt wrote:

The version number should get rewritten by the init part too. Check it inside the normal Canon menu.

 SztupY
Hi,

Cool!

So did "make clean". Uncommented  boot-hack.c:137 so it now reads "task_dispatch_hook = my_task_dispatch_hook;". Put newly compiled "autoexec.bin" on card. Put battery back. Turned on. Video mode. Pressed trash can button. Nothing. :-(
[ LD       ]   magiclantern
[ OBJCOPY  ]   magiclantern.bin
[ CC       ]   reboot.o
[ LD       ]   autoexec
[ OBJCOPY  ]   autoexec.bin
Still compiling ARM toolchain…

Vincent

On 2011-05-29, at 1:20 PM, arm.indy wrote:

Hi Vincent,

The first thing is to activate menu and key events handling (gui.c).
The 60d code can be reused, but key events may differ a little bit.
the 600d is very close to the 60d, which must be taken as model for
the porting process.

Indy

On May 28, 11:03 pm, Vincent Olivier <vinc...@nbourbaki.com> wrote:
Hi,

When looking for the "movie_restart" in the t3i branch, it only shows up in the "debug.c" file whereas in the original one, there are around 10 files where it's a hit. So, I might want to import this code in. But I'd need a little guidance…

I'm totally new in this and it's really difficult to get a grasp on the code because the only comments I will find in there are dead lines that have been commented out. ;-)

For instance, everything of interest seems to arise around "call("MovieStart");" statements. I find "4a79d9 FA_MovieStart" in the "fa-functions.txt" file, but no further definition for that. Is that a lower level service in DryOS or something? Can it be overridden/looked at?

And even if I get the whole thing to compile and load on the camera (which seems feasible given the instruction set I found for Mac OS), I'm not sure I will be able to understand what needs to be done to have ML working on the t3i before you guys are done with it… Unless I get a crash course or something…
On May 25, 2:46 pm, "arm.indy"<arm.indi...@gmail.com>  wrote:
I just cloned Alex's branch from this revisionhttps://bitbucket.org/a1ex/magic-lantern/changeset/93135f58ed93

and included my diff for 600D / T3i inhttps://bitbucket.org/arm_indy/magic-lantern-for-600d-t3i/changesets

If someone serious want write access, just ask.

Indy

On May 24, 10:08 pm, "arm.indy"<arm.indi...@gmail.com>  wrote:

gui.c from 60d can be used.
counter and queue offsets (0xc and 0x30 resp.) are the same.
struct is 0x1C38
600d is closer to 60d than 550d: same DryOS 2.3 version release #47
thanks for your help Chuchin!
Indy
On May 24, 9:51 pm, "XFracture (aka Herb)"<herbhalst...@gmail.com>
wrote:
so... Chuchin... do you a compiled version? (grin)
On May 24, 1:28 pm, Chuchin<jlsaldan...@gmail.com>  wrote:
Brain, I'm using the 550 build as a starting point, which can be
downloaded herehttps://bitbucket.org/hudson/magic-lantern/srcyou
have to update the 5d-hack.c file the new address that can be found in
the consts-600d.101.h. In the gui.c file keep the #include
"consts-550d.109.h" untill the 600d are confrim. In the makefile the
restartstart has to be update which is in the stubs-600d.101.S also
replace the 550d-empty.hdr with the 600d frimware, keep
magiclantern.lds entry.o 5d-hack.o stubs-600d.101.S version.o bmp.o
font-large.o font-med.o font-small.o config.o menu.o debug.o stdio.o
lens.o property.o propvalues.o gui.o chdk-gui_draw.o and try to
activate the other functions one at a time. You will have to rewrite
code as needed but not much.
Chucho
On May 24, 5:42 am, Brian Berneker<brianberne...@gmail.com>  wrote:
Hey I do some pretty in depth php programming, and while I realize
it's probably quite different from what you're working with, some of
the code looks very recognizable and like I might even be able to make
sense of it and pitch in.  Is there a link to an SDK or something I
could use to help?  I'd love to get involved and contribute...
Brian
On May 21, 7:28 pm, indy arm<arm.indi...@gmail.com>  wrote:
Hi,
Please find:
- an minimal version of ML that set the bootflag.
- Stubs and Consts files for "autoexec.bin" development
Thanks to Chucho for the very first test!
Most work has been done by Alex and assembled by me.
we used this tag as a starting point:https://bitbucket.org/a1ex/magic-lantern/changeset/93135f58ed93
Any developer for the 600D/T3i will be helped to port the 550d and 60d
features.
Indy (who do not have a 600d ;-)
 autoexec.bin

...

read more »

Alex

unread,
May 29, 2011, 6:15:06 PM5/29/11
to ml-d...@googlegroups.com
You can place bmp_printf's in my_init_task; that's where all
"user-mode" init takes place. The part with additional_version is
working.

Overriden tasks will be started by DryOs; they may be started very
early, so it may not be possible to use DebugMsg from there. I believe
bmp_printf should be safe, as it only writes to VRAM.

First display a "Hello world" message from the end of my_init_task,
and from this point on, you will know how to continue.

Andrew Coutts

unread,
May 30, 2011, 1:27:01 AM5/30/11
to Magic Lantern firmware development
There is a function in the 500d dump called mvrCheckFileSize, called
by mvrEncodeDone. I wonder if this exists on the 600d (most likely),
and if so, if it could be used.

Indy?????


excerpt from 500d:

ROM:FF152564 mvrCheckFileSize ; CODE XREF:
mvrEncodeDone+26C p
ROM:FF152564 ; mvrSMEncodeDone
+134 p
ROM:FF152564 STMFD SP!, {R4,LR}
ROM:FF152568 LDR R3, [R0,#0x124]
ROM:FF15256C MOV R4, R0
ROM:FF152570 CMP R3, #0xFF000000
ROM:FF152574 MOVCC R0, #0
ROM:FF152578 LDMCCFD SP!, {R4,PC}
ROM:FF15257C LDR R0, [R4,#0xC]
ROM:FF152580 ADR R2,
aMvrcheckfilesizeMaxFileSizeX ; "mvrCheckFileSize : Max File
Size(%#x)"
ROM:FF152584 MOV R1, #0x16
ROM:FF152588 AND R0, R0, #0xFF
ROM:FF15258C BL DryosDebugMsg
ROM:FF152590 LDR R3, [R4,#0x3C]
ROM:FF152594 CMP R3, #0
ROM:FF152598 LDRNE R0, [R4,#0x40]
ROM:FF15259C MOVNE R2, #0
ROM:FF1525A0 MOVNE R1, #1
ROM:FF1525A4 BLXNE R3
ROM:FF1525A8 MOV R0, #1
ROM:FF1525AC LDMFD SP!, {R4,PC}
ROM:FF1525AC ; End of function mvrCheckFileSize


(i am not sure if I am allowed to post code from the dump here or not,
I apologize in advance if this is not allowed).

Vincent Olivier

unread,
May 30, 2011, 10:41:40 AM5/30/11
to ml-d...@googlegroups.com
Hi Andrew,

Are you referring to the continuous recording hack I mentioned in the SDXC thread?

If so, that is my primary objective with the 600D/T3i port.

I saw on your Twitter feed mentions of the buffers. My initial plan for a gapless sequential movie file recording was to :

1) Hook a task around the 4GB (and eventually the 29 minutes) limit checking functions that would be triggered just before the limit is handled by the camera.

2) this task would (that's one of the possible strategies) have the camera continue to feed the buffers while it's closing the file, and

3) once the file-closing (MovieEnd?), automatically restart the movie recording (MovieStart?) with the buffer contents that have been fed while closing the previous file;

4) continue until the recording has been explicitly stopped by the user;

What do you think of that strategy? Do you think the buffers are large enough to handle the 2-3 seconds it takes between a MovieEnd/MovieStart sequence? Do you think we can feed the buffers with both video and audio during that time? Can DryOS handle that kind of parallelism?

Now, I need to learn a lot about the architecture of the ML code before I'm minimally useful to all of this, but I would really like to know where I can find literature on FA-functions. Are these how the ML hooks are registered? How ML calls DryOS functions? Is what can be now found in the T3i for actually accurate for the T3i? Are there more functions that are unmapped, unknown? Where are those functions documented?

I will probably have time to look into it again later today.

Thanks,

Vincent

PS: I'm curious about how many ML developers currently have access to a T3i unit?

Andrew Coutts

unread,
May 30, 2011, 11:41:51 AM5/30/11
to Magic Lantern firmware development
I've just got t1i unfortunately. But, as Alex has pointed out at R0
there is a struct we need to find. 0xFF000000 = 3.98gb, so this is
where the actual checking happens.

I wonder if we can alter the value at offset 0x124 at this struct,
which should be the filesize of the current recording (in essence
tricking the camera into thinking it hasn't reached 4gb yet).

That's my idea of a solution :-s

(this all referring to the 500d ofcourse, I don't have a 600d dump).

Vincent Olivier

unread,
May 30, 2011, 11:53:03 AM5/30/11
to ml-d...@googlegroups.com
Can I provide a 600D dump? If so, how?

Even if we can trick the camera in to thinking it hasn't reached the limit, won't we run into more fundamental file handling problems as DryOS seems not to have incorporated that into its basic IO, as per convo here : http://groups.google.com/group/ml-devel/browse_thread/thread/9c2b9aece9e459fd ?

Vincent

Andrew Coutts

unread,
May 30, 2011, 12:10:59 PM5/30/11
to Magic Lantern firmware development
Ah, I've forgotten about that.

Well I think I might have found that struct, from 500d:

http://i53.tinypic.com/33ekbbt.png

It's located right above mvrMovStreamCallback

I am not positive, but this is the first spot I've come across that
loads anything into R0 (and everything after this point loads the
contents of R0 into usually R4, and refers to different offsets).

On May 30, 11:53 am, Vincent Olivier <vinc...@nbourbaki.com> wrote:
> Can I provide a 600D dump? If so, how?
>
> Even if we can trick the camera in to thinking it hasn't reached the limit, won't we run into more fundamental file handling problems as DryOS seems not to have incorporated that into its basic IO, as per convo here :http://groups.google.com/group/ml-devel/browse_thread/thread/9c2b9aec...?

Vincent Olivier

unread,
May 30, 2011, 12:44:05 PM5/30/11
to ml-d...@googlegroups.com
OK, man, I'm setting up a decent IDA on this machine now. Reading from the ML/CHDK wiki until tomorrow.

v

Andrew Coutts

unread,
May 30, 2011, 2:26:43 PM5/30/11
to Magic Lantern firmware development
actually i think i retract this... after trying bmp_printf I can't get
anything useful. Maybe this is a start to look into though (for
somebody more experience such as Indy).

Which camera does the 600d seem to be most similar to so far? the 500d
surprisingly is more similar to the 5d2 than the 550d. Best of luck!!

On May 30, 12:10 pm, Andrew Coutts <andrewjohncou...@gmail.com> wrote:
> Ah, I've forgotten about that.
>
> Well I think I might have found that struct, from 500d:
>
> http://i53.tinypic.com/33ekbbt.png
>
> It's located right above mvrMovStreamCallback
>
> I am not positive, but this is the first spot I've come across that
> loads anything into R0 (and everything after this point loads the
> contents of R0 into usually R4, and refers to different offsets).
>
> On May 30, 11:53 am, Vincent Olivier <vinc...@nbourbaki.com> wrote:
>
>
>
>
>
>
>
> > Can I provide a 600D dump? If so, how?
>
> > Even if we can trick the camera in to thinking it hasn't reached the limit, won't we run into more fundamental file handling problems as DryOS seems not to have incorporated that into its basic IO, as per convo here :http://groups.google.com/group/ml-devel/browse_thread/thread/9c2b9aec...
>
> > >>> To...
>
> read more »

arm.indy

unread,
May 30, 2011, 3:25:54 PM5/30/11
to Magic Lantern firmware development
Hi Coutts,

$ strings -t x 0286_101_firmware.bin >600d_101_strings.txt

$ grep mvrCheckFileSize 600d_101_strings.txt
445ba6 mvrCheckFileSize : Max File Size(%#x%08x)

yes there is such function.
since firmware file starts at 0xff010000, address to look at
is around 0xff455ba6

I have not yet analysed in depth the 600d firmware.

Indy

Alex

unread,
May 30, 2011, 3:33:10 PM5/30/11
to ml-d...@googlegroups.com
> 1) Hook a task around the 4GB (and eventually the 29 minutes) limit checking functions that would be triggered just before the limit is handled by the camera.
>
> 2) this task would (that's one of the possible strategies) have the camera continue to feed the buffers while it's closing the file, and
>
> 3) once the file-closing (MovieEnd?), automatically restart the movie recording (MovieStart?) with the buffer contents that have been fed while closing the previous file;
>
> 4) continue until the recording has been explicitly stopped by the user;

I didn't try it; it might be possible to get a smaller gap than with
current Movie Restart (which just calls MovieStart after recording
stopped automatically).

> What do you think of that strategy? Do you think the buffers are large enough to handle the 2-3 seconds it takes between a MovieEnd/MovieStart sequence? Do you think we can feed the buffers with both video and audio during that time? Can DryOS handle that kind of parallelism?

It's not so easy. I think it may be possible to trick it, i.e. to open
another file from ML, make the movie recording task believe it didn't
arrive at the 4 GB limit, and then mangle the file pointers on the
fly. I don't know how to implement this or if it has any chance to
work.

> Now, I need to learn a lot about the architecture of the ML code before I'm minimally useful to all of this, but I would really like to know where I can find literature on FA-functions. Are these how the ML hooks are registered? How ML calls DryOS functions? Is what can be now found in the T3i for actually accurate for the T3i? Are there more functions that are unmapped, unknown? Where are those functions documented?

On the wiki.

> PS: I'm curious about how many ML developers currently have access to a T3i unit?

As far as I know, only Chuchin.

Vincent Olivier

unread,
May 30, 2011, 5:26:40 PM5/30/11
to ml-d...@googlegroups.com
OK, so had success with the printf and some etymological sense of humour : http://twitpic.com/54rt8u

Anyways, will be further printfing down the rabbit whole this week to see how it goes, having no luck whatsoever with the ARM console at the moment (can't install the required python modules on my Mac).

Will keep you guys posted. Thanks for everything.

Vincent

Andrew Coutts

unread,
May 30, 2011, 5:29:48 PM5/30/11
to ml-d...@googlegroups.com
Vincent, I have a virtual machine with the console all setup (and arm-toolchain if so needed, but I use the toolchain on my mac and can guide you to setting that up as well). If you want, I can send you the virtual machine file to use it. You will just need VM Player. Let me know.

Vincent Olivier

unread,
May 30, 2011, 8:00:38 PM5/30/11
to ml-d...@googlegroups.com, ml-d...@googlegroups.com
I was just about to make one myself. But if you have one ready, I'd be grateful to have it. Parallels?

Thanks again,

Vincent

Andrew Coutts

unread,
Jun 1, 2011, 11:08:11 AM6/1/11
to Magic Lantern firmware development
Vincent, I just got the console setup on my macbook today. Posted some
tips (for setting up under OS X) here:
http://chdk.setepontos.com/index.php?topic=5971.msg67775#msg67775

On May 30, 8:00 pm, Vincent Olivier <vinc...@nbourbaki.com> wrote:
> I was just about to make one myself. But if you have one ready, I'd be grateful to have it. Parallels?
>
> Thanks again,
>
> Vincent
>
> On 2011-05-30, at 5:29 PM, Andrew Coutts <andrewjohncou...@gmail.com> wrote:
>
>
>
>
>
>
>
> > Vincent, I have a virtual machine with the console all setup (and arm-toolchain if so needed, but I use the toolchain on my mac and can guide you to setting that up as well). If you want, I can send you the virtual machine file to use it. You will just need VM Player. Let me know.
>
> >> For more options, visit this group athttp://groups.google.com/group/ml-devel?hl=en
>
> > --
> >http://magiclantern.wikia.com/
>
> > To post to this group, send email to ml-d...@googlegroups.com
> > To unsubscribe from this group, send email to ml-devel+u...@googlegroups.com
> > For more options, visit this group athttp://groups.google.com/group/ml-devel?hl=en

Vincent Olivier

unread,
Jun 1, 2011, 11:17:06 AM6/1/11
to ml-d...@googlegroups.com
Hi,

Thanks Andrew. I'm almost done with a Ubuntu 10.04 LTS Parallels VM. It's better this way, I think. To have some kind of degree of isolation! ;-)

And thanks to those who offered privately their own VM. I'm not done with mine, so if it doesn't work, I'll probably end up using one of yours.

Thanks,

Vincent

XFracture (aka Herb)

unread,
Jun 3, 2011, 12:46:19 PM6/3/11
to Magic Lantern firmware development
Does anyone have a newer working bin that I could test?

On May 30, 7:00 pm, Vincent Olivier <vinc...@nbourbaki.com> wrote:
> I was just about to make one myself. But if you have one ready, I'd be grateful to have it. Parallels?
>
> Thanks again,
>
> Vincent
>
> On 2011-05-30, at 5:29 PM, Andrew Coutts <andrewjohncou...@gmail.com> wrote:
>
>
>
>
>
>
>
> > Vincent, I have a virtual machine with the console all setup (and arm-toolchain if so needed, but I use the toolchain on my mac and can guide you to setting that up as well). If you want, I can send you the virtual machine file to use it. You will just need VM Player. Let me know.
>
> >> For more options, visit this group athttp://groups.google.com/group/ml-devel?hl=en
>
> > --
> >http://magiclantern.wikia.com/
>
> > To post to this group, send email to ml-d...@googlegroups.com
> > To unsubscribe from this group, send email to ml-devel+u...@googlegroups.com
> > For more options, visit this group athttp://groups.google.com/group/ml-devel?hl=en

Vincent Olivier

unread,
Jun 3, 2011, 1:45:56 PM6/3/11
to ml-d...@googlegroups.com
Hi Guys,

Just to keep you posted on where I am. The toolchain is no problem, but the console is a bitch to get together (as per one of the nice fellas that offered a VM). I will dedicate one full day for that this weekend and once I'm done with the environment, my priorities are :

1) Port buttons and existing 60D function mappings and code to T3i in a fail-fast manner (if it doesn't work after 2 trials, it's on to the next one and I'll post summarized report of the progress as I go).

2) If I don't get it from 1), try to have always-present audio levels HUD in a non-interactive fashion (no on/off configuration to keep it minimal)

3) Alleviate the all-elusive recording limit from the easiest (auto-restart MovieStart) to the most sophisticated (video+audio buffer overrun for file sequence).

4) Full-HD HDMI output with audio (if it is even possible?).

I might post a bin after 1) is done. Of course, it will be an at-your-own-risk kind of thing.

Vincent

Antony Newman

unread,
Jun 3, 2011, 2:41:09 PM6/3/11
to ml-d...@googlegroups.com
"4) Full-HD HDMI output with audio (if it is even possible?)."

There is a callable (ie call("xxxx") ) subroutine in 5D2 / 2.0.4 that switches Audio on over HDMI (that's what it says on the tin - but I have never tried it).

No IDC with me or I'd tell you the 'xxxx'

AJ

Vincent Olivier

unread,
Jun 3, 2011, 2:52:04 PM6/3/11
to ml-d...@googlegroups.com
Thanks Anthony.

What about PTP/USB? Is it also possible to have a full 1080p/30fps stream through USB too? Doesn't seem to come out of the box with the EOS API.

Vincent


Alex

unread,
Jun 3, 2011, 2:53:29 PM6/3/11
to ml-d...@googlegroups.com
Try EOS-movrec and see for yourself.

Vincent Olivier

unread,
Jun 3, 2011, 3:26:58 PM6/3/11
to ml-d...@googlegroups.com
yes tried already, alas :

1) the last packaged version uses an API version before T3i support

2) the newest source code doesn't compile on mac and the new API with T3i support and I didn't have time to make it work, preferred to focus on ML

3) from what I understand from the EOS-movrec documentation, the firmware doesn't send full-HD (hence my question)

But, I'll try it when I'm at 4) and report.

Vincent

Vincent Olivier

unread,
Jun 5, 2011, 12:42:15 PM6/5/11
to ml-d...@googlegroups.com
So,

Got all the toolchain working. Must have broken everything else on my machine, but hey!

Renamed my ROM0.BIN to 600d.101.bin and copied the supplied 600d.101.S file. And got this :

Vincent:alexdu-ARM-console-b101b04 vincent$ python main.py

You might want to do this:
    D = load_dumps("autoexec")

ARM firmware analysis console ready.

In [1]: D = load_dumps("600d")
Don't know load address for 600d.101.bin. Ignoring this file.


I don't know, very nonoptimal heuristics here… Did I take the right file? Did I skip something from the instructions here : http://magiclantern.wikia.com/wiki/GPL_Tools/ARM_console

?

Thanks!

Vincent

Alex

unread,
Jun 5, 2011, 12:51:43 PM6/5/11
to ml-d...@googlegroups.com
600d.101.0xff010000.bin ;)

Vincent Olivier

unread,
Jun 5, 2011, 1:05:53 PM6/5/11
to ml-d...@googlegroups.com
Almost there…


You might want to do this:
    D = load_dumps("autoexec")

ARM firmware analysis console ready.

In [1]: D = load_dumps("600d")
Input files:
===============================================================================
           Binary dump (*.bin)     LoadAddr     IDC database (*.idc)    
===============================================================================
       600d.101.0xff010000.bin     FF010000     n/a
===============================================================================
Disassembling 600d.101.0xff010000.bin <ff010000>... ok
Parsing disassembly of 600d.101.0xff010000.bin...  found 2334113 lines
Indexing references... ok
finding strings...
Auto-selecting dump 600d.101.0xff010000.bin

In [3]: t3i = D

In [4]: t3i.load_names("600d.101.S")
------------------------------------------------------------
Traceback (most recent call last):
  File "<ipython console>", line 1, in <module>
AttributeError: 'list' object has no attribute 'load_names'

Vincent Olivier

unread,
Jun 5, 2011, 1:07:42 PM6/5/11
to ml-d...@googlegroups.com
Answered myself : 

In [9]: t3i = D.pop()

In [10]: t3i.load_names("600d.101.S")
Found 111 stubs in 600d.101.S.

Vincent Olivier

unread,
Jun 9, 2011, 4:12:21 PM6/9/11
to ml-d...@googlegroups.com
So teensy update here.

Got the HTML from the ARM Console. Everything after the quick HTML fails. So I'm back in the code.

I put tracing in the "for( ; init_func < _init_funcs_end ; init_func++ )" in "boot-hack.c:call_init_funcs". All I get is "Calling init_func bootflags.c (83f78)". Is that all there is supposed to be? Because I also put tracing right at the start of "gui.c:handle_buttons" and it never gets called. And in "bootflags.c", guessing that what is called is "bootflags_init", trying to uncomment the "menu_add" call gets me a "bootflags.c:303: undefined reference to `menu_add'" even if the "menu.h" is included. But "bootflags_init" is definitely running, though.

If someone could get on Skype or IRC or heck, even Facebook chat, I'd go much faster and wouldn't have to bother everyone. Because at this point I see thousands of things I could try, but all randomly…

Talk to someone soon!

Vincent

Vincent Olivier

unread,
Jun 17, 2011, 10:15:20 AM6/17/11
to ml-d...@googlegroups.com
More update!


So, first, I have forked from the arm_indy repository for my experiments here : https://bitbucket.org/up4/magic-lantern-for-600d-t3i

My aim was to activate the button handling code in "gui.c" (and nothing else) in order to be able to do the button mapping. I also switched to using the ARM Yagarto stack because it's much easier to setup on a Mac. However, as soon as I uncomment boot-hack.c:137, the firmware freezes the camera. No matter how minimal the included compiled files are right now only a stripped down "gui.c" was added compared to the arm_indy version.

I read everything I could on the DryOS boot process, but now, really, I'm completely in the dark, and I'm a bit to old for sleepless nights of debugging code with few or no commenting for easier understanding of my tired brain. ;-)

I've been harassing Alex privately, and he helped me a lot. Now, he deserves a break! :D So any help will be appreciated!

Thanks,

Vincent

arm.indy

unread,
Jun 17, 2011, 2:23:24 PM6/17/11
to Magic Lantern firmware development
Vincent,

I do not have -yet- a 600D under hand.
My advice is to compare boot-hack.c and *-hack.c from 550d and 60d.
gui.c from 60d.

I'll help you more as soon as I'll have a 600d

Indy
> >>>> On Sun, Jun 5, 2011 at 6:42 PM, Vincent Olivier <vinc...@nbourbaki.com> wrote:
> >>>> So,
>
> >>>> Got all the toolchain working. Must have broken everything else on my machine, but hey!
>
> >>>> Renamed my ROM0.BIN to 600d.101.bin and copied the supplied 600d.101.S file. And got this :
>
> >>>> Vincent:alexdu-ARM-console-b101b04 vincent$ python main.py
>
> >>>>http://magiclantern.wikia.com/wiki/GPL_Tools/ARM_console
> >>>> You might want to do this:
> >>>>     D = load_dumps("autoexec")
>
> >>>> ARM firmware analysis console ready.
>
> >>>> In [1]: D = load_dumps("600d")
> >>>> Don't know load address for 600d.101.bin. Ignoring this file.
>
> >>>> I don't know, very nonoptimal heuristics here… Did I take the right file? Did I skip something from the instructions here :http://magiclantern.wikia.com/wiki/GPL_Tools/ARM_console
>
> >>>> ?
>
> >>>> Thanks!
>
> >>>> Vincent
>
> >>>> On 2011-06-03, at 3:26 PM, Vincent Olivier wrote:
>
> >>>>> yes tried already, alas :
>
> >>>>> 1) the last packaged version uses an API version before T3i support
>
> >>>>> 2) the newest source code doesn't compile on mac and the new API with T3i support and I didn't have time to make it work, preferred to focus on ML
>
> >>>>> 3) from what I understand from the EOS-movrec documentation, the firmware doesn't send full-HD (hence my question)
>
> >>>>> But, I'll try it when I'm at 4) and report.
>
> >>>>> Vincent
>
> >>>>> On 2011-06-03, at 2:53 PM, Alex wrote:
>
> >>>>>> Try EOS-movrec and see for yourself.
>
> >>>>>> On Fri, Jun 3, 2011 at 8:52 PM, Vincent Olivier <vinc...@nbourbaki.com> wrote:
> >>>>>> Thanks Anthony.
>
> >>>>>> What about PTP/USB? Is it also possible to have a full 1080p/30fps stream through USB too? Doesn't seem to come out of the box with the EOS API.
>
> >>>>>> Vincent
>
> >>>>>> On 2011-06-03, at 2:41 PM, Antony Newman wrote:
>
> >>>>>>> "4) Full-HD HDMI output with audio (if it is even possible?)."
>
> >>>>>>> There is a callable (ie call("xxxx") ) subroutine in 5D2 / 2.0.4 that switches Audio on over HDMI (that's what it says on the tin - but I have never tried it).
>
> >>>>>>> No IDC with me or I'd tell you the 'xxxx'
>
> >>>>>>> AJ
>
> >>>>>>> --
> >>>>>>>http://magiclantern.wikia.com/
>
> >>>>>>> To post to this group, send email to ml-d...@googlegroups.com
> >>>>>>> To unsubscribe from this group, send email to ml-devel+u...@googlegroups.com
> >>>>>>> For more options, visit this group athttp://groups.google.com/group/ml-devel?hl=en
>
> >>>>>> --
> >>>>>>http://magiclantern.wikia.com/
>
> >>>>>> To post to this group, send email to ml-d...@googlegroups.com
> >>>>>> To unsubscribe from this group, send email to ml-devel+u...@googlegroups.com
> >>>>>> For more options, visit this group athttp://groups.google.com/group/ml-devel?hl=en
>
> >>>>>> --
> >>>>>>http://magiclantern.wikia.com/
>
> >>>>>> To post to this group, send email to ml-d...@googlegroups.com
> >>>>>> To unsubscribe from this group, send email to ml-devel+u...@googlegroups.com
> >>>>>> For more options, visit this group athttp://groups.google.com/group/ml-devel?hl=en
>
> >>>>> --
> >>>>>http://magiclantern.wikia.com/
>
> >>>>> To post to this group, send email to ml-d...@googlegroups.com
> >>>>> To unsubscribe from this group, send email to ml-devel+u...@googlegroups.com
> >>>>> For more options, visit this group athttp://groups.google.com/group/ml-devel?hl=en
>
> >>>> --
> >>>>http://magiclantern.wikia.com/
>
> >>>> To post to this group, send email to ml-d...@googlegroups.com
> >>>> To unsubscribe from this group, send email to ml-devel+u...@googlegroups.com
> >>>> For more options, visit this group athttp://groups.google.com/group/ml-devel?hl=en
>
> >>>> --
> >>>>http://magiclantern.wikia.com/
>
> >>>> To post to this group, send email to ml-d...@googlegroups.com
> >>>> To unsubscribe from this group, send email to ml-devel+u...@googlegroups.com
> >>>> For more options, visit this group athttp://groups.google.com/group/ml-devel?hl=en
>
> >>> --
> >>>http://magiclantern.wikia.com/
>
> >>> To post to this group, send email to ml-d...@googlegroups.com
> >>> To unsubscribe from this group, send email to ml-devel+u...@googlegroups.com
> >>> For more options, visit this group athttp://groups.google.com/group/ml-devel?hl=en
>
> >> --
> >>http://magiclantern.wikia.com/
>
> >> To post to this group, send email to ml-d...@googlegroups.com
> >> To unsubscribe from this group, send email to ml-devel+u...@googlegroups.com
> >> For more options, visit this group athttp://groups.google.com/group/ml-devel?hl=en

Vincent Olivier

unread,
Jun 20, 2011, 9:37:04 PM6/20/11
to ml-d...@googlegroups.com
Hi Indy,

Thanks for your reply. I've been looking to see if tasks got loaded that I didn't know of and so far, I couldn't find any that I could comment out without compromising the basic button handling functionality.

If I could do a chronologic read of the code (as it gets loaded and executed) with someone on Skype or something, I'm pretty sure we could figure out what's causing the freeze.

In the meantime, I'll keep on keeping on. ;-)

Vincent

PS : to those that want to see the ML T3i port happen ASAP, just get Indy a T3i/600D unit and you'll see workable betas of the firmware released much faster than with just me trying this thing out (I'm the only one with a T3i/600D and I'm new to this). Plus, Indy (and the other ML veteran developers) clearly deserve it.

Vincent Olivier

unread,
Jun 21, 2011, 2:17:41 PM6/21/11
to ml-d...@googlegroups.com
Hi all,

So, still referring to my bitbucket branch, I refactored the boot-hack.my_task_dispatch_hook for simplicity and, so really, if I'm guessing right, it's a replacement at boot-hack.c:180 that is causing the problem. When this line is commented out, the camera won't freeze. Have the task mappings been done for 600D specifically? How can I debug at this point? Can I write a log file on the card?

Best regards,


Vincent

arm.indy

unread,
Jun 21, 2011, 2:51:37 PM6/21/11
to Magic Lantern firmware development
you can activate the debug task (in debug.c) and call dumpf() from
here.
then activate gui.c and button interception.
600d queue handling is identical to 60d. but button codes may differ.

what you mean by 'task mapping' ?

Indy

Brian Berneker

unread,
Jun 22, 2011, 9:36:14 AM6/22/11
to Magic Lantern firmware development
If I had the disposable income I would for sure, but unfortunately I
don't. If there's any way I can otherwise help using my own T3i,
(i.e. memory dump etc.) I'd be happy to do what I can.

Brian

Ivo Silva

unread,
Jun 22, 2011, 10:21:56 AM6/22/11
to Magic Lantern firmware development
This is my first contribution to this topic.

I can't afford to buy a new 600D, but I would happily donate if
someone sets up a paypal account.

Is there anything else I can do?
> > >>>> For more options, visit this group...
>
> read more »

Vincent Olivier

unread,
Jun 23, 2011, 11:45:15 AM6/23/11
to ml-d...@googlegroups.com
Hi Indy,

By mapping I mean whatever is referred to in boot-hack.my_task_dispatch_hook by the "mapping" variable.

It seems the debug.c code has dependencies over pretty much everything else in ML. And what I got from the initial ML branch doesn't compile.

But is that what I need to do in order to get tracing in the log file? Because I can call dumpf and now that I do, I see there is a log file created on the SD card. However, none of the "DebugMsg" calls get logged. The only line with the "MAGIC" prefix is " 65: 831.409 [MAGIC] SetPtpTransportResources:0,3218". How do I get "DebugMsg" to work without including the whole ML code in the Makefile?

Regards,

Vincent

arm.indy

unread,
Jun 23, 2011, 11:58:03 AM6/23/11
to Magic Lantern firmware development
See box dm_set_store_level(), and call dumpf(). In debug.c code.

Vincent Olivier

unread,
Jun 23, 2011, 2:22:17 PM6/23/11
to ml-d...@googlegroups.com
Thanks!!!

So now, I can properly explain what is going on (see my branch for code).

So, on boot-hack.c:180, I added this line : 

DebugMsg(DM_MAGIC, 3,  "Replacing task %s (from %x to %x).", task->name, (unsigned) task->entry, (unsigned) mapping->replacement);

Just before the line that, if uncommented crashes the camera on boot-hack.c:182:

task->entry = mapping->replacement;

The DebugMsg call appears in the log as :

62:   863.794 [MAGIC] Replacing task GuiMainTask (from ff02156c to 84364).

So obviously, it doesn't appreciate that I try to activate the button handling code. How should I go on about trying to solve that riddle?

Vincent

Alex

unread,
Jun 23, 2011, 2:37:34 PM6/23/11
to ml-d...@googlegroups.com
Be careful: gui_main_task starts very early, so you may not be able to
use DebugMsg / bmp_printf from the beginning.

First try with a simple copy of gui_main_task from the assembler
(without handle_buttons or debugging info). This one should work (i.e.
camera should operate normally with your gui_main_task).

Alex

unread,
Jun 23, 2011, 2:39:04 PM6/23/11
to ml-d...@googlegroups.com
Edit: just looked at your code: you have to return 1 from handle_buttons.

Vincent Olivier

unread,
Jun 23, 2011, 2:44:58 PM6/23/11
to ml-d...@googlegroups.com
AHAHAH! YES!!!! You rock! It works.

I get the button feedback on the screen. Will put in the log and send here today.

Vincent

Alex

unread,
Jun 23, 2011, 2:48:50 PM6/23/11
to ml-d...@googlegroups.com
... or a video with the menu working ;)

Vincent Olivier

unread,
Jun 23, 2011, 2:51:17 PM6/23/11
to ml-d...@googlegroups.com
Or that too, yes… But that will have to wait this weekend! ;-)

Vincent

arm.indy

unread,
Jun 23, 2011, 3:11:34 PM6/23/11
to Magic Lantern firmware development
Great Vincent!

maybe we can write a 'ML porting' wiki page.

On 23 juin, 20:51, Vincent Olivier <vinc...@nbourbaki.com> wrote:
> Or that too, yes… But that will have to wait this weekend! ;-)
>
> Vincent
>
> On 2011-06-23, at 2:48 PM, Alex wrote:
>
>
>
>
>
>
>
> > ... or a video with the menu working ;)
>
> > On Thu, Jun 23, 2011 at 9:44 PM, Vincent Olivier <vinc...@nbourbaki.com> wrote:
> >> AHAHAH! YES!!!! You rock! It works.
>
> >> I get the button feedback on the screen. Will put in the log and send here today.
>
> >> Vincent
>
> >> On 2011-06-23, at 2:39 PM, Alex wrote:
>
> >>> Edit: just looked at your code: you have to return 1 from handle_buttons.
>
> >>> On Thu, Jun 23, 2011 at 9:37 PM, Alex <broscutama...@gmail.com> wrote:
> >>>> Be careful: gui_main_task starts very early, so you may not be able to
> >>>> use DebugMsg / bmp_printf from the beginning.
>
> >>>> First try with a simple copy of gui_main_task from the assembler
> >>>> (without handle_buttons or debugging info). This one should work (i.e.
> >>>> camera should operate normally with your gui_main_task).
>
> >>> For more options, visit this group athttp://groups.google.com/group/ml-devel?hl=en
>
> >> --
> >>http://magiclantern.wikia.com/
>
> >> To post to this group, send email to ml-d...@googlegroups.com
> >> To unsubscribe from this group, send email to ml-devel+u...@googlegroups.com
> >> For more options, visit this group athttp://groups.google.com/group/ml-devel?hl=en

Vincent Olivier

unread,
Jun 23, 2011, 3:28:21 PM6/23/11
to ml-d...@googlegroups.com
Hi guys, for now, this is where I'm at : http://twitter.com/#!/Vincent_Olivier/status/83978969577291776

Then, in order of priority, to me : 

- Finalize button mapping
- Activate menu and as much code from 7D as possible
- REFACTOR, CLEAN AND COMMENT CODE FOR DOXYGEN AND FUTURE CONTRIBUTORS (I will have more question as I do that)
- Post link to doxygen generated docs in wiki
- Work on movie autorestart or continuous recording
- Work on simultaneous full HD HDMI output (with audio), viewfinder monitoring and movie recording
- Work on continuous face-detection autofocus while movie recording
- Work on PTP remote control (or even better, extended control over HDMI)

Will be back soon with more.

Thanks a lot again to those who helped.

Vincent

arm.indy

unread,
Jun 23, 2011, 4:16:06 PM6/23/11
to Magic Lantern firmware development
7D ?
60D is the closest camera from DryOS point of view.
use 60D branch from Alex...

Vincent Olivier

unread,
Jun 23, 2011, 5:03:25 PM6/23/11
to ml-d...@googlegroups.com
My bad. Yes, I meant 60D. :D

Vincent

Alex

unread,
Jun 24, 2011, 5:30:30 AM6/24/11
to ml-d...@googlegroups.com
> - REFACTOR, CLEAN AND COMMENT CODE FOR DOXYGEN AND FUTURE CONTRIBUTORS (I
> will have more question as I do that)

Great! You can start from these pages (I assume you have already read them):

http://magiclantern.wikia.com/wiki/550d_dev (all the links starting from there)
http://magiclantern.wikia.com/wiki/2.0.4_AJ (the same)
http://magiclantern.wikia.com/wiki/Extending_Magic_Lantern (I've just
added some ideas about file I/O)
http://magiclantern.wikia.com/wiki/DevFAQ
http://magiclantern.wikia.com/wiki/Magic_Lantern_API

And the main page for this, which I'd like to be a starting point for
all development info:
http://magiclantern.wikia.com/wiki/For_Developers

Vincent Olivier

unread,
Jun 26, 2011, 1:12:56 AM6/26/11
to ml-d...@googlegroups.com
I'm pretty much done with the menu handling. If someone wants to check, it's been pushed to my branch.

A couple of notes, though (any clues or further comments on those would be much appreciated) : 

  • The Q button has no ALT or "unpress" event, unlike the 60D
  • The LEFT/RIGHT buttons have different code when in "Q" mode menu (compared to idle state), I didn't check the "Q" mode values yet
  • There are a couple of unknown button events that are fired for unknown reasons (some in the init phase)
  • The half-shutter (both pressed and unpressed) button codes are shared with zoom out button
  • The ISO button cannot be stopped with a 0 return value
  • I will need more time to understand what is going on with the 0x4a, 0x4b, 0x4e button code values that are fired around the full-shutter event
  • The Av button and all the dials do not seem to fire the button event

That's it for tonight.

Will probably have time to activate the menus in the next couple of days.

Vincent

Alex

unread,
Jun 26, 2011, 3:55:53 PM6/26/11
to ml-d...@googlegroups.com
Nice progress :)

> If someone wants to check, it's been pushed to my branch.

hg clone https://bitbucket.org/up4/magic-lantern-for-600d-t3i

> The Q button has no ALT or "unpress" event, unlike the 60D

Same on 550D/60D. In certain dialogs, it sends a different code (that's ALT).

> The LEFT/RIGHT buttons have different code when in "Q" mode menu

ML doesn't need to check these buttons in Q mode anyway. This mode is
called UNAVI in the firmware, btw.

> There are a couple of unknown button events that are fired for unknown
> reasons (some in the init phase)

Not all GUI events are buttons.

> The half-shutter (both pressed and unpressed) button codes are shared with
> zoom out button

Same on other cameras. They are metering events which happen when you
press those buttons; shutter button is not handled by GUI main task;
they are probably handled in MainCtrl.
http://code.google.com/p/400plus/source/browse/trunk/mainctrl.c

> The Av button and all the dials do not seem to fire the button event

Same on all other cameras.

> That's it for tonight.
> Will probably have time to activate the menus in the next couple of days.
> Vincent
>

Vincent Olivier

unread,
Jun 27, 2011, 1:47:46 PM6/27/11
to ml-d...@googlegroups.com
So I tried to include as much code as possible from the 60D branch in the Makefile, but had to comment out some of it because of undefined symbols :

  • in audio.c : hold_your_horses
  • in zebra.c : YUV422_LV_BUFFER_2, YUV422_LV_BUFFER_3, GUI_CONTROL, redraw_maybe, calc_ov_loc_size
  • in debug.c : BGMT_PRESS_ZOOMIN_MAYBE, BGMT_PRESS_ZOOMOUT_MAYBE (couldn't reverse engineer the button codes for those)
  • in shoot.c : draw_circle, draw_line

Any clues on those? Which brings the question: on the top of your head, are there any other constants I have to reverse engineer in consts-600d.101.h and stubs-600d.101.S to make this safer and more likely to run and not destroy innocent T3i units?

Finally, I want to progressively reincorporate the gui.c code for button handling that calls the menus, etc (refactoring and prettifying understandable code as I go). For instance, I see a lot of "gui_hide_menu" but no "gui_show_menu"… Can someone walk me through the arcane knowledge of ML menu display?

Regards,

Vincent

arm.indy

unread,
Jun 27, 2011, 2:57:36 PM6/27/11
to Magic Lantern firmware development
cut and paste code from
https://bitbucket.org/arm_indy/magic-lantern-for-600d-t3i/src/b773df86bb3a/bootflags.c

int i;
unsigned int *bmp_ram_addr = bmp_vram_info;
for (i=0; i<2; i++)
DebugMsg( DM_MAGIC, 3, "bmp_vram[]=0x%08x, 0x%08x, 0x%08x",
bmp_ram_addr[3*i+0], bmp_ram_addr[3*i+1], bmp_ram_addr[3*i+2] );
unsigned int *vram_info_addr = vram_info;
for (i=0; i<3; i++)
DebugMsg( DM_MAGIC, 3, "vram_info[]=0x%08x, w=%4d, h=%4d, p=
%4d, n=%4d",
vram_info_addr[5*i+0], vram_info_addr[5*i+1],
vram_info_addr[5*i+2], vram_info_addr[5*i+3], vram_info_addr[5*i+4] );
unsigned int *stateobj_disp = 0x23DC+0xb0; // see
FF062CEC SetBitmapVramAddress
// unsigned int *stateobj_disp = 0x23D8+0x90; // see
FF05DAF8 SetBitmapVramAddress
DebugMsg( DM_MAGIC, 3, "stateobj_disp+0xb0[]=0x%08x,0x%08x,0x
%08x,", stateobj_disp[0], stateobj_disp[1], stateobj_disp[2]);

bmp_printf(FONT_LARGE, 0, 150, "Writing boot log");
dumpf();

it should display some vram values into dumpf log

Indy (600d out of stock...)

Vincent Olivier

unread,
Jun 27, 2011, 4:15:26 PM6/27/11
to ml-d...@googlegroups.com
Can I put it somewhere else than there? Because I can't compile magiclantern.fir (build_fir.py)… If so, where?

Can I also get a little idea on what this is doing? Please? If the 600D is currently out of stock worldwide, then I don't want to break mine! ;-)

Vincent

arm.indy

unread,
Jun 27, 2011, 5:14:31 PM6/27/11
to Magic Lantern firmware development
autoexec.bin (at 0x800000) is 99% the same thing than magiclantern.fir
(at 0x800120)
see http://magiclantern.wikia.com/wiki/Autoexec

you do not need build_fir.py for autoexec.bin, usable on a bootable
card.

600d is out of stock locally, not world wide.

On Jun 27, 10:15 pm, Vincent Olivier <vinc...@nbourbaki.com> wrote:
> Can I put it somewhere else than there? Because I can't compile magiclantern.fir (build_fir.py)… If so, where?
>
> Can I also get a little idea on what this is doing? Please? If the 600D is currently out of stock worldwide, then I don't want to break mine! ;-)
>
> Vincent
>
> On 2011-06-27, at 2:57 PM, arm.indy wrote:
>
>
>
>
>
>
>
> > cut and paste code from
> >https://bitbucket.org/arm_indy/magic-lantern-for-600d-t3i/src/b773df8...

Vincent Olivier

unread,
Jun 27, 2011, 5:20:02 PM6/27/11
to ml-d...@googlegroups.com
On 2011-06-27, at 5:14 PM, arm.indy wrote:

autoexec.bin (at 0x800000) is 99% the same thing than magiclantern.fir
(at 0x800120)
see http://magiclantern.wikia.com/wiki/Autoexec

OK.


you do not need build_fir.py for autoexec.bin, usable on a bootable
card.


I know, otherwise I wouldn't have been able to do much, would I? ;-)


600d is out of stock locally, not world wide.

aha, well it's been unavailable around here (Canada/USA) for a while as well (actually I don't know where you are) : http://www.bhphotovideo.com/bnh/controller/home?O=WishList.jsp&A=details&Q=&sku=753760&is=REG

What about telling me in plaintalk what this snippet of code actually does, too?

Thanks!

Vincent

Vincent Olivier

unread,
Jun 27, 2011, 7:45:03 PM6/27/11
to ml-d...@googlegroups.com
Anyways, didn't know where to put it or what it does so, I just tried somewhere in boot-hack.c:my_init_task (code just pushed in my branch). It gave me this


    4:    10.716 [MAGIC] bmp_vram[0]=0x00000000, 0x00000000, 0x00000000
    5:    10.735 [MAGIC] bmp_vram[1]=0x00000000, 0x00000000, 0x00000000
    6:    10.758 [MAGIC] vram_info[0]=0x00000000, w=   0, h=   0, p=   0, n=   0
    7:    10.779 [MAGIC] vram_info[1]=0x00000000, w=   0, h=   0, p=   0, n=   0
    8:    10.800 [MAGIC] vram_info[2]=0x00000000, w=   0, h=   0, p=   0, n=   0
    9:    10.819 [MAGIC] stateobj_disp+0xb0={0x00000000,0x00000000,0x00000000}


Pretty sure that's useless… Waiting for more info…

Vincent




arm.indy

unread,
Jun 28, 2011, 3:34:38 PM6/28/11
to Magic Lantern firmware development
hi Vincent,

it is too early in boot-hack.c, GUI is not initialized.
I put it in debug.c in my 550d and output was

1fc1f 2109: 9760.005 [MAGIC] bmp_vram[]=0xc0f140d0, 0x00000000,
0x02087100
1fc68 2110: 9760.045 [MAGIC] bmp_vram[]=0xc0f140d4, 0x00000000,
0x02087100
1fcb1 2111: 9760.082 [MAGIC] vram_info[]=0x40d07800, w= 720, h=
720, p= 480, n= 2
1fd03 2112: 9760.116 [MAGIC] vram_info[]=0x4c233800, w= 720, h=
720, p= 480, n= 0
1fd55 2113: 9760.149 [MAGIC] vram_info[]=0x4f11d800, w= 720, h=
720, p= 480, n= 0
1fda7 2114: 9760.194 [MAGIC] stateobj_disp
+0xb0[]=0x42080008,0x40d07800,0x40958c3c,


On Jun 28, 1:45 am, Vincent Olivier <vinc...@nbourbaki.com> wrote:
> Anyways, didn't know where to put it or what it does so, I just tried somewhere in boot-hack.c:my_init_task (code just pushed in my branch). It gave me this
>
>       4:    10.716 [MAGIC] bmp_vram[0]=0x00000000, 0x00000000, 0x00000000
>       5:    10.735 [MAGIC] bmp_vram[1]=0x00000000, 0x00000000, 0x00000000
>       6:    10.758 [MAGIC] vram_info[0]=0x00000000, w=   0, h=   0, p=   0, n=   0
>       7:    10.779 [MAGIC] vram_info[1]=0x00000000, w=   0, h=   0, p=   0, n=   0
>       8:    10.800 [MAGIC] vram_info[2]=0x00000000, w=   0, h=   0, p=   0, n=   0
>       9:    10.819 [MAGIC] stateobj_disp+0xb0={0x00000000,0x00000000,0x00000000}
>
> Pretty sure that's useless… Waiting for more info…
>
> Vincent
>
> On 2011-06-27, at 5:20 PM, Vincent Olivier wrote:
>
>
>
>
>
>
>
>
>
> > On 2011-06-27, at 5:14 PM, arm.indy wrote:
>
> >> autoexec.bin (at 0x800000) is 99% the same thing than magiclantern.fir
> >> (at 0x800120)
> >> seehttp://magiclantern.wikia.com/wiki/Autoexec
>
> > OK.
>
> >> you do not need build_fir.py for autoexec.bin, usable on a bootable
> >> card.
>
> > I know, otherwise I wouldn't have been able to do much, would I? ;-)
>
> >> 600d is out of stock locally, not world wide.
>
> > aha, well it's been unavailable around here (Canada/USA) for a while as well (actually I don't know where you are) :http://www.bhphotovideo.com/bnh/controller/home?O=WishList.jsp&A=deta...

Vincent Olivier

unread,
Jun 29, 2011, 12:36:05 PM6/29/11
to ml-d...@googlegroups.com
Put it in gui.c (because I'm not familiar enough with debug.c). This is what I got : 

  629: 28499.078 [MAGIC] bmp_vram[0]=0xc0f140d0, 0x00000000, 0x02087100
  630: 28499.124 [MAGIC] bmp_vram[1]=0xc0f140d4, 0x00000000, 0x02087100
  631: 28499.161 [MAGIC] vram_info[0]=0x40d07800, w= 720, h= 720, p= 480, n=   1
  632: 28499.198 [MAGIC] vram_info[1]=0x4c233800, w= 720, h= 720, p= 480, n=   0
  633: 28499.233 [MAGIC] vram_info[2]=0x4f11d800, w= 720, h= 720, p= 480, n=   0
  634: 28499.279 [MAGIC] stateobj_disp+0xb0={0x42080008,0x4c233800,0x40a82a14}

I would really like to understand this better. Will read everything I find on VRAM on the wiki. Might volunteer to write the 600D version. Pointers appreciated (like, what do I do with that?).

Regards,

Vincent

Alex

unread,
Jun 29, 2011, 12:44:59 PM6/29/11
to ml-d...@googlegroups.com
LV VRAM (used for zebras, false color, histograms and most other
things) is in the same place as on 550D, and is triple-buffered.

Now, YUV422_LV_BUFFER_DMA_ADDR is a pointer to one of those addresses
(probably the one into which the DIGIC is currently writing an image).
You can find this with mem-spy (after enabling the menu).

For most things, you don't need to take care of triple-buffering; you
can use only one bank. For magic zoom, which actually writes in this
VRAM, timing is critical; ML has to write the magic zoom window after
the DIGIC filled a buffer, but before the liveview task reads that
buffer in order to display it on LCD.

P.S. Take a look at this changeset (we are still working on it, but I
hope it will make the porting process much easier).
https://bitbucket.org/hudson/magic-lantern/changeset/f474d27676af

arm.indy

unread,
Jun 29, 2011, 2:15:54 PM6/29/11
to Magic Lantern firmware development
the idea is to ease ML porting to a new model by writing code that
find values for consts.model.fw.h

Vincent Olivier

unread,
Jun 29, 2011, 5:03:31 PM6/29/11
to ml-d...@googlegroups.com
Wow! OK, well, guys, how do I jump in for the 600D?

Because, now :

  • It's not clear to me what I should do with with the VRAM tracing output. I read from the wiki on that, there seems to be some processing of the tracing data needed somehow. How do I go about doing this?
  • And I'm trying to activate the menu by handling the trash button, and looking at the code previously in gui.c. The code below does nothing:

            case BGMT_TRASH :
                // Displays ML menu, except when in "play mode
                if(gui_state != GUISTATE_PLAYMENU) {
                    // Toggle menu on/off
                    if(gui_menu_shown()) gui_stop_menu();
                    else give_semaphore(gui_sem);
                    output = 0;
                }
                break;

I just want to activate menu on/off for now. Code in branch already. Thanks for the help.

Vincent

Alex

unread,
Jun 30, 2011, 9:04:13 AM6/30/11
to ml-d...@googlegroups.com
Try to get in sync with the "unified" branch. I've brought it to a
point where all modules will compile; tasks and PROP_HANDLER's with
possible side effects were disabled (i.e. debug, audio, zebra, shoot,
bitrate, tweaks and movtweaks).

https://bitbucket.org/hudson/magic-lantern/src/tip

To compile only the 600D branch, use:

make 600D

If any 600D user wants to test my autoexec.bin, please let me know. In
theory, it should display the startup logo and open the menu when you
press the delete button.

Vincent Olivier

unread,
Jun 30, 2011, 12:15:14 PM6/30/11
to ml-d...@googlegroups.com
I'm forking that code now. It looks much better. Congrats, guys, seriously. Almost got an erection. Will periodically merge the changes from there to my branch. Will leave my old branch for legacy referencing. Might delete it later.

Will compile, run and report.

Vincent

Alex

unread,
Jun 30, 2011, 12:16:24 PM6/30/11
to ml-d...@googlegroups.com
I already have a movie with menu almost working... from a brave tester :)

Vincent Olivier

unread,
Jun 30, 2011, 12:17:37 PM6/30/11
to ml-d...@googlegroups.com
Good!
It is loading more messages.
0 new messages