A2000IS porting - page 5 - DryOS Development - CHDK Forum supplierdeeply

A2000IS porting

  • 95 Replies
  • 61133 Views
*

Offline whim

  • ******
  • 2046
  • A495/590/620/630 ixus70/115/220/230/300/870 S95
Re: A2000IS porting
« Reply #40 on: 10 / September / 2009, 05:19:21 »
Advertisements
@dabbeljuh

see my edit on #38 and #36 -> compiles fine under CHDK-Shell (notes.txt can just be an empty file)
work ? no, it's iax and reyalp who did that, i'm just playing and assuring CHDK-Shell doesn't trip over new
builds (in this case, if the cam panel would still be readable after the resize  :D )
  
wim

edit:
Quote
I know I could do it by adding the a2000-lines to the root-Bootfile, but I'm just tired of doing it with every new build
just copy Makefile from previous (did that for 797 -> 798 myself)
« Last Edit: 10 / September / 2009, 05:39:49 by whim »

*

Offline reyalp

  • ******
  • 14080
Re: A2000IS porting
« Reply #41 on: 10 / September / 2009, 14:45:14 »
edit: still misses notes.txt though (and maybe commented-out root Makefile entries) :
Quote
lib.c: In function 'hook_raw_fptr':
lib.c:50: warning: return makes pointer from integer without a cast
cat: ./platform/a2000/notes.txt: No such file or directory
Ah, I just use make fir for development.
Quote
@dabbeljuh
remove warning by adding "(void *)" before "0xEC04F0" in platform/sub/100c/lib.c
and CHDK-Shell will give you the 'green light'
As I said before, all the hook_raw* stuff is obsolete (it's not actually used anywhere), and will go away.

edit: to be specific,  hook_raw_fptr and hook_raw_ret_addr

« Last Edit: 10 / September / 2009, 16:56:33 by reyalp »
Don't forget what the H stands for.

*

Offline iax

  • *
  • 45
Re: A2000IS porting
« Reply #42 on: 10 / September / 2009, 17:53:40 »
Hi all, thanks for all the work.

Fixed the following things:

- fixed key mappings. Now CHDK menu is activated by the MENU button instead of DISPLAY button
- fixed battery temperature crash (used same sx100 workaround)
- added content to notes.txt file
- removed hook_raw* from lib.c
- fixed platform id value
- fixed fl_tbl  and CF_EFL values

Still have to fix aperture/ndfilter stuff.

Attaching diff file against 797 and diskboot.bin

Attaching diff file against 797.

*

Offline reyalp

  • ******
  • 14080
Re: A2000IS porting
« Reply #43 on: 10 / September / 2009, 18:42:30 »
Checked in, svn 799 comments/changes below
- fixed key mappings. Now CHDK menu is activated by the MENU button instead of DISPLAY button
I'm a bit confused. Does the KEY_MENU in kbd.c correspond to the canon menu or display key ? I would suggesting mapping those to the actual key, and adjusting the key detected by the code if needed. Also, why not use the direct print button, like other CHDK cameras ?
Quote
- removed hook_raw* from lib.c
Err, sorry for the confusion, but you definitely need hook_raw_image_addr and hook_raw_size! I'm surprised it compiled without those.
I know said * before but that was wrong.  :(

I've kept this in the version I checked in. Hrm, looking what I checked originally checked in, I didn't include the fptr and ret_addr stuff. Maybe whim's right about not sleeping enough.
Quote
- fixed platform id value
- fixed fl_tbl  and CF_EFL values
Have you checked that correct values are displayed ? It looks looks like a 10 might be dropped somewhere, but I'm not sure. Check osd parameters->misc values->show zoom in EFL and make sure it is close to the canon specs.
Quote
Still have to fix aperture/ndfilter stuff.
Note this should be accounted for in aperture_sizes_table in shooting.c. See any of the ixus cameras for an example.

dof_tbl in shooting.c looks like it is probably wrong too, since it has more than 8 steps. In fact, I'm not sure what it's doing since it doesn't appear to be referenced anywhere and is only present in some cameras.
Don't forget what the H stands for.


*

Offline iax

  • *
  • 45
Re: A2000IS porting
« Reply #44 on: 11 / September / 2009, 04:23:07 »
Quote
I'm a bit confused. Does the KEY_MENU in kbd.c correspond to the canon menu or display key ? I would suggesting mapping those to the actual key, and adjusting the key detected by the code if needed. Also, why not use the direct print button, like other CHDK cameras ?

Problem was that, once entered in ALT mode with the Direct Print button like other cameras, I had to use the DISP button instead of the MENU button to enter the CHDK menu. So I thought the problem was an incorrect association of the KEY_MENU and KEY_DISPLAY entries in the keymap array. I've just switched the two values and now I can enter the CHDK menu through the "standard" sequence DirectPrint->Menu keys. Is this the correct approach to this problem? Please advise if there is a cleaner solution.

Quote
I know said * before but that was wrong.  

No problem at all :)

Quote
Have you checked that correct values are displayed ? It looks looks like a 10 might be dropped somewhere,
Should be ok, actually I use the 1000 factor in the code for CF_EFL and get_effective_focal_length, it is the comment line that is wrong!

Attaching a new DISKBOOT rebuilt with the hook_raw_image_addr and hook_raw_size in place
« Last Edit: 11 / September / 2009, 04:38:21 by iax »

*

Offline reyalp

  • ******
  • 14080
Re: A2000IS porting
« Reply #45 on: 11 / September / 2009, 05:19:00 »
Problem was that, once entered in ALT mode with the Direct Print button like other cameras, I had to use the DISP button instead of the MENU button to enter the CHDK menu. So I thought the problem was an incorrect association of the KEY_MENU and KEY_DISPLAY entries in the keymap array. I've just switched the two values and now I can enter the CHDK menu through the "standard" sequence DirectPrint->Menu keys. Is this the correct approach to this problem? Please advise if there is a cleaner solution.
No that sounds exactly right, I just didn't understand the earlier description.

FWIW, you can use "misc debug values" to watch how physw_status responds to various buttons. See gui_draw_debug_vals_osd() in core/gui.c
Don't forget what the H stands for.

*

Offline iax

  • *
  • 45
Re: A2000IS porting
« Reply #46 on: 11 / September / 2009, 16:26:16 »
@reyalp
Quote
dof_tbl in shooting.c looks like it is probably wrong too, since it has more than 8 steps. In fact, I'm not sure what it's doing since it doesn't appear to be referenced anywhere and is only present in some cameras.

I checked, looks like dof_tbl is not used , also discussed here: http://chdk.setepontos.com/index.php/topic,2838.msg33975.html#msg33975

*

Offline iax

  • *
  • 45
Re: A2000IS porting
« Reply #47 on: 12 / September / 2009, 20:07:43 »
Ok I have found the NDFilter control functions in firmware and built a new diskboot which allows me to control ND Filter On/Off. It's working, will post diff  soon.

Just wondering: for cameras with an ND filter, is the aperture_sizes_table required or used in some way ? Should I fill the table taking pictures at all the differen zoom steps wid ND filter on/off?

Thanks


*

Offline reyalp

  • ******
  • 14080
Re: A2000IS porting
« Reply #48 on: 12 / September / 2009, 20:25:19 »
Just wondering: for cameras with an ND filter, is the aperture_sizes_table required or used in some way ? Should I fill the table taking pictures at all the differen zoom steps wid ND filter on/off?
Yes, it is still used AFAIK. You should be able to figure out how many stops the ND filter is good for if you don't want to go through them all.
Don't forget what the H stands for.

*

Offline iax

  • *
  • 45
Re: A2000IS porting
« Reply #49 on: 13 / September / 2009, 19:05:56 »
Updated version:

- ND filter support
- fixed the aperture_sizes_table in shooting.c by measuring av values and aperture value reported by exif

Attaching latest diskboot and diff against 799

 

Related Topics