Author Topic: [UNMAINTAINED] Canon 40D  (Read 225959 times)

Hibercoco

  • Just arrived
  • *
  • Posts: 1
Re: [UNMAINTAINED] Canon 40D
« Reply #375 on: March 27, 2016, 04:10:06 AM »
Please, Post here all the news with the 40d, there is a lot of people wanting to record video on the great 40D and you´re our last hope, we appreciate all of your work. Thanks.

naegelejd

  • Just arrived
  • *
  • Posts: 1
Re: [UNMAINTAINED] Canon 40D
« Reply #376 on: April 08, 2016, 05:00:15 PM »
Hi everyone, I just discovered Magic Lantern for the first time and I'm interested in getting involved. I have a 40D and I'm a software engineer by profession. I'm not sure exactly where to start, i.e. what's the status on 40D support, what needs to be done, etc? I can download the code and build it but I don't want to brick my camera right off the bat. If anyone can point me in the right direction it'd be great!

nikfreak

  • Developer
  • Hero Member
  • *****
  • Posts: 946
Re: [UNMAINTAINED] Canon 40D
« Reply #377 on: April 09, 2016, 02:01:40 PM »
Source to use:
https://bitbucket.org/hudson/magic-lantern/src/7d67bc6f378a8e7f607369a374f617491f32d2c5/platform/unmaintained/40D.111/stubs.S?at=unified&fileviewer=file-view-default

Check also "Qeen Mum's" thread:
http://www.magiclantern.fm/forum/index.php?topic=1010.0

eduperez has also 400plus running which is not ML but they share some stuff:
https://github.com/400plus/400plus

  • Preferrably you would fork the unified branch from ML on bitbucket
  • Move the initial linked 40D platform out of unmaintained
  • Strip down code or uncomment stuff which produces compile errors while first trying to #define CONFIG_HELLO_WORLD
  • regarding your brick question: comment out #define CONFIG_PROP_REQUEST_CHANGE from internals.h and you are good to go
  • You would need the 40D.111 firmware dump (anyone?) to find stubs and consts. Remember: dumps have to be kept private. No public posting.
  • You would need a way to enable bootloader (is there any installer (ML-SETUP.FIR) available already?)
  • for state objects check: http://a1ex.bitbucket.org/ML/states/index.html
  • Prepare yourself for endless hours of work  and try to catch a1ex on IRC if you need help with the bootloader :P
70D.112 & 100D.101

wigyori

  • Just arrived
  • *
  • Posts: 2
Re: [UNMAINTAINED] Canon 40D
« Reply #378 on: May 24, 2016, 05:28:40 PM »
Hi all,

Do you accept pull requests for unmaintained (f.e. this very 40D) platforms? Instead of someone hacking on his/her own and later possibly dropping the whole thing for losing interest, or for not able to finish it, without telling anyone how far he/she got, it could make sense.

Thanks,
-w-

AOK

  • New to the forum
  • *
  • Posts: 17
Re: [UNMAINTAINED] Canon 40D
« Reply #379 on: September 16, 2016, 08:06:44 PM »
Now and then someone is posting something here. Now we have a some source files at our disposal, but how to run them on the Canon 40D?

Please could anyone explain.

Thank you in advance who ever you might be.

vnd

  • Just arrived
  • *
  • Posts: 1
Re: [UNMAINTAINED] Canon 40D
« Reply #380 on: September 25, 2016, 07:58:34 PM »
Hi,

I checked out changeset 8159 (the last one with 40d changes) and compiled it with arm toolchain 4.6.2. It went without problems, I did not try any newer version)

Then I took the 5D installer from installer/5DC.111, replaced the addresses of LEDs and write_bootflag/read_bootflag functions with the ones found on the first page of this thread, compiled and created installer firmware with dissect_fw3 and assemble_fw tools. There is no known address for write_card_bootflag so I formatted the card manually.

Then It successfully enabled the bootflag and the camera is able to boot the built magic lantern, which works good enough to show menu. Then I dumped the fw and run ARM-console on it. Too bad that I don't understand the ARM assembler much.

I wanted the fps override function for night focusing, but I could not find anything like shadow registers, so I ended with a hack that writes hardcoded value to fps register from ISO prop handler each time when iso is set to 1600.

Also I noticed that the camera is rather unstable and crashes after several shots. I disabled everything except boot code and finally found that it gets fixed by calling cache_unlock() from ml_hijack_create_task_cmd_shell() in  platform/40D.111/init.c.

Then I just re-enabled the ISO prop hack.

The camera now provides all the functionality that I need and is quite stable, so I don't plan to work on it further,


a1ex

  • Administrator
  • Hero Member
  • *****
  • Posts: 9933
  • 5D Mark Free
Re: [UNMAINTAINED] Canon 40D
« Reply #381 on: September 25, 2016, 10:53:27 PM »
Sounds good!

Do you mind sending me a copy of your ROM, for trying it in QEMU? The one I have is incomplete.

AOK

  • New to the forum
  • *
  • Posts: 17
