Author Topic: extra long exposures (split from: Hardcore modding on a A530, thanks to CHDK!  (Read 14394 times)

Offline ewavr

  • Developers
  • Hero Member
  • ****
  • Posts: 1057
  • A710IS
Regarding the sensor exposure, it may be that the sensor has a 16b internal counter, in 1ms increments, so 65 seconds is the most it can get until the timer overflows. I don't see any other reason why it would stop at this magic number.


Of course, this is software-only limitation.
For example, picture taken with 150s exposure (without dark frame subtraction) - http://ewavr.nm.ru/chdk/for_test/IMG_0260.JPG (4 Mb).
Image quality is really horrible.

How? This is my secret  :).

Well, we call modified SetShutterSpeedWithMecha() (more precisely, modified sub_FFCA4008) in capt_seq_hook_set_nr():

void capt_seq_hook_set_nr(){
 .....
 sub_FFCA4008_my(-694);  // = 150s
 .....
}

sub_FFCA4008_my is exact copy of sub_FFCA4008, except:

ROM:FFCA4060                 MOV     R0, R4         
ROM:FFCA4064                 BL      sub_FFCA5104 ; convert Tv in APEX units to microseconds; limitation is here! 
ROM:FFCA4068                 MOV     R4, R0         

replaced with

                 "MOV     R0, R4\n"
              //   "BL      sub_FFCA5104\n"
                 "LDR     R0, =150*1000000\n"  // exposure time in microseconds
                 "MOV     R4, R0\n"

Of course, this is quick working example only, not complete solution.

edit:

