Canon 40D

Started by dichterDichter, July 18, 2012, 08:55:06 AM

Previous topic - Next topic

0 Members and 2 Guests are viewing this topic.

Indy

jplxpto,

As long as you're a way to progress, it sounds good. That's not easy after all...
How about audio threshold (there is a script for that :-) and stubs ?
maybe I could help here...

Indy

jplxpto

Quote from: a1ex on October 10, 2012, 07:59:28 AM
For drawing, use bmp_fill and bmp_draw_rect (they both have the same syntax, so rectangles drawn with those two functions should overlap).

Thanks, I'll test it soon ...

jplxpto

Quote from: Indy on October 10, 2012, 04:06:30 PM
jplxpto,

As long as you're a way to progress, it sounds good. That's not easy after all...
How about audio threshold (there is a script for that :-) and stubs ?
maybe I could help here...

Indy

"How about audio threshold (there is a script for that :-) " ...

I'm sorry but I did not understand what you mean.
Why tell me in audio?

Indy

Dear Jplxpto,

sorry I was not clear.
do you have all audio stubs ? and the address of audio threshold ?

Indy

jplxpto

Quote from: jplxpto on October 11, 2012, 12:06:24 AM
"How about audio threshold (there is a script for that :-) " ...

I'm sorry but I did not understand what you mean.
Why tell me in audio?

Sorry, I also do not explained well
I think the 40D has no audio.

a1ex

Well.. the 40D doesn't record video normally, but will do so with Magic Lantern. We already have the ingredients :)

jplxpto

Today I had a big scare. I was trying to get all the constants of the buttons and my camera blocked. Moments later I realized that it was not possible to navigate the menus of the canon. Only the icons appeared, but the items were not presented. After a few tries, remove card, remove battery, put battery, remove the lens, place the lens, changes ... so, disconnect, connect, etc, etc ... I was scared but I can resurrect my camera. After a few attempts, I managed to solve the problem because I was able to open the 'My Menu' ... (Mode C1 + Menu  + SET) ... this sequence showed me the items of 'My Menu' and I registered the function that cleans the camera settigns, and I enabled this custom menu. After I accept the changes, the camera is working again normally. It seemed a miracle!!!! Huufff

I have not given up yet, I'll start having more careful ... I'll analyze the firmware to obtain the constants of a safer way. I think the code that writes the LCD acceded to an invalid memory area. I still have problems with the VRAM. Solving this problem is now a top priority.

a1ex

There are a few other features that write to RAM (e.g. magic zoom writing on LV buffer, fast zoom in play mode altering the current zoom value, exposure override, SET+MainDial changing the image buffers). Look through consts.h to see how each thing is used - and if you are not sure about that constant, and it's used for writing, don't enable that feature.

For menu, you should start only the two menu-related tasks and some button/event handlers.

jplxpto

Hello Alex,

I think almost everything is disabled. How can I check the tasks/features are being launched?

I checked that some of the listed buttons are wrong.
I was trying to solve this problem. I just enabled the hijack of the events and removed the comment from end_gui_...
How can I force automatic presentation of the menu at system startup.

I've done some tests with bmp_fill, bmp_draw_rec, draw_palette.
Soon I will send you a picture with the palette drawn on the LCD.

Thank you

a1ex

The source from ML repo only starts 3 tasks (debug, menu, menu_redraw) => it's OK. There are a few features that run from button handlers too (e.g. histogram in playback mode, which you showed me).

To start the menu... give_semaphore(gui_sem).

