500d development

  • 2487 Replies
  • 320716 Views
Re: 500d development
« Reply #120 on: 11 / February / 2011, 10:00:20 »
Advertisements
Yes, it should matter, as all the addresses in the original Canon code will have changed. The builds in this thread work on the 1.1.0 firmware only, they won't work on 1.0.9 and will probably crash your camera. (Well, I haven't tested it, but that's what I assume what will happen)

*

alins

Re: 500d development
« Reply #121 on: 11 / February / 2011, 10:30:30 »
Hey Alex,

i tried to figure out the vram address but i'm not getting any image out. I'm using this: http://magiclantern.wikia.com/wiki/VRAM/550D as a starting point.

so used the exact same code from that page to dump the vram, than use img.py to poke around and i always get (more or less) something like the image attached here. I looked into 550d branch and i see the wiki code in zebra.c with the menu that triggers it commented out. i put the menu entry on my fork and trigger it.

now i dumped the vram memory in live view, in movie mode without recording, in movie mode while recording. I even tried different memory segments...

any clue what am i doing wrong?

*

alins

Re: 500d development
« Reply #122 on: 11 / February / 2011, 10:56:32 »
another question if you don't mind alex: the code that sets the ISO value. i see that the code is trying to set to set different values (up to 10 tries) than check if the values stuck. if the value has not been set revert and move to next value.

I'm really really curious why are we doing this. if a value is invalid in a certain situation is it gonna be valid in a different situation?. In other words, if the camera rejects one ISO value is it because it's invalid or is it because at the moment the value cannot be used (either because the camera is busy and we need to wait until is ready to accept the value, or it depends on what mode your in or some other reason)

i hope my question make sense.

*

alins

Re: 500d development
« Reply #123 on: 11 / February / 2011, 11:06:35 »
RoaldFre: your question is a little bit over my head. i personally suggest asking the question on ML dev list, i'm pretty sure somebody there has the answer for you.

assuming i understood your question:
i'm sure you already checked this, but just in case: poke around ML wikia. you will find articles there about what people are using to disassemble the firmware. Also check CHDK wikia for firmware tools. if you are familiar with assembler code, people have been using IDA Pro with great results to make sense of the firmware. You will also find scripts to run _inside_ IDA pro that they're suppose to make your life easier. I know at some point i found (i don't have it ready now) an article i believe on CHDK wikia that was a step by step guide of how to use IDA Pro on your firmware dump


*

Offline a1ex

  • *****
  • 671
  • ML dev
Re: 500d development
« Reply #124 on: 11 / February / 2011, 11:15:30 »
I'm really really curious why are we doing this. if a value is invalid in a certain situation is it gonna be valid in a different situation?.
Yes, depending on your settings (HTP, movie, iso expansion, whatever), certain ISO values may or may not be valid. When it's not valid, Canon code will refuse to accept the setting. This way, I don't have to re-code Canon's logic for allowed ISO's.

For the VRAM, you either have incorrect pitch (see guesspitch or try manually some numbers from AJ's ASM Zedbra page). You may also be looking at an area which contains other data (not image).

I guess the 500D VRAM is similar to 5D2 one (it has 4:3 screen, right?)

*

Offline a1ex

  • *****
  • 671
  • ML dev
Re: 500d development
« Reply #125 on: 11 / February / 2011, 11:21:02 »
If you don't have IDA Pro, there are GPL tools available. I'm using this one: http://magiclantern.wikia.com/wiki/GPL_Tools/ARM_console

(I've let it running for two days to generate a nice HTML view of the code, which has around 1 GB; it decompiles half of it and solves call arguments for lots of functions; but you need to match the names from the 550D and 5D2 IDCs, which are somewhere in the ML dev list).

Here's a preview (I've disassembled ML itself): http://a1ex.bitbucket.org/disasm/index.htm

Re: 500d development
« Reply #126 on: 11 / February / 2011, 11:56:09 »
Hey you guys !

Im not able to help you with the code, but i really wanted to tell you guys how i'm impressed !
you rock !
hope a stable build will come up soon !!

Re: 500d development
« Reply #127 on: 11 / February / 2011, 12:17:49 »
Alex: sweet, I was almost afraid I had to find a Windows box. I'll give those tools a try!

I'm having some troubles getting my ARM toolchain up, tough. I'm using Gentoo and it has a tool called crossdev to automatically compile various cross development toolchains. I've chosen an arm-unknown-linux-gnu target (format: arch-vedor-os-libc -- I can't seem to get arm-unknown-elf-gnu to work) and everything seems to get built correctly. I'm using gcc version 4.5.2.

However, trying it on the code from Alin's repository gives some linking errors (within the C lib, for that matter!). I'm not really sure what's going on there, bad toolchain install, incompatible gcc version? The errors: http://pastebin.com/5SyWsvXt

Note: I had to modify the Makefile a bit. For one, I removed the 500d-empty.fir dependency as that file wasn't in the repository and there doesn't seem to be a build target for it(?). I also changed the paths to work with the default directories where crossdev installs its binaries. You can see my changes here: http://pastebin.com/WTE3tfwJ

[edit] Forgot to mention, I also needed to put the line
#define offsetof(type, member)  __builtin_offsetof (type, member)
in 5d-hack.c. I have a feeling my environment isn't quite the way it should be >_<.
« Last Edit: 11 / February / 2011, 12:35:45 by RoaldFre »


Re: 500d development
« Reply #128 on: 11 / February / 2011, 12:32:15 »
Any news on the flickering?
« Last Edit: 11 / February / 2011, 12:34:41 by Farbrorbengt »

*

Offline a1ex

  • *****
  • 671
  • ML dev
Re: 500d development
« Reply #129 on: 11 / February / 2011, 13:26:40 »
Alex: sweet, I was almost afraid I had to find a Windows box.

For compiling, see http://magiclantern.wikia.com/wiki/Build_instructions/550D and don't try other build environments (I've tried a lot).

IDA Demo also works under Wine (and IDAPython too). The Pro version should work too. My tools don't replace IDA, but rather complement it (I can't really read assembler, except for trivial blocks, but the decompiled output is much easier to handle).
« Last Edit: 11 / February / 2011, 13:48:07 by a1ex »

 

Related Topics