IXUS 230 HS - Porting Thread - page 2 - General Discussion and Assistance - CHDK Forum

IXUS 230 HS - Porting Thread

  • 168 Replies
  • 71798 Views
*

Offline fe50

  • ******
  • 3152
  • IXUS50 & 860, SX10 Star WARs-Star RAWs
    • fe50
Re: IXUS 230 HS - Porting Thread
« Reply #10 on: 02 / December / 2011, 04:40:26 »
Advertisements
Hello & welcome, ramja !

How do I find the actual version on the 310 HS?

There are also some tools available to extract the real fw version from a still image of your camera, the links can be found here:

* http://chdk.wikia.com/wiki/FAQ#Q._How_can_I_get_the_original_firmware_version_number_of_my_camera.3F

*

Offline tommi2water

  • ***
  • 157
  • IXUS 220 HS Firmware: 1.00c
Re: IXUS 230 HS - Porting Thread
« Reply #11 on: 02 / December / 2011, 10:21:45 »
Downloaded the binaries and tried to bootup the camera, nothing as expected. Had a mini freakout on how to get it to start back up (remove battery, remove card, reinsert battery, close batter cover...for anyone else drawing a blank). Will start to port using the source you provided and looking over the elph300 source.
I'm using linux (gentoo) so I'm also working on setting up a development environment to work with in a VM.

As you can see here: http://chdk.setepontos.com/index.php?topic=6341.msg76201#msg76201
we had exactly the same problem when we started porting. But this means that something is already started (and crashes). => That's not too bad.  :)

Maybe you follow the thread from that post to understand what mistakes we did and how we solved them.  ;)

One idea, in your platform/ixus230_elph310hs/sub/100b/boot.c file in line 434, change:
Code: [Select]
"BL   CreateTask_spytask\n" // added to create the Spytask (afaik the main CHDK Task)
"BL   taskcreatePhySw_my\n" // --> patched taskcreate_PhySw() org: 0xFF0253dc but no BL-call found for this address, maybe it is FF0249FC!?

to
Code: [Select]
"BL   CreateTask_spytask\n" // added to create the Spytask (afaik the main CHDK Task)
//"BL   taskcreatePhySw_my\n" // --> patched taskcreate_PhySw() org: 0xFF0253dc but no BL-call found for this address, maybe it is FF0249FC!?

Then function "taskcreatePhySw_my" will not be called, which stops creating the my_kbd task. You can call that function later when camera is starting up somehow more.  ;)

Update:
I attached above boot.c and generated binary to this post in a ZIP-file.
Two other variants (with other boot.c files) I will post below.

Please test these three variants. Maybe one of them shows more than only black screen.

« Last Edit: 02 / December / 2011, 10:25:14 by tommi2water »

*

Offline tommi2water

  • ***
  • 157
  • IXUS 220 HS Firmware: 1.00c
Re: IXUS 230 HS - Porting Thread
« Reply #12 on: 02 / December / 2011, 10:26:58 »
Update:
I attached above boot.c and generated binary to this post in a ZIP-file.
Two other variants (with other boot.c files) I will post below.

Please test these three variants. Maybe one of them shows more than only black screen.

Attached the two other variants of boot.c and their binaries for testing.

Re: IXUS 230 HS - Porting Thread
« Reply #13 on: 02 / December / 2011, 19:11:07 »
Download the three versions you provided:
Overwritting the DISKBOOT.BIN and PS.FI2 from the original file

Version 1: Does not complete the boot, blank screen. Removed battery to reset.

Version 2: Same as version 1, no successful bootup.

Version 3: Same as other two versions.

Will dig deeper tonight and post my results.

*

Offline tommi2water

  • ***
  • 157
  • IXUS 220 HS Firmware: 1.00c
Re: IXUS 230 HS - Porting Thread
« Reply #14 on: 03 / December / 2011, 08:09:14 »
Because I did the same cleanup of stubs_entry2.s in ELPH300 project today I continued to do the same changes for your ELPH310.

Please find attached stubs_entry2.s file for your 1.00b Firmware. Needs to be placed into folder platform\ixus230_elph310hs\sub\100b\.

This means no change of functionality but better readability of source code because most of the stubs_entry stuff is created automatically during build process in stubs_entry.S file.

*

Offline tommi2water

  • ***
  • 157
  • IXUS 220 HS Firmware: 1.00c
Re: IXUS 230 HS - Porting Thread
« Reply #15 on: 03 / December / 2011, 10:52:31 »
I haven't looked at the code in detail; but I noticed a couple of things in boot.c.
...
The line:
   *(int*)(0x2638) = (*(int*)0xC0220130)&1 ? 0x200000 : 0x100000;
should be
   *(int*)(0x25F4) = (*(int*)0xC0220130)&1 ? 0x200000 : 0x100000;
...

One more idea, during ELPH300 porting I got the above hint from Phil that I have to change some more stuff.

