Thursday, June 24, 2010

Magic Lantern is the open source firmware Hack for the Canon 5dMK2 initiated by Trammell Hudson that offers a lot of cool features to the cam, like crop marks, waveform, Zebra, live sound levels e.t.c. Yesterday was it' s one year anniversary.

From ML Developer Forum:

It's been one year since the first public release of Magic Lantern 0.1.3
and I wanted to take some time to sum up what we've done during that year
and where we are now.

First, some stats in increasing order:

- #1 search result for 'magic lantern' on google
- Users on six continents (any users in the Antarctic?)
- Seven firmware updates from Canon (1.0.7, 1.0.9, 1.1.0, 1.2.4,
2.0.3, 2.0.4 and now 2.0.7)
- 175 subscribers on the ml-devel list
- 542 commits to the mercurial tree on
- 809 messages on the ml-devel list
- 14,000 downloads from bitbucket, ~5,000 from other sites
- 19,600 search results for '"magic lantern" firmware'
- 55,166 lines of code in the tree
- Infinite reboots of my 5D

A year ago the brand new 5D Mark II was already recognized as having
an enormous amount of potential for independent film making, but
with some significant problems related to manual exposure control
and audio issues. The early adopters of the camera were very vocal
about the need to fix these problems and developed a range of
workarounds while waiting on Canon to at least acknowledge that
these problems required solutions.

I bought my 5D to upgrade from my older 20D with only some minor
interest in the film mode. On a lark I signed with a team for the
48 Hour Film Project in DC and we made a short with the lenses only
halfway attached to the camera to fix the aperture and with dual
system audio since there was no gain control. The experience of
working with the camera on a real film production changed my plans
and I spent the next month reading everything in the CHDK tree to
try to understand how to go about understanding the 5D.

The first time I booted the firmware dumping utility I was very
apprehensive and worried that my $3,000 camera was about to become a
very expensive brick. Later, my first modified firmware gave me the
same apprehension. Some countably infinite number of reboots later,
I don't even think twice about loading my own builds. The camera
has proven to be much more resilient than I had initially feared.

The outpouring of encouragement and support from the cinema5d and
dvinfo communities was amazing. Every little hint of progress and
steps towards better understanding of the camera generated a flurry
of posts. It was clear that there was a vital need for these minor
tweaks to the software and it motivated me to spend all my free time
improving the software.

Eventually Canon realized that the most important Magic Lantern
features really were significant to selling the 5D to independent
film makers and they added 24p, manual audio controls and audio
meters. In my opinion, our meters and controls are still better
since they are always onscreen and we have headphone monitoring,
but the fact that Canon turned their engineering around to produce
the new 2.0.3 firmware for the 5D indicates that they recognized
the demand.

Unfortunately, on the 7D Canon has cranked the security settings to
"maximum", but luckily they made some significant cryptography
mistakes and we able to make sense of the 7D updates. Thanks to the
efforts of arm.indy, we fully understand the signature scheme and
can sign our own firmware images. With the latest update for the
7D, however, Canon has effectively stopped my development with what
appears to be a firmware update counter: my camera no longer accepts
the signatures, even in Canon's official firmware files.

Additionally, the new 550D appears to have switched to a different
set of AES keys, fixing the major mistake they made with the 7D.
There is still a possibility of getting in via the serial console
inside of the case, but this will require disassembling the camera
to find it.

There are some new developments on other cameras -- Vitaliy's work
on the GH1 is very promising and perhaps will become yet another
open source camera platform. The CHDK project is continuing and may
eventually add DSLR support.

The next and likely final steps for Magic Lantern is support for the
5D firmware 2.0.7. Probably in a ML-lite mode as requested by many
users, with just the most useful audio features (full time meters,
zero-gain and headphone monitoring), and without the specialty ones
that are harder to forward port without another round of reverse
engineering. Unfortunately I no longer have the time to hack as
many hours per day on the project as I used to and without some
major breakthroughs or contributions from other developers most of
the requested features will continue to collect dust in the request

Other likely milestones that will make it into the final release:

- PTP USB control. Mostly in place; needs updating to 2.0.7
and shouldn't be too hard to extend to devices like the

- "Clear screen" for HDMI recording. In place and functional.

Some less likely milestone:

- Auto-restart at 4 GB. It works in theory, but there is still
a few second gap. Even worse, the size of the gap depends on the
card used.

- Third party battery support. Just use the AC adapter instead.

Some of the ones that are looking very unlikely:

- 7D, 550D support. Maybe someone can make some progress on hacking
them with the info that we have so far; I'm shut out from my 7D
for now and the 550D clearly has stepped up the protection.

- 1080i HDMI while recording. Without any docs this won't make
any further progress. The artifacts make it unusable as is.

- Windowed sensor reads: No docs == no reads.

- 720p, 60p, 100 Mbs, genlock, etc: No documentation on DIGIC at all
means that we can't make useful progress on them.

- Timecode sync. It works as a proof-of-concept, but the clocks
drift fairly quickly. A USB sync solution would be better and
far less work overall.

It has been a great year and I have had lots of fun on the project.
The sponsors listed on the wiki have been very helpful and I
encourage everyone to check out their products. Additionally, the
beta-test team of Jon Fairhurst and Chris Barcellos were both very
brave in trying the early releases.

The source code is out there and available under the GPL to anyone
who wants to keep hacking on new features, such as the embedded Lua
interpreter, or trying to reverse engineer more of the camera.
There is still much potential in what can be done!


Posted by
Categories: Labels: