IXUS 105 / SD1300 IS porting thread - page 5 - DryOS Development - CHDK Forum

IXUS 105 / SD1300 IS porting thread

  • 772 Replies
  • 252871 Views
Re: IXUS 105 / SD1300 IS porting thread
« Reply #40 on: 13 / November / 2010, 12:13:23 »
Advertisements
I've currently got firmware version 1.0.0.0 loaded on the sd1300

I'm aware that many features aren't functioning, but what I really want is exposure override anyways.  Timelapse would be a nice bonus ;)

Re: IXUS 105 / SD1300 IS porting thread
« Reply #41 on: 04 / December / 2010, 02:33:23 »
ok, new source available in http://drop.io/ixus105_sd1300 just download ixus105_0.2.zip and have fun.
I added ptp stuff for easier debug of some stuff, since it's in trunk now.. :)

This version has shoot() fixed, zoom fixed, fl should be ok, gui ok, etc.

tested:
- loading, drawing
- some lua stuff
- exp override

current issues/unfeatures:
- load script = camera shutdown
- save raw = camera shutdown (some stub must be wrong)
- no video override
- edge overlay works but disappears soon
- zebra doesn't seem to be working
- some other overrides does not seem to work correctly

When attempting to compile from your files, a few problems occurred.

V1 of your files include the camera .h modifications, which are not included in v2, btw.

Once adding the camera.h modifications, attempts to compile are met with:

In file included from ubasic.c:51:0:
../../include/platform.h:45:6: error: #error unknown camera processor
In file included from ubasic.c:53:0:
../../include/camera.h:3152:3: error: #error camera type not defined
In file included from ../../include/stdlib.h:1:0,
                 from ubasic.c:55:
../../include/camera.h:3152:3: error: #error camera type not defined
ubasic.c: In function 'factor':
ubasic.c:306:27: error: 'PROPCASE_FOCUS_MODE' undeclared (first use in this func
tion)
ubasic.c:306:27: note: each undeclared identifier is reported only once for each
 function it appears in
ubasic.c:310:27: error: 'PROPCASE_DISPLAY_MODE' undeclared (first use in this fu
nction)
ubasic.c:314:27: error: 'PROPCASE_FLASH_MODE' undeclared (first use in this func
tion)
ubasic.c:318:27: error: 'PROPCASE_SHOOTING' undeclared (first use in this functi
on)
ubasic.c:322:27: error: 'PROPCASE_IS_FLASH_READY' undeclared (first use in this
function)
ubasic.c:326:27: error: 'PROPCASE_IS_MODE' undeclared (first use in this functio
n)
ubasic.c:330:27: error: 'PROPCASE_EV_CORRECTION_1' undeclared (first use in this
 function)
ubasic.c:334:27: error: 'PROPCASE_RESOLUTION' undeclared (first use in this func
tion)
ubasic.c:338:27: error: 'PROPCASE_QUALITY' undeclared (first use in this functio
n)
ubasic.c:342:27: error: 'PROPCASE_ORIENTATION_SENSOR' undeclared (first use in t
his function)
ubasic.c: In function 'set_ev_statement':
ubasic.c:1897:29: error: 'PROPCASE_EV_CORRECTION_1' undeclared (first use in thi
s function)
ubasic.c:1898:29: error: 'PROPCASE_EV_CORRECTION_2' undeclared (first use in thi
s function)
ubasic.c: In function 'set_resolution_statement':
ubasic.c:1930:21: error: 'PROPCASE_RESOLUTION' undeclared (first use in this fun
ction)
ubasic.c: In function 'set_quality_statement':
ubasic.c:1939:21: error: 'PROPCASE_QUALITY' undeclared (first use in this functi
on)
C:\CHDK\gcc451\bin\gmake.exe[2]: *** [ubasic.o] Error 1
C:\CHDK\gcc451\bin\gmake.exe[1]: *** [all-recursive] Error 1
gmake: *** [all-recursive] Error 1



Can you help shed some light on this error? Thanks for your hard work on this, I'm hoping to get automated shooting working soon (timelapse functionality I guess).

*

Offline c10ud

  • ***
  • 245