In ELPH300 we are currently using the 0x25F4 value (according to the advice from Phil):
Code: [Select]
// replacement of sub_FF024B5C for correct power-on.
// http://chdk.setepontos.com/index.php?topic=6341.msg76409#msg76409
*(int*)(0x25F4) = (*(int*)0xC0220130)&1 ? 0x200000 : 0x100000;
//*(int*)(0x2638) = (*(int*)0xC0220130)&1 ? 0x200000 : 0x100000;

If I try to use the original code with value 0x2638 (which I took from ELPH500):
Code: [Select]
// replacement of sub_FF024B5C for correct power-on.
// http://chdk.setepontos.com/index.php?topic=6341.msg76409#msg76409
//*(int*)(0x25F4) = (*(int*)0xC0220130)&1 ? 0x200000 : 0x100000;
*(int*)(0x2638) = (*(int*)0xC0220130)&1 ? 0x200000 : 0x100000;

I fall back to the same behaviour on my ELPH300 like you see currently on ELPH310. So, my conclusion is that if we use the 0x2638 value from ELPH500 we have higher chance to see ELPH310 starting up a little bit more. In parallel I will ask Phil how he found out which value we have to use for ELPH300, then we will hopefully get to the correct ELPH310 value.

-----------------------------------------------------------------------------------------------------
Update:
You should use 0x2610 which I found at address 0xff05788c in your firmware.

You should try to use 0x2638 value because ELPH310 is probably more similar to ELPH500 than to ELPH300.

I generated three different binaries which uses 0x2610 value and attached them to this and the next post. ZIP-Files contain corresponding boot.c files.

Please test.

Overview of the three versions:

Version 1 (uses 0x2610 ) (original Canon startup):
Code: [Select]
" BL sub_FF0249FC \n"                      // rom:ff00fc4c  0xEB00536A
//"BL   CreateTask_spytask\n"    // added to create the Spytask (afaik the main CHDK Task)
//"BL   taskcreatePhySw_my\n"  // --> patched taskcreate_PhySw() org: 0xFF0253dc but no BL-call found for this address, maybe it is FF0249FC!?

Version 2 (uses 0x2610 ) (CHDK Spytask started):
Code: [Select]
" BL sub_FF0249FC \n"                      // rom:ff00fc4c  0xEB00536A
"BL   CreateTask_spytask\n"    // added to create the Spytask (afaik the main CHDK Task)
//"BL   taskcreatePhySw_my\n"  // --> patched taskcreate_PhySw() org: 0xFF0253dc but no BL-call found for this address, maybe it is FF0249FC!?

Version 3 (uses 0x2610 ) (CHDK Spytask and MyKbd Task started):
Code: [Select]
//" BL sub_FF0249FC \n"                      // rom:ff00fc4c  0xEB00536A
"BL   CreateTask_spytask\n"    // added to create the Spytask (afaik the main CHDK Task)
"BL   taskcreatePhySw_my\n"  // --> patched taskcreate_PhySw() org: 0xFF0253dc but no BL-call found for this address, maybe it is FF0249FC!?

« Last Edit: 03 / December / 2011, 11:24:59 by tommi2water »

*

Offline tommi2water

  • ***
  • 157
  • IXUS 220 HS Firmware: 1.00c
Re: IXUS 230 HS - Porting Thread
« Reply #16 on: 03 / December / 2011, 10:54:14 »
I generated three different binaries which uses 0x2610 value and attached them to this and the next post. ZIP-Files contain corresponding boot.c files.

Attached Version 3 with 0x2610 value.
« Last Edit: 03 / December / 2011, 11:26:30 by tommi2water »

Re: IXUS 230 HS - Porting Thread
« Reply #17 on: 03 / December / 2011, 18:50:02 »
Tested all three versions, still nothing when attempting to load the binaries. Will spend the rest of the weekend looking over what's going on with the code.

*

Offline tommi2water

  • ***
  • 157
  • IXUS 220 HS Firmware: 1.00c
Re: IXUS 230 HS - Porting Thread
« Reply #18 on: 04 / December / 2011, 07:16:46 »
What I learned from here: http://chdk.setepontos.com/index.php?topic=6341.msg77286#msg77286

Maybe you should change in boot.c:
Code: [Select]
*(int*)(0x2610) = (*(int*)0xC0220130)&1 ? 0x200000 : 0x100000; //0x2610 found at address 0xff05788c
to:
Code: [Select]
*(int*)(0x2610) = (*(int*)0xC0220130)&1 ? 0x100000 : 0x200000; //0x2610 found at address 0xff05788c
This will camera and CHDK always start in REVIEW-Mode, not in RECORD-Mode. RECORD-Mode can be activated in REVIEW-Mode by pressing Shutter_Half.

For REVIEW-Mode the lens will stay inside the camera. This means that less functionality will be started on startup.

As soon as you have REVIEW-Mode working you can work on activating RECORD-Mode.

Good luck!  :)


Re: IXUS 230 HS - Porting Thread
« Reply #19 on: 05 / December / 2011, 08:57:17 »
Wow.  There's an amazing amount of activity here.  I've finally got a bit of time to look at this.  It looks like I will still try my hand, since my camera has version 1.00 and the posts so far relate to 1.00b and 1.00c.
Thanks for the links tommi2water.

 

Related Topics


SimplePortal © 2008-2014, SimplePortal