A495 porting thread - page 26 - DryOS Development - CHDK Forum

A495 porting thread

  • 346 Replies
  • 121927 Views
Re: A495 porting thread
« Reply #250 on: 04 / June / 2011, 20:58:40 »
Advertisements
It sounds like the init_file_modules_task isn't getting injected - I had this problem early on with the G12 and SX30 and the A495 is close to the same DryOS version (A495 = R43, G12/SX30 = R45).
Hmmm .. so why does this work on cards < 4G ?

Quote
Also I'd suggest changing the code in taskHook to use address comparisons rather than string comparisons as this function gets called hundreds of times (see my G12/SX30 ports for example).
After you find the addresses in the firmware either insert the hex values directly in taskHook, or add them to stubs_entry_2.S and reference them by name (if you do this make sure to use the DEF() macro not the NHSTUB() macro).
That's what I do with the port I can actually test ( i.e. my camera)  - IXUS120-SD940.  I just used the SDMINSTE.EXE to partition and format an 8G card for that camera.   And I'm getting the dreaded "Memory Card Error".   The CHDK logo does not show on boot but the text box does.  So I know the CHDK boot.c code runs - but then it can't load the logo bitmap from the SD card.  You can get the CHDK menu to run at that point too - so its not like CHDK has crashed.

There is something wrong here.



« Last Edit: 04 / June / 2011, 21:00:23 by waterwingz »
Ported :   A1200    SD940   G10    Powershot N    G16

*

Offline philmoz

  • *****
  • 3450
    • Photos
Re: A495 porting thread
« Reply #251 on: 04 / June / 2011, 21:08:03 »
It sounds like the init_file_modules_task isn't getting injected - I had this problem early on with the G12 and SX30 and the A495 is close to the same DryOS version (A495 = R43, G12/SX30 = R45).
Hmmm .. so why does this work on cards < 4G ?

Timing. Sometimes the firmware version of init_file_modules_task gets run before the CHDK version if you don't get the hooks right. Once it's run it won't run again so the CHDK code doesn't execute.

Quote
Quote
Also I'd suggest changing the code in taskHook to use address comparisons rather than string comparisons as this function gets called hundreds of times (see my G12/SX30 ports for example).
After you find the addresses in the firmware either insert the hex values directly in taskHook, or add them to stubs_entry_2.S and reference them by name (if you do this make sure to use the DEF() macro not the NHSTUB() macro).
That's what I do with the port I can actually test ( i.e. my camera)  - IXUS120-SD940.  I just used the SDMINSTE.EXE to partition and format an 8G card for that camera.   And I'm getting the dreaded "Memory Card Error".   The CHDK logo does not show on boot but the text box does.  So I know the CHDK boot.c code runs - but then it can't load the logo bitmap from the SD card.

There is something wrong here.


Could be the same thing - if the CHDK init_file_modules_code doesn't run it won't swap to the large partition.

The 1.03c firmware for the Ixus120 also appears to use addresses 0x1938 and 0x193C so you could try setting 0x193C to taskHook and see if that helps.

Phil.
« Last Edit: 04 / June / 2011, 21:09:44 by philmoz »
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: A495 porting thread
« Reply #252 on: 04 / June / 2011, 21:20:41 »
The 1.03c firmware for the Ixus120 also appears to use addresses 0x1938 and 0x193C so you could try setting 0x193C to taskHook and see if that helps.
So to make sure we really hit this with a big hammer,  how about :
Quote
   *(int*)0x1934=(int)taskHook;
   *(int*)0x1938=(int)taskHook;
   *(int*)0x193C=(int)taskHook;

Ported :   A1200    SD940   G10    Powershot N    G16

*

Offline philmoz

  • *****
  • 3450
    • Photos
Re: A495 porting thread
« Reply #253 on: 04 / June / 2011, 21:28:39 »
The 1.03c firmware for the Ixus120 also appears to use addresses 0x1938 and 0x193C so you could try setting 0x193C to taskHook and see if that helps.
So to make sure we really hit this with a big hammer,  how about :
Quote
   *(int*)0x1934=(int)taskHook;
   *(int*)0x1938=(int)taskHook;
   *(int*)0x193C=(int)taskHook;



:) worth trying to see if it helps. If it fixes the problem try removing 0x1934 and see if anything changes. If it still works then I'd leave out 0x1934 - I'm not a fan of setting things if we don't really know what it does (although much of CHDK seems to work like that).

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: A495 porting thread
« Reply #254 on: 04 / June / 2011, 21:59:00 »
:) worth trying to see if it helps. If it fixes the problem try removing 0x1934 and see if anything changes. If it still works then I'd leave out 0x1934 - I'm not a fan of setting things if we don't really know what it does (although much of CHDK seems to work like that).

Tried this :
Code: [Select]
 *(int*)0x1934=(int)taskCreateHook;
  *(int*)0x1938=(int)taskCreateHook;
  *(int*)0x193C=(int)taskCreateHook;
  *(int*)0x1940=(int)taskCreateHook;  

Works fine on a 2G card.  No luck on my 8G, 2 partition card formatted with sdminste.exe - CHDK comes up and runs but I still get the dreaded "Memory card error".

