SX260 HS Porting Thread - page 14 - DryOS Development - CHDK Forum

SX260 HS Porting Thread

  • 642 Replies
  • 221049 Views
*

Offline asm1989

  • *****
  • 527
  • SX720, SX260, SX210 & SX200
Re: SX260 HS Porting Thread
« Reply #130 on: 24 / April / 2012, 13:02:16 »
Advertisements
@phil
mkdir  seams to work, but I have to modify the original wrapper.c,
Code: [Select]
long mkdir(const char *dirname)
{
return _mkdir(dirname);  //asm1989 TESTING
//return _MakeDirectory_Fut(dirname,-1); // meaning of second arg is not clear, firmware seems to use -1
}

Is there another way to do it without modifiing the original generic\wrapper.c ?

Target dir shows (not g12 yet) : A/DCIM/%03dCANON, will try G12 version


Also I want to use the playback button to start chdk menu instead of video:

KEY_DISPLAY is the same as KEY_PLAYBACK ? 
and how do I set up the delay so if you press some time start chdk and short normal usage?




*

Offline srsa_4c

  • ******
  • 4451
Re: SX260 HS Porting Thread
« Reply #131 on: 24 / April / 2012, 13:25:24 »
mkdir  seams to work, but I have to modify the original wrapper.c,

Is there another way to do it without modifiing the original generic\wrapper.c ?
Yes, put an NHSTUB override for MakeDirectory_Fut into stubs_entry_2.S (use the address of mkdir). If mkdir really only takes 1 parameter and the original MakeDirectory_Fut takes 2, it shouldn't cause problems (the second one will get ignored).

Quote
KEY_DISPLAY is the same as KEY_PLAYBACK ?
If your cam has both a DISP and PLAY button, then not.

Quote
and how do I set up the delay so if you press some time start chdk and short normal usage?
I may be wrong, but it's handled by the CHDK core, you don't have to care about it.

*

Offline funnel

  • ****
  • 349
Re: SX260 HS Porting Thread
« Reply #132 on: 24 / April / 2012, 13:53:15 »
Quote
   
Quote
and how do I set up the delay so if you press some time start chdk and short normal usage?

I may be wrong, but it's handled by the CHDK core, you don't have to care about it.

I noticed in the ixus230 kbd.c is using some additional code to handle the hold video button press. Maybe you need to do the same thing if it doesn't work by itself like on other cameras.

http://trac.assembla.com/chdk/browser/trunk/platform/ixus230_elph310hs/kbd.c#L123
« Last Edit: 24 / April / 2012, 13:55:50 by funnel »

*

Offline asm1989

  • *****
  • 527
  • SX720, SX260, SX210 & SX200
Re: SX260 HS Porting Thread
« Reply #133 on: 24 / April / 2012, 13:58:30 »
thanks srsa_4c

Tryed the NHSTUB first, but hangs and dosnt create the directories I thought it was due to the second parameter?

Sorry yes sx260 has DISP and PLAY, I will try to disable play to find its numbers with onscreendebug

Funnel I was using REC as the chdk menu but then even If I switch to video record mode the shutter acts for taking pictures instead of record video, so need to change it.

I'm also working with the modes and find 2 new for this cam that should go in modelist.h (someone who updates it anytime)

Code: [Select]
    MODE_SCN_SOFTFOCUS     , // sx260
    MODE_SCN_SMOOTH_SKIN   , // sx260


*

Offline srsa_4c

  • ******
  • 4451
Re: SX260 HS Porting Thread
« Reply #134 on: 24 / April / 2012, 14:21:44 »
Tryed the NHSTUB first, but hangs and dosnt create the directories I thought it was due to the second parameter?
If so, that's probably due to some thumb->arm magic (never looked into those). Try to encapsulate mkdir into a platform function (wrappers.c for your cam), and use that in the NHSTUB.
Quote
Funnel I was using REC as the chdk menu but then even If I switch to video record mode the shutter acts for taking pictures instead of record video, so need to change it.
In your platform kbd.c, in my_kbd_read_keys() filter out the ALT button, as some other ports do, after if (kbd_process() == 0)

*

Offline asm1989

  • *****
  • 527
  • SX720, SX260, SX210 & SX200
Re: SX260 HS Porting Thread
« Reply #135 on: 24 / April / 2012, 14:34:47 »
srsa_4c  I will try to encapsulate it

The CHDK button changed correctly to PLAYBACK soft press, and video gets back to original use

The Video quality change seams to work well, only hangs If I enable the remove time limit, need to check it.

Included all the Modes in shotting.c too.

Attached latest sources & bin ( alpha testers welcome to test out what works and dont)

Only works autoload up to 32GB SD,

