PowerShot SX210 IS - Porting Thread - page 12 - General Discussion and Assistance - CHDK Forum supplierdeeply

PowerShot SX210 IS - Porting Thread

  • 589 Replies
  • 299901 Views
Re: PowerShot SX210 IS - Porting Thread
« Reply #110 on: 18 / August / 2010, 02:49:22 »
Advertisements
I will be porting the sx210 on my return to Canada.  Any other people thinking about porting the sx210 please make yourself known and say if you have any porting experience with chdk.  Any programming experience ect.

Thx Jason
Canon Models - SD300, SD780, & SX210

Re: PowerShot SX210 IS - Porting Thread
« Reply #111 on: 18 / August / 2010, 06:22:38 »
Hey everyone!

Well done to get the fw out of this beast! Special thanks to Oren and Alfred and all the rest who've been working on this for the past months. Wish I could've got involved sooner, but hey, better late than never :-) I have experience with IDA and have a good embedded background, but no previous CHDK experience.

Since I saw this breakthrough yesterday, I've downloaded the SVN sources and have started reading more about porting. I've ran the fw through IDA but only got I think about 6-700 functions detected - maybe the signature file I used wasn't the right one for DryOS? The porting page only provides one .sig file and another DryOS-related page only says the new .sig file is available. Will try this again tonight.

Another thing, if I understand it correctly we need to figure out the new dancing bit pattern for the right encoding. I remember I came across a comment from (maybe) @reyalp where he mentioned he was trying to find this out on another camera. Any help on this would be great.

Cheers!

Re: PowerShot SX210 IS - Porting Thread
« Reply #112 on: 18 / August / 2010, 06:38:53 »
Another thing, if I understand it correctly we need to figure out the new dancing bit pattern for the right encoding. I remember I came across a comment from (maybe) @reyalp where he mentioned he was trying to find this out on another camera. Any help on this would be great.
Yes, reyalp made new dancingbit sequence yesterday, and with this I dumped SX210IS firmware and emlyn switched on LED's on his sd1400, so download fresh sources (r921 or later), build it and use:
Code: [Select]
command line:
dancingbits.exe <input_file> <output_file> 4
to encode diskboot.bin for new cameras

*

Offline reyalp

  • ******
  • 14080
Re: PowerShot SX210 IS - Porting Thread
« Reply #113 on: 18 / August / 2010, 12:33:01 »
Since I saw this breakthrough yesterday, I've downloaded the SVN sources and have started reading more about porting. I've ran the fw through IDA but only got I think about 6-700 functions detected - maybe the signature file I used wasn't the right one for DryOS? The porting page only provides one .sig file and another DryOS-related page only says the new .sig file is available. Will try this again tonight.
That sounds about right for the sigs. You should then run the IDC scripts. These things are far from perfect :)

As Ameglin says, dancingbits is updated. You just need
NEED_ENCODED_DISKBOOT=4
in your platform/sx210/sub/<fw version>/makefile.inc
Don't forget what the H stands for.


*

Offline asm1989

  • *****
  • 527
  • SX720, SX260, SX210 & SX200
Re: PowerShot SX210 IS - Porting Thread
« Reply #114 on: 20 / August / 2010, 11:58:31 »
I will help too, with the port,  Not much time, but I'll do what I can HarpoMa
My aproach is to copy the sx200is code as start looking for similar funcs.

I get 21800 func and 8480 names using the signature CanonFW_DryOS_A-Series.sig,
and then the CHDK.idc script.

1) First, the sensor size:

It can be found at address: FFB2FC6C, just before aCrawBuffSizeP

The size is: 0x14D2400

14D2400  = 21832704

21832704 / 12 * 8 = 14555136

And its verified at :
sub_FFB2F78C
in FFB2F7C0 & FFB2F7C8

0x1140 by 0xCE0

4416 x 3296  = 14555136

--> This is the \trunk921\include\camera.h
http://www.zshare.net/download/79543105383d3c55/
including a set for sx210 (copy of sx200) with the right sensor size




« Last Edit: 20 / August / 2010, 13:12:14 by asm1989 »

*

Offline asm1989

  • *****
  • 527
  • SX720, SX260, SX210 & SX200
Re: PowerShot SX210 IS - Porting Thread
« Reply #115 on: 20 / August / 2010, 13:02:35 »
2) Now the makefile.inc,

I dont know it is right but  for  trunk921\platform\sx210is\sub\100c\makefile.inc
I have this:

Code: [Select]
#PLATFORMID=0x31F6
PLATFORMID=12790

PLATFORMOS=dryos

MEMBASEADDR=0x1900
RESTARTSTART=0x50000
MEMISOSTART=0x152728
ROMBASEADDR=0xFF810000


PLFLAGS=-DMEMBASEADDR=$(MEMBASEADDR) -DMEMISOSTART=$(MEMISOSTART) -DMEMISOSIZE=$(MEMISOSIZE)
PLFLAGS+=-DRESTARTSTART=$(RESTARTSTART)

NEED_ENCODED_DISKBOOT=4
KEYSYS=d4

Everything is copied from sx200, except fo NEED_ENCODED....
and the MEMISOSTART=0x152728
I get that from this position: FF81014C

Does anyone know what is the PLATFORMID?
PD: Included PLARGORMID From :harison213
« Last Edit: 20 / August / 2010, 15:30:16 by asm1989 »

Re: PowerShot SX210 IS - Porting Thread
« Reply #116 on: 20 / August / 2010, 13:42:11 »

Does anyone know what is the PLATFORMID?


Cool, one more onboard. I got over 11k functions using that sig file, though most of them are just a file name!

P-ID can be found using ver.req and is 0x31F6. So the first two lines of makefile.inc are:

Code: [Select]
#PLATFORMID=0x31F6
PLATFORMID=12790

*

Offline asm1989

  • *****
  • 527
  • SX720, SX260, SX210 & SX200
Re: PowerShot SX210 IS - Porting Thread
« Reply #117 on: 20 / August / 2010, 14:02:07 »
Thanks harrison213, yes one more to help,

you get 10K more func and some named, using the CHDK.idc script


Re: PowerShot SX210 IS - Porting Thread
« Reply #118 on: 20 / August / 2010, 14:07:13 »
yes, i've already applied that script. i'm not sure whether the order of applying signature/scripts would make any difference?

*

Offline asm1989

  • *****
  • 527
  • SX720, SX260, SX210 & SX200
Re: PowerShot SX210 IS - Porting Thread
« Reply #119 on: 20 / August / 2010, 15:01:55 »
I aplied firs the sig, then the idc,

I also sugest you have at the same time the sx200 and the sx210 asm to search for similar code.

 

Related Topics