ELPH 340 (IXUS 265) - page 12 - DryOS Development - CHDK Forum

ELPH 340 (IXUS 265)

  • 172 Replies
  • 56051 Views
*

Offline srsa_4c

  • ******
  • 4382
Re: ELPH 340 (IXUS 265)
« Reply #110 on: 10 / April / 2020, 12:23:19 »
Advertisements
@blackhole, Caefix
Can you do an experiment for me?
I'm curious whether switching off the card helps with the card error Caefix is experiencing.
Please put these in task_Startup_my at the place where the diskboot-related function is commented out.
Code: [Select]
mov r0, #0
bl sub_FF06C4F4
I'm not sure if the above does what I think it does, but it does seem to be the equivalent of what DIGIC 6 cameras do.
Please comment out the fix_writable_media_flag workaround for this experiment.

I'll take a look at the startup issue.

*

Offline blackhole

  • *****
  • 812
  • A590IS 101b
    • Planetary astrophotography
Re: ELPH 340 (IXUS 265)
« Reply #111 on: 10 / April / 2020, 14:39:29 »
@blackhole, Caefix
Can you do an experiment for me?
I'm curious whether switching off the card helps with the card error Caefix is experiencing.
Please put these in task_Startup_my at the place where the diskboot-related function is commented out.
Code: [Select]
mov r0, #0
bl sub_FF06C4F4
I'm not sure if the above does what I think it does, but it does seem to be the equivalent of what DIGIC 6 cameras do.
Please comment out the fix_writable_media_flag workaround for this experiment.

I'll take a look at the startup issue.
Done.
Test build attached.

*

Offline srsa_4c

  • ******
  • 4382
Re: ELPH 340 (IXUS 265)
« Reply #112 on: 10 / April / 2020, 16:43:44 »
Done.
Thanks.

Now, about startup.

I have an old RAM dump from this model. It was made from Canon Basic, playback mode. The word at 0x2ad8 is 0x100000. I'd guess rec mode would be 0x200000.
sub_FF02BC5C evaluates 3 GPIOs (playback button, on/off button, and something else).
I think the playback button's state is *(int*)0xc022f48c & 0x80000. If I'm correct with the above guess, on/off is *(int*)0xc022f48c & 0x100000.
Since I don't know what the third startup possibility is, I'd probably evaluate the on/off button.

*

Offline reyalp

  • ******
  • 13054
Re: ELPH 340 (IXUS 265)
« Reply #113 on: 10 / April / 2020, 23:11:48 »
Since I don't know what the third startup possibility is, I'd probably evaluate the on/off button.
I'd guess third is probably the wifi / mobile connect button.
Don't forget what the H stands for.


*

Offline blackhole

  • *****
  • 812
  • A590IS 101b
    • Planetary astrophotography
Re: ELPH 340 (IXUS 265)
« Reply #114 on: 11 / April / 2020, 04:48:19 »

I have an old RAM dump from this model. It was made from Canon Basic, playback mode. The word at 0x2ad8 is 0x100000. I'd guess rec mode would be 0x200000.
sub_FF02BC5C evaluates 3 GPIOs (playback button, on/off button, and something else).
I think the playback button's state is *(int*)0xc022f48c & 0x80000. If I'm correct with the above guess, on/off is *(int*)0xc022f48c & 0x100000.
Since I don't know what the third startup possibility is, I'd probably evaluate the on/off button.
I suppose then * (int *) (0x2ad8) = (* (int *) 0xC022F48C) & 0x100000? 0x200000: 0x100000; should be fine.

One more question.
How did you get to 0xC022F48C, the first entry in the table @ 0xFF5F82DC is 0xCO22F484, I can't find any index,offset or pointer to C022F48C ?

*

Offline Caefix

  • ****
  • 407
  • Sorry, busy deleting test shots...
Re: ELPH 340 (IXUS 265)
« Reply #115 on: 11 / April / 2020, 08:31:43 »
HuHU...  :xmas Ghost catched I guess.
Very short press <play|wifi> opens lens, longer keeps it closed.
Same at Sx610 & 620.

Edit:
Ix170 short <on> keeps closed, longer opens.
Ix275 <on|wifi|play> allways closed.

Edit2: compared both builds, no diff. Browser, scripts, deleting, RAW... all good.
? fw-Update opens lens.
« Last Edit: 11 / April / 2020, 12:20:44 by Caefix »
All lifetime is a loan from eternity.

*

Offline srsa_4c

  • ******
  • 4382
Re: ELPH 340 (IXUS 265)
« Reply #116 on: 11 / April / 2020, 12:30:07 »
I'd guess third is probably the wifi / mobile connect button.
Yes, very likely. I missed that part of the manual at first.
I suppose then * (int *) (0x2ad8) = (* (int *) 0xC022F48C) & 0x100000? 0x200000: 0x100000; should be fine.
I think so, we'll find out soon.
Quote
How did you get to 0xC022F48C, the first entry in the table @ 0xFF5F82DC is 0xCO22F484, I can't find any index,offset or pointer to C022F48C ?
sub_FF06BE70 aka sub_FF06E918 takes a single argument, in r0.
That argument is multiplied by 8 (lsl #3 shifts bits to the left, 3 times). So, the GPIO address is taken from 0xFF5F82DC + 8 * r0, the mask is the word after that.

Edit2: compared both builds, no diff. Browser, scripts, deleting, RAW... all good.
If that remains so, I'd vote for keeping the later version of the code that switches off the card.

If I understand correctly, the startup workaround for sx610, 620, ixus275 will need to be revisited. After the correct startup on this cam is confirmed.

*

Offline blackhole

  • *****
  • 812
  • A590IS 101b
    • Planetary astrophotography
Re: ELPH 340 (IXUS 265)
« Reply #117 on: 11 / April / 2020, 15:05:10 »
sub_FF06BE70 aka sub_FF06E918 takes a single argument, in r0.
That argument is multiplied by 8 (lsl #3 shifts bits to the left, 3 times). So, the GPIO address is taken from 0xFF5F82DC + 8 * r0, the mask is the word after that.
Thank you for the explanation.


*

Offline blackhole

  • *****
  • 812
  • A590IS 101b
    • Planetary astrophotography
Re: ELPH 340 (IXUS 265)
« Reply #118 on: 13 / April / 2020, 05:31:27 »
Replacement of sub_ for correct power-on.
Expected behavior:
POWER (on / off) button: short press = playback mode, long press = record mode
PLAY button: always playback mode
*(int*)(0x2ad8) = (*(int*)0xC022F48C)&0x100000 ? 0x200000 : 0x100000;

*

Offline Caefix

  • ****
  • 407
  • Sorry, busy deleting test shots...
Re: ELPH 340 (IXUS 265)
« Reply #119 on: 13 / April / 2020, 10:13:05 »
<on> = play  :-X  <play> = play.
(Same as Ix275 now)
All lifetime is a loan from eternity.

 

Related Topics