CHDK Forum

CHDK Development => General Discussion and Assistance => DryOS Development => Topic started by: MrSpoon on 24 / March / 2009, 17:29:20

Title: A470 Porting
Post by: MrSpoon on 24 / March / 2009, 17:29:20
Title: Re: A470 Porting
Post by: PhyrePhoX on 24 / March / 2009, 19:42:31
sounds like ur having fun digging through asm code. always nice to have new people "join the chdk army".
welcome and good luck with your project :)
Title: Re: A470 Porting
Post by: MrSpoon on 25 / March / 2009, 21:32:41
I'm basing my work on the A720 code. I've got a bit further, edited lib.c and stubs_min.c, right now it looks like Im not getting to entry.S in core though.

My makefile.inc is as follows:
Code: [Select]
#317A
PLATFORMID=12666

PLATFORMOS=dryos

MEMBASEADDR=0x1900
RESTARTSTART=0x49000
MEMISOSTART=0xA5798
ROMBASEADDR=0xffc00000

I'm still feeling around the boot process, bit stumped for the moment though, can't see what's wrong with it :(

EDIT: I gave copy_and_restart a test function to turn on an LED and the camera restarted to it :) Realised I'm using binutils 2.19 which as mentioned in the A580 thread, does crazy things to main.bin! Rebuilding binutils now...

RE-EDIT: I get as far as calling CreateTask_PhySw(); and then the camera turns off, I've still got a lot more stuff to do though.
Title: Re: A470 Porting
Post by: MrSpoon on 30 / March / 2009, 17:47:27
Yey, got the camera booting without the hooks :D

*stares lovingly at the splash screen*
Title: Re: A470 Porting
Post by: whim on 30 / March / 2009, 18:08:40
congrats MrSpoon !


wim

Title: Re: A470 Porting
Post by: IsaacD on 30 / March / 2009, 19:05:08
Keep up the great work on the firmware!

I know I'm a new user, but have been following the CHDK sites and forums since getting a A470 (I had a A460 which broke in the first 2 weeks and it was replaced with the A470...no firmware :( ) so hopefully after close to a year, you'll have a CHDK firmware ready for it! :D

Great progress, mate.
Title: Re: A470 Porting
Post by: MrSpoon on 31 / March / 2009, 10:03:59
Yey, just been using CHDK for the very first time, took some auto-bracketed pics with my A470 :D

I've attached an alpha diskboot.bin, I was really wanting to get auto-bracketing working though and I've disabled a lot, so don't expect much to work :-[

EDIT: file removed, out of date.
Title: Re: A470 Porting
Post by: alanfortune on 01 / April / 2009, 07:08:26
Hi, great to see someone porting to the A470. I originally bought a Fuji S5700 which I had assumed took RAW mode images. I was very disappointed with the over-compressed Jpegs. I bought an A470 after using my son's. It takes excellent images but CHDK would be the icing on the cake.

I downloaded the DISKBOOT.BIN file and the other bits from the A720 port but we keep getting a File Error when trying to update our v1.02c camera. I realise its an alpha version but we're happy to test it and report bugs etc. As this is not a full package, could we be using the wrong files from the A720?
Title: Re: A470 Porting
Post by: Ambient Light on 01 / April / 2009, 07:13:14
Great work! I'll try this when I get home. I've dumped my firmware (got different checksum?) and installed necessary tools. I hope I may be able to help in some way. You seem to have got quite far. I've never attempted anything like this. Cheers.
Title: Re: A470 Porting
Post by: MrSpoon on 01 / April / 2009, 07:20:23
Hey, sorry I didn't make the alpha very user friendly I guess.

To install CHDK you can follow the "CHDK for Dummies (http://chdk.wikia.com/wiki/CHDK_for_Dummies)" guide. If you install the A720 version of CHDK onto your SD card using that guide, you should then be able to just replace the diskboot.bin file with the one I attached. With the SD card 'locked' the camera will boot up and hopefully you'll see the CHDK splash screen!

Note that I haven't yet got round to adding SDHC/partitioning support, so it'll only work on an SD card for now
Title: Re: A470 Porting
Post by: alanfortune on 01 / April / 2009, 16:49:39
Did what you said...everything worked fine. Up came CHDK with most features. Tried RAW mode which seemed to work but we've tried 6 or more programs and nothing will convert or read it. None seem to support the A470, at least not yet.

Thanks for your help, we can't wait for the final version. I used to dabble in Z80 code many moons ago, I'm glad you've volunteered to port to the A470, the code's a bit beyond my aging brain.
Title: Re: A470 Porting
Post by: MrSpoon on 01 / April / 2009, 18:11:51
Ah, I've attached a new version for you, the code's the same but I've compiled it with a bunch more options enabled. LUA should work so you can run the bad pixels script and then save your files as DNG 8)

The games are enabled but won't work, they seem to check modes before running, so they'll have to wait until I get around to the mode map.

I haven't touched the video recording stuff yet, so that won't work. Other than that there's a bunch of camera-related information I mostly fudged, Im no camera buff so left them until I got most other stuff working.

So yeah, this is the only build of CHDK I've ever seen, so other than the above, let me know what's wrong and missing! :D Also after I do the movie_rec.c file I'll generate a diff file so other people can look over my work and make corrections :-[

EDIT: Just for clarity, the attached file is for A470 v1.02c
Title: Re: A470 Porting
Post by: alanfortune on 01 / April / 2009, 19:12:01
Thanks, we're testing it now but for some reason the locked SD card won't allow the A470 to switch on. We reloaded the previous BIN and it started OK.

The latest file is bigger, is this correct? Wish we could help with the code but I'm more Photographer than Coder.
Title: Re: A470 Porting
Post by: MrSpoon on 01 / April / 2009, 19:19:33
Sorry about that, the file didn't upload properly :blink: it should work now!
Title: Re: A470 Porting
Post by: Husky on 01 / April / 2009, 21:45:54
Sorry about that, the file didn't upload properly :blink: it should work now!

Hello i'm new on this stuff. Let me asking something.
Where i can find the CHDK for my PowerShot A470? My firmware is: GM1.01b
This CHDK will change my firmware?
Thank you all.
Title: Re: A470 Porting
Post by: alanfortune on 02 / April / 2009, 04:12:47
Thanks for the new upload. My chief tester is snoring at the moment, so we'll report back later.

Husky, I believe MrSpoon is working on vers. 1.02c  I'm not sure if it'll run on 1.01b He will tell you yes or no. Its getting there with 1.02c, new features being added all the time.

If you do what he's posted above (CHDK for Dummies etc) using CHDK for A720, substitute the latest DISKBOOT.BIN (above) and try it. It won't break your camera. Let us know what works and what doesn't.
Title: Re: A470 Porting
Post by: alanfortune on 02 / April / 2009, 08:21:15
OK, been testing the latest build which has many more functions. One oddity is that it takes a couple of shots every time you switch on the camera and use CHDK. I've now got the pdf manual to study all the functions. The menu (CHDK) jumps down four steps but up is one step.

Thank you MrSpoon, you're not far from an official version. I reckon all of us A470 users owe you a drink!
Title: Re: A470 Porting
Post by: MrSpoon on 02 / April / 2009, 09:17:40
As it happens my sister has the 1.01b version, I dumped its firmware a long time ago but haven't had access to it since to port CHDK. I'll be visiting her over easter so hopefully I'll find time to port that version then. :)

I noticed the menu bug, you say the camera actually takes some photos when it boots? ??? I can't reproduce that behaviour. I've just started movie_rec.c, once I've done that I'll upload source/diffs so we can find bugs and fix fudged constants.
Title: Re: A470 Porting
Post by: MrSpoon on 02 / April / 2009, 12:58:36
Meh, its been too much of a nice day to do porting. So here's the port so far, if anybody feels like working on it or adding support for another version:

First you'll need a development environment, follow this guide (http://chdk.wikia.com/wiki/User:Geekmug/Compiling_CHDK_under_Windows) but install "patchutils" as well when installing cygwin.

I've attached a RAR containing the A470 files and a patch to update CHDK's core to support the new work. Simply extract the RAR into your chdk directory and then run 'patch -p0 -i A470.patch' to update your copy of CHDK.

You won't be able to compile until you put a dump of the original A470 firmware into /platform/a470/sub/102c named 'PRIMARY.BIN' and place copies of other models' firmwares in the tools folder, there's readmes in there explaining that. I'm pretty much just echoing information given elsewhere.

Finally to do the movie_rec.c file, one needs to have IDA and disassemble the A470 source, I have an IDA database I can send if anyone wants it. There's also a copy of the file partially done (before I got bored ::))

I'll carry on working on the port, probably a little more slowly since it does most of the stuff I want, I'd happily welcome help though :)

EDIT: Attachment removed, out of date.
Title: Re: A470 Porting
Post by: Husky on 02 / April / 2009, 16:09:16
Meh, its been too much of a nice day to do porting. So here's the port so far, if anybody feels like working on it or adding support for another version:

First you'll need a development environment, follow this guide (http://chdk.wikia.com/wiki/User:Geekmug/Compiling_CHDK_under_Windows) but install "patchutils" as well when installing cygwin.

I've attached a RAR containing the A470 files and a patch to update CHDK's core to support the new work. Simply extract the RAR into your chdk directory and then run 'patch -p0 -i A470.patch' to update your copy of CHDK.

You won't be able to compile until you put a dump of the original A470 firmware into /platform/a470/sub/102c named 'PRIMARY.BIN' and place copies of other models' firmwares in the tools folder, there's readmes in there explaining that. I'm pretty much just echoing information given elsewhere.

Finally to do the movie_rec.c file, one needs to have IDA and disassemble the A470 source, I have an IDA database I can send if anyone wants it. There's also a copy of the file partially done (before I got bored ::))

I'll carry on working on the port, probably a little more slowly since it does most of the stuff I want, I'd happily welcome help though :)

Hello guys.
Where did you get the firmware version 1.02c ? there's no firmware update in canon's website. My original firmware is GM1.01b, i tried CHDK using A720 then the bin file you posted here. Don't work for me.  :( Can you compile a version for 1.01b?
A very nice thing to add in CHDK is the LONG exposition, powershot A470 only allows 15seg max. Something like 3 or 5 min will be very nice for shooting stars at night. It's possible to develope that?

thank you guys.    :)
Title: Re: A470 Porting
Post by: alanfortune on 03 / April / 2009, 03:58:37
Title: Re: A470 Porting
Post by: Ambient Light on 03 / April / 2009, 11:20:51
Hi,
Just to let you know i've got it working on my camera.  :) I'll do some playing around this weekend.
thanks.
Title: Re: A470 Porting
Post by: CoskiBukowski on 03 / April / 2009, 17:12:15
Hello.
I have an A470, firmware GM1.02C.
I installed the CHDK for the a720, replaced the .BIN with the ones uploaded here (first i tried the last one, then the first one) and both times this is what happens:
The camera boots and it doesnt appear to be any changes in the first 0.5seconds, then the autofocus lamp glows a bit, and I see the CHDK logo splash screen, with some text saying a470, but it dissapears quickly.
Then, i just dont see any difference with the normal firmware, i dont see any new features :(
The only odd thing i saw was the "print button" (you know, that one with the blue led and programmable function), when i press it, in the bottom of the screen i can read "Default Script <ALT>".

Im using the lock switch in the SD card the way it should be, and i even restore all the settings to factory defaults, because i had it in spanish language, but that didnt improve anything.

I dont know anything about code and porting, but i hope i can be useful as tester or something... just tell me what to do, ok? ;)

A million thanks and keep working!
Title: Re: A470 Porting
Post by: fe50 on 03 / April / 2009, 17:53:18
Hello & welcome, CoskiBukowski !

The camera boots and it doesnt appear to be any changes in the first 0.5seconds, then the autofocus lamp glows a bit, and I see the CHDK logo splash screen, with some text saying a470, but it dissapears quickly.
Then, i just dont see any difference with the normal firmware, i dont see any new features :(
The only odd thing i saw was the "print button" (you know, that one with the blue led and programmable function), when i press it, in the bottom of the screen i can read "Default Script <ALT>".

You should read a bit in the CHDK wikia (http://chdk.wikia.com) to learn the CHDK basics...-->  CHDK_firmware_usage (http://chdk.wikia.com/wiki/CHDK_firmware_usage)  ;)
Title: Re: A470 Porting
Post by: fvdk on 03 / April / 2009, 17:55:26

Then, i just dont see any difference with the normal firmware, i dont see any new features :(
The only odd thing i saw was the "print button" (you know, that one with the blue led and programmable function), when i press it, in the bottom of the screen i can read "Default Script <ALT>".


The first thing you should do, is read the Wiki  :D

If you would have done that, you would have seen that after pushing the PRINT button, you should push the MENU button.
Title: Re: A470 Porting
Post by: CoskiBukowski on 03 / April / 2009, 22:40:28
Im ashamed :$

The "chdk for dummies" said after booting up the camera the GUI should be different, thats why i thought it wasnt working, and i didnt keep reading the wiki.
Now ill read all i can and test the new toy!
Thanks and sorry =)

Title: Re: A470 Porting
Post by: mcbuddha on 04 / April / 2009, 07:42:14
As it happens my sister has the 1.01b version, I dumped its firmware a long time ago but haven't had access to it since to port CHDK.

There is a 101b dump: http://drop.io/chdkdumps2/system#list/sort_by_name/order_by_asc (http://drop.io/chdkdumps2/system#list/sort_by_name/order_by_asc)
It would be great if you did the porting for 101b, too.
Title: Re: A470 Porting
Post by: Husky on 04 / April / 2009, 14:51:13
As it happens my sister has the 1.01b version, I dumped its firmware a long time ago but haven't had access to it since to port CHDK.

There is a 101b dump: http://drop.io/chdkdumps2/system#list/sort_by_name/order_by_asc (http://drop.io/chdkdumps2/system#list/sort_by_name/order_by_asc)
It would be great if you did the porting for 101b, too.

Yep, will be nice, cause a lot of peopl e like me have this firmware...  :)
Title: Re: A470 Porting
Post by: CoskiBukowski on 07 / April / 2009, 07:23:17
My girlfriend has another a470, but her firmware (i just checked yesterday) is 1.00E...
Do you guys have a dump of that firmware?
Is it easy to dump it? maybe i can do it and send it to you.
When the porting for the 101c is ready, maybe you can complete the series with the 101b and 100e...

OR.... if there's a way to upgrade the firmware, and its not too risky... maybe i can try that.. do you guys know about that?

Thanks!
Title: Re: A470 Porting
Post by: MrSpoon on 07 / April / 2009, 08:30:58
I'll be doing 101b over easter when I have access to that camera. I could port it now without being able to test but a week isn't that long to wait ;)