Finally I did it for A710 private build (http://trac.assembla.com/a710/changeset/42).
Here is 160s exposure time with dark frame subtraction : http://ewavr.nm.ru/chdk/for_test/IMG_0271.JPG
Image quality is still very bad.
« Last Edit: 03 / April / 2009, 05:59:55 by ewavr »

Offline Leonardo Miguel Delgado

  • Rookie
  • *
  • Posts: 20
RaduP, yes, on the LCD and the 114/500 telescope (f/4.4 theorical) I can see stars up to magnitude 5 and a little more. Open cluster M7, its brighest stars appear in real time.

ewavr: THIS IS GREAT! I wonder if it's possible to do the same on my A530. Tell me, if it is possible, what can I do to change the exposure time? I'm not a programmer guy, however I'll take a look at your work.

Leo

Offline ewavr

  • Developers
  • Hero Member
  • ****
  • Posts: 1057
  • A710IS
I wonder if it's possible to do the same on my A530.


I'm very unsure about a530, it have different from a710 firmware structure  :(.
Here is test version - http://ewavr.nm.ru/chdk/for_test/a530.zip
Set in extra photo operations:
 - shutterspeed enum type = Factor
 - Value factor = desired factor (10, for example)
 - 0verride shutter speed = desired shutter speed (10, for example; total time in this case is 100s)

If in this case exposure time is still 64s, please write bug-report.
« Last Edit: 03 / April / 2009, 14:14:15 by ewavr »

Offline Leonardo Miguel Delgado

  • Rookie
  • *
  • Posts: 20
Man, you are AWESOME!

It worked right away. I loaded the CHDK like always, and setted the new exposure times, as follows:

30 secs - OK
60 secs - OK
90 secs - OK (!!)
120 secs - OK
180 secs - OK
240 secs - OK
300 secs - OK
480 secs - OK (8 minutes exposure time!!)

Didn't tried more time.

The extended exposure times, I believe, is a feature that must be on the official CHDK releases.

Here I attach some images, with the amp off at ISO 100

A big thank you from Argentina!!

Offline PhyrePhoX

  • Global Moderator
  • Guru Member
  • *****
  • Posts: 2254
  • make RAW not WAR
    • PhyreWorX
niiice.
leonardo - adding this to the main chdk branch certainly would/will take a while, as only a few people are able to do it, as it involves asm "magic" and most certainly a lot of time.

Offline ewavr

  • Developers
  • Hero Member
  • ****
  • Posts: 1057
  • A710IS
Didn't tried more time.


I tried even 10 minutes exposure (+10 minutes dark frame) - http://ewavr.nm.ru/chdk/for_test/IMG_0276.JPG (ISO80, F/8). In this mode battery life is 5-10 shoots  :D.

Quote
The extended exposure times, I believe, is a feature that must be on the official CHDK releases.


This is a lot of work  :(. Now I can add to "official" release a530 and a710 only (diff is attached).
If somebody really needs this feature, please report me via PM or forum.

edit: edit. edit. edit.
« Last Edit: 04 / April / 2009, 06:32:20 by ewavr »

Offline Leonardo Miguel Delgado

  • Rookie
  • *
  • Posts: 20
Thanks ewavr.

If you ever need to do beta testing on other camera models, I have a lot of astro-friends that shoot with A570 (mostly) and A620.

Regards, Leo

Offline RaduP

  • Hero Member
  • *****
  • Posts: 841
Would it be possible to post some long exposure stuff converted from RAW? In the pictures you posted (the 10 minutes exposure), there is a lot of noise sharpening, so 1 bad pixel affects 10-20 pixels.

Offline fudgey

  • Global Moderator
  • Guru Member
  • *****
  • Posts: 1690
  • a570is
I'll try this out for a570 100e today, at first glance it looks very similar to a710 (will update later, I'm posting this to prevent unnecessary duplicate work).

edit: I just did my first 120 second exposure on a570is 100e. :xmas
I'll need to test it a bit more, clean up the code and see if 101a can use the same or almost same code before I post it.
« Last Edit: 04 / April / 2009, 21:05:53 by fudgey »

CHDK Forum


Offline ewavr

  • Developers
  • Hero Member
  • ****
  • Posts: 1057
  • A710IS
Would it be possible to post some long exposure stuff converted from RAW?


RAW is not better than JPEG.
Here is DNG for 10 min exposure - CRW_0276.7z - 6.25MB

Offline A630Lover

  • Full Member
  • ***
  • Posts: 115
Hey, I was wondering...would it be possible to create a b-pose function via remote? Like on a slr, the shutter staying open as long as you do not press the remote button again, or realese the remote button (the former being a better idea, imho)?

Offline Leonardo Miguel Delgado

  • Rookie
  • *
  • Posts: 20
Fudgey, great work!!!

Please, if it's posibble, I'd like to try out your modded CHDK on a A570. I'll beta-test your version too.

PM me or post it here!!

Offline RaduP

  • Hero Member
  • *****
  • Posts: 841
RAW is not better than JPEG.
Here is DNG for 10 min exposure - CRW_0276.7z - 6.25MB


I think it looks much better. The noise pixels are confined to their place, they don't look like big spots on the picture :) That's basically what I hate the most about the camera sharpening.

Offline fudgey

  • Global Moderator
  • Guru Member
  • *****
  • Posts: 1690
  • a570is
Okay, here are a570is 100e and 101a beta binaries (install them over a full CHDK trunk 727 autobuild package). I have shortly tested the 100e one, I don't have access to 101a. Download link:

http://www.zshare.net/download/58199254a416d0fb/

Attached my patch to trunk 727. It includes ewavr's patch, i.e. this should work on all supported a530, a570 and a710 cameras.

It's possible that I have made typos that could cause bugs not present in ewavr's code. That's because I had to do a lot of manual work since I couldn't get the same sort of labeled disassembly from objdump that IDA outputs. I did test both long (up to 3 minutes) and short exposures and everything seemed fine, but I'm sure there are asm snippets there that aren't regularly jumped to in short tests where everything's going smoothly.

edit: updated patch and dl link according to ewavr's fixes below... :)
« Last Edit: 05 / April / 2009, 03:01:15 by fudgey »

Offline ewavr

  • Developers
  • Hero Member
  • ****
  • Posts: 1057
  • A710IS
@ fudgey:

100e/capt_seq.c:

line 645 : "MOV    R1, R4\n"
Original code @0xFFD2467C: "MOV     R0, R4"

line 668: "MOV    R0, #0\n"
original code @0xFFD246CC:  "MOV     R3, #0"

I'll check other code tomorrow. I'm using TortoiseMerge (and IDA+asmify.sh) to verify large pieces of code.

edit:

101a/capt_seq.c:

line 570: "MOV    R1, R4\n"
original code @0xFFD2467C: "MOV    R0, R4\n"
line 593: "MOV    R0, #0\n"
original code @FFD246CC: "MOV    R3, #0\n"
line 678: "BL      sub_ffebcf48\n"
original code @FFEBCFBC: "BL      sub_FFEBCFBC"

Finished.

edit2: diff is attached.
« Last Edit: 05 / April / 2009, 02:43:42 by ewavr »

 


SimplePortal 2.3.3 © 2008-2010, SimplePortal