Tried using the menus to "Swap partitions" - does not seem to do anything with the card on the camera or PC. 

No wonder the newbies are getting frustrated.


« Last Edit: 04 / June / 2011, 22:14:36 by waterwingz »
Ported :   A1200    SD940   G10    Powershot N    G16

*

Offline philmoz

  • *****
  • 3450
    • Photos
Re: A495 porting thread
« Reply #255 on: 04 / June / 2011, 22:20:00 »
:) worth trying to see if it helps. If it fixes the problem try removing 0x1934 and see if anything changes. If it still works then I'd leave out 0x1934 - I'm not a fan of setting things if we don't really know what it does (although much of CHDK seems to work like that).

Tried this :
Code: [Select]
  *(int*)0x1934=(int)taskCreateHook;
  *(int*)0x1938=(int)taskCreateHook;
  *(int*)0x193C=(int)taskCreateHook;
  *(int*)0x1940=(int)taskCreateHook; 

Works fine on a 2G card.  No luck on my 8G, 2 partition card formatted with sdminste.exe - CHDK comes up and runs but I still get the dreaded "Memory card error".

Tried using the menus to "Swap partitions" - does not seem to do anything with the card on the camera or PC. 

No wonder the newbies are getting frustrated.




Re-read your earlier post - you say the CHDK logo text appears; but not the logo image.
Did you copy the CHDK folder to both partitions?
If not then that would be why the logo is missing.
If you did copy the folder then it looks like the init_file_modules_task code is swapping to the larger partition; but something else in the camera firmware doesn't like this.

Don't have any other things to try right now, if I think if anything I'll let you know.

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: A495 porting thread
« Reply #256 on: 04 / June / 2011, 22:23:35 »
Re-read your earlier post - you say the CHDK logo text appears; but not the logo image.
Did you copy the CHDK folder to both partitions?
Doh.  Before I go off on a google search,  how do I get my PC to recognize the FAT32 partition so that I can copy those files to the FAT32 as well  ?  I was counting on using the camera to "swap partitions" but that does not seem to be working either.

Ported :   A1200    SD940   G10    Powershot N    G16

*

Offline philmoz

  • *****
  • 3450
    • Photos
Re: A495 porting thread
« Reply #257 on: 04 / June / 2011, 22:30:41 »
Re-read your earlier post - you say the CHDK logo text appears; but not the logo image.
Did you copy the CHDK folder to both partitions?
Doh.  Before I go off on a google search,  how do I get my PC to recognize the FAT32 partition so that I can copy those files to the FAT32 as well  ?  I was counting on using the camera to "swap partitions" but that does not seem to be working either.



There's a swap partitions option in sdminste.
After you swap make sure to format the larger partition as well.

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: A495 porting thread
« Reply #258 on: 04 / June / 2011, 22:43:38 »
After you swap make sure to format the larger partition as well.
Format the FAT32 partition ?   http://homepages.rpi.edu/~markhn/sounds/32dohs.wav   :o

Suddenly everything works and I am an idiot.

So why is this so hard ?  Do we need to nuke Cardtricks ? (sorry whim)  Seems like sdminste.exe does this right.

I suppose that now I also need to find a 4G card and see if I can make that work as FAT16.  There is an expensive one in my wife's camera - I wonder if she will notice if I slip in an elcheapo 8 G card in its place.


Ported :   A1200    SD940   G10    Powershot N    G16

Re: A495 porting thread
« Reply #259 on: 04 / June / 2011, 23:47:52 »
Hi aterwingz.

Good work you've done.
But too fast for me...
...had just written your beta2 on my SD card - found refreshing browser your beta3 - having this on the card found beta4....
So i had to test backward - beta 4 1st.

CHDK A495 firmware 1.00f Beta 4, 1.00F:
raw works.
badpixel.bin creation works, but with black display while processing picture; *.dng format works.
video recording works.  
zebra works; but, because of reacting a little less over exposure sensitive, while testing to heaven near sun camera freezes some 2 or 3 times - had to unlock batteries to restart sometimes.
histogram (always; blend) works; but whithout green paletted green values.
grids work; but sometimes disappear until restart of camera.
Tv bracketing (1 - 2 EV steps; +/-) works as so far as custom timer does defined number of exposures - but with the same exposure for all picts;
2nd and following bracketing series lead to frozen camera until unlock of batteries.

CHDK A495 firmware 1.00f Beta 3, 1.00F:
same behavior as above.
CHDK A495 firmware 1.00f Beta 2, 1.00f:
same behavior as above except processing status is displayed while badpixel.bin creation.

I wanted to send this tonight but did suddenly fall to coma...
...now i do a 15o miles trip to a dog show with my youngest dobi named Koma...

I am online again this evening.

Good luck for your card replacement plan, very risky this!


regards
« Last Edit: 04 / June / 2011, 23:51:30 by D. Obermann »
IXUS60/SD600, FW 1.00A; Powershot S95, FW 1.00H; Powershot A495, FW 1.00F;
sometimes IXUS100 IS, FW 1.00C; infrequently IXUS80 IS, FW 1.01B

 

Related Topics


SimplePortal © 2008-2014, SimplePortal