I was unaware of the 100e, you can use CardTricks (http://chdk.wikia.com/wiki/CardTricks) to put udumper onto your SD card and then boot it to dump the firmware. It will appear to do nothing, this is fine, just give it a while to silently dump all the firmware.

The weathers turned foul again so I've just done movie_rec.c, should upload a new build within the hour when I get around to SDHC support too. I probably wont bother bugfixing and such until June, I'm only doing porting to avoid exam revision :-[
Title: Re: A470 Porting
Post by: bruceg on 07 / April / 2009, 09:51:23
Hi Everybody!

First of all thank you Mr Spoon for the hard work! can't wait to get my three a470s all unleashed :)

There should be a CHDK for morons because I have read the many wikis and forum postings and still can't get anything more than getting the firmware information to display.

I have firmware version 102.c

I downloaded chdk and installed it on my SDcard using cardtricks (I am using Vista, running cardtricks as admin)

I downloaded the firmware from wiki, put it in the platform/a470/sub/102c folder, renamed the bin PRIMARY.bin

I downloaded the a470 patch from this forum and expanded it into the root directory, but I don't know how I can execute the patch... ??? I tried to 'run' it in various ways...sorry, I'm just not experienced with these yet,

I closed the write-protect and instert the card. when I start up the camera, I just get the normal canon splash screen :( what's wrong?

please help~

Title: Re: A470 Porting
Post by: alanfortune on 07 / April / 2009, 10:04:11
I downloaded the full A720 CHDK and used Card Trick to make the SD card Bootable. I then used Card Trick to transfer the A720 CHDK to the SD card. I replaced DISKBOOT.BIN with MrSpoon's latest build (found on page 1 of this A470 Porting forum).  Make sure its the 256k version. Set the SD card to locked...very important!

Your camera should now boot up with a message about CHDK. Don't forget to use the (Direct Print) button to switch CHDK on and off. When ON, use the Menu button to set up new functions.
Title: Re: A470 Porting
Post by: bruceg on 07 / April / 2009, 10:30:16
woohoo :D

thanks alan! it worked!
All I had to do was replace the diskboot.bin, as you said, with the 256k one from pg.1 of this thread, Wow! so many parameters and functions on my little A470 yay :D

I will fiddle around with the remote parameters first, since I want to try to get my three A470s to shoot in an array, controlled directly from my computer. 

thanks again~
Title: Re: A470 Porting
Post by: alanfortune on 07 / April / 2009, 10:46:17
Title: Re: A470 Porting
Post by: Frostregen on 07 / April / 2009, 11:26:09
Thx for porting!!! :)

I got to dumping the firmware around last new years',
but since I was not at home I did not want to spawn my developement environment on a foreign pc.
Back home, I forgot about it and never continued ;)

*testing*
Title: Re: A470 Porting
Post by: MrSpoon on 07 / April / 2009, 12:14:18
I've just finished off movie_rec.c and boot.c (SDHC stuff) :)

Unfortunately that broke CHDK ::) The camera dies whenever I change mode or try to shoot video, I'm guessing I should finally get around to working out the modemap...

EDIT: No joy, its crashing when changing between shooting modes...anybody got any ideas? ???
Title: Re: A470 Porting
Post by: alanfortune on 07 / April / 2009, 13:26:45
Wish I could help but I wouldn't know where to start. Is there any way we could get other developers involved? Seems to me you've had to go it alone on the A470. Surely there's more resources on Mode maps kicking around?
Title: Re: A470 Porting
Post by: MrSpoon on 07 / April / 2009, 14:11:13
I got the modemap by reading from propcase 50 with the previous build, I suspect there's just some silly mistake somewhere else :(

I'm currently going over things to check. I think most people aren't interested in the A470 since it's so low-end, if I end up truly stuck I'll write up everything I've done in the hope someone will fix it..
Title: Re: A470 Porting
Post by: alanfortune on 07 / April / 2009, 19:32:26
Title: Re: A470 Porting
Post by: Husky on 08 / April / 2009, 05:45:47
So, any 1.01b version guys?
I was reading about the CHDK. when i insert the SD card into the camera should i go to the screen "Firmware Update"? If i do it, my firmware will be modified?
Title: Re: A470 Porting
Post by: alanfortune on 08 / April / 2009, 15:21:57
If you carefully read CHDK for Dummies (http://chdk.wikia.com/wiki/CHDK_for_Dummies (http://chdk.wikia.com/wiki/CHDK_for_Dummies)), all will be revealed. Use the software - Card Tricks - to make your card bootable as well as transferring CHDK but... replace DISKBOOT.BIN with MrSpoon's latest version found on page 1 of this A470 forum. Dont forget to Lock your card - CHDK will start and still write to the card if needed. Switch CHDK On or Off with the PRINTER button and use MENU and the other buttons as usual.
Title: Re: A470 Porting
Post by: alanfortune on 08 / April / 2009, 15:33:33
A few useful links -

CHDK for Dummies - http://chdk.wikia.com/wiki/CHDK_for_Dummies (http://chdk.wikia.com/wiki/CHDK_for_Dummies)

Card Tricks software - http://chdk.wikia.com/wiki/CardTricks (http://chdk.wikia.com/wiki/CardTricks)

A720is CHDK used by MrSpoon for A470 - http://chdk.wikia.com/wiki/A720IS (http://chdk.wikia.com/wiki/A720IS) or directly from Allbest - http://malbe.nm.ru/chdk/ (http://malbe.nm.ru/chdk/)

MrSpoon's best (to date) A470 port - http://chdk.setepontos.com/index.php?action=dlattach;topic=3368.0;attach=3017 (http://chdk.setepontos.com/index.php?action=dlattach;topic=3368.0;attach=3017)  (DISKBOOT.BIN)

CHDK FAQ's - http://chdk.wikia.com/wiki/FAQ (http://chdk.wikia.com/wiki/FAQ)

Scripts (once CHDK is working) - http://chdk.wikia.com/wiki/Category:Scripts (http://chdk.wikia.com/wiki/Category:Scripts)
Title: Re: A470 Porting
Post by: Frostregen on 09 / April / 2009, 03:45:30
Works great so far (ignoring some menu glitches).
Finally I have manual shutter speeds below 1s and manual focus :)
Thx again!

Obligatory water droplet shot with A470:
http://saddam.ath.cx/tropfen.jpg (http://saddam.ath.cx/tropfen.jpg)
Title: Re: A470 Porting
Post by: Husky on 09 / April / 2009, 05:37:09
Pls compile CHDK for the 1.01b firmware... PLSSSSSSSSSSSSSSSs.....     :)
Title: Re: A470 Porting
Post by: MrSpoon on 09 / April / 2009, 14:48:32
Okay, I'm starting on 101b now, shouldn't take too long. I'll start 102c again afterwards, I learnt a lot the first time round, it needs doing again properly :-[
Title: Re: A470 Porting
Post by: alanfortune on 10 / April / 2009, 04:14:55
Well said MrSpoon, everyone should be grateful you've taken this on. As I'm a bit more clued in to the whole CHDK project (and useless at Coding) I'll try to field the general questions and let you concentrate on refining the Code.

I've posted a list of resources so that newcomers can find most of the info needed. I'm now pouring over the Scripts - very useful and I actually undertand the Code. When I first learned BASIC on a 16k 'snot-box', I never could've imagined it one day running on a Camera?
Title: Re: A470 Porting
Post by: MrSpoon on 10 / April / 2009, 13:09:36
Okay so I've brought the 101b port up to the point the 102c port is at, bugs and all, it's attached.

I'm doing revision now but I'll finish both ports off eventually...

EDIT: Just for clarity, the attached file is for A470 v1.01b, fixed and with video/SDHC support.
Title: Re: A470 Porting
Post by: Tahkcalb on 10 / April / 2009, 18:38:39
Just a mention that the most recent A470-101b version at least boots on my A470-101a as well.
I'll check thru features later and mention if anything too odd shows up. Looking good!
Thank you MrSpoon, you rule.
Title: Re: A470 Porting
Post by: mcbuddha on 11 / April / 2009, 03:38:15
Okay so I've brought the 101b port up to the point the 102c port is at, bugs and all, it's attached.

I'm doing revision now but I'll finish both ports off eventually...

EDIT: Just for clarity, the attached file is for A470 v1.01b
Boots well on my a470-101b, I'll test the features right away (the menu bug is still present).
Title: Re: A470 Porting
Post by: Jar on 11 / April / 2009, 04:39:32
Trying A470-101b. It boots fine. Thanks, MrSpoon  :)
Title: Re: A470 Porting
Post by: Husky on 11 / April / 2009, 08:01:57
Well i just used the New 101b. Boot is fine. But i cant take any picture. When i try to take a picture the camera turn black and i have to start again (power on). Any tips?  Now i saw the features i wanna ever MORE to use that.   :)
Title: Re: A470 Porting
Post by: MrSpoon on 11 / April / 2009, 09:00:28
I can confirm the 101b port doesn't work at all, guess I should've done some testing before uploading ::) Will update shortly.

EDIT: I'd rushed through the 101b port, hadn't edited one of the functions properly. I've fixed the above download and taken a photo with it.
Title: Re: A470 Porting
Post by: pope54 on 11 / April / 2009, 12:08:38
Hola MrSpoon gran trabajo. Tengo instalado la Beta for A470 v1.02c hace unos dias queda trabajo pero esta bastante bien  cuando genero un fichero RAW de 8,81 MB pero no se puede convertir con dng4ps2
Title: Re: A470 Porting
Post by: alanfortune on 11 / April / 2009, 13:35:05
Translation -

Hello MrSpoon great job. I have the A470 v1.02c Beta for a few days ago but this is working pretty well when I generate a RAW file of 8.81 MB but you can not convert dng4ps2
Title: Re: A470 Porting
Post by: alanfortune on 11 / April / 2009, 13:37:07
Hi pope54, you need to set RAW to save dng in the CHDK menu.
Title: Re: A470 Porting
Post by: pope54 on 11 / April / 2009, 15:39:49
alanfortune not work for me because I check my record a save RAW CRW files but I can not open with anything.
Title: Re: A470 Porting
Post by: fe50 on 11 / April / 2009, 15:58:10
Hi pope54, you need to set RAW to save dng in the CHDK menu.
alanfortune not work for me because I check my record a save RAW CRW files but I can not open with anything.

I'm not sure whether this version has working DNG support yet...to enable/test DNG support read here: enable DNH guidance (http://chdk.setepontos.com/index.php/topic,2468.msg30870.html#msg30870)...
Title: Re: A470 Porting
Post by: eggnext on 11 / April / 2009, 18:12:09
First of all, thanks mrSpoon for all the hard work. We finally have CHDK for our little a470.

CHDK is loading fine for me. RAW mode works, for example. But I can't activate optical zoom during video, histograms, or the games... am I doing something wrong?, or those things just don't work with this camera yet?
Title: Re: A470 Porting
Post by: Farid on 11 / April / 2009, 18:28:54
Hello everybody,
Thanks a lot to MrSpoon for making possible the porting of A470! I have 1.01b firmware and I just installed A720CHDK+DISKBOOT and works very fine on my camera. I'm an amateur astronomer and my main interest is take advantage of RAW and long exposure functions, so I want to ask if this porting could be compatible, in any moment, with extra long exposures like this: http://chdk.setepontos.com/index.php/topic,3461.0.html. (http://chdk.setepontos.com/index.php/topic,3461.0.html.)
Apart of this, I have 2 small questions:
- In case of updates of this porting (e.g. enhanced DISKBOOT.bin file), I only must copy&replace the file inside my SD card? no risk of misconfigurations or something?
- I found a minor issue when I try to slide between different options in CHDK menus. When press [Down] The selector "jumps" three or more options forward and you must back pressing [Up] for reach your desired option. Is not critical, of course, but I'm curious if this have solution.
Again, thanks to MrSpoon and all CHDK community!  ::)
Title: Re: A470 Porting
Post by: Husky on 11 / April / 2009, 18:32:34
How can i open an .RAW image? I use photoshop CS4 and i have all the photoshop RAW plugins. But when i attemp to open a RAW format photoshop says a ERROR occured.
I tested some features and it looks fine. Of course there are some features disabled, like manual focus (at least don't work for me).
I made some long exposition shots 100 sec. and its very cool Can the developer INCREASE this time? I use to taking pictures of the stars and LONG exposition is very usedful for deep space shots.  :)
I wanna test time lapsed shots, anyone knows is this is working?

thank you Mr Spoon.   :)
-------------------------
I just saw this link:   http://chdk.setepontos.com/index.php/topic,3461.0.html. (http://chdk.setepontos.com/index.php/topic,3461.0.html.)    and they have 480 sec exposition, the deep space shot are just AWESOME, so i beg you developer, PLSSSS  can you compile something like that?    :)   pls    :)
Title: Re: A470 Porting
Post by: MrSpoon on 11 / April / 2009, 18:47:22
So far the following things remain to be done:-
Histogram seems to work for me I think, although I've never used CHDK before so I could be wrong ??? I'm rather frustrated and busy at the moment, so I'll leave things there for now. If anyone else wants to take over let me know and I'll upload my latest code.
Title: Re: A470 Porting
Post by: Husky on 11 / April / 2009, 19:46:01
So far the following things remain to be done:-
  • Video support (my latest code crashes when changing mode/shooting video)
  • Games (problem with play mode on modemap I guess)
  • SDHC support (I've done this but can't test it yet)
  • Raw - I've no idea, DNG seems to work for me
Histogram seems to work for me I think, although I've never used CHDK before so I could be wrong ??? I'm rather frustrated and busy at the moment, so I'll leave things there for now. If anyone else wants to take over let me know and I'll upload my latest code.

Histogram is working.
I just can't open raw files.
Title: Re: A470 Porting
Post by: Husky on 11 / April / 2009, 20:44:57
RAW files

Maybe i help someone in trouble about raw too.  :)

I did the following:

Ok, then follow me...
- power your cam on, half-press the shutter to go to record mode
- press PRINT, then press FUNC/SET
- select "Load script from file", go 2 steps down to the TEST/ folder, press FUNC/SET
- select "BADPIXEL.LUA", press FUNC/SET
- start the script with the SHUTTER !
- wait until you see "press SET to save....."
- press FUNC/SET to store the badpixel.bin automatically in the right place

- press PRINT to leave the <Alt> mode, press PRINT again to enter <Alt> mode
- press MENU, go to the "RAW parameters", enter it with FUNC/SET
- enable the settings "Save RAW" , "DNG format" and "DNG file extension"
- press PRINT to leave the <Alt> mode again

Now RAW saving in DNG format is enabled, transfer the DNG files with a card reader...

Works for me very well.

:)
Title: Re: A470 Porting
Post by: jeffthehammer on 11 / April / 2009, 22:29:34
I just want to give props to Mr. Spoon, Thank you! Thank you! Thank you! Thank you! Thank you! I am just starting out with CHDK and the a470 was my first Canon camera so I've been regularly checking to see if anyone successfully ported my camera. Awesome work, I just tested intravolometer.....AWESOME. I cant wait to play with RAW images. To Mr. Spoon and all the developers working very hard on these cameras, you deserve to be paid or rewarded somehow. Just know your efforts are appreciated. It's a holiday weekend so enjoy, grab a cold one. I've waited this long for anything relevant to my camera. I can wait as long as it takes. It's free so I can't complain or try to rush anyone. These guys have lives too.
Title: Re: A470 Porting
Post by: MrSpoon on 11 / April / 2009, 22:53:28
Thanks for the nice comments and support guys :)

I keep saying I'm going to leave this but it's so hard to resist 'one more try' ::)

I've got the v1.01b doing video with optical zoom and (in theory) SDHC support, I've updated the links so please test! I'll add these features to v1.02c soon.

TODO:
Title: Re: A470 Porting
Post by: Husky on 12 / April / 2009, 00:02:37
Hello there.  :)

I just tested the new update.
Video optical Zoom works only in ZOOM IN when i atemp to ZOOM OUT nothing happens.
I know this camera very well, so i'll keep you always up to date with the stuffs.  :)

thank you MrSpoon  pls don't leave the project.  :)
Title: Re: A470 Porting
Post by: pope54 on 12 / April / 2009, 06:18:04
Fixed the RAW can already see the solution here http://chdk.wikia.com/wiki/Badpixel_removal (http://chdk.wikia.com/wiki/Badpixel_removal)

badpixel.luaIn download the complete packages badpixel.lua there's the script (located in the folder \ CHDK \ SCRIPTS \ TEST) badpixel.bin to generate the file on the fly in the camera.

