Author Topic: Ixus970/SD890 porting  (Read 12499 times)

Offline snc

  • Jr. Member
  • **
  • Posts: 64
    • vware
Ixus970/SD890 porting
« on: 27 / February / 2009, 14:24:08 »
Seeing as the Ixus90/SD790 got a lot of attention lately (http://chdk.setepontos.com/index.php/topic,2187.0.html), and it seems to be the "little sister" of the Ixus970, a port of CHDK to it seems in reach. Since the Ixus90 port seems to have been enhanced with loader code from the Ixus85, I wonder if the latest sources of the Ixus90 port are available somewhere (the 90's porting thread doesn't seem to hold the latest version).

Just in case someone knowledgeable (I'm pretty newbie-ish with ARMs) would find some time to aid, I can test firmware version 1.00C on my cam, of which I dumped the firmware some time ago: http://chdk.wikia.com/wiki/SD890.
« Last Edit: 09 / March / 2009, 20:13:58 by snc »

Offline snc

  • Jr. Member
  • **
  • Posts: 64
    • vware
Re: Ixus970/SD890 porting
« Reply #1 on: 09 / March / 2009, 20:16:15 »
After the overwhelming response (0 replies ;)), I decided to give it a try myself. CHDK does now boot on the Ixus 970, the port is _very_ preliminary though. It's not tested _at all_ so far, apart from booting it. Just dropping a note so there is no duplicated effort out there. Will post an update soon, if there is any interest.

Offline edjecadetje

  • Rookie
  • *
  • Posts: 8
Re: Ixus970/SD890 porting
« Reply #2 on: 10 / March / 2009, 00:30:43 »
Hi,
i'm interested.
i does not have any experience with ARM-programming but maybe i can help testing the beta's.
just let me know.

Offline snc

  • Jr. Member
  • **
  • Posts: 64
    • vware
Re: Ixus970/SD890 porting
« Reply #3 on: 10 / March / 2009, 21:01:25 »
Some success so far. The camera boots, taking pictures works, menu works (at least partly). This is pretty much untested since I am having a hard time at work, but it should at least do something... The core is patched for 12 bit RAW support, but taking RAW pictures is totally untested. This is a default build with all the standard options enabled, the files are encoded, so the "firm update" method should work.
Time to get some rest for my eyes...

Offline tom_c

  • Newbie
  • *
  • Posts: 3
Re: Ixus970/SD890 porting
« Reply #4 on: 11 / March / 2009, 02:53:50 »
Woo hoo. Finally someone is working on this. I'll be downloading and having a play over the next few days. If you need a tester let me know.

Thanks.

Offline arbarbarb

  • Newbie
  • *
  • Posts: 3
Re: Ixus970/SD890 porting
« Reply #5 on: 11 / March / 2009, 09:24:13 »
YAY!!!! I've been waiting for this since I got my camera. I'll be downloading and testing as soon as I get a chance. Thank you VERY VERY much for your efforts doing this!  :D

Offline cdc

  • Newbie
  • *
  • Posts: 1
Re: Ixus970/SD890 porting
« Reply #6 on: 12 / March / 2009, 00:02:20 »
Really great news for an Ixus970 user like me. Thanks snc!!!

After your first post I tried to generate a port for the Ixus970 myself. I set up the environment and tried to generate something that is booting on the Ixus970. But I did not succeed. So I gave it up again. That is why I did not give you a response :-).

But I will download your first version and test it. And I will keep in touch with this thread. Maybe I can contribute in any way during the development.

Good luck!

PS: I am really interested in what I did wrong during my try...


Offline snc

  • Jr. Member
  • **
  • Posts: 64
    • vware
Re: Ixus970/SD890 porting
« Reply #7 on: 12 / March / 2009, 14:37:05 »
Some more success, it seems. Updated and verified a couple of addresses in the firmware. If you people want to contribute, read below... Some help would be appreciated. Likely some stuff (think CF_EFL) can be answered quickly by knowledgeable people.