Re: IXUS 105 / SD1300 IS porting thread
« Reply #42 on: 04 / December / 2010, 05:39:19 »
hello,
this is what i've added in include/camera.h
Code: [Select]
#elif defined (CAMERA_ixus105_sd1300)
    #define CAM_DRYOS_2_3_R39 1
    #define CAM_PROPSET                 3
    #define CAM_DRYOS                   1

    #define CAM_RAW_ROWPIX              4080
    #define CAM_RAW_ROWS                3048

    #undef  CAM_CAN_SD_OVER_NOT_IN_MF
    #undef  CAM_CAN_UNLOCK_OPTICAL_ZOOM_IN_VIDEO

    #define CAM_HAS_VIDEO_BUTTON 1
    #define CAM_VIDEO_QUALITY_ONLY          1
    #undef  CAM_VIDEO_CONTROL
    #define CAM_MULTIPART               1
    #undef  CAM_USE_ZOOM_FOR_MF
    #undef CAM_HAS_ERASE_BUTTON
    #define  CAM_SHOW_OSD_IN_SHOOT_MENU  1
    #define CAM_EXT_TV_RANGE            1
    #define CAM_HAS_ND_FILTER           1

    // pattern
    #define cam_CFAPattern 0x02010100 // Red  Green  Green  Blue
    // color

    #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

    // camera name
    #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
   
    //nandoide sept-2009
    #undef CAM_USES_ASPECT_CORRECTION   
    #undef CAM_USES_ASPECT_YCORRECTION 
    #define CAM_USES_ASPECT_CORRECTION  1  //camera uses the modified graphics primitives to map screens an viewports to buffers more sized
    #define CAM_USES_ASPECT_YCORRECTION  0  //only uses mappings on x coordinate

    //default mappings
    #undef ASPECT_XCORRECTION
    #define ASPECT_XCORRECTION(x)  ( ( ((x)<<3) + (x) )  >>2 )   //correction x*screen_buffer_width/screen_width = x*720/320 = x*9/4 = (x<<3 + x)>>2

    //grids
    #undef ASPECT_GRID_XCORRECTION
    #define ASPECT_GRID_XCORRECTION(x)  ( ((x)<<3)/9  )  //grids are designed on a 360x240 basis and screen is 320x240, we need x*320/360=x*8/9
    #undef ASPECT_GRID_YCORRECTION
    #define ASPECT_GRID_YCORRECTION(y)  ( (y) )       //y correction for grids  made on a 360x240 As the buffer is 720x240 we have no correction here.
   
    //viewport
    #undef ASPECT_VIEWPORT_XCORRECTION
    #define ASPECT_VIEWPORT_XCORRECTION(x) ASPECT_GRID_XCORRECTION(x) //viewport is 360x240 and screen 320x240, we need x*320/360=x*8/9, equal than grids, used by edgeoverlay
    #undef ASPECT_VIEWPORT_YCORRECTION
    #define ASPECT_VIEWPORT_YCORRECTION(y) ( (y) )
    #undef EDGE_HMARGIN
    #define EDGE_HMARGIN 20
   
    //games mappings
    #undef GAMES_SCREEN_WIDTH
    #undef GAMES_SCREEN_HEIGHT
    #define GAMES_SCREEN_WIDTH 360
    #define GAMES_SCREEN_HEIGHT 240
    #undef ASPECT_GAMES_XCORRECTION
    #define ASPECT_GAMES_XCORRECTION(x)   ( ((x)<<1) ) 
    #undef ASPECT_GAMES_YCORRECTION
    #define ASPECT_GAMES_YCORRECTION(y)   ( (y) )  //none

    #define CAM_SYNCH                   1
    #define CAM_CHDK_PTP                1
also,
Code: [Select]
Index: core/kbd.c
===================================================================
--- core/kbd.c (revision 957)
+++ core/kbd.c (local copy)
@@ -111,7 +111,7 @@
 static int nTxtbl[]={0,3,6,9,13,16,20,23};
 #endif
 
-#if defined(CAMERA_ixus870_sd880)
+#if defined(CAMERA_ixus870_sd880) || defined(CAMERA_ixus105_sd1300)
 #define ZSTEP_TABLE_SIZE 10
 static int nTxtbl[]={0,1,2,3,4,5,6,7,8,9};
 #endif
and
Quote
Index: makefile.inc
===================================================================
--- makefile.inc   (revision 957)
+++ makefile.inc   (local copy)
@@ -238,6 +238,9 @@
 #PLATFORM=a2000
 #PLATFORMSUB=100c
 