Just run the script: it automatically takes 2 pictures, badpixel the calculated data and then it creates the file badpixel.bin. This procedure takes ~ 20-30 s of time, at the end of the process you can save the file with the SET button.

The current version of the script can also be downloaded directly from the SVN server: badpixel.lua
Title: Re: A470 Porting
Post by: MrSpoon on 12 / April / 2009, 14:33:24
To Mr. Spoon and all the developers working very hard on these cameras, you deserve to be paid or rewarded somehow.

I don't know about other developers but as a poor student, donations are welcome! My paypal account is '[email protected] (https://www.paypal-marketing.co.uk/sendmoney/send_to_a_friend.htm)' ;)

Please note: I won't work on CHDK features for money, this is an open source project, etc etc.
Title: Re: A470 Porting
Post by: pope54 on 12 / April / 2009, 17:13:10
translated with google is not as it comes out, I just program in VB but in C + atranganto me. But the living antruistas are making a big move
Title: Re: A470 Porting
Post by: Husky on 12 / April / 2009, 21:43:02
News about this new CHDK
I decided to list the main features working and not working in order to help the developer and the new people in forum

I've tested all the features.
- Bracketing is working (in continuous mode);
- Optical zoom on video mode only works for zoom in;
- exposition works fine;
- Lens aperture works fine;
- games don't work (but i'ts secondary, we don't need that anyway);
- OSD don't work in RECORD mode, only apears in play mode (even changing the options);
- Histogram workd fine, but we CAN'T see it because OSD only works in play mode;
- Menu issues when down options;
- Manual focus when use the zoom button don't work yet.

Basicaly is not that bad, it's working pretty well so far, i downgraded to the previous version because of the OSD in rec mode.

Thank you MrSpoon for developing this CHDK.
I'll always test the new updates in order to help you.   :)
Title: Re: A470 Porting
Post by: rouelibre on 13 / April / 2009, 23:11:50
Title: Re: A470 Porting
Post by: Husky on 14 / April / 2009, 00:27:15
Title: Re: A470 Porting
Post by: MrSpoon on 14 / April / 2009, 07:11:43
I haven't looked into the USB remote control yet however the code for it is included in this port (kbd.c). CHDK's implementation of this feature is very basic, simply checking for a voltage applied across the USB power pins. Please test this and let me know :)

I've been asked to upload my code so I've attached it. This code produces the working 101b diskboot, however is rather buggy for 102c. As I've said before I was still getting to grips with CHDK when I did 102c so that code needs going over.

Instructions for setting up your development environment are in this post (http://chdk.setepontos.com/index.php/topic,3368.msg31466.html#msg31466).

EDIT: See first post for source code.
Title: Re: A470 Porting
Post by: Microfunguy on 14 / April / 2009, 15:17:05
Title: Re: A470 Porting
Post by: pope54 on 15 / April / 2009, 16:08:36
Thank you very much Microfunguy and tested and it works perfect except the video camera is turned off when trying to burn, and I for years and I like to thank stereo. :P

Traducido con google
Title: Re: A470 Porting
Post by: Microfunguy on 16 / April / 2009, 05:32:02
tested and it works

You may like to try the bracketing and timelapse features.

Download this file (http://stereo.jpn.org/eng/sdm/file/common_files.zip) and copy the scripts to your script folder.
Try time_lapse.bas, it is described here (http://stereo.jpn.org/eng/sdm/tlapse.htm) and here (http://stereo.jpn.org/eng/sdm/tlapse2.htm).


Quote
the video camera is turned off when trying to burn


I do not understand, could you explain again ?


David
Title: Re: A470 Porting
Post by: pope54 on 16 / April / 2009, 05:37:49
Al intentar grabar un video se apaga la camara gracias.
Title: Re: A470 Porting
Post by: MrSpoon on 16 / April / 2009, 06:52:08
The camera turns off when recording video?

I'm sorry for the confusion, I said I'd done video for 1.01b and would do it for the 1.02c. I haven't yet, I only uploaded the incomplete sources since they were requested and I had to comply with the GPL. They currently include the video code but there's a bug in the 1.02c assembler code somewhere.

I'll fix the code and produce a patch for Microfunguy when I have free time. Unfortunately this is exam season :(
Title: Re: A470 Porting
Post by: Husky on 16 / April / 2009, 13:22:52
tested and it works

You may like to try the bracketing and timelapse features.

Download this file (http://stereo.jpn.org/eng/sdm/file/common_files.zip) and copy the scripts to your script folder.
Try time_lapse.bas, it is described here (http://stereo.jpn.org/eng/sdm/tlapse.htm) and here (http://stereo.jpn.org/eng/sdm/tlapse2.htm).


Quote
the video camera is turned off when trying to burn


I do not understand, could you explain again ?


David

Is this for 1.01b firmware?
Title: Re: A470 Porting
Post by: pope54 on 16 / April / 2009, 13:33:50
Yes
Title: Re: A470 Porting
Post by: Mulaphoto on 17 / April / 2009, 04:18:07
Very many thanks Mr Spoon, works OK on 1.01b firmware

John
Title: Re: A470 Porting
Post by: pope54 on 17 / April / 2009, 08:03:04
spoon the super exposicion I alone see up to 64 ' and the jumps of menu
it is still equal thank you.
Title: Re: A470 Porting
Post by: MrSpoon on 17 / April / 2009, 19:58:27
I finally got around to finishing off the loose ends, things should work pretty well now :)

Refer to the first post for the latest versions. Games, video zoom, and the down button in the menu should all work now. I only have access to v102c so I haven't tested v101b, let me know what doesn't work ;)

I'll attach source code to the first post soon.
Title: Re: A470 Porting
Post by: Husky on 17 / April / 2009, 21:25:08
Can someone please post the LAST update here.  (for 1.01b)
thx.
Title: Re: A470 Porting
Post by: MrSpoon on 17 / April / 2009, 21:43:22
Do you mean the previous build? I haven't kept old builds as I'm making betas available simply to test my code.

Is there a problem with the latest build? (which is available in the first post (http://chdk.setepontos.com/index.php/topic,3368.msg31068.html#msg31068) of this thread).
Title: Re: A470 Porting
Post by: PhyrePhoX on 18 / April / 2009, 02:12:06
checked your stuff in, but now i noticed it is missing the fi2 stuff.
anyways, as soon as you have new code, let us know, so we can "unbeta" it ;)
Title: Re: A470 Porting
Post by: reyalp on 18 / April / 2009, 02:59:23
checked your stuff in, but now i noticed it is missing the fi2 stuff.
anyways, as soon as you have new code, let us know, so we can "unbeta" it ;)
Not sure whats missing for fi2 ? It builds one for me. Of course I can't test it.
Title: Re: A470 Porting
Post by: Husky on 18 / April / 2009, 03:17:06
Guys this latest version (1.01b) Looks good. But manual focus is not working yet.
Also, very good the menu issues solved.

But, again the OSD only works in PLAY mode, not in SHOT or REC mode. The previous version has OSD working good. Can u fix it for this new release?

Title: Re: A470 Porting
Post by: pope54 on 18 / April / 2009, 05:02:17
OK MrSpoon la version (A470_102C_DISKBOOT.BIN) va perfecto creo que ya puede ser la version oficial gracias por todo.
Title: Re: A470 Porting
Post by: Microfunguy on 18 / April / 2009, 06:00:26
By request, the SDM builds for both firmware versions have been re-uploaded, they did not stay up very long :

 http://www.zshare.net/download/5881981920da4f66/ (http://www.zshare.net/download/5881981920da4f66/)

Download this file (http://stereo.jpn.org/eng/sdm/file/common_files.zip) and copy the scripts to your script folder.
Try time_lapse.bas, it is described here (http://stereo.jpn.org/eng/sdm/tlapse.htm) and here (http://stereo.jpn.org/eng/sdm/tlapse2.htm).

Also try manual focusing and fully automatic focusing to infinity from the current focus position.

I still need to add SDM uBasic commands for record and playback (such as 'shoot_movie_for'  X seconds).

I will do that today and send to MrSpoon.


David
Title: Re: A470 Porting
Post by: Frostregen on 18 / April / 2009, 09:47:59
Thx for keeping the good work up!

My SDHC card-reader arrived today, so I could finally copy CHDK onto it.
Formatted a 4GB SDHC with FAT16. Works!

Funny note:
I got used to "4 down 1 up" so much, it now feels painfully slow with "1 down 1 up".
Maybe this could make it into CHDK as a configurable feature ;)

Greetings,
Frostregen
Title: Re: A470 Porting
Post by: paragbhade on 18 / April / 2009, 09:50:21
MrSpoon rocks.
Tested on A470 v102c. All scripts work perfect.
Just tried using ultra intervalometer and it worked miracles. Just shot my first time lapse video using it.
Thank You CHDK.
Title: Re: A470 Porting
Post by: MrSpoon on 18 / April / 2009, 09:53:52
Funny note:
I got used to "4 down 1 up" so much, it now feels painfully slow with "1 down 1 up".
Maybe this could make it into CHDK as a configurable feature ;)

Hold the shoot button half down and try moving around the menu ;)
Title: Re: A470 Porting
Post by: Ambient Light on 18 / April / 2009, 10:28:14
Thanks for all the work. I've done some time lapse photos and had great results except my camera is blurry on the left side of pictures :( I think I'll have to send it back to get fixed but I'm having so much fun with it....
Oh yeah and I was manually overriding focus to 65535...

http://gofastest.dyndns.org/tony/Timelapse/20090415-city-clouds-IMG_5701-QHD.avi (http://gofastest.dyndns.org/tony/Timelapse/20090415-city-clouds-IMG_5701-QHD.avi)

Well it's noticeable in full HD but quarter HD is ok.

Title: Re: A470 Porting
Post by: alanfortune on 18 / April / 2009, 10:52:29
Had a strange problem. Added latest port to SD card and A470 won't start. What could we have done?


Update: Have downloaded - http://mighty-hoernsche.de/bins/a470-102c-0.9.8-744-full.zip (http://mighty-hoernsche.de/bins/a470-102c-0.9.8-744-full.zip) - used Card Tricks to add to blank bootable SD card. Auto or Manual load results in black lcd, 3 flashes of yellow 'save' led and camera shuts off. Am I missing something? Firmware  1.0.2c  We've had success with previous versions with Menu jump bug etc.
Title: Re: A470 Porting
Post by: Ambient Light on 18 / April / 2009, 13:18:37
Hi Alan,

http://mighty-hoernsche.de/bins/a470-102c-0.9.8-744-full.zip (http://mighty-hoernsche.de/bins/a470-102c-0.9.8-744-full.zip) - works for me and has fixed my menu bug.

I only used the DISKBOOT.BIN file. I originally installed the A720 version of CHDK onto my SD card and just replaced the DISKBOOT.BIN file.
Title: Re: A470 Porting
Post by: Husky on 18 / April / 2009, 20:06:27
I tried timelapse and don't work for me. after 10 seconds te camera turns of. I'm i missing something?  (1.01b)

:)
Title: Re: A470 Porting
Post by: paragbhade on 18 / April / 2009, 22:03:54
Use ultra intervalometer for time lapse. Its fairly simple and works.
Title: Re: A470 Porting
Post by: Husky on 18 / April / 2009, 23:02:14
Where i can find ULTRA INTERVALOMETER ? Can u help me?   :)
Title: Re: A470 Porting
Post by: Tahkcalb on 19 / April / 2009, 01:35:38
http://chdk.wikia.com/wiki/UBASIC/Scripts:_Ultra_Intervalometer (http://chdk.wikia.com/wiki/UBASIC/Scripts:_Ultra_Intervalometer)


Where i can find ULTRA INTERVALOMETER ? Can u help me?   :)
Title: Re: A470 Porting
Post by: Husky on 19 / April / 2009, 05:52:48
http://chdk.wikia.com/wiki/UBASIC/Scripts:_Ultra_Intervalometer (http://chdk.wikia.com/wiki/UBASIC/Scripts:_Ultra_Intervalometer)


Where i can find ULTRA INTERVALOMETER ? Can u help me?   :)

Oh yeah i tested the Intervalometer and workd fine. thank you.
Title: Re: A470 Porting
Post by: Husky on 19 / April / 2009, 05:54:41
Thanks for all the work. I've done some time lapse photos and had great results except my camera is blurry on the left side of pictures :( I think I'll have to send it back to get fixed but I'm having so much fun with it....
Oh yeah and I was manually overriding focus to 65535...

http://gofastest.dyndns.org/tony/Timelapse/20090415-city-clouds-IMG_5701-QHD.avi (http://gofastest.dyndns.org/tony/Timelapse/20090415-city-clouds-IMG_5701-QHD.avi)

Well it's noticeable in full HD but quarter HD is ok.



Nice Time Lapse video.  Wich software you have used to join the pictures into a video?  My software sux...
:)
Title: Re: A470 Porting
Post by: Frostregen on 19 / April / 2009, 11:19:11
@MrSpoon: Thx :)

@Husky:
I use imagemagick for resizing the images,
and ffmpeg for creating the video.

http://www.imagemagick.org/script/binary-releases.php#windows (http://www.imagemagick.org/script/binary-releases.php#windows) (Portable is ok)
http://www.videohelp.com/tools/ffmpeg (http://www.videohelp.com/tools/ffmpeg)

Together with a simple batch script it is quite convenient.

timelapse.bat:
Code: [Select]
REM resize using imagemagick
@echo off

cd timelapse
mkdir small
PATH F:\Programme\ImageMagick-6.5.1-3
for %%f in (*.JPG) do (
    convert %%f -resize 640x480 small/%%f
)

REM create mpg with ffmpeg
cd small
PATH F:\Programme\WinFF
ffmpeg -f image2 -s 640x480 -i IMG_%%04d.jpg ../../timelapse.mpg

REM return to starting dir
cd ../..
It expects the images to be named IMG_0000.jpg within a timelapse subfolder.
You would also need to set the program path according to your installation.
You may also want to play with the params ;)
Title: Re: A470 Porting
Post by: Ambient Light on 19 / April / 2009, 11:22:25
Quote
Nice Time Lapse video.  Wich software you have used to join the pictures into a video?  My software sux...
:)

I used virtual dub. http://virtualdub.sourceforge.net/ (http://virtualdub.sourceforge.net/)
Just select from the menu
1 file/open video file - select the first jpeg
2 video/filter - click add - resize - set desired cropping & scale
3 video/frame rate - set desired frame rate.
4 video/compression - set desired compression. I used divx (codec must be installed)
5 file/save as avi

Good luck..
Title: Re: A470 Porting
Post by: alanfortune on 19 / April / 2009, 13:42:11
OK boys and girls, panic over, MrSpoon's done it again and saved us. He suggested our problems were with the SD card....and.....indeed it was! New card, formatted and fitted with the official version from Auto Builds works like magic, at last, all those lovely settings to play with.

Title: Re: A470 Porting
Post by: Husky on 19 / April / 2009, 13:53:21
Quote
Nice Time Lapse video.  Wich software you have used to join the pictures into a video?  My software sux...
:)

I used virtual dub. http://virtualdub.sourceforge.net/ (http://virtualdub.sourceforge.net/)
Just select from the menu
1 file/open video file - select the first jpeg
2 video/filter - click add - resize - set desired cropping & scale
3 video/frame rate - set desired frame rate.
4 video/compression - set desired compression. I used divx (codec must be installed)
5 file/save as avi

Good luck..


Very nice!  :)
Can you tell me about how many shots per minute to get an decent time lapse video?
Title: Re: A470 Porting
Post by: MrSpoon on 19 / April / 2009, 22:20:50
Just an update to say there is a bug with the OSD in the 101b version, I'll try and spot any mistakes in the asm code sometime.

