A2000IS porting - DryOS Development - CHDK Forum supplierdeeply

A2000IS porting

  • 95 Replies
  • 61364 Views
*

Offline iax

  • *
  • 45
A2000IS porting
« on: 28 / August / 2009, 18:26:14 »
Advertisements
I am working on a port of CHDK for the A2000IS (firmware version 1.00C).

This is the actual status of the project:

- CHDK loads successfully with DISKBOOT.BIN without capture and movie extensions loaded
- After the first tests CHDK ALT menu looks fully functonal
- I had not time to test everything, anyway some CHDK features like live histogram work fine

Next steps I am going to take:

- fix the camera modes mappings (only few of the camera modes look functional now)
- code the capture tasks and have support for RAW (I already have the code almost done for that).

I am attaching here the diskboot.bin file just in case someone could be interested. Please remember that this is just a very very early version, I did not have time to test everything, several features are broken or disabled. Use at your risk :)

Any feedback appreciated. I plan to post the source code just after completion of the two tasks below and some more testing.


« Last Edit: 01 / September / 2009, 03:35:46 by iax »

*

Offline iax

  • *
  • 45
Re: The A2000IS porting thread...
« Reply #1 on: 29 / August / 2009, 19:43:18 »
Some progress

- all shooting modes now supported
- RAW supported in CRW format. Tested with Raw Therapee

I have problems with DNG

- when running the badpixel.lua script, camera crashes. If I remove the set_tv96_direct(96) call the script works fine, so I guess the problem is in changing the TV propset...however there is little CHDK involved here. Could be a camera limitation?

- The DNG I get have completely wrong color balance (blue channel almost absent, they are mostly green)

I guess the second problem is about colormatrix and/or cam_CFAPattern. Is there any method to detect the camera values from firmware, or other?

Any hint appreciated.
Attaching update diskboot.bin


*

Offline reyalp

  • ******
  • 14080
Re: The A2000IS porting thread...
« Reply #2 on: 29 / August / 2009, 20:18:22 »
Please provide sources with your diskboots. A number of ports have been abandoned ports part way through, leaving only half complete binaries (it's also technically required by the GPL). You can add the source files in your SVN working copy and then make a diff, or just zip the platform and loader directories. (you may have to clean out the binaries to get under the attachment size limit)

Re set_tv96:
- could be a bug in your override code (should be added in capt_seq.c). Check if shutter override in the CHDK menu works, and if other overrides work.
- use the propcase viewer to make sure this propcase actually reflects the Tv in normal operation. Maybe canon has changed the numbering again.
- Make sure your propcase function addresses are right (although I'd expect things to have failed catastrophically if they weren't)

Re cam_CFAPattern, AFAIK there are only two likely options, and ISTR it was obvious when I had the wrong one.
    #define cam_CFAPattern 0x02010100 // Red  Green  Green  Blue
    #define cam_CFAPattern 0x01000201 // Green  Blue  Red  Green

Re color matrix, the dng and color calibration threads may help.
http://chdk.setepontos.com/index.php/topic,390.0.html
http://chdk.setepontos.com/index.php/topic,156.0.html
and maybe http://chdk.setepontos.com/index.php/topic,2972.msg30226.html#msg30226
Don't forget what the H stands for.

*

Offline iax

  • *
  • 45
Re: The A2000IS porting thread...
« Reply #3 on: 30 / August / 2009, 19:16:29 »
thanks for your great support!

still stuck on the overrides problem. firmware changes looks ok, indeed they are pretty much the same as the sx110. but when i try to set an override (t or v) camera crashes when I half press the shoot button.

i suspect there there is something in shooting_expo_param_override() that my camera does not like, going to try to fix as next task.

i am attaching my source code, both platform and loader.

and this is my section in camera.h

Code: [Select]
#elif defined (CAMERA_a2000)

    #define CAM_PROPSET                 2
    #define CAM_DRYOS                   1

    #define CAM_RAW_ROWPIX              3720 
    #define CAM_RAW_ROWS                2772 

    #undef  CAM_UNCACHED_BIT  // shut up compiler
    #define CAM_UNCACHED_BIT    0x40000000

    #define DNG_SUPPORT                 1

// Color still to be fixed...
    #define cam_CFAPattern 0x02010100 // Red  Green  Green  Blue
    #define CAM_COLORMATRIX1                               \
      827547, 1000000, -290458, 1000000, -126086, 1000000, \
     -12829,  1000000, 530507,  1000000, 50537,   1000000, \
      5181,   1000000, 48183,   1000000, 245014,  1000000

    #define cam_CalibrationIlluminant1 1 // Daylight

    // cropping
    #define CAM_JPEG_WIDTH  3648
    #define CAM_JPEG_HEIGHT 2736
    #define CAM_ACTIVE_AREA_X1 6
    #define CAM_ACTIVE_AREA_Y1 12
    #define CAM_ACTIVE_AREA_X2 3690
    #define CAM_ACTIVE_AREA_Y2 2772

    #define PARAM_CAMERA_NAME 4 // parameter number for GetParameterData

    #undef  CAM_SENSOR_BITS_PER_PIXEL
    #undef  CAM_WHITE_LEVEL
    #undef  CAM_BLACK_LEVEL
    #define CAM_SENSOR_BITS_PER_PIXEL   12
    #define CAM_WHITE_LEVEL             ((1<<CAM_SENSOR_BITS_PER_PIXEL)-1)
    #define CAM_BLACK_LEVEL             127

btw CHDK is gteat  :)


