SX200is Porting - page 89 - DryOS Development - CHDK Forum

SX200is Porting

  • 1105 Replies
  • 575779 Views
Re: SX200is Porting
« Reply #880 on: 21 / December / 2009, 05:21:09 »
Advertisements

*

Offline reyalp

  • ******
  • 14128
Re: SX200is Porting
« Reply #881 on: 21 / December / 2009, 05:49:24 »
One post per question is enough.

Since CHDK is already running, you can use fwrite to save from FF810000 onward.
Don't forget what the H stands for.

*

Offline OldGit

  • ****
  • 303
Re: SX200is Porting
« Reply #882 on: 21 / December / 2009, 06:11:32 »
..... CAn anybody send me the DUMP ?
Both 100C and 100D firmware dumps are available via the Wiki, go to "For Developers" then select sx200.
links are lower down the sx200 page.
OldGit
SX200 IS-100C

Re: SX200is Porting
« Reply #883 on: 21 / December / 2009, 07:48:35 »
Thanks . Now I got it.

*

Offline reyalp

  • ******
  • 14128
Re: SX200is Porting
« Reply #884 on: 23 / December / 2009, 01:43:52 »
Oldgit, here's my debugging patch. I had to dig this out of some old sd990 development patches I had saved, so I'm not sure it's 100% right. It compiles, but I haven't tested it. The stuff in SD990 capt_seq should give you some idea how to implement it.

basic idea:
capt_seq runs in a loop, handling "messages" which are just numbers that get fed into a switch statement. We want to get an idea of which one is run in particular conditions, and record any random state we think might be interesting.

At the very start of the capt_seq loop, we store the message number and call capt_seq_log_msg, which stores the current clock tick (so we can see where in the sequence things happened), the words of physw_status (so we can see which buttons are pressed) and any other values we want to store at that point.

In capt_seq we can store flags to note that a particular point was reached (the cs_j1_cp etc). The particular values I'm storing here probably don't interest you, but you can use the same idea.

At the very end of the capt_seq loop, we call the second log function which stores those. (capt_seq_log_j1_cp). They don't go directly in the struct because it's I was too lazy to do it in ASM.

In core/kbd.c
s_msg_log_dump checks for half presses. Two seconds after half press is released, it dumps the accumulated messages to A/cslog.log and resets the log buffer to empty.

A sample log (from a slightly older version without the misc stuff) looks like this:
Code: [Select]
hp, shoot
--cs msg dump tick 23640-28290 n 7
23680 0x0 0x1CF420C0 0xFA49355D 0x00408FFE
25900 0x1 0x9CF424C2 0xFA493B1D 0x0040AFFC +2220
26870 0x20 0x1CF42CC2 0xFA49355D 0x00408FFF +970
26870 0x4 0x1CF42CC2 0xFA49355D 0x00408FFF +130
27000 0x1E 0x1CF428C2 0xFA49350D 0x00408FFF
27010 0x20 0x1CF428C3 0xFA493B5D 0x0040AFFF +10
27010 0x3 0x1CF428C3 0xFA493B5D 0x0040AFFF
hp, shoot is my note that I held half press and then did a full soot. The +N are also notes I made after the fact figuring out how long each step took (which could obviously be done in the log func)

The header shows when the half press was first detected, when the log was dumped, and how many messages there were. Each half press generates one of these. Note that you can get messages from before the half press started (e.g. from powering up the camera, or changing settings that trigger capt_seq messages). The buffer filling up was never a problem when I was playing with this.

The columns are
<tick> <capt_seq message number> <physw0> <physw1> <physw2>


here's my notes on what triggers different messages on sd990
Code: [Select]
shoot seq task jump table values
startup in playback:0
halfpress to shootmode:0x16 (22)
halfpress: 0, except move mode=8
released: 3
changed flash: 0x1a 26
focus mode change: 0x16 (22) except MF=0x15 (21)
p mode-> func: 0xF (15) on enter ev comp, 0x10 (16) on leave
iso change: 0x1b (27)
full shoot 1, 4 ?
Don't forget what the H stands for.

*

Offline OldGit

  • ****
  • 303
Re: SX200is Porting
« Reply #885 on: 23 / December / 2009, 06:43:17 »
@reyalp,
thanks a lot for this, now I will have something to do over xmas (I know, I'm sad ) :haha

Have a good holiday, thanks for all your hard work and dedication to the CHDK cause.

OldGit
SX200 IS-100C

Re: SX200is Porting
« Reply #886 on: 25 / December / 2009, 15:29:34 »
Hi I'm trying to get CHDK to work for my sx200is but cannot.  I'm using firmware 1.00D which is correct.  I used cardtricks to format to fat and then used the CHDK to card button to extract the zip to the card.  CHDK is on the card, but when I go to play mode and hit the print button I get nothing.  I don't get a splash screen either and there are no firmware update options in any of the menus.

Am I missing something.  Sorry if this is the wrong forum but seems like CHDK works but I'm just doing something wrong.

Any ideas guys?  Thanks in advance.

*

Offline OldGit

  • ****
  • 303
Re: SX200is Porting
« Reply #887 on: 25 / December / 2009, 17:03:59 »
Hi I'm trying to get CHDK to work for my sx200is but cannot.  ........
@magellings
welcome.
Have you locked the card (slide lock tab down), this is how CHDK loads in "autoboot" mode.
The other way of loading CHDK is to use the "firmware update option", don't worry it won't do anything to the camera .
Take a look at the wiki pages for details of both startup options.

The other "funny" that can catch people out is the formating of the card, if larger than 4 GB you need 2 partitions.
Again this is all explained on the wiki.

Once you get the splash screen the ALT button (Print on sx200) will then take you into the CHDK Alt mode.

I suggest you take a look at the CHDK Manual, again on the Wiki.
Good luck and let us know how you get on.
OldGit
SX200 IS-100C

*

Offline reyalp

  • ******
  • 14128
Re: SX200is Porting
« Reply #888 on: 25 / December / 2009, 17:26:19 »
The other "funny" that can catch people out is the formating of the card, if larger than 4 GB you need 2 partitions.
Just to be clear, this is only needed for autoboot. "firm update" loading should work fine on any card.
Don't forget what the H stands for.

*

Offline Darkness

  • **
  • 72
  • SX200IS 100D
Re: SX200is Porting
« Reply #889 on: 25 / December / 2009, 18:15:31 »
this script seems to give problems: http://chdk.wikia.com/wiki/UBASIC/Scripts:Lightning_script_--_Fudgey

once you select it, the menu is sort of broken. I can no longer go to the file browser to select another script and the bottom part of the script menu where the script options are supposed to be does not show anything.

If I start the script, the camera crashes and shuts down...

the fast motion detection script does work

Not sure if all my files are up to date, but the chdk build should include all except the last one or two patches.
I haven't looked into possible causes yet, just wanted to check with you guys if anyone can confirm this behaviour... :-X
SX200IS 100D

 

Related Topics


SimplePortal © 2008-2014, SimplePortal