Also I've disassembled the 100e dump and will begin work on that at some point, it may take a while since I have exams for the next month but eventually I'll need someone to do a lot of testing for me.

Oh and since this is all a work in progress I haven't 'cleaned up' most of my code yet, the patch file on the first post fixes up a few silly bits of code that ended up in the svn... I'll no doubt be adding to it :-[
Title: Re: A470 Porting
Post by: HellsAngel on 19 / April / 2009, 22:41:55
Thanks alot for making CHDK on a470 was looking forward to this.
theres only 2 bugs i think in it not too sure though but when you enable startup sound under misc the camera starts up but instantly shuts off and keeps doing that until you delete the .cfg on the sd card.
the other is zooming with video you can zoom in but not zoom out.

also is it possible to add variable bitrate for video? like i think someone added to a720.

again thanks alot for CHDK really nice to play with such stuff.

Title: Re: A470 Porting
Post by: alanfortune on 20 / April / 2009, 04:06:09
OK lads, time to show our gratitude, MrSpoon's a poor student so I've sent him the cost of a Pint or Two of Ale (beer?). Hope somebody else is grateful enough too.

Its easy with Paypal -

https://www.paypal-marketing.co.uk/sendmoney/send_to_a_friend.htm (https://www.paypal-marketing.co.uk/sendmoney/send_to_a_friend.htm)

[email protected]
Title: Re: A470 Porting
Post by: Husky on 20 / April / 2009, 04:23:30
I just tested 1.01b on SDHC card (4gb).  Don't work for me.  :(  I hate using this damn 32 canon SD.   lol 
BTW, the OSD works in REC mode on version:

CHDK Ver. CHDK 0.9.7
Date: Apr. 11 2009
Time: 15:58:01
Camera: A470
FW: 1.01b
Compiler: GCC 4.3.3

BUT... In play mode i can't disable it.   :(

I'm waiting an new relese, because the last one was just fine, menu jump issues works good, zoom in and out in video works too, i just miss the OSD. Now i miss the SDHC (4gb) support.   :)

Thank you guys i will test all verisons and tell you about.   

cya.

Title: Re: A470 Porting
Post by: Ambient Light on 20 / April / 2009, 09:42:57
Can you tell me about how many shots per minute to get an decent time lapse video?
My example was one pic every 3 seconds at 25fps = 75x.
Title: Re: A470 Porting
Post by: Ambient Light on 20 / April / 2009, 10:20:47
Hi,

I tried the 0.25x bitrate on video and corrupted chdk on my sd card, had to reformat it. The osd rgb histogram was off the bottom of the screen but no problem to change/configure layout. it seems to be pretty stable apart from the video for me.  The fast intervalometer works well, manual focusing overides etc. How are other people finding the optics? my camera seems blurry on the left at infinity and blurry on the right on close ups. its really noticeable at 1080p HD time lapse videos. I'm more concerned with the focus at infinity and am not sure if I am just being too picky. See example.

http://gofastest.dyndns.org/tony/Timelapse/IMG17455.jpg (http://gofastest.dyndns.org/tony/Timelapse/IMG17455.jpg)

cheers
Title: Re: A470 Porting
Post by: MrSpoon on 20 / April / 2009, 11:46:59
Just to make life easier, when posting bug reports can you please also state the version of your firmware.

So far Im only aware of bugs in the 101b version, as I don't have this camera it's difficult for me to work on them.
Title: Re: A470 Porting
Post by: HellsAngel on 20 / April / 2009, 12:09:45
Ah sorry about that forgot to post that its on 1.02c firmware.
Title: Re: A470 Porting
Post by: gotgrip_com on 20 / April / 2009, 12:41:23
OK lads, time to show our gratitude, MrSpoon's a poor student so I've sent him the cost of a Pint or Two of Ale (beer?). Hope somebody else is grateful enough too.

Its easy with Paypal -

https://www.paypal-marketing.co.uk/sendmoney/send_to_a_friend.htm (https://www.paypal-marketing.co.uk/sendmoney/send_to_a_friend.htm)

[email protected]


Here here.  Make your statements with your wallets.
Title: Re: A470 Porting
Post by: MrSpoon on 20 / April / 2009, 12:55:31
theres only 2 bugs i think in it not too sure though but when you enable startup sound under misc the camera starts up but instantly shuts off and keeps doing that until you delete the .cfg on the sd card.
the other is zooming with video you can zoom in but not zoom out.

I encountered the sound problem, it went away when I changed my camera settings to no longer be muted. I don't know if this applies to mature CHDK ports, but I've seen it mentioned elsewhere in the forum. The video zoom works fine on the 102c for me, can you go to the first post and get the latest version from autobuild and see if it still happens?

I just tested 1.01b on SDHC card (4gb).  Don't work for me.  :(  I hate using this damn 32 canon SD.   lol 
BTW, the OSD works in REC mode on version:

CHDK Ver. CHDK 0.9.7
Date: Apr. 11 2009
Time: 15:58:01
Camera: A470
FW: 1.01b
Compiler: GCC 4.3.3

Can anyone else confirm SDHC booting is now broken on 101b? It worked fine last time I checked. I know about the OSD issue, I'll look over the ASM some time but that's as much as I can do without the camera. It may have worked better in an older build but I've changed a lot and I don't keep revisions (maybe I should...).
Title: Re: A470 Porting
Post by: HellsAngel on 20 / April / 2009, 13:05:34
The autobuild shows its still from last saturday and first post has links removed.
anywhere else i can get it?
Title: Re: A470 Porting
Post by: MrSpoon on 20 / April / 2009, 13:07:56
Just to clarify, the autobuild is the latest version, I removed the builds from the first post because of this :)
Title: Re: A470 Porting
Post by: HellsAngel on 20 / April / 2009, 13:13:30
it still shows rev 744 is that normal then or is it the old one?
cos i tried unmute the sound in the normal menu and enable sound back on chdk it still crashes here but deleting the cfg fixes it back  :)
Title: Re: A470 Porting
Post by: rys on 21 / April / 2009, 00:25:34
Can anyone else confirm SDHC booting is now broken on 101b? It worked fine last time I checked. I know about the OSD issue, I'll look over the ASM some time but that's as much as I can do without the camera. It may have worked better in an older build but I've changed a lot and I don't keep revisions (maybe I should...).

I can confirm that SDHC booting is broken on the 101b build. It is fine if I remove the second partition, but with two partitions the camera stops as soon as the lens is extended.
Title: Re: A470 Porting
Post by: alanfortune on 21 / April / 2009, 03:51:16
I've examined Ambient Light's image and the 'abberation' on the left seems typical for a small video camera at F9. My son's A470 has the same fuzziness but on the right. My A470 has never had CHDK on it, so couldn't have been 'affected' by alignment problems. It still shows some aberrations across a full size image.

We may well be expecting too much from such a cheap camera made from plastic. I'll compare mine with my son's with the same images, with and without CHDK, and report back.
Title: Re: A470 Porting
Post by: mihailsvetlov on 21 / April / 2009, 04:36:47
Can anyone say what is wrong with code I try to compile from SVN. I have this error:

gui.o: In function `gui_draw_osd':
gui.c:(.text+0x1c02): undefined reference to `gui_osd_draw_ev_video'
conf.o: In function `conf_change_alt_mode_button':
conf.c:(.text+0x1fe): undefined reference to `kbd_set_alt_mode_key_mask'
conf.o: In function `conf_change_dng_ext':
conf.c:(.text+0x272): undefined reference to `save_ext_for_dng'
conf.c:(.text+0x27e): undefined reference to `change_ext_to_dng'
conf.c:(.text+0x284): undefined reference to `change_ext_to_default'
collect2: ld returned 1 exit status
d:\work\chdk\gcc\bin\gmake[1]: *** [main.elf] Error 1
gmake: *** [all-recursive] Error 1
Title: Re: A470 Porting
Post by: Microfunguy on 21 / April / 2009, 05:00:39
Can anyone say what is wrong with code I try to compile from SVN. I have this error:

I have not looked at the SVN code (my SDM code is different) but those function definitions are probably missing from a header (.H) file.

As I mentioned, for the SDM code I am waiting for MrSpoon to send details of the keyboard physw_status[] values.


David
Title: Re: A470 Porting
Post by: whim on 21 / April / 2009, 05:55:53
@mihailsvetlov

just compiled a straight checkout rev 747 for A470 101b & 102c

compiles OK for me on both GCC 346 and 433 ...  (CHDK-Shell v2.14)

unless you edited your source, i would retry with a fresh checkout, maybe it got
corrupted ?

also, what OS / compiler do you use ?

cheers,

wim
Title: Re: A470 Porting
Post by: HellsAngel on 21 / April / 2009, 07:48:21
Just tried the new rev 747 and zoom out still doesnt work only passed that 3.4 you can zoom back to 3.4 (think that is software zoom passed 3.4 that part zooms in and out) 1.02c

Title: Re: A470 Porting
Post by: Ambient Light on 21 / April / 2009, 08:56:53
Hi,

I noticed a bug in version 102c 0.9.8-744 Apr 18 2009 16:15:35.

In video mode zoom in and out works in optical zoom range.
If you zoom in digital (> 3.4x) then zoom out will not go <3.4x.
You are stuck with digital zoom only until you stop and do another video.

cheers

Title: Re: A470 Porting
Post by: mihailsvetlov on 21 / April / 2009, 11:07:57
to Microfunguy
Have you also separate language file for SDM ?
I want to translate it on russian
Title: Re: A470 Porting
Post by: alanfortune on 22 / April / 2009, 05:26:20
Found this on another Forum -

http://www.s3users.com/forum/showthread.php?p=96305 (http://www.s3users.com/forum/showthread.php?p=96305)

Quote - Clicking noise while using CHDK
I own an S3IS camera. I noticed a clicking type noise in the camera. Initially I thought the camera required servicing. I switched off the CHDK feature and it disappeared. Recently I purchased another 2GB ram card. I inserted the card without the CHDK feature loaded and noticed silence. After running some tests with a number of CHDK compiles, I have noticed that the noise is associated with the CHDK program. I am wondering if anyone else using CHDK on any CHDK compatible Canon has experienced the problem. I do not use the S3IS for movies, so I do not know what the interaction is. I have read on the net that people are complaining about camera noise picked up by the microphone. The clicking type noise may be a source of the problem.

All I can confirm is that the type of clicking noise varies with the CHDK features loaded into the S3IS. It varies from almost silence to a loud whir type sound.

It may be advantageous that anyone using CHDK check their camera. You do not need to be in shooting mode. Turn your camera on and place your ear against the camera. You should hear some noise. Take a few photos at different zooms and have another listen. It seems to me that the noise is associated with the zoom motor but I cannot be 100% certain.

If you have a spare memory chip without CHDK try it as well; otherwise turn off CHDK and try it. It may be advisable to document this phenomenon to save the costs associated of returning your camera to a Canon service agent.
Title: Re: A470 Porting
Post by: MrSpoon on 22 / April / 2009, 06:48:17
The 'clicking' noise was previously discussed (http://chdk.setepontos.com/index.php/topic,1484.0.html) on this forum. As far as I am aware no other person has experienced any cause for concern other than databoy.
I certainly hear no worrying noises when using CHDK :)
Title: Re: A470 Porting
Post by: alanfortune on 22 / April / 2009, 06:58:28
Title: Re: A470 Porting
Post by: PhyrePhoX on 22 / April / 2009, 07:01:56
the clicking might be related to usm motor zooms/focus only. on my s3is i never experienced it.
Title: Re: A470 Porting
Post by: CoskiBukowski on 22 / April / 2009, 09:51:14
Title: Re: A470 Porting
Post by: Husky on 22 / April / 2009, 21:14:06
Ok, a lot of people say that A470 has no quality, so i dare you to look my gallery on flickr. I have great pictures, all of them taken with powershot A470 and NO CHDK. does't matter if you have an EOS 5d Mark II or and genius 0,000001 mp. the point is to know what you're doing with your equipment.

http://www.flickr.com/photos/sergiocrivelin/ (http://www.flickr.com/photos/sergiocrivelin/)

Ps.: No more updates to CHDK?
Title: Re: A470 Porting
Post by: PhyrePhoX on 22 / April / 2009, 22:12:45
great stream you got there, added you :D

what do you mean, no updates to chdk? there have been 19 new revisions just in the last week :D
Title: Re: A470 Porting
Post by: Husky on 23 / April / 2009, 00:31:38
Where are you downloading new A470 CHDK?
Title: Re: A470 Porting
Post by: rys on 23 / April / 2009, 03:13:11
Where are you downloading new A470 CHDK?

Official CHDK Autobuild Server (http://mighty-hoernsche.de/) (also listed in the first post)
Title: Re: A470 Porting
Post by: MrSpoon on 23 / April / 2009, 05:46:43
Where are you downloading new A470 CHDK?

There have been no changes to the functionality of the A470 CHDK since the first autobuild version. I have exams now so it'll be a while before I do much further work. After that the first thing I'll do is get the 100e port done. Fixing bugs are a much lower priority for me than getting more versions supported. If anyone would like to fix bugs in the meantime that would be much appreciated :)

Also note that I'll update the patch file in the first post from time to time, so make sure to check for newer versions of that if doing development work. It currently contains minor corrections to keymap/keymasks and a debug LED address.
Title: Re: A470 Porting
Post by: CoskiBukowski on 23 / April / 2009, 11:25:18
After that the first thing I'll do is get the 100e port done.

My girlfriend will be really happy. Thanks!
Title: Re: A470 Porting
Post by: megablue on 23 / April / 2009, 12:53:10
Just tried a470-101b-0.9.8-749-full...

On my very first attempt to load chdk, it reboots and loaded in no time. However my batteries dried right after that and somehow after I recharged the batteries ... I found that all my pictures are gone... After checking the SD card via my PC... it seems like all files were corrupted. So i did a quick format on the 1GB FAT.

Reloaded chdk... however most of the picture taking functions are not working at all...

Title: Re: A470 Porting
Post by: MrSpoon on 23 / April / 2009, 13:24:58
Just tried a470-101b-0.9.8-749-full...

On my very first attempt to load chdk, it reboots and loaded in no time. However my batteries dried right after that and somehow after I recharged the batteries ... I found that all my pictures are gone... After checking the SD card via my PC... it seems like all files were corrupted. So i did a quick format on the 1GB FAT.

Reloaded chdk... however most of the picture taking functions are not working at all...

That sounds unfortunate. Perhaps try a different SD card.

I've just noticed that DNGs are getting cropped quite drastically. I tweaked the camera.h values a bit but no joy, I (or one of you nice people!) need to calculate these values some time.
Title: Re: A470 Porting
Post by: Husky on 23 / April / 2009, 15:19:30
***deleted***
Title: Re: A470 Porting
Post by: MrSpoon on 23 / April / 2009, 16:16:06
There is a TODO list in the first post. Could people please not keep posting about the same bugs. I've already said I'm not even bothering to fix them until I port the 100e, and even that will take me a while.

I appreciate the help but lets not flood the thread :)
Title: Re: A470 Porting
Post by: Husky on 23 / April / 2009, 20:12:38
 :( Well i just wanna help indicating about all versions released what was working and not, i'm not spamming the forum. But don't worry, ill keep this to myself now.  I'll delete my last post to "clean" the forum.
:)

Title: Re: A470 Porting
Post by: Mulaphoto on 24 / April / 2009, 01:30:42
Re DNG images cropped
In landscape
DNG 2592 x 1944 pixels
JPG  3041 x 1899 pixels

In portrait
DNG 1944 x 2592 pixels
JPG  2304 x 3072 pixels

