IXUS 130 (SD1400 IS) Porting Thread - page 9 - DryOS Development - CHDK Forum
supplierdeeply

IXUS 130 (SD1400 IS) Porting Thread

  • 288 Replies
  • 131309 Views
*

Offline emlyn

  • **
  • 88
Re: IXUS 130 (SD1400 IS) Porting Thread
« Reply #80 on: 14 / November / 2010, 17:59:42 »
Advertisements
You are right, raw isn't working on SD4000 yet.  :'(
But SX210 use simular code and RAW seems to work.
That's strange, but I'll have a look at the sx210 code, maybe there's some detail there that make all the difference...

Quote
I had this issus too.
You need to verify if PARAM_FILE_COUNTER is correct. Use "Debug Paramenters -> Debug data display -> Params" to verify (parameter is a long numer which increase with every shot).
PARAM_FILE_COUNTER seems to be correct, it is a large number, and it increases by 16 with each shot. I think it must be something else in this case.

and raw works too in sd4500,
http://www.4shared.com/file/NSBep9Qn/captseqcixus1000-100D-v003.html
It may help
Thanks, I'll have a look at that.

*

Offline emlyn

  • **
  • 88
Re: IXUS 130 (SD1400 IS) Porting Thread
« Reply #81 on: 14 / November / 2010, 18:20:35 »

*

Offline asm1989

  • *****
  • 527
  • SX720, SX260, SX210 & SX200
Re: IXUS 130 (SD1400 IS) Porting Thread
« Reply #82 on: 15 / November / 2010, 01:37:59 »
about the raw stuff
i need to modify raw.c to save in the right folder, look at sx210 sorce
also check all the file related stubs, take a look slso to my  sorce

hope it helps

*

Offline emlyn

  • **
  • 88
Re: IXUS 130 (SD1400 IS) Porting Thread
« Reply #83 on: 16 / November / 2010, 07:05:05 »
about the raw stuff
i need to modify raw.c to save in the right folder, look at sx210 sorce
also check all the file related stubs, take a look slso to my  sorce

hope it helps

Thanks for the pointer. I've been a bit busy the last few days, so I'm going to wait until I have a bit more time to look into the raw stuff again as I think it might take a while.

In the meantime I've had a quick look into the overrides:
I think I have fl_tbl and CF_EFL sorted. There are only 8 zoom points so I just took a photo at each step and looked at the exif data.
Code: [Select]
// Ixus130 Focal length: 5mm-20mm, 35mm equivalent 28mm-112mm, so:
// CF_EFL = 28/5*10000 = 56000 or 112/20*10000 = 56000
static const int fl_tbl[] = { 5000, 6400, 7400, 9000, 11200, 13000, 15600, 20000 };
#define NUM_FL (sizeof fl_tbl / sizeof *fl_tbl)
#define CF_EFL 56000

The aperture_sizes_table was not so obvious. How do I know if the camera has a diaphragm? I assumed it doesn't and just took two photos at each zoom step (with and without ND filter).
PROPCASE 26 does not change, but 23-25 and 27 all seem to hold the same value, and it looks reasonable compared to other cameras, so I used this.
The ND filter made the pictures obviously darker, but had no effect on the exif data or the PROPCASE, and two of the zoom steps had the same exif data, so for the moment I only have:
Code: [Select]
  {  9, 293, "2.8" },
  { 10, 317, "3.2" },
  { 11, 336, "3.5" },
  { 12, 364, "3.5" },
  { 13, 397, "4.0" },
  { 14, 422, "4.5" },
  { 15, 454, "5.0" },
  { 16, 500, "5.9" },

I still need to test the shutter_speeds_table. I tried a few values, and it seemed to work up to 64 seconds (I haven't yet tested longer, or very short values), but the exif data is not quite right. For long shutter speeds it always records 14 seconds. The other values also seem to be slightly off:
Code: [Select]
override exif
64       14
32       14
16       14
10       9
5        4
2        2
1.3      1
1        1
0.8      1/1
0.1      1/9

For the modemap, there were three modes that I couldn't match to any existing ones, so I added them to modelist.h as: MODE_SMART_SHUTTER (smile detection), MODE_MINIATURE (tilt-shift simulation) and MODE_FISHEYE.
But maybe there are other new cams with these modes that are not yet in svn, in which case I should be consistent with them.


Re: IXUS 130 (SD1400 IS) Porting Thread
« Reply #84 on: 17 / November / 2010, 08:50:27 »
Hi All
I'm back after a while been away from the bits a nuts.

I'm glad to see that the community its growing, this will speed up the whole proccess.

I tried the initial version, 0.9.9 and works great, for the been the initial version.

I put it in the SD card to automatically load chdk all the time.

I test, the calendar, the file explorer some games etc.

I tried the Fast Motion detection (latest version) and it works, not to fast though.

The osd seem small.  still work to do i guess.

histogram works,

ISO doesn't work.

i will continue trying different functions to see what else works.

What I'm keen to try its to compile my one code and start testing or implementing the other functions missed.

So What toolchain are you using?

Anyway beg thanks to emlyn to port this fw
 
I took to photos of the camera running the chdk.

 http://yfrog.com/2g7whaj
http://yfrog.com/186kcpj

Best Regards

UPDATE: I was playing with some scripts, and I found out that the "shoot" function doesnt work, instead im using press and release.   

also set_backlight doesnt work.

hope this helps.
« Last Edit: 17 / November / 2010, 11:29:42 by oskretc »

*

Offline emlyn

  • **
  • 88
Re: IXUS 130 (SD1400 IS) Porting Thread
« Reply #85 on: 18 / November / 2010, 18:54:06 »
The osd seem small.  still work to do i guess.
This is a known problem, the whole CHDK display is squashed into the left-hand two thirds of the screen.

Quote
ISO doesn't work.
Just to clarify, do you mean overriding the ISO value?

Quote
What I'm keen to try its to compile my one code and start testing or implementing the other functions missed.

So What toolchain are you using?
I am using gcc 3.4.6. I installed it on Mac OS X, and wrote up the steps I used here. I previously had it running on Linux in a VM, using these instructions. There is also a page for Windows but I haven't tried it myself.

Quote
UPDATE: I was playing with some scripts, and I found out that the "shoot" function doesnt work, instead im using press and release.   

also set_backlight doesnt work.

hope this helps.
Thanks for the feedback, I've added the issues to my github bug tracker so they don't get forgotten. It would be handy if you could add them yourself when you find more (but you will need to register a github account if you don't already have one).

It's encouraging to see the interest growing :)

*

Offline psc

  • *
  • 14
Re: IXUS 130 (SD1400 IS) Porting Thread
« Reply #86 on: 19 / November / 2010, 10:27:54 »
First af all, since it's my first post, I'd like to congratulate with you guys for the great work!
then...
You should check which version of the Canon firmware your camera has (see here), mine is 1.00c, but I know there is also a version 1.00a out there too. If you don't have 1.00c I don't think my files will work. But hopefully porting to a different version shouldn't be too hard, mainly just changing the function addresses (I think, but I'm not an expert).
My camera has the 100a firmware and indeed your files are not working
I'm not sure what the camera was doing but was not responding at all and it drained all the power from the battery.
So, I tried to change the addresses as specified here (even if I have to admit that my knowledge of C is limited and I have no experience at all of assembler) and I did that for boot.c and capt_seq.c.
Unfortunately it's not clear to me how to change lib.c, stubs_min.S, and stubs_entry_2.S. I compiled it anyway and tried to boot, without luck: it's not crashing, after 1 or to seconds the green led blinks and nothing else happens, but I'm still able to switch on the camera without removing the card or the battery.
By adding blinking leds in the code it seems that the error occurs in the asm part of the sub_ff87a5d8_my() function (I can blink the led before the asm part but not later).
I'm not sure if this approach can give us any results, but I think it was worth a try...

*

Offline emlyn

  • **
  • 88
Re: IXUS 130 (SD1400 IS) Porting Thread
« Reply #87 on: 19 / November / 2010, 18:48:09 »
My camera has the 100a firmware and indeed your files are not working
I'm not sure what the camera was doing but was not responding at all and it drained all the power from the battery.
So, I tried to change the addresses as specified here (even if I have to admit that my knowledge of C is limited and I have no experience at all of assembler) and I did that for boot.c and capt_seq.c.
Unfortunately it's not clear to me how to change lib.c, stubs_min.S, and stubs_entry_2.S. I compiled it anyway and tried to boot, without luck: it's not crashing, after 1 or to seconds the green led blinks and nothing else happens, but I'm still able to switch on the camera without removing the card or the battery.
By adding blinking leds in the code it seems that the error occurs in the asm part of the sub_ff87a5d8_my() function (I can blink the led before the asm part but not later).
I'm not sure if this approach can give us any results, but I think it was worth a try...

You will need to change the other files too, it is probably jumping off into a random part of the firmware due to a wrong address.
Do you have a disassembly of the firmware dump? On the wiki is a script (disassemble.pl) that will generate one with the gnu tools (it is also in the tools subdirectory in my github source). Look at the addresses in the 100c dump, and try to find the equivalent code in the 100a dump, this will give you the correct address to use. If there are strings referenced nearby these are usually a good starting point for searching, sometimes integer constants work too, but they tend to be less constant between firmwares. In my stubs_entry_2.S the comments are what I used to find the address.

Hopefully that will get you started, if you get stuck on any, post them here and I'll try and have a look.


*

Offline emlyn

  • **
  • 88
Re: IXUS 130 (SD1400 IS) Porting Thread
« Reply #88 on: 21 / November / 2010, 18:40:11 »
I think I have fixed the screen resolution, at least the menu looks much better, and things seem to fill up the screen. I'm still not sure about the logo, it still looks squashed compared to the one on this site, and very rough around the edges.
Some of the override tables have also been updated, so other things may work slightly better.
I've uploaded to my downloads page, because even though there's not much new, it's much nicer to work with a readable menu.

*

Offline psc

  • *
  • 14
Re: IXUS 130 (SD1400 IS) Porting Thread
« Reply #89 on: 21 / November / 2010, 21:01:50 »
You will need to change the other files too, it is probably jumping off into a random part of the firmware due to a wrong address.
Ok, I did that, but I think that the real problem was that I replaced the "bl     core_spytask_can_start\n" line in init_file_modules_task() with the address found in the disassembly. Now chdk it's booting, but I still have some problems: the logo is not displaying correctly, I keep seeing the original menu (maybe I'm missing something since I'm new to chdk) behind the chdk's one and the camera it's not saving the shots...

 

Related Topics