SX200is Porting - page 70 - DryOS Development - CHDK Forum

SX200is Porting

  • 1105 Replies
  • 567602 Views
Re: SX200is Porting
« Reply #690 on: 23 / October / 2009, 09:47:29 »
Advertisements
One more thing... is there any way to have the camera always start in record mode when pressing the ON/OFF button? It's annoying to have to hold the button down. Is this standard behavior for CHDK?
Cameras: SX200 IS 100c US, S3 IS US

*

Offline OldGit

  • ****
  • 303
Re: SX200is Porting
« Reply #691 on: 23 / October / 2009, 09:50:42 »
One more thing... is there any way to have the camera always start in record mode when pressing the ON/OFF button? It's annoying to have to hold the button down. Is this standard behavior for CHDK?
As far as I know, yes, it's standard
SX200 IS-100C

*

Offline whim

  • ******
  • 2046
  • A495/590/620/630 ixus70/115/220/230/300/870 S95
Re: SX200is Porting
« Reply #692 on: 23 / October / 2009, 10:55:59 »
Quote
As far as I know, yes, it's standard

In fact it's quite logical, suppose you do a short press of the ON/OFF button. What happens ?

1) The cam (under Canon OS) jumps to it's entry point and goes through it's initialisation routines
2) Once it detects write protect & DISKBOOT.BIN presence a reboot takes place -> CHDK is loaded and started
3) Once CHDK has hooked the keyboard task it can 'listen' to key input

so, unless the button is still pressed when the cam has 'finally' arrived at point 3) CHDK has no way of
knowing which command (on/off or play button) has triggered the startup, and will default to play mode ...

wim

PS: cams that have a mechanical play/shoot switch (most older cams) will happily boot into shoot mode
      on short press
« Last Edit: 23 / October / 2009, 11:07:27 by whim »

*

Offline reyalp

  • ******
  • 14121
Re: SX200is Porting
« Reply #693 on: 23 / October / 2009, 16:07:25 »
whim: technically, we check the button a bit before #3, in boot.c, e.g. (sx10 100c)
Code: [Select]
   *(int*)(0x25BC+4)= (*(int*)0xC0220134)&1 ? 0x2000000 : 0x1000000; // replacement of sub_FF8218C8 for correct power-on.

See also http://chdk.kernreaktor.org/mantis/view.php?id=300

Note that with enough gymnastics we might be able to grab the button state a bit earlier in the boot process, but I suspect most of the time is spent by the old firmware loading our image.

The only way to really fix this would be if the button state is left lying around somewhere it doesn't get clobbered when the diskboot or FI2 loads.
Don't forget what the H stands for.


*

Offline whim

  • ******
  • 2046
  • A495/590/620/630 ixus70/115/220/230/300/870 S95
Re: SX200is Porting
« Reply #694 on: 23 / October / 2009, 17:01:39 »
@reyalp

thanks for putting the dots on the i's !

BTW  Is there any technical reason the default boot logic could be not reversed ? I mean
        
        current:     if 'on/off' looooooong pressed -> shoot mode        else -> play mode

        reversed:   if 'play'    looooooong pressed -> play mode          else -> shoot mode

(i personally much prefer the current logic, but i'm sure there would be takers for reverse logic too)

cheers,

wim

Re: SX200is Porting
« Reply #695 on: 23 / October / 2009, 17:41:31 »
Good idea whim. If we can't detect the button state, we should at least be able to set the default startup mode. I'd probably take the second option, as it would reduce startup time a little.
Cameras: SX200 IS 100c US, S3 IS US

*

Offline reyalp

  • ******
  • 14121
Re: SX200is Porting
« Reply #696 on: 23 / October / 2009, 17:54:41 »
BTW  Is there any technical reason the default boot logic could be not reversed ? I mean
No really serious ones that I can think of, but the current decision happens long before the cfg has been loaded.
I'd probably take the second option, as it would reduce startup time a little.
It wouldn't be faster than holding the button down (for those cameras that implement it properly, some don't). More convenient or comfortable maybe, but not faster.

IMO, once you are in the habit of holding the button down until the lens starts to extract, the current system works quite well.
Don't forget what the H stands for.

*

Offline whim

  • ******
  • 2046
  • A495/590/620/630 ixus70/115/220/230/300/870 S95
Re: SX200is Porting
« Reply #697 on: 24 / October / 2009, 06:08:03 »
@Ezzelin / any SX200IS users preferring to hold down the "play" instead of the "on/off" button ;)

BTW  Is there any technical reason the default boot logic could be not reversed ? I mean
No really serious ones that I can think of, but the current decision happens long before the cfg has been loaded.
I'd probably take the second option, as it would reduce startup time a little.
It wouldn't be faster than holding the button down (for those cameras that implement it properly, some don't). More convenient or comfortable maybe, but not faster.

IMO, once you are in the habit of holding the button down until the lens starts to extract, the current system works quite well.


tested out 'reverse boot logic' on my ixus870is, using the info from reyalp's post #693, works
just swapped the values:
Quote
//   *(int*)0x2394= (*(int*)0xC02200F8)&1 ? 0x200000 : 0x100000; // replacement of sub_FF821958 for correct power-on.
   *(int*)0x2394 = (*(int*)0xC02200F8)&1  ? 0x100000 : 0x200000; // replacement of sub_FF821958 for correct power-on.
result: short press on either on/off or play button starts cam shoot mode
          long press play button starts play mode

As reyalp said, it will not be possible to implement this as a menu option, because the CFG is not loaded yet
when this happens; it should be easy to implement as a patch or compile time option though done, see patch

cheers,

wim

edit3: opened a separate topic for this here: http://chdk.setepontos.com/index.php/topic,4421.msg42278.html#msg42278
         (the patch is attached there, now)
« Last Edit: 27 / October / 2009, 17:57:40 by whim »


Re: SX200is Porting
« Reply #698 on: 24 / October / 2009, 12:10:18 »
with the GM1.00D firmware in the chdk menu "Miscellaneous->Show build info it says "FW Vers: 100c"

is that a bug?

*

Offline whim

  • ******
  • 2046
  • A495/590/620/630 ixus70/115/220/230/300/870 S95
Re: SX200is Porting
« Reply #699 on: 24 / October / 2009, 12:29:10 »
@tehdog

No. the two currently known versions are functionally equivalent from the point of vue of CHDK,
so the autobuild just copies a 100 C to a 100 D version, that's why your CHDK identifies itself as
100 C

HTH,

wim

 

Related Topics


SimplePortal 2.3.6 © 2008-2014, SimplePortal