The latest build is in the attachment; DISKBOOT.BIN and PS.FI2 alike.

Things needed:
a) Parameters which can be retrieved more or less easily through EXIF data, as described here: http://chdk.setepontos.com/index.php/topic,300.msg2515.html#msg2515:
  • fl_tbl
  • aperture_sizes_table
  • shutter_speeds_table
b) CF_EFL value, there seems to be none set yet for cams with a 1/2.3" CCD
c) The "modemap" table. Since I am quite the newbie, I dont know how to map the values, the values can be found at address 0xFF87AFE0 in the firmware though.
d) Still need to make sure the hook_raw_image_addr() is correct. Rather sure about 0x107D68C0, the alternative address seems hard to determine; currently I have:
  • return *((int *)0x550C) ? 0x11B97B60 : 0x107D68C0;
« Last Edit: 12 / March / 2009, 15:05:49 by snc »

Offline ewavr

  • Developers
  • Hero Member
  • ****
  • Posts: 1057
  • A710IS
Re: Ixus970/SD890 porting
« Reply #8 on: 12 / March / 2009, 15:12:00 »

c) The "modemap" table. Since I am quite the newbie, I dont know how to map the values, the values can be found at address 0xFF87AFE0 in the firmware though.
d) Still need to make sure the hook_raw_image_addr() is correct. Rather sure about 0x107D68C0, the alternative address seems hard to determine; currently I have:
  • return *((int *)0x54F4) ? 0x11B97B60 : 0x107D68C0;

c) look at propertycase #49 value (in debug menu) in different modes
d) Search table like this (example for SX10)

FFB0B4E8 dword_FFB0B4E8  DCD 1                   ; DATA XREF: ROM:off_FF86A67Co
ROM:FFB0B4EC                 DCD 0x41D7054A
ROM:FFB0B4F0                 DCD 0x40F65B18
ROM:FFB0B4F4                 DCD 0x411379A0
ROM:FFB0B4F8                 DCD 0
ROM:FFB0B4FC                 DCD 0
ROM:FFB0B500                 DCD 0
ROM:FFB0B504                 DCD 2
ROM:FFB0B508                 DCD 0x41D7054A
ROM:FFB0B50C                 DCD 0x40F65B18
ROM:FFB0B510                 DCD 0x411379A0
ROM:FFB0B514                 DCD 0x4332FC32
ROM:FFB0B518                 DCD 0x424F1948
ROM:FFB0B51C                 DCD 0x41ED67C0
ROM:FFB0B520                 DCD 1
ROM:FFB0B524                 DCD 0x41D7054A
ROM:FFB0B528                 DCD 0x40F65B18
ROM:FFB0B52C                 DCD 0x411379A0
ROM:FFB0B530                 DCD 0
ROM:FFB0B534                 DCD 0
ROM:FFB0B538                 DCD 0
ROM:FFB0B53C                 DCD 1
ROM:FFB0B540                 DCD 0x41D7054A
ROM:FFB0B544                 DCD 0x409968E0
ROM:FFB0B548                 DCD 0x40D6C660
ROM:FFB0B54C                 DCD 0
ROM:FFB0B550                 DCD 0
ROM:FFB0B554                 DCD 0

First address (0x40F65B18) is known from 'CRAW Bufffer', second (0x424F1948) can be found using this table (third item after first address).
« Last Edit: 12 / March / 2009, 15:13:32 by ewavr »

CHDK Forum

Re: Ixus970/SD890 porting
« Reply #8 on: 12 / March / 2009, 15:12:00 »

Offline snc

  • Jr. Member
  • **
  • Posts: 64
    • vware
Re: Ixus970/SD890 porting
« Reply #9 on: 13 / March / 2009, 01:33:46 »
Nice, thanks ewavr. This should come in handy for similar cams as well. Seems a much more reliable method than the one used on the Ixus90 (see porting thread).

Current status:
  • RAW addresses verified
  • Modemap table updated
  • Wheel now functional
  • Lots of cleanup in the boot and capture code