Crop in DNG landscape seems to be on the right-hand side
Crop in DNG portrait is on the bottom and left-hand side

Hope this helps

John
Title: Re: A470 Porting
Post by: Frostregen on 24 / April / 2009, 12:38:06
Title: Re: A470 Porting
Post by: Husky on 24 / April / 2009, 14:16:11
Title: Re: A470 Porting
Post by: mihailsvetlov on 30 / April / 2009, 03:20:31
Hi, guys, does anybody knows when the SDM will be ready for A470?
Title: Re: A470 Porting
Post by: pope54 on 30 / April / 2009, 05:22:03
Hi, guys, does anybody knows when the SDM will be ready for A470?

SDM aqui http://chdk.setepontos.com/index.php/topic,3368.60.html#quickreply (http://chdk.setepontos.com/index.php/topic,3368.60.html#quickreply) :)
Title: Re: A470 Porting
Post by: Microfunguy on 30 / April / 2009, 05:22:29
Hi, guys, does anybody knows when the SDM will be ready for A470?

You can get the latest version here (http://www.zshare.net/download/593980386d6ec9cf/).

We can switch to movie and playback modes from uBasic but when you 'press' the button to record a movie it does not work.

We will look at that when Mr.Spoon has more time.
Title: Re: A470 Porting
Post by: mihailsvetlov on 02 / May / 2009, 03:26:20
Thanks!!!
1 more question: how one can decrease the size of font on main screen? It is a little too large)))
Title: Re: A470 Porting
Post by: Microfunguy on 02 / May / 2009, 05:42:21
how one can decrease the size of font on main screen? It is a little too large)))


It is large because people complain that the normal font is too small !

When SDM 1.81 is officially released you can modify the source code.

Ask me then how to change font size.


David
Title: Re: A470 Porting
Post by: paragbhade on 04 / May / 2009, 07:39:53
Just had a question. In camera(native) menu, on selecting firmware update i see option of upgrading my firmware from 1.0.2.0- 1.1.0.0. First it used to show an error that the file is corrupt.
The bug i see now is cropped RAW images, please could anyone fix that. Thank You
Title: Re: A470 Porting
Post by: MrSpoon on 04 / May / 2009, 13:07:40
Yeah, I had a look at the cropping but couldn't figure out the problem immediately, it'll have to wait until after my exams (4 more :().

I'm just posting to mention that I've updated the patch file with a minor change, aperture is now replaced by ND filter 'on/off'.   This camera doesn't have an iris, aperture was just an indirect way of controlling the ND filter.
Title: Re: A470 Porting
Post by: cjdshaw on 10 / May / 2009, 17:54:14
Just bought an A470 to try out CHDK and I'm loving it. Thanks for your work porting to this camera. The only thing I can't get to work at the moment is manual focus. I've enabled "Use zoom buttons for MF" but the up and down arrows still zoom. What am I doing wrong?
Title: Re: A470 Porting
Post by: MrSpoon on 11 / May / 2009, 15:11:01
I can't remember how up to date the svn code is but the a470 doesn't do manual focus or have dedicated zoom buttons. The latest diff disables that in the menu, along with replacing aperture control with ND filter control. AFAIK the best you can do with this camera is to use the CHDK menu to set the subject distance.

My exams are going well, only two more left. Will pick up devel work again soon :)
Title: Re: A470 Porting
Post by: mihailsvetlov on 12 / May / 2009, 08:39:04
And one more thing: when I set on bracketing f.e. to shoot 3 times, it shoots how long I press the button
Title: Re: A470 Porting
Post by: paragbhade on 22 / May / 2009, 00:48:09
Just found a temporary solution for cropped RAW images. These grid lines are useful while taking RAW images in horizontal mode.
 :)

http://www.sendspace.com/file/iolzfv (http://www.sendspace.com/file/iolzfv)
Title: Re: A470 Porting
Post by: DOS32 on 22 / May / 2009, 10:51:44
thank you for the firmware.
Title: Re: A470 Porting
Post by: Johndk on 24 / May / 2009, 14:23:38
Thank you for your firmware. Works like a charm! Keep up the good work!
Title: Re: A470 Porting
Post by: neoceluloide on 25 / May / 2009, 11:37:19
Just found a temporary solution for cropped RAW images. These grid lines are useful while taking RAW images in horizontal mode.
 :)

http://www.sendspace.com/file/iolzfv (http://www.sendspace.com/file/iolzfv)


thanks but.... how do i use this file? :-[
Title: Re: A470 Porting
Post by: paragbhade on 25 / May / 2009, 12:26:59
While taking RAW images just enable the grid from osd menu and select the grid, it displays the un/cropped area.
Title: Re: A470 Porting
Post by: neoceluloide on 26 / May / 2009, 03:44:47
thanks a lot
Title: Re: A470 Porting
Post by: Thorwak on 27 / May / 2009, 14:00:36
Hi ppl,

I'm a total chdk rookie. In fact I bought a a470 a couple of days ago since I really wanted to try chdk out, and that camera is dirt cheap right now. When I noticed the a470 was supported I bought one right away. Thanks for the port, MrSpoon! :)

I had a look at the RAW cropping problem, and it seems it's just a couple of overlooked #define statements (from copy/paste probably). I looked at other cameras and fixed the problem. The X size is verified through experimentation, any bigger and dead pixels appear. It MIGHT be possible to get a couple more pixels vertically, but it's really close to the limit so I didn't test this. It's bigger than the JPG anyway now so.. :) Note that I've only checked the resulting .DNG files out. I don't have any software for reading .RAW or .CRW so someone could maybe check this, just in case. Should be fine though.

Here's my patch:
Code: [Select]
Index: include/camera.h
=============================================================================
--- include/camera.h (revision )
+++ include/camera.h (working copy)
@@ -230,8 +230,8 @@
     #define CAM_JPEG_HEIGHT 1944
     #define CAM_ACTIVE_AREA_X1 6
     #define CAM_ACTIVE_AREA_Y1 6
-    #define CAM_ACTIVE_AREA_X2 2618
-    #define CAM_ACTIVE_AREA_Y2 1962
+    #define CAM_ACTIVE_AREA_X2 3108
+    #define CAM_ACTIVE_AREA_Y2 2334
     // camera name
     #define PARAM_CAMERA_NAME 4 // parameter number for GetParameterData
     //#define DNG_EXT_FROM ".DPS"

I've tested it on my a470 ver. 1.02c, but of course I take no responsibility and so on. That said, I put up compiled versions of my patched chdk build here:
http://nostalgia.suroot.com/a470-0.9.8-766-rawfix (http://nostalgia.suroot.com/a470-0.9.8-766-rawfix)

I'll leave it up until the svn code is fixed and it gets into the autobuild.

It might be a good idea to re-create your badpixel.bin.

Again, Thanks to everyone involved in the chdk project and in the a470 port!!



EDIT 2009-05-28:

The coordinates were still slightly off, resulting in black line and/or incorrect pixels at the borders. I've cropped it a tiny bit now to exactly match what I see when magnifying a picture. Maybe someone else could confirm it looks good at the edges with their cam too.

New diff (against original 766 trunk)
Code: [Select]
Index: include/camera.h
=============================================================================
--- include/camera.h (revision )
+++ include/camera.h (working copy)
@@ -228,10 +228,10 @@
     // cropping
     #define CAM_JPEG_WIDTH  2592
     #define CAM_JPEG_HEIGHT 1944
-    #define CAM_ACTIVE_AREA_X1 6
-    #define CAM_ACTIVE_AREA_Y1 6
-    #define CAM_ACTIVE_AREA_X2 2618
-    #define CAM_ACTIVE_AREA_Y2 1962
+    #define CAM_ACTIVE_AREA_X1 12
+    #define CAM_ACTIVE_AREA_Y1 8
+    #define CAM_ACTIVE_AREA_X2 3108
+    #define CAM_ACTIVE_AREA_Y2 2332
     // camera name
     #define PARAM_CAMERA_NAME 4 // parameter number for GetParameterData
     //#define DNG_EXT_FROM ".DPS"

New binaries (previous ones taken down) :
http://nostalgia.suroot.com/a470-0.9.8-766-rawfix2/ (http://nostalgia.suroot.com/a470-0.9.8-766-rawfix2/)


Hav fun :)
Title: Re: A470 Porting
Post by: pope54 on 28 / May / 2009, 05:26:19
OK will perfect thanks
Title: Re: A470 Porting
Post by: paragbhade on 28 / May / 2009, 23:41:09
Works perfectly. Resulting RAW image resolution 3096*2324. :)
Title: Re: A470 Porting
Post by: Thorwak on 29 / May / 2009, 03:19:44
Excellent, I guess MrSpoon could just update the svn then. Would be nice to have that done since it makes the a470 port a lot more usable. Thanks for reporting! :)
Title: Re: A470 Porting
Post by: peterm321 on 29 / May / 2009, 08:53:03
" I've tested it on my a470 ver. 1.02c, but of course I take no responsibility and so on. That said, I put up compiled versions of my patched chdk build here:"

I have tried this patch (including re-running badpixel.lua) and am not getting any improved resolution.
That said, I am not sure if the problem relates to the original CRW file. It is just over 9 MB and I would
have expected a larger CRW file for a resolution that should be 3072 x 2304.

I am unable to find any program that can read the CRW file, from a hex dump it appears to have no
header information, only raw data. The resolution I am getting is 2612 x 1956.

thanks.

The output from dcraw -i -v crw_0441.dng follows:


Filename: crw_0441.dng
Timestamp: Thu May 28 20:27:23 2009
Camera: Canon PowerShot A470
DNG Version: 1.1.0.0
ISO speed: 100
Shutter: 1/79.5 sec
Aperture: f/6.0
Focal length: 11.6 mm
Embedded ICC profile: no
Number of raw images: 1
Thumb size:   128 x 96
Full size:   3152 x 2340
Image size:  2612 x 1956
Output size: 2612 x 1956
Raw colors: 3
Filter pattern: RGGBRGGBRGGBRGGB
Daylight multipliers: 3.485738 1.929403 2.691900
Camera multipliers: 1.623000 0.956000 1.583000 0.000000




Title: Re: A470 Porting
Post by: Thorwak on 29 / May / 2009, 09:37:05
pterem321, that is interesting. Before I dig deeper, I just want to make sure: Are you using the boot method (and not the firmware update method, if that is available for the a470)?

My build doesn't contain the file necessary to use the firmware update method since I didn't feel like getting into the whole encryption-keys business because it was hard to find exact information for a noob (as myself). If you could just confirm that the splash screen of chdk shows yesterday's date as build time so we know you are using the correct version and not using your old version by accident?

Anyway, the .dng files should work for you too, but of course I'll take a look at what might cause the problem for the "true raw" format if it exists :)

Thanks,

/Thorwak
Title: Re: A470 Porting
Post by: peterm321 on 29 / May / 2009, 10:24:44
Well Thorwalk, you may have a point on some differences the way CHDK is loaded.

My method was (BTW I use linux) is to unzip the zip file and copy files to the root directory of the
memory card. I have not attempted making the card bootable as I was happy enough to use the
menu to load CHDK when I want.

I replaced the diskboot.bin file and I did notice a small black line in the far left of my new pic
otherwise I thought there was potentially good results other than the resolution matter.
(the black line did not appear in the previous CHDK version, but the resolution was the same).


The build info reported is:

CHDK Ver: CHDK 0.9.8-766
Date:         May 24,2009
Time:         12:41:37
Camera:    A470
FW Vers:    102c
Compiler    GCC 4.3.2

The previous version was dated May 18, 2009 so there is some change, don't know if it should
have read may 28, 2009.

BTW (will be logging out for the day).



Thanks

Title: Re: A470 Porting
Post by: Thorwak on 29 / May / 2009, 10:35:46
Yep, it should read May 28, you have mixed up the files somehow. I hadn't even bought my camera on May 24 :P

The black line is also fixed in my May 28 build.

Get it here:
http://nostalgia.suroot.com/a470-0.9.8-766-rawfix2 (http://nostalgia.suroot.com/a470-0.9.8-766-rawfix2)

You're gonna have to make your card bootable or wait for the autobuild to get fixed.

Cheers,

Thorwak

Title: Re: A470 Porting
Post by: peterm321 on 30 / May / 2009, 09:51:55
I had wished to avoid making the card bootable as I understand that the card cannot be
made bootable unless reformatted to FAT16, though I may now try this option.

BTW the zip file did not have a new ps.fir file, but I did not delete the old one. Maybe
the new DISKBOOT.BIN is only loaded if the card is bootable?

http://chdk.wikia.com/wiki/FAQ#Q._How_can_I_make_the_CHDK_program_load_automatically_at_startup.3F (http://chdk.wikia.com/wiki/FAQ#Q._How_can_I_make_the_CHDK_program_load_automatically_at_startup.3F)

Thanks


Peter
Title: Re: A470 Porting
Post by: MrSpoon on 30 / May / 2009, 14:44:23
Awesome :D thanks Thorwak! I'm sure I tried changing those defines with no success, maybe I just didnt do a make clean :-[ hehe.

I don't have SVN access to update the code, there's a few of my own updates sitting on the first post of the thread. These all need merging and I'll bug phyrephox into updating svn :) I'm moving flat on monday (yey), so I'll get back involved from then.

With regards to the two remaining ports, I'll take a stab at it soon but without being able to test builds myself that would be slow. If an owner of one of the unported a470 versions can set up a dev environment, I'd like to work with them on porting.

Also for everyone working with this from svn, I'm sorry! Since there was no documentation I did just copypaste, not the most elegant approach but it gets a working build in no time ;)
Title: Re: A470 Porting
Post by: paragbhade on 30 / May / 2009, 15:46:19
I was editing the new 7mp DNG in photoshop and noticed that with all adobe (Bridge, photoshop elements 7, photoshop cs4, lightroom) software i opened the DNG, it was cropped to 2612*1956. I dont know if it is a bug in CHDK or adobe. Earlier(When RAW was cropped) editing was on the full image. Please Help.
Title: Re: A470 Porting
Post by: Thorwak on 31 / May / 2009, 05:45:21
MrSpoon, I'm surprised to hear you haven't been given svn access. After all you made a new port? And nothing wrong with copy/paste as a skeleton to work from for a new build - I didn't mean it as criticism :)


paragbhade, I'm sorry but I am having trouble following you. Please try to be a bit more clear - what build date are you using? Did it really work BEFORE the cropping issue was fixed? :blink: Does it work with other software? (I used xnview to test .dng and it's fine for me now) Also see previous discussion about start method.


peterm321, true there is no ps.fir/ps.fi2, because you need to have encryption keys to create those from what I understand. Hence, no "firmware update" start method. I guess if someone were to PM me those keys for the a470 I could create a full build :P Anyway, diskboot.bin is used for boot method, ps.fi? is used for firmware update method. I hope that clears it up a bit.
Title: Re: A470 Porting
Post by: paragbhade on 01 / June / 2009, 02:03:35
thorwak
i am using the version you posted rawfix2. other program like fsviewer and raw therapee display the full dng(3072*2324) without any cropping. when editing or opening  dng in adobe photoshop suite, the same dng gets cropped to 2612*1956 . earlier versions of chdk 765 and before gave cropped images out of the camera but they didnt get cropped further. the problem i guess(wild) here must be with other raw values which have not been edited. i tried downloading chdk shell but i didnt start. so please can you check if there are other values which arent edited. i am just guessing the what the problem might be.
Title: Re: A470 Porting
Post by: Thorwak on 01 / June / 2009, 04:07:59
paragbhade,
OK understood (and now it makes sense :) ) . I'll have a look tonight and see what I can find. Are you on firmware 1.02c btw?
Title: Re: A470 Porting
Post by: paragbhade on 01 / June / 2009, 09:30:22
yes i am on 1.02c.
Title: Re: A470 Porting
Post by: peterm321 on 01 / June / 2009, 09:57:56
"peterm321, true there is no ps.fir/ps.fi2, because you need to have encryption keys to create those from what I understand. Hence, no "firmware update" start method. I guess if someone were to PM me those keys for the a470 I could create a full build Tongue Anyway, diskboot.bin is used for boot method, ps.fi? is used for firmware update method. I hope that clears it up a bit."

