A2200 IS porting thread - page 14 - DryOS Development - CHDK Forum supplierdeeply

A2200 IS porting thread

  • 515 Replies
  • 193080 Views
Re: A2200 IS porting thread
« Reply #130 on: 26 / December / 2011, 14:51:49 »
Advertisements
I surely did.... but every other model compiles fine but a2200 won't compile at all.... Weird
You need to create a trunk/loader/a2200 directory structure too.
Ported :   A1200    SD940   G10    Powershot N    G16

Re: A2200 IS porting thread
« Reply #131 on: 27 / December / 2011, 00:14:52 »
If I enable RAW / DNG formats here, the camera turns itself off when I try to take a picture. I've created the badpixel.bin file. Using version 2011.12.24, firmware version 1.00b.

With just enabling RAW on my camera works. I can't reproduce that. Did you also enable any other options?

Yes - on further testing, it seems that the power off only occurs in RAW or DNG mode if I also enable "RAW file in dir with JPEG". It does it every single time with these options enabled.

*

Offline philmoz

  • *****
  • 3450
    • Photos
Re: A2200 IS porting thread
« Reply #132 on: 27 / December / 2011, 00:35:53 »
If I enable RAW / DNG formats here, the camera turns itself off when I try to take a picture. I've created the badpixel.bin file. Using version 2011.12.24, firmware version 1.00b.

With just enabling RAW on my camera works. I can't reproduce that. Did you also enable any other options?

Yes - on further testing, it seems that the power off only occurs in RAW or DNG mode if I also enable "RAW file in dir with JPEG". It does it every single time with these options enabled.

There are two variations on the _GetImageFolder function depending on the DryOS version. This is called in get_target_dir_name in shooting.c.

The first one (which is used in the A2200 code) does not put the partition letter (A) at the start of the string so the code in get_target_dir_name does it.

The newer version (which you should probably be using) puts the partition letter in the path string - so in your code you are probably generating an invalid path. See the IXUS 310 code for usage of this version.

Phil.
CHDK ports:
  sx30is (1.00c, 1.00h, 1.00l, 1.00n & 1.00p)
  g12 (1.00c, 1.00e, 1.00f & 1.00g)
  sx130is (1.01d & 1.01f)
  ixus310hs (1.00a & 1.01a)
  sx40hs (1.00d, 1.00g & 1.00i)
  g1x (1.00e, 1.00f & 1.00g)
  g5x (1.00c, 1.01a, 1.01b)
  g7x2 (1.01a, 1.01b, 1.10b)

Re: A2200 IS porting thread
« Reply #133 on: 27 / December / 2011, 01:50:40 »
philmoz: ah, I should point out here that I didn't compile CHDK myself, I merely used the binary kindly provided by Nilinhim.


Re: A2200 IS porting thread
« Reply #134 on: 27 / December / 2011, 04:02:44 »
Trying to port 1.00d.

a) As I am learing, I was able to dump a firmware from my 1.00d firmware.
b) I was able to compile under windows using chdk shell.
These two tasks are quite easy for the pros, not for me ;)

Now trying to port 1.00d using the port of 1.00b.

I need some help with the CHDK-PT tool (v.1.06).

I am on the topic "Converting stubs_entry_2.S" of the tutorial:
http://chdk.wikia.com/wiki/CHDK-PT_:_A_tool_for_porting_CHDK_to_different_firmware_versions_of_the_same_camera

From the tutorial: "Note : if there are already two or more firmware versions supported for your camera, use diff to look for changes between versions in these files."
Where is the source code for 1.00C by ryan00019 ? That would greatly help. How can I send a request to ryan00019 to provide the source code if possible ?

I need help with finding addresses to create address.txt for the topic "Converting the C language CHDK task files".

How do I get the addresses to create new boot.c,capt_set.c, etc ? Can someone provide the addresses or direction to find the addresses ?

Thanks

[PS: Thanks to waterwingz for your earlier response and CHDK-PT.]
« Last Edit: 27 / December / 2011, 04:08:13 by aftab »

Re: A2200 IS porting thread
« Reply #135 on: 27 / December / 2011, 07:56:28 »
There are two variations on the _GetImageFolder function depending on the DryOS version. This is called in get_target_dir_name in shooting.c.

The first one (which is used in the A2200 code) does not put the partition letter (A) at the start of the string so the code in get_target_dir_name does it.

The newer version (which you should probably be using) puts the partition letter in the path string - so in your code you are probably generating an invalid path. See the IXUS 310 code for usage of this version.

Phil.

Thanks for pointing that out! I changed the code to IXUS 310 one and it works

philmoz: ah, I should point out here that I didn't compile CHDK myself, I merely used the binary kindly provided by Nilinhim.

You're welcome! I'll upload new binary's when I do some more bug hunting.

Trying to port 1.00d.
...

Nemesisforever is also trying to port 1.00D version, wish you both good luck.