+#PLATFORM=ixus105_sd1300
+#PLATFORMSUB=100d
+
 #PLATFORM=ixus100_sd780
 #PLATFORMSUB=100c
 
please notice i did the port against revision 957, i'm not sure it will work with latest trunk as i've seen there've been lots of modifications

Re: IXUS 105 / SD1300 IS porting thread
« Reply #43 on: 04 / December / 2010, 13:03:18 »
Thanks for the reply. It does not seem to work with the latest 997 release, so I'll dig up an older copy of 957. Thanks!


Re: IXUS 105 / SD1300 IS porting thread
« Reply #44 on: 04 / December / 2010, 15:25:29 »
I was actually able to compile it under 997 but had to remove the ptp from the spytask, and also there was no camera_set_led function defined under your lib.c  .

I can only get it to boot using autoboot... can't find the "update firmware" option.

Re: IXUS 105 / SD1300 IS porting thread
« Reply #45 on: 05 / December / 2010, 00:25:58 »
I've sat down some more to try to get into the code, but being just a basic c++ coder, I'm not used to handling this much code. Most things make sense, but there are a few things that are confusing such as the location for the file browser code. Is that located in one of the LUA files, or what?

2 questions, if I may.
1. When attempting to use the default.bas script (if it loads on startup at all) it appears to be throwing an error of some sort, as a orange text block appears in the lower left corner. Unfortunately, it;s just an orange block, and no text is visible. Do you know why this is? I've attempted to change the color settings for the OSD and nothing makes this valuable information visible.

2. There seems to be a general issue with the file browser, not just loading scripts. Attempting to use the file browser, or load anything (grids, etc) seems to crash the camera. Any ideas on where to start on diagnostics for this file browser functionality? I've spent an hour and a half trying to read about this issue and came up with nothing. If I knew where the file browser code was, I may be able to strip it down to where I could start seeing where it's crashing the camera. I've tried basic things such as clearing everything outta the script directory, moving the script directory to the root, etc, but the file browser still kills the camera.


To be honest, I don't even need the file browser functionality, since I can adjust the default.bas script to fit my needs for aerial photography, since the camera is pretty much dedicated to that use. If you could assist with #1 this would aid me greatly in this pursuit. Thanks for your work thus far.

*

Offline c10ud

  • ***
  • 245
Re: IXUS 105 / SD1300 IS porting thread
« Reply #46 on: 05 / December / 2010, 05:13:53 »
glad you solved... and yes, i didn't look into "update firmware" feature since i was ok with autoboot, sorry

about the issues you have found: i think there's some wrong stub address.. (see platform/ixus105/100d/stubs_*) the only way i know if test the BIN, indentify which call might be wrong and search in the disasm'd code if that's the right address for the defined call.. i gave up on that one since i almost went crazy for the shoot script issue :p

edit: since it happens when loading the file browser, you should check the code where it's crashing. you can "guess" or maybe use a ROMLOG (but, you should search the forums on how to get it, i only followed the "guess what's wrong" path..:s)

also: i think the square is because of wrong colors in the palette (background same as the text's) but i wouldn't know how to change this either (i'm a first-time porter :))
« Last Edit: 05 / December / 2010, 05:20:15 by c10ud »

Re: IXUS 105 / SD1300 IS porting thread
« Reply #47 on: 07 / December / 2010, 21:18:39 »
Hi,

There is a lot of informations.
So:

1. What do we have actually?
2. What is working and what is not working?
3. Where may we get the files?
4. What is missing before seeing chdk officially supporting 1300IS?

Thanks,



Re: IXUS 105 / SD1300 IS porting thread
« Reply #48 on: 11 / December / 2010, 16:00:56 »
Hi, I just read about this project in the latest iEEE Spectrum magazine, and I have an IXUS105 so am very keen to get this working.
Looks like great work by c10ud so far.
I've only got as far as finding out my Firmware Version GM1.00D (1.0.0.0), Adj Ver.006.010
On Canon IXUS 105
P-ID:31F4 PAL D

Re: IXUS 105 / SD1300 IS porting thread
« Reply #49 on: 12 / December / 2010, 15:49:01 »
Yeah, does anyone have a working build going? Would anyone mind compiling the latest build and posting it here? Thanks!

 

Related Topics


SimplePortal 2.3.6 © 2008-2014, SimplePortal