Edit: if you use the 5DC method for task hijacking (which you probably should, I don't know a better one), leave the gui_init commented (Canon code already did it).

jplxpto

Alex, thanks for your clarification.  I'll see it better.

jplxpto


Finally I had a little time to create my repository ...

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

jplxpto

Some more constants (gui.h)


#define BGMT_WHEEL_UP   0x00  
#define BGMT_WHEEL_DOWN 0x01
#define BGMT_WHEEL_LEFT               0x02
#define BGMT_WHEEL_RIGHT              0x03
#define BGMT_PRESS_SET                0x04

#define BGMT_MENU                     0x05
#define BGMT_INFO                     0x06
#define BGMT_JUMP                     0x07
#define BGMT_PLAY                     0x08
#define BGMT_TRASH                    0x09

#define BGMT_PICSTYLE                 0x13

#define BGMT_PRESS_ZOOMIN_MAYBE       0x0a
#define BGMT_UNPRESS_ZOOMIN_MAYBE     0x0b

#define BGMT_PRESS_ZOOMOUT_MAYBE      0x0c
#define BGMT_UNPRESS_ZOOMOUT_MAYBE    0x0d

#define BGMT_PRESS_DIRECT_PRINT       0x0e
//#define BGMT_UNPRESS_DIRECT_PRINT_     0x0f WRONG MAYBE

//~ happens anytime joy stick is unpressed from any position
#define BGMT_UNPRESS_UDLR             0x15
#define BGMT_PRESS_UP                 0x16
#define BGMT_PRESS_UP_RIGHT           0x17
#define BGMT_PRESS_UP_LEFT            0x18
#define BGMT_PRESS_RIGHT              0x19
#define BGMT_PRESS_LEFT               0x1a
#define BGMT_PRESS_DOWN_RIGHT         0x1b
#define BGMT_PRESS_DOWN_LEFT          0x1c
#define BGMT_PRESS_DOWN               0x1d
#define BGMT_PRESS_CENTER             0x1e

// dummy
#define BGMT_PRESS_HALFSHUTTER   0x0b
//#define BGMT_UNPRESS_HALFSHUTTER   -12345

#define BGMT_UNPRESS_SET   -123456789

#define GMT_GUICMD_OPEN_SLOT_COVER   0x28
#define GMT_GUICMD_START_AS_CHECK   -12345678
#define GMT_GUICMD_LOCK_OFF     -12345678

#define BGMT_Q BGMT_PRESS_DIRECT_PRINT
#define BGMT_LV BGMT_JUMP

#define BTN_ZEBRAS_FOR_PLAYBACK BGMT_JUMP

#define GMT_OLC_INFO_CHANGED -12344

ilguercio

Same button codes as the 50D.
What about unpress_set though? Does the camera correct the unpress correctly?
Canon EOS 6D, 60D, 50D.
Sigma 70-200 EX OS HSM, Sigma 70-200 Apo EX HSM, Samyang 14 2.8, Samyang 35 1.4, Samyang 85 1.4.
Proud supporter of Magic Lantern.

jplxpto

Quote from: ilguercio on October 13, 2012, 10:16:18 PM
Same button codes as the 50D.
What about unpress_set though? Does the camera correct the unpress correctly?

Sorry but I still do not know!


jplxpto

Hello guys,

I keep working on this project and A1ex has helped me a lot.

Now I'm trying to open the ML menu.

Again ... thanks Alex

jplxpto

Hi Guys,

I've got to see the menus of ML. But I still have some problems ... DOUBLE_BUFFERING with 1 not working.
The menus are constantly flashing. The keys work almost all.

jplxpto

Hi guys,

After a few hours of work and an excellent help from Alex,
I could finally see the menus of ML. This is a modest contribution but I'm happy.

The port of ML for 40D was not planned and I donated a few hours of my work and
dedication to one day also be a user of this wonderful sofware.

I'm still new to this project and I have a lot to learn but motivated to continue so that one day all
40D owners can also take advantage of ML.

Today, I made ​​my first Pull Requests into hudson repository.

If you are interested can follow my development at:

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

ilguercio

Thumbs up and thanks for the effort.
The family is getting bigger as time passes.
:)
Canon EOS 6D, 60D, 50D.
Sigma 70-200 EX OS HSM, Sigma 70-200 Apo EX HSM, Samyang 14 2.8, Samyang 35 1.4, Samyang 85 1.4.
Proud supporter of Magic Lantern.

jplxpto

Quote from: ilguercio on October 15, 2012, 01:53:48 AM
Thumbs up and thanks for the effort.
The family is getting bigger as time passes.
:)

Thank you!


nanomad

Your ptp_register_handler function is correct
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

jplxpto

Quote from: nanomad on October 19, 2012, 12:28:17 AM
Your ptp_register_handler function is correct

For me this is a good and bad news ... : (

I can't connect to the camera with --chdk switch and i don´t know why...

I see the logs of the camera again ... perhaps there is some hint

Thank you!!!

Faxe

Created account just to state that we are more people that eagerly and happily follow your progression.   ;)

jplxpto


I'm happy to know there are more people interested in this project.

I and other developers have been working on this project almost every day.
The Coutts, the Chochin the A1ex, the Nanomad and G3gg0 and Indy have helped me.

Thanks to all of them ...