supplierdeeply

A430 porting started - histogram working

  • 115 Replies
  • 27983 Views
*

Offline zfeet

  • **
  • 67
Re: A430 porting started - histogram working
« Reply #10 on: 23 / June / 2009, 15:53:36 »
Advertisements
Here's the modified capt_seq.c:

http://www.zshare.net/download/6176847212857357/

*

Offline zfeet

  • **
  • 67
Re: A430 porting started - histogram working
« Reply #11 on: 23 / June / 2009, 16:43:36 »
Still cannot compile a firmware that boots. Could you please upload your debs so I can test with those.

Re: A430 porting started - histogram working
« Reply #12 on: 23 / June / 2009, 17:49:21 »
Still cannot compile a firmware that boots. Could you please upload your debs so I can test with those.
Sure, here they are: http://www.zshare.net/download/6177271975b721aa/ . Both debs that are contained are not regular debian packages: For instance, they don't list their dependencies.

You should first install binutils and the compiler afterwards. When you install the compiler, issue a --force-all to dpkg, as it will complain about a duplicate file otherwise. Both packages will install to /opt/chdk, so you must adapt our $PATH variable before doing any compilation.

Have fun!  :D
« Last Edit: 23 / June / 2009, 17:52:16 by shentey »

*

Offline zfeet

  • **
  • 67
Re: A430 porting started - histogram working
« Reply #13 on: 24 / June / 2009, 05:13:17 »
Nope, still doesn't work. I think the we are using different SVN versions of the CHDK source so could you please upload your whole CHDK tree. I can't think of anything else that could be wrong.


Re: A430 porting started - histogram working
« Reply #14 on: 24 / June / 2009, 18:23:29 »
Sorry that I only did add the changes for the camera itself. I've now checked in the relevant rest of the CHDK into the repository. For me, everything compiles cleanly. Don't forget to place the PRIMARY.BIN into the platform/a430/sub/100b directory.

Cheers
« Last Edit: 24 / June / 2009, 18:29:00 by shentey »

*

Offline zfeet

  • **
  • 67
Re: A430 porting started - histogram working
« Reply #15 on: 24 / June / 2009, 23:55:22 »
It works now, thanks a lot!

*

Offline zfeet

  • **
  • 67
Re: A430 porting started - histogram working
« Reply #16 on: 25 / June / 2009, 09:49:50 »
I managed to compile capt_seq.c and camera boots correctly when tCaptSeqTa was uncommented. When shooting RAW though the process starts and the "printer" button turns to blue and the DCIM/100CANON folder is created but then the camera crashes and I have no idea what causes it. No file is created in the SD card.

Here's a small fix to capt_seq.c

Original:

Code: [Select]
void __attribute__((naked,noinline)) sub_FFD297A4_my(long p)
{
  asm volatile (
              "STMFD   SP!, {R4,LR}\n"
              "LDR     R4, [R0,#0xC]\n"
              "BL      sub_FFD32564\n"
              "CMP     R0, #0\n"
              "BNE     loc_FFD297BC\n"
              "BL      sub_FFD32570\n"
    "loc_FFD45060:\n"

Should be:

Code: [Select]
void __attribute__((naked,noinline)) sub_FFD297A4_my(long p)
{
  asm volatile (
              "STMFD   SP!, {R4,LR}\n"
              "LDR     R4, [R0,#0xC]\n"
              "BL      sub_FFD32564\n"
              "CMP     R0, #0\n"
              "BNE     loc_FFD297BC\n"
              "BL      sub_FFD32570\n"
    "loc_FFD297BC:\n"  <----This has to be corrected
 

*

Offline zfeet

  • **
  • 67
Re: A430 porting started - histogram working
« Reply #17 on: 25 / June / 2009, 15:36:34 »
Here's corrected movie_rec.c. Now it is possible to record videos! Raw still not working...

http://www.zshare.net/download/6185679494ad58f5/


*

Offline zfeet

  • **
  • 67
Re: A430 porting started - histogram working, RAW working!
« Reply #18 on: 25 / June / 2009, 22:57:19 »
I found the place that caused shooting RAW to crash. This camera is really a lot like a540.

PARAM_FILE_COUNTER in shooting.c has to be 0x34

Edit: Shooting RAW does not work. The file is created in DCIM/100CANON but the camera creates also corresponding jpg to 101CANON, so something is wrong somewhere.

Here's an example raw file:

http://www.zshare.net/download/6186996263a26d14/

Here it is developed, I guess some of the values are incorrect as the bottom of the picture is incorrect.

http://www.zshare.net/image/6187044300d6b872/
« Last Edit: 25 / June / 2009, 23:43:38 by zfeet »

*

Offline zfeet

  • **
  • 67
Re: A430 porting started - histogram working
« Reply #19 on: 26 / June / 2009, 07:08:26 »
One of the problems with the pictures is that the values in camera.h were incorrect, the correct values for JPEG should be what I've entered but I have no idea how to calculate CAM_RAW_ROWPIX and CAM_RAW_ROWS and the search function doesn't seem to work at the moment. Also CAM_ACTIVE_AREA_X2 and CAM_ACTIVE_AREA_Y2 need correct values.

Code: [Select]
    #define CAM_RAW_ROWPIX              2272   // for 4 MP 1/3" sensor size
    #define CAM_RAW_ROWS                1704   // for 4 MP 1/3" sensor size
    #define CAM_JPEG_WIDTH  2272
    #define CAM_JPEG_HEIGHT 1704
    #define CAM_ACTIVE_AREA_X1 6
    #define CAM_ACTIVE_AREA_Y1 6
    #define CAM_ACTIVE_AREA_X2 2298
    #define CAM_ACTIVE_AREA_Y2 1728

 

Related Topics