PowerShot SX230 HS - Porting Thread

  • 683 Replies
  • 165253 Views
*

Offline aquilla

  • *
  • 21
  • sx230hs fw v1.01a
Re: PowerShot SX230 HS - Porting Thread
« Reply #30 on: 03 / June / 2011, 19:06:30 »
Advertisements
Thanks for your help.  I might take a look at that firmware dump tonight.  Again, good luck with the porting process!  Take care...
-Aquilla

*

Offline sylikc

  • **
  • 66
  • SX230HS 1.00c, SD750 1.02a ;)
Re: PowerShot SX230 HS - Porting Thread
« Reply #31 on: 03 / June / 2011, 19:20:54 »
hehe, can't wait to see what your code looks like.  Your analysis on the tasks being very very different finally explain why when I started to move to porting tasks... I got really lost.  The instructions are totally different than on the SX220.

Well, I will wait till you get further along then :D.  I don't really know what I'm doing other than copying and pasting code from IDA into .c files.  I don't have a clue how I would debug if I get like one instruction wrong somewhere...

Btw, I was testing today... a toothpick (or similar object) carefully jabbed into the corner of the camera would reduce wear-and-tear on the cheap plastic battery/memory card door opening/closing.  If you're doing a lot of firmware testing (if we start making builds, I know it'll be tons and tons of them), you might consider doing that.... so that the bay door doesn't get all loose from over-use.

(essentially, the toothpick holds a tiny switch down to signal to the camera the door is closed)

/sylikc
props to TPC + PhyrePhox for SD750 work: IXUS75/SD750 1.01a | 1.00b | 1.02a Thread
props to quietschi for multipartition support + button fixes!
SD750 bracketing issues

*

Offline aquilla

  • *
  • 21
  • sx230hs fw v1.01a
Re: PowerShot SX230 HS - Porting Thread
« Reply #32 on: 03 / June / 2011, 20:02:55 »
Quote
If you could, please post somewhere (box.net, zshare, etc) your firmware dump so we can see if there's any difference to the one aquilla made a few days ago.

/sylikc

Well, I just ran my firmware dump and taliesin's firmware dump through ExamDiff Pro, a shareware program designed to analyze the differences between files.  Although at first glance I noticed nothing, but the program caught quite a few differences.  A grand total of 227012 differences between the two bin files were found.  That sounds like an astronomical number, but I'm not really sure if it means anything.  For the most part, the differences occurred in sequences of the code with repeating patterns.  If anyone else would care to analyze the files as well you can find the shareware available for download at http://www.prestosoft.com/edp_download.asp

I also compared my firmware dump to sylikc's firmware dump (v1.00c) so I had something to compare this 227012 figure to.  ExamDiff Pro reported 373430 differences.  I'm not sure what this means but feel free to check for yourself.  Its odd that we would both get the same firmware versions when using ver.req but see such drastic differences in the binaries.  Any ideas?
-Aquilla

*

Offline sylikc

  • **
  • 66
  • SX230HS 1.00c, SD750 1.02a ;)
Re: PowerShot SX230 HS - Porting Thread
« Reply #33 on: 03 / June / 2011, 20:24:50 »
Well, I just ran my firmware dump and taliesin's firmware dump through ExamDiff Pro, a shareware program designed to analyze the differences between files.  Although at first glance I noticed nothing, but the program caught quite a few differences.  A grand total of 227012 differences between the two bin files were found.  That sounds like an astronomical number, but I'm not really sure if it means anything.  For the most part, the differences occurred in sequences of the code with repeating patterns.  If anyone else would care to analyze the files as well you can find the shareware available for download at http://www.prestosoft.com/edp_download.asp

I also compared my firmware dump to sylikc's firmware dump (v1.00c) so I had something to compare this 227012 figure to.  ExamDiff Pro reported 373430 differences.  I'm not sure what this means but feel free to check for yourself.  Its odd that we would both get the same firmware versions when using ver.req but see such drastic differences in the binaries.  Any ideas?

IIRC, you have the PAL version and taliesin has the NTSC version.  I don't know what the differences are at the moment, but I'm assuming that makes a difference.

In any case, I "believe", the way that the tasks work, it certain tasks having different code is ok.  CHDK will call the internal firmware for certain functions.  Someone with more experience with CHDK feel free to chime in . . . ;)
props to TPC + PhyrePhox for SD750 work: IXUS75/SD750 1.01a | 1.00b | 1.02a Thread
props to quietschi for multipartition support + button fixes!
SD750 bracketing issues