Following your advice, I now have the problem fixed fixed Thorwalk.

Yes it was the CHDK load method. I reformatted my (4GB) card to FAT16 and copied over the files and made it bootable, now have full resolution DNGs (with a few extra pixels added as a bonus). :D

Title: Re: A470 Porting
Post by: Thorwak on 01 / June / 2009, 14:31:31
OK, I found the problem, and it was trivial as last time. I just didn't expect Adobe programs to treat .DNG differently than other viewers so I didn't bother fiddling with it...

I've tested this on my a470 v1.02c, using both xnviewer and now also Adobe Photoshop CS4 and they look exactly the same now as far as I can tell. Please test and report though!

As before, you have to use the boot method and not the firmware upgrade method for my build to work, as explained earlier. Also as before, everything you do is on your own risk ;)

This time the build is based on trunk 768 which was the latest one available today.

Here's my new diff, against the 768 svn trunk:

Code: [Select]
Index: include/camera.h
=============================================================================
--- include/camera.h (revision )
+++ include/camera.h (working copy)
@@ -226,12 +226,13 @@
    
     #define cam_CalibrationIlluminant1 1 // Daylight
     // cropping
-    #define CAM_JPEG_WIDTH  2592
-    #define CAM_JPEG_HEIGHT 1944
-    #define CAM_ACTIVE_AREA_X1 6
-    #define CAM_ACTIVE_AREA_Y1 6
-    #define CAM_ACTIVE_AREA_X2 2618
-    #define CAM_ACTIVE_AREA_Y2 1962
+    #define CAM_JPEG_WIDTH  3096
+    #define CAM_JPEG_HEIGHT 2324
+    #define CAM_ACTIVE_AREA_X1 12
+    #define CAM_ACTIVE_AREA_Y1 8
+    #define CAM_ACTIVE_AREA_X2 3108
+    #define CAM_ACTIVE_AREA_Y2 2332

     // camera name
     #define PARAM_CAMERA_NAME 4 // parameter number for GetParameterData
     //#define DNG_EXT_FROM ".DPS"


When you have loaded the correct chdk version, build info should read:

Code: [Select]
CHDK Ver:  CHDK 0.9.8-rawfix
Date:         Jun  1 2009
Time:         20:53:31


Edit:
Oops, forgot the DL link:
http://nostalgia.suroot.com/a470-0.9.8-768-rawfix/ (http://nostalgia.suroot.com/a470-0.9.8-768-rawfix/)
Title: Re: A470 Porting
Post by: paragbhade on 02 / June / 2009, 00:36:50
All problems solved for me.Works completely. Thank You THORWAK.
Title: Re: A470 Porting
Post by: Thorwak on 03 / June / 2009, 14:07:53
New build again (seems I can't keep my fingers away ::)).

Most importantly, all recent development done by MrSpoon (present in his patch in first msg in this thread) was manually added in by me to the current svn trunk source (769 right now). Ths includes a new colour matrix which you might find worth checking out (affects the DNG output). After a very quick test it seemed to me to be a lot better (closer to the JPG colours).

I also dusted off my reversing gear and I finally have the encryption keys necessary to build also .FI2 files, so there is no need to use a bootable card anymore - firmware update start method now also works.

The "rawfix" is of course applied as well.

Other stuff MrSpoon has mentioned in the thread should be in there too.

Since it seems svn updating is very slow (for the a470 tree) I decided to host alpha builds for the time being at a fixed URL:
http://nostalgia.suroot.com/chdk-a470-unofficial (http://nostalgia.suroot.com/chdk-a470-unofficial)

I'll try put new builds there whenever something interesting happens.


As usual, bug reports will help development, and we still haven't heard anything from 101b users AFAIK  ::)

Cheers,

Thorwak
Title: Re: A470 Porting
Post by: Tahkcalb on 03 / June / 2009, 17:46:38
A470-101a using 101b-769unofficial Test results
(using boot method)

OSD 
Grids, zebra, histogram and other data displays all work correctly now

RAW
Imagesize now reports and converts as 3096 x 2324 out of 3152 x 2340
Red and green seem to have a little bit of high clipping vs JPG and 768
Tried various conversion settings with DCRAW best results with "-a -W"

MISC NOTES
Autofocus assist LED flashing at startup is now green one on the back YAY!
LCD on-off results seem different (might be correct now for all I know)

I've not found any new issues or errors I'll try some more things later this
eve and follow up if there is anything odd.

Thanks for your efforts Thorwak and of course to Mr. Spoon for starting us off.
Title: Re: A470 Porting
Post by: reyalp on 03 / June / 2009, 19:17:23

Since it seems svn updating is very slow (for the a470 tree) I decided to host alpha builds for the time being at a fixed URL:
http://nostalgia.suroot.com/chdk-a470-unofficial (http://nostalgia.suroot.com/chdk-a470-unofficial)
I haven't been following this thread closely, but if you can post a complete patch against the current trunk, I'll look into committing it.
Title: Re: A470 Porting
Post by: Thorwak on 04 / June / 2009, 01:29:18
I haven't been following this thread closely, but if you can post a complete patch against the current trunk, I'll look into committing it.
Great! :) I'll post it tonight since I don't have access to my dev environment right now.


Red and green seem to have a little bit of high clipping vs JPG and 768
I'm still very new to CHDK, and I don't know too much about photography neither unfortunately. Would you say it's better (colour-wise) than the 768 all-in-all? How would we go about finding the "correct" colour matrix? (See MrSpoon's patch in first msg in this thread to see how it was changed in this unofficial build vs. the last 768-rawfix)

I would be happy to build and host various test versions if someone is good at calculating those. :)

EDIT: Thanks for reporting btw Tahkcalb, I can't test the 101b myself :) There were some updates to LED addresses in MrSpoons patch so the differences you see makes perfect sense.
Also: I just noticed you mentioned you have a 101A camera - did we know already 101b version of CHDK works for this fw? Seems like great news to me :) Maybe the build should be renamed 101a_b or something like that then?
Title: Re: A470 Porting
Post by: reyalp on 04 / June / 2009, 01:50:12
Also: I just noticed you mentioned you have a 101A camera - did we know already 101b version of CHDK works for this fw? Seems like great news to me :) Maybe the build should be renamed 101a_b or something like that then?
Normal practice is to just copy the compatible version to both names in the batch builds. So for example only ixus800_sd700-101b is built, and then it is copied to ixus800_sd700-101a. You can see this in the top level Makefile.
Title: Re: A470 Porting
Post by: Thorwak on 04 / June / 2009, 01:59:50
Normal practice is to just copy the compatible version to both names in the batch builds. So for example only ixus800_sd700-101b is built, and then it is copied to ixus800_sd700-101a. You can see this in the top level Makefile.
Noted, I'll fix this too tonight then. Thanks!
Title: Re: A470 Porting
Post by: Tahkcalb on 04 / June / 2009, 02:37:27
I'm still very new to CHDK, and I don't know too much about photography neither unfortunately. Would you say it's better (colour-wise) than the 768 all-in-all? How would we go about finding the "correct" colour matrix? (See MrSpoon's patch in first msg in this thread to see how it was changed in this unofficial build vs. the last 768-rawfix)

I would be happy to build and host various test versions if someone is good at calculating those. :)

I think it is much better. I tried some shots with full sun, shade and tungsten over the day. I don't have a
calibrated target or anything to provide numbers. But the results when converted with Rawker(internal)
and DCRAW (from source build) are all higher in red and green channels than 768 when I output as 16bitTiff.
Using "-a" average option with DCRAW is now almost the same as the JPG output. So I'd assume that is what
the in-camera software is doing for the JPGs and I'd not worry about it too much. The work in other threads
on the color issue will likely spill over to us soon enough.

Quote
EDIT: Thanks for reporting btw Tahkcalb, I can't test the 101b myself :) There were some updates to LED addresses in MrSpoons patch so the differences you see makes perfect sense.
Also: I just noticed you mentioned you have a 101A camera - did we know already 101b version of CHDK works for this fw? Seems like great news to me :) Maybe the build should be renamed 101a_b or something like that then?

I mentioned 101B on 101A as working earlier in the thread.  I've not seen anything that is different from any of the other
101B reports so far. But I will if something does prove to be different. I usually check this thread every day, so mention
if you need any checking of specific items. Or feel free to gmail me at same username as here if you need instant reply.

Again, thanks for the efforts.
Title: Re: A470 Porting
Post by: Thorwak on 04 / June / 2009, 13:16:58
I haven't been following this thread closely, but if you can post a complete patch against the current trunk, I'll look into committing it.
Here's the full diff taken against the 769 trunk. I also fixed the Makefile to "build" a470-101a as discussed earlier. I can't see a way to attach files(?) so I'll have to link to it instead since I got an error about maximum msg length :P (I feel really stupid - how do I attach files anyway?).

http://nostalgia.suroot.com/chdk-a470-unofficial/a470-769-patch.txt (http://nostalgia.suroot.com/chdk-a470-unofficial/a470-769-patch.txt)

I tested it against a clean 769 trunk with "patch -p0 < patch.txt" and it builds and works fine (tested in camera again).

Thanks for your help!
Title: Re: A470 Porting
Post by: reyalp on 04 / June / 2009, 17:11:51
Here's the full diff taken against the 769 trunk. I also fixed the Makefile to "build" a470-101a as discussed earlier. I can't see a way to attach files(?) so I'll have to link to it instead since I got an error about maximum msg length :P (I feel really stupid - how do I attach files anyway?).
attachments are temporarily disabled due to forum issues.

edit:
patch committed, svn 770

Is this the first CHDK camera without a DISP button ? If so, there may be some interface issues.

Also, I'd appreciate confirmation that the 101b build actually works on 101a.

It looks like the fat32 support code is in, is there a reason CAM_MULTIPART is not enabled ?
Title: Re: A470 Porting
Post by: Tahkcalb on 04 / June / 2009, 21:34:22

Also, I'd appreciate confirmation that the 101b build actually works on 101a.


Just snagged 770 and it loads fine with no immediate issues on a GM101A Jan 24 2008.
Tried bracketing(continuous) , couple lua and ubasic scripts, DNG, and the OSD options.
If there is a general test sequence/suite for check offs, mention it and I'll run through it.


Thanks all.
Title: Re: A470 Porting
Post by: fe50 on 05 / June / 2009, 02:13:58
If there is a general test sequence/suite for check offs, mention it and I'll run through it.
You can run the LUA library test (http://chdk.wikia.com/wiki/LUA#LUA_library_test) and add the A470 to the list there if the test is effective...
Title: Re: A470 Porting
Post by: Thorwak on 05 / June / 2009, 07:50:08
You can run the LUA library test (http://chdk.wikia.com/wiki/LUA#LUA_library_test) and add the A470 to the list there if the test is effective...
I tested the 1.02c and everything passed according to logfile, wiki updated. Would be nice with others testing on 1.01a/b.

Is this the first CHDK camera without a DISP button ? If so, there may be some interface issues.
No idea wether it's the first, but there is no DISP button on a470 at least. What are we missing out on when it comes to CHDK? :/

It looks like the fat32 support code is in, is there a reason CAM_MULTIPART is not enabled ?
Could be that it's just untested, I guess only MrSpoon could answer this. He mentioned he was moving earlier this week so I don't know when he might be back online. I only have a 2 GB card, but I guess I could try partioning it and test the functionality. Would that be meaningful or do we need someone with a big card?

Thanks for updating the svn, I'm sure a lot of ppl enjoy having an improved a470 in the autobuild!


Also, a big Thank You to those testing and reporting back on my early test builds! :)
Title: Re: A470 Porting
Post by: reyalp on 05 / June / 2009, 22:50:15
CAM_MULTIPART would enable "swap partitions" and "make card with 2 partitions"

The boot time stuff isn't ifdef'd so it should detect and swap partitions already, if it works. AFAIK It should work if you have a fat16 and fat32 partition regardless of the sizes.
Title: Re: A470 Porting
Post by: Thorwak on 06 / June / 2009, 12:11:52
I actually bought a fast SDHC card yesterday right before going home, 8 GB, since I realized they weren't that expensive anymore (and I could sure use the extra speed for .DNG). Then I spent hours trying to get Windows to accept the SDHC card, applying a hotfix I had to request by mail etc etc until I booted the computer with the card in the reader and the PC wouldn't even post.. I didn't know older card readers aren't compatible with SDHC :o So, will probably wait 'til after the weekend before I test so I can do it for real. Frustrating though, I had planned it all so well :D
Title: Re: A470 Porting
Post by: MrSpoon on 06 / June / 2009, 15:55:33
Hey, I never knew it took so long to get the net hooked up in a new flat!

Anywho, I've tested multipart booting and that seems to work fine. When I enabled CAM_MULTIPART the new options didnt work.

To try it you'll need to define WriteSDCard (I have this as 0xFFCF9440 for the 102c, if its wrong that'd explain a few things).

Swap partitions tells me I only have one partition, and make two partitions crashes the cam. That's as far as I've looked into it for now, so I left CAM_MULTIPART disabled.
Title: Re: A470 Porting
Post by: reyalp on 06 / June / 2009, 17:01:48
I didn't know older card readers aren't compatible with SDHC :o So, will probably wait 'til after the weekend before I test so I can do it for real. Frustrating though, I had planned it all so well :D
Fortunately SDHC capable readers are dirt cheap too :)

MrSpoon:
Thanks for the info.
Title: Re: A470 Porting
Post by: ewavr on 07 / June / 2009, 06:08:51
Anywho, I've tested multipart booting and that seems to work fine. When I enabled CAM_MULTIPART the new options didnt work.
To try it you'll need to define WriteSDCard (I have this as 0xFFCF9440 for the 102c, if its wrong that'd explain a few things).
Swap partitions tells me I only have one partition, and make two partitions crashes the cam. That's as far as I've looked into it for now, so I left CAM_MULTIPART disabled.

In your code mbr_read_dryos() was called?
http://chdk.setepontos.com/index.php/topic,2798.msg31398.html#msg31398 (http://chdk.setepontos.com/index.php/topic,2798.msg31398.html#msg31398)
Title: Re: A470 Porting
Post by: MrSpoon on 07 / June / 2009, 17:29:27
Ooh, that addition does seem to get things working :) I'll produce a patch once I get around to getting the WriteSDCard address for 101a/b (or someone else does).
Title: Re: A470 Porting
Post by: Thorwak on 07 / June / 2009, 17:31:57
Great news! Looking forward to trying it out as soon as you have a patch (will buy a new card reader tomorrow ;) )

EDIT:
I did some analysis on the 101b fw and assuming you are right about the address for 102c, the corresponding function in 101b should be at 0xFFCF8A00. I wouldn't bet my life on it though so we could maybe do a test build before it gets into svn.

EDIT2:
I implemented the change pointed to by ewavr, and it seems fine :) I have my 8 GB card autobooting, with a small boot partition created from within the camera. I can't swear wether I used the "make card bootable" or the cardtricks util to make it bootable, there was a lot of fiddling back and forth. The "swap partition" works fine though.