*

Offline iax

  • *
  • 45
Re: The A2000IS porting thread...
« Reply #4 on: 31 / August / 2009, 05:18:21 »
probably found the problem about overrides, I think I might have a bug in my SetPropertyCase mapping to firmware.

will check this later ...

*

Offline iax

  • *
  • 45
Re: The A2000IS porting thread...
« Reply #5 on: 31 / August / 2009, 17:06:58 »
Progress:

- All overrides problems fixed (was a bug in SetPropertyCase function address...)
- Problems with badpixel.lua script fixed
- All DNG color problems fixed. (took the correct color parameters from ixus870_sd880 which AFAIK should have the exact same sensor). Generated DNGs look good with Raw Therapee and Adobe Camera Raw

Attaching latest diskboot, source code, and this is the updated section in camera.h

Code: [Select]
#elif defined (CAMERA_a2000)

////////////////////////////////
// Sure values
////////////////////////////////
    #define CAM_MAKE                    "Canon"
    #define CAM_PROPSET                 2
    #define CAM_DRYOS                   1

    #define CAM_RAW_ROWPIX              3720 
    #define CAM_RAW_ROWS                2772 

    #define CAM_JPEG_WIDTH  3648
    #define CAM_JPEG_HEIGHT 2736
   
    #define DNG_SUPPORT                 1

    #define PARAM_CAMERA_NAME 4 // parameter number for GetParameterData

    ////////////////////////////////
    // Almost sure, sensor data taken from
    // ixus870_sd880 which should have same sensor..
    ////////////////////////////////
    #undef CAM_SENSOR_BITS_PER_PIXEL
    #undef CAM_WHITE_LEVEL
    #undef CAM_BLACK_LEVEL
    #define CAM_SENSOR_BITS_PER_PIXEL   12
    #define CAM_WHITE_LEVEL             ((1<<CAM_SENSOR_BITS_PER_PIXEL)-1)
    #define CAM_BLACK_LEVEL             127
   
    #define cam_CFAPattern              0x02010100 // Red  Green  Green  Blue
    #define CAM_COLORMATRIX1                               \
      827547, 1000000, -290458, 1000000, -126086, 1000000, \
     -12829,  1000000, 530507,  1000000, 50537,   1000000, \
      5181,   1000000, 48183,   1000000, 245014,  1000000
    #define cam_CalibrationIlluminant1  1 // Daylight

////////////////////////////////
// Unsure
////////////////////////////////
    #undef  CAM_UNCACHED_BIT
    #define CAM_UNCACHED_BIT    0x40000000

    // cropping (from ixus870_sd880)
    #define CAM_ACTIVE_AREA_X1          14
    #define CAM_ACTIVE_AREA_Y1          8
    #define CAM_ACTIVE_AREA_X2          3682
    #define CAM_ACTIVE_AREA_Y2          2764

*

Offline iax

  • *
  • 45
Re: A2000IS porting
« Reply #6 on: 01 / September / 2009, 17:00:27 »
Progress:

- Movie task completed
- Code integrated and tested with the latest CHDK trunk revision 795

Attaching latest diskboot and patch file


Re: A2000IS porting
« Reply #7 on: 07 / September / 2009, 03:22:47 »
well done
it loads also on my a2000 IS with fw 1.00B
haven't tried anything more yet, some more feedback will follow the next days

if you want anything special tested, just tell me  :D
« Last Edit: 07 / September / 2009, 03:26:02 by dabbeljuh »
Canon Powershot A2000 IS (GM 1.00B)


Re: A2000IS porting
« Reply #8 on: 07 / September / 2009, 04:32:56 »
Hello all, sorry for the noobish intrusion but I just purchased an a2000is and I'd like to try this beta.  After searching, reading the faq, and several threads in the noob area of this site, I'm still not clear on what I'd need in addition to the diskboot.ini offered here to make it work with my camera.  I've already confirmed my version is indeed 1.00C.  Do I start with a stable 1.00C build from another camera and then overwrite the diskboot.ini from it with the one offered here?  Are all the files in the CHDK directory that will end up on the SD card available in one of the zips in this thread, if not can you point me to the .zip I need to extract that has the actual ../CHDK folder on it?  I'm new to all this but I'm a quick study and feel like I'm just missing one little piece of info that would make all of this make sense.  Thanks for any advice, and also thank you to any and all developers involved :D

Re: A2000IS porting
« Reply #9 on: 07 / September / 2009, 04:50:04 »
i'm not a pro for myself, but i think you should succeed by following these instructions here (if you are running windows): http://chdk.wikia.com/wiki/CHDK_for_Dummies#Let.27s_put_the_CHDK_in_the_card

instead of downloading the CHDK(number 10), you take the ZIP-File posted by iax above

EDIT: The ZIP-File I meant was the DISKBOOT.zip posted by iax in reply #6. (The other file contains just his changes in the code) If you take this file and follow the instructions, it will work (at least it worked with my cam)
« Last Edit: 07 / September / 2009, 05:36:27 by dabbeljuh »
Canon Powershot A2000 IS (GM 1.00B)

 

Related Topics