Canon 5d Classic Development ***BOOTDISK NOW ENABLED*** - page 5 - DSLR Hack development - CHDK Forum
supplierdeeply

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

  • 65 Replies
  • 61665 Views
*

Offline Coutts

  • *****
  • 538
  • www.flickr.com/couttsphotog
    • Flickr
Re: Canon 5d Classic Development ***BOOTDISK NOW ENABLED***
« Reply #40 on: 27 / April / 2012, 16:50:06 »
Advertisements
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!
It should all be applicable to the 400d :) we are both running VxWorks 5.5 and digic II processors.


I've posted a new changeset with my code for writing to the screen buffer:
https://bitbucket.org/coutts/5dplus


If you want to locate the buffer in the 400d, dump ram from 0x0-0x8000000 with the screen / menu on twice (with 2 separate menus open). Then follow this guide here to locate buffers:
http://magiclantern.wikia.com/wiki/VRAM/550D


The idea is to load the 2 dumps, take a difference of them (remove all data that is the same) and plot the difference in a graph. The areas with a lot of differences are likely to be image buffers (because the data is so dynamic here).
Canon 5d
Canon 50mm f/1.8
Sigma 24mm f/1.8

Flickr

Re: Canon 5d Classic Development ***BOOTDISK NOW ENABLED***
« Reply #41 on: 27 / April / 2012, 16:53:24 »
Thanks; I was thinking to display a white photograph full screen, then a black one, and compare the dumps; I'm still thinking whether the effort to move to direct writing (versus using one of the camera's menus) is worth the effort...

*

Offline Coutts

  • *****
  • 538
  • www.flickr.com/couttsphotog
    • Flickr
Re: Canon 5d Classic Development ***BOOTDISK NOW ENABLED***
« Reply #42 on: 27 / April / 2012, 17:28:49 »
Thanks; I was thinking to display a white photograph full screen, then a black one, and compare the dumps; I'm still thinking whether the effort to move to direct writing (versus using one of the camera's menus) is worth the effort...
I personally like magic lantern's menu system a lot:


We could do a lot by utilizing the vram buffers:
- draw bitmap image files to the screen (useful for splash screen, menus, etc)
- dump screenshots of the camera
etc
Canon 5d
Canon 50mm f/1.8
Sigma 24mm f/1.8

Flickr

*

Offline Coutts

  • *****
  • 538
  • www.flickr.com/couttsphotog
    • Flickr
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 #44 on: 30 / April / 2012, 23:33:48 »
Some progress:
- I have fixed bmp_hexdump() so that it fits properly on the screen. now I can view areas of memory on the fly while testing.
- I made some progress in overriding the gui task. I discovered that I can delete the task using DeleteTask, and then re-create it with CreateTask and all GUI functionality returns to normal. So, I think this means that I can re-write the gui task in my own code and replace canon's with it. That's good news!

Here is a video demonstrating my test. When I turn the camera on, my code does not run for 5 seconds. After 5 seconds, the GUI task is killed, which is shown by the blue LED illuminating and the non-responsive GUI to button presses. After another 5 seconds, I call CreateTask on the canon gui main task, and as you can see, functionality of the GUI returns to normal.

5dplus | Task Overriding Testing
« Last Edit: 30 / April / 2012, 23:35:50 by Coutts »
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 #45 on: 01 / May / 2012, 01:07:31 »
It worked! I re-wrote the gui_main_task to match how it looks in the firmware, and have successfully hijacked canon's gui_main_task!

Surprisingly it was very similar to that of the 500d, so I used that as a reference. This is big news! It is easier than I thought to override tasks :)

5dplus | GuiMainTask Hijacked
« Last Edit: 01 / May / 2012, 01:49:47 by Coutts »
Canon 5d
Canon 50mm f/1.8
Sigma 24mm f/1.8

Flickr

*

Offline 0xAF

  • ***
  • 220
    • 0xAF
Re: Canon 5d Classic Development ***BOOTDISK NOW ENABLED***
« Reply #46 on: 01 / May / 2012, 11:27:35 »
This is great news.
This probably means that we can replace some other tasks too (if not all), and makes me wonder why i spent time on reversing so many routines ;)
// AF

*

Offline Coutts

  • *****
  • 538
  • www.flickr.com/couttsphotog
    • Flickr
Re: Canon 5d Classic Development ***BOOTDISK NOW ENABLED***
« Reply #47 on: 01 / May / 2012, 22:33:40 »
This is great news.
This probably means that we can replace some other tasks too (if not all), and makes me wonder why i spent time on reversing so many routines ;)
I'm starting to realize just how different the 5dc is from all cameras. There is nothing else in the same group as it. The startup code is more like the 400d, while the tasks (like gui main task) seem to be more like modern DryOS cameras like the 5d2.

I do not understand 400plus very well, specifically the main event queue you guys hijack, something about event proxy or something. I have not found anything like this in the 5dc yet, it seems to be very similar to modern DryOS cameras. I think 5dplus is going to take a very similar path to MagicLantern. It's very similar to DryOS cameras, but not similar enough to port MagicLantern on it (mainly because of things like the bmp vram being half the size, so all printing routines like bmp_hexdump need to be rewritten to fit on the 5dc screen).

At the rate things are going, I'm projecting 5dplus to be available to the public by the end of this month. I've almost got the framework written for a hack, it's just a matter of finishing now. Once I have the property system figured out, that will be the last thing on the list before I begin writing a menu system and add features.

I'm excited to see what this camera can do :) Here's a (not so organized) list of things I've discovered recently:
- setting ISO property above ISO3200 does not seem to have any effect, so ISO caps out a 3200.
- inbetween ISO values like iso2500 don't seem to work, it just sets it to ISO3200.
- the properties seem to work the same as in magic lantern dryos cameras, I used the values for the ISO property from lens.h of magic lantern to test the ISO stuff.
- I discovered that the maximum size for an autoexec.bin seems to be about 2mb, anything higher causes the camera to crash in play mode. This means 5dplus has plenty of room to grow for the future.
Canon 5d
Canon 50mm f/1.8
Sigma 24mm f/1.8

Flickr


Re: Canon 5d Classic Development ***BOOTDISK NOW ENABLED***
« Reply #48 on: 01 / May / 2012, 23:54:16 »
Don't know if you found canon's fonts yet but there at 0xffa85b2c
       Fnt
(0x04) 0xffce
(0x06) font_width =20
(0x08) charmap_offset = 0x24
(0x0c) charmap_size = 0x19d0
(0x10) bitmap_size = 0x2a148
              "
              "
http://magiclantern.wikia.com/wiki/Fonts?cb=51957

*

Offline Coutts

  • *****
  • 538
  • www.flickr.com/couttsphotog
    • Flickr
Re: Canon 5d Classic Development ***BOOTDISK NOW ENABLED***
« Reply #49 on: 02 / May / 2012, 05:29:14 »
Don't know if you found canon's fonts yet but there at 0xffa85b2c
       Fnt
(0x04) 0xffce
(0x06) font_width =20
(0x08) charmap_offset = 0x24
(0x0c) charmap_size = 0x19d0
(0x10) bitmap_size = 0x2a148
              "
              "
http://magiclantern.wikia.com/wiki/Fonts?cb=51957
that's awesome! thank you.
Canon 5d
Canon 50mm f/1.8
Sigma 24mm f/1.8

Flickr

 

Related Topics