Fully manual flash in cams without such feature - General Discussion and Assistance - CHDK Forum

Fully manual flash in cams without such feature

  • 9 Replies
  • 9410 Views
*

Offline whoever

  • ****
  • 280
  • IXUS950
Fully manual flash in cams without such feature
« on: 28 / August / 2008, 14:14:04 »
Advertisements

Re: Fully manual flash in cams without such feature
« Reply #1 on: 07 / May / 2010, 12:56:50 »
This is interesting and there is similar code in the A620 with the table also, apparently, at 0x551C8.

If I use CHDK memory browser to monitor that address, I just see constantly-changing numbers.

I do not normally use CHDK or the memory browser but don't think I am doing anything incorrectly.

Does the memory browser work as expected with your IXUS950 ?


David

*

Offline whoever

  • ****
  • 280
  • IXUS950
Re: Fully manual flash in cams without such feature
« Reply #2 on: 08 / May / 2010, 10:33:50 »
Does the memory browser work as expected with your IXUS950 ?
It certainly does.

How do you mean the numbers are constantly changing? The memory browser gives a static snapshot of the contents at given address, even if it's volatile. And if it is, then it's a wrong address.

After a quick look at the A620 disasm, I see that its code is rather different from the A710, A720, and A570 that I looked at (ages ago). But I think that the correct address of the flash preset table for A620 is 0x50170, see this
Code: [Select]
FFCEE560 loc_FFCEE560                            ; CODE XREF: sub_FFCEE33C+16Cj
FFCEE560                 MOV     R1, #0x1D       ; PropCase 29 -- manual flash output
FFCEE560                                         ; (0,1,2 min to full if Manual)
FFCEE564                 ADD     R2, SP, #0x38+var_32
FFCEE568                 MOV     R3, #2
FFCEE56C                 MOV     R0, R8
FFCEE570                 BL      GetPropertyCaseA
FFCEE574                 LDR     R2, =0x50274
FFCEE578                 LDRH    R1, [SP,#0x38+var_32]
FFCEE57C                 LDR     R3, [R2]
FFCEE580                 CMP     R1, R3
FFCEE584                 LDRGEH  R3, [R2]
FFCEE588                 SUBGE   R3, R3, #1
FFCEE58C                 STRGEH  R3, [SP,#0x38+var_32]
FFCEE590                 LDRGEH  R1, [SP,#0x38+var_32]
FFCEE594                 LDR     R3, =0x50270
FFCEE598                 LDR     R2, [R3]        ; [R3] = 0x50170 ?
FFCEE59C                 LDR     R1, [R2,R1,LSL#2] ; R2 = 0x50170 ?
FFCEE59C                                         ; R1=0,1,2 (PropCase 29)
FFCEE5A0                 STRH    R9, [R6,#0x1A]
FFCEE5A4                 STR     R1, [R6]        ; R6 = 0x50280
and this (and the calling code)
Code: [Select]
FFCEC700 sub_FFCEC700                            ; CODE XREF: sub_FFCEE644+58p
FFCEC700                 MOV     R3, #3
FFCEC704                 STR     R3, [R0]
FFCEC708                 LDR     R0, =0x50170
FFCEC70C                 MOV     PC, LR
If it isn't, then inspect the value at 0x50270, it should be the sought address (see code above).

Doesn't A620 have a native manual flash control?

Depending on your needs, you may also want to see this: http://chdk.setepontos.com/index.php/topic,4417.msg45895.html#msg45895

Hope this helps.

Re: Fully manual flash in cams without such feature
« Reply #3 on: 08 / May / 2010, 11:28:11 »
Thanks.

I will study this after my dinner and report back.

With multiple disassemblies open on three screens, maybe I was looking at the wrong one.


David

Re: Fully manual flash in cams without such feature
« Reply #4 on: 08 / May / 2010, 16:58:55 »
Yes, 0x50170 is correct and 0x50270 contains flash duration of last shot.

On A620, durations are 20, 140 and 2000.

Quote
Doesn't A620 have a native manual flash control?
Yes, but it was simply convenient for monitoring the memory locations.

I have three things in mind :-

1. Simple slave-flash mode (force lowest power manual mode).
2. Precise control of flash when in manual mode for macro.
3. In macro mode, flash-bracketing.

Incidentally, in the CHDK function shooting_set_flash_video_override() we have the following :-

_SetPropertyCase(PROPCASE_FLASH_ADJUST_MODE, &mode, sizeof(mode));
_SetPropertyCase(PROPCASE_FLASH_FIRE, &flash, sizeof(flash));
_SetPropertyCase(PROPCASE_FLASH_MANUAL_OUTPUT, &power, sizeof(power));

The first one sets flash mode to Manual, the third one sets duration to one of three levels in the table.

What is the reason for the second item, does it indicate flash will be used or has already fired ?

Also, why would you want to use flash during movie recording ?


*

Offline PhyrePhoX

  • *****
  • 2254
  • make RAW not WAR
    • PhyreWorX
Re: Fully manual flash in cams without such feature
« Reply #5 on: 08 / May / 2010, 18:56:44 »
you guys know i already coded manual flash control (via the propcases) for all cameras into chdk, right?
it only allows for three power settings (lowest, highest and somewhat in the middle), but thats sufficient for 95% of all the cases (i primarily coded it for triggering external flashes - in manual mode there is no preflash).

also, for the s-series, we enabled flash during movie recording (s-series you can shoot movies & pictures at the same time - without CHDK u cant use flash in those pictures tho, thus u cant trigger external flashes). ewavr also has a thread/post somewhere here where he recorded a video (on a non-s series) and triggered the internal flash DURING recording, it was kinda like a disco strobe light.

Re: Fully manual flash in cams without such feature
« Reply #6 on: 08 / May / 2010, 19:40:36 »
you guys know i already coded manual flash control (via the propcases) for all cameras into chdk, right?
it only allows for three power settings (lowest, highest and somewhat in the middle), but thats sufficient for 95% of all the cases (i primarily coded it for triggering external flashes - in manual mode there is no preflash).

Yes, of course ...  but I was not sure how it is a development of the info that whoever posted at the start of this thread because in the changeset notes  you referred to work by EWAVR but I could not find any reference to it.

What does  _SetPropertyCase(PROPCASE_FLASH_FIRE, &flash, sizeof(flash))  do ?

Quote
i primarily coded it for triggering external flashes

That is what I see as one of the main uses for it but the CHDK manual almost mentions that as an afterthought.

*

Offline whoever

  • ****
  • 280
  • IXUS950
Re: Fully manual flash in cams without such feature
« Reply #7 on: 09 / May / 2010, 03:15:29 »
What does  _SetPropertyCase(PROPCASE_FLASH_FIRE, &flash, sizeof(flash))  do ?
We will have to wait for PhyrePhoX to enlighten us. I personally don't see what purpose it serves.

I also notice that he calls shooting_set_flash_video_override() in the override hook, which is not a good place for this sort of override: preflash will still fire on the first shot, regardless of the override.

Re: Fully manual flash in cams without such feature
« Reply #8 on: 28 / December / 2010, 14:32:55 »
I also notice that he calls shooting_set_flash_video_override() in the override hook, which is not a good place for this sort of override: preflash will still fire on the first shot, regardless of the override.


Any idea how to disable pre and main flash even for the first shot ?

*

Offline whoever

  • ****
  • 280
  • IXUS950
Re: Fully manual flash in cams without such feature
« Reply #9 on: 22 / May / 2011, 10:13:40 »
I also notice that he calls shooting_set_flash_video_override() in the override hook, which is not a good place for this sort of override: preflash will still fire on the first shot, regardless of the override.
Any idea how to disable pre and main flash even for the first shot ?

Missed that, sorry.

If you are still interested and haven't figured it out yet, the best moment for these overrides, as far as I can see, is immediately before entering the capture sequence. For instance, in core/gui.c, at the beginning of other_kbd_process(), add
if (kbd_is_key_clicked(KEY_SHOOT_HALF)) { <do overrides> }

/Alex

 

Related Topics


SimplePortal © 2008-2014, SimplePortal