I can only test the 102c, so if someone is feeling brave, please try the 101b build (also for 101a). 102c feedback would be good too.

BACKUP EVERYTHING ON YOUR CARD FIRST!

I will provide a patch once we have some feedback, if MrSpoon doesn't beat me to it :)

Get the 722-mpart test builds:
http://nostalgia.suroot.com/chdk-a470-unofficial (http://nostalgia.suroot.com/chdk-a470-unofficial)


Title: Re: A470 Porting
Post by: rys on 09 / June / 2009, 22:58:20
I did some analysis on the 101b fw and assuming you are right about the address for 102c, the corresponding function in 101b should be at 0xFFCF8A00. I wouldn't bet my life on it though so we could maybe do a test build before it gets into svn.

Hello,

I have a 101b, and it fails to boot using the build in your last message.

Edit: Should also mention, using an 8GB SDHC card. Boots if either the larger partition is removed (boots into CHDK), or boots if the write protect tab is turned off. (boots to normal OS.) If I use Firmware Update with the write protect tab off, the camera shuts down.
Title: Re: A470 Porting
Post by: Thorwak on 10 / June / 2009, 01:41:22
Hello,

I have a 101b, and it fails to boot using the build in your last message.

Edit: Should also mention, using an 8GB SDHC card. Boots if either the larger partition is removed (boots into CHDK), or boots if the write protect tab is turned off. (boots to normal OS.) If I use Firmware Update with the write protect tab off, the camera shuts down.
Thanks for reporting. I guess I'll have to go back and do my homework again. Funny though, I was so sure  8) I'll do some checking to see if there is other stuff in the 102c sub tree that hasn't yet made it into the 101b sub tree. (MrSpoon, anything you can think of straight away?)

EDIT: There were some commented out stuff in the boot procedure that I think has to do with FAT32 in the 101b tree. I'll have a new binary for 101b shortly.

EDIT2: Ok try it now :) Make sure you get June 10 as build date.

EDIT3: (recompiled from clean svn v774 and re-applied patch. Also the patch is available if someone wants to compile themselves. We need testing though, especially from 101a/b users, before committing patch to svn.)
http://nostalgia.suroot.com/chdk-a470-unofficial/ (http://nostalgia.suroot.com/chdk-a470-unofficial/)
Title: Re: A470 Porting
Post by: rys on 10 / June / 2009, 23:38:39
Hello,

Just wanted to drop a line to say that the "June 10th, 1:04pm" version (last posted), works on 101b with SDHC booting. (Showing 7.4gb of space available.)

Thanks!
Title: Re: A470 Porting
Post by: Thorwak on 11 / June / 2009, 02:04:46
rys,

Excellent, thanks for reporting back!

reyalp, would you feel like committing another patch? :) Both 101b and 102c has been verified working now.
http://nostalgia.suroot.com/chdk-a470-unofficial/patch-a470-774-mpart.txt (http://nostalgia.suroot.com/chdk-a470-unofficial/patch-a470-774-mpart.txt)

---

I have done a lot of testing now on the a470 102c. There is one major problem, as I see it, but I think this is in the CHDK core (someone correct me if I'm wrong though).

When you create a dual partition card, there is no way to make it bootable from within CHDK (card tricks works fine though, if you have made the boot partition the "current" one). This is because CHDK calls the camera's function to modify the MBR (this not the very first sector on the card (that would be the VBR)). The problem is, when you create a dual partition card from within CHDK, the camera is still working from the partition table as it was then you loaded CHDK (with a FAT32 partition as partition 0 in the case of a SDHC card) so you can't make it bootable right away.

You take the card out, format the 2 MB partition in PC and put PS.FI2 and DISKBOOT.BIN on the card, load CHDK back up in camera. What happens now is that CHDK reboots the cam while loading, and make the camera think it started on the second partition (that is the whole point). Even if this second partition is formatted as FAT16 (I have verified this with a smaller card), you can't make the CARD bootable with "Make card bootable..." since that would make the currently active partition bootable (from the cameras point of view). Since I can't access partition 0 if having 2 partitions ever from within CHDK, "Make bootable" will always fail in these cases. Works fine though of course when there is only 1 (FAT16) partition.

I have double and triple checked this behaviour and verified with cardtricks (the second partition is indeed marked as bootable by "Make card bootable..." (CHDK) if it's a FAT16 one, but that won't help us since the camera never sees this).

(I'm sorry if this is old news and common knowledge, I'm still getting to know CHDK, but it was news to me)

I'm working on a solution for this however. The most logical one, at least as a start, would be to to change "Create card with 2 partitions" to "Create boot partition" since that is what we are after anyway, right? This shouldn't be too difficult to implement and I have a fairly good idea how to do it.

Also "Make card bootable..." could be changed to account for these cases (or remove the item from the menu when CHDK detects a dual partition card)


Any comments? Have I got it all wrong? :P
Title: Re: A470 Porting
Post by: reyalp on 11 / June / 2009, 02:35:38
reyalp, would you feel like committing another patch? :) Both 101b and 102c has been verified working now.
http://nostalgia.suroot.com/chdk-a470-unofficial/patch-a470-774-mpart.txt (http://nostalgia.suroot.com/chdk-a470-unofficial/patch-a470-774-mpart.txt)
Applied, svn 775

Quote
Any comments? Have I got it all wrong? :P
No, that sounds about right to me.

I also had some other thoughts about "make card with 2 partitions" http://chdk.setepontos.com/index.php/topic,3490.0.html (http://chdk.setepontos.com/index.php/topic,3490.0.html) in which I didn't notice this problem  :(
Title: Re: A470 Porting
Post by: Thorwak on 11 / June / 2009, 04:45:15
No, that sounds about right to me.
Ok good to know I'm on the right track, thanks for confirming. It was a bit frustrating not understanding what was going on until I started going through the wrappers.c source :)

I also had some other thoughts about "make card with 2 partitions" http://chdk.setepontos.com/index.php/topic,3490.0.html (http://chdk.setepontos.com/index.php/topic,3490.0.html) in which I didn't notice this problem  :(
As for formatting from within Canon's firmware, that nukes the entire card (including partition table) unfortunately, even if you don't do a low level format. At least on 470. But a CHDK FAT16 formatter should be possible to squeeze in there without too much trouble I think, there's probably lot of open source around for something basic like that.

Hmm maybe getting a bit off topic now, will continue in the thread you linked to when I have something to show for. They say it's gonna rain here this weekend...  8)

EDIT: FAT12 formatting working. Followup: http://chdk.setepontos.com/index.php/topic,3490.msg35163.html#msg35163 (http://chdk.setepontos.com/index.php/topic,3490.msg35163.html#msg35163)
Title: Re: A470 Porting
Post by: Thorwak on 12 / June / 2009, 01:57:50
Is there anyone reading this thread using an a470 with fw 1.00e? How common is this fw version anyway? Reason for asking is I  might give it a try to get a 1.00e version going, depending on how much free time I find. However, if there is no interest or noone willing to do testing and reporting on a fairly frequent basis it's not worth the work since I don't have access to a testing camera.

MrSpoon asked this recently and didn't get any replies, so if there are ppl just sitting around waiting for it to happen, this is the moment to register on the board and become testers or the port may not happen ;)

I'm working on other stuff right now so I wouldn't start right away, merely checking for interest.

MrSpoon, have you done any work yet on the 1.00e or would I start from scratch, if I decide to give it a try?
Title: Re: A470 Porting
Post by: gotgrip_com on 12 / June / 2009, 11:54:18
Is there anyone reading this thread using an a470 with fw 1.00e?

Yes..  I dumped the 1.00e firmware (with a lot of help from someone who shall remain nameless*), but I'm not much of a coder, so I wasn't able to do anything meaningful.  I'd love to help with testing any ports though.

* Nevermind.  It's Mr. Spoon
Title: Re: A470 Porting
Post by: Thorwak on 14 / June / 2009, 14:15:08
Yes..  I dumped the 1.00e firmware (with a lot of help from someone who shall remain nameless*), but I'm not much of a coder, so I wasn't able to do anything meaningful.  I'd love to help with testing any ports though.
Hmm, I've loaded the 100e fw up in IDA, and all addresses I've checked so far match those for the 101b build.. Have you tried that build on your camera? :)
Title: Re: A470 Porting
Post by: gotgrip_com on 14 / June / 2009, 20:45:25
Hmm, I've loaded the 100e fw up in IDA, and all addresses I've checked so far match those for the 101b build.. Have you tried that build on your camera? :)

Yep.  Cam wouldn't boot to anything once the locked card was in the cam (assuming I did it right...).
Title: Re: A470 Porting
Post by: Thorwak on 15 / June / 2009, 02:56:30
Yep.  Cam wouldn't boot to anything once the locked card was in the cam (assuming I did it right...).
It's a little bit surprising since they seem almost identical :)

Was it a recent build? Have you also tried the firmware update method?

Title: Re: A470 Porting
Post by: MrSpoon on 15 / June / 2009, 05:31:28
Netcraft confirms it...the differing firmware versions are very similar and indeed identical up to a certain address but if you compare the addresses of functions later on in the dump (beginning with FFE) the differences are evident (4 byte offset).

I've quickly checked all addresses beginning with FFE and corrected them, this is pretty quick and dirty but let's see how far it gets:
http://www.spooning.co.uk/chdk/DISKBOOT.BIN (http://www.spooning.co.uk/chdk/DISKBOOT.BIN) (100e alpha)
Title: Re: A470 Porting
Post by: Thorwak on 15 / June / 2009, 12:19:08
*sigh* Maybe if I I actually checked the very last lines of the output in stubs_entry_ida.S I would have caught this  ::)
Oh well, I'll try to learn something from this...

Well done! :) Let's hope it's all it takes; would be very nice to have a complete port for the a70 platform!
Title: Re: A470 Porting
Post by: mihailsvetlov on 17 / June / 2009, 03:54:39
Hi all, will the SDM version of CHDK soon came?
Title: Re: A470 Porting
Post by: Thorwak on 25 / June / 2009, 03:24:46
*bump*
So.. Did anyone test MrSpoon's 100e port?
gotgrip_com? :)

Hi all, will the SDM version of CHDK soon came?
Offtopic for this thread, but if you're talking about a translation of the CHDK interface all it takes is for someone to do the translation. http://chdk.wikia.com/wiki/Languages (http://chdk.wikia.com/wiki/Languages)
Title: Re: A470 Porting
Post by: gotgrip_com on 25 / June / 2009, 03:34:45
*bump*
So.. Did anyone test MrSpoon's 100e port?
gotgrip_com? :)

Everything seems to be working great from what I can see.  Played with all the settings, lost at reversi... it seemed pretty stable and nothing crashed.  Absolutely drained the battery though (probably because I was playing with everything at the same time).  I've never used CHDK before, so I don't really have anything to compare it with, but the 1.01b port with MrSpoon's diskboot.bin looks good to me.
Title: Re: A470 Porting
Post by: MrSpoon on 25 / June / 2009, 05:39:30
Splendid. I've put the 100e files up here: http://www.spooning.co.uk/chdk/a470 100e.zip (http://www.spooning.co.uk/chdk/a470 100e.zip)

 :)
Title: Re: A470 Porting
Post by: mihailsvetlov on 03 / July / 2009, 10:16:06
Offtopic for this thread, but if you're talking about a translation of the CHDK interface all it takes is for someone to do the translation.

No, i'm talking About StereoDataMaker version of CHDK
Title: Re: A470 Porting
Post by: Microfunguy on 03 / July / 2009, 10:31:43
No, i'm talking About StereoDataMaker version of CHDK


I think you have that now, is that correct ?


David
Title: Re: A470 Porting
Post by: andro on 05 / July / 2009, 21:25:49
Splendid. I've put the 100e files up here: http://www.spooning.co.uk/chdk/a470 100e.zip (http://www.spooning.co.uk/chdk/a470 100e.zip)

 :)
can you teach me how to run chdk in my a470 with 1.00e firm???
please :D
Title: Re: A470 Porting
Post by: gotgrip_com on 05 / July / 2009, 21:32:31
can you teach me how to run chdk in my a470 with 1.00e firm???

Instructions are here.  http://chdk.wikia.com/wiki/CHDK_for_Dummies#I_have_the_camera_already.21 (http://chdk.wikia.com/wiki/CHDK_for_Dummies#I_have_the_camera_already.21)

In short, download the 1.00e software package, then use CardTricks to format your SD card, make it bootable, then load the package on to the SD card using CardTricks  (use the CHDK->Card button).
Title: Re: A470 Porting
Post by: MrSpoon on 06 / July / 2009, 11:04:24
Unfortunately the a470 100e build isn't available on the official CHDK download page yet.

What you can do is follow those instructions but install a different version onto your memory card (102c for example) and then replace the diskboot.bin file on your card with the 100e one in this thread (http://chdk.setepontos.com/index.php/topic,3368.msg35250.html#msg35250).

Hope that helps :)
Title: Re: A470 Porting
Post by: gotgrip_com on 06 / July / 2009, 11:59:46
Unfortunately the a470 100e build isn't available on the official CHDK download page yet.

Oops... my mistake.  (I thought you'd posted the whole package earlier.)

On a side note, do you recommend using the 1.02b or the 1.02c or "other" as the base to add the diskboot file into?  Or does it matter?
Title: Re: A470 Porting
Post by: MrSpoon on 06 / July / 2009, 19:36:23
Makes no difference at all, in fact all you really need is the diskboot.bin file and a locked SD card. All the rest does is make the CHDK logo appear and gives you a few nice scripts etc, I never bother with it.
Title: Re: A470 Porting
Post by: mihailsvetlov on 07 / July / 2009, 03:42:05
I think you have that now, is that correct ?

Yes, but I do not see it on the official site))) may be it already better than last
Title: Re: A470 Porting
Post by: scriptors on 08 / July / 2009, 07:25:51
Yep, it should read May 28, you have mixed up the files somehow. I hadn't even bought my camera on May 24 :P

The black line is also fixed in my May 28 build.

Get it here:
http://nostalgia.suroot.com/a470-0.9.8-766-rawfix2 (http://nostalgia.suroot.com/a470-0.9.8-766-rawfix2)

You're gonna have to make your card bootable or wait for the autobuild to get fixed.

Cheers,

Thorwak



Hello, I just download a470-102c-0.9.8-782-full.zip from CHDK-SVN Autobuild Download page.

I can't see RAW file (I test more software but with no result).

It's because my bad prefs (I need to study more about) on camera or some bug ?

Other file (see quote) correct this (if are one bug) ?

Thanks

ps. I have A470 with 1.0.2c firmware
Title: Re: A470 Porting
Post by: prokol on 09 / July / 2009, 13:28:24
   Hi, my A470 1.00E. Can you tell when there for my vehicle make CHDK. Thank you.
Title: Re: A470 Porting
Post by: reyalp on 12 / July / 2009, 00:16:42
I've added the 100e files from http://chdk.setepontos.com/index.php/topic,3368.msg35776.html#msg35776 (http://chdk.setepontos.com/index.php/topic,3368.msg35776.html#msg35776)

Apologies from the delay.
Title: Re: A470 Porting
Post by: prokol on 14 / July / 2009, 04:46:40
Thank you, I have also succeeded.
Title: Re: A470 Porting
Post by: Microfunguy on 28 / July / 2009, 19:45:39
There seems to be an error in the focal-length table for this camera.
I have tried contacting Daniel Borland (Mr.Spoon) but he is not responding to personal messages or emails.

The table has 15 entries from 5.8 to  34.8mm.

