Advice: reference camera model for A2000IS port - DryOS Development - CHDK Forum supplierdeeply

Advice: reference camera model for A2000IS port

  • 7 Replies
  • 5179 Views
*

Offline iax

  • *
  • 45
Advice: reference camera model for A2000IS port
« on: 31 / July / 2009, 08:54:02 »
Advertisements
I'd like to try to port CHDK to the a2000is.

I've recently dumped the firmware, loaded into IDA and started some preliminary analisys. Also I've the build environment ready.

Right now I am considering the a720is and the SX110is, however I'd like to have opinions from you CHDK esperts about the best model to take as a starting point for A2000IS porting.


Any advice or suggestion would be greatly appreciated.
Thanks for your time

*

Offline reyalp

  • ******
  • 12208
Re: Advice: reference camera model for A2000IS port
« Reply #1 on: 02 / August / 2009, 01:25:49 »
You will probably want to refer frequently to several different cameras. I'd suggest the SX10 101A as one, because it is recent and much of the work was done by ewavr who has a very high level of CHDK knowledge. The a720 is one of the original dryos ports and is very mature, so it's also a useful reference, but some simpler ways of doing things have been used in more recent ports. It is also quite old, so the canon firmware may be less similar.

You will also find that some ports are better documented than others. I suggest S5 101b and my SD990 port as fairly well documented.

I'm not personally a fan of making a copy and then trying to "correct" it (many people disagree with me, and that's OK!) What I did with the SD990 was go through the directory tree of a reference port, and for each file, create the corresponding file in the new port. Within each file I would copy/paste stuff that obviously didn't need changing, but I avoided copying files wholesale.  Advantages of doing it this way are:
- Forces you to examine each file.
- Forces you to pay attention to thing's you don't understand. You can still copy/paste and hope it works, but you'll at least have a chance to put a big TODO comment on it.
- Avoids bugs caused by copy/pasting incorrect values. You can still set unknown values to some nonsense to make it compile, but again you are forced to notice they are unknown.
- Makes it easier to use multiple reference firmwares. This is useful because different parts of your port will be closer to different cameras.

edit:
Note that by suggesting that you go through each file, I am not saying that you have to make it fully functional before you try to run it. For example, in boot.c you can just put in a comment where the things that start the various customized tasks would go, and start the standard ones instead. You can build this without having completed capt_seq.c or movie_rec.c at all. Then you can progressively add/enable things as you get it booting correctly up to various points. I strongly suggest working this way.
« Last Edit: 20 / August / 2009, 23:43:57 by reyalp »
Don't forget what the H stands for.

*

Offline iax

  • *
  • 45
Re: Advice: reference camera model for A2000IS port
« Reply #2 on: 03 / August / 2009, 16:41:36 »
Thanks so much for the info and advices, very helpful indeed

Re: Advice: reference camera model for A2000IS port
« Reply #3 on: 21 / August / 2009, 04:59:40 »
@reyalp: thanks for pointing me to this discussion.

@iax:
I also have a canon a2000is, with firmware 100c.  I was going to start looking in to doing a port - this will be my first time trying to port chdk.  I haven't done anything on it yet.  How is your port going so far?

I downloaded the firmware you dumped, and I'm just starting to look at it now


*

Offline iax

  • *
  • 45
Re: Advice: reference camera model for A2000IS port
« Reply #4 on: 27 / August / 2009, 10:03:06 »
Hi,
I am struggling trying to make the camera boot under chdk control...

My boot code should be compete. It is mostly based on the sx110 port (also some information from s720, s5 and sd990 have been useful).

Also I think I have fixed all the camera specific values and function pointers.

I can follow the boot process with a blinker task. Everything looks fine, however camera hangs when my boot routine ends and control is finally passed to camera firmware. This also happens trying to boot without loading any extension.

I have still few ideas I'd like to try though, I think I am quite close.

How is your progress on that? Are you trying a port too?

*

Offline iax

  • *
  • 45
Re: Advice: reference camera model for A2000IS port
« Reply #5 on: 27 / August / 2009, 14:44:22 »
good news!

I am finally able to boot my camera under chdk control (no extension loaded). Some problems though. This is the behaviour:

- camera boots in play mode (i think is ok for chdk normal boot)

- If I do not touch anything, the camera crashes after about 10 seconds. Blue led flashes just before the camera shuts down

- if I half press the shoot button, camera enter shoot mode. CHDK splash screen is displayed correctly.

- in shoot mode, if i thy to enter the menu, camera shows the menu but crashes after about 2 seconds.

Anyway, at least I am able to boot. Any suggestion about the issues I have described would be very appreciated.

I'll keep the forum updated about the development progress.

*

Offline reyalp

  • ******
  • 12208
Re: Advice: reference camera model for A2000IS port
« Reply #6 on: 27 / August / 2009, 17:08:05 »

I am finally able to boot my camera under chdk control (no extension loaded). Some problems though. This is the behaviour:

- camera boots in play mode (i think is ok for chdk normal boot)
On most cameras with both a play and power button, CHDK will always start in play mode. You can see workarounds for this in the SX10 code for example, so you can hold the power button down longer to get into rec mode.
Quote
- if I half press the shoot button, camera enter shoot mode. CHDK splash screen is displayed correctly.
The CHDK splash should only show up at boot, not when switching modes (but maybe your camera actually reboots when you change ?)
Quote
- in shoot mode, if i thy to enter the menu, camera shows the menu but crashes after about 2 seconds.
Canon menu or alt menu ?

Quote
Anyway, at least I am able to boot. Any suggestion about the issues I have described would be very appreciated.
It's pretty much impossible to tell based on a description like this. I would suggest a process of elimination, progressively disabling your modifications until it boots normally.

edit:
If you are starting with diskboot, this may lead to a boot loop. You can avoid this by using firm update instead.
« Last Edit: 27 / August / 2009, 17:10:38 by reyalp »
Don't forget what the H stands for.

*

Offline iax

  • *
  • 45
Re: Advice: reference camera model for A2000IS port
« Reply #7 on: 28 / August / 2009, 18:29:58 »
issues solved :) I did not call the init_file_modules_task function properly...

I've started the thread dedicated to the a2000 porting ptoject:

http://chdk.setepontos.com/index.php/topic,4141.0.html



 

Related Topics