supplierdeeply

Canon 5d Classic Development ***BOOTDISK NOW ENABLED***

  • 65 Replies
  • 38592 Views
*

Offline Coutts

  • *****
  • 538
  • www.flickr.com/couttsphotog
    • Flickr
Re: Canon 5d Classic Development
« Reply #30 on: 20 / April / 2012, 20:41:40 »
Advertisements
Little bit of an update:

I found the address of the blue led (finally!). I also discovered that it is not necessary to package the flasher in with our FIR file, so I have removed it. I also changed it to link to 0x800030 (offset 0x30 bytes for the header on our FIR).

The current code cannot boot the firmware yet (still), but I think I am getting closer. If any developers are interested, the current revision will blink the contents of a specified memory address in binary using the LEDs. It's all I can do at the moment to read any memory. A red blink is a 0 and a blue blink is a 1. Feel free to try it out.

Here is the changeset:
https://bitbucket.org/coutts/5dplus/changeset/a1cc964de4af
Canon 5d
Canon 50mm f/1.8
Sigma 24mm f/1.8

Flickr

*

Offline Coutts

  • *****
  • 538
  • www.flickr.com/couttsphotog
    • Flickr
Re: Canon 5d Classic Development ***BOOTDISK NOW ENABLED***
« Reply #31 on: 24 / April / 2012, 20:27:08 »
I successfully enabled the bootflag to allow the camera to run from an autoexec.bin file. It works!! I have attached a bootdisk toggle fir file that will toggle the bootdisk on / off each time you run it. I have also attached an autoexec.bin file (the first one of the project!!) which simply blinks the blue and red leds without booting the firmware. Just put the FIR and autoexec.bin files on your cf card, run the firmware update (ONLY DO THIS IF YOU'RE ON v1.1.1 FIRMWARE), and you should see some LED activity telling you the state of the flags.

- any kind of red led at all means something went wrong and the code haulted.
- a solid blue led indicates that bootflag is now enabled (so you can run autoexec.bin files with a prepared card).
- a blinking blue led indicates that the bootflag is now disabled.

Note: there is no way to turn the camera off while using the FIR or this autoexec.bin file, just pull the battery (it's not a big deal).

If you are interested in the changeset please see:
https://bitbucket.org/coutts/5dplus/changeset/dd9a88c8f9f9


For anyone curious how I did it:
I spent some time analyzing the bootloader of the 400d. I knew there were functions to set boot flags as this is how the 350d people did it. I ended up finding the functions in the 400d boot loader, and I was curious if I could probe the bootloader section of the 5d to find the same functions.


I used some basic code to scan the entire region, checking every 4 bytes to equal the hex code from the 400d bootloader at specific instructions. I then used the blue and red leds to blink out the location of the function in binary (red was 0, blue was 1), and slowly narrowed down where the bootflag functions were. In the end it worked! I added checks to try to prevent any possible complications (shouldn't be any though).


Enjoy :)
Canon 5d
Canon 50mm f/1.8
Sigma 24mm f/1.8

Flickr

Re: Canon 5d Classic Development ***BOOTDISK NOW ENABLED***
« Reply #32 on: 24 / April / 2012, 22:56:07 »
thats cool.

any chance you can modify it for 1000d and 450d owners?
I gather you have got rid of your 1000d now? i'd be willing to help with my 450d

Re: Canon 5d Classic Development ***BOOTDISK NOW ENABLED***
« Reply #33 on: 25 / April / 2012, 01:40:01 »
Good work, Coutts; congratulations!


*

Offline Coutts

  • *****
  • 538
  • www.flickr.com/couttsphotog
    • Flickr
Re: Canon 5d Classic Development ***BOOTDISK NOW ENABLED***
« Reply #34 on: 25 / April / 2012, 05:27:34 »
just playing around, found some functions to rotate the screen, so I had some fun with it

5dplus Initial Code Testing | LCD Test
Canon 5d
Canon 50mm f/1.8
Sigma 24mm f/1.8

Flickr

Re: Canon 5d Classic Development ***BOOTDISK NOW ENABLED***
« Reply #35 on: 25 / April / 2012, 05:33:50 »
A promising start!

I like a lot of your photos on Flickr, too. Looking forward to what you can get from this oldie-but-goodie!

Re: Canon 5d Classic Development ***BOOTDISK NOW ENABLED***
« Reply #36 on: 25 / April / 2012, 06:42:14 »
just playing around, found some functions to rotate the screen, so I had some fun with it

If I remember correctly, there were some functions in the 400D with a name that suggested something similar, but I still haven't found the time to test them. Anyway, this could be useful for macro photography: to get real close to the subject, sometimes you have to invert the central column of the tripod.

*

Offline 0xAF

  • ***
  • 219
    • 0xAF
Re: Canon 5d Classic Development ***BOOTDISK NOW ENABLED***
« Reply #37 on: 25 / April / 2012, 07:41:02 »
If I remember correctly, there were some functions in the 400D with a name that suggested something similar, but I still haven't found the time to test them. Anyway, this could be useful for macro photography: to get real close to the subject, sometimes you have to invert the central column of the tripod.

Yes Edu, there are routines in 400d and IIRC I played with them back in time.
As I told Andrew earlier, I did not saw the benefit in these routines, but now as you mentioned the Macro, I see the point.
// AF


*

Offline Coutts

  • *****
  • 538
  • www.flickr.com/couttsphotog
    • Flickr
Re: Canon 5d Classic Development ***BOOTDISK NOW ENABLED***
« Reply #38 on: 27 / April / 2012, 14:39:59 »
I think I've located the BMP vram buffer, so writing on the screen is possible. For now I've found that writing 0xFFFFFFFF sets a pixel to white.
Here i've set 64kb of the buffer to white to find the start / end of the buffer.



The buffer seems to be 360x240 pixels in size. It starts at 0x589242 and (theoretically) ends at 0x59E3C2.


Next step is to port bmp.c from magic lantern and we will be printing on screen in no time.


« Last Edit: 27 / April / 2012, 14:42:24 by Coutts »
Canon 5d
Canon 50mm f/1.8
Sigma 24mm f/1.8

Flickr

Re: Canon 5d Classic Development ***BOOTDISK NOW ENABLED***
« Reply #39 on: 27 / April / 2012, 16:25:51 »
So, you've decided to write directly to the screen buffer... nice. Sometimes, when I get really frustrated with the menus in the 400D, I think we should abandon the original menus, and implement our own version. I hope your work with this camera will be useful to us, too. Good luck!

 

Related Topics