I will need some of the chdk gurus to see why FI2 dosnt work to manualy load CHDK
 ( I have a 128GB SD I cant test since it's exFat and autoload fails)

The problem seems the FI2 format has changed in this cam, since the keys seams right.

*

Offline asm1989

  • *****
  • 527
  • SX720, SX260, SX210 & SX200
Re: SX260 HS Porting Thread
« Reply #136 on: 24 / April / 2012, 16:11:53 »
About the RAW stuff only works for now If you create each time you start the camera a badpixel bin (its 0bytes dont know why), and If you have a folder 100CANON created.

I think this maybe wrong:

Code: [Select]
#define PARAM_EXPOSURE_COUNTER  0x02
since monitoring the parameter 2 dosnt change with diferent exposures

*

Offline philmoz

  • *****
  • 3450
    • Photos
Re: SX260 HS Porting Thread
« Reply #137 on: 24 / April / 2012, 17:50:56 »
@phil
mkdir  seams to work, but I have to modify the original wrapper.c,
Code: [Select]
long mkdir(const char *dirname)
{
return _mkdir(dirname);  //asm1989 TESTING
//return _MakeDirectory_Fut(dirname,-1); // meaning of second arg is not clear, firmware seems to use -1
}

Is there another way to do it without modifiing the original generic\wrapper.c ?

The firmware mkdir function takes two parameters so this is not likely to work properly.
The firmware seems to call mkdir with values of 0 and 1 as the second parameter.

Quote
Target dir shows (not g12 yet) : A/DCIM/%03dCANON, will try G12 version


That's the default used in the raw code when you don't specify the option to save the raw with the jpeg.
I meant put in a diagnostic that calls get_target_dir_name and display the result (best place is in the gui_draw_debug_vals_osd function.

Phil.
CHDK ports:
  sx30is (1.00c, 1.00h, 1.00l, 1.00n & 1.00p)
  g12 (1.00c, 1.00e, 1.00f & 1.00g)
  sx130is (1.01d & 1.01f)
  ixus310hs (1.00a & 1.01a)
  sx40hs (1.00d, 1.00g & 1.00i)
  g1x (1.00e, 1.00f & 1.00g)
  g5x (1.00c, 1.01a, 1.01b)
  g7x2 (1.01a, 1.01b, 1.10b)


*

Offline asm1989

  • *****
  • 527
  • SX720, SX260, SX210 & SX200
Re: SX260 HS Porting Thread
« Reply #138 on: 25 / April / 2012, 01:04:28 »
Code: [Select]
The firmware seems to call mkdir with values of 0 and 1 as the second parameter
I can call the mkdir with only 1 arg,   

in lolevel.h the definition of mkdir includes only 1 parameter, changed to test:
extern long _mkdir(const char *dirname,int unk);

But It dosnt seem to be the problem with raw stuff, looks to be related to

get_file_next_counter  or get_target_dir_name

Since it crashed I cant use the debug osd I use
Code: [Select]
  int fd2;
     fd2 = open("A/test.dat", O_WRONLY|O_CREAT, 0777);
write(fd2, dir, strlen(dir));
close(fd2);


*

Offline asm1989

  • *****
  • 527
  • SX720, SX260, SX210 & SX200
Re: SX260 HS Porting Thread
« Reply #139 on: 26 / April / 2012, 16:03:53 »
GetImageFolder in sx260 @FF187254 finsig, looks like having more parameters than in other cams like sx40?
sorry  looks the same

trying to trace back the starting error in raw and looks like its in  _GetImageFolder or get_file_counter

Romlog is

Code: [Select]
ASSERT!! FsIoNotify.c Line 460
Occured Time  2012:04:25 18:49:12
Task ID: 17956904
Task name: SpyTask
SP: 0x0057978C
StackDump:
0x00000000
0xFF05D744
0x000001CC
0x00000000
0x00000003
0x00000101
0x001CD418
0x000001FF
0x00000000
0x19980218
0x19980218
0xFF05D8A8
0x00000003
0x001CD418
0x00000101
0x00000001
0x000001FF
0xFF021CA0
0x001C8808
0x001CD428
0x001C3C53
0x00000102
0x19980218
0x19980218
0x19980218
0x001A6348
0x0019B985
0x001C3EA3
0x19980218
0x44000000
0x4ADB54A0
0x006875C8
0x006875C8
0x60000013
0x001CC3A8
0x000005F8
0x0068592C
0x00000014
0x0068C32C
0x001CCF60
0x001CC3A8
0x000005F8
0x00000102
0x00193BE1
0x0055E21C
0x19980218
0x19980218
0x19980218
0x0068738C
0x19980218
0x19980218
0x00002008
ShootConDump:
01 02 07 08 09 0a 0c 0b 0f 0f
CameraConDump:
07 0a 02 0d 09 01 0f 0f 0f 0f
« Last Edit: 26 / April / 2012, 16:10:53 by asm1989 »

 

Related Topics


SimplePortal 2.3.6 © 2008-2014, SimplePortal