You can send ryan00019 a private message if he's not activly reading this thread.

As for the addresses from the dump, I used gcc to decompile it or ARMu to brows trough it (I'm not rich enough for IDA). You don't need diff's, you can just open my firmware dump, jump to the address from my code, see how the dump code looks like and then compare it to the code in your dump. If it's the same, the address is the same, if not, search around to match the code from my dump to your dump and put in a new address.

Re: A2200 IS porting thread
« Reply #136 on: 27 / December / 2011, 08:53:39 »
As for the addresses from the dump, I used gcc to decompile it or ARMu to brows trough it (I'm not rich enough for IDA).
The price for CHDK-PT is pretty good too.  And it outputs assembly  code in a format directly compatible with the gcc compiler.  However, ARMu can work with IDA files so there are times when its good to use it too.
Ported :   A1200    SD940   G10    Powershot N    G16

Re: A2200 IS porting thread
« Reply #137 on: 27 / December / 2011, 09:14:32 »
How do I get the addresses to create new boot.c,capt_set.c, etc ? Can someone provide the addresses or direction to find the addresses ?
This step seems to cause people the most difficulty.   I guess I need to take a fourth try at rewriting that part of the wiki page. How's this :

The next step in the porting process is to create three assembly code files, called boot.c,  movie_rec.c and capt_seq.c.   These files contain tasks that are essentially disassembled code from the camera, recreated as assembly language files with changes (or "hooks") added to allow CHDK code to be inserted into the program execution.  When CHDK loads at startup,  it runs these task as if it was the original camera code but the added CHDK code gives the additional CHDK functionality.

The easiest and best way to create these new files is to examine those files in the existing port (in this case, the 1.00b port).    You want to create essentially identical files,  except that the addresses in those original files that point to addresses in the original camera firmware need to change so that they point to the correct addresses in your camera's firmware.  You can go through line-by-line and compare firmware dumps, looking for all the changes (and you have to find 100% of them !).  Or you can let CHDK-PT do the hard work for you.

To create your new tasks,  you first need an addresses.txt file.   This file is just a list of  text labels, addresses and lengths for each routine that needs to be dissassembled.    You can create this file by looking at the supplied example so that you understand the format,  and then looking at each of the three task  files in the existing port (1.00b).  For each subroutine in those three original files,  create a line in addresses.txt that has the name of the routine,  its start address and its length.

Once you have an addresses.txt from the existing port, CHDK-PT can take over.  Use the button labelled Address List in the the Convert section on the right hand side of the window (the second button up from the bottom).    Click it and specify the addresses.txt file you just created and the primary.bin firmware files for both the original camera and your new camera.  Press the Convert button and CHDK-PT will look at the code in the existing port's firmware and find the same code in the new firmware.  The output window will then show the required routines for the new port's task files.

The final step is to save the new code and then cut & paste it into your task files.  There will still be some changes needed to some of the new routines where CHDK is hooked into the code.  The best way to find those is to simply diff the resulting files with those of the original port.

Is that better ?

EDIT : fixed some typos
« Last Edit: 27 / December / 2011, 09:53:50 by waterwingz »
Ported :   A1200    SD940   G10    Powershot N    G16


Re: A2200 IS porting thread
« Reply #138 on: 28 / December / 2011, 13:48:07 »
Update report

(same links, new files)
* beta build (2011.12.28): DISKBOOT.BIN firmware version 1.00b, use the Card Lock method
* beta source (2011.12.28): chdk.a2200.zip based on CHDK svn version 1509

Updated to latest and greatest + more or less stuff works!

Some notes:

Enabling Override Subj. Dist. works if camera is first put in AFL (Auto Focus Lock) mode. Press shutter key half way, wait for it to lock focus and then press left (key with the flower on it). After that custom values can be set in ALT mode and the camera respects them.

Saving RAW's with JPG's now works.

Colors work. They already worked in previous release, but I forgot to clear the config files on my card (derp).

Sokoban and other games should have worked from the beginning, forgot to copy lvl files on to my card (herp)

Unlock optical zoom in video has been disabled (works, but after using zoom once, the zoom controls become unresponsive in any mode, needs a reboot, possibly related issue with Override Subj. Dist. in photo mode, needs more attention). Also, continuous AF under video doesn't work so it's kind of a moot point to have it any way.

Manual zoom under video on the other hand does work (start shooting video, go to ALT mode, press DISPLAY and use zoom controls to adjust focus).

EDIT: Fixed some spelling mistakes.
« Last Edit: 28 / December / 2011, 14:14:33 by Nilinhim »

Re: A2200 IS porting thread
« Reply #139 on: 28 / December / 2011, 14:05:33 »
Thanks for all the effort you've put into this, Nilinhim, it's much appreciated! I've downloaded the latest binary and will try it tonight! :)

 

Related Topics


SimplePortal 2.3.6 © 2008-2014, SimplePortal