PowerShot SX230 HS - Porting Thread - page 66 - General Discussion and Assistance - CHDK Forum

PowerShot SX230 HS - Porting Thread

  • 706 Replies
  • 330469 Views
*

Offline srsa_4c

  • ******
  • 4451
Re: PowerShot SX230 HS - Porting Thread
« Reply #650 on: 22 / February / 2014, 14:00:27 »
Advertisements
...
 Shoot one picture
 - All: 383800
 - Max: 359960
...
Thanks again. That gives an idea about unused UI memory. Your logs show free RAM going down to ~233kB in shooting mode, did you have a badpixel file and DNG 1.1 activated for that (my guess is yes, since it's roughly 100-120kB more than in the previous tests)?

It would be nice if others could also post their observations (people use their cameras differently).

Re: PowerShot SX230 HS - Porting Thread
« Reply #651 on: 23 / February / 2014, 01:58:52 »
Hi srsa_4c,
... did you have a badpixel file and DNG 1.1 activated for that (my guess is yes, since it's roughly 100-120kB more than in the previous tests)?
Yes DNG 1.1.

I have a CHDK build of my own. With HDR-Picture in source code, HDR-Video ("http://chdk.setepontos.com/index.php?topic=7840.0" - funnel), FPS-Control ("http://chdk.setepontos.com/index.php?topic=7938.0 - funnel) , More GPS-Funktion, Audio On/Off in Video-Mode, ...

With that version i get the following values.

ModeAllMax
Powere on 386640 386640
1 Picture 386640 386640
Video386640 386640
HDR Picture (2 Pictures)386640 386640
HDR Video386640 386640
GPS On384544 353776
1 Picture384544 353776
Play-Mode399792 353776
Rec-Mode382752 353776
1 Picture382752 353776

By
« Last Edit: 23 / February / 2014, 02:49:26 by nocaC_230 »

*

Offline reyalp

  • ******
  • 14125
Re: PowerShot SX230 HS - Porting Thread
« Reply #652 on: 31 / May / 2014, 19:34:43 »
Some notes on this port, related to http://chdk.setepontos.com/index.php?topic=11527.msg113013#msg113013

The file counter appears to not always be updated by the time the raw hook is reached, despite having PAUSE_FOR_FILE_COUNTER 100 in capt. Setting it to 500 appears to avoid the issue (per report in thread above) but some testing by a user in IRC indicates that in normal shooting, the file counter is usually up to date when the hook is reached, meaning that this would add 500ms to most shots with raw enabled.

Additional, shooting raw in continuous mode appears to crash when CHDK is built using the windows toolchain included with CHDKShell. The crash is in filewritetask. In 101a, it is in sub_FF192764 just before the filewrite hook, with the following assert
Code: [Select]
ASSERT!! SsCaptureCommon.c Line 808
Occured Time  2014:05:31 21:22:57
Task ID: 43778143
Task name: FileWriteTas0
The relevant CHDK code is
Code: [Select]
"    BL      sub_FF192764 \n"
//hook start
"    STMFD   SP!, {R2,R4-R12,LR} \n"
"    MOV     R0, R4 \n"
"    BL      filewrite_main_hook \n"
"    LDMFD   SP!, {R2,R4-R12,LR} \n"
This happens without remoteshoot enabled. It does not happen in autobuild builds...

edit:
The assert seems to come from TakeSemaphoreStrictly
It's not the fileio_semaphore we use to protect Open etc.

The filewrite hook is code gen, so assembler copy/paste errors should be unlikely.
« Last Edit: 01 / June / 2014, 01:18:34 by reyalp »
Don't forget what the H stands for.

*

Offline whim

  • ******
  • 2046
  • A495/590/620/630 ixus70/115/220/230/300/870 S95
Re: PowerShot SX230 HS - Porting Thread
« Reply #653 on: 01 / June / 2014, 08:12:59 »
...
Additional, shooting raw in continuous mode appears to crash when CHDK is built using the windows toolchain included with CHDKShell.
...

Hi reyalp,

Normally there's 3 toolchains included - do they all show this behaviour ? If not or not tested, could you check
which one was used ?

TIA,

wim

*

Offline srsa_4c

  • ******
  • 4451
Re: PowerShot SX230 HS - Porting Thread
« Reply #654 on: 01 / June / 2014, 10:29:57 »
Code: [Select]
ASSERT!! SsCaptureCommon.c Line 808
sub_ff192764 belongs to task_ShutterSoundTask, and is fairly simple:
It creates a binary semaphore if it doesn't exist yet, and "takes" it with a timeout of 180 seconds. Note that its initial state is "taken" (1).
Another task should "give" it back in 180 seconds. A timeout or other problem with the semaphore results in the above assert.
The counterpart of sub_ff192764 is sub_ff192834, this one "gives" the semaphore back if it exists.

I would try two things:
- deactivate the filewritetask replacement in boot.c
or
- comment out the call to sub_ff192764 (this routine-pair doesn't exist on the a3200 which is roughly same generation)

The sx230 has a history of weird bugs, this could be another one of those.

Also note that the sx230 likely needs this patch for a half-working remoteshoot.

*

Offline reyalp

  • ******
  • 14125
Re: PowerShot SX230 HS - Porting Thread
« Reply #655 on: 01 / June / 2014, 17:21:11 »
Normally there's 3 toolchains included - do they all show this behaviour ? If not or not tested, could you check
which one was used ?
I use the 451 toolchain. I doubt this is actually a compiler bug (though it wouldn't be the first time :x) more likely some chance memory arrangement triggers a fatal problem.

The user who reported this also got a crash with his own build from CHDK shell, I think also using 451

Another task should "give" it back in 180 seconds. A timeout or other problem with the semaphore results in the above assert.
I think the assert is coming from the is the timeout case (in TakeSemaphoreStrictly checks for 9 which is the timeout value, and I think the assert is happening in that call rather than the following check with an explicit DebugAssert)

Quote
I would try two things:
- deactivate the filewritetask replacement in boot.c
or
- comment out the call to sub_ff192764 (this routine-pair doesn't exist on the a3200 which is roughly same generation)
Disabling the filewrite hook might tell us if there was an error in hook. OTOH the fact that this only happens with certain toolchains suggests a bigger problem though, so it might be a case memory moving stuff around enough to make it go away.

Quote
The sx230 has a history of weird bugs, this could be another one of those.
Yes. Another suggestion there might be a bigger problem somewhere else... I guess re-writing boot.c and captseq with cogegen might be another thing to try.
« Last Edit: 01 / June / 2014, 17:29:16 by reyalp »
Don't forget what the H stands for.

*

Offline reyalp

  • ******
  • 14125
Re: PowerShot SX230 HS - Porting Thread
« Reply #656 on: 01 / June / 2014, 17:54:30 »
Camera crashes in exactly the same place in the canon firmware if filewritehook is disabled. Also confirmed it is the timeout.
Don't forget what the H stands for.

*

Offline nafraf

  • *****
  • 1308
Re: PowerShot SX230 HS - Porting Thread
« Reply #657 on: 01 / June / 2014, 20:45:09 »
boot.c and capt_seq.c rewritten using code_gen

*

Offline reyalp

  • ******
  • 14125
Re: PowerShot SX230 HS - Porting Thread
« Reply #658 on: 11 / January / 2015, 20:30:44 »
Bumping this for raw saving issues in http://chdk.setepontos.com/index.php?topic=12183.20

If anyone has this camera and is willing to test, please post.
Don't forget what the H stands for.

*

Offline asp

  • *
  • 4
Re: PowerShot SX230 HS - Porting Thread
« Reply #659 on: 27 / February / 2015, 08:05:32 »
Hi!
SX230 hs 1.0.1e so far no problems
Intervalometer in raw with tv bracketing seems smooth...will post further testing results...

 

Related Topics


SimplePortal © 2008-2014, SimplePortal