Canon 1100D / T3

Started by a1ex, June 14, 2012, 04:50:54 PM

Previous topic - Next topic

0 Members and 2 Guests are viewing this topic.

a1ex

Canon 1100D / T3
Current state: Release Candidate Danger, Will Robinson! Danger!


The main issues that are holding ML are:
Blindly maintained (development happens without a physical camera in our hands)
Lack of physical buttons (for menu, for example)
Lack of RAM (only 128MB; most other Rebel models have 256MB)
Low resolution sensor: 4290x2858 => 1430x952 theoretical max in LiveView
Slow SD interface (20MB/s, not enough for raw video)
Low display resolution (1-pixel wide items may be incorrectly displayed or aliased)

Short-term Todo List:
Enable raw video and silent photo capture (almost there)
Enable Lua scripting (feedback needed -- what works and what not?)
Make sure the stability tests are passing (feedback needed)
Write down which features work and which ones not (menu walkthrough, for testers)
Update the user guide (task common for all other camera models)
Done: Port 550D button hack to 1100D AE_COMP to open menu but retain the original long-press functionality.
Done: Start working on the fonts and display routines

Random bonus stuff:
Done: In-camera audio meters.

I will be posting updates here as I make progress -- Nanomad

The current version compiles and runs on 1100D.
RC 3: http://nanomad.magiclantern.fm/1100D/magiclantern-v2.3.1100D.RC3.zip Use development builds instead!!
Use the included .fir (for 1100D 1.0.5) to enable the bootflag.

Source code: http://bitbucket.org/hudson/magic-lantern/src/tip/platform/1100D.105

Main builds: http://builds.magiclantern.fm/ (some features not working)
Development builds: http://builds.magiclantern.fm/experiments.html (feedback needed)

nanomad

Hi,
I'm (once again) trying to get the 1100D port up-to date. If you don't mind, I'll hijack your original post and use this thread as a work-log :P

Missing constants

  • EVF_STATE (state-object.c)
EOS 1100D | EOS 650 (No, I didn't forget the D) | Ye Olde Canon EF Lenses ('87): 50 f/1.8 - 28 f/2.8 - 70-210 f/4 | EF-S 18-55 f/3.5-5.6 | Metz 36 AF-5

a1ex

Here you go:

#define EVF_STATE (*(struct state_object **)0x4C34)
#define MOVREC_STATE (*(struct state_object **)0x5720)


Tip: for AV button, you may want to look at 550D implementation, where it's used for arrow key shortcuts (tweaks.c). This button has different codes, depending on the shooting mode. I've only considered P, Tv, Av, M and Movie.

nanomad

Just a quick question a1ex, as I hate eating pre-made foods...
How did you find these values  :o
EOS 1100D | EOS 650 (No, I didn't forget the D) | Ye Olde Canon EF Lenses ('87): 50 f/1.8 - 28 f/2.8 - 70-210 f/4 | EF-S 18-55 f/3.5-5.6 | Metz 36 AF-5

a1ex

Those are state objects ( http://magiclantern.wikia.com/wiki/StateObjects , http://a1ex.bitbucket.io/ML/states/ ) - some sort of event-driven tasks which are pretty easy to hijack (that is, execute ML code at certain moments, like once per LiveView frame).

Most of those things contain strings with their name (for our example, we have EvfState and Evf\\EvfState.c).


ff5969ac: ff6db6d7 ; *'EvfState'
ff5969b0: 00000001 andeq r0, r0, r1
<state matrix follows below>


The state matrix (ff5969ac) is referenced from sub_FF0F73C8. So, with arm-console:

dec sub_FF0F73C8
[...]
CreateStateObject(name='EvfState', 0x0, addr=0xFF5969B0, inputs=14, states=10) => ret_CreateStateObject_FF0F73E8
*0x4C34 = ret_CreateStateObject_FF0F73E8
return ret_CreateStateObject_FF0F73E8


So, at 0x4C34, Canon firmware saves a pointer to EvfState object (see "struct state_object" in state-object.h).

a1ex

For the fonts: on 5Dc we have used a trick to downscale the bitmap coordinates on the fly (its resolution is 720x240). On 1100D, the screen resolution is 360x240 if I remember well, but the buffer size is 720x480, and the firmware does some sort of interpolation (is it nearest neighbor or something else?).

The medium font has a width of 12 pixels, and the bottom help text in ML assumes this width (max 60 chars). Probably a very tiny font rendered at width=6px and with pixels doubled could work a bit better than current medium font.

If not, can we consider a larger font (maybe the current small font with doubled pixels, that is, width=16px), and use horizontal scrolling of help text, like in rockbox?

nanomad

I'll have a look into fonts after making the ML menu button work reliably (shouldn't take too long).