Re: [UNMAINTAINED] Canon 40D
« Reply #382 on: September 27, 2016, 04:13:19 PM »
It would be lovely if a usable version could be made before I buy the 5D M4.

If I can make use of the huge ML features 
- Auto ETTR and
- RAW histogram
- dual ISO (if possible).

That would make quite an awesome old camera.

rufustfirefly

  • New to the forum
  • *
  • Posts: 30
Re: [UNMAINTAINED] Canon 40D
« Reply #383 on: October 01, 2016, 04:57:23 PM »
I've been plugging away at trying to replicate vnd's success with a modern version of ML -- which has been complicated by most of the VxWorks code being relatively unmaintained (from what I can see).

I'm most of the way through getting it to compile, although there are some deficiencies I've been trying to hack around. If anyone's interested in jumping in:

https://bitbucket.org/rufustfirefly/magic-lantern

(I'd be more than happy to either accept pull requests or grant full access to the repository, if anyone else wants to work on it.)
EOS 5Dmk3 | EOS 40D
EF 70-200mm f/2.8 IS II ; 50mm f/1.4 ; 24-104mm kit lens ; 135mm f/2.8 SF | FD 28mm f/2.0 ; 55mm f/1.2 ; 300mm f/4 | Nikkor 55mm f/1.2 | Other : Rokinon Cine 14mm, 24mm, 35mm, 85mm ; Juplen M42 135mm f/2.8 ; ... etc ...
http://jbuchbinder.com/

rufustfirefly

  • New to the forum
  • *
  • Posts: 30
Re: [UNMAINTAINED] Canon 40D
« Reply #384 on: October 01, 2016, 06:41:44 PM »
For a quick update:

I've got everything compiling, but I'm pretty sure some of my functions aren't defined in the right places, etc, so it's failing to link properly -- but otherwise it looks as though it's doable to get this working with the modern ML codebase, assuming that I (or someone else a bit better at this) untangle a few of the bad references and definitions in there.

That's as of this commit:

https://bitbucket.org/rufustfirefly/magic-lantern/commits/da9358bcac3caf54a0572be07cad611ee0922b3d
EOS 5Dmk3 | EOS 40D
EF 70-200mm f/2.8 IS II ; 50mm f/1.4 ; 24-104mm kit lens ; 135mm f/2.8 SF | FD 28mm f/2.0 ; 55mm f/1.2 ; 300mm f/4 | Nikkor 55mm f/1.2 | Other : Rokinon Cine 14mm, 24mm, 35mm, 85mm ; Juplen M42 135mm f/2.8 ; ... etc ...
http://jbuchbinder.com/

rufustfirefly

  • New to the forum
  • *
  • Posts: 30
Re: [UNMAINTAINED] Canon 40D
« Reply #385 on: October 01, 2016, 11:13:50 PM »
Update:

I've got it compiling and linking, although there's some serious hackery involved, as well as a bunch of functions which have been dummied up, since I'm not sure where they map on the 40D's OS.

https://bitbucket.org/rufustfirefly/magic-lantern/commits/4a738f3938437566f93fd1def8ff7168ffc90847
EOS 5Dmk3 | EOS 40D
EF 70-200mm f/2.8 IS II ; 50mm f/1.4 ; 24-104mm kit lens ; 135mm f/2.8 SF | FD 28mm f/2.0 ; 55mm f/1.2 ; 300mm f/4 | Nikkor 55mm f/1.2 | Other : Rokinon Cine 14mm, 24mm, 35mm, 85mm ; Juplen M42 135mm f/2.8 ; ... etc ...
http://jbuchbinder.com/

Ant123

  • Freshman
  • **
  • Posts: 67
Re: [UNMAINTAINED] Canon 40D
« Reply #386 on: October 16, 2016, 10:09:42 PM »
I've got it compiling and linking
Did you try to run it on your camera?

Ant123

  • Freshman
  • **
  • Posts: 67
Re: [UNMAINTAINED] Canon 40D
« Reply #387 on: October 27, 2016, 07:47:46 PM »
There is no known address for write_card_bootflag so I formatted the card manually.

For 40D111 it should be 0xFFFF43A0.

a1ex

  • Administrator
  • Hero Member
  • *****
  • Posts: 9933
  • 5D Mark Free
Re: [UNMAINTAINED] Canon 40D
« Reply #388 on: November 01, 2016, 08:46:20 PM »
Some small progress that also applies to 40D:

Added the 450D and 40D changes to the vxworks branch in the main repo. Did some minor cleanups (compiler warnings), had some attempts at emulating it in QEMU, but didn't really check any deeper yet.

For reverse engineering, I've adapted the dm-spy-experiments branch as vxworks-dm-spy (tested in qemu).

AOK

  • New to the forum
  • *
  • Posts: 17
Re: [UNMAINTAINED] Canon 40D
« Reply #389 on: December 23, 2016, 01:09:50 AM »
So is it working? :-) Sorry not quite clear for me  :-[

AOK

  • New to the forum
  • *
  • Posts: 17
Re: [UNMAINTAINED] Canon 40D
« Reply #390 on: January 11, 2017, 09:12:30 PM »
Nobody knows.... as it seems. A dead end :/