The A470 has a 6.3 to 21.6mm lens and does not have 15 zoom positions.
Title: Re: A470 Porting
Post by: MrSpoon on 29 / July / 2009, 14:37:45
My apologies, I currently don't have access to my camera, being away from home so (perhaps rudely) thought it best to leave CHDK correspondence until I return next week.

The table is indeed incorrect, I've previously stated that I intended to only go so far as to get CHDK running on each a470 version, hence the 'BETA' tag. Now it is, I hope users will continue to provide the correct constants and such. That being said, I'll do as requested in your email when I get back, hopefully you'll be so kind as to attach a diff of your any changes you make :)

Title: Re: A470 Porting
Post by: Microfunguy on 29 / July / 2009, 15:21:09
My apologies

I thought you were lost at sea !

Quote
hopefully you'll be so kind as to attach a diff of your any changes you make :)

You know I will, but I cannot make any changes because I do not have the information  :)

Let us leave it until next week.


David
Title: Re: A470 Porting
Post by: MrSpoon on 01 / August / 2009, 13:22:04
Hm, will finally get around to changing constants to actual a470 values. I'll upload a diff when I'm done, in the meantime here's changes so far:

Code: [Select]
const ApertureSize aperture_sizes_table[] = {
    {  9, 307, "3.0" },
    { 10, 333, "3.2" },
    { 11, 360, "3.5" },
    { 12, 391, "4.0" },
    { 13, 426, "4.5" },
    { 14, 457, "5.0" },
    { 15, 495, "5.8" },
    { 16, 586, "9.0 ND" },
    { 17, 612, "10.0 ND" },
    { 18, 639, "10.0 ND" },
    { 19, 670, "11.0 ND" },
    { 20, 705, "14.0 ND" },
    { 21, 736, "14.0 ND" },
    { 21, 774, "18.0 ND" },
};
Title: Re: A470 Porting
Post by: Gogan on 03 / August / 2009, 15:44:16
Hello. I'm new here. I bought today my a470. I have downloaded and installed chdk. It's very interesting for me, 'couse i am programmer, and allways wanted to programm at least time lapse video (make a photo every 1 or 2 secs) for my old olympus c-150, but i could not. I stood for 15-20 minutes to make 10 seconds video =)
For now i'll study this forum, maybe will try look in code and be helpful. sorry, my english so bad.

Found a bug:
I tried to do bracketing with +-4 exp. 1st was just fine, i was holding down shutter untill 3 photoes comes up (normal, lighter and darker), but second time maybe i was holding to much (yes, i repeated that, holding to much does it), so camera took 3rd dark image and holds. No buttons takes affect (pressing "print" and shutter lets to showing text "standard script..." etc), only when i chosed play mode, pressed "on/off" and then "print" button, shutter clicked and camera shut down. On flash i found 4th picture all white.

hello to all from Ukraine, with respect, Vova aka Gogan.

p.s have a 1.02c firmware
Title: Re: A470 Porting
Post by: Microfunguy on 10 / August / 2009, 17:02:43
Please note the following corrections for firmware 101b in stubs_min.S  :-

DEF(canon_shoot_menu_active,0x9718)   
DEF(recreview_hold, 0x95E4)

Title: Re: A470 Porting
Post by: MrSpoon on 24 / August / 2009, 15:52:57
Just a heads up that I'm no longer working on CHDK. The above changes have yet to be committed.
Title: Re: A470 Porting
Post by: gotgrip_com on 24 / August / 2009, 19:24:35
You'll be missed...
Title: Re: A470 Porting
Post by: reyalp on 24 / August / 2009, 20:45:22
I've committed the changes in
http://chdk.setepontos.com/index.php/topic,3368.msg37418.html#msg37418 (http://chdk.setepontos.com/index.php/topic,3368.msg37418.html#msg37418)
and
http://chdk.setepontos.com/index.php/topic,3368.msg37738.html#msg37738 (http://chdk.setepontos.com/index.php/topic,3368.msg37738.html#msg37738)

Regarding canon_shoot_menu_active and recreview_hold, are the other versions correct ? It looks to me like 100e should probably be the same as 101b, while 102c is probably different. If someone with the cameras in question can check, that would be helpful.

edit:
I can confirm that 0x9718 is used the same way in 100e and 101b, and that 0x9768 is the corresponding value in 102c.

I'm not sure about the recreview_hold value, it must be an offset from something else.

I have no idea whether any of these values are actually correct.
Title: Re: A470 Porting
Post by: ghatothkach on 29 / August / 2009, 11:46:44
hi
I am using the autobuild version 0.9.8-794/100e with GM1.00E.
I initially had trouble bracketing and thought it was a bug, however I was able to do the bracketing.

One thing still I am not sure, to get the bracketing I need to physically hold the shutter button down until all the shots are taken. why is this so, why does it not take all the shots at one press. ?

Title: Re: A470 Porting
Post by: reyalp on 29 / August / 2009, 18:43:02
hi
I am using the autobuild version 0.9.8-794/100e with GM1.00E.
I initially had trouble bracketing and thought it was a bug, however I was able to do the bracketing.
If you can explain what confused you, perhaps the documentation can be improved.
Quote
One thing still I am not sure, to get the bracketing I need to physically hold the shutter button down until all the shots are taken. why is this so, why does it not take all the shots at one press. ?
Because it relies the canon continuous mode, which works this way.

If you want to do it in a single press, you can could do it with a script.
Title: Re: A470 Porting
Post by: fe50 on 30 / August / 2009, 05:47:25
One thing still I am not sure, to get the bracketing I need to physically hold the shutter button down until all the shots are taken. why is this so, why does it not take all the shots at one press. ?

You can also use the Canon custom timer, in most (all ?) Powershot cameras you can select a range from 1 to 10 shots;
this works fine with the CHDK bracketing...
Title: Re: A470 Porting
Post by: dcollier on 02 / September / 2009, 19:01:26
 It seems that the Dark Frame Subtraction setting is ignored (101b).  I saw other cameras had that problem.  Can anyone else confirm?
Title: Re: A470 Porting
Post by: cjdshaw on 14 / September / 2009, 20:34:59
When you override the ND filter to IN, the f stop stored in the file reads 3.0 (depending on the focal length) not 9.0
Title: Re: A470 Porting
Post by: iceman on 19 / September / 2009, 04:51:27
Not correctly works "Override shutter speed" (102c). It is impossible to expose value more than 100. If to put "Value Factor" 100 and "Override shutter speed" 100 on the basic screen value 10000 is shown, but removes all the same 100 seconds a maximum. It is possible to correct it?
Title: Re: A470 Porting
Post by: fe50 on 19 / September / 2009, 06:51:39
Hello & welcome, iceman !
Not correctly works "Override shutter speed" (102c). It is impossible to expose value more than 100. If to put "Value Factor" 100 and "Override shutter speed" 100 on the basic screen value 10000 is shown, but removes all the same 100 seconds a maximum. It is possible to correct it?

100x100 = 10'000 seconds = ~166,67 minutes = ~2.78 hours exposure time - not possible on the A470, also such a long exposure time doesn't make sense.

The A470 CHDK version is limited to 64s exposure time (e.g. shutter speed [1] x value factor [64] ).
Title: Re: A470 Porting
Post by: iceman on 21 / September / 2009, 03:29:34
The A470 CHDK version is limited to 64s exposure time (e.g. shutter speed [1] x value factor [64] ).
Probably to remove this restriction? 2,78 hours certainly do not matter, and here at least 5 minutes very much even are necessary.
Title: Re: A470 Porting
Post by: reyalp on 21 / September / 2009, 03:45:31
Probably to remove this restriction? 2,78 hours certainly do not matter, and here at least 5 minutes very much even are necessary.
This can be done, but it takes some work. See http://chdk.setepontos.com/index.php/topic,3461.0.html (http://chdk.setepontos.com/index.php/topic,3461.0.html)
Title: Re: A470 Porting
Post by: scriptors on 23 / September / 2009, 03:37:12
If it's possible ...

i have more problem with autofocus on 'super macro' shot, it's possible to have one manual focus sistem ?

i not understand more about override focus 'distance'

thanks
Title: Re: A470 Porting
Post by: dodald on 07 / December / 2010, 21:15:22
Sorry to resurrect an old thread, but can anyone tell me whether the A470 (101b) supports two partitions?

I have a 16gb SDHC card I'm trying to get auto-boot working on and the camera will not recognize the "large" partition.  (It will boot CHDK, but only from the "small" partition.

(I'm pretty sure I'm following all the instructions correctly, but I figured I ask so I don't continue to bang my head against the wall!)

For now, I'm manually starting CHDK using the "Update Firmware" option.
Title: Re: A470 Porting
Post by: pixeldoc2000 on 08 / December / 2010, 12:11:43
I have a 16gb SDHC card I'm trying to get auto-boot working on and the camera will not recognize the "large" partition.  (It will boot CHDK, but only from the "small" partition.
The purpose of the first smaller partition is to be able to auto-start chdk (canon firmware can only access smaller partition on boot be able to auto-start chdk). After chdk has startet it "hides" the first partition to fool canon firmware to use the second partition (store your images/movies there).
Its correct behavior chdk auto-boot only works if chdk files are on first partion.

Read http://chdk.wikia.com/wiki/Bootable_SD_card (http://chdk.wikia.com/wiki/Bootable_SD_card) for more info.
Title: Re: A470 Porting
Post by: whim on 08 / December / 2010, 13:59:50
Quote
Its correct behavior chdk auto-boot only works if chdk files are on first partion.

agreed in principle - but 'chdk files' appears rather subject to misunderstanding, so here's my attempt
to describe how I set my cards up (SDMINSTE.EXE helps Windows users to swap partitions)

Quote
+--------------+-------------------------------------------------------------+
| DISKBOOT.BIN |  PS.FIR or PS.FI2                                           |
|              |                       /CHDK      /DCIM                      |
| SDMINSTE.EXE |  SDMINSTE.EXE                                               |
+--------------+-------------------------------------------------------------+
<--FAT (12/16)-><-------------------------- FAT32 --------------------------->
    (bootable)

hope that helps,

wim
Title: Re: A470 Porting
Post by: srsa_4c on 28 / January / 2012, 22:44:36
Sorry for resurrecting this old thread, but it belongs to here.
Recently got one of these and was not pleased by the fact that it's missing a display button.
So I decided to use the power button instead. Only works in ALT mode, of course.
Patch against release 1.0

Code: [Select]
Index: platform/a470/kbd.c
===================================================================
--- platform/a470/kbd.c (revision 1614)
+++ platform/a470/kbd.c (working copy)
@@ -10,9 +10,9 @@
  long canonkey;
 } KeyMap;
 
-static long kbd_new_state[3];
-static long kbd_prev_state[3];
-static long kbd_mod_state[3];
+static long kbd_new_state[3] = {0xffffffff, 0xffffffff, 0xffffffff};
+static long kbd_prev_state[3] = {0xffffffff, 0xffffffff, 0xffffffff};
+static long kbd_mod_state[3] = {0xffffffff, 0xffffffff, 0xffffffff};
 static KeyMap keymap[];
 static long last_kbd_key = 0;
 static int usb_power=0;
@@ -21,8 +21,9 @@
 #define DELAY_TIMEOUT 10000
 
 #define KEYS_MASK0 (0x00000000)
-#define KEYS_MASK1 (0x00000000)
+#define KEYS_MASK1 (0x4000000)
 #define KEYS_MASK2 (0x153F)
+#define KEYS_INV1 (0x4000000)
 
 #define NEW_SS (0x2000)
 #define SD_READONLY_FLAG (0x20000)
@@ -161,6 +162,9 @@
 
  static void __attribute__((noinline)) mykbd_task_proceed()
 {
+    kbd_new_state[0] = physw_status[0];
+    kbd_new_state[1] = physw_status[1] ^ KEYS_INV1;
+    kbd_new_state[2] = physw_status[2];
     while (physw_run){
  _SleepTask(10);
 
@@ -231,19 +235,20 @@
     _kbd_pwr_on();
 
     kbd_fetch_data(kbd_new_state);
-
+    kbd_new_state[1] = kbd_new_state[1] ^ KEYS_INV1;
+   
     if (kbd_process() == 0){
  // leave it alone...
  physw_status[0] = kbd_new_state[0];
- physw_status[1] = kbd_new_state[1];
+ physw_status[1] = kbd_new_state[1] ^ KEYS_INV1;
  physw_status[2] = kbd_new_state[2];
     } else {
  // override keys
  physw_status[0] = (kbd_new_state[0] & (~KEYS_MASK0)) |
    (kbd_mod_state[0] & KEYS_MASK0);
 
- physw_status[1] = (kbd_new_state[1] & (~KEYS_MASK1)) |
-   (kbd_mod_state[1] & KEYS_MASK1);
+ physw_status[1] = ((kbd_new_state[1] & (~KEYS_MASK1)) |
+   (kbd_mod_state[1] & KEYS_MASK1)) ^ KEYS_INV1;
 
  physw_status[2] = (kbd_new_state[2] & (~KEYS_MASK2)) |
    (kbd_mod_state[2] & KEYS_MASK2);
@@ -432,6 +437,7 @@
     /* tiny bug: key order matters. see kbd_get_pressed_key()
      * for example
      */
+    /* additional key: ON/OFF: physw_status[1]: 0x4000000, inverted */
  { 2, KEY_UP , 0x00000001 }, //
  { 2, KEY_DOWN , 0x00000002 }, //
  { 2, KEY_LEFT , 0x00000008 }, //
@@ -442,6 +448,7 @@
  { 2, KEY_SHOOT_HALF , 0x00000010 }, 
  { 2, KEY_MENU , 0x00000400 },
  { 2, KEY_PRINT , 0x00001000 }, //
+ { 1, KEY_DISPLAY , 0x04000000 }, //on/off key, works only in ALT mode
  { 0, 0, 0 }
 };

Not for official inclusion (IMHO). I think some users would find it disturbing not being able to switch the camera off in ALT mode.

edit: Forgot to mention that this only makes sense when operating the camera by hand. From a script, pressing the fake "display" button would turn the camera off.



Update: several bugs have been fixed for the A470
http://chdk.setepontos.com/index.php?topic=650.msg80692#msg80692 (http://chdk.setepontos.com/index.php?topic=650.msg80692#msg80692)
Title: Re: A470 Porting
Post by: reyalp on 31 / January / 2012, 00:38:36
I've updated the 100e and 101b builds to use the sig finder stubs_min.S values like 102c.
Trunk  changeset 1629 (http://trac.assembla.com/chdk/changeset/1629/trunk) 
stable changeset 1630 (http://trac.assembla.com/chdk/changeset/1630/branches/release-1_0)

Given that srsa_4c verified the sig finder was correct on 102c, I'm pretty confident these are right, but if someone has either of these firmwares and can test the latest autobuild, that would be great. Affected variables relate to zoom status, movie recording status, and canon shoot menu (func menu) being open and recreview mode (holding shutter after shot)
Title: Re: A470 Porting
Post by: srsa_4c on 19 / January / 2013, 11:15:40
From now on, the ON/OFF button can be selected as replacement for the DISP button in ALT mode in CHDK 1.2 .
Title: Re: A470 Porting
Post by: reyalp on 05 / July / 2013, 16:54:57
As discussed in the PTP thread, the raw dimensions given this cameras platform.h did not match the raw size or the values found by the sig finder.

In trunk r2929 (http://trac.assembla.com/chdk/changeset/2929/trunk) I've changed it to use the actual values, adding 6 rows to the raw size.

I don't know what the original motivation for this was. The change may mean that non-dng raw no longer loads in some programs.

Additionally, there was a comment on vid_get_viewport_live_fb (which returns 0) saying "Apparently deprecated". This is not correct. vid_get_viewport_live_fb is used for fast MD etc.