ewavr found a way to SET drivemode - General Discussion and Assistance - CHDK Forum
supplierdeeply

ewavr found a way to SET drivemode

  • 6 Replies
  • 3559 Views
*

Offline PhyrePhoX

  • *****
  • 2254
  • make RAW not WAR
    • PhyreWorX
ewavr found a way to SET drivemode
« on: 20 / July / 2008, 07:00:36 »
Advertisements
As you can see here ewavr implemented a switch to set the drivemode, burst mode in this case. this is quiete a breakthrough, as it allows setting it without the use of emulating keypresses. i asked him in pm to elaborate on his finding, this is what i got:

Quote
a way to SET drivemode, how did you find the adress for the parameter?

For some cameras exists ShootCon_ShowState() fuction, which prints shooting state related variables:

S3IS:
FF9CD748 ShootCon_ShowState
.....
ROM:FF9CD948                 LDR     R3, =0x7AA8
ROM:FF9CD94C                 LDR     R0, =a_shootstate0xX ;" _ShootState           :0x%x"
ROM:FF9CD950                 LDR     R1, [R3]
ROM:FF9CD954                 BL      printf
ROM:FF9CD958                 LDR     R3, =0x7AAC 
ROM:FF9CD95C                 LDR     R0, =a_shootingmode0 ; "_ShootingMode         :0x%x"
ROM:FF9CD960                 LDRB    R1, [R3]       
ROM:FF9CD964                 BL      printf       
.....

So, for S3IS:

DEF(shoot_state, 0x7AA8)
DEF(conti_shooting, 0x7AAC) - Canon's name is "shooting mode" Wink Note that is byte size variable.


A720:

FFD20464 sub_FFD20464
ROM:FFD20464                 STMFD   SP!, {R4-R6,LR}
ROM:FFD20468                 ADR     R0, asc_FFD20618 ; "\n"
ROM:FFD2046C                 BL      printf         
ROM:FFD20470                 ADR     R0, aShootstate ; "ShootState\n"
ROM:FFD20474                 BL      printf       
ROM:FFD20478                 LDR     R5, =0xAB38
......
ROM:FFD205F0                 ADR     R0, a_shootstate0xX ; "_ShootState           :0x%x\n"
....
ROM:FFD209C4                 LDR     R1, [R5,#0x78]  ; Load from Memory
ROM:FFD209C8                 BL      printf          ; Branch with Link
ROM:FFD209CC                 LDRB    R1, [R5,#3]     ; Load from Memory
ROM:FFD209D0                 ADR     R0, a_shootingmode0xX ; "_ShootingMode         :0x%x\n"
ROM:FFD209D4                 BL      printf          ; Branch with Link

So, for a720:

DEF(shoot_state, 0xAB38+0x78)
DEF(conti_shooting, 0xAB38+3)

Some cameras like a570 don't  have such useful function  Sad

However (a570 1.00E):

ROM:FFC1B9D0 sub_FFC1B9D0
ROM:FFC1B9D0                 LDR     R3, =0x253C
ROM:FFC1B9D4                 STMFD   SP!, {R4,R5,LR}
ROM:FFC1B9D8                 MOV     R4, R0         
ROM:FFC1B9DC                 LDR     R5, =0x2548
ROM:FFC1B9E0                 LDR     R1, =aShootstate0xX ; "ShootState:0x%x"
ROM:FFC1B9E4                 STR     R4, [R3]       
.....

So, for a570:

DEF(shoot_state, 0x253C)
DEF(conti_shooting, 0x253C+4)  - found in another place. Maybe for all VxWorks cameras address of 'conti_shooting'=address of 'shoot_state' +4.


so, i guess with his explanation more people can find these adresses for their cams. obviously these people must be smarter than me, i just gather the information ;)

*

Offline LjL

  • ****
  • 266
  • A720IS
Re: ewavr found a way to SET drivemode
« Reply #1 on: 20 / July / 2008, 12:24:12 »
Ha, I was just wondering today whether or not this was possible.

Having continuous drive reset every time the camera is powered on is incredibly annoying with BSS (besides, why does a setting like that get reset, when things like exposure compensation do not?! I forget those on!).

Besides, who needs single shot mode anyway? :P Just don't keep the button pressed if you don't want multiple shots!

*

Offline fudgey

  • *****
  • 1705
  • a570is
Re: ewavr found a way to SET drivemode
« Reply #2 on: 20 / July / 2008, 15:31:35 »
Great :). That forget-the-burst-mode feature Canon gave us has really ticked me off repeatedly...

So, for a570:

DEF(shoot_state, 0x253C)
DEF(conti_shooting, 0x253C+4)  - found in another place. Maybe for all VxWorks cameras address of 'conti_shooting'=address of 'shoot_state' +4.

I can confirm that on a570is 1.00e the LSB of 0x2540 is 1 in burst mode, 1 in programmed timer mode, 0 in normal and 0 in the two single shot timer modes. Other bits of 0x2540 change on half shoot (possibly during the shoot process too like ShootState 0x253c, didn't check). In a quick test, value was 0 or 1 after changing from play mode, 500 or 501 during half shoot, 100 or 101 after half shoot.

I didn't try porting ewavr's patch to a570is, those stubs files make me feel dizzy and I don't really even get what's changing the value in those diffs.

Btw, does the burst mode OSD icon update too? Also, an "always burst mode" setting isn't quite as good as "remember burst mode" or even "always start in burst mode", but it's way better than nothing.

*

Offline cyril42e

  • ***
  • 111
  • SD1000/Ixus70 1.02a
    • CR-TEKnologies
Re: ewavr found a way to SET drivemode
« Reply #3 on: 20 / July / 2008, 18:47:35 »
I confirm that on Ixus70_SD1000 the value at &shoot_state+4 (0x256C) is 1 in burst mode and custom timer, and 0 else (but didn't investigate as thoroughly as fudgey for shoot_half changes).

This is great if it is writable, we should add a ubasic/lua command too.


*

Offline a710is

  • ****
  • 250
  • A710 IS
Re: ewavr found a way to SET drivemode
« Reply #4 on: 21 / July / 2008, 02:49:51 »
I am in great need of a feature to preserve the remaining settings during camera shutdown (burst mode, zoom, even focus). in forest rally racing photography, I only have like 2-3 secs to turn the camera on and set all these manually and sometimes I don't even get to switch to burst mode...  :(
I can't understand why Canon chose to have the camera preserve some settings and others not but good thing ewavr is around :D . where can the build be found?
« Last Edit: 21 / July / 2008, 02:54:27 by a710is »

*

Offline PhyrePhoX

  • *****
  • 2254
  • make RAW not WAR
    • PhyreWorX
Re: ewavr found a way to SET drivemode
« Reply #5 on: 21 / July / 2008, 03:13:00 »
well here: / - A710_chdk - Trac
you "just" have to compile it yourself ;)

by the way you can also set everything via script as a workaround. for things like drivemode you will need to emulate keypresses unfortunately.

*

Offline a710is

  • ****
  • 250
  • A710 IS
Re: ewavr found a way to SET drivemode
« Reply #6 on: 21 / July / 2008, 04:04:37 »
well, I don't really know how to compile builds or to write scripts from scratch :( , I imagined that a script may do this but actually writing it is a totally different story. :D

 

Related Topics


SimplePortal 2.3.6 © 2008-2014, SimplePortal