*

Offline aquilla

  • *
  • 21
  • sx230hs fw v1.01a
Re: PowerShot SX230 HS - Porting Thread
« Reply #34 on: 03 / June / 2011, 20:38:00 »
So its just a difference in the aspect ratio that shouldn't affect the compatibility of taliesin's port and my camera?  I hope you're right, sylikc. 
-Aquilla

*

Offline reyalp

  • ******
  • 11592
Re: PowerShot SX230 HS - Porting Thread
« Reply #35 on: 04 / June / 2011, 01:16:21 »
I also compared my firmware dump to sylikc's firmware dump (v1.00c) so I had something to compare this 227012 figure to.  ExamDiff Pro reported 373430 differences.  I'm not sure what this means but feel free to check for yourself.  Its odd that we would both get the same firmware versions when using ver.req but see such drastic differences in the binaries.  Any ideas?
Dumps from cameras with the same firmware version will NOT be identical. The camera "ROM" is flash memory, which in addition to the firmware code is used to store settings, calibration data, crash logs etc.

If you want to make a meaningful comparison, you'd have to restrict yourself to the code and static areas. The main code is at the start of the dump (FF000000/FF810000/FFC00000 depending on the camera), and is followed by some static data (you can find the size and length very early in the code). There is also a small chunk of code at FFFF0000 for the boot loader.

In all known cases up to now,  PAL and NTSC market models with the same firmware version have identical code and only need one CHDK port.

The differences between canon versions are generally quite small, but if any code or data address CHDK uses is moved, a new port is needed.
Don't forget what the H stands for.

Re: PowerShot SX230 HS - Porting Thread
« Reply #36 on: 04 / June / 2011, 03:41:39 »
Hey guys, just got back from Airsoft and through I would post a quick update.

Im pretty confident I got the bootstrap code working ( well I would like to believe so ) however when I go to compile the loader it fails on the Function Calls. I tried the IDA script which creates stubs_entry_ida.S with no luck. Anyone one sufessfully got this script to work?

So looks like it will be a late night trying to find the addresses of functions.

Does anyone know if there is a way to compile the loader without the CHDK bits and pieces?



Taliesin

Re: PowerShot SX230 HS - Porting Thread
« Reply #37 on: 04 / June / 2011, 03:44:49 »
hehe, can't wait to see what your code looks like.  Your analysis on the tasks being very very different finally explain why when I started to move to porting tasks... I got really lost.  The instructions are totally different than on the SX220.

Well, I will wait till you get further along then :D.  I don't really know what I'm doing other than copying and pasting code from IDA into .c files.  I don't have a clue how I would debug if I get like one instruction wrong somewhere...

Btw, I was testing today... a toothpick (or similar object) carefully jabbed into the corner of the camera would reduce wear-and-tear on the cheap plastic battery/memory card door opening/closing.  If you're doing a lot of firmware testing (if we start making builds, I know it'll be tons and tons of them), you might consider doing that.... so that the bay door doesn't get all loose from over-use.

(essentially, the toothpick holds a tiny switch down to signal to the camera the door is closed)

/sylikc

The sx230 has very simular tasks function than the Sx220 however they are in a different order, and at different address so they have to be searched out.

Depending on how much progress I make on the 101a firmware I might be able to give a hand to the 100c. But no garentees.

I still have no luck of booting from my SD card.


Re: PowerShot SX230 HS - Porting Thread
« Reply #38 on: 04 / June / 2011, 05:58:56 »
I manage to get it to compile but needed to comment a lot of code out. I uploded the bin to
http://www.box.net/shared/hx8vuank4b can someone let me know what happens when it is run.

It should boot the camera as per normal.

I would do it myself however I still cant get the camera to load fw.

This bin and others I release are use at your own risk. I will not be held responsible for anything that happens. If it makes you feel any better I would do it on my 1 day old camera if I could.

Taliesin

Re: PowerShot SX230 HS - Porting Thread
« Reply #39 on: 04 / June / 2011, 06:43:33 »
I discovered that while looking for function, when importing the firmware into IDA I mistyped the size so was only working on half the firmware.

:( I will go through and re-check my previous work

 

Related Topics