Thanks for all the help!
EOS 1100D | EOS 650 (No, I didn't forget the D) | Ye Olde Canon EF Lenses ('87): 50 f/1.8 - 28 f/2.8 - 70-210 f/4 | EF-S 18-55 f/3.5-5.6 | Metz 36 AF-5

a1ex

Also: how much free memory do you have on 1100D? The 60D, 550D and 600D had some problems with this (but now there are solutions, only that I need to know which one to apply).

nanomad

Free Memory: 26K + 865K

Oh, and the overlay isn't showing up in the idle screen (the one that says P, ISO AUTO, AWB, MF, ...)
EOS 1100D | EOS 650 (No, I didn't forget the D) | Ye Olde Canon EF Lenses ('87): 50 f/1.8 - 28 f/2.8 - 70-210 f/4 | EF-S 18-55 f/3.5-5.6 | Metz 36 AF-5

a1ex

Hm... not much. Can you try compiling without -mlong-calls with a 32-bit gcc?

I'll fix this (need to do the same on 600D), but it may take a while.

The overlay means clock and other small extra info from outside LiveView? It's ifdef'ed out (debug.c, around line 1800).

nanomad

Uhm, dunno if I'm doing something wrong, but the memory usage stays the same (26K + 865K)

This time I've used codesurcery 32bit arm gcc (4.6.3)
EOS 1100D | EOS 650 (No, I didn't forget the D) | Ye Olde Canon EF Lenses ('87): 50 f/1.8 - 28 f/2.8 - 70-210 f/4 | EF-S 18-55 f/3.5-5.6 | Metz 36 AF-5

a1ex


nanomad

I've done that as soon as I switched to a 32bit compiler. Maybe it's the codesurcery compiler, dunno :o

Here's the patch I've created to make 1100D compile again

http://nanomad.magiclantern.fm/1100D-compiles.patch
EOS 1100D | EOS 650 (No, I didn't forget the D) | Ye Olde Canon EF Lenses ('87): 50 f/1.8 - 28 f/2.8 - 70-210 f/4 | EF-S 18-55 f/3.5-5.6 | Metz 36 AF-5

a1ex

Applied memory fixes to 1100D (though you may need to double-check the addresses).

https://bitbucket.org/hudson/magic-lantern/changeset/17b0f20612c2

nanomad

Well, it sure did something.



I'll run the test suite you posted now
EOS 1100D | EOS 650 (No, I didn't forget the D) | Ye Olde Canon EF Lenses ('87): 50 f/1.8 - 28 f/2.8 - 70-210 f/4 | EF-S 18-55 f/3.5-5.6 | Metz 36 AF-5

a1ex

Not bad. And if the screenshot feature works, it's probably enough. If not, we may have to move something from the big buffer to the small one.

The 60D gives random ERR70 if the second buffer has less than 1MB free. Probably I should also display the maximum contiguous block.

nanomad

This post contains current issues with ML

- [WONTFIX] Shutter and aperture working only in Exp Comp mode (applies to LV too)
- [L] Going from Exp Comp ON to OFF doesn't re-disable Shutter and Aperture
- [M] Focus peaking: peaks are off
- [M] Focus peaking - grayscale preview: Image is magenta
- [H] Magic Zoom: image is zoomed but it's being displayed wrong (weird aspect ratio, flickering)