Strange? OSD flickers and a bar is shown on bottom left corner of the LCD, when shoot is half-pressed, CHDK OSD disappears, doesn't come back even when the button is released. No clue as to why, at the moment, all the framebuffer addresses & co seem to be alright. Too tired now to check it out...

Offline reyalp

  • Guru Member
  • ******
  • Posts: 4468
Re: Ixus970/SD890 porting
« Reply #10 on: 13 / March / 2009, 08:03:06 »
Bar at bottom left is probably the space display, part of the CHDK OSD.

You may need ScreenLock before RefreshPhysicalDisplay ala 990 (see SD990 stubs_entry_2.S and generic/wrappers.c)
Don't forget what the H stands for.

Offline snc

  • Jr. Member
  • **
  • Posts: 64
    • vware
Re: Ixus970/SD890 porting
« Reply #11 on: 13 / March / 2009, 12:07:56 »
Haha, how embarrassing, didn't even think that the bar could be there intentionally...

Latest updates:
  • aperture_size_table updated (courtesy of user cdc)
  • fl_tbl updated (courtesy of user cdc)
  • CF_EFL value updated, along with focal length calculation
  • ubasic led scripting
  • further cleanup and simplification
  • found pt_playsound - un-nullsubbed it =)

Update: The ScreenLock call did not cure the problem of the OSD disappearing as soon as the shutter button is pressed. Additionally, it simply appears as "overlay" to the Canon OSD in live mode, it seems... Tried a couple of things, but I am quite clueless at the moment.

Latest binary attached, with all the updates mentioned in this and the previous post.
« Last Edit: 13 / March / 2009, 19:34:08 by snc »

Offline edjecadetje

  • Rookie
  • *
  • Posts: 8
Re: Ixus970/SD890 porting
« Reply #12 on: 14 / March / 2009, 12:12:15 »
Wooh,
it's ALIVE.
I have raw file's but they are not usable with photoshop or DPP.
I try to convert them with NG4PS-2 but the files are not listed.

The shutterspeed doesn't get higher them 1/1600 regardless the speed i choose in the menu.

The optical zoom in movie-mode is also not working.

MOTION DETECTION is working, very nice feature!

Futher debugging nessesary. (and less sleep)

The picture beneath:
Shutter 1/1600 - F11
Not really pin-sharp, it's just a test.
« Last Edit: 14 / March / 2009, 21:08:34 by edjecadetje »

Offline snc

  • Jr. Member
  • **
  • Posts: 64
    • vware
Re: Ixus970/SD890 porting
« Reply #13 on: 16 / March / 2009, 15:51:31 »
The 970 sports a 12bit sensor, so the RAW data is 12 bit as well. Refer to other threads in the forum, the ones for the SD990, SX10, or SD790 might be good starting points. You would probably be better off using DNG output.

Shutterspeeds did not go any faster cause I left them out due to some confusion... The next update will contain speeds "up to" 1/3200.

Optical zoom in movie rec mode is unsupported for now, as the movie part hasn't even been touched yet.

Update: Attached latest binary and a patch of the current source code, if someone wants to tinker/help.
« Last Edit: 16 / March / 2009, 22:18:17 by snc »

Offline edjecadetje

  • Rookie
  • *
  • Posts: 8
Re: Ixus970/SD890 porting
« Reply #14 on: 17 / March / 2009, 11:11:54 »
I just got RAW working. :D

Extract the 970IS-RAW-DNG.zip onto you card and run the scriptfile  SCRIPTS / TEST / BADPIXEL.LUA
Let the script run for about a minute, he's taking 2 pictures.
When it's done press SET and go to RAW PARAMETERS.
Select SAVE RAW and DNG FORMAT.

If it's working for other people too then maybe can SNC merge this file into his builds.

« Last Edit: 17 / March / 2009, 12:03:35 by edjecadetje »

 


SimplePortal 2.3.3 © 2008-2010, SimplePortal