revamping get_exp_count, need help - page 2 - General Discussion and Assistance - CHDK Forum supplierdeeply

revamping get_exp_count, need help

  • 27 Replies
  • 9657 Views
Re: revamping get_exp_count, need help
« Reply #10 on: 04 / June / 2008, 12:05:41 »
Advertisements
@cybercom:

Ahh, thanks, there was some confusion there on my part ;-)  Total shoot is, indeed, 6643 for me now.
Using Canon PowerShot A620 & A560

*

Offline Jucifer

  • *****
  • 251
  • [A710IS]
Re: revamping get_exp_count, need help
« Reply #11 on: 04 / June / 2008, 12:11:49 »
rawhead, is parameter 2 increased with every shot without mode changing?

Re: revamping get_exp_count, need help
« Reply #12 on: 04 / June / 2008, 12:20:12 »
Jucifer

OK, I have "vers.req" in the root directory now, I'm running your custom build that you sent me, and I'm looking in the debug pages.  Page 1, param 1 is the same as the Total shoot, but it does NOT increase with every shot without mode changing.  Param 2 isn't a shot count at all.  All it says is:

Canon : 6

Here's a picture.
Using Canon PowerShot A620 & A560

*

Offline Jucifer

  • *****
  • 251
  • [A710IS]
Re: revamping get_exp_count, need help
« Reply #13 on: 04 / June / 2008, 12:23:25 »
is param 8 increased (by one) on every shot?
or anything on other pages?


Re: revamping get_exp_count, need help
« Reply #14 on: 04 / June / 2008, 12:29:13 »
Nope, param 8 doesn't change at all.  Param 47 (currently 53748416) increases by 16 each shot, and param 84 (currently 1212528622) increases by different amounts every shot.  Those are the only params that change per shot.
Using Canon PowerShot A620 & A560

Re: revamping get_exp_count, need help
« Reply #15 on: 04 / June / 2008, 12:30:20 »
FYI, get_exp_count currently gives me 2050562
Using Canon PowerShot A620 & A560

*

Offline Jucifer

  • *****
  • 251
  • [A710IS]
Re: revamping get_exp_count, need help
« Reply #16 on: 04 / June / 2008, 12:48:38 »
If a proper parameter can't be found for every cam, would it be better to get 0-9999 from get_exp_count and include some counter reset checking into scripts? It can be confusing if get_exp_count returned proper values all the time on some cameras, but resets in the middle of scripts on others...

Re: revamping get_exp_count, need help
« Reply #17 on: 04 / June / 2008, 12:57:56 »
If a proper parameter can't be found for every cam, would it be better to get 0-9999 from get_exp_count and include some counter reset checking into scripts?


At least for my situation, this should work perfectly.
Using Canon PowerShot A620 & A560


*

Offline wontolla

  • ****
  • 413
  • S3 & G9 & A720
Re: revamping get_exp_count, need help
« Reply #18 on: 04 / June / 2008, 13:27:28 »
For S3 IS

Parameter #52, page 5 increases by 16 each shot without changeing mode.

*

Offline ewavr

  • ****
  • 1057
  • A710IS
Re: revamping get_exp_count, need help
« Reply #19 on: 04 / June / 2008, 14:13:28 »
Param 47 (currently 53748416) increases by 16 each shot

For S3 IS
Parameter #52, page 5 increases by 16 each shot without changeing mode.

Hey people, this is wrong parameter! It contain both current file and directory number (see PARAM_FILE_COUNTER and get_file_counter() in platform/generic/shooting.c) - for example 103 in '103CANON' and 1234 in 'IMG_1234.JPG'.

How to find correct parameter in IDA (example for S3IS):
1. Search for "Total Shoot  :%ld" string
2. Jump to reference for this string:

ROM:FFA52E20                 MOV     R0, #0x4000    <<<<<<<<< must be 0x4000 + our parameter number
ROM:FFA52E24                 ADD     R1, SP, #0x80+var_70
ROM:FFA52E28                 ADD     R0, R0, #1      <<<<<<<<  our parameter number (i.e. 1)
ROM:FFA52E2C                 MOV     R2, #4         
ROM:FFA52E30                 BL      sub_FF992358  ( PTM_RestoreUIProperty )
ROM:FFA52E34                 LDR     R1, =aTotalShootLd     <<<<<<<<<< reference to string "Total shoot"
ROM:FFA52E38                 LDR     R2, [SP,#0x80+var_70]
ROM:FFA52E3C                 MOV     R0, R5         
ROM:FFA52E40                 BL      sprintf       

So, for S3IS this parameter = 1.
One minute per camera (if .idb database exists) and no trouble

P.S. For A560 also 1


« Last Edit: 04 / June / 2008, 14:30:56 by ewavr »

 

Related Topics