Movie mode
- [H] ISO Stuff is not working

P Mode
- [L] Can't disable ExpSim
- [M] GlobalDraw - interaction with Canon graphics not working

I didn't finish testing as I have to go :P
EOS 1100D | EOS 650 (No, I didn't forget the D) | Ye Olde Canon EF Lenses ('87): 50 f/1.8 - 28 f/2.8 - 70-210 f/4 | EF-S 18-55 f/3.5-5.6 | Metz 36 AF-5

a1ex

Exp Comp - you mean expo override? So, the 1100D now has manual video controls, right?

Focus peaking and magic zoom off: this means that HD image buffer size is incorrect. You can take silent pics and use them to guess the right size. Howto: http://magiclantern.wikia.com/wiki/VRAM/550D

Magenta image: that's strange, on the 1100D even digic commands are different :)

The 600D has problems with ExpSim too, so it should be commented out in the 1100D too.

nanomad

Yes, sorry, exp override. So we do have manual video controls as long as we activate it. Which is nice  8)
EOS 1100D | EOS 650 (No, I didn't forget the D) | Ye Olde Canon EF Lenses ('87): 50 f/1.8 - 28 f/2.8 - 70-210 f/4 | EF-S 18-55 f/3.5-5.6 | Metz 36 AF-5

Arthur

Hey there!

I'm want to help with the development for T3/1100D, I have a lot of experience with C/C++, but I don't have experience with reverse engineering, is it enough to help?

Also, I have experience with graphic design, so maybe I can help develop a special font that will look better on 1100D low resolution screen.

There is anyway to render ML menus in 720x240 natively, then upscale it using nearest neighbor to 720x480? I think that's how it is done on the official firmware. What would be required to change in ML in order to do this? or is it not possible due to it requiring to rewrite core parts of ML?

By the way, is 1080p video option really completely locked down on this one? Or did you guys found out anything? I remember seeng something about this on ML Google Groups last year.
EOS 1100D | EF-S 15-55mm f/3.5-5.6 IS II (Kit lens)

nanomad

Hi,
I'm glad you want to help. I suggest you start by setting up the toolchain to compile Magic Lantern and compile the latest release for the 1100D.
EOS 1100D | EOS 650 (No, I didn't forget the D) | Ye Olde Canon EF Lenses ('87): 50 f/1.8 - 28 f/2.8 - 70-210 f/4 | EF-S 18-55 f/3.5-5.6 | Metz 36 AF-5

a1ex

The 5Dc renders ML menus at 720x240, so you can inspire from there. All the changes required for this can be in bmp.c / bmp.h / vram.c IMO.

Arthur

Ok, I'll setup the toolchain on my PC here,
Then I'll look into 5Dc source.

I've seen some 5Dc constants in bmp.c and vram.c (CONFIG_5DC), won't some of them work on 1100D?

It seems that Canon is using some tricks to get most of 1100D display, can someone send me some screenshots of the original firmware menus? I want to take a look how Canon is doing it.

By the way, there is any specific reason ML font is looks like a system font?
I'm thinking about creating a more rounded font, similar to the one in the official firmware, I can do it from the scratch, pixel by pixel (I have some experience with pixel art for games and stuff).
This is specially useful for extremely small text, so I can tailor it to look good in low resolution.
EOS 1100D | EF-S 15-55mm f/3.5-5.6 IS II (Kit lens)

nanomad

Hi, I'm glad you want to help. Leave me your skype/gmail address in PM and I'll get you started on the 1100D port and ML in general.
EOS 1100D | EOS 650 (No, I didn't forget the D) | Ye Olde Canon EF Lenses ('87): 50 f/1.8 - 28 f/2.8 - 70-210 f/4 | EF-S 18-55 f/3.5-5.6 | Metz 36 AF-5

Arthur

EOS 1100D | EF-S 15-55mm f/3.5-5.6 IS II (Kit lens)