Fast MD with burst/preview mode - page 17 - Completed and Working Scripts - CHDK Forum

Fast MD with burst/preview mode

  • 232 Replies
  • 233715 Views
*

Offline mx3

  • ****
  • 372
Re: Fast MD with burst/preview mode
« Reply #160 on: 04 / May / 2009, 06:53:44 »
Advertisements
OK, well I tried increasing the rows/cols, and also tried decreasing threshold, and also tried decreasing pixel step, and tried increasing the compare interval, and my A650 won't go lower than 120 ms (and still gets 200 ms frequently).

MD uses "vid_get_viewport_live_fb" function to get data for processing.
Some ports have "standard" function which uses only one of three available LCD buffers to do math processing.
Other ports have "advanced" version of this function which uses all three buffers.
I just looked into build 638 and it seems port for A650 uses "standard" version of this function.
it very well explains chaotic  trigger time - It can be improved to give more smaller/stable/predictable reaction times.

-----------------
edit:
If you want to participate in solving this puzzle (you will need to setup compiler and cook CHDK yourself) you have two options:
1) tough way - digging into ROM dump using IDA to find out addresses (can take many-many-many hours or you can ask some guru).
2) dumb way - dumping RAM and do some comparing - I provided tools somewhere  on this forum. This way do not give 100% guarantee but it is possible you can do it in no-time....  1-3 hours:
  - take several dumps (it takes 1-30min)
  - analize generated output (it can take 5-30 min)
  - change sources of CHDK and cook new build - (5-30 min)
« Last Edit: 04 / May / 2009, 07:11:59 by mx3 »
skype: max_dtc. ICQ: 125985663, email: win.drivers(at)gmail, eVB decompiler

Re: Fast MD with burst/preview mode
« Reply #161 on: 05 / May / 2009, 01:05:07 »
mx3: I checked the wiki and did not see anything on how to set up a dev environment or check out the code.  Is there a thread that can help me get started?  I might have some time later, but I'm sure I'd need some help with this.

*

Offline reyalp

  • ******
  • 14126
Re: Fast MD with burst/preview mode
« Reply #162 on: 05 / May / 2009, 02:12:12 »
mx3: I checked the wiki and did not see anything on how to set up a dev environment or check out the code.  Is there a thread that can help me get started?  I might have some time later, but I'm sure I'd need some help with this.
http://chdk.wikia.com/wiki/Modifying_the_CHDK_Sources

I'd suggest read the other pages linked from http://chdk.wikia.com/wiki/For_Developers as well
Don't forget what the H stands for.

*

Offline mx3

  • ****
  • 372
Re: Fast MD with burst/preview mode
« Reply #163 on: 05 / May / 2009, 03:19:16 »
Is there a thread that can help me get started? 
my lazy method I mentioned (see attached file)
and look into other ports lib.c for example of "advanced" version of this function
skype: max_dtc. ICQ: 125985663, email: win.drivers(at)gmail, eVB decompiler

Re: Fast MD with burst/preview mode
« Reply #164 on: 07 / May / 2009, 16:28:12 »
OK, I got the CHDK-Shell going (great job whim!).

mx3: looks like I need to get 2 dump files before I can run the stuff in the .rar file from the other thread you mentioned.  I assume it's the same kind of dump file mentioned here?  http://chdk.wikia.com/wiki/Porting_the_CHDK#Q._How_can_I_get_a_firmware_dump.3F

If so, then I'll just use CardTricks to create a universal dumper card for DryOS.  What are those Strings and Clean buttons in CardTricks next to  "After Dumping-->" ?

Then I put the SD card into my A650 and just press the shutter button and a dump file will be created?

Thanks.

*

Offline mx3

  • ****
  • 372
Re: Fast MD with burst/preview mode
« Reply #165 on: 08 / May / 2009, 07:44:37 »
those dumps you refers to are ROM(code) dumps.
you need to make RAM dumps to find out where camera software stores LCD data.
you do not need other tools(cardtricks) to prepare those dumps
to make RAM dumps you have to activate this feature somewhere in ALT debug menu.
then you will be able to make them pressing some button...
skype: max_dtc. ICQ: 125985663, email: win.drivers(at)gmail, eVB decompiler

*

Offline fudgey

  • *****
  • 1705
  • a570is
Re: Fast MD with burst/preview mode
« Reply #166 on: 09 / May / 2009, 10:44:46 »
fudgey, great job with this script, and excellent readme file!  I noticed in the readme it says to use P mode instead of Auto mode.  May I ask why P mode is better than Auto mode?  Thank you.

It's been a while since I wrote that, but I think it was because my a570 often crashes with flash. In auto mode (unlike in P, Tv, Av, M modes) it forgets the user's choice of flash mode when powered off and defaults to flash auto (which I think is a good thing for that particular mode, but also a reason to avoid it for MD on a570).

Re: Fast MD with burst/preview mode
« Reply #167 on: 23 / May / 2009, 10:08:25 »
Can change this:

Code: [Select]
md_detect_motion a, b, f, n, d, c, 1, t, i, j+1, l+1, a-k, b-m, 9, h, e
on

Code: [Select]
md_detect_motion a, b, f, n, d, c, 1, t, i, w, x, y, z, 9, h, e
beffore loop

Code: [Select]
let w=j+1
let x=l+1
let y=a-k
let z=b-m

??

Re: Fast MD with burst/preview mode
« Reply #168 on: 23 / May / 2009, 13:58:50 »
those dumps you refers to are ROM(code) dumps.
you need to make RAM dumps to find out where camera software stores LCD data.
you do not need other tools(cardtricks) to prepare those dumps
to make RAM dumps you have to activate this feature somewhere in ALT debug menu.
then you will be able to make them pressing some button...

Hi mx3, I have a couple questions for you, which I posted into the other thread:

http://chdk.setepontos.com/index.php/topic,405.msg34117.html#msg34117

Thanks.

*

Offline fudgey

  • *****
  • 1705
  • a570is
Re: Fast MD with burst/preview mode
« Reply #169 on: 24 / May / 2009, 05:10:15 »
Code: [Select]
let w=j+1
let x=l+1
let y=a-k
let z=b-m

Sure, but I can't see much point in doing that. Each line is evaluated during a single tick, which means calculating that over and over again doesn't slow ubasic down. Calculating them at scipt startup like you suggest however slows down script startup by 40 ms, and it wastes 4 variables (not important for a finished script, but it's a pain if you want to extend it -- we only have a-z A-Z variables to use). Btw it's good practice to use capital letters for variables you create inside a script, since input parameters can only be lower case a-z (and this script is already using a large portion of those)... adding new params is not fun at all if all lower case letters are taken already.

 

Related Topics


SimplePortal © 